| Filename | /Users/ap13/perl5/lib/perl5/darwin-2level/Class/MOP/Method/Generated.pm |
| Statements | Executed 5078 statements in 9.80ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 362 | 7 | 4 | 5.70ms | 166ms | Class::MOP::Method::Generated::_compile_code |
| 362 | 1 | 1 | 3.31ms | 3.60ms | Class::MOP::Method::Generated::_generate_description |
| 1 | 1 | 1 | 1.18ms | 6.23ms | Class::MOP::Method::Generated::BEGIN@7 |
| 1 | 1 | 1 | 18µs | 37µs | Class::MOP::Method::Generated::BEGIN@4 |
| 1 | 1 | 1 | 15µs | 62µs | Class::MOP::Method::Generated::BEGIN@9 |
| 1 | 1 | 1 | 11µs | 17µs | Class::MOP::Method::Generated::BEGIN@5 |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::_initialize_body |
| 0 | 0 | 0 | 0s | 0s | Class::MOP::Method::Generated::new |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Class::MOP::Method::Generated; | ||||
| 2 | 1 | 1µs | our $VERSION = '2.1403'; | ||
| 3 | |||||
| 4 | 2 | 35µs | 2 | 56µs | # spent 37µs (18+19) within Class::MOP::Method::Generated::BEGIN@4 which was called:
# once (18µs+19µs) by parent::import at line 4 # spent 37µs making 1 call to Class::MOP::Method::Generated::BEGIN@4
# spent 19µs making 1 call to strict::import |
| 5 | 2 | 40µs | 2 | 23µs | # spent 17µs (11+6) within Class::MOP::Method::Generated::BEGIN@5 which was called:
# once (11µs+6µs) by parent::import at line 5 # spent 17µs making 1 call to Class::MOP::Method::Generated::BEGIN@5
# spent 6µs making 1 call to warnings::import |
| 6 | |||||
| 7 | 2 | 188µs | 2 | 6.55ms | # spent 6.23ms (1.18+5.05) within Class::MOP::Method::Generated::BEGIN@7 which was called:
# once (1.18ms+5.05ms) by parent::import at line 7 # spent 6.23ms making 1 call to Class::MOP::Method::Generated::BEGIN@7
# spent 320µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:337] |
| 8 | |||||
| 9 | 2 | 429µs | 2 | 62µs | # spent 62µs (15+47) within Class::MOP::Method::Generated::BEGIN@9 which was called:
# once (15µs+47µs) by parent::import at line 9 # spent 62µs making 1 call to Class::MOP::Method::Generated::BEGIN@9
# spent 47µs making 1 call to parent::import, recursion: max depth 1, sum of overlapping time 47µs |
| 10 | |||||
| 11 | ## accessors | ||||
| 12 | |||||
| 13 | sub new { | ||||
| 14 | $_[0]->_throw_exception( CannotCallAnAbstractBaseMethod => package_name => __PACKAGE__ ); | ||||
| 15 | } | ||||
| 16 | |||||
| 17 | sub _initialize_body { | ||||
| 18 | $_[0]->_throw_exception( NoBodyToInitializeInAnAbstractBaseClass => package_name => __PACKAGE__ ); | ||||
| 19 | } | ||||
| 20 | |||||
| 21 | # spent 3.60ms (3.31+290µs) within Class::MOP::Method::Generated::_generate_description which was called 362 times, avg 10µs/call:
# 362 times (3.31ms+290µs) by Class::MOP::Method::Generated::_compile_code at line 56, avg 10µs/call | ||||
| 22 | 362 | 195µs | my ( $self, $context ) = @_; | ||
| 23 | 362 | 1.11ms | 362 | 290µs | $context ||= $self->definition_context; # spent 290µs making 362 calls to Class::MOP::Method::Generated::definition_context, avg 802ns/call |
| 24 | |||||
| 25 | 362 | 111µs | my $desc = "generated method"; | ||
| 26 | 362 | 57µs | my $origin = "unknown origin"; | ||
| 27 | |||||
| 28 | 362 | 125µs | if (defined $context) { | ||
| 29 | 362 | 213µs | if (defined $context->{description}) { | ||
| 30 | $desc = $context->{description}; | ||||
| 31 | } | ||||
| 32 | |||||
| 33 | 362 | 794µs | if (defined $context->{file} || defined $context->{line}) { | ||
| 34 | $origin = "defined at " | ||||
| 35 | . (defined $context->{file} | ||||
| 36 | ? $context->{file} : "<unknown file>") | ||||
| 37 | . " line " | ||||
| 38 | . (defined $context->{line} | ||||
| 39 | ? $context->{line} : "<unknown line>"); | ||||
| 40 | } | ||||
| 41 | } | ||||
| 42 | |||||
| 43 | 362 | 967µs | return "$desc ($origin)"; | ||
| 44 | } | ||||
| 45 | |||||
| 46 | # spent 166ms (5.70+161) within Class::MOP::Method::Generated::_compile_code which was called 362 times, avg 459µs/call:
# 207 times (3.22ms+79.2ms) by Moose::Meta::Method::Accessor::try {...} at line 34 of Moose/Meta/Method/Accessor.pm, avg 398µs/call
# 54 times (699µs+9.34ms) by Class::MOP::Method::Accessor::try {...} at line 151 of Class/MOP/Method/Accessor.pm, avg 186µs/call
# 46 times (989µs+63.4ms) by Class::MOP::Method::Constructor::try {...} at line 107 of Class/MOP/Method/Constructor.pm, avg 1.40ms/call
# 21 times (306µs+3.63ms) by Class::MOP::Method::Accessor::try {...} at line 113 of Class/MOP/Method/Accessor.pm, avg 187µs/call
# 16 times (264µs+2.69ms) by Moose::Meta::Method::Destructor::try {...} at line 92 of Moose/Meta/Method/Destructor.pm, avg 185µs/call
# 15 times (184µs+1.87ms) by Class::MOP::Method::Accessor::try {...} at line 219 of Class/MOP/Method/Accessor.pm, avg 137µs/call
# 3 times (36µs+415µs) by Class::MOP::Method::Accessor::try {...} at line 191 of Class/MOP/Method/Accessor.pm, avg 150µs/call | ||||
| 47 | 362 | 279µs | my ( $self, @args ) = @_; | ||
| 48 | 362 | 428µs | unshift @args, 'source' if @args % 2; | ||
| 49 | 362 | 326µs | my %args = @args; | ||
| 50 | |||||
| 51 | 362 | 190µs | my $context = delete $args{context}; | ||
| 52 | 362 | 1.73ms | 615 | 40.4ms | my $environment = $self->can('_eval_environment') # spent 21.5ms making 46 calls to Class::MOP::Method::Constructor::_eval_environment, avg 467µs/call
# spent 18.4ms making 207 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 89µs/call
# spent 439µs making 362 calls to UNIVERSAL::can, avg 1µs/call |
| 53 | ? $self->_eval_environment | ||||
| 54 | : {}; | ||||
| 55 | |||||
| 56 | 362 | 2.57ms | 724 | 120ms | return eval_closure( # spent 117ms making 362 calls to Eval::Closure::eval_closure, avg 322µs/call
# spent 3.60ms making 362 calls to Class::MOP::Method::Generated::_generate_description, avg 10µs/call |
| 57 | environment => $environment, | ||||
| 58 | description => $self->_generate_description($context), | ||||
| 59 | %args, | ||||
| 60 | ); | ||||
| 61 | } | ||||
| 62 | |||||
| 63 | 1 | 5µs | 1; | ||
| 64 | |||||
| 65 | # ABSTRACT: Abstract base class for generated methods | ||||
| 66 | |||||
| 67 | __END__ |