| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method.pm |
| Statements | Executed 715 statements in 8.66ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 349 | 9 | 3 | 6.11ms | 6.11ms | Moose::Meta::Method::_inline_throw_error |
| 1 | 1 | 1 | 71µs | 88µs | Moose::Meta::Method::BEGIN@3 |
| 1 | 1 | 1 | 50µs | 324µs | Moose::Meta::Method::BEGIN@12 |
| 1 | 1 | 1 | 37µs | 103µ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 | 97µs | 2 | 106µs | # spent 88µs (71+18) within Moose::Meta::Method::BEGIN@3 which was called:
# once (71µs+18µs) by base::import at line 3 # spent 88µs making 1 call to Moose::Meta::Method::BEGIN@3
# spent 18µs making 1 call to strict::import |
| 4 | 3 | 193µs | 2 | 169µs | # spent 103µs (37+66) within Moose::Meta::Method::BEGIN@4 which was called:
# once (37µs+66µs) by base::import at line 4 # spent 103µs making 1 call to Moose::Meta::Method::BEGIN@4
# spent 66µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 5µs | our $VERSION = '1.19'; | ||
| 7 | 1 | 57µs | $VERSION = eval $VERSION; # spent 10µs executing statements in string eval | ||
| 8 | 1 | 3µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 9 | |||||
| 10 | 3 | 104µ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 | 607µs | 2 | 324µs | # spent 324µs (50+274) within Moose::Meta::Method::BEGIN@12 which was called:
# once (50µs+274µs) by base::import at line 12 # spent 324µs making 1 call to Moose::Meta::Method::BEGIN@12
# spent 274µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 274µs |
| 13 | |||||
| 14 | 1 | 14µs | 1 | 12.3ms | Class::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait'); # spent 12.3ms 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 6.11ms within Moose::Meta::Method::_inline_throw_error which was called 349 times, avg 18µs/call:
# 129 times (1.98ms+0s) by Moose::Meta::Method::Constructor::_generate_type_constraint_check at line 342 of Moose/Meta/Method/Constructor.pm, avg 15µs/call
# 97 times (1.97ms+0s) by Moose::Meta::Method::Accessor::_generate_reader_method_inline at line 97 of Moose/Meta/Method/Accessor.pm, avg 20µs/call
# 48 times (886µs+0s) by Moose::Meta::Method::Accessor::_inline_check_constraint at line 163 of Moose/Meta/Method/Accessor.pm, avg 18µs/call
# 26 times (391µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 228 of Moose/Meta/Method/Constructor.pm, avg 15µs/call
# 24 times (461µs+0s) by Moose::Meta::Method::Constructor::_generate_BUILDARGS at line 148 of Moose/Meta/Method/Constructor.pm, avg 19µs/call
# 15 times (258µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 198 of Moose/Meta/Method/Accessor.pm, avg 17µs/call
# 4 times (71µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 88 of Moose/Meta/Method/Accessor/Native.pm, avg 18µs/call
# 4 times (60µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 217 of Moose/Meta/Method/Accessor.pm, avg 15µs/call
# 2 times (35µs+0s) by Moose::Meta::Method::Accessor::_inline_check_required at line 183 of Moose/Meta/Method/Accessor.pm, avg 18µs/call | ||||
| 32 | 698 | 7.56ms | 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__ |