$path =~ s{/}{.}g;
$actions_path .= sprintf '%.4f%s', $time, $path;
- my $array = $params->params;
- if ( @$array ) {
- store $array, $actions_path;
- warn "SAVE $actions_path ", -s $actions_path, " bytes params = ", dump($array), $/;
+ my $hash = $params->to_hash;
+ if ( $hash ) {
+ store $hash, $actions_path;
+ warn "SAVE $actions_path ", -s $actions_path, " bytes params = ", dump($hash), $/;
}
}
}
# $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 $@;