Branch Coverage

blib/lib/Tie/TextDir.pm
Criterion Covered Total %
branch 29 58 50.0


line true false branch
15 0 4 unless 2 <= @_ and @_ <= 4
24 3 1 if ($mode eq 'rw') { }
1 0 elsif ($mode eq 'ro') { }
35 0 4 if -e $path and not -d _
36 1 3 unless (-e $path)
37 0 1 unless $$self{'MODE'} & 64
38 0 1 unless mkdir $path, $perms
44 0 4 unless opendir $$self{'HANDLE'}, $path
51 0 5 unless ($self->_key_okay($key))
52 0 0 if $^W
57 0 5 unless -e $file
60 0 5 unless (open FH, "< $file")
74 0 3 unless $$self{'MODE'} & 2
76 0 3 unless ($self->_key_okay($key))
77 0 0 if $^W
85 0 3 unless rename $tmpname, $file
92 0 4 unless $$self{'MODE'} & 2
94 2 2 unless ($self->_key_okay($key))
95 0 2 if $^W
99 0 2 unless -e $file
102 2 0 if defined wantarray
104 0 2 unless unlink $file
110 0 0 unless $$self{'MODE'} & 2
115 0 0 if $entry eq '.' or $entry eq '..'
117 0 0 unless unlink $file
123 3 0 unless ($self->_key_okay($key))
124 0 3 if $^W
142 2 2 unless $entry eq '.' or $entry eq '..'
153 5 10 if $_[1] =~ /^\.{0,2}$/