Condition Coverage

blib/lib/Log/Easy.pm
Criterion Covered Total %
condition 50 310 16.1


and 2 conditions

line l !l condition
1193 0 0 $status and scalar @$dont_log_rx

and 3 conditions

line !l l&&!r l&&r condition
23 4630 0 0 defined $separator and length $separator > 0
4630 0 0 defined $separator and length $separator > 0
0 0 0 defined $separator and length $separator > 0
375 0 48 8 $level and not $valid_level
0 0 48 $level and $valid_level
435 0 0 0 $level and not $dest
470 0 0 0 $dest and not $level
503 0 0 0 $package and not $package =~ /^\s+$/
540 0 0 0 UNIVERSAL::isa($clone, $this_package) and ref $$self{'prefix'} eq 'CODE'
588 0 0 0 $_[0] and $_[0] =~ /^-/
599 0 0 0 $terse and not defined $indent
617 0 0 0 defined $dumps and ref $dumps eq 'ARRAY'
618 0 0 0 defined $names and ref $names eq 'ARRAY'
653 0 0 0 exists $$config{'help'} and $$config{'help'}
740 0 0 0 scalar @missing and not $no_usage
794 0 0 0 $optval ne '0' and not $optval
821 0 0 0 exists $$config{'help'} and $$config{'help'}
890 0 0 0 'CODE' eq ref $val and not $_ =~ /(usage|help)/
0 0 0 'CODE' eq ref $val and not $_ =~ /(usage|help)/ and not $already_decoded{$val}++
896 0 0 0 defined $val and $val || $val eq '0'
899 0 0 0 $boolean && $val
1069 0 0 0 ref $level eq 'HASH' and $args = $level
1118 1 0 6272 ref $level eq 'HASH' and $args = $level
1171 1284 4989 0 $status and my $packages = $$self{'packages'}
1195 0 0 0 $status and $log_called_package =~ /^($dont_rx)$/
1207 0 0 0 $do_match and $dont_match
1248 4989 0 0 exists $$args{'prefix'} and $log_level =~ /^D_/
4989 0 0 exists $$args{'prefix'} and $log_level =~ /^D_/ and $log_file =~ /^(STDOUT|STDERR)$/
1285 14966 0 0 my $ref = ref $msg and $dump_refs
1292 0 0 0 ref $msg eq 'CODE' and $code_resolve_cnt++ > $code_resolve_cnt_max
1305 4989 0 0 $add_dev_prefix and not $outmsg[-1] =~ /\n$/ms
1532 0 0 0 $fh and $file_no
1755 4877 112 0 $level =~ /^(CRIT|FATAL)$/ and defined $$args{'handle_fatals'} ? $$args{'handle_fatals'} : $$self{'handle_fatals'}

or 2 conditions

line l !l condition
23 0 1 $ENV{'LOG_PACKAGES_DEBUG'} ||= 0
1 0 $ENV{'LOG_FILTER'} ||= 'ON'
0 1 $ENV{'LOG_INTERNAL_DEBUG'} ||= 0
366 56 0 shift() || ''
370 48 8 shift() || ''
417 0 0 shift() || ''
418 0 0 shift() || ''
497 0 0 $$self{'packages_array'} ||= []
498 0 0 $$packages[0] ||= []
499 0 0 $$packages[1] ||= []
524 0 0 $$self{'packages'} ||= []
591 0 0 $$args{-'n'} || $$args{-'names'} || undef
593 0 0 $$args{-'pure'} || 0
594 0 0 $$args{-'deep'} || 0
596 0 0 $$args{-'id'} || 0
597 0 0 $$args{-'terse'} || 0
598 0 0 $$args{-'p'} || $$args{-'pad'} || ''
607 0 0 shift() || undef
608 0 0 shift() || 0
609 0 0 shift() || 0
610 0 0 shift() || 2
611 0 0 shift() || 0
612 0 0 shift() || 0
613 0 0 shift() || ''
649 0 0 $$config{'target'} || \%options
654 0 0 $$optargs{'usage'} ||= ['', sub { usage($optargs, \%options, $optconfig, $config); } , 'print help message and exit']
655 0 0 $$optargs{'help'} ||= ['', sub { usage($optargs, \%options, $optconfig, $config); } , 'print help message and exit']
657 0 0 $$config{'no_usage'} || scalar grep({/no_usage/;} @_)
659 0 0 $$config{'no_missing'} || scalar grep({/no_missing/;} @_)
752 0 0 shift() || {}
822 0 0 $$optargs{'usage'} ||= ['', sub { usage($optargs, $options, $optconfig, $config); } , 'print help message and exit']
823 0 0 $$optargs{'help'} ||= ['', sub { usage($optargs, $options, $optconfig, $config); } , 'print help message and exit']
855 0 0 $$config{'brief_info'} || ''
1049 0 926 $$args{'backstack'} || 0
1077 0 0 $$self{'log_level'} || 'DEFAULT'
1128 6273 0 $$args{'log_level'} || $$self{'log_level'} || $ENV{'LOG_LEVEL'} || 'DEFAULT'
1156 0 6273 $$args{'backstack'} || 0
1314 0 1853 $$self{'n'} || "\n"
1327 4989 0 $$args{-'level'} ||= 'INFO'
1328 4989 0 $$args{-'message'} ||= ' - -- NO MESSAGE -- - '
1372 0 0 $$args{-'level'} ||= 'INFO'
1373 0 0 $$args{-'message'} ||= ' - -- NO MESSAGE -- - '
1394 0 0 (ref $self ? 2 : $self) || 2
1405 2778 0 shift() || (ref $self ? 0 : $self) || 0
1428 926 0 shift() || 0
1447 0 0 $f{$_} ||= 'undef'
1504 3 0 $$args{'log'} || $class || 'DEFAULT'
1553 4989 0 $$args{-'level'} || 'DEFAULT'
1728 4989 0 $$args{-'level'} || 'CLEAN'

or 3 conditions

line l !l&&r !l&&!r condition
419 0 0 0 $level or $dest
551 6 0 0 ref $self || $self || $this_package
585 0 0 0 ref $self || $self
590 0 0 0 $$args{-'d'} || $$args{-'dump'} || $self
606 0 0 0 shift() || $self
650 0 0 0 $$config{'default'} || $target
653 0 0 0 not $$config{'nohelp'} or exists $$config{'help'} and $$config{'help'}
654 0 0 0 $$optargs{'help'} ||= ($$optargs{'usage'} ||= ['', sub { usage($optargs, \%options, $optconfig, $config); } , 'print help message and exit'])
655 0 0 0 $$optargs{'usage'} ||= ($$optargs{'help'} ||= ['', sub { usage($optargs, \%options, $optconfig, $config); } , 'print help message and exit'])
673 0 0 0 substr($spec, 1, 1) || $argspec
794 0 0 0 not defined $optval or $optval ne '0' and not $optval
821 0 0 0 not $$config{'nohelp'} or exists $$config{'help'} and $$config{'help'}
822 0 0 0 $$optargs{'help'} ||= ($$optargs{'usage'} ||= ['', sub { usage($optargs, $options, $optconfig, $config); } , 'print help message and exit'])
823 0 0 0 $$optargs{'usage'} ||= ($$optargs{'help'} ||= ['', sub { usage($optargs, $options, $optconfig, $config); } , 'print help message and exit'])
855 0 0 0 $$usage_args{'brief_info'} ||= $$config{'brief_info'} || ''
881 0 0 0 $$optargs{$_}[2] || $_
896 0 0 0 $val || $val eq '0'
1076 0 0 0 $$self{"log_file_$level"} || $$self{'log_file'}
0 0 0 $$args{'log_file'} ||= $$self{"log_file_$level"} || $$self{'log_file'}
1077 0 0 0 $$args{'log_level'} ||= $$self{'log_level'} || 'DEFAULT'
1122 0 6273 0 $$args{'level'} || $level
1127 0 1 0 $$self{"log_file_$level"} || $$self{'log_file'}
6272 1 0 $$args{'log_file'} ||= $$self{"log_file_$level"} || $$self{'log_file'}
1247 4989 0 0 $$args{'log_file'} || $self->log_file($level) || $self->log_file
1326 0 0 4989 $$args{-'terse'} ||= $$self{'terse'}
1371 0 0 0 $$args{-'terse'} ||= $$self{'terse'}
1493 0 3 0 ref $self || $self
1505 2 1 0 $LOGS{$log} ||= $class eq $this_package ? $self : $this_package->new(@_)
1566 0 4989 0 $file ||= $$args{'log_file'}
1569 4989 0 0 $file ||= $$self{"log_file_$level"}
1572 4989 0 0 $file ||= $$self{'log_file'}
1575 4989 0 0 $file ||= $LEVEL_FHS{$level}
1578 4989 0 0 $file ||= $default_fh
1689 4989 0 0 $$self{'unbuffer'} or $$args{'unbuffer'}
1735 4989 0 0 $fh ||= $FHS_NA{$default_fh}
1748 4989 0 0 fileno $_fh or $_fh = $FHS_NA{$_fh}
1770 0 0 0 $$args{'QUIT'} || $$args{'EXIT'} || $LOG_CODE{'QUIT'}