[Dancer-users] What's my route handler?
David Precious
davidp at preshweb.co.uk
Wed Feb 15 19:35:50 CET 2012
On Wed, 15 Feb 2012 15:58:15 +0000
David Cantrell <david at cantrell.org.uk> wrote:
> get '/billing' => sub :CapoFamiglia :Accountants { ... };
> get '/killing' => sub :CapoFamiglia :Hitmen { ... };
>
> So, my question is ... how can I get at those subroutine references
> from inside my 'before' hook so that I can
> attributes::get($route_handler) ?
Probably the easiest, and most sane, way, would be for the before hook
to get passed the route handler as a parameter.
That's a dead simple change to make, and should, I believe, do the job.
I'll check none of the other core devs object to this (I can't think
why they would), then Make It So.
--
David Precious ("bigpresh") <davidp at preshweb.co.uk>
http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter
www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook
www.preshweb.co.uk/cpan www.preshweb.co.uk/github
More information about the Dancer-users
mailing list