Branch Coverage

blib/lib/Simple/Accessor.pm
Criterion Covered Total %
branch 67 70 95.7


line true false branch
172 12 71 unless defined $INFO
173 80 3 unless defined $INFO->{$from}
188 0 83 unless $class
189 3 80 if $class->can("with")
197 25 6 unless $INFO->{$class}{'with'}
201 2 30 unless $module =~ /\A[A-Za-z_]\w*(?:::\w+)*\z/
203 8 22 unless ($INFO->{$module} and $INFO->{$module}{'attributes'})
204 2 6 unless eval "require $module; 1"
207 2 26 unless $INFO->{$module} and $INFO->{$module}{'attributes'}
229 0 83 unless $class
230 3 80 if $class->can("new")
240 2 77 if ($self->can("_before_build"))
247 72 96 if exists $opts{$attr}
251 7 71 if ($self->can("_strict_constructor") and $self->_strict_constructor)
254 4 3 if (@unknown)
261 13 128 if ($self->can($init))
262 4 9 unless $self->$init(%opts)
267 3 67 if ($self->can("_after_build"))
279 0 115 unless my $class = $opts{'to'}
281 2 113 unless @attributes
288 4 137 if ($class->can($att))
290 3 1 if $from_role
296 29 108 if ($from_role)
305 119 110 if (@_ > 1) { }
36 74 elsif (not exists $self->{$att}) { }
311 112 348 if ($_ eq "set")
315 2 346 if ($_ eq "after" and $is_reentrant)
319 40 306 if ($self->can($sub)) { }
42 264 elsif ($from_role) { }
320 3 36 unless $self->$sub($v)
322 18 24 if (my $code = $from_role->can($sub))
323 4 14 unless &$code($self, $v)
333 10 41 if ($self->can($sub)) { }
14 27 elsif ($from_role) { }
336 12 2 if (my $code = $from_role->can($sub))