clemep8 has asked for the wisdom of the Perl Monks concerning the following question:
If I append an appname => 'A' to the use Dancer2 directive in MyHook, I can get the hooks registered in app A, and likewise with app B, but I'd like to find a way to get the hooks registered in both apps.package A; use Dancer2 appname => 'A'; use MyHook; ... package B; use Dancer2 appname => 'B'; use MyHook; ... package MyHook; use Dancer2; hook before => sub { print "hello\n"; };
Thoughts?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dancer2 hooks and perl modules
by MrCromeDome (Deacon) on Dec 22, 2020 at 20:37 UTC | |
by clemep8 (Acolyte) on Dec 23, 2020 at 19:58 UTC | |
|
Re: Dancer2 hooks and perl modules
by kcott (Archbishop) on Dec 23, 2020 at 07:11 UTC |