File Coverage

blib/lib/Plack/App/PSGIBin.pm
Criterion Covered Total %
statement 18 19 94.7
branch n/a
condition 1 3 33.3
subroutine 5 6 83.3
pod 0 2 0.0
total 24 30 80.0


line stmt bran cond sub pod time code
1             package Plack::App::PSGIBin;
2 1     1   28793 use strict;
  1         2  
  1         37  
3 1     1   6 use warnings;
  1         1  
  1         91  
4 1     1   15 use parent qw/Plack::App::File/;
  1         2  
  1         9  
5 1     1   47 use Plack::Util;
  1         1  
  1         147  
6              
7 0     0 0 0 sub allow_path_info { 1 }
8              
9             sub serve_path {
10 1     1 0 4 my($self, $env, $file) = @_;
11              
12 1         2 local @{$env}{qw(SCRIPT_NAME PATH_INFO)} = @{$env}{qw( plack.file.SCRIPT_NAME plack.file.PATH_INFO )};
  1         5  
  1         3  
13              
14 1   33     21 my $app = $self->{_compiled}->{$file} ||= Plack::Util::load_psgi($file);
15 1         5 $app->($env);
16             }
17              
18             1;
19              
20             __END__