[Catalyst] Acl and Class::C3

'Yuval Kogman' nothingmuch at woobling.org
Thu Jan 26 07:40:23 CET 2006


On Wed, Jan 25, 2006 at 21:57:01 +0100, Kiefer, Sascha wrote:
> > That's because the ACL engine throws an error when access is 
> > denied. You need to handle this error, see the documentation.
> > 
> > -- 
> 
> Ok, this what i have:
> 
> __PACKAGE__->deny_access_unless('/', sub { 0 } );
> __PACKAGE__->allow_access_if('/authen/login', sub { 1 } );
> 
> ub end : Private {
> 	my ( $self, $c ) = @_;
> 
> 	if ( $c->error and $c->error->[-1] =~ /access denied/) {

$c->error(0) clears the error, and around here is the right place

but

	sub access_denied : Private {

	}

is the preferred way to handle it - it's inherited like 'end'.

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me beats up some cheese: neeyah!!!!!!!!!!!!!!!!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060126/3188bf44/attachment.pgp


More information about the Catalyst mailing list