[Catalyst] Strange RenderView error

Tomas Doran bobtfish at bobtfish.net
Sat May 23 15:10:26 GMT 2009


Ivan Wills wrote:
> |Caught exception in Diet::Controller::Root->end "Can't use an undefined value as a HASH reference at /usr/local/share/perl/5.10.0/Catalyst/Action/RenderView.pm line 34."|
> 
> This only with one of my controllers all the others work fine, also the 
> line mentioned in RenderView uses /$c->req->params->{dump_info}/ so I 
> assume params is some how being undefined.
> 
> I have tried setting/not setting templates and even removing the entire 
> body of the index method none of these effect the error.
> 
> Any ideas about how to fix this? I am using Catalyst 5.80004.

Hmm, I can't really tell what is going on / guess at the reason for the 
error from that.

My wild stab in the dark guess would be that you use using Moose in 
MyApp.pm, and saying __PACKAGE__->meta->make_immutable, rather than 
__PACKAGE__->meta->make_immutable(replace_constructor => 1);

If you've still got this issue, could you tear your app apart into a 
test case?

(I.e. make a new TestAppp and copy in the 'special' controller in 
question, and MyApp.pm, and Controller::Root, make t/01app.t fail and 
throw a tarball online / shove it on github)...

This is likely to reveal the issue by itself, but if it doesn't, it's a 
nice minimum set that someone else can experiment with..

Cheers
t0m



More information about the Catalyst mailing list