Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Method/Generated.pm |
Statements | Executed 1881 statements in 3.83ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
133 | 6 | 3 | 1.77ms | 36.7ms | _compile_code | Class::MOP::Method::Generated::
133 | 1 | 1 | 1.26ms | 1.36ms | _generate_description | Class::MOP::Method::Generated::
1 | 1 | 1 | 799µs | 4.02ms | BEGIN@14 | Class::MOP::Method::Generated::
1 | 1 | 1 | 11µs | 101µ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 | 9µs | BEGIN@10 | Class::MOP::Method::Generated::
1 | 1 | 1 | 7µs | 14µs | BEGIN@11 | Class::MOP::Method::Generated::
1 | 1 | 1 | 6µs | 24µs | BEGIN@13 | 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 | 4µs | $Class::MOP::Method::Generated::AUTHORITY = 'cpan:STEVAN'; | ||
5 | 1 | 24µ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.0602'; | ||
8 | } | ||||
9 | |||||
10 | 3 | 16µs | 2 | 11µs | # spent 9µs (7+2) within Class::MOP::Method::Generated::BEGIN@10 which was called:
# once (7µs+2µs) by base::import at line 10 # spent 9µs making 1 call to Class::MOP::Method::Generated::BEGIN@10
# spent 2µs making 1 call to strict::import |
11 | 3 | 17µs | 2 | 22µs | # spent 14µs (7+8) within Class::MOP::Method::Generated::BEGIN@11 which was called:
# once (7µs+8µs) by base::import at line 11 # spent 14µs making 1 call to Class::MOP::Method::Generated::BEGIN@11
# spent 8µs making 1 call to warnings::import |
12 | |||||
13 | 3 | 16µs | 2 | 42µs | # spent 24µs (6+18) within Class::MOP::Method::Generated::BEGIN@13 which was called:
# once (6µs+18µs) by base::import at line 13 # spent 24µs making 1 call to Class::MOP::Method::Generated::BEGIN@13
# spent 18µs making 1 call to Exporter::import |
14 | 3 | 102µs | 2 | 4.24ms | # spent 4.02ms (799µs+3.22) within Class::MOP::Method::Generated::BEGIN@14 which was called:
# once (799µs+3.22ms) by base::import at line 14 # spent 4.02ms making 1 call to Class::MOP::Method::Generated::BEGIN@14
# spent 222µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] |
15 | |||||
16 | 3 | 231µs | 2 | 101µs | # spent 101µs (11+89) within Class::MOP::Method::Generated::BEGIN@16 which was called:
# once (11µs+89µs) by base::import at line 16 # spent 101µs making 1 call to Class::MOP::Method::Generated::BEGIN@16
# spent 90µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 90µ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.36ms (1.26+95µs) within Class::MOP::Method::Generated::_generate_description which was called 133 times, avg 10µs/call:
# 133 times (1.26ms+95µs) by Class::MOP::Method::Generated::_compile_code at line 63, avg 10µs/call | ||||
29 | 798 | 1.04ms | my ( $self, $context ) = @_; | ||
30 | 133 | 95µs | $context ||= $self->definition_context; # spent 95µs making 133 calls to Class::MOP::Method::Generated::definition_context, avg 714ns/call | ||
31 | |||||
32 | my $desc = "generated method"; | ||||
33 | my $origin = "unknown origin"; | ||||
34 | |||||
35 | 266 | 408µs | if (defined $context) { | ||
36 | if (defined $context->{description}) { | ||||
37 | $desc = $context->{description}; | ||||
38 | } | ||||
39 | |||||
40 | 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 36.7ms (1.77+35.0) within Class::MOP::Method::Generated::_compile_code which was called 133 times, avg 276µs/call:
# 53 times (594µs+7.75ms) by Class::MOP::Method::Accessor::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Method/Accessor.pm:154] at line 142 of Class/MOP/Method/Accessor.pm, avg 158µs/call
# 30 times (521µs+18.2ms) by Class::MOP::Method::Constructor::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Method/Constructor.pm:111] at line 110 of Class/MOP/Method/Constructor.pm, avg 622µs/call
# 22 times (270µs+3.44ms) by Class::MOP::Method::Accessor::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Method/Accessor.pm:120] at line 112 of Class/MOP/Method/Accessor.pm, avg 169µs/call
# 16 times (169µs+1.86ms) by Class::MOP::Method::Accessor::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Method/Accessor.pm:209] at line 204 of Class/MOP/Method/Accessor.pm, avg 127µs/call
# 9 times (181µs+3.44ms) by Moose::Meta::Method::Accessor::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Meta/Method/Accessor.pm:39] at line 38 of Moose/Meta/Method/Accessor.pm, avg 402µs/call
# 3 times (31µs+345µs) by Class::MOP::Method::Accessor::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Method/Accessor.pm:184] at line 179 of Class/MOP/Method/Accessor.pm, avg 125µs/call | ||||
54 | 798 | 1.96ms | my ( $self, @args ) = @_; | ||
55 | unshift @args, 'source' if @args % 2; | ||||
56 | my %args = @args; | ||||
57 | |||||
58 | my $context = delete $args{context}; | ||||
59 | 172 | 6.60ms | my $environment = $self->can('_eval_environment') # spent 5.67ms making 30 calls to Class::MOP::Method::Constructor::_eval_environment, avg 189µs/call
# spent 769µs making 9 calls to Moose::Meta::Method::Accessor::_eval_environment, avg 85µs/call
# spent 165µs making 133 calls to UNIVERSAL::can, avg 1µs/call | ||
60 | ? $self->_eval_environment | ||||
61 | : {}; | ||||
62 | |||||
63 | 266 | 28.4ms | return eval_closure( # spent 27.0ms making 133 calls to Eval::Closure::eval_closure, avg 203µs/call
# spent 1.36ms making 133 calls to Class::MOP::Method::Generated::_generate_description, avg 10µs/call | ||
64 | environment => $environment, | ||||
65 | description => $self->_generate_description($context), | ||||
66 | %args, | ||||
67 | ); | ||||
68 | } | ||||
69 | |||||
70 | 1 | 3µs | 1; | ||
71 | |||||
72 | # ABSTRACT: Abstract base class for generated methods | ||||
73 | |||||
- - | |||||
76 | =pod | ||||
77 | |||||
78 | =head1 NAME | ||||
79 | |||||
80 | Class::MOP::Method::Generated - Abstract base class for generated methods | ||||
81 | |||||
82 | =head1 VERSION | ||||
83 | |||||
84 | version 2.0602 | ||||
85 | |||||
86 | =head1 DESCRIPTION | ||||
87 | |||||
88 | This is a C<Class::MOP::Method> subclass which is subclassed by | ||||
89 | C<Class::MOP::Method::Accessor> and | ||||
90 | C<Class::MOP::Method::Constructor>. | ||||
91 | |||||
92 | It is not intended to be used directly. | ||||
93 | |||||
94 | =head1 AUTHOR | ||||
95 | |||||
96 | Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details. | ||||
97 | |||||
98 | =head1 COPYRIGHT AND LICENSE | ||||
99 | |||||
100 | This software is copyright (c) 2012 by Infinity Interactive, Inc.. | ||||
101 | |||||
102 | This is free software; you can redistribute it and/or modify it under | ||||
103 | the same terms as the Perl 5 programming language system itself. | ||||
104 | |||||
105 | =cut | ||||
106 | |||||
107 | |||||
108 | __END__ |