[Catalyst] Problem with CHI in Catalyst application
cub.uanic at gmail.com
Tue Jan 18 06:02:20 GMT 2011
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
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
3) http://paste.scsys.co.uk/83118 - this is config of CHI, changing
driver to "Null" doesn't solve problem, and get exact same error
4) http://paste.scsys.co.uk/83119 - this is backtrace, up to first
line of CHI::Driver::Metacache::_build_meta_cache()
5) http://paste.scsys.co.uk/83129 - this is variables dump, right before line 17
Error occurs only on first call to $self->cache->compute() for given
args. Next calls with same args working fine, and don't throw any
errors. Restarting app lead to error on first call again. Seems, this
is related to CHI::set() only? Nevertheless, even with error, value in
cache IS set. After exception call stack return control to Catalyst,
and he ready to accept next request, and on next request I'm not only
don't have error, but CHI::compute() give me correct value from cache.
Will be glad to get any help or ideas.
Thanks in advance,
Oleg Kostyuk (CUB-UANIC)
More information about the Catalyst