File Coverage

blib/lib/Tangerine/hook/tests.pm
Criterion Covered Total %
statement 31 31 100.0
branch 4 4 100.0
condition 10 12 83.3
subroutine 11 11 100.0
pod 1 1 100.0
total 57 59 96.6


line stmt bran cond sub pod time code
1             package Tangerine::hook::tests;
2             $Tangerine::hook::tests::VERSION = '0.19';
3 15     15   964 use 5.010;
  15         40  
4 15     15   69 use strict;
  15         23  
  15         332  
5 15     15   64 use warnings;
  15         22  
  15         428  
6 15     15   63 use parent 'Tangerine::Hook';
  15         17  
  15         81  
7 15     15   961 use List::MoreUtils qw(any);
  15         37  
  15         112  
8 15     15   5265 use Tangerine::Hook;
  15         26  
  15         321  
9 15     15   67 use Tangerine::HookData;
  15         22  
  15         3365  
10              
11             sub run {
12 128     128 1 149 my ($self, $s) = @_;
13 128 100 66 181   429 if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 &&
  181   100     890  
14 299     299   2470 (any { $s->[1] eq $_ }
15             qw(Test::Inter Test::Modern Test::More Test::Strict))) {
16 1         463 require Tangerine::hook::testloading;
17 1         11 return Tangerine::HookData->new( hooks => [
18             Tangerine::hook::testloading->new(type => 'runtime') ] );
19             }
20 127 100 66 180   1354 if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 &&
  180   100     646  
21             $s->[1] eq 'Test::Requires') {
22 3         67 require Tangerine::hook::testrequires;
23 3         11 return Tangerine::HookData->new( hooks => [
24             Tangerine::hook::testrequires->new(type => 'runtime') ] );
25             }
26 124         1880 return;
27             }
28              
29             1;
30              
31             __END__