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 92     92   32888 use strict;
  92         172  
  92         2251  
3 92     92   394 use warnings;
  92         165  
  92         1951  
4 92     92   372 use Carp ();
  92         120  
  92         1440  
5 92     92   368 use parent qw(Plack::Component);
  92         166  
  92         495  
6 92     92   3980 use Plack::Util;
  92         246  
  92         2076  
7 92     92   36263 use Plack::Util::Accessor qw( app );
  92         193  
  92         561  
8              
9             sub wrap {
10 202     202 0 13577 my($self, $app, @args) = @_;
11 202 100       897 if (ref $self) {
12 3         65 $self->{app} = $app;
13             } else {
14 199         3888 $self = $self->new({ app => $app, @args });
15             }
16 202         2024 return $self->to_app;
17             }
18              
19             1;
20              
21             __END__