Condition Coverage

blib/lib/IO/Prompter.pm
Criterion Covered Total %
condition 109 280 38.9


and 3 conditions

line !l l&&!r l&&r condition
87 35 7 0 defined $config_data and $config_data eq '-argv'
135 94 1 2 &VOID() and not $opt_ref->{'-void'}
159 0 0 97 &openhandle($in_filehandle) and &openhandle($out_filehandle)
162 97 0 0 -t $in_filehandle && -t $out_filehandle
207 0 0 1 $tag =~ /\A\R?\Z/ and exists $opt_ref->{'-def'}
234 10 82 5 defined $input and $input =~ /\A\R?\Z/
92 0 5 defined $input and $input =~ /\A\R?\Z/ and exists $opt_ref->{'-def'}
240 10 5 82 defined $input and not $opt_ref->{'-line'}
245 94 1 2 exists $opt_ref->{'-fail'} and $input ~~ $opt_ref->{'-fail'}
262 12 0 84 defined $input and $opt_ref->{'-history'} ne 'NONE'
269 90 6 0 $timedout and exists $opt_ref->{'-def'}
279 0 7 20 $succeeded &&= $input =~ /\A \s* y/imsx
280 7 20 0 $succeeded and $opt_ref->{'-yesno'}{'count'} > 1
297 84 2 4 &LIST() and not $succeeded
467 4 0 0 @_ && &looks_like_number($_[0])
481 4 0 0 @_ && &looks_like_number($_[0])
495 7 0 0 @_ && &looks_like_number($_[0])
509 5 0 0 @_ && &looks_like_number($_[0])
577 0 3 3 @_ and ref $_[0] || $_[0] =~ /$STD_CONSTRAINT/
585 0 2 0 @_ and ref $_[0] || $_[0] =~ /$STD_CONSTRAINT/
719 0 0 0 @_ && !($_[0] =~ /^-/)
743 0 0 0 $flag eq '-echo' and not eval { do { BEGIN {${^WARNING_BITS} = "\x44\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x45\x05"} require Term::ReadKey } }
746 0 0 0 @_ && !($_[0] =~ /^-/)
793 188 18 12 $redo and $arg =~ s/\A -.{$redo} (?=.)/-/msx
806 91 0 6 defined $option{'-single'} and length($option{'-echo'}->('X') // 'echoself')
844 90 1 6 exists $option{'-def'} and not $option{'-def_nocheck'}
902 110 0 11 ${$input_ref;} =~ /^\R?$/msx and exists $opt_ref->{'-def'}
910 102 14 4 $opt_ref->{'-integer'} and not $input =~ /$INTEGER_PAT/
915 4 112 4 not $failed and $opt_ref->{'-number'}
112 2 2 not $failed and $opt_ref->{'-number'} and not $input =~ /$NUMBER_PAT/
938 6 52 62 not $failed and keys %constraint_for
966 28 0 0 defined $fake_input and length $fake_input > 0
985 96 1 0 exists $opt_ref->{'-timeout'} && $fileno >= 0
988 97 0 0 $has_timeout and $fileno >= 0
995 93 0 4 defined $fake_input and length $fake_input > 0
1035 10 81 6 defined $input && $opt_ref->{'-single'}
1174 97 0 0 -t $in_fh and $has_readkey
1221 0 0 0 defined $fake_input and length $fake_input > 0
1252 0 0 0 not $prev_was_verbatim and $next eq $VERBATIM_KEY
0 0 0 not $prev_was_verbatim and $next =~ /$COMPLETE_INIT/ || $completion_level > 0 && $next =~ /$COMPLETE_CYCLE/
0 0 0 not $prev_was_verbatim and $next eq $ctrl{'ERASE'}
0 0 0 not $prev_was_verbatim and $next eq $ctrl{'EOF'}
0 0 0 not $prev_was_verbatim and $faking
0 0 0 not $prev_was_verbatim and $faking and $next eq $FAKE_ESC
0 0 0 not $prev_was_verbatim and $next =~ /\A\R\z/
1275 0 0 0 $next =~ /$COMPLETE_INIT/ and index($completion_type, $next) < 0
1407 0 0 0 $faking and length $local_fake_input
1425 0 0 0 $input =~ /\A\R?\Z/msx and defined $opt_ref->{'-def'}
1449 0 0 0 $faking and $input =~ /^ (?: \cD | \cZ) /msx
1538 0 0 0 not defined $next and length $input == 0
1541 0 0 0 $opt_ref->{'-single'} and exists $opt_ref->{'-return'}
0 0 0 $opt_ref->{'-single'} and exists $opt_ref->{'-return'} and not $input =~ /\A\R\z/

or 2 conditions

line l !l condition
108 3 0 $lexical_wrappers[$scope_number]{$subname} // []
128 4 95 (&CORE::GLOBAL::caller(0))[10] // {}
129 4 95 $hints_hash->{'IO::Prompter::scope_number'} // 0
139 27 70 $opt_ref->{'-yesno'}{'count'} // 0
156 97 0 do { no warnings; tell $in_filehandle } // 0
263 61 23 $history_cache{$opt_ref->{'-history'}} //= []
268 96 0 $in_pos == do { no warnings; tell $in_filehandle } // 0
730 0 0 ref $comp_spec || $comp_spec || '???'
806 6 0 $option{'-echo'}->('X') // 'echoself'
807 6 0 $option{'-return'} //= sub { "\n"; }
877 0 0 shift @ARGV // '-'
920 120 0 $opt_ref->{'-must'} // {}
927 0 120 $extras // {}
928 26 94 $opt_ref->{'-yesno'}{'must'} // {}
932 0 120 $extras // {}
933 26 94 $opt_ref->{'-yesno'}{'must'} // {}
984 97 0 fileno $in_fh // -1
1082 0 0 (ref $completer || $completer) // ''
1182 0 0 $ctrl{'EOF'} //= "\cD"
1183 0 0 $ctrl{'INTERRUPT'} //= "\cC"
1238 0 0 $next // ''
1372 0 0 $opt_ref->{'-echo'}->($_) // 'X'
1556 0 1 $initial_prompt // ''
1585 10 0 shift @source // (last ITEM)
1653 0 0 shift() // ''
1671 0 0 $1 // ''

or 3 conditions

line l !l&&r !l&&!r condition
142 17 80 0 $opt_ref->{'-in'} // _open_ARGV()
143 6 91 0 $opt_ref->{'-out'} // &qualify_to_ref(select)
221 0 0 0 $opt_ref->{'-number'} || $opt_ref->{'-integer'}
293 5 0 1 $input // ()
366 0 1 0 ref $style or not $style =~ m[/]
377 0 0 0 ref $style or not $style =~ m[/]
394 0 0 0 &$arg($_) // $_
410 2 0 0 $STD_CONSTRAINT{$_} // _opt_err('invalid', -$option_type, '"pos", "neg", "even", etc.')
577 2 1 3 ref $_[0] || $_[0] =~ /$STD_CONSTRAINT/
585 0 0 2 ref $_[0] || $_[0] =~ /$STD_CONSTRAINT/
802 1 0 0 $option{'-number'} || $option{'-integer'}
812 1 0 0 $option{'-prompt'} // $0
841 97 0 0 $option{'-history'} //= $option{'-prompt'}
1005 125 0 0 not $has_timeout or select $readbits, undef, undef, $timeout
1060 0 28 0 $term_width // $DEFAULT_TERM_WIDTH
1082 0 0 0 ref $completer || $completer
1184 0 0 0 $ctrl{'ERASE'} //= $^O eq 'MSWin32' ? "\cH" : '0177'
1188 0 0 0 $ctrl{'QUOTENEXT'} // $DEFAULT_VERBATIM_KEY
1252 0 0 0 $next =~ /$COMPLETE_INIT/ || $completion_level > 0 && $next =~ /$COMPLETE_CYCLE/
0 0 0 $prev_was_verbatim or not $next =~ /$ctrl/
1297 0 0 0 $COMPLETE_MODE{$completion_type}[$completion_level - 1] // $COMPLETE_MODE{$completion_type}[-1]
1498 0 0 0 $insert_offset or $prev_insert_offset
1525 0 0 0 $opt_ref->{'-single'} or not defined $next
0 0 0 $opt_ref->{'-single'} or not defined $next or $input =~ m[\Q$/\E$]