On 01/04/11 09:38, Alessandro Ranellucci wrote:
On 1-04-2011 at 10:21, Richard Huxton wrote:
'before' hooks are scoped to a single Dancer app. Note that splitting your application in packages is not sufficient to have Dancer see them as different 'apps': you have to load them using load_app(). Everything (well, almost) that happens during that load_app() call is scoped to that particular app and not to the global application.
Aha! That's the missing bit of the puzzle.
Note that while this works correctly for the example you provided, there are some issues that you may be interested in:
https://github.com/sukria/Dancer/issues/421 https://github.com/sukria/Dancer/issues/425 https://github.com/sukria/Dancer/issues/429
Thanks a lot -- Richard Huxton Archonet Ltd