t/lib/Dancer2/Plugin/Hookee.pm
raw| 1 | package Dancer2::Plugin::Hookee; |
| 2 | |
| 3 | use Dancer2::Plugin; |
| 4 | |
| 5 | register_hook 'start_hookee', 'stop_hookee'; |
| 6 | register_hook 'third_hook'; |
| 7 | |
| 8 | register some_keyword => sub { |
| 9 | execute_hook('start_hookee'); |
| 10 | }; |
| 11 | |
| 12 | register some_other => sub { |
| 13 | execute_hook('third_hook'); |
| 14 | }; |
| 15 | |
| 16 | register_plugin; |
| 17 | |
| 18 | 1; |