File Coverage

blib/lib/Plack/Middleware.pm
Criterion Covered Total %
statement 23 23 100.0
branch 2 2 100.0
condition n/a
subroutine 7 7 100.0
pod 0 1 0.0
total 32 33 96.9


line stmt bran cond sub pod time code
1             package Plack::Middleware;
2 94     94   48738 use strict;
  94         228  
  94         3490  
3 94     94   898 use warnings;
  94         198  
  94         5072  
4 94     94   526 use Carp ();
  94         2394  
  94         3908  
5 94     94   471 use parent qw(Plack::Component);
  94         232  
  94         1163  
6 94     94   7735 use Plack::Util;
  94         140  
  94         2554  
7 94     94   41137 use Plack::Util::Accessor qw( app );
  94         289  
  94         717  
8              
9             sub wrap {
10 202     202 0 5807292 my($self, $app, @args) = @_;
11 202 100       1450 if (ref $self) {
12 3         111 $self->{app} = $app;
13             } else {
14 199         6065 $self = $self->new({ app => $app, @args });
15             }
16 202         1586 return $self->to_app;
17             }
18              
19             1;
20              
21             __END__