Filename | /Users/ap13/perl5/lib/perl5/darwin-2level/Moose/Meta/Object/Trait.pm |
Statements | Executed 4 statements in 213µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 21µs | 59µs | BEGIN@4 | Moose::Meta::Object::Trait::
0 | 0 | 0 | 0s | 0s | _get_compatible_metaclass | Moose::Meta::Object::Trait::
0 | 0 | 0 | 0s | 0s | _get_compatible_metaclass_by_role_reconciliation | Moose::Meta::Object::Trait::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Moose::Meta::Object::Trait; | ||||
2 | 1 | 1µs | our $VERSION = '2.1403'; | ||
3 | |||||
4 | 2 | 207µs | 2 | 98µs | # spent 59µs (21+38) within Moose::Meta::Object::Trait::BEGIN@4 which was called:
# once (21µs+38µs) by Module::Runtime::require_module at line 4 # spent 59µs making 1 call to Moose::Meta::Object::Trait::BEGIN@4
# spent 38µs making 1 call to Exporter::import |
5 | |||||
6 | sub _get_compatible_metaclass { | ||||
7 | my $orig = shift; | ||||
8 | my $self = shift; | ||||
9 | return $self->$orig(@_) | ||||
10 | || $self->_get_compatible_metaclass_by_role_reconciliation(@_); | ||||
11 | } | ||||
12 | |||||
13 | sub _get_compatible_metaclass_by_role_reconciliation { | ||||
14 | my $self = shift; | ||||
15 | my ($other_name) = @_; | ||||
16 | my $meta_name = blessed($self) ? $self->_real_ref_name : $self; | ||||
17 | |||||
18 | return unless Moose::Util::_classes_differ_by_roles_only( | ||||
19 | $meta_name, $other_name | ||||
20 | ); | ||||
21 | |||||
22 | return Moose::Util::_reconcile_roles_for_metaclass( | ||||
23 | $meta_name, $other_name | ||||
24 | ); | ||||
25 | } | ||||
26 | |||||
27 | 1 | 5µs | 1; | ||
28 | |||||
29 | # ABSTRACT: Some overrides for L<Class::MOP::Object> functionality | ||||
30 | |||||
31 | __END__ |