Branch Coverage

blib/lib/Getopt/Complete/Args.pm
Criterion Covered Total %
branch 15 122 12.3


line true false branch
21 0 1 unless ($$self{'argv'})
27 0 1 unless ($options)
32 0 1 if (not $type) { }
0 1 elsif ($type eq 'ARRAY') { }
0 1 elsif ($type eq 'HASH') { }
1 0 elsif (&Scalar::Util::blessed($options)) { }
42 0 1 unless ($options->isa('Getopt::Complete::Options'))
122 0 1 if (not $retval and @errors == 0)
125 0 1 if ($ENV{'COMP_CWORD'})
132 0 1 if (@ARGV)
133 0 0 if ($self->options->has_option('<>')) { }
140 0 0 if ($self->sub_commands)
148 0 1 if (@sub_command_path)
154 0 1 if (my(@more_errors) = $self->_validate_values)
160 1 0 @errors ? :
171 0 1 if (ref $completion_handler eq 'CODE') { }
0 1 elsif (ref $completion_handler eq 'ARRAY') { }
185 0 0 unless (defined $name)
189 0 0 if ($name eq '<>' and not $spec)
194 0 0 ref $value_returned ? :
198 0 0 unless defined $value
199 0 0 unless defined $completions
201 0 0 if ($completion_handler)
205 0 0 if (not defined $completions && ref $completions eq 'ARRAY' or @$completions == 0)
209 0 0 unless (ref $completions eq 'ARRAY')
217 0 0 if (ref $valid_values[-1] eq 'ARRAY')
221 0 0 /(.*)\t$/ ? :
0 0 unless (grep {$_ eq $value;} map({/(.*)\t$/ ? $1 : $_;} @valid_values))
222 0 0 $key eq '<>' ? :
223 0 0 if (@valid_values_shown_in_message)
224 0 0 /^(.+)\t$/ ? :
238 0 0 unless defined $previous
244 0 0 unless (length $previous)
246 0 0 if ($current =~ /^(-+)/ or $current eq '' and not $self->sub_commands and not $self->options->has_option('<>')) { }
265 0 0 if $_ ne '<>'
269 0 0 $current =~ /^--no-/ ? :
270 0 0 length $_ ? :
271 0 0 $self->option_spec($_) =~ /\=/ ? :
273 0 0 $show_negative_booleans && $boolean{$_} && !(substr($_, 0, 3) eq 'no-') ? :
281 0 0 if $_ ne '<>'
285 0 0 if (%boolean and not $show_negative_booleans)
290 0 0 if ($current =~ /-{1,2}(.+?)=(.*)/)
294 0 0 if (!@possibilities || @possibilities == 1 and length $current >= $possibilities[0])
298 0 0 $value eq "\t" ? :
309 0 0 if ($resolve_values_for_option_name)
311 0 0 if (my $handler = $self->completion_handler($resolve_values_for_option_name)) { }
0 0 elsif ($resolve_values_for_option_name and not $self->sub_commands) { }
313 0 0 if (defined $handler and not ref $handler eq 'ARRAY')
316 0 0 unless (ref $handler eq 'ARRAY')
330 0 0 if ($resolve_values_for_option_name eq '<>')
332 0 0 if $_ ne '<>'
0 0 if (grep {substr($_, 0, 1) ne '>' if $_ ne '<>';} $self->option_names)
346 0 0 if ref $possibilities[-1]
358 0 0 if ($i == 0)
368 0 0 if ref $matches[-1]
380 0 0 if (substr($p, length($p) - 1, 1) eq "\t") { }
389 0 0 if (substr($m, 0, 1) eq "\t") { }
402 0 0 if (@printable == 1) { }
405 0 0 if ($nospace[0]) { }
407 0 0 if ($printable[0] eq $current) { }
436 0 0 if (substr($match, $pos, 1) ne $expected)