Branch Coverage

blib/lib/Log/Dispatch/Dir.pm
Criterion Covered Total %
branch 32 42 76.1


line true false branch
64 7 1 unless (-e $self->{'dirname'})
66 0 7 unless mkdir $self->{'dirname'}, $perm
71 0 8 unless (-d $self->{'dirname'})
75 1 7 if ($self->{'permissions'} and not $self->{'chmodded'})
77 0 1 unless chmod $self->{'permissions'}, $self->{'dirname'}
106 2 17 unless (defined $libmagic)
107 0 2 if (eval { do { require File::LibMagic; require Media::Type::Simple } }) { }
114 19 0 unless $libmagic
116 0 0 unless $type
119 0 0 if $ext
127 19 119 ref $vars{$1} eq 'CODE' ? :
138 0 defined $vars{$1} ? :
137 3 22 defined $self->{'filename_sub'} ? :
148 20 5 if rand() < $self->{'rotate_probability'}
158 6 9 unless defined $ms or defined $mf or defined $ma
167 28 40 if $e eq '.' or $e eq '..'
176 1 13 if (defined $mf and @entries > $mf)
181 5 9 if (defined $ma)
184 1 11 if ($_->{'age'} > $ma)
193 5 9 if (defined $ms)
198 1 14 if ($tot_size > $ms)