my ($self, $app) = @_;
# Start timer
- $app->plugins->add_hook(
+ $app->hook(
before_dispatch => sub {
my ($self, $c) = @_;
return unless $ENV{PROFILE};
);
# End timer
- $app->plugins->add_hook(
+ $app->hook(
after_dispatch => sub {
my ($self, $c) = @_;
my $p = $ENV{PROFILE} || return;