blib/lib/Moose/Meta/Object/Trait.pm

filter: Statementstmt 100% 13 / 13 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 25 / 25 CC 4 SCAR 8.5
CC
4
Cov
100%
_get_compatible_metaclass_by_role_reconciliation
3.0
:around
2.0
BEGIN
1.0
CRAP 2.3
« blib/lib/Class/MOP/Object.pm ↑ Summary blib/lib/Moose/Meta/Method/Accessor.pm »
1 package Moose::Meta::Object::Trait;
2 400 our $VERSION = '2.4001';
3  
4 400 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 221 ▶sub _get_compatible_metaclass {
Subroutine :around: called CC=2 SCAR=6.9
7 221 my $orig = shift;
8 221 my $self = shift;
9 221 ▶ return $self->$orig(@_)
Condition100%3/3
$self->$orig(@_) || $self->_get_compatible_metaclass_by_role_reconciliation(@_)
l!l&&r!l&&!r
158612
MC/DC100%2/2
$self->$orig(@_) || $self->_get_compatible_metaclass_by_role_reconciliation(@_)
$self->$orig(@_) $self->_get_compatible_metaclass_by_role_reconciliation(@_)
Truth table100%3/3
A || B
A= $self->$orig(@_)B= $self->_get_compatible_metaclass_by_role_reconciliation(@_)
ABresult
1X1
011
000
10 || $self->_get_compatible_metaclass_by_role_reconciliation(@_);
11 }
12  
13 63 ▶sub _get_compatible_metaclass_by_role_reconciliation {
Subroutine _get_compatible_metaclass_by_role_reconciliation: called CC=3 SCAR=11.0
14 63 my $self = shift;
15 63 my ($other_name) = @_;
16 63 ▶ my $meta_name = blessed($self) ? $self->_real_ref_name : $self;
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($self) ? : 50 13 63
17  
18 63 ▶ return unless Moose::Util::_classes_differ_by_roles_only(
Branch: 1 branch
BranchTrueFalseTotal
unless Moose::Util::_classes_differ_by_roles_only($meta_name, $other_name) 2 61 63
19 $meta_name, $other_name
20 );
21  
22 61 return Moose::Util::_reconcile_roles_for_metaclass(
23 $meta_name, $other_name
24 );
25 }
26  
27 400 1;
28  
29 # ABSTRACT: Some overrides for L<Class::MOP::Object> functionality
30  
31 __END__
« blib/lib/Class/MOP/Object.pm ↑ Summary blib/lib/Moose/Meta/Method/Accessor.pm »