Branch Coverage

blib/lib/IO/File/AtomicChange.pm
Criterion Covered Total %
branch 24 44 54.5


line true false branch
19 20 0 if @_
25 44 130 if $val
33 1 19 unless $_[0]->_closed
38 0 20 unless ref $self
46 12 8 if -f $path
47 4 16 if (exists $opt->{'backup_dir'})
48 0 4 unless (-d $opt->{'backup_dir'})
54 20 0 $self->SUPER::open($temp, $mode) ? :
62 19 20 if @_
68 0 19 unless $self->sync
69 19 0 unless ($self->_closed(1))
70 19 0 if ($self->SUPER::close) { }
72 3 16 if $self->_backup_dir and -f $self->_target_file
74 0 0 $die ? :
0 19 unless rename $self->_temp_file, $self->_target_file
77 0 0 $die ? :
103 3 0 $n == 0 ? :
111 3 0 unless -f $backup_file
114 0 3 if -f $backup_file
122 0 0 unless ($self->_closed(1))
131 0 0 unless $self->_closed(1)
138 0 15 unless File::Copy::copy($from, $to)