Branch Coverage

blib/lib/Model/Envoy.pm
Criterion Covered Total %
branch 53 66 80.3


line true false branch
288 2 147 $namespace =~ /$abs_module_prefix/ ? :
295 2 63 if (not ref $self) { }
306 0 3 if (not ref $self) { }
317 12 0 if (my $storage = $self->get_storage($package))
328 9 0 if (my $storage = $self->get_storage($package))
339 1 34 if (not ref $params) { }
6 28 elsif (ref $params eq 'HASH') { }
0 28 elsif (ref $params eq 'ARRAY') { }
0 28 elsif (&blessed($params) and $params->isa($class)) { }
28 0 elsif (my $model = $class->_dispatch('build', $params, $no_rel)) { }
341 1 0 unless defined $params
377 24 6 if (exists $hashref->{$name})
410 68 24 unless ref $value
412 12 12 if ref $value eq 'ARRAY'
414 0 12 if ref $value eq 'HASH'
416 7 5 if $value->can('does') and $value->does('Model::Envoy')
418 4 1 if (my $method = &first(sub { $value->can($_); } , 'stringify', 'to_string', 'as_string', 'to_str'))
435 47 9 unless ref $self
438 6 12 unless $self->_storage->{$store}
453 3 44 if $result
459 33 0 if (&blessed($result) and $result->can('does') and $result->does('Model::Envoy'))
476 52 28 unless $self->_storage->{$store}{$package}
487 24 109 unless ($conf->{'_configured'})
511 0 64 unless $options->{'traits'}
0 64 unless grep {$_ eq 'Model::Envoy::Meta::Attribute::Trait::Envoy';} @{[] unless $options->{'traits'};}
513 64 0 unless (find_type_constraint('Array_of_Hashref'))
518 12 52 unless (find_type_constraint('Array_of_Object'))
523 9 55 if ($options->{'isa'} =~ / ArrayRef \[ (.+?) \]/x) { }
31 24 elsif ($options->{'isa'} =~ / Maybe \[ (.+?) \]/x) { }
0 24 elsif (not find_type_constraint($options->{'isa'})) { }
538 38 2 unless $options->{'moose_class'} and &any(sub { $options->{'moose_class'} eq $_; } , 'HashRef', 'ArrayRef')
548 7 2 unless (find_type_constraint("Array_of_$type"))
568 17 14 unless (find_type_constraint("Maybe_$type"))