Branch Coverage

blib/lib/Tie/TextDir.pm
Criterion Covered Total %
branch 37 68 54.4


line true false branch
19 0 9 unless 2 <= @_ and @_ <= 5
26 0 9 if $levels < 0
33 7 2 if ($mode eq 'rw') { }
2 0 elsif ($mode eq 'ro') { }
44 0 9 if -e $path and not -d _
45 4 5 unless (-e $path)
46 0 4 unless $self->{'MODE'} & 64
47 0 4 unless mkdir $path, $perms
60 0 15 unless ($self->_key_okay($key))
61 0 0 if $^W
66 0 15 unless -e $file
69 0 15 unless (open FH, "< $file")
83 0 8 unless $self->{'MODE'} & 2
85 0 8 unless ($self->_key_okay($key))
86 0 0 if $^W
94 0 8 unless rename $tmpname, $file
101 0 6 unless $self->{'MODE'} & 2
103 0 6 unless ($self->_key_okay($key))
104 0 0 if $^W
108 0 6 unless -e $file
111 6 0 if defined wantarray
113 0 6 unless unlink $file
115 5 1 if ($self->{'LEVELS'})
128 0 0 unless $self->{'MODE'} & 2
134 0 0 unless unlink $entry
136 0 0 if ($self->{'LEVELS'})
148 6 0 unless ($self->_key_okay($key))
149 0 6 if $^W
161 4 3 if $entry
168 3 4 if $entry
173 6 29 if $_[1] =~ /^\.{0,2}$/
186 8 21 unless $levels
190 4 17 if scalar @key < $levels
195 4 17 unless -d $dir