[Catalyst] Getting strange warning each time a request is made to myApp

Russell Jenkins russell.jenkins at strategicdata.com.au
Sat Mar 14 02:58:49 GMT 2009


kakimoto at tpg.com.au wrote:

> ----- extract START -------
> 
> [warn] Used regexp fallback for $c->model('myApp::View::HTML'), which
> found 'myApp::View::HTML=HASH(0x8ef7b50)'. Relying on regexp fallback
> behavior for component resolution is unreliable and unsafe. You probably
> meant $c->model('myApp::View::HTML=HASH(0x8ef7b50)') instead of
> $c->model{'myApp::View::HTML'}, but if you really wanted to search, pass
> in a regexp as the argument like so: $c->model(qr/myApp::View::HTML/) at
> /usr/local/lib/perl5/site_perl/5.8.9/Catalyst/Action/RenderView.pm line 56
> [debug] Rendering template "index.tt2"
> [debug] Applying HTML page layout wrappers to index.tt2
> 
> ----- extract END -------

Hmmm, looks like a poor error message confusing what's going on..

RenderView calls $c->view();   ( with no arguments )
Your warning gets thrown from $c->_comp_search_prefixes() from within 
the call to view().

I'm guessing you have a single view in myApp but have not configured a 
default view  ( $c->config->{default_view} )  or set current_view or 
current_view_instance  in the stash.

Hope that helps,
Russell.




More information about the Catalyst mailing list