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 1     1   664 package Plack::Test;
  1         2  
  1         35  
3 1     1   6 use strict;
  1         2  
  1         33  
4 1     1   860 use warnings;
  1         309  
  1         5  
5             use parent qw(Exporter);
6             our @EXPORT = qw(test_psgi);
7              
8             our $Impl;
9             $Impl ||= $ENV{PLACK_TEST_IMPL} || "MockHTTP";
10              
11 1     1 1 113 sub test_psgi {
12 1 50       18658 eval "require Plack::Test::$Impl;";
13 1     1   104 die $@ if $@;
  1         2  
  1         103  
14 1 50 33     13 no strict 'refs';
15 1         4 if (ref $_[0] && @_ == 2) {
16             @_ = (app => $_[0], client => $_[1]);
17 1         3 }
  1         333  
18             &{"Plack::Test::$Impl\::test_psgi"}(@_);
19             }
20              
21             1;
22              
23             __END__