[dancer-users] Before Hook hit multiple times.

David Golden xdg at xdg.me
Thu Jan 3 14:52:11 GMT 2013


On Thu, Jan 3, 2013 at 9:43 AM, Ovid <curtis_ovid_poe at yahoo.com> wrote:
> On the other hand, if you can demonstrate a foolproof method of determining which requests are of human origin and which are not, I suspect the Dancer team would be happy to incorporate this right after you pick up your Turing Award :)

I think we may have a sort of XY problem.

The underlying question seems to be this: "how do I run common code
for some but not all requests?"

Dancer doesn't (to my knowledge) have a way to have per-route hooks,
or hooks for routes matching some criteria.

    before qr{^/private} => sub { ... };

(This is the sort of thing that I think Catalyst does with 'begin'
actions in controllers.)

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