| 1 | package File::Spec::Functions; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use File::Spec; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | our $VERSION = '3.75'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | $VERSION =~ tr/_//d; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | require Exporter; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | our @ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | our @EXPORT = qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | canonpath | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | catdir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | catfile | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | curdir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | rootdir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | updir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | no_upwards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | file_name_is_absolute | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | our @EXPORT_OK = qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | devnull | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | tmpdir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | splitpath | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | splitdir | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | catpath | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | abs2rel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | rel2abs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | case_tolerant | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 1 | our %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 1 | require File::Spec::Unix; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 1 | my %udeps = ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | canonpath => [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | catdir => [qw(canonpath)], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | catfile => [qw(canonpath catdir)], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | case_tolerant => [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | curdir => [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | devnull => [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | rootdir => [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | updir => [], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 1 | foreach my $meth (@EXPORT, @EXPORT_OK) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 17 | my $sub = File::Spec->can($meth); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 1 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 17 | ▶ | if (exists($udeps{$meth}) && $sub == File::Spec::Unix->can($meth) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%6/9
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth) and not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};}) and defined &{"File::Spec::Unix::_fn_$meth";}
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth) and not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};})
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth)
MC/DC25%1/4
exists $udeps{$meth} and $sub == "File::Spec::Unix"->can($meth) and not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};}) and defined &{"File::Spec::Unix::_fn_$meth";}
exists $udeps{$meth}
$sub == "File::Spec::Unix"->can($meth)
not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};})
defined &{"File::Spec::Unix::_fn_$meth";}
Truth table40%2/5
A and B and not(C) and D
A= exists $udeps{$meth}B= $sub == "File::Spec::Unix"->can($meth)C= not grep({"File::Spec"->can($_) != "File::Spec::Unix"->can($_);} @{$udeps{$meth};})D= defined &{"File::Spec::Unix::_fn_$meth";}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | !(grep { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 3 | File::Spec->can($_) != File::Spec::Unix->can($_) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 8 | } @{$udeps{$meth}}) && | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 8 | defined(&{"File::Spec::Unix::_fn_$meth"})) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 8 | *{$meth} = \&{"File::Spec::Unix::_fn_$meth"}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | ▶ | *{$meth} = sub {&$sub('File::Spec', @_)}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||