Plack-Middleware-EasyHooks

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

              finalize  => sub {
                  my $time = time() - $_[0]->{start};
                  warn "Request took $time seconds";
              };

          $app;
      }

DESCRIPTION
    Plack::Middleware::EasyHooks takes care of the complexities handling
    streaming in PSGI middleware. Just provide hooks to be called before,
    during and after the wrapped PSGI application.

    The hooks are called in the following order (much simplified):

        before();
        $app->();
        after();
    
        filter($_) for @body;
        tail($env);

lib/Plack/Middleware/EasyHooks.pm  view on Meta::CPAN

          finalize  => sub {
              my $time = time() - $_[0]->{start};
              warn "Request took $time seconds";
          };

      $app;
  }

=head1 DESCRIPTION

Plack::Middleware::EasyHooks takes care of the complexities handling streaming
in PSGI middleware. Just provide hooks to be called before, during and after
the wrapped PSGI application.

The hooks are called in the following order (much simplified):

    before();
    $app->();
    after();
    
    filter($_) for @body;



( run in 0.241 second using v1.01-cache-2.11-cpan-05444aca049 )