[Catalyst] exception handling?

Matt S Trout dbix-class at trout.me.uk
Tue Nov 15 21:08:00 CET 2005


On Tue, Nov 15, 2005 at 06:18:13PM +0000, Caroline Johnston wrote:
> > Hmm. Against 5.5+, I'd suggest using
> >
> > $c->forward('/login/login')
> >   unless ($c->session->{user} || $c->action eq '/login/login');
> >
> 
> eeep:
> Caught exception "Operation `eq': no method found,
>         left argument in overloaded package Catalyst::Action,
>         right argument has no overloaded magic

Ick. Sorry.
 
> the /login match was a shortcut cos I've got login/login and
> login/register and I need to allow public access to both. Better to name
> the paths explicitly?

In which case $c->action->namespace should be 'login' for both - you could
test that :)

-- 
     Matt S Trout       Specialists in Perl consulting, web development, and
  Technical Director    UNIX/Linux systems architecture and automation. Mail
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list