Branch Coverage

blib/lib/YAML/LoadBundle.pm
Criterion Covered Total %
branch 87 122 71.3


line true false branch
34 0 1 unless ref $observer eq 'CODE'
47 0 1 unless ref $observer eq 'CODE'
67 2 27 if (ref $arg) { }
22 5 elsif ($arg =~ /\n/) { }
5 0 elsif (-f $arg and -s _) { }
74 4 18 if defined $perl
86 1 4 if defined $perl
88 0 4 unless open my $fh, $arg
100 1 23 if $@
103 0 23 unless $perl
110 1 22 if $dont_cache
194 12495 70 if (ref $data)
195 23 12472 if $seen{$data}++
197 12460 35 if (&reftype($data) eq 'HASH') { }
35 0 elsif (&reftype($data) eq 'ARRAY') { }
222 0 14 unless $data->{$key}
229 0 22 unless $val
234 38 12422 if (keys %$data == 1)
235 3 35 if (my $arrs = $data->{'-flatten'}) { }
1 34 elsif (my $hrefs = $data->{'-flattenhash'}) { }
246 12425 111259 if ref $elt
249 12441 15 if $seen{$data}++
262 22 3 if ($cache_mtime)
265 2 20 if ($CacheDir and not $params{'no_disk_cache'})
269 0 2 if ($@) { }
273 0 2 unless open my $fh, '>', $cache_file
286 5 24 if ($cache) { }
7 17 elsif ($CacheDir) { }
288 5 0 if $oldtime == $mtime
292 0 7 if (-f $cache_file)
294 0 0 if ($cache_time >= $mtime) { }
299 0 0 if $cache_time >= $mtime
328 0 16 if (ref $nested eq 'ARRAY') { }
329 0 0 unless defined $current
333 14 2 unless defined $current
344 2 16 unless $given_options
350 2 16 unless defined $options{'_match_suffix'}
354 2 16 unless (defined $options{'_original_path'})
364 10 12 if (/^.*\.(?:$options{'_match_suffix'})\z/s)
366 2 8 if $this_mtime > $cache_mtime
377 0 2 if defined $perl
383 0 18 if ($options{'max_depth'} < 0)
393 10 26 if (-f $file and -s _)
397 0 10 if defined $perl
403 0 10 unless open my $fh, $file
408 0 10 if ($@)
415 8 10 unless defined $perl
418 12 6 if (-d $path)
419 0 12 unless opendir my $dir_fh, $path
427 24 20 if $entry =~ /^[.]/
431 0 20 unless (defined $nested_path)
436 20 0 if ($options{'follow_symlinks_when'} eq 'bundled') { }
0 0 elsif ($options{'follow_symlinks_when'} eq 'never') { }
437 0 20 unless (substr($nested_path, 0, $options{'_original_path_length'}) eq $options{'_original_path'})
445 0 0 if (-l "$path/$entry")
452 10 10 if (-d $nested_path) { }
10 0 elsif (-f $nested_path and $entry =~ s/[.](?:$options{'_match_suffix'})$//) { }
453 4 6 if $closed_list{$nested_path}
457 0 6 if (-l "$path/$entry")
473 0 10 if $closed_list{$nested_path_minus_suffix}
492 2 16 if ($cache_mtime)