Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Help with Try::Tiny and Catalyst::Authentication::Realm::Progressive (catch { return })

by tye (Sage)
on Dec 13, 2011 at 00:30 UTC ( #943216=note: print w/replies, xml ) Need Help??


in reply to Help with Try::Tiny and Catalyst::Authentication::Realm::Progressive

You can't make your outer sub return by saying 'return' within the (implied) sub that you passed to 'catch'. catch { return } is the same as &catch( sub { return } ) so the 'return' simply returns from the anonymous sub.

- tye        

  • Comment on Re: Help with Try::Tiny and Catalyst::Authentication::Realm::Progressive (catch { return })
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Help with Try::Tiny and Catalyst::Authentication::Realm::Progressive (catch { return })
by ghenry (Vicar) on Dec 13, 2011 at 07:26 UTC

    Thanks. I've realised that from the docs and doing more tests now, but why, without catch does $auth_obj = $realm->authenticate( $c, $auth ); not work as expected like the original code? Nothing else has changed.

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://943216]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2022-06-26 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (83 votes). Check out past polls.

    Notices?