Branch Coverage

blib/lib/SerealX/Store.pm
Criterion Covered Total %
branch 17 26 65.3


line true false branch
17 1 1 if (ref $$params{'encoder'} eq 'HASH')
20 1 1 if (ref $$params{'decoder'} eq 'HASH')
30 0 2 unless $path
31 1 1 if (ref $$self{'encoder'} ne 'Sereal::Encoder')
35 0 2 unless open my $fh, '>', $path
37 0 2 unless print $fh $encoded
38 0 2 unless close $fh
46 0 2 unless $path
47 1 1 if (ref $$self{'decoder'} ne 'Sereal::Decoder')
50 0 2 unless open my $fh, '<', $path
53 2 0 if (my $size = -s $fh) { }
56 0 2 unless defined($read = read($fh, $data, $size - $pos, $pos))
64 0 2 unless close $fh