Branch Coverage

lib/Getopt/Valid.pm
Criterion Covered Total %
branch 79 104 75.9


line true false branch
246 1 1 if ($self->validate)
262 0 17 if ref $class
264 0 17 unless $args_ref and ref $args_ref eq 'HASH' and $$args_ref{'struct'} and ref $$args_ref{'struct'} eq 'ARRAY'
291 42 0 if ($key =~ / \A (.+?) # name (?:\|(.+?))? # short (?: (?: ([=:]) # op ([isfo]|[0-9]+) # type | (\+) # increment type ) )?$ \z /x) { }
315 24 18 if ($rstruct eq 'HASH') { }
0 18 elsif ($rstruct eq 'Regexp' or $rstruct eq 'CODE') { }
0 18 elsif ($rstruct) { }
4 28 elsif (defined $kstruct and length $kstruct > 1) { }
317 5 19 if defined $$kstruct{'required'}
319 15 9 if defined $$kstruct{'constraint'}
321 0 24 if defined $$kstruct{'prefilter'}
323 3 21 if defined $$kstruct{'postfilter'}
325 2 22 if defined $$kstruct{'anytrigger'}
327 2 22 if defined $$kstruct{'settrigger'}
329 2 22 if defined $$kstruct{'oktrigger'}
331 2 22 if defined $$kstruct{'failtrigger'}
333 5 19 if defined $$kstruct{'description'}
335 0 24 if defined $$kstruct{'default'}
347 26 16 $mode eq 's' ? :
42 0 unless defined $default
350 33 9 unless $description
373 17 0 unless (defined $updated_struct{'help'})
374 0 17 $seen_short{'h'} ? :
436 17 17 if $args_ref
478 58 0 defined $$args_ref{$name} ? :
483 0 58 if $prefilter
487 4 54 if ($required and not $value)
493 14 0 if ($constraint and defined $value and ref $value || length $value)
494 0 14 if (ref $constraint eq 'CODE') { }
495 0 0 unless (&$constraint($value, $name, $self))
501 6 8 unless ($value =~ /$constraint/)
513 48 10 if (not $error) { }
1 9 elsif ($failtrigger) { }
514 2 46 if $postfilter
519 1 47 if $oktrigger
529 2 56 if $anytrigger
533 1 57 if $settrigger and $value
538 12 5 if ($$self{'underscore'})
541 17 13 if $ku ne $k
551 0 0 @errors ? :
6 11 @errors ? :
0 17 wantarray ? :
582 7 9 if ($m eq 's') { }
3 6 elsif ($m eq 'i') { }
0 6 elsif ($m eq 'f') { }
0 6 elsif ($m eq 'o') { }
0 6 elsif ($m =~ /^[0-9]|\+$/) { }
604 16 0 if $$ref{'short'}
607 10 6 if $$ref{'required'}
612 1 15 ref $$ref{'description'} ? :
619 0 3 if $do_print
633 1 0 !$sep && wantarray ? :