Branch Coverage

blib/lib/Log/Handler.pm
Criterion Covered Total %
branch 91 164 55.4


line true false branch
1242 14 1 unless @_ > 1
1244 1 0 @_ > 1 ? :
1251 1 0 unless (exists $LOGGER{$appl})
1255 1 0 if ($export)
1264 0 2 unless @_ == 2
1267 0 2 unless (exists $LOGGER{$logger})
1275 0 2 unless @_ == 2
1278 2 0 unless (exists $LOGGER{$logger})
1286 0 0 unless @_ == 2
1289 0 0 if (exists $LOGGER{$logger})
1309 0 16 if (@_)
1310 0 0 if ($_[0] eq 'config') { }
1323 0 32 if ($args[0] and $args[0] eq 'config')
1327 0 32 if (@args > 2)
1328 0 0 if (@args % 2 != 0)
1359 0 2 unless @_ > 1
1387 0 6 unless $o_opts = $package->validate($o_opts)
1393 0 2 if ($@)
1404 0 2 unless ($opts)
1428 3 3 if (not $self->output($alias)) { }
1431 1 2 unless (exists $n_opts->{'alias'})
1438 0 3 unless $self->output($alias)->reload($o_opts)
1444 0 2 if ($@)
1458 2 6 if (not exists $reloaded{$alias} and $output->{'remove_on_reload'}) { }
1463 0 2 if ($@)
1486 0 3 unless @_ == 3 or @_ == 4
1493 3 0 @_ == 2 ? :
1495 0 3 unless ($pattern =~ /^%[a-ln-z]\z/i)
1499 0 3 unless (defined $name and $name =~ /^[%\w\-\.]+\z/)
1503 1 2 if (ref $code ne 'CODE')
1516 0 4 unless @_ == 3
1520 0 4 unless (exists $alias->{$name})
1524 0 4 if (ref $new ne 'HASH')
1528 0 0 unless (defined $new->{'minlevel'} or defined $new->{'maxlevel'})
1533 0 8 unless defined $new->{$level}
1535 8 0 if ($new->{$level} =~ /^(?: 8 | nothing | 7 | debug | 6 | info | 5 | notice | 4 | warning | warn | 3 | error | err | 2 | critical | crit | 1 | alert | 0 | emergency | emerg | fatal )\z/x) { }
1537 0 8 if $new->{$level} =~ /^\d\z/
1553 16 12 if ($level_num < 4)
1560 48 36 if ($levels->{$level}) { }
1578 0 13 unless @_ == 2
1581 10 3 exists $alias->{$name} ? :
1588 0 0 if (@alias) { }
1591 0 0 unless $output and UNIVERSAL::can($output, 'flush')
1593 0 0 unless ($output->flush)
1594 0 0 if (defined $errors) { }
1603 0 0 unless UNIVERSAL::can($output, 'flush')
1605 0 0 unless ($output->flush)
1606 0 0 if (defined $errors) { }
1615 0 0 defined $errors ? :
1725 0 0 unless (exists $params{$param})
1744 35 3 if (exists $AVAILABLE_OUTPUTS{$type}) { }
3 0 elsif ($type =~ /::/) { }
1754 0 38 if ($@)
1764 0 32 unless my $o_obj = $package->new($o_opts)
1807 122 48 if (exists $split_options{$key}) { }
1834 138 107 if ($levels->{$level}) { }
1853 38 0 if ($output->{'alias'})
1869 0 38 if (exists $args[0]{'filter'})
1875 0 38 if ($options{'category'})
1882 19 19 unless ($options{'alias'})
1886 0 19 if (exists $alias->{$rand})
1895 3 35 if ($options{'filter_message'})
1900 20 18 unless (defined $options{'priority'})
1906 30 46 if $options{$opt} =~ /^\d\z/
1916 70 140 if $level_num > 3
1920 2 36 if ($options{'message_pattern'})
1921 0 2 unless (ref $options{'message_pattern'})
1925 0 16 unless (exists $pattern->{$p})
1944 0 2 if $@
1947 37 1 if ($options{'message_layout'})
1965 100 168 unless defined $p and length $p
1966 101 67 if (exists $pattern->{$p}) { }
1978 37 0 if (@chunks)
1986 0 37 if $@
2007 1 2 if ($ref eq 'CODE') { }
0 2 elsif ($ref eq 'Regexp') { }
1 1 elsif (not $ref) { }
2050 0 1 unless (defined $filter{'condition'} and $filter{'condition'} =~ /\w/)
2060 0 1 if ($cond)
2065 0 3 unless (exists $filter{$m})
2069 2 1 if (not $ref) { }
0 1 elsif ($ref ne 'Regexp') { }