Filename | /usr/local/lib/perl/5.14.2/Class/MOP/Method/Generated.pm |
Statements | Executed 3150 statements in 4.65ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
196 | 7 | 4 | 2.42ms | 58.8ms | _compile_code | Class::MOP::Method::Generated::
196 | 1 | 1 | 1.44ms | 1.57ms | _generate_description | Class::MOP::Method::Generated::
1 | 1 | 1 | 1.10ms | 1.32ms | BEGIN@14 | Class::MOP::Method::Generated::
1 | 1 | 1 | 8µs | 49µs | BEGIN@16 | Class::MOP::Method::Generated::
1 | 1 | 1 | 8µs | 8µs | BEGIN@3 | Class::MOP::Method::Generated::
1 | 1 | 1 | 7µs | 10µs | BEGIN@10 | Class::MOP::Method::Generated::
1 | 1 | 1 | 7µs | 35µs | BEGIN@13 | Class::MOP::Method::Generated::
1 | 1 | 1 | 6µs | 11µs | BEGIN@11 | Class::MOP::Method::Generated::
0 | 0 | 0 | 0s | 0s | _initialize_body | Class::MOP::Method::Generated::
0 | 0 | 0 | 0s | 0s | new | Class::MOP::Method::Generated::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package Class::MOP::Method::Generated; | ||||
3 | # spent 8µs within Class::MOP::Method::Generated::BEGIN@3 which was called:
# once (8µs+0s) by base::import at line 5 | ||||
4 | 1 | 5µs | $Class::MOP::Method::Generated::AUTHORITY = 'cpan:STEVAN'; | ||
5 | 1 | 34µs | 1 | 8µs | } # spent 8µs making 1 call to Class::MOP::Method::Generated::BEGIN@3 |
6 | { | ||||
7 | 2 | 1µs | $Class::MOP::Method::Generated::VERSION = '2.1005'; | ||
8 | } | ||||
9 | |||||
10 | 2 | 22µs | 2 | 13µs | # spent 10µs (7+3) within Class::MOP::Method::Generated::BEGIN@10 which was called:
# once (7µs+3µs) by base::import at line 10 # spent 10µs making 1 call to Class::MOP::Method::Generated::BEGIN@10
# spent 3µs making 1 call to strict::import |
11 | 2 | 22µs | 2 | 16µs | # spent 11µs (6+5) within Class::MOP::Method::Generated::BEGIN@11 which was called:
# once (6µs+5µs) by base::import at line 11 # spent 11µs making 1 call to Class::MOP::Method::Generated::BEGIN@11
# spent 5µs making 1 call to warnings::import |
12 | |||||
13 | 2 | 26µs | 2 | 64µs | # spent 35µs (7+29) within Class::MOP::Method::Generated::BEGIN@13 which was called:
# once (7µs+29µs) by base::import at line 13 # spent 35µs making 1 call to Class::MOP::Method::Generated::BEGIN@13
# spent 29µs making 1 call to Exporter::import |
14 | 2 | 97µs | 2 | 1.34ms | # spent 1.32ms (1.10+212µs) within Class::MOP::Method::Generated::BEGIN@14 which was called:
# once (1.10ms+212µs) by base::import at line 14 # spent 1.32ms making 1 call to Class::MOP::Method::Generated::BEGIN@14
# spent 28µs making 1 call to Exporter::import |
15 | |||||
16 | 2 | 223µs | 2 | 49µs | # spent 49µs (8+42) within Class::MOP::Method::Generated::BEGIN@16 which was called:
# once (8µs+42µs) by base::import at line 16 # spent 49µs making 1 call to Class::MOP::Method::Generated::BEGIN@16
# spent 42µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 42µs |
17 | |||||
18 | ## accessors | ||||
19 | |||||
20 | sub new { | ||||
21 | confess __PACKAGE__ . " is an abstract base class, you must provide a constructor."; | ||||
22 | } | ||||
23 | |||||
24 | sub _initialize_body { | ||||
25 | confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class"; | ||||
26 | } | ||||
27 | |||||
28 | # spent 1.57ms (1.44+128µs) within Class::MOP::Method::Generated::_generate_description which was called 196 times, avg 8µs/call:
# 196 times (1.44ms+128µs) by Class::MOP::Method::Generated::_compile_code at line 63, avg 8µs/call | ||||
29 | 1176 | 1.24ms | my ( $self, $context ) = @_; | ||
30 | 196 | 128µs | $context ||= $self->definition_context; # spent 128µs making 196 calls to Class::MOP::Method::Generated::definition_context, avg 653ns/call | ||
31 | |||||
32 | my $desc = "generated method"; | ||||
33 | my $origin = "unknown origin"; | ||||
34 | |||||
35 | 392 | 154µs | if (defined $context) { | ||
36 | 196 | 69µs | if (defined $context->{description}) { | ||
37 | $desc = $context->{description}; | ||||
38 | } | ||||
39 | |||||
40 | 196 | 275µs | if (defined $context->{file} || defined $context->{line}) { | ||
41 | $origin = "defined at " | ||||
42 | . (defined $context->{file} | ||||
43 | ? $context->{file} : "<unknown file>") | ||||
44 | . " line " | ||||
45 | . (defined $context->{line} | ||||
46 | ? $context->{line} : "<unknown line>"); | ||||
47 | } | ||||
48 | } | ||||
49 | |||||
50 | return "$desc ($origin)"; | ||||
51 | } | ||||
52 | |||||
53 | # spent 58.8ms (2.42+56.4) within Class::MOP::Method::Generated::_compile_code which was called 196 times, avg 300µs/call:
# 64 times (838µs+18.8ms) by Moose::Meta::Method::Accessor::try {...} at line 38 of Moose/Meta/Method/Accessor.pm, avg 307µs/call
# 53 times (590µs+7.14ms) by Class::MOP::Method::Accessor::try {...} at line 142 of Class/MOP/Method/Accessor.pm, avg 146µs/call
# 35 times (494µs+24.6ms) by Class::MOP::Method::Constructor::try {...} at line 110 of Class/MOP/Method/Constructor.pm, avg 718µs/call
# 22 times (252µs+3.07ms) by Class::MOP::Method::Accessor::try {...} at line 112 of Class/MOP/Method/Accessor.pm, avg 151µs/call
# 16 times (175µs+1.97ms) by Class::MOP::Method::Accessor::try {...} at line 204 of Class/MOP/Method/Accessor.pm, avg 134µs/call
# 3 times (40µs+428µs) by Moose::Meta::Method::Destructor::try {...} at line 97 of Moose/Meta/Method/Destructor.pm, avg 156µs/call
# 3 times (33µs+362µs) by Class::MOP::Method::Accessor::try {...} at line 179 of Class/MOP/Method/Accessor.pm, avg 131µs/call | ||||
54 | 1176 | 2.48ms | my ( $self, @args ) = @_; | ||
55 | unshift @args, 'source' if @args % 2; | ||||
56 | my %args = @args; | ||||
57 | |||||
58 | my $context = delete $args{context}; | ||||
59 | 295 | 12.3ms | my $environment = $self->can('_eval_environment') # spent 7.94ms making 35 calls to Class::MOP::Method::Constructor::_eval_environment, avg 227µs/call
# spent 4.16ms making 64 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 65µs/call
# spent 238µs making 196 calls to UNIVERSAL::can, avg 1µs/call | ||
60 | ? $self->_eval_environment | ||||
61 | : {}; | ||||
62 | |||||
63 | 392 | 44.1ms | return eval_closure( # spent 42.5ms making 196 calls to Eval::Closure::eval_closure, avg 217µs/call
# spent 1.57ms making 196 calls to Class::MOP::Method::Generated::_generate_description, avg 8µs/call | ||
64 | environment => $environment, | ||||
65 | description => $self->_generate_description($context), | ||||
66 | %args, | ||||
67 | ); | ||||
68 | } | ||||
69 | |||||
70 | 1 | 2µs | 1; | ||
71 | |||||
72 | # ABSTRACT: Abstract base class for generated methods | ||||
73 | |||||
74 | __END__ |