Branch Coverage

blib/lib/opts.pm
Criterion Covered Total %
branch 40 46 86.9


line true false branch
40 6 23 if (exists $is_invocant{var_name(1, \$_[0]) or ""})
56 0 37 unless my $name = var_name(1, \$_[$i])
63 5 32 if ($name =~ /_/)
72 3 2 $rule->{'alias'} ? :
78 2 35 if (exists $rule->{'default'})
80 1 1 if (ref $rule->{'default'} and ref $rule->{'default'} eq 'CODE') { }
89 3 34 if (exists $rule->{'required'})
96 8 29 if $rule->{'alias'}
97 23 59 length $_ > 1 ? :
100 4 33 if (my $gen = $$coerce_generater{$rule->{'isa'}})
104 8 29 if $rule->{'alias'}
107 33 4 if defined $_[$i + 1]
113 2 27 unless &GetOptions(@options)
114 1 26 if ($help)
117 1 0 if (@option_help)
128 1 0 unless defined $_[$_]
132 1 2 unless (defined $_[$idx])
151 4 33 if (not defined $rule) { }
16 17 elsif (not ref $rule) { }
156 0 16 unless my $tc = _get_type_constraint($rule) || _get_type_constraint($coerce_type_map->{$rule})
162 17 0 if ($rule->{'isa'}) { }
165 0 17 unless my $tc = _get_type_constraint($rule->{'isa'}) || _get_type_constraint($$coerce_type_map{$rule->{'isa'}})
173 12 56 if (exists $rule->{$key})