Tangerine/hook/require.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 6 / 6 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 41 / 41 CC 5 SCAR 11.0
CC
5
Cov
100%
run
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Tangerine/hook/tests.pm ↑ Summary Tangerine/hook/testloading.pm »
1 package Tangerine::hook::require;
2 16 $Tangerine::hook::require::VERSION = '0.23';
3 16 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 16 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 16 ▶use parent 'Tangerine::Hook';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 16 ▶use Tangerine::HookData;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 16 ▶use Tangerine::Occurence;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 138 ▶sub run {
Subroutine run: called CC=5 SCAR=16.1
Pod documented
10 138 my ($self, $s) = @_;
11 138 ▶ if (scalar(@$s) > 1 && $s->[0] eq 'require') {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @$s > 1 and $s->[0] eq "require") 15 123 138
Condition100%3/3
scalar @$s > 1 and $s->[0] eq "require"
!ll&&!rl&&r
411915
MC/DC100%2/2
scalar @$s > 1 and $s->[0] eq "require"
scalar @$s > 1 $s->[0] eq "require"
Truth table100%3/3
A and B
A= scalar @$s > 1B= $s->[0] eq "require"
ABresult
0X0
100
111
12 15 ▶ return if $s->[1] eq ';';
Branch: 1 branch
BranchTrueFalseTotal
if $s->[1] eq ";" 1 14 15
13 14 my $module = $s->[1];
14 14 ▶ return Tangerine::HookData->new(
Branch: 1 branch
BranchTrueFalseTotal
unless $module =~ /^v?5(?:\..*)?$/ 12 2 14
15 modules => { $module => Tangerine::Occurence->new },
16 ) unless $module =~ /^v?5(?:\..*)?$/;
17 }
18 125 return;
19 }
20  
21 16 1;
22  
23 __END__
« Tangerine/hook/tests.pm ↑ Summary Tangerine/hook/testloading.pm »