Branch Coverage

blib/lib/Log/Any/Adapter/Daemontools/Config.pm
Criterion Covered Total %
branch 102 148 68.9


line true false branch
17 48 0 if defined $_[0]
62 0 22 $spec =~ /^([-+])= (-?\d+)$/ ? :
18 22 $spec =~ /^-?\d+$/ ? :
63 0 40 unless defined $lev
64 0 40 unless defined $min
65 0 40 unless $lev >= $min
66 0 40 unless defined $max
67 0 40 unless $lev <= $max
73 40 3 if (@_)
74 0 40 if @_ > 1
78 35 5 if ($l != $self->{'log_level_num'})
88 0 0 if (@_)
89 0 0 if @_ > 1
93 0 0 if ($self->{'log_level_min_num'} > $self->{'log_level_num'})
103 0 0 if (@_)
104 0 0 if @_ > 1
108 0 0 if ($self->{'log_level_max_num'} < $self->{'log_level_num'})
119 3 83 if (@_)
120 0 3 if @_ > 1
121 0 2 unless defined $_[0] and ref $_[0] eq 'GLOB' || ref $_[0] eq 'CODE' || ref($_[0])->can('print')
125 3 0 unless $self->{'writer'}
127 9 77 defined $self->{'output'} ? :
133 14 83 if (@_)
134 0 14 unless @_ == 1 and defined $_[0] and !ref($_[0]) || ref $_[0] eq 'CODE'
136 13 1 unless (ref $_[0])
146 0 13 unless defined $x and ref $x eq 'CODE'
151 14 0 unless $self->{'writer'}
153 54 43 defined $self->{'format'} ? :
159 1 0 if (@_)
160 0 1 unless @_ == 1 and !defined($_[0]) || ref $_[0] eq 'CODE'
179 0 26 if @_ == 1 and ref $_[0] eq 'HASH'
208 17 0 @_ == 1 && ref $_[0] eq 'HASH' ? :
211 1 16 if @unknown
226 0 0 ref $v eq 'HASH' ? :
234 1 4 ref $v eq 'HASH' ? :
243 1 0 $rt eq 'ARRAY' ? :
0 1 $rt eq 'HASH' ? :
249 0 17 if defined $cfg->{'format'}
255 0 17 if defined $cfg->{'writer'}
269 0 11 unless defined $offset and $offset =~ /^-?\d+$/ and @_ == 2
280 0 11 if @unknown
282 4 7 if (defined $spec{'log_level'} and defined $ENV{$spec{'log_level'}})
285 7 4 if (defined $spec{'debug'} and defined $ENV{$spec{'debug'}})
292 4 3 if $level =~ /^-?\d+$/
301 8 3 if $ofs
308 6 209 unless defined $_[0]
309 143 66 unless ref $_[0]
310 58 8 if ref $_[0] eq 'ARRAY'
311 8 0 if ref $_[0] eq 'Regexp'
316 35 58 @list == 1 ? :
6 93 @list == 0 ? :
324 0 33 if @unknown
326 0 33 unless defined $spec{'array'}
336 2 81 if $array->[$i] =~ /$stop/
337 9 72 if ($array->[$i] =~ /^-[^-=][^-=]+$/ and $spec{'bundle'}) { }
32 40 elsif ($array->[$i] =~ /$verbose/) { }
21 19 elsif ($array->[$i] =~ /$quiet/) { }
344 4 5 if ($spec{'remove'} and $len != @un_bundled)
345 1 3 if (@un_bundled) { }
354 14 18 if $spec{'remove'}
358 9 12 if $spec{'remove'}
373 0 1 if @unknown
376 1 0 if $spec{'verbose'}
379 1 0 if $spec{'quiet'}
385 38 1 unless $self->{'writer'}
393 0 35 unless my $writer = $self->_build_writer_eval_in_clean_scope($code, \$err)
406 1 34 if ($format =~ /\$\{?category(\W|$)/)
409 6 29 if ($format =~ /\$\{?(package|file|line|file_brief)(\W|$)/)
413 3 3 if $format =~ /\$\{?file_brief(\W|$)/
417 22 13 if ($format =~ /\$\{?level_prefix(\W|$)/)
421 33 2 if (ref $output eq 'GLOB') { }
1 1 elsif (ref($output)->can('print')) { }
1 0 elsif (ref $output eq 'CODE') { }
431 1 34 if (ref $format eq 'CODE') { }