File Coverage

inc/Plack/Test.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 4 50.0
condition 1 3 33.3
subroutine 5 5 100.0
pod 1 1 100.0
total 27 31 87.1


line stmt bran cond sub pod time code
1             #line 1
2 2     2   1146 package Plack::Test;
  2         3  
  2         72  
3 2     2   11 use strict;
  2         3  
  2         63  
4 2     2   1950 use warnings;
  2         667  
  2         8  
5             use parent qw(Exporter);
6             our @EXPORT = qw(test_psgi);
7              
8             our $Impl;
9             $Impl ||= $ENV{PLACK_TEST_IMPL} || "MockHTTP";
10              
11 2     2 1 256 sub test_psgi {
12 2 50       32773 eval "require Plack::Test::$Impl;";
13 2     2   204 die $@ if $@;
  2         4  
  2         186  
14 2 50 33     27 no strict 'refs';
15 2         11 if (ref $_[0] && @_ == 2) {
16             @_ = (app => $_[0], client => $_[1]);
17 2         6 }
  2         363  
18             &{"Plack::Test::$Impl\::test_psgi"}(@_);
19             }
20              
21             1;
22              
23             __END__