Branch Coverage

blib/lib/File/Inplace.pm
Criterion Covered Total %
branch 34 44 77.2


line true false branch
21 0 15 unless exists $allowed_options{$opt}
23 0 10 unless exists $params{'file'}
28 9 1 unless exists $params{'chomp'}
32 3 7 if ($$self{'suffix'})
34 0 3 unless copy($$self{'file'}, $$self{'backup_name'})
49 20 7 unless $$self{'infh'}->eof
60 6 20 if (wantarray)
61 5 1 if (defined $$self{'current_line'}) { }
83 0 1 if defined $$self{'current_line'}
89 1 3 unless defined $line
99 7 2 if (@_ == 1) { }
114 3 0 if ($$self{'chomp'})
124 0 10 if not $$self{'infh'}
140 22 11 if (defined $$self{'current_line'})
142 19 3 if ($$self{'chomp'})
152 0 30 unless $fh
154 2 28 unless (defined $line)
159 25 5 if (defined $line and $$self{'chomp'})
171 0 6 unless rename $$self{'tmpfile'}, $$self{'file'}
182 0 1 unless $$self{'backup_name'}
185 0 1 unless rename $$self{'tmpfile'}, $$self{'backup_name'}
209 34 4 if $$self{$handle}