Branch Coverage

blib/lib/Regexp/Pattern.pm
Criterion Covered Total %
branch 67 70 95.7


line true false branch
13 41 5 ref $_[0] eq 'HASH' ? :
15 0 46 unless my($mod, $patname) = $name =~ /(.+)::(.+)/
24 1 45 unless exists $var->{$patname}
28 32 13 if ($var->{$patname}{'pat'}) { }
13 0 elsif ($var->{$patname}{'gen'}) { }
36 1 44 if ($args{'-anchor'})
49 0 24 unless @args
55 1 24 if ($arg eq 're') { }
22 2 elsif ($arg =~ /\A(\w+(?:::\w+)*)::(\w+|\*)\z/) { }
65 3 17 if ($k eq '-as') { }
3 14 elsif ($k eq '-prefix') { }
2 12 elsif ($k eq '-suffix') { }
4 8 elsif ($k eq '-has_tag') { }
2 6 elsif ($k eq '-lacks_tag') { }
2 4 elsif ($k eq '-has_tag_matching') { }
2 2 elsif ($k eq '-lacks_tag_matching') { }
1 1 elsif (not $k =~ /\A-/) { }
66 1 2 if $name0 eq '*'
68 1 1 unless $v =~ /\A\w+\z/
80 1 1 ref $v eq 'Regexp' ? :
82 1 1 ref $v eq 'Regexp' ? :
98 12 7 if ($name0 eq '*') { }
105 20 40 if (defined $has_tag)
106 15 5 unless grep {$_ eq $has_tag;} @$tags
108 7 38 if (defined $lacks_tag)
109 2 5 if grep {$_ eq $lacks_tag;} @$tags
111 10 33 if (defined $has_tag_matching)
112 6 4 unless grep {$_ =~ /$has_tag_matching/;} @$tags
114 7 30 if (defined $lacks_tag_matching)
115 3 4 if grep {$_ =~ /$lacks_tag_matching/;} @$tags
119 1 11 unless (@names)
126 11 29 defined $prefix ? :
10 30 defined $suffix ? :
1 40 defined $as ? :
129 1 40 if (exists do { "${caller}::RE" }->{$name})