* If you remove max_size from the config, does the error goes away?
* If you change the compute() call to a more standard get()/set() pattern, does the error go away?
* If you change owner_cache (line 9 of Metacache.pm) to be 'required => 1', does a new error occur?
Thanks
Jon
On Jan 17, 2011, at 10:02 PM, Oleg Kostyuk wrote:
> Hello guys,
>
> Sorry for posting in several groups/mainling list, but seems all of
> them are (or may be) related to this problem.
>
> I have problem with CHI.
> Seems, it independent from used CHI Driver.
>
> Here is error message that I get:
> ===================
> [error] Caught exception in
> RVI::Bonvoyage::Web::Controller::Search->show_search_result "Can't
> call method "constructor_params" on an undefined value at
> /home/cub/share/perl/lib/perl5/CHI/Driver/Metacache.pm line 17."
> ===================
>
> I tried to solve it on IRC, but this was deep night, and too few
> peoples was online. But I did several pastes:
> 1) http://paste.scsys.co.uk/83116 - this is method in model class,
> contain call to CHI->compute()
> 2) http://paste.scsys.co.uk/83117 - this is beginning of
> CHI/Driver/Metacache.pm, with mark on line 17
2011/1/20 Jonathan Swartz <swa...@pobox.com>:
> It seems like the owner_cache attribute of CHI::Driver::Metacache, which is a weak reference,
> is getting undefined because the parent cache is garbage collected. Either that or it was never initialized.
>
> * If you remove max_size from the config, does the error goes away?
Yes, without max_size all working as expected and without any errors.
> * If you change the compute() call to a more standard get()/set() pattern, does the error go away?
With defined max_cache and using get/set, leads to error:
[error] Caught exception in
RVI::Bonvoyage::Web::Controller::Search->show_search_result
"Can't call method "constructor_params" on an undefined value at
/home/cub/share/perl/lib/perl5/CHI/Driver/Metacache.pm line 18."
> * If you change owner_cache (line 9 of Metacache.pm) to be 'required => 1', does a new error occur?
Yes, exactly as in previous scenario.
Sorry for a delay, I was to busy with work. I'm hope this response
help you with solving the issue. Don't hesitate to send more testing
scenarios.
Will wait for your response,
Good luck!
2011/1/24 Oleg Kostyuk <cub....@gmail.com>:
The best (only?) way for us to help you would be for you to come up with a minimal reproduction of the bug. In particular, get it out of Catalyst into a script, then remove pieces until you are down to the minimal script that fails. In the process, you may well figure out where things are going wrong.
Jon