Tangerine/hook/tests.pm

filter: Statementstmt 100% 34 / 34 Branchbran 100% 4 / 4 Conditioncond 83.3% 10 / 12 MC/DCmcdc 66.6% 4 / 6 Subroutinesub 100% 12 / 12 Podpod 100% 1 / 1 totaltotal 94.2% 65 / 69 CC 7 SCAR 12.1
CC
7
Cov
96%
run
7.0
__ANON__
1.0
__ANON__
1.0
CRAP 3.3
« Tangerine/hook/use.pm ↑ Summary Tangerine/hook/require.pm »
1 package Tangerine::hook::tests;
2 16 $Tangerine::hook::tests::VERSION = '0.23';
3 16 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 16 ▶use parent 'Tangerine::Hook';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 16 ▶use Tangerine::Hook;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 16 ▶use Tangerine::HookData;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 16 ▶use Tangerine::Utils qw(any);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 138 ▶sub run {
Subroutine run: called CC=7 SCAR=19.5
Pod documented
12 138 my ($self, $s) = @_;
13 138 ▶ 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 137 138
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
57801
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1
!ll&&!rl&&r
57081
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 323 ▶ (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 137 ▶ 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::Needs", "Test::Requires")) 6 131 137
Condition83%5/6
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and &any(sub { $s->[1] eq $_; } , "Test::Needs", "Test::Requires")
!ll&&!rl&&r
57746
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1
!ll&&!rl&&r
57080
MC/DC66%2/3
&any(sub { $s->[0] eq $_; } , "use", "no") and scalar @$s > 1 and &any(sub { $s->[1] eq $_; } , "Test::Needs", "Test::Requires")
&any(sub { $s->[0] eq $_; } , "use", "no") scalar @$s > 1 &any(sub { $s->[1] eq $_; } , "Test::Needs", "Test::Requires")
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::Needs", "Test::Requires")
ABCresult
0XX0
10X0
1100
1111
21 157 ▶ (any { $s->[1] eq $_ } qw(Test::Needs Test::Requires))) {
Subroutine __ANON__: called CC=1 SCAR=0.0
22 6 require Tangerine::hook::testrequires;
23 6 return Tangerine::HookData->new( hooks => [
24 Tangerine::hook::testrequires->new(type => 'runtime') ] );
25 }
26 131 return;
27 }
28  
29 16 1;
30  
31 __END__
« Tangerine/hook/use.pm ↑ Summary Tangerine/hook/require.pm »