Branch Coverage

blib/lib/Class/Accessor/Typed.pm
Criterion Covered Total %
branch 42 56 75.0


line true false branch
28 0 6 if (exists $args{'type'})
34 8 22 if (defined $args{$key})
35 0 8 unless ref $args{$key} eq "HASH"
39 6 11 ref $args{$key}{$n} eq 'HASH' ? :
42 17 0 if (defined $rule->{'isa'}) { }
0 0 elsif (defined $rule->{'does'}) { }
48 8 9 $key eq 'rw_lazy' || $key eq 'ro_lazy' ? :
56 1 5 if exists $args{'new'} and not $args{'new'}
132 0 16 @_ == 1 && ref $_[0] eq 'HASH' ? :
136 27 47 unless (exists $args{$n})
137 24 3 if $rules{$n}{'lazy'}
139 1 2 if ($rules{$n}{'default'}) { }
1 1 elsif ($rules{$n}{'optional'}) { }
150 1 11 if (keys %args > keys %rules)
162 11 4 if @_ == 1
163 4 0 if @_ == 2
171 2 1 if @_ == 1
181 1 1 if @_ == 2
191 9 2 if (@_ == 1) { }
2 0 elsif (@_ == 2) { }
192 5 4 if exists $_[0]{$n}
204 8 0 if (@_ == 1)
205 4 4 if exists $_[0]{$n}
218 0 63 unless defined $type
219 55 8 if $type->check($value)
221 0 8 if ($type->has_coercion)
223 0 0 if $type->check($value)
232 11 0 if ($VERBOSE) { }