[dancer-users] What to do with 'add_hook'

Henk van Oers hvo.pm at xs4all.nl
Mon Feb 16 08:26:28 GMT 2015


While working on https://github.com/hvoers/Dancer-Plugin2
I found 'add_hook'.
Searching for that keyword gave me:

Dancer/Plugin.pm
21:  add_hook
35:sub add_hook { Dancer::Hook->new(@_) }

Dancer/Plugin/Lexicon.pm
40:add_hook before => sub {
67:add_hook before_template => sub {

Mmmm, no pod...

In Dancer2:

Dancer2/Core/App.pm
457:# add_hook will add the hook to the first "hook candidate" it finds 
that support
459:around add_hook => sub {
465:    my $add_hook_caller = [ $package, $file, $line ];
491:        $hookable->has_hook($name) and $hookable->add_hook(@_);
506:      $add_hook_caller;
556:    $self->add_hook(

Dancer2/Core/DSL.pm
155:    $self->app->add_hook(

Dancer2/Core/Role/Hookable.pm
82:        $self->add_hook($hook);
95:sub add_hook {

Dancer2/Plugin.pm
322:        $dsl->app->add_hook(

Mmmm, that last line is in a pod section...

In D1 we also have Dancer::App

Should the implementation of 'add_hook' move
from Dancer/Plugin.pm to Dancer::App ?

And where is the pod?

-- 
Henk


More information about the dancer-users mailing list