http://qs1969.pair.com?node_id=943216


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        

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!!!