Group
Extension

Matches 1

Mojolicious-Plugin-Surveil ( J/JH/JHTHORSEN/Mojolicious-Plugin-Surveil-0.03.tar.gz, JHTHORSEN, 2018; MetaCPAN )
Mojolicious-Plugin-Surveil/lib/Mojolicious/Plugin/Surveil.pm ( view source; MetaCPAN )
ckage Mojolicious::Plugin::Surveil;
use Mojo::Base 'Mojolicious::Plugin';

use Mojo::JSON qw(decode_json encode_json);

our $VERSION = '0.03';

sub register {
  my ($self, $app, $config) = @_;

  $con
t($config->{path})->to(
    cb => sub {
      my $c = shift->inactivity_timeout(60);
      $c->on(json => $config->{handler});
    }
  );
}

sub _default_message_handler {
  my ($c,    $e)      = @_;
get) = delete @$e{qw(type target)};
  $c->app->log->debug(qq(Event "$type" on "$target" @{[encode_json $e]}));
}

sub _hook_after_render {
  my ($config, $c, $output, $format) = @_;
  return if $forma

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.