On Sun, Jul 12, 2009 at 1:43 AM, Tomas Doran<[email protected]> wrote:
> Having spoken to the the author of the above mentioned module, I've gone
> ahead and converted it to an ActionRole:
>
> http://github.com/bobtfish/catalyst-actionrole-acl/tree/master

I just had a look there:

   sub foo
     :Local
     :Does(ACL)
     :RequiresRole(admin)
     :ACLDetachTo(denied)


Nice - I hope this formatting becomes a standard.  Stacking of more
and more attrs on the same line was driving me crazy - I did not know
that you can put a newline there.

By the way - theoretically all this could be equivalently coded as
something like:

package MyController;
use ....
with ACL;

sub foo : Local {
  ($self, $c, @args ) = @_;
  $self->check_acl_role( 'admin', 'denied' );


It seems that people prefer the attributes - I guess because they are
more declarative.

-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

_______________________________________________
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