[dancer-users] Dancer::Plugin::Auth::Extensible - removing sub attributes - ready to try out

David Golden xdg at xdg.me
Sat Dec 15 17:35:15 GMT 2012


On Sat, Dec 15, 2012 at 11:40 AM, David Precious <davidp at preshweb.co.uk> wrote:
> And to require specific roles:
>
>     get '/beer' => requires_role BeerDrinker => sub { ... };

As implemented, requires_role() only allows a single role.  I think
you should do something along the lines of:

    sub requires_role {
        my $coderef = pop;
        my @roles = @_;
        ...
    }

And then s/requires_role/requires_roles/ perhaps.

David

-- 
David Golden <xdg at xdg.me>
Take back your inbox! → http://www.bunchmail.com/
Twitter/IRC: @xdg


More information about the dancer-users mailing list