| Filename | /home/doy/coding/src/Moose/blib/lib//Moose/Meta/Method.pm |
| Statements | Executed 219 statements in 4.75ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 101 | 2 | 2 | 3.07ms | 3.07ms | Moose::Meta::Method::_inline_throw_error |
| 1 | 1 | 1 | 63µs | 79µs | Moose::Meta::Method::BEGIN@3 |
| 1 | 1 | 1 | 56µs | 311µs | Moose::Meta::Method::BEGIN@12 |
| 1 | 1 | 1 | 53µs | 120µs | Moose::Meta::Method::BEGIN@4 |
| 1 | 1 | 1 | 24µs | 24µ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 | 108µs | 2 | 95µs | # spent 79µs (63+16) within Moose::Meta::Method::BEGIN@3 which was called:
# once (63µs+16µs) by base::import at line 3 # spent 79µs making 1 call to Moose::Meta::Method::BEGIN@3
# spent 16µs making 1 call to strict::import |
| 4 | 3 | 192µs | 2 | 186µs | # spent 120µs (53+66) within Moose::Meta::Method::BEGIN@4 which was called:
# once (53µs+66µs) by base::import at line 4 # spent 120µs making 1 call to Moose::Meta::Method::BEGIN@4
# spent 66µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 4µs | our $VERSION = '1.19'; | ||
| 7 | 1 | 57µs | $VERSION = eval $VERSION; # spent 10µs executing statements in string eval | ||
| 8 | 1 | 4µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 9 | |||||
| 10 | 3 | 132µs | 1 | 24µs | # spent 24µs within Moose::Meta::Method::BEGIN@10 which was called:
# once (24µs+0s) by base::import at line 10 # spent 24µs making 1 call to Moose::Meta::Method::BEGIN@10 |
| 11 | |||||
| 12 | 3 | 634µs | 2 | 311µs | # spent 311µs (56+254) within Moose::Meta::Method::BEGIN@12 which was called:
# once (56µs+254µs) by base::import at line 12 # spent 311µs making 1 call to Moose::Meta::Method::BEGIN@12
# spent 254µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 254µs |
| 13 | |||||
| 14 | 1 | 14µ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 3.07ms within Moose::Meta::Method::_inline_throw_error which was called 101 times, avg 30µs/call:
# 97 times (3.00ms+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 31µs/call
# 4 times (70µ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 | ||||
| 32 | 202 | 3.58ms | my ( $self, $msg, $args ) = @_; | ||
| 33 | "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard | ||||
| 34 | } | ||||
| 35 | |||||
| 36 | 1 | 21µs | 1; | ||
| 37 | |||||
| 38 | __END__ |