| 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
Condition100%3/3
scalar @$s > 1 and $s->[0] eq "require"
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"
| |||||||||||||||||||||||||||||
| 12 | 15 | ▶ | return if $s->[1] eq ';'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 13 | 14 | my $module = $s->[1]; | |||||||||||||||||||||||||||
| 14 | 14 | ▶ | return Tangerine::HookData->new( | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 15 | modules => { $module => Tangerine::Occurence->new }, | ||||||||||||||||||||||||||||
| 16 | ) unless $module =~ /^v?5(?:\..*)?$/; | ||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | 125 | return; | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 16 | 1; | |||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | __END__ | ||||||||||||||||||||||||||||