| Filename | /home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method.pm |
| Statements | Executed 187 statements in 3.13ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 85 | 7 | 5 | 1.49ms | 1.49ms | Moose::Meta::Method::_inline_throw_error |
| 1 | 1 | 1 | 71µs | 89µs | Moose::Meta::Method::BEGIN@3 |
| 1 | 1 | 1 | 51µs | 119µs | Moose::Meta::Method::BEGIN@4 |
| 1 | 1 | 1 | 46µs | 344µs | Moose::Meta::Method::BEGIN@12 |
| 1 | 1 | 1 | 26µs | 26µs | Moose::Meta::Method::BEGIN@10 |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::_error_thrower |
| 0 | 0 | 0 | 0s | 0s | Moose::Meta::Method::throw_error |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Moose::Meta::Method; | ||||
| 2 | |||||
| 3 | 3 | 99µs | 2 | 107µs | # spent 89µs (71+18) within Moose::Meta::Method::BEGIN@3 which was called:
# once (71µs+18µs) by base::import at line 3 # spent 89µs making 1 call to Moose::Meta::Method::BEGIN@3
# spent 18µs making 1 call to strict::import |
| 4 | 3 | 212µs | 2 | 186µs | # spent 119µs (51+68) within Moose::Meta::Method::BEGIN@4 which was called:
# once (51µs+68µs) by base::import at line 4 # spent 119µs making 1 call to Moose::Meta::Method::BEGIN@4
# spent 68µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 4µs | our $VERSION = '1.19'; | ||
| 7 | 1 | 78µs | $VERSION = eval $VERSION; # spent 10µs executing statements in string eval | ||
| 8 | 1 | 4µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 9 | |||||
| 10 | 3 | 118µs | 1 | 26µs | # spent 26µs within Moose::Meta::Method::BEGIN@10 which was called:
# once (26µs+0s) by base::import at line 10 # spent 26µs making 1 call to Moose::Meta::Method::BEGIN@10 |
| 11 | |||||
| 12 | 3 | 635µs | 2 | 344µs | # spent 344µs (46+298) within Moose::Meta::Method::BEGIN@12 which was called:
# once (46µs+298µs) by base::import at line 12 # spent 344µs making 1 call to Moose::Meta::Method::BEGIN@12
# spent 298µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 298µs |
| 13 | |||||
| 14 | 1 | 13µs | 1 | 10.6ms | Class::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait'); # spent 10.6ms making 1 call to Class::MOP::MiniTrait::apply |
| 15 | |||||
| 16 | sub _error_thrower { | ||||
| 17 | my $self = shift; | ||||
| 18 | ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class"; | ||||
| 19 | } | ||||
| 20 | |||||
| 21 | sub throw_error { | ||||
| 22 | my $self = shift; | ||||
| 23 | my $inv = $self->_error_thrower; | ||||
| 24 | unshift @_, "message" if @_ % 2 == 1; | ||||
| 25 | unshift @_, method => $self if ref $self; | ||||
| 26 | unshift @_, $inv; | ||||
| 27 | my $handler = $inv->can("throw_error"); | ||||
| 28 | goto $handler; # to avoid incrementing depth by 1 | ||||
| 29 | } | ||||
| 30 | |||||
| 31 | # spent 1.49ms within Moose::Meta::Method::_inline_throw_error which was called 85 times, avg 18µs/call:
# 62 times (1.11ms+0s) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:152] at line 140 of Class/MOP/Method/Accessor.pm, avg 18µs/call
# 9 times (153µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 79 of Moose/Meta/Method/Accessor/Native.pm, avg 17µs/call
# 5 times (86µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 64 of Moose/Meta/Method/Accessor/Native.pm, avg 17µs/call
# 3 times (62µs+0s) by Moose::Meta::Method::Accessor::Native::Collection::_inline_check_member_constraint at line 105 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 20µs/call
# 2 times (30µs+0s) by Class::MOP::Class:::around at line 38 of Moose/Meta/Method/Accessor/Native/Hash/set.pm, avg 15µs/call
# 2 times (27µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::_inline_check_var_is_valid_key at line 17 of Moose/Meta/Method/Accessor/Native/Hash.pm, avg 14µs/call
# 2 times (26µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::set::_inline_check_arguments at line 60 of Moose/Meta/Method/Accessor/Native/Hash/set.pm, avg 13µs/call | ||||
| 32 | 170 | 1.95ms | my ( $self, $msg, $args ) = @_; | ||
| 33 | "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | 1 | 20µs | 1; | ||
| 37 | |||||
| 38 | __END__ |