Tangerine/hook/tests.pm

filter: Statementstmt 100% 33 / 33 Branchbran 100% 4 / 4 Conditioncond 83.3% 10 / 12 MC/DCmcdc 66.6% 4 / 6 Subroutinesub 100% 11 / 11 Podpod 100% 1 / 1 totaltotal 94.0% 63 / 67 CC 7 SCAR 12.5
CC
7
Cov
96%
run
7.0
__ANON__
1.0
__ANON__
1.0
CRAP 3.5
« Tangerine/hook/use.pm ↑ Summary Tangerine/hook/require.pm »
1 package Tangerine::hook::tests;
2 15 $Tangerine::hook::tests::VERSION = '0.22';
3 15 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶use parent 'Tangerine::Hook';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 15 ▶use Tangerine::Hook;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 15 ▶use Tangerine::HookData;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶use Tangerine::Utils qw(any);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 sub run {
12 133 ▶ my ($self, $s) = @_;
Subroutine run: called CC=7 SCAR=19.5
Pod documented
13 133 ▶ if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 &&
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
if (&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and &any(sub { $s->[1] eq $_; } , "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")) 1 132 133
Condition83%5/6
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and &any(sub { $s->[1] eq $_; } , "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
!ll&&!rl&&r
55771
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1
!ll&&!rl&&r
55078
MC/DC66%2/3
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and &any(sub { $s->[1] eq $_; } , "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
&any(sub { $s->[0] eq $_; } , "use", "no") scalar @$s > 1 &any(sub { $s->[1] eq $_; } , "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
Truth table75%3/4
A and B and C
A= &any(sub { $s->[0] eq $_; } , "use", "no")B= scalar @$s > 1C= &any(sub { $s->[1] eq $_; } , "Test::Inter", "Test::Modern", "Test::More", "Test::Strict")
ABCresult
0XX0
10X0
1100
1111
14 311 ▶ (any { $s->[1] eq $_ }
Subroutine __ANON__: called CC=1 SCAR=0.0
15 qw(Test::Inter Test::Modern Test::More Test::Strict))) {
16 1 require Tangerine::hook::testloading;
17 1 return Tangerine::HookData->new( hooks => [
18 Tangerine::hook::testloading->new(type => 'runtime') ] );
19 }
20 132 ▶ if ((any { $s->[0] eq $_ } qw(use no)) && scalar(@$s) > 1 &&
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
if (&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and $s->[1] eq "Test::Requires") 3 129 132
Condition83%5/6
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and $s->[1] eq "Test::Requires"
!ll&&!rl&&r
55743
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1
!ll&&!rl&&r
55077
MC/DC66%2/3
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and $s->[1] eq "Test::Requires"
&any(sub { $s->[0] eq $_; } , "use", "no") scalar @$s > 1 $s->[1] eq "Test::Requires"
Truth table75%3/4
A and B and C
A= &any(sub { $s->[0] eq $_; } , "use", "no")B= scalar @$s > 1C= $s->[1] eq "Test::Requires"
ABCresult
0XX0
10X0
1100
1111
21 $s->[1] eq 'Test::Requires') {
22 3 require Tangerine::hook::testrequires;
23 3 return Tangerine::HookData->new( hooks => [
24 Tangerine::hook::testrequires->new(type => 'runtime') ] );
25 }
26 129 return;
27 }
28  
29 15 1;
30  
31 __END__
« Tangerine/hook/use.pm ↑ Summary Tangerine/hook/require.pm »