[Catalyst] Why no extra attributes on Private actions?
Christopher H. Laco
claco at chrislaco.com
Tue Jan 22 17:53:49 GMT 2008
Bill Moseley wrote:
> In Catalyst::Controller register_actions() there's this code:
> =
> my $attrs =3D $self->_parse_attrs( $c, $method, @{ $cache->[1] } );
> if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) {
> $c->log->debug( 'Bad action definition "'
> . join( ' ', @{ $cache->[1] } )
> . qq/" for "$class->$method"/ )
> if $c->debug;
> next;
> }
> =
> Why are no other attributes allowed if the action include the
> "Private" attribute?
> =
> =
> This came up because I'm using "SSL" to indicate actions that require
> SSL:
> =
> sub secret : Local SSL {}
> =
> =
> But, it would also be handy to be able to protect all actions below =
> a give controller via:
> =
> sub auto : Private SSL { 1 }
> =
> =
Why not just leave off Private altogether?
I did that with index/default all the time until I weend myself off of =
them for Chained for just that reason.
Now, about the sub named 'index' being a special name that does evil =
when you do sub index : Chained because is the most appropriate =
name...... that's another story...
-=3DChris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080122/d8ee=
dbc0/signature.pgp
More information about the Catalyst
mailing list