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 15 $Tangerine::hook::require::VERSION = '0.22';
3 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 15 ▶use parent 'Tangerine::Hook';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 15 ▶use Tangerine::HookData;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 15 ▶use Tangerine::Occurence;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub run {
10 133 ▶ my ($self, $s) = @_;
Subroutine run: called CC=5 SCAR=16.1
Pod documented
11 133 ▶ if (scalar(@$s) > 1 && $s->[0] eq 'require') {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @$s > 1 and $s->[0] eq "require") 15 118 133
Condition100%3/3
scalar @$s > 1 and $s->[0] eq "require"
!ll&&!rl&&r
411415
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 120 return;
19 }
20  
21 15 1;
22  
23 __END__
« Tangerine/hook/tests.pm ↑ Summary Tangerine/hook/testloading.pm »