* On Mon, Jan 26 2009, Aristotle Pagaltzis wrote:
>     sub auto :Private {
>       my ( $self, $c ) = @_;
>
>       return 1 if user_logged_in;
>
>       $c->redirect( $c->req->base );
>       return 0;
>     }

If we are playing golf, I submit:

    sub auto :Private {
        my $c = pop;
        return user_logged_in || $c->redirect( ... ) || 0;
    }

Now I have that much more disk space free for pr0n!

Regards,
Jonathan Rockway

--
print just => another => perl => hacker => if $,=$"

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to