Branch Coverage

blib/lib/Config/Savelogs.pm
Criterion Covered Total %
branch 67 98 68.3


line true false branch
61 9 2 if ($file)
63 9 0 if -f $file
71 0 9 unless $self->file(@_)
77 0 9 unless (open my $fh, '<', $file{$self})
84 33 67 unless $line
85 10 57 if $line =~ /^\s*\#/
88 31 26 if ($line =~ /^\s*/i)
98 26 0 if (ref $data)
102 0 26 if (exists $array_type{$directive}) { }
131 0 9 if (exists $array_type{$directive}) { }
151 15 3 unless exists $array_type{lc $key}
152 1 2 if ref $$group{$key}
163 0 3 unless my $match = delete $args{'match'}
175 0 8 unless exists $$group{$gkey}
176 8 0 if (ref $$group{$gkey}) { }
178 3 8 if $value eq $$match{$mkey}
183 0 0 unless $$group{$gkey} eq $$match{$mkey}
200 0 9 unless my $match = delete $args{'match'}
208 5 21 unless exists $$group{$gkey}
211 10 11 if (ref $$group{$gkey}) { }
213 3 12 if $value eq $$match{$mkey}
218 6 5 unless $$group{$gkey} eq $$match{$mkey}
235 0 2 unless my $match = delete $args{'match'}
239 2 0 unless (ref $host)
244 2 0 if (my $group = $self->find_group('match', $match))
258 0 3 unless my $match = delete $args{'match'}
262 2 1 unless (ref $host)
269 3 0 if (my $group = $self->find_group('match', $match))
286 0 46 unless ref $val
289 45 0 if lc $key eq 'apachehost' or lc $key eq 'log'
290 45 0 if $valid_group
300 1 15 if ($changed)
311 12 16 if (@_)
336 0 10 unless $self->file(@_)
340 0 10 unless (open my $fh, '>', $file{$self})
349 28 0 $normal{$key} ? :
351 0 28 if (ref $config{$key}) { }
361 10 0 if $groups
381 63 25 length $key > 5 ? :
384 35 53 if (ref $val) { }
398 10 0 if $str
406 125 0 if (my($directive, $value) = $line =~ /^\s*(\S+)\s*(.*)/)
421 0 130 unless $line
422 0 130 if $line =~ /^\s*\#/
424 31 99 if ($line =~ m[\s*]i)
429 99 0 if (ref $data)
433 53 46 if (exists $array_type{$key}) { }
434 31 22 unless exists $group{$key}
456 0 11 if $super