Abstract.pm

filter: Statementstmt 100% 40 / 40 Branchbran 83.3% 5 / 6 Conditioncond 66.6% 6 / 9 MC/DCmcdc 50.0% 3 / 6 Subroutinesub 100% 12 / 12 Podpod n/a totaltotal 90.4% 66 / 73 CC 7 SCAR 9.1
CC
7
Cov
93%
import
5.1
_0_093_warn
3.0
BEGIN
1.0
CRAP 2.5
« Abstract/Underload.pm ↑ Summary Abstract/Fast.pm »
1 package Path::Abstract;
2 5 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 5 $Path::Abstract::VERSION = '0.096';
4 }
5 # ABSTRACT: Fast and featureful UNIX-style path parsing and manipulation
6  
7 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 5 ▶use vars qw/$_0_093_warn %_0_093_warning/;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 5 $_0_093_warn = 1;
14  
15 5 ▶use Sub::Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 {
17 my $exporter = Sub::Exporter::build_exporter({
18 4 ▶ exports => [ path => sub { sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
19 123 return __PACKAGE__->new(@_)
20 4 } } ],
21 });
22  
23 5 ▶ sub import {
Subroutine import: called CC=5 SCAR=16.4
24 5 ▶ if (@_ && grep { defined && $_ eq '--no_0_093_warning' } @_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and grep {defined $_ and $_ eq "--no_0_093_warning";} @_) 1 4 5
Condition66%4/6
@_ and grep {defined $_ and $_ eq "--no_0_093_warning";} @_
!ll&&!rl&&r
041
defined $_ && $_ eq '--no_0_093_warning'
!ll&&!rl&&r
091
MC/DC50%1/2
@_ and grep {defined $_ and $_ eq "--no_0_093_warning";} @_
@_ grep {defined $_ and $_ eq "--no_0_093_warning";} @_
MC/DC50%1/2
defined $_ && $_ eq '--no_0_093_warning'
defined $_ $_ eq '--no_0_093_warning'
Truth table66%2/3
A and B
A= @_B= grep {defined $_ and $_ eq "--no_0_093_warning";} @_
ABresult
0X0
100
111
Truth table66%2/3
A && B
A= defined $_B= $_ eq '--no_0_093_warning'
ABresult
0X0
100
111
25 1 $_0_093_warn = 0;
26 }
27 5 ▶ @_ = grep { ! defined || $_ !~ m/^--/ } @_;
Condition66%2/3
defined $_ && $_ =~ /^--/
!ll&&!rl&&r
091
MC/DC50%1/2
defined $_ && $_ =~ /^--/
defined $_ $_ =~ /^--/
Truth table66%2/3
A && B
A= defined $_B= $_ =~ /^--/
ABresult
0X0
100
111
28 5 goto $exporter;
29 };
30 }
31  
32 use overload
33 5 ▶ '""' => 'get',
Subroutine BEGIN: called CC=1 SCAR=0.0
34 fallback => 1,
35 5 ;
36  
37 5 ▶use base qw/Path::Abstract::Underload/;
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 5 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
40 44 ▶sub _0_093_warn {
Subroutine _0_093_warn: called CC=3 SCAR=11.0
41 44 ▶ if ($_0_093_warn) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Path::Abstract::_0_093_warn) 44 0 44
42 44 my ($package, $filename, $line, $subroutine) = caller(1);
43 44 ▶ if (! $_0_093_warning{$subroutine}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $Path::Abstract::_0_093_warning{$subroutine}) 4 40 44
44 4 $_0_093_warning{$subroutine} = 1;
45 4 $subroutine =~ s///g;
46 4 carp "** $subroutine behavior has changed since 0.093\n" .
47 "** To disable this warning: use Path::Abstract qw/--no_0_093_warning/"
48 }
49 }
50 }
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80 5 1;
81  
82 __END__
« Abstract/Underload.pm ↑ Summary Abstract/Fast.pm »