Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Meta/Method/Accessor.pm |
Statements | Executed 126 statements in 1.22ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
9 | 2 | 1 | 133µs | 4.03ms | _compile_code | Moose::Meta::Method::Accessor::
8 | 2 | 1 | 126µs | 162µs | _instance_is_inlinable | Moose::Meta::Method::Accessor::
9 | 1 | 1 | 106µs | 3.72ms | __ANON__[:39] | Moose::Meta::Method::Accessor::
6 | 1 | 1 | 63µs | 7.09ms | _generate_accessor_method | Moose::Meta::Method::Accessor::
9 | 1 | 1 | 60µs | 769µs | _eval_environment | Moose::Meta::Method::Accessor::
9 | 1 | 1 | 42µs | 42µs | new | Moose::Meta::Method::Accessor::
2 | 1 | 1 | 27µs | 2.00ms | _generate_reader_method | Moose::Meta::Method::Accessor::
3 | 1 | 1 | 26µs | 32µs | _error_thrower | Moose::Meta::Method::Accessor::
9 | 1 | 1 | 18µs | 18µs | _new | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 9µs | 9µs | BEGIN@3 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 8µs | 26µs | BEGIN@11 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 8µs | 14µs | BEGIN@10 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 8µs | 136µs | BEGIN@15 | Moose::Meta::Method::Accessor::
1 | 1 | 1 | 7µs | 35µs | BEGIN@13 | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | __ANON__[:47] | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _generate_clearer_method | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _generate_predicate_method | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _generate_writer_method | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _get_value | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _has_value | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_check_coercion | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_check_constraint | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_check_lazy | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_get_old_value_for_trigger | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_store_value | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_tc_code | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _inline_trigger | Moose::Meta::Method::Accessor::
0 | 0 | 0 | 0s | 0s | _writer_value_needs_copy | Moose::Meta::Method::Accessor::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package Moose::Meta::Method::Accessor; | ||||
3 | # spent 9µs within Moose::Meta::Method::Accessor::BEGIN@3 which was called:
# once (9µs+0s) by Moose::Meta::Attribute::BEGIN@21 at line 5 | ||||
4 | 1 | 4µs | $Moose::Meta::Method::Accessor::AUTHORITY = 'cpan:STEVAN'; | ||
5 | 1 | 23µs | 1 | 9µs | } # spent 9µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@3 |
6 | { | ||||
7 | 2 | 1µs | $Moose::Meta::Method::Accessor::VERSION = '2.0602'; | ||
8 | } | ||||
9 | |||||
10 | 3 | 18µs | 2 | 19µs | # spent 14µs (8+5) within Moose::Meta::Method::Accessor::BEGIN@10 which was called:
# once (8µs+5µs) by Moose::Meta::Attribute::BEGIN@21 at line 10 # spent 14µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@10
# spent 6µs making 1 call to strict::import |
11 | 3 | 23µs | 2 | 44µs | # spent 26µs (8+18) within Moose::Meta::Method::Accessor::BEGIN@11 which was called:
# once (8µs+18µs) by Moose::Meta::Attribute::BEGIN@21 at line 11 # spent 26µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@11
# spent 18µs making 1 call to warnings::import |
12 | |||||
13 | 3 | 20µs | 2 | 62µs | # spent 35µs (7+28) within Moose::Meta::Method::Accessor::BEGIN@13 which was called:
# once (7µs+28µs) by Moose::Meta::Attribute::BEGIN@21 at line 13 # spent 35µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@13
# spent 28µs making 1 call to Exporter::import |
14 | |||||
15 | 1 | 5µs | 1 | 129µs | # spent 136µs (8+129) within Moose::Meta::Method::Accessor::BEGIN@15 which was called:
# once (8µs+129µs) by Moose::Meta::Attribute::BEGIN@21 at line 16 # spent 129µs making 1 call to base::import |
16 | 2 | 515µs | 1 | 136µs | 'Class::MOP::Method::Accessor'; # spent 136µs making 1 call to Moose::Meta::Method::Accessor::BEGIN@15 |
17 | |||||
18 | # multiple inheritance is terrible | ||||
19 | # spent 42µs within Moose::Meta::Method::Accessor::new which was called 9 times, avg 5µs/call:
# 9 times (42µs+0s) by Class::MOP::Attribute::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/MOP/Attribute.pm:398] at line 389 of Class/MOP/Attribute.pm, avg 5µs/call | ||||
20 | 9 | 62µs | 9 | 14.2ms | goto &Class::MOP::Method::Accessor::new; # spent 14.2ms making 9 calls to Class::MOP::Method::Accessor::new, avg 1.58ms/call |
21 | } | ||||
22 | |||||
23 | # spent 18µs within Moose::Meta::Method::Accessor::_new which was called 9 times, avg 2µs/call:
# 9 times (18µs+0s) by Class::MOP::Method::Accessor::new at line 35 of Class/MOP/Method/Accessor.pm, avg 2µs/call | ||||
24 | 9 | 38µs | 9 | 3.83ms | goto &Class::MOP::Method::Accessor::_new; # spent 3.83ms making 9 calls to Class::MOP::Method::Accessor::_new, avg 426µs/call |
25 | } | ||||
26 | |||||
27 | # spent 32µs (26+6) within Moose::Meta::Method::Accessor::_error_thrower which was called 3 times, avg 11µs/call:
# 3 times (26µs+6µs) by Moose::Meta::Method::_inline_throw_error at line 37 of Moose/Meta/Method.pm, avg 11µs/call | ||||
28 | 3 | 2µs | my $self = shift; | ||
29 | 3 | 17µs | 6 | 6µs | return $self->associated_attribute # spent 6µs making 6 calls to Class::MOP::Method::Accessor::associated_attribute, avg 1µs/call |
30 | if ref($self) && defined($self->associated_attribute); | ||||
31 | return $self->SUPER::_error_thrower; | ||||
32 | } | ||||
33 | |||||
34 | # spent 4.03ms (133µs+3.89) within Moose::Meta::Method::Accessor::_compile_code which was called 9 times, avg 447µs/call:
# 6 times (80µs+2.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:120] at line 112 of Class/MOP/Method/Accessor.pm, avg 472µs/call
# 3 times (53µs+1.14ms) 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 398µs/call | ||||
35 | 9 | 5µs | my $self = shift; | ||
36 | 9 | 9µs | my @args = @_; | ||
37 | # spent 3.72ms (106µs+3.62) within 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] which was called 9 times, avg 414µs/call:
# 9 times (106µs+3.62ms) by Try::Tiny::try at line 71 of Try/Tiny.pm, avg 414µs/call | ||||
38 | 9 | 110µs | 9 | 3.62ms | $self->SUPER::_compile_code(@args); # spent 3.62ms making 9 calls to Class::MOP::Method::Generated::_compile_code, avg 402µs/call |
39 | } | ||||
40 | catch { | ||||
41 | $self->throw_error( | ||||
42 | 'Could not create writer for ' | ||||
43 | . "'" . $self->associated_attribute->name . "' " | ||||
44 | . 'because ' . $_, | ||||
45 | error => $_, | ||||
46 | ); | ||||
47 | 9 | 110µs | 18 | 28µs | }; # spent 28µs making 9 calls to Try::Tiny::catch, avg 3µs/call
# spent 3.86ms making 9 calls to Try::Tiny::try, avg 429µs/call, recursion: max depth 3, sum of overlapping time 3.86ms |
48 | } | ||||
49 | |||||
50 | # spent 769µs (60+709) within Moose::Meta::Method::Accessor::_eval_environment which was called 9 times, avg 85µs/call:
# 9 times (60µs+709µs) by Class::MOP::Method::Generated::_compile_code at line 59 of Class/MOP/Method/Generated.pm, avg 85µs/call | ||||
51 | 9 | 5µs | my $self = shift; | ||
52 | 9 | 45µs | 18 | 709µs | return $self->associated_attribute->_eval_environment; # spent 696µs making 9 calls to Moose::Meta::Attribute::_eval_environment, avg 77µs/call
# spent 13µs making 9 calls to Class::MOP::Method::Accessor::associated_attribute, avg 1µs/call |
53 | } | ||||
54 | |||||
55 | # spent 162µs (126+35) within Moose::Meta::Method::Accessor::_instance_is_inlinable which was called 8 times, avg 20µs/call:
# 6 times (94µs+27µs) by Moose::Meta::Method::Accessor::_generate_accessor_method at line 74, avg 20µs/call
# 2 times (32µs+8µs) by Moose::Meta::Method::Accessor::_generate_reader_method at line 62, avg 20µs/call | ||||
56 | 8 | 3µs | my $self = shift; | ||
57 | 8 | 123µs | 32 | 35µs | return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable; # spent 12µs making 8 calls to Class::MOP::Instance::is_inlinable, avg 1µs/call
# spent 12µs making 8 calls to Class::MOP::Method::Accessor::associated_attribute, avg 1µs/call
# spent 7µs making 8 calls to Class::MOP::Class::instance_metaclass, avg 837ns/call
# spent 5µs making 8 calls to Class::MOP::Attribute::associated_class, avg 650ns/call |
58 | } | ||||
59 | |||||
60 | # spent 2.00ms (27µs+1.97) within Moose::Meta::Method::Accessor::_generate_reader_method which was called 2 times, avg 1.00ms/call:
# 2 times (27µs+1.97ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 1.00ms/call | ||||
61 | 2 | 800ns | my $self = shift; | ||
62 | 2 | 24µs | 4 | 1.97ms | $self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_) # spent 1.93ms making 2 calls to Class::MOP::Method::Accessor::_generate_reader_method_inline, avg 967µs/call
# spent 40µs making 2 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 20µs/call |
63 | : $self->SUPER::_generate_reader_method(@_); | ||||
64 | } | ||||
65 | |||||
66 | sub _generate_writer_method { | ||||
67 | my $self = shift; | ||||
68 | $self->_instance_is_inlinable ? $self->_generate_writer_method_inline(@_) | ||||
69 | : $self->SUPER::_generate_writer_method(@_); | ||||
70 | } | ||||
71 | |||||
72 | # spent 7.09ms (63µs+7.03) within Moose::Meta::Method::Accessor::_generate_accessor_method which was called 6 times, avg 1.18ms/call:
# 6 times (63µs+7.03ms) by Class::MOP::Method::Accessor::_initialize_body at line 90 of Class/MOP/Method/Accessor.pm, avg 1.18ms/call | ||||
73 | 6 | 4µs | my $self = shift; | ||
74 | 6 | 54µs | 12 | 7.03ms | $self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_) # spent 6.91ms making 6 calls to Class::MOP::Method::Accessor::_generate_accessor_method_inline, avg 1.15ms/call
# spent 121µs making 6 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 20µs/call |
75 | : $self->SUPER::_generate_accessor_method(@_); | ||||
76 | } | ||||
77 | |||||
78 | sub _generate_predicate_method { | ||||
79 | my $self = shift; | ||||
80 | $self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_) | ||||
81 | : $self->SUPER::_generate_predicate_method(@_); | ||||
82 | } | ||||
83 | |||||
84 | sub _generate_clearer_method { | ||||
85 | my $self = shift; | ||||
86 | $self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_) | ||||
87 | : $self->SUPER::_generate_clearer_method(@_); | ||||
88 | } | ||||
89 | |||||
90 | sub _writer_value_needs_copy { | ||||
91 | shift->associated_attribute->_writer_value_needs_copy(@_); | ||||
92 | } | ||||
93 | |||||
94 | sub _inline_tc_code { | ||||
95 | shift->associated_attribute->_inline_tc_code(@_); | ||||
96 | } | ||||
97 | |||||
98 | sub _inline_check_coercion { | ||||
99 | shift->associated_attribute->_inline_check_coercion(@_); | ||||
100 | } | ||||
101 | |||||
102 | sub _inline_check_constraint { | ||||
103 | shift->associated_attribute->_inline_check_constraint(@_); | ||||
104 | } | ||||
105 | |||||
106 | sub _inline_check_lazy { | ||||
107 | shift->associated_attribute->_inline_check_lazy(@_); | ||||
108 | } | ||||
109 | |||||
110 | sub _inline_store_value { | ||||
111 | shift->associated_attribute->_inline_instance_set(@_) . ';'; | ||||
112 | } | ||||
113 | |||||
114 | sub _inline_get_old_value_for_trigger { | ||||
115 | shift->associated_attribute->_inline_get_old_value_for_trigger(@_); | ||||
116 | } | ||||
117 | |||||
118 | sub _inline_trigger { | ||||
119 | shift->associated_attribute->_inline_trigger(@_); | ||||
120 | } | ||||
121 | |||||
122 | sub _get_value { | ||||
123 | shift->associated_attribute->_inline_instance_get(@_); | ||||
124 | } | ||||
125 | |||||
126 | sub _has_value { | ||||
127 | shift->associated_attribute->_inline_instance_has(@_); | ||||
128 | } | ||||
129 | |||||
130 | 1 | 2µs | 1; | ||
131 | |||||
132 | # ABSTRACT: A Moose Method metaclass for accessors | ||||
133 | |||||
- - | |||||
136 | =pod | ||||
137 | |||||
138 | =head1 NAME | ||||
139 | |||||
140 | Moose::Meta::Method::Accessor - A Moose Method metaclass for accessors | ||||
141 | |||||
142 | =head1 VERSION | ||||
143 | |||||
144 | version 2.0602 | ||||
145 | |||||
146 | =head1 DESCRIPTION | ||||
147 | |||||
148 | This class is a subclass of L<Class::MOP::Method::Accessor> that | ||||
149 | provides additional Moose-specific functionality, all of which is | ||||
150 | private. | ||||
151 | |||||
152 | To understand this class, you should read the the | ||||
153 | L<Class::MOP::Method::Accessor> documentation. | ||||
154 | |||||
155 | =head1 BUGS | ||||
156 | |||||
157 | See L<Moose/BUGS> for details on reporting bugs. | ||||
158 | |||||
159 | =head1 AUTHOR | ||||
160 | |||||
161 | Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details. | ||||
162 | |||||
163 | =head1 COPYRIGHT AND LICENSE | ||||
164 | |||||
165 | This software is copyright (c) 2012 by Infinity Interactive, Inc.. | ||||
166 | |||||
167 | This is free software; you can redistribute it and/or modify it under | ||||
168 | the same terms as the Perl 5 programming language system itself. | ||||
169 | |||||
170 | =cut | ||||
171 | |||||
172 | |||||
173 | __END__ |