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   35233 use strict;
  94         137  
  94         2830  
3 94     94   360 use warnings;
  94         263  
  94         3407  
4 94     94   398 use Carp ();
  94         118  
  94         1406  
5 94     94   2349 use parent qw(Plack::Component);
  94         175  
  94         1001  
6 94     94   3884 use Plack::Util;
  94         124  
  94         1856  
7 94     94   30295 use Plack::Util::Accessor qw( app );
  94         281  
  94         569  
8              
9             sub wrap {
10 202     202 0 3572527 my($self, $app, @args) = @_;
11 202 100       1835 if (ref $self) {
12 3         62 $self->{app} = $app;
13             } else {
14 199         4402 $self = $self->new({ app => $app, @args });
15             }
16 202         2036 return $self->to_app;
17             }
18              
19             1;
20              
21             __END__