Branch Coverage

lib/Path/Extended/File.pm
Criterion Covered Total %
branch 75 90 83.3


line true false branch
27 1 115 if $self->is_open
32 5 111 if ($mode =~ /:/) { }
34 0 5 unless (CORE::open $fh, $mode, $self->_absolute)
38 0 111 unless (CORE::open $fh, IO::Handle::_open_mode_string($mode), $$self{'abs_path'})
41 11 105 if $$self{'_compat'} and defined wantarray
54 1 1 if $self->is_open
57 0 2 unless (CORE::sysopen my $fh, $self->_absolute, @_)
67 107 13 if (my $fh = delete $$self{'handle'})
75 1 3 unless $self->is_open
79 0 3 if (@_) { }
98 10 86 unless $_[0]->is_open
104 1 1 unless $_[0]->is_open
105 1 1 unless $_[0]->is_open
113 1 1 $mode && $mode eq 'share' ? :
121 1 1 unless $self->is_open
131 1 1 unless $self->is_open
141 1 1 unless $self->is_open
151 3 15 @args == 1 && ref $args[0] eq 'HASH' ? :
157 0 18 unless ($self->is_open)
162 1 17 if $$options{'binmode'}
169 3 15 if ($$options{'chomp'})
172 2 16 if ($$options{'decode'})
178 2 16 if ($$options{'callback'})
182 2 16 if (my $rule = $$options{'filter'})
185 0 18 unless defined wantarray
188 7 3 unless (@callbacks or $filter or wantarray)
197 3 22 if $filter and not $line =~ /$filter/
198 22 0 unless $$options{'ignore_return_value'}
201 9 2 wantarray ? :
207 0 2 @args == 1 && ref $args[0] eq 'HASH' ? :
219 1 31 @args == 1 && ref $args[0] eq 'HASH' ? :
223 5 27 if ($$options{'mkdir'})
226 0 32 $$options{'mode'} || $$options{'append'} ? :
228 0 32 unless ($self->is_open)
233 0 32 if ($$options{'lock'})
234 0 0 unless ($self->lock_ex)
239 1 31 if $$options{'binmode'}
247 2 30 if ($$options{'encode'})
253 2 30 if ($$options{'callback'})
259 0 32 ref $content eq 'ARRAY' ? :
263 1 31 if ($$options{'mtime'})
273 1 52 if ($self->exists) { }
277 0 52 unless $self->openw
288 1 5 unless $self->exists
290 3 2 if (@_) { }