Branch Coverage

blib/lib/Smart/Args.pm
Criterion Covered Total %
branch 46 52 88.4


line true false branch
25 44 0 if (@_)
27 8 36 if (exists $is_invocant{$name})
29 2 6 if (defined $_[1])
39 1 42 @DB::args == 1 && ref $DB::args[0] ? :
53 0 57 unless my $name = var_name(1, \$_[$i])
58 50 7 if (defined $_[$i + 1]) { }
65 1 6 unless (exists $$args{$name})
74 4 25 if ($used < keys %{$args;} and warnings::enabled('void'))
78 8 8 unless my $name = var_name(1, \$slot)
97 11 0 if (@_)
99 11 0 if (exists $is_invocant{$name})
101 2 9 if (defined $_[1])
121 0 15 unless my $name = var_name(1, \$_[$i])
125 6 9 if (defined $_[$i + 1]) { }
132 0 9 if (@args == 0)
141 4 6 if (scalar @args > 0)
158 15 45 if (ref $basic_rule eq 'HASH') { }
160 9 6 if (defined $$basic_rule{'isa'})
171 54 6 if ($exists) { }
172 50 4 if (defined $type)
173 15 35 unless ($type->check($value))
177 35 6 if defined $used_ref
180 2 4 if (defined $rule and exists $$rule{'default'}) { }
2 2 elsif ($mandatory) { }
196 4 11 if ($tc->has_coercion)
198 2 2 if $tc->check($value)