Branch Coverage

blib/lib/Paranoid/Args.pm
Criterion Covered Total %
branch 114 164 69.5


line true false branch
129 2 5 if $messages{$_} > 1
151 297 205 exists $options{$option} ? :
235 0 108 unless (defined $oname)
241 108 0 if ($rv)
242 0 108 unless (defined $tref->{'Template'})
249 108 0 if ($rv)
250 0 108 unless (defined $tref->{'Template'} and $tref->{'Template'} =~ /^[\$\@]*$/s)
259 108 0 if ($rv)
260 95 13 if (defined $tref->{'Short'})
261 0 95 unless ($tref->{'Short'} =~ /^[a-zA-Z0-9]$/s)
267 108 0 if (defined $tref->{'Long'})
268 0 108 unless ($tref->{'Long'} =~ /^[a-zA-Z0-9-]{2,}$/s)
278 108 0 if ($rv)
279 26 82 if ($tref->{'Template'} =~ /\@/ms)
281 0 26 if (@at > 1)
286 0 26 if ($tref->{'CanBundle'} and defined $tref->{'Short'})
296 108 0 if ($rv)
297 0 108 unless (ref $tref->{'ExclusiveOf'} eq 'ARRAY')
302 0 108 unless (ref $tref->{'AccompaniedBy'} eq 'ARRAY')
308 108 0 if ($rv)
309 0 108 if (grep {not defined $_;} @{$$tref{'ExclusiveOf'};})
314 0 108 if (grep {not defined $_;} @{$$tref{'AccompaniedBy'};})
324 108 0 if ($rv)
326 15 93 if ($tref->{'CountShort'})
327 0 15 unless ($tref->{'Template'} =~ /^\$?$/ms)
366 17 19 if ($argTemplate eq '') { }
5 14 elsif ($argTemplate =~ /\@/s) { }
377 0 5 if (_NOOPTIONS()) { }
393 1 4 if (@$argRef and $argRef->[0] eq '--')
407 0 14 if (_NOOPTIONS()) { }
426 0 0 if (@$lref < length $argTemplate and @$argRef and $argRef->[0] eq '--')
439 1 35 if (@$lref < length $argTemplate) { }
451 4 31 if ($rv and $argTemplate =~ /\@/ms and length $argTemplate > 1)
455 4 0 if ($argTemplate =~ /^(\$+)/s)
460 2 2 if ($argTemplate =~ /(\$+)\$/s)
469 4 0 if @{$tmp[0];}
471 2 2 if @{$tmp[2];}
503 17 18 if ($argTemplate eq '') { }
14 4 elsif ($argTemplate eq '$') { }
506 7 10 unless defined $tref->{'Value'}
513 12 2 if (not $tref->{'Multiple'} or $tref->{'CountShort'}) { }
526 1 1 unless defined $tref->{'Value'} and ref $tref->{'Value'} eq 'ARRAY'
534 4 0 if (not $tref->{'Multiple'}) { }
547 0 0 unless defined $tref->{'Value'} and ref $tref->{'Value'} eq 'ARRAY'
576 0 14 unless defined $paref
595 0 108 unless (ref $_ eq 'HASH')
620 13 0 defined $tref->{'Long'} ? :
0 13 defined $tref->{'Short'} ? :
95 13 defined $tref->{'Short'} && defined $tref->{'Long'} ? :
628 15 93 if ($tref->{'CountShort'})
630 15 0 if defined $tref->{'Long'}
636 2 106 if defined $tref->{'Short'} and $tref->{'Template'} eq ''
642 95 13 if (defined $tref->{'Short'} and length $tref->{'Short'})
645 0 95 if (defined _getOption($tref->{'Short'})) { }
662 108 0 if (defined $tref->{'Long'} and length $tref->{'Long'})
665 0 108 if (defined _getOption($tref->{'Long'})) { }
682 0 108 unless _tLint($tref)
685 14 0 if ($rv)
689 0 35 unless defined $arg
692 1 34 if ($arg eq '--' and not _NOOPTIONS()) { }
27 7 elsif (not _NOOPTIONS() and $arg =~ /^--?/s) { }
703 14 13 if ($arg =~ /^-(\w.*)$/s) { }
13 0 elsif ($arg =~ /^--([\w-]+)(?:=(.+))?$/ms) { }
721 3 5 if ($#tmp and defined $tref and $tref->{'Template'} eq '$' and not $tref->{'CanBundle'})
736 25 0 if (defined $tref) { }
739 16 9 if ($#tmp)
740 0 16 unless ($tref->{'CanBundle'})
755 15 8 if $argTemplate eq '$' and $tref->{'CountShort'}
758 0 25 unless (&_getArgs("-$_", $argTemplate, \@oargs))
765 0 25 if (not $tref->{'Multiple'} and $tref->{'Count'} > 0)
791 1 12 if defined $2 and length $2
798 1 12 if ($#tmp and defined $tref)
801 1 0 if ($tref->{'Template'} eq '$') { }
0 0 elsif ($tref->{'Template'} eq '') { }
825 11 2 if (defined $tref) { }
831 1 10 unless (&_getArgs("--$tmp[0]", $argTemplate, \@oargs))
838 0 10 if (not $tref->{'Multiple'} and $tref->{'Count'} > 0)
866 2 5 unless exists $oref->{'PAYLOAD'}
875 44 159 if do { _getOption($_) }->{'Count'}
884 2 42 if (@{$tref->{'ExclusiveOf'};})
886 2 0 if (grep /^$regex$/ms, @tmp)
897 2 12 unless (grep /^\Q$regex\E$/ms, @tmp)