Branch Coverage

blib/lib/Process/YAML.pm
Criterion Covered Total %
branch 20 32 62.5


line true false branch
22 2 0 unless ('IO::String'->isa('IO::Handle'))
25 2 0 unless ('IO::String'->isa('IO::Seekable'))
34 1 3 if (&Params::Util::_SCALAR0($_[0]))
40 2 1 if (&Params::Util::_INSTANCE($_[0], 'IO::Handle') or fileno $_[0])
46 1 0 if (defined $_[0] and not ref $_[0] and length $_[0])
49 1 0 unless (-e $_[0])
52 0 1 unless (open $fh, $mode, $_[0])
55 0 1 unless (flock $fh, 2)
58 0 1 unless (truncate $fh, 0)
61 0 1 unless (print $fh YAML::Syck::Dump($self))
64 0 1 unless (close $fh)
78 1 3 if (&Params::Util::_SCALAR0($_[0]))
83 2 1 if (&Params::Util::_INSTANCE($_[0], 'IO::Handle') or fileno $_[0])
89 1 0 if (defined $_[0] and not ref $_[0] and length $_[0])
91 0 1 unless (open $fh, '<', $_[0])
94 0 1 unless (flock $fh, 1)