Condition Coverage

blib/lib/CLI/Helpers.pm
Criterion Covered Total %
condition 36 110 32.7


and 3 conditions

line !l l&&!r l&&r condition
165 1 0 12 defined $opt_ref and is_arrayref($opt_ref)
228 14 0 0 exists $opts->{'syslog-tag'} && length $opts->{'syslog-tag'}
14 0 0 exists $opts->{'syslog-facility'} && length $opts->{'syslog-facility'}
339 0 0 0 @opt and @desc
350 24 0 0 defined $color and $DEF{'COLOR'}
417 0 16 8 defined $_ && ref $_
421 23 0 0 exists $opts->{'color'} && defined $opts->{'color'}
427 23 0 0 $DEF{'TAGS'} and exists $opts->{'tag'}
435 22 1 0 scalar(@input) % 2 == 0 && (exists $opts->{'kv'} && $opts->{'kv'} == 1)
460 23 0 0 defined $DATA_HANDLE and $opts->{'data'}
23 0 0 $DEF{'SYSLOG'} and not $opts->{'no_syslog'}
547 0 14 1 is_hashref($_[0]) and defined $_[1]
14 0 1 is_hashref($_[0]) and defined $_[1] and is_ref($_[1])
579 0 0 0 defined $answer and exists $_Confirm_Valid->{$answer}
605 0 0 0 defined $text and not defined $error
613 0 0 0 exists $args{'default'} and length $text == 0
650 0 0 0 defined $choice and exists $ref{$choice}
718 0 0 0 length $text and $text =~ /\S/

or 2 conditions

line l !l condition
228 2 12 $opts->{'debug'} || 0
0 14 $opts->{'debug-class'} || 'main'
0 14 $opts->{'encode'} || 'json'
4 10 $opts->{'verbose'} || 0
0 14 $opts->{'quiet'} || 0
0 14 $opts->{'syslog'} || 0
0 14 $opts->{'syslog-debug'} || 0
0 14 $opts->{'nopaste'} || 0
429 0 0 $TAGS{$opts->{'tag'}} ||= 0
575 0 0 $_Confirm_Valid ||= {"y", 1, "yes", 1, "n", 0, "no", 0}
664 0 0 $prompt ||= "Password: "
688 0 0 $args{'validate'} ||= {}
704 0 0 $args ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
230 0 0 14 $opts->{'color'} // git_color_check()
231 14 0 0 $DEF{'ENCODE'} eq "json" or $DEF{'ENCODE'} eq "yaml"
369 0 0 0 $stdout =~ /auto/ or $stdout =~ /true/
415 0 0 8 $DEF{'ENCODE'} eq 'yaml' || $opts->{'yaml'}
442 0 0 0 $v ||= $DEF{'KV_FORMAT'} eq ": " ? "~" : ""
451 23 0 0 not $DEF{'QUIET'} or $opts->{'IMPORTANT'}
529 0 2 4 lc $DEF{'DEBUG_CLASS'} eq "all" or $package eq $DEF{'DEBUG_CLASS'}
533 1 1 0 $opts->{'no_syslog'} //= !$DEF{'SYSLOG_DEBUG'}
555 15 0 0 $DEF{'ENCODE'} eq 'json' || $opts->{'json'}
703 0 0 0 $term ||= "Term::ReadLine"->new($0)