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 26 if (ref $arg) { }
21 5 elsif ($arg =~ /\n/) { }
5 0 elsif (-f $arg and -s _) { }
74 4 17 if defined $perl
86 1 4 if defined $perl
88 0 4 unless open my $fh, $arg
100 1 22 if $@
103 0 22 unless $perl
110 1 21 if $dont_cache
157 12470 50 if (ref $data)
158 16 12454 if $seen{$data}++
160 12440 30 if (&reftype($data) eq 'HASH') { }
30 0 elsif (&reftype($data) eq 'ARRAY') { }
185 0 12 unless $data->{$key}
192 0 20 unless $val
197 37 12403 if (keys %$data == 1)
198 3 34 if (my $arrs = $data->{'-flatten'}) { }
1 33 elsif (my $hrefs = $data->{'-flattenhash'}) { }
209 12403 111229 if ref $elt
212 12427 9 if $seen{$data}++
225 21 3 if ($cache_mtime)
228 2 19 if ($CacheDir and not $params{'no_disk_cache'})
232 0 2 if ($@) { }
236 0 2 unless open my $fh, '>', $cache_file
249 5 23 if ($cache) { }
7 16 elsif ($CacheDir) { }
251 5 0 if $oldtime == $mtime
255 0 7 if (-f $cache_file)
257 0 0 if ($cache_time >= $mtime) { }
262 0 0 if $cache_time >= $mtime
291 0 16 if (ref $nested eq 'ARRAY') { }
292 0 0 unless defined $current
296 14 2 unless defined $current
307 2 16 unless $given_options
313 2 16 unless defined $options{'_match_suffix'}
317 2 16 unless (defined $options{'_original_path'})
327 10 12 if (/^.*\.(?:$options{'_match_suffix'})\z/s)
329 2 8 if $this_mtime > $cache_mtime
340 0 2 if defined $perl
346 0 18 if ($options{'max_depth'} < 0)
356 10 26 if (-f $file and -s _)
360 0 10 if defined $perl
366 0 10 unless open my $fh, $file
371 0 10 if ($@)
378 8 10 unless defined $perl
381 12 6 if (-d $path)
382 0 12 unless opendir my $dir_fh, $path
390 24 20 if $entry =~ /^[.]/
394 0 20 unless (defined $nested_path)
399 20 0 if ($options{'follow_symlinks_when'} eq 'bundled') { }
0 0 elsif ($options{'follow_symlinks_when'} eq 'never') { }
400 0 20 unless (substr($nested_path, 0, $options{'_original_path_length'}) eq $options{'_original_path'})
408 0 0 if (-l "$path/$entry")
415 10 10 if (-d $nested_path) { }
10 0 elsif (-f $nested_path and $entry =~ s/[.](?:$options{'_match_suffix'})$//) { }
416 4 6 if $closed_list{$nested_path}
420 0 6 if (-l "$path/$entry")
436 0 10 if $closed_list{$nested_path_minus_suffix}
455 2 16 if ($cache_mtime)