Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by tye (Sage)
on Dec 13, 2011 at 00:30 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-25 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found