| 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 535 statements in 6.80ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 259 | 12 | 6 | 4.62ms | 4.62ms | Moose::Meta::Method::_inline_throw_error |
| 1 | 1 | 1 | 71µs | 90µs | Moose::Meta::Method::BEGIN@3 |
| 1 | 1 | 1 | 71µs | 136µs | Moose::Meta::Method::BEGIN@4 |
| 1 | 1 | 1 | 38µs | 288µs | Moose::Meta::Method::BEGIN@12 |
| 1 | 1 | 1 | 27µs | 27µ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 | 108µs | # spent 90µs (71+18) within Moose::Meta::Method::BEGIN@3 which was called:
# once (71µs+18µs) by base::import at line 3 # spent 90µs making 1 call to Moose::Meta::Method::BEGIN@3
# spent 18µs making 1 call to strict::import |
| 4 | 3 | 217µs | 2 | 201µs | # spent 136µs (71+65) within Moose::Meta::Method::BEGIN@4 which was called:
# once (71µs+65µs) by base::import at line 4 # spent 136µs making 1 call to Moose::Meta::Method::BEGIN@4
# spent 65µs making 1 call to warnings::import |
| 5 | |||||
| 6 | 1 | 5µs | our $VERSION = '1.19'; | ||
| 7 | 1 | 57µs | $VERSION = eval $VERSION; # spent 11µs executing statements in string eval | ||
| 8 | 1 | 4µs | our $AUTHORITY = 'cpan:STEVAN'; | ||
| 9 | |||||
| 10 | 3 | 95µs | 1 | 27µs | # spent 27µs within Moose::Meta::Method::BEGIN@10 which was called:
# once (27µs+0s) by base::import at line 10 # spent 27µs making 1 call to Moose::Meta::Method::BEGIN@10 |
| 11 | |||||
| 12 | 3 | 621µs | 2 | 288µs | # spent 288µs (38+250) within Moose::Meta::Method::BEGIN@12 which was called:
# once (38µs+250µs) by base::import at line 12 # spent 288µs making 1 call to Moose::Meta::Method::BEGIN@12
# spent 250µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 250µs |
| 13 | |||||
| 14 | 1 | 13µs | 1 | 12.1ms | Class::MOP::MiniTrait::apply(__PACKAGE__, 'Moose::Meta::Object::Trait'); # spent 12.1ms 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 4.62ms within Moose::Meta::Method::_inline_throw_error which was called 259 times, avg 18µs/call:
# 65 times (1.25ms+0s) by Moose::Meta::Method::Accessor::_generate_reader_method_inline at line 97 of Moose/Meta/Method/Accessor.pm, avg 19µs/call
# 64 times (1.01ms+0s) by Moose::Meta::Method::Constructor::_generate_type_constraint_check at line 342 of Moose/Meta/Method/Constructor.pm, avg 16µs/call
# 42 times (823µs+0s) by Moose::Meta::Method::Constructor::_generate_BUILDARGS at line 148 of Moose/Meta/Method/Constructor.pm, avg 20µs/call
# 28 times (511µs+0s) by Moose::Meta::Method::Accessor::_inline_check_constraint at line 163 of Moose/Meta/Method/Accessor.pm, avg 18µs/call
# 28 times (475µs+0s) by Moose::Meta::Method::Constructor::_generate_slot_initializer at line 228 of Moose/Meta/Method/Constructor.pm, avg 17µs/call
# 9 times (168µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 88 of Moose/Meta/Method/Accessor/Native.pm, avg 19µs/call
# 9 times (144µs+0s) by Moose::Meta::Method::Accessor::_inline_check_lazy at line 198 of Moose/Meta/Method/Accessor.pm, avg 16µs/call
# 5 times (91µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 74 of Moose/Meta/Method/Accessor/Native.pm, avg 18µs/call
# 3 times (59µs+0s) by Moose::Meta::Method::Accessor::Native::Collection::_inline_check_member_constraint at line 108 of Moose/Meta/Method/Accessor/Native/Collection.pm, avg 20µs/call
# 2 times (28µs+0s) by Class::MOP::Class:::around at line 37 of Moose/Meta/Method/Accessor/Native/Hash/set.pm, avg 14µs/call
# 2 times (27µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::_inline_check_var_is_valid_key at line 15 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 54 of Moose/Meta/Method/Accessor/Native/Hash/set.pm, avg 13µs/call | ||||
| 32 | 259 | 1.18ms | my ( $self, $msg, $args ) = @_; | ||
| 33 | 259 | 4.49ms | "\$meta->throw_error($msg" . ($args ? ", $args" : "") . ")"; # FIXME makes deparsing *REALLY* hard | ||
| 34 | } | ||||
| 35 | |||||
| 36 | 1 | 21µs | 1; | ||
| 37 | |||||
| 38 | __END__ |