Branch Coverage

blib/lib/Getopt/Auto.pm
Criterion Covered Total %
branch 131 166 78.9


line true false branch
94 1 26 if ($errors)
95 0 1 unless (defined $config{'test'})
107 1 26 if ($errors)
108 0 1 if (not defined $config{'okerror'} || defined $config{'test'})
120 0 27 if (exists &main::default)
175 943 0 unless (defined $config{'trace'})
185 89 0 unless (defined $config{'trace'})
190 0 0 length $$spec[$SPEC_SHORT] ? :
193 0 0 defined $$spec[$SPEC_LONG] ? :
196 0 0 defined $$spec[$SPEC_CODE] ? :
204 228 0 unless (defined $config{'trace'})
237 0 91 unless (defined $caller)
240 83 8 unless (defined $pkg)
245 64 27 if (exists &{"$pkg$func";}) { }
270 0 7 if (exists $options{$name} and exists $options{$name}{'code'})
279 5 3 if (defined $sub)
290 5 99 if ($arg_type == $BARE and defined $config{'nobare'} or $arg_type == $SHORT and defined $config{'noshort'} or $arg_type == $LONG and defined $config{'nolong'})
317 65 24 if (defined $$spec[$SPEC_CODE])
338 1 7 unless (ref $spec eq 'ARRAY')
343 1 6 if (@{$spec;} != $SPEC_SIZE)
366 0 34 unless (defined $opt)
373 0 34 if (exists $ENV{'GETOPT_AUTO_TRACE'})
374 0 0 $ENV{'GETOPT_AUTO_TRACE'} == 1 ? :
379 24 6 if (ref $arg eq 'HASH') { }
5 1 elsif (ref $arg eq 'ARRAY') { }
381 29 1 if (exists $config{$opt}) { }
409 0 470 unless defined $option
410 256 214 if $option =~ /\A$DDASH/msx
411 141 73 if $option =~ /\A$DASH/msx
412 71 2 if $option =~ /\A\w/msx
445 6 33 unless (-r $file)
453 26 7 if defined $$pod{'funcs'}
457 6 26 unless (defined $$pod{'funcs'})
477 34 49 if (exists $$spec{'longhelp'})
506 0 15 if (defined $caller_local) { }
517 0 15 unless (defined $opt)
532 1 7 if (defined $config{'nobundle'})
538 0 7 if (_option_type($arg) != $SHORT)
539 0 7 if (length $arg == 2)
542 0 7 if (exists $options{$arg} and exists $options{$arg}{'registered'})
569 4 14 if (defined $config{'oknotreg'})
572 9 5 if (defined $config{'nohelp'})
576 2 3 if (exists $options{'--help'}{'code'})
582 0 3 if (exists $options{'-h'}{'code'})
595 74 2 if (defined $options{$arg})
599 55 19 if (exists $options{$arg}{'code'})
608 4 15 if (defined $arg_eq)
618 0 247 if (exists $options{$op}{'restrict'})
625 63 96 if (defined $perfs[$i] and $perfs[$i] > $max_p)
632 27 26 unless (exists $options{$help})
637 28 25 unless (exists $options{$vers})
654 7 31 if (defined $eq)
671 3 63 if (defined $init_sub)
686 6 100 if ($argv =~ /\A-{1,2}\z/msx)
694 7 93 if (_is_restricted($argv))
702 16 77 if ($argv =~ /=/msx)
713 61 32 if (_is_registered($argv))
716 57 4 if (_do_option_action($argv, $arg_eq))
728 7 25 if (defined $config{'findsub'})
730 5 2 if (defined $sub)
736 0 2 if (_do_option_action($argv, $arg_eq))
741 8 19 if ($op_type == $SHORT and length $argv > 2)
746 11 14 if (_is_registered($arg)) { }
759 4 4 if ($args{$argv} == @args)
768 11 4 if ($args{$arg} == 0)
777 10 9 if ($op_type != $BARE)
801 5 0 if (defined $their_version and length $their_version) { }
815 2 2 if (my(@help) = grep({exists $options{$_};} @ARGV)) { }
817 2 0 if (exists $options{$what}{'shorthelp'}) { }
820 2 0 if (defined $options{$what}{'longhelp'})
833 7 1 if (defined $options{$_}{'shorthelp'} and $options{$_}{'shorthelp'} =~ /\S/msx)
838 2 6 if (defined $options{$_}{'longhelp'} and $options{$_}{'longhelp'} =~ /\S/msx)
847 2 0 if ($and_there_s_more)
856 0 4 unless (defined $config{'test'})
882 83 34 if ($command eq 'item' or $command =~ /^head(?:2|3|4)/msx)
891 80 3 if (defined $1)
897 3 80 unless (defined $shorthelp)
910 0 83 if ($name =~ /\s/msx)
920 59 24 if (defined $sub_found) { }
943 0 0 if ($$self{'copying'})
957 35 3 if ($$self{'copying'})
968 2310 715 if defined Getopt::Auto::_get_their_version()
970 27 688 if ($text =~ /\$VERSION/msx)