Branch Coverage

blib/lib/IO/YAML.pm
Criterion Covered Total %
branch 62 106 58.4


line true false branch
19 4 8 if (UNIVERSAL::isa($args[0], 'GLOB')) { }
0 8 elsif (scalar @args >= 2 and $args[1] =~ /^\+?[<>rwa]|>>|\d+$/ and $args[0] ne 'mode') { }
24 3 1 if scalar(@args) % 2 and $args[0] =~ /^\+?[<>rwa]|>>|\d+$/
35 3 9 if (scalar(@args) % 2)
37 3 0 if (ref $args[0] eq '' or UNIVERSAL::can($args[0], 'stringify')) { }
59 9 12 scalar @_ > 1 ? :
60 22 11 scalar @_ > 1 ? :
61 5 27 scalar @_ > 1 ? :
62 1 8 scalar @_ > 1 ? :
64 21 0 scalar @_ > 1 ? :
65 0 30 scalar @_ > 1 ? :
66 22 103 scalar @_ > 1 ? :
71 0 1 unless defined $fh
74 0 1 if $mode =~ /^[r<]$/
76 0 1 unless print $fh "...\n"
84 0 9 if (defined $path and defined $fh)
90 0 9 if (defined $fh) { }
92 0 0 unless defined $mode
98 0 9 unless (defined $path)
100 0 0 if (exists &Errno::ENOENT) { }
116 0 9 unless ($fh->open($path, $mode))
136 13 0 if (defined $fh)
148 2 5 $self->auto_terminate ? :
160 22 9 scalar @$buffer ? :
161 0 31 unless defined $source
162 27 4 unless $source =~ /^#/
165 3 68 if ($line =~ /^\.\.\.$/) { }
22 46 elsif ($line =~ /^---/) { }
176 16 11 $self->auto_load ? :
188 0 0 if wantarray
200 0 3 if ($pos) { }
202 0 0 unless $result = fh_seek($fh, $pos, $whence)
205 0 0 if (not defined $source) { }
0 0 elsif (not $source =~ /^---(?=\s)/) { }
229 0 0 unless $! eq ''
236 0 0 unless $length == 0 or $length == $self->tell
252 0 12 if $self->handle
257 7 5 if $self->handle
258 12 0 unless ($^V and $^V lt '5.8.0')
259 12 0 if tied *$self
268 0 0 unless defined $f
278 0 9 if ($path =~ s/^(<|>|>>|\+<|\+>)\s*//)
281 4 5 unless defined $mode
294 0 5 unless $mode = $mode_norm{$mode}
304 4 8 if ($fh) { }
3 5 elsif (defined $path) { }
326 12 0 if ref $_[0]
333 1 27 if wantarray
391 13 0 if (UNIVERSAL::isa($fh, 'GLOB')) { }
403 3 0 if (UNIVERSAL::isa($fh, 'GLOB')) { }
415 3 0 if (UNIVERSAL::isa($fh, 'GLOB')) { }
427 0 0 if (UNIVERSAL::isa($fh, 'GLOB')) { }
439 3 0 if (UNIVERSAL::isa($fh, 'GLOB')) { }