[Catalyst] Strange warning...

Tomas Doran bobtfish at bobtfish.net
Fri Nov 20 18:19:47 GMT 2009


Rippl, Steve wrote:
> Hi,
> 
> Catalyst version 5.80011
> 
> This line...
> 
> $c->response->redirect($c->uri_for($c->controller('WsdSis::Controller::Section')->action_for('list')));
> 
> is giving me this warning...
> 
> [warn] Used regexp fallback for
> $c->controller('WsdSis::Controller::Section'), which found
> 'WsdSis::Controller::Sections'. Relying on regexp fallback behavior for
> component resolution is unreliable and unsafe. You probably meant
> $c->controller('WsdSis::Controller::Sections') instead of
> $c->controller({'WsdSis::Controller::Section'}), but if you really
> wanted to search, pass in a regexp as the argument like so:
> $c->controller(qr/WsdSis::Controller::Section/)
> at /srv/WsdSis/script/../lib/WsdSis/Controller/Login.pm line 50
> 
> But I haven't got $c->controller({'WsdSis::Controller::Section'}) in my
> code?
> 
> What am I missing?

You're either passing in the full class name (i.e. 
WsdSis::Controller::Section is wrong, you want to just pass Section), or 
you've got a singular vs plural issue?

Can you show us the code around line 50 which is fingered by the warning 
message?

I note that message isn't too helpful, and has been improved in the next 
release of Catalyst..

Cheers
t0m



More information about the Catalyst mailing list