| lib/Ubic/AtomicFile.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 7 | 14 | 50.0 |
| line | true | false | branch |
|---|---|---|---|
| 21 | 0 | 27 | unless open my $fh, '>', $new_file |
| 22 | 0 | 27 | unless print {$fh;} $data |
| 23 | 0 | 27 | unless $fh->flush |
| 25 | 27 | 0 | if ($options->{'sync'}) |
| 31 | 0 | 27 | unless $fh->sync |
| 34 | 0 | 27 | unless close $fh |
| 35 | 0 | 27 | unless rename $new_file, $file |