24 Oct
2013
24 Oct
'13
8:16 a.m.
Using Dancer2 I would like to change the route before the user reaches the route. (e.g. if the user is not logged in) https://metacpan.org/pod/Dancer2::Cookbook#Before-filters---processed-before... seems to suggest forward hook before => sub { forward '/foo/oversee'; }; but that just lead me to deep recursion. Is this a bug or am I doing something wrong? My assumption was that after that forward the before hook should not run again. So maybe I need to rephrase the question? How to change the rout on the fly and NOT call the before hook again? regards Gabor