Branch Coverage

File:blib/lib/Log/Abstraction.pm
Coverage:56.3%

line%coveragebranch
192100TFif (scalar @_ == 1 and ref $_[0] ne 'HASH') { }
100TFelsif (my $params = Params::Get::get_params(undef, @_)) { }
199100TFif (exists $args{'config_file'})
201100TFunless (-r $args{'config_file'})
20450TFif (my $config = 'Config::Abstraction'->new('config_dirs', [''], 'config_file', $args{'config_file'}, 'env_prefix', "${class}::")) { }
206100TFif ($config->{$class})
21150TFif ($array)
219100TFif (not defined $class) { }
100TFelsif (&Scalar::Util::blessed($class)) { }
22050TFif (scalar keys %args > 0)
235100TFif ($args{'syslog'} and not $args{'script_name'})
23650TFunless "File::Basename"->can("basename")
24150TFunless defined $args{'script_name'}
245100TFif (defined(my $logger = $args{'logger'})) { }
50TFelsif (not $args{'file'} || $args{'array'}) { }
24650TFif (&Scalar::Util::blessed($logger) and ref $logger eq __PACKAGE__)
25550TF$args{'verbose'} ? :
259100TFif ($level) { }
26050TFif (ref $level eq "ARRAY")
26450TFunless (defined $Log::Abstraction::syslog_values{$level})
3280TFunless defined $value
341100TFunless (UNIVERSAL::isa((&CORE::GLOBAL::caller())[0], __PACKAGE__))
34550TFunless (defined $Log::Abstraction::syslog_values{$level})
349100TFif ($Log::Abstraction::syslog_values{$level} > $self->{'level'})
35450TFif (scalar @messages == 1 and ref $messages[0] eq "ARRAY")
367100TFif ($class eq __PACKAGE__)
37350TFif (my $logger = $self->{'logger'}) { }
0TFelsif ($self->{'array'}) { }
374100TFif (ref $logger eq 'CODE') { }
100TFelsif (ref $logger eq 'ARRAY') { }
100TFelsif (ref $logger eq 'HASH') { }
100TFelsif (not ref $logger) { }
50TFelsif (&Scalar::Util::blessed($logger)) { }
388100TFif (my $file = $logger->{'file'})
39050TFif ($file =~ /^([^<>|*?;!`$"\0-\037]+)$/) { }
39550TFif (open my $fout, ">>", $logger->{'file'})
40650TFunless print $fout "$format\n"
41050TFif (my $array = $logger->{'array'})
41350TFif ($logger->{'sendmail'}{'to'})
4160TFif (not defined $logger->{'sendmail'}{'level'} or $Log::Abstraction::syslog_values{$level} <= $Log::Abstraction::syslog_values{$logger->{'sendmail'}{'level'}})
4290TFif (my $from = $logger->{'sendmail'}{'from'}) { }
4340TFif (my $subject = $logger->{'sendmail'}{'subject'})
4480TFif ($@)
454100TFif (my $syslog = $logger->{'syslog'})
45550TFif (not defined $syslog->{'level'} or $Log::Abstraction::syslog_values{$level} <= $syslog->{'level'})
45650TFunless ($self->{'_syslog_opened'})
46150TFif ($syslog->{'server'})
46450TFif scalar keys %{$syslog;}
47450TF$level eq 'error' ? :
47850TFif ($@)
48650TFif (my $fout = $logger->{'fd'}) { }
50TFelsif (not $logger->{'file'} || $logger->{'syslog'} || $logger->{'sendmail'}) { }
4980TFunless print $fout "$format\n"
50450TFif (open my $fout, ">>", $logger)
51650TFunless print $fout "$format\n"
52150TFunless ($logger->can($level))
5220TFif ($level eq 'notice' and $logger->can('info')) { }
53750TFif ($self->{'file'})
5420TFif ($file =~ /^([^<>|*?;!`$"\0-\037]+)$/) { }
5480TFif (open my $fout, ">>", $file)
5530TFif (&blessed($self) eq __PACKAGE__) { }
5660TFunless print $fout "$format\n"
570100TFif (my $fout = $self->{'fd'})
57550TFif (&blessed($self) eq __PACKAGE__) { }
58850TFunless print $fout "$format\n"
60350TFif ($level)
60450TFunless (defined $Log::Abstraction::syslog_values{$level})
624100TF$self->{'level'} && $self->{'level'} >= $Log::Abstraction::DEBUG ? :
73950TFunless $params and ref $params eq "HASH"
74250TFif $Log::Abstraction::syslog_values{$level} > $Log::Abstraction::WARNING
745100TFunless (defined $warning)
74650TFif (scalar @_ and not ref $_[0]) { }
753100TFif (ref $warning eq "ARRAY")
75850TFif ($self eq __PACKAGE__)
7600TFif ($Log::Abstraction::syslog_values{$level} <= $Log::Abstraction::ERROR)
77050TFif ($Log::Abstraction::syslog_values{$level} <= $Log::Abstraction::ERROR)
7720TFif ($self->{'croak_on_error'} or not defined $self->{'logger'})
77750TFif ($self->{'carp_on_warn'} or not defined $self->{'logger'})
787100TFif ($self->{'_syslog_opened'})