Branch Coverage

blib/lib/Smart/Args.pm
Criterion Covered Total %
branch 50 58 86.2


line true false branch
28 46 0 if (@_)
30 8 38 if (exists $is_invocant{$name})
32 2 6 if (defined $_[1])
42 1 44 @DB::args == 1 && ref $DB::args[0] ? :
56 0 59 unless my $name = var_name(1, \$_[$i])
61 52 7 if (defined $_[$i + 1]) { }
68 1 6 unless (exists $args->{$name})
77 4 26 if ($used < keys %{$args;} and warnings::enabled('void'))
81 8 8 unless my $name = var_name(1, \$slot)
100 11 0 if (@_)
102 11 0 if (exists $is_invocant{$name})
104 2 9 if (defined $_[1])
124 0 15 unless my $name = var_name(1, \$_[$i])
128 6 9 if (defined $_[$i + 1]) { }
135 0 9 if (@args == 0)
144 4 6 if (scalar @args > 0)
161 17 45 if (ref $basic_rule eq 'HASH') { }
163 9 8 if (defined $basic_rule->{'isa'}) { }
2 6 elsif (defined $basic_rule->{'does'}) { }
176 56 6 if ($exists) { }
177 52 4 if (defined $type)
178 16 36 unless ($type->check($value))
182 36 6 if defined $used_ref
185 2 4 if (defined $rule and exists $rule->{'default'}) { }
2 2 elsif ($mandatory) { }
190 2 0 if ($VERBOSE) { }
205 4 12 if ($tc->has_coercion)
207 2 2 if $tc->check($value)
210 14 0 if ($VERBOSE) { }