Branch Coverage

blib/lib/Config/Tiny.pm
Criterion Covered Total %
branch 21 32 65.6


line true false branch
19 0 2 ref $_[0] ? :
22 0 2 unless my $file = shift @_
23 0 2 unless -e $file
24 0 2 unless -f _
25 0 2 unless -r _
29 0 2 unless open CFG, $file
38 0 5 ref $_[0] ? :
40 0 5 unless defined $_[0]
49 10 29 if /^\s*(?:\#|;|$)/
52 9 20 if (/^\s*\[\s*(.+?)\s*\]\s*$/)
61 20 0 if (/^\s*([^=]+?)\s*=\s*(.*?)\s*$/)
75 0 1 unless my $file = shift @_
80 0 1 unless open CFG, '>' . $file
92 2 4 unless ($b eq '_') <=> ($a eq '_')
94 4 2 if length $contents
95 4 2 unless $section eq '_'