author 'Dobrica Pavlinusic <dpavlin@rot13.org>';
license 'dual';
-requires 'Mojolicious' => '1.13';
+requires 'Mojolicious' => '2.61';
requires 'Data::Dump';
requires 'File::Slurp';
requires 'JSON';
# $self->plugin( 'request_timer' );
- $self->plugins->add_hook(
+ $self->hook(
after_dispatch => sub {
my ($self) = @_;
save_action( $self );
}
);
-
+
eval 'use MojoFacets::Plugin::NYTProf';
if ( $@ ) {
warn "profile disabled: ",substr($@,0,40) if $@;
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;