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   35864 use strict;
  94         136  
  94         2844  
3 94     94   394 use warnings;
  94         243  
  94         3418  
4 94     94   364 use Carp ();
  94         111  
  94         2957  
5 94     94   296 use parent qw(Plack::Component);
  94         173  
  94         948  
6 94     94   4651 use Plack::Util;
  94         124  
  94         1911  
7 94     94   31680 use Plack::Util::Accessor qw( app );
  94         213  
  94         543  
8              
9             sub wrap {
10 202     202 0 3637464 my($self, $app, @args) = @_;
11 202 100       1028 if (ref $self) {
12 3         56 $self->{app} = $app;
13             } else {
14 199         5755 $self = $self->new({ app => $app, @args });
15             }
16 202         2002 return $self->to_app;
17             }
18              
19             1;
20              
21             __END__