Branch Coverage

blib/lib/Data/Tubes/Util.pm
Criterion Covered Total %
branch 101 136 74.2


line true false branch
44 55 56 if @_ and ref $_[-1] eq "HASH"
50 24 0 @_ && ref $_[0] ? :
53 0 75 if $flag_for{$key}++
70 9 0 unless (defined $key)
72 0 9 unless ref $admitted
76 9 0 unless (defined $value)
78 0 9 unless ref $admitted
96 5 32 if $first eq "'" or $first eq "\""
98 34 3 unless $first eq "'"
112 1 0 unless ref $h->{$k}
118 9 3 if exists $args->{'default_key'}
124 3 9 unless defined $text
131 0 9 unless $text =~ /\G$h{'open'}/gmsx
138 1 22 unless $text =~ /\G$capture/cgmsx
147 16 0 $kdec ? :
0 5 ref $dkey ? :
5 1 defined $dkey ? :
16 6 exists $+{'key'} ? :
150 1 21 unless defined $key
156 21 0 $vdec ? :
158 19 2 if (not exists $hash{$key}) { }
2 0 elsif ($dupkey) { }
175 0 6 unless $closed
192 0 18 ref $locator ? :
218 0 3 if pos $input < length $input
227 5 2 defined $v ? :
236 184 41 if (ref $defaults eq "ARRAY")
238 56 128 if scalar(@_) % 2 and ref $_[0] ne "HASH"
244 10 215 @_ && ref $_[0] eq 'HASH' ? :
247 192 33 if wantarray
253 1 24 unless defined $filename
254 1 23 if ref $filename eq "GLOB"
255 9 14 if ref $filename eq "SCALAR"
256 0 14 if $filename eq "-"
257 0 14 if $filename =~ s/\Afile://msx
258 0 14 if (my($handlename) = $filename =~ /\Ahandle:(?:std)?(.*)\z/imsx)
260 0 0 if $handlename eq "out"
261 0 0 if $handlename eq "err"
262 0 0 if $handlename eq "in"
271 0 13 if ($sink)
278 0 13 unless (defined $wa)
286 9 4 $wa ? :
297 1 15 unless defined(my $filename = normalize_filename($args{'filename'}, \*STDIN))
301 0 15 if (ref $filename eq 'GLOB') { }
305 1 14 unless open $fh, "<", $filename
309 14 0 if (defined $args{'binmode'})
311 1 13 unless binmode $fh, $args{'binmode'}
321 10 42 if ref $x eq "ARRAY"
329 64 4 if ($Data::Tubes::API_VERSION gt "0.734")
330 48 16 unless $module =~ s/^[+^]/!/msx
334 17 51 if $first eq "!"
337 49 2 if ($first eq '+') { }
1 1 elsif ($module =~ /::/msx) { }
343 1 50 unless defined $prefix
354 983 1961 *{$stash . $_;}{'CODE'} ? :
361 795 188 if index($name, $prefix) < 0
375 2 5 unless defined $first
391 34 31 unless $term
395 31 31 unless $template =~ /\G$regex/cg
396 31 0 if ref $value eq "CODE"
410 4 12 if $candidate ne $reference
418 58 0 if (ref $data eq 'HASH') { }
0 0 elsif (ref $data eq 'ARRAY') { }
427 0 58 unless defined $data
438 12 6 if @_ and ref $_[0] eq "HASH"
439 0 18 exists $opts->{'prefix'} ? :
445 24 0 @_ && ref $_[0] ? :
451 51 24 if $i < $n_items