* Chisel Wright <[EMAIL PROTECTED]> [2008-03-20 11:25]:
> Unless I need more coffee, these two say different things.

They do.

> Is the only way to get OR like behaviour to use the example
> from the cookbook?

(You mean the advent entry.) No.

>    Zoo->deny_access_unless( "/moose_cage", sub {
>        my $c = shift;
>           $c->check_roles( "moose_trainer" )
>        || $c->check_roles( "moose_feeder" );
>    });

    Zoo->deny_access_unless( '/moose_cage', sub {
        shift->check_any_user_role( qw( moose_trainer moose_feeder ) );
    });

But you can write multiple rules for the same action; why not do
it that way?

    __PACKAGE__->deny_access_unless( '/books/delete', [ $_ ] )
        for qw/user admin/;

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
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