| File | /usr/local/lib/perl/5.10.0/Moose/Meta/Object/Trait.pm |
| Statements Executed | 7 |
| Total Time | 0.0002517 seconds |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Object::Trait::BEGIN |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Object::Trait::_get_compatible_metaclass |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Object::Trait::_get_compatible_metaclass_by_role_reconciliation |
| Line | Stmts. | Exclusive Time | Avg. | Code |
|---|---|---|---|---|
| 1 | ||||
| 2 | package Moose::Meta::Object::Trait; | |||
| 3 | ||||
| 4 | 3 | 213µs | 71µs | use Scalar::Util qw(blessed); # spent 58µs making 1 call to Exporter::import |
| 5 | ||||
| 6 | 1 | 700ns | 700ns | our $VERSION = '1.15'; |
| 7 | 1 | 29µs | 29µs | $VERSION = eval $VERSION; |
| 8 | 1 | 600ns | 600ns | our $AUTHORITY = 'cpan:STEVAN'; |
| 9 | ||||
| 10 | sub _get_compatible_metaclass { | |||
| 11 | my $orig = shift; | |||
| 12 | my $self = shift; | |||
| 13 | return $self->$orig(@_) | |||
| 14 | || $self->_get_compatible_metaclass_by_role_reconciliation(@_); | |||
| 15 | } | |||
| 16 | ||||
| 17 | sub _get_compatible_metaclass_by_role_reconciliation { | |||
| 18 | my $self = shift; | |||
| 19 | my ($other_name) = @_; | |||
| 20 | my $meta_name = blessed($self) ? $self->_real_ref_name : $self; | |||
| 21 | ||||
| 22 | return unless Moose::Util::_classes_differ_by_roles_only( | |||
| 23 | $meta_name, $other_name | |||
| 24 | ); | |||
| 25 | ||||
| 26 | return Moose::Util::_reconcile_roles_for_metaclass( | |||
| 27 | $meta_name, $other_name | |||
| 28 | ); | |||
| 29 | } | |||
| 30 | ||||
| 31 | 1 | 9µs | 9µs | 1; |
| 32 | ||||
| 33 | __END__ | |||
| 34 | ||||
| 35 | =pod | |||
| 36 | ||||
| 37 | =head1 NAME | |||
| 38 | ||||
| 39 | Moose::Meta::Object::Trait - Some overrides for L<Class::MOP::Object> functionality | |||
| 40 | ||||
| 41 | =head1 DESCRIPTION | |||
| 42 | ||||
| 43 | This module is entirely private, you shouldn't ever need to interact with | |||
| 44 | it directly. | |||
| 45 | ||||
| 46 | =head1 BUGS | |||
| 47 | ||||
| 48 | See L<Moose/BUGS> for details on reporting bugs. | |||
| 49 | ||||
| 50 | =head1 AUTHOR | |||
| 51 | ||||
| 52 | Jesse Luehrs E<lt>doy at tozt dot netE<gt> | |||
| 53 | ||||
| 54 | =head1 COPYRIGHT AND LICENSE | |||
| 55 | ||||
| 56 | Copyright 2010 by Infinity Interactive, Inc. | |||
| 57 | ||||
| 58 | L<http://www.iinteractive.com> | |||
| 59 | ||||
| 60 | This library is free software; you can redistribute it and/or modify | |||
| 61 | it under the same terms as Perl itself. | |||
| 62 | ||||
| 63 | =cut |