← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:13:08 2010

Filename/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Attribute.pm
StatementsExecuted 40134 statements in 568ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
391821185ms304msClass::MOP::Attribute::::_set_initial_slot_valueClass::MOP::Attribute::_set_initial_slot_value
430411137ms555msClass::MOP::Attribute::::initialize_instance_slotClass::MOP::Attribute::initialize_instance_slot
3125241.8ms628msClass::MOP::Attribute::::_process_accessorsClass::MOP::Attribute::_process_accessors
2573240.3ms869msClass::MOP::Attribute::::install_accessorsClass::MOP::Attribute::install_accessors
5712232.8ms125msClass::MOP::Attribute::::_inline_instance_setClass::MOP::Attribute::_inline_instance_set
2551118.7ms535msClass::MOP::Attribute::::__ANON__[:401]Class::MOP::Attribute::__ANON__[:401]
10311117.0ms22.1msClass::MOP::Attribute::::slotsClass::MOP::Attribute::slots
18750416.5ms108msClass::MOP::Attribute::::newClass::MOP::Attribute::new
5607413.0ms136msClass::MOP::Attribute::::_inline_set_valueClass::MOP::Attribute::_inline_set_value
155339.20ms86.6msClass::MOP::Attribute::::_inline_instance_getClass::MOP::Attribute::_inline_instance_get
188118.17ms11.6msClass::MOP::Attribute::::attach_to_classClass::MOP::Attribute::attach_to_class
116116.47ms10.8msClass::MOP::Attribute::::_newClass::MOP::Attribute::_new
327325.83ms5.83msClass::MOP::Attribute::::associate_methodClass::MOP::Attribute::associate_method
98114.95ms22.6msClass::MOP::Attribute::::set_initial_valueClass::MOP::Attribute::set_initial_value
226212.02ms2.02msClass::MOP::Attribute::::accessor_metaclassClass::MOP::Attribute::accessor_metaclass
31221.88ms4.06msClass::MOP::Attribute::::_inline_instance_hasClass::MOP::Attribute::_inline_instance_has
68211.74ms21.4msClass::MOP::Attribute::::_inline_get_valueClass::MOP::Attribute::_inline_get_value
3443987µs1.17msClass::MOP::Attribute::::get_read_methodClass::MOP::Attribute::get_read_method
1411979µs2.73msClass::MOP::Attribute::::get_raw_valueClass::MOP::Attribute::get_raw_value
811589µs1.59msClass::MOP::Attribute::::has_valueClass::MOP::Attribute::has_value
2011486µs3.17msClass::MOP::Attribute::::_inline_has_valueClass::MOP::Attribute::_inline_has_value
1411277µs3.01msClass::MOP::Attribute::::get_valueClass::MOP::Attribute::get_value
211131µs343µsClass::MOP::Attribute::::set_raw_valueClass::MOP::Attribute::set_raw_value
11168µs88µsClass::MOP::Attribute::::BEGIN@4Class::MOP::Attribute::BEGIN@4
11145µs217µsClass::MOP::Attribute::::BEGIN@10Class::MOP::Attribute::BEGIN@10
11142µs488µsClass::MOP::Attribute::::BEGIN@17Class::MOP::Attribute::BEGIN@17
11142µs227µsClass::MOP::Attribute::::BEGIN@11Class::MOP::Attribute::BEGIN@11
11141µs204µsClass::MOP::Attribute::::BEGIN@9Class::MOP::Attribute::BEGIN@9
11141µs112µsClass::MOP::Attribute::::BEGIN@5Class::MOP::Attribute::BEGIN@5
21141µs384µsClass::MOP::Attribute::::set_valueClass::MOP::Attribute::set_value
11124µs24µsClass::MOP::Attribute::::BEGIN@7Class::MOP::Attribute::BEGIN@7
0000s0sClass::MOP::Attribute::::__ANON__[:167]Class::MOP::Attribute::__ANON__[:167]
0000s0sClass::MOP::Attribute::::__ANON__[:196]Class::MOP::Attribute::__ANON__[:196]
0000s0sClass::MOP::Attribute::::__ANON__[:216]Class::MOP::Attribute::__ANON__[:216]
0000s0sClass::MOP::Attribute::::__ANON__[:404]Class::MOP::Attribute::__ANON__[:404]
0000s0sClass::MOP::Attribute::::__ANON__[:447]Class::MOP::Attribute::__ANON__[:447]
0000s0sClass::MOP::Attribute::::_inline_clear_valueClass::MOP::Attribute::_inline_clear_value
0000s0sClass::MOP::Attribute::::_inline_instance_clearClass::MOP::Attribute::_inline_instance_clear
0000s0sClass::MOP::Attribute::::_make_initializer_writer_callbackClass::MOP::Attribute::_make_initializer_writer_callback
0000s0sClass::MOP::Attribute::::clear_valueClass::MOP::Attribute::clear_value
0000s0sClass::MOP::Attribute::::detach_from_classClass::MOP::Attribute::detach_from_class
0000s0sClass::MOP::Attribute::::get_read_method_refClass::MOP::Attribute::get_read_method_ref
0000s0sClass::MOP::Attribute::::get_write_methodClass::MOP::Attribute::get_write_method
0000s0sClass::MOP::Attribute::::get_write_method_refClass::MOP::Attribute::get_write_method_ref
0000s0sClass::MOP::Attribute::::remove_accessorsClass::MOP::Attribute::remove_accessors
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1
2package Class::MOP::Attribute;
3
43105µs2107µs
# spent 88µs (68+19) within Class::MOP::Attribute::BEGIN@4 which was called: # once (68µs+19µs) by Class::MOP::BEGIN@20 at line 4
use strict;
# spent 88µs making 1 call to Class::MOP::Attribute::BEGIN@4 # spent 19µs making 1 call to strict::import
53104µs2182µs
# spent 112µs (41+71) within Class::MOP::Attribute::BEGIN@5 which was called: # once (41µs+71µs) by Class::MOP::BEGIN@20 at line 5
use warnings;
# spent 112µs making 1 call to Class::MOP::Attribute::BEGIN@5 # spent 71µs making 1 call to warnings::import
6
73127µs124µs
# spent 24µs within Class::MOP::Attribute::BEGIN@7 which was called: # once (24µs+0s) by Class::MOP::BEGIN@20 at line 7
use Class::MOP::Method::Accessor;
# spent 24µs making 1 call to Class::MOP::Attribute::BEGIN@7
8
93118µs2368µs
# spent 204µs (41+163) within Class::MOP::Attribute::BEGIN@9 which was called: # once (41µs+163µs) by Class::MOP::BEGIN@20 at line 9
use Carp 'confess';
# spent 204µs making 1 call to Class::MOP::Attribute::BEGIN@9 # spent 163µs making 1 call to Exporter::import
103117µs2390µs
# spent 217µs (45+172) within Class::MOP::Attribute::BEGIN@10 which was called: # once (45µs+172µs) by Class::MOP::BEGIN@20 at line 10
use Scalar::Util 'blessed', 'weaken';
# spent 217µs making 1 call to Class::MOP::Attribute::BEGIN@10 # spent 173µs making 1 call to Exporter::import
113216µs2412µs
# spent 227µs (42+185) within Class::MOP::Attribute::BEGIN@11 which was called: # once (42µs+185µs) by Class::MOP::BEGIN@20 at line 11
use Try::Tiny;
# spent 227µs making 1 call to Class::MOP::Attribute::BEGIN@11 # spent 185µs making 1 call to Exporter::import
12
1315µsour $VERSION = '1.11';
14177µs$VERSION = eval $VERSION;
# spent 11µs executing statements in string eval
1513µsour $AUTHORITY = 'cpan:STEVAN';
16
1737.63ms2488µs
# spent 488µs (42+446) within Class::MOP::Attribute::BEGIN@17 which was called: # once (42µs+446µs) by Class::MOP::BEGIN@20 at line 17
use base 'Class::MOP::Object', 'Class::MOP::Mixin::AttributeCore';
# spent 488µs making 1 call to Class::MOP::Attribute::BEGIN@17 # spent 446µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 446µs
18
19# NOTE: (meta-circularity)
20# This method will be replaced in the
21# boostrap section of Class::MOP, by
22# a new version which uses the
23# &Class::MOP::Class::construct_instance
24# method to build an attribute meta-object
25# which itself is described with attribute
26# meta-objects.
27# - Ain't meta-circularity grand? :)
28
# spent 108ms (16.5+91.9) within Class::MOP::Attribute::new which was called 187 times, avg 580µs/call: # 72 times (7.18ms+85.0ms) by Moose::Meta::Attribute::new at line 80 of Moose/Meta/Attribute.pm, avg 1.28ms/call # 67 times (5.55ms+4.00ms) by Class::MOP::Mixin::HasAttributes::add_attribute at line 18 of Class/MOP/Mixin/HasAttributes.pm, avg 143µs/call # once (135µs+101µs) by MooseX::Types::Combine::BEGIN@12 at line 322 of Class/MOP.pm # once (115µs+118µs) by MooseX::Types::Combine::BEGIN@12 at line 469 of Class/MOP.pm # once (122µs+95µs) by MooseX::Types::Combine::BEGIN@12 at line 193 of Class/MOP.pm # once (103µs+100µs) by MooseX::Types::Combine::BEGIN@12 at line 462 of Class/MOP.pm # once (100µs+81µs) by MooseX::Types::Combine::BEGIN@12 at line 511 of Class/MOP.pm # once (110µs+71µs) by MooseX::Types::Combine::BEGIN@12 at line 635 of Class/MOP.pm # once (87µs+82µs) by MooseX::Types::Combine::BEGIN@12 at line 374 of Class/MOP.pm # once (92µs+74µs) by MooseX::Types::Combine::BEGIN@12 at line 277 of Class/MOP.pm # once (89µs+67µs) by MooseX::Types::Combine::BEGIN@12 at line 303 of Class/MOP.pm # once (89µs+66µs) by MooseX::Types::Combine::BEGIN@12 at line 338 of Class/MOP.pm # once (89µs+65µs) by MooseX::Types::Combine::BEGIN@12 at line 616 of Class/MOP.pm # once (88µs+65µs) by MooseX::Types::Combine::BEGIN@12 at line 235 of Class/MOP.pm # once (71µs+74µs) by MooseX::Types::Combine::BEGIN@12 at line 493 of Class/MOP.pm # once (73µs+71µs) by MooseX::Types::Combine::BEGIN@12 at line 455 of Class/MOP.pm # once (72µs+72µs) by MooseX::Types::Combine::BEGIN@12 at line 448 of Class/MOP.pm # once (72µs+71µs) by MooseX::Types::Combine::BEGIN@12 at line 483 of Class/MOP.pm # once (71µs+72µs) by MooseX::Types::Combine::BEGIN@12 at line 476 of Class/MOP.pm # once (71µs+70µs) by MooseX::Types::Combine::BEGIN@12 at line 441 of Class/MOP.pm # once (70µs+70µs) by MooseX::Types::Combine::BEGIN@12 at line 421 of Class/MOP.pm # once (70µs+68µs) by MooseX::Types::Combine::BEGIN@12 at line 428 of Class/MOP.pm # once (71µs+67µs) by MooseX::Types::Combine::BEGIN@12 at line 584 of Class/MOP.pm # once (71µs+67µs) by MooseX::Types::Combine::BEGIN@12 at line 414 of Class/MOP.pm # once (68µs+68µs) by MooseX::Types::Combine::BEGIN@12 at line 435 of Class/MOP.pm # once (91µs+44µs) by MooseX::Types::Combine::BEGIN@12 at line 545 of Class/MOP.pm # once (70µs+63µs) by MooseX::Types::Combine::BEGIN@12 at line 521 of Class/MOP.pm # once (71µs+60µs) by MooseX::Types::Combine::BEGIN@12 at line 400 of Class/MOP.pm # once (74µs+56µs) by MooseX::Types::Combine::BEGIN@12 at line 208 of Class/MOP.pm # once (75µs+49µs) by Moose::BEGIN@19 at line 43 of Moose/Meta/Class.pm # once (75µs+48µs) by MooseX::Types::Combine::BEGIN@12 at line 341 of Class/MOP.pm # once (74µs+48µs) by MooseX::Types::Combine::BEGIN@12 at line 196 of Class/MOP.pm # once (71µs+48µs) by MooseX::Types::Combine::BEGIN@12 at line 641 of Class/MOP.pm # once (74µs+45µs) by MooseX::Types::Combine::BEGIN@12 at line 574 of Class/MOP.pm # once (73µs+46µs) by MooseX::Types::Combine::BEGIN@12 at line 238 of Class/MOP.pm # once (72µs+46µs) by MooseX::Types::Combine::BEGIN@12 at line 567 of Class/MOP.pm # once (68µs+49µs) by MooseX::Types::Combine::BEGIN@12 at line 560 of Class/MOP.pm # once (71µs+45µs) by MooseX::Types::Combine::BEGIN@12 at line 365 of Class/MOP.pm # once (71µs+45µs) by MooseX::Types::Combine::BEGIN@12 at line 253 of Class/MOP.pm # once (71µs+45µs) by MooseX::Types::Combine::BEGIN@12 at line 662 of Class/MOP.pm # once (70µs+45µs) by MooseX::Types::Combine::BEGIN@12 at line 527 of Class/MOP.pm # once (71µs+44µs) by MooseX::Types::Combine::BEGIN@12 at line 356 of Class/MOP.pm # once (70µs+44µs) by MooseX::Types::Combine::BEGIN@12 at line 650 of Class/MOP.pm # once (70µs+44µs) by MooseX::Types::Combine::BEGIN@12 at line 619 of Class/MOP.pm # once (68µs+46µs) by MooseX::Types::Combine::BEGIN@12 at line 601 of Class/MOP.pm # once (70µs+44µs) by MooseX::Types::Combine::BEGIN@12 at line 593 of Class/MOP.pm # once (69µs+43µs) by MooseX::Types::Combine::BEGIN@12 at line 656 of Class/MOP.pm # once (68µs+44µs) by MooseX::Types::Combine::BEGIN@12 at line 533 of Class/MOP.pm # once (67µs+43µs) by MooseX::Types::Combine::BEGIN@12 at line 539 of Class/MOP.pm # once (67µs+43µs) by MooseX::Types::Combine::BEGIN@12 at line 384 of Class/MOP.pm
sub new {
291872.20ms my ( $class, @args ) = @_;
30
311871.64ms unshift @args, "name" if @args % 2 == 1;
321871.93ms my %options = @args;
33
34187828µs my $name = $options{name};
35
36187442µs (defined $name)
37 || confess "You must provide a name for the attribute";
38
391871.24ms $options{init_arg} = $name
40 if not exists $options{init_arg};
411871.02ms if(exists $options{builder}){
42931µs confess("builder must be a defined scalar value which is a method name")
43 if ref $options{builder} || !(defined $options{builder});
44924µs confess("Setting both default and builder is not allowed.")
45 if exists $options{default};
46 } else {
471781.09ms33684µs ($class->is_default_a_coderef(\%options))
# spent 684µs making 33 calls to Class::MOP::Mixin::AttributeCore::is_default_a_coderef, avg 21µs/call
48 || confess("References are not allowed as default values, you must ".
49 "wrap the default of '$name' in a CODE reference (ex: sub { [] } and not [])")
50 if exists $options{default} && ref $options{default};
51 }
52187622µs if( $options{required} and not( defined($options{builder}) || defined($options{init_arg}) || exists $options{default} ) ) {
53 confess("A required attribute must have either 'init_arg', 'builder', or 'default'");
54 }
55
561875.06ms18791.2ms $class->_new(\%options);
# spent 80.0ms making 70 calls to Moose::Meta::Attribute::_new, avg 1.14ms/call # spent 10.8ms making 116 calls to Class::MOP::Attribute::_new, avg 93µs/call # spent 389µs making 1 call to MooseX::Role::Parameterized::Meta::Parameter::_new
57}
58
59
# spent 10.8ms (6.47+4.32) within Class::MOP::Attribute::_new which was called 116 times, avg 93µs/call: # 116 times (6.47ms+4.32ms) by Class::MOP::Attribute::new at line 56, avg 93µs/call
sub _new {
60116398µs my $class = shift;
61
62116388µs24.32ms return Class::MOP::Class->initialize($class)->new_object(@_)
# spent 4.28ms making 1 call to Class::MOP::Class::new_object # spent 42µs making 1 call to Class::MOP::Class::initialize
63 if $class ne __PACKAGE__;
64
65115419µs my $options = @_ == 1 ? $_[0] : {@_};
66
671155.71ms bless {
68 'name' => $options->{name},
69 'accessor' => $options->{accessor},
70 'reader' => $options->{reader},
71 'writer' => $options->{writer},
72 'predicate' => $options->{predicate},
73 'clearer' => $options->{clearer},
74 'builder' => $options->{builder},
75 'init_arg' => $options->{init_arg},
76 exists $options->{default}
77 ? ('default' => $options->{default})
78 : (),
79 'initializer' => $options->{initializer},
80 'definition_context' => $options->{definition_context},
81 # keep a weakened link to the
82 # class we are associated with
83 'associated_class' => undef,
84 # and a list of the methods
85 # associated with this attr
86 'associated_methods' => [],
87 # this let's us keep track of
88 # our order inside the associated
89 # class
90 'insertion_order' => undef,
91 }, $class;
92}
93
94# NOTE:
95# this is a primative (and kludgy) clone operation
96# for now, it will be replaced in the Class::MOP
97# bootstrap with a proper one, however we know
98# that this one will work fine for now.
99sub clone {
100 my $self = shift;
101 my %options = @_;
102 (blessed($self))
103 || confess "Can only clone an instance";
104 return bless { %{$self}, %options } => ref($self);
105}
106
107
# spent 555ms (137+418) within Class::MOP::Attribute::initialize_instance_slot which was called 4304 times, avg 129µs/call: # 4304 times (137ms+418ms) by Class::MOP::Class::_construct_instance at line 579 of Class/MOP/Class.pm, avg 129µs/call
sub initialize_instance_slot {
108430414.7ms my ($self, $meta_instance, $instance, $params) = @_;
109430416.3ms my $init_arg = $self->{'init_arg'};
110
111 # try to fetch the init arg from the %params ...
112
113 # if nothing was in the %params, we can use the
114 # attribute's default value (if it has one)
115430498.3ms6103417ms if(defined $init_arg and exists $params->{$init_arg}){
# spent 296ms making 3820 calls to Class::MOP::Attribute::_set_initial_slot_value, avg 77µs/call # spent 122ms making 2283 calls to Class::MOP::Mixin::AttributeCore::default, avg 53µs/call, recursion: max depth 1, sum of overlapping time 1.39ms
116 $self->_set_initial_slot_value(
117 $meta_instance,
118 $instance,
119 $params->{$init_arg},
120 );
121 }
122 elsif (exists $self->{'default'}) {
123 $self->_set_initial_slot_value(
124 $meta_instance,
125 $instance,
126 $self->default($instance),
127 );
128 }
129 elsif (defined( my $builder = $self->{'builder'})) {
130 if ($builder = $instance->can($builder)) {
131 $self->_set_initial_slot_value(
132 $meta_instance,
133 $instance,
134 $instance->$builder,
135 );
136 }
137 else {
138 confess(ref($instance)." does not support builder method '". $self->{'builder'} ."' for attribute '" . $self->name . "'");
139 }
140 }
141}
142
143
# spent 304ms (185+120) within Class::MOP::Attribute::_set_initial_slot_value which was called 3918 times, avg 78µs/call: # 3820 times (180ms+116ms) by Class::MOP::Attribute::initialize_instance_slot at line 115, avg 77µs/call # 98 times (5.00ms+3.11ms) by Class::MOP::Attribute::set_initial_value at line 259, avg 83µs/call
sub _set_initial_slot_value {
144391814.9ms my ($self, $meta_instance, $instance, $value) = @_;
145
146391866.6ms391819.8ms my $slot_name = $self->name;
# spent 19.8ms making 3918 calls to Class::MOP::Mixin::AttributeCore::name, avg 5µs/call
147
1483918103ms783699.8ms return $meta_instance->set_slot_value($instance, $slot_name, $value)
# spent 61.5ms making 3918 calls to Class::MOP::Instance::set_slot_value, avg 16µs/call # spent 38.3ms making 3918 calls to Class::MOP::Mixin::AttributeCore::has_initializer, avg 10µs/call
149 unless $self->has_initializer;
150
151 my $callback = $self->_make_initializer_writer_callback(
152 $meta_instance, $instance, $slot_name
153 );
154
155 my $initializer = $self->initializer;
156
157 # most things will just want to set a value, so make it first arg
158 $instance->$initializer($value, $callback, $self);
159}
160
161sub _make_initializer_writer_callback {
162 my $self = shift;
163 my ($meta_instance, $instance, $slot_name) = @_;
164
165 return sub {
166 $meta_instance->set_slot_value($instance, $slot_name, $_[0]);
167 };
168}
169
170
# spent 1.17ms (987µs+186µs) within Class::MOP::Attribute::get_read_method which was called 34 times, avg 35µs/call: # 21 times (583µs+108µs) by Markdent::Role::Event::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Markdent/Role/Event.pm:88] at line 48 of Markdent/Role/Event.pm, avg 33µs/call # 8 times (196µs+37µs) by Markdent::Role::Event::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Markdent/Role/Event.pm:88] at line 58 of Markdent/Role/Event.pm, avg 29µs/call # 4 times (149µs+26µs) by Moose::Util::MetaRole::_make_new_metaclass at line 122 of Moose/Util/MetaRole.pm, avg 44µs/call # once (59µs+16µs) by Moose::Meta::Method::Delegation::_get_delegate_accessor at line 125 of Moose/Meta/Method/Delegation.pm
sub get_read_method {
17134104µs my $self = shift;
17234680µs35186µs my $reader = $self->reader || $self->accessor;
# spent 179µs making 34 calls to Class::MOP::Mixin::AttributeCore::reader, avg 5µs/call # spent 7µs making 1 call to Class::MOP::Mixin::AttributeCore::accessor
173 # normal case ...
17434421µs return $reader unless ref $reader;
175 # the HASH ref case
176426µs my ($name) = %$reader;
177458µs return $name;
178}
179
180sub get_write_method {
181 my $self = shift;
182 my $writer = $self->writer || $self->accessor;
183 # normal case ...
184 return $writer unless ref $writer;
185 # the HASH ref case
186 my ($name) = %$writer;
187 return $name;
188}
189
190sub get_read_method_ref {
191 my $self = shift;
192 if ((my $reader = $self->get_read_method) && $self->associated_class) {
193 return $self->associated_class->get_method($reader);
194 }
195 else {
196 my $code = sub { $self->get_value(@_) };
197 if (my $class = $self->associated_class) {
198 return $class->method_metaclass->wrap(
199 $code,
200 package_name => $class->name,
201 name => '__ANON__'
202 );
203 }
204 else {
205 return $code;
206 }
207 }
208}
209
210sub get_write_method_ref {
211 my $self = shift;
212 if ((my $writer = $self->get_write_method) && $self->associated_class) {
213 return $self->associated_class->get_method($writer);
214 }
215 else {
216 my $code = sub { $self->set_value(@_) };
217 if (my $class = $self->associated_class) {
218 return $class->method_metaclass->wrap(
219 $code,
220 package_name => $class->name,
221 name => '__ANON__'
222 );
223 }
224 else {
225 return $code;
226 }
227 }
228}
229
230# slots
231
232103124.0ms10315.08ms
# spent 22.1ms (17.0+5.08) within Class::MOP::Attribute::slots which was called 1031 times, avg 21µs/call: # 1031 times (17.0ms+5.08ms) by Class::MOP::Instance::BUILDARGS at line 31 of Class/MOP/Instance.pm, avg 21µs/call
sub slots { (shift)->name }
# spent 5.08ms making 1031 calls to Class::MOP::Mixin::AttributeCore::name, avg 5µs/call
233
234# class association
235
236
# spent 11.6ms (8.17+3.47) within Class::MOP::Attribute::attach_to_class which was called 188 times, avg 62µs/call: # 188 times (8.17ms+3.47ms) by Class::MOP::Class::_attach_attribute at line 920 of Class/MOP/Class.pm, avg 62µs/call
sub attach_to_class {
237188630µs my ($self, $class) = @_;
2381885.86ms3762.07ms (blessed($class) && $class->isa('Class::MOP::Class'))
# spent 1.10ms making 188 calls to Scalar::Util::blessed, avg 6µs/call # spent 971µs making 188 calls to UNIVERSAL::isa, avg 5µs/call
239 || confess "You must pass a Class::MOP::Class instance (or a subclass)";
2401885.36ms1881.40ms weaken($self->{'associated_class'} = $class);
# spent 1.40ms making 188 calls to Scalar::Util::weaken, avg 7µs/call
241}
242
243sub detach_from_class {
244 my $self = shift;
245 $self->{'associated_class'} = undef;
246}
247
248# method association
249
250
# spent 5.83ms within Class::MOP::Attribute::associate_method which was called 327 times, avg 18µs/call: # 255 times (4.65ms+0s) by Class::MOP::Attribute::_process_accessors at line 405, avg 18µs/call # 57 times (913µs+0s) by Class::MOP::Attribute::_process_accessors at line 377, avg 16µs/call # 15 times (265µs+0s) by Moose::Meta::Attribute::install_delegation at line 988 of Moose/Meta/Attribute.pm, avg 18µs/call
sub associate_method {
2513271.22ms my ($self, $method) = @_;
2523275.34ms push @{$self->{'associated_methods'}} => $method;
253}
254
255## Slot management
256
257
# spent 22.6ms (4.95+17.6) within Class::MOP::Attribute::set_initial_value which was called 98 times, avg 231µs/call: # 98 times (4.95ms+17.6ms) by Moose::Meta::Attribute::initialize_instance_slot at line 490 of Moose/Meta/Attribute.pm, avg 231µs/call
sub set_initial_value {
25898383µs my ($self, $instance, $value) = @_;
259984.11ms29417.6ms $self->_set_initial_slot_value(
# spent 8.11ms making 98 calls to Class::MOP::Attribute::_set_initial_slot_value, avg 83µs/call # spent 5.00ms making 86 calls to Class::MOP::Class::Immutable::Moose::Meta::Class::get_meta_instance, avg 58µs/call # spent 4.38ms making 98 calls to Class::MOP::Class::initialize, avg 45µs/call # spent 158µs making 12 calls to Class::MOP::Class::get_meta_instance, avg 13µs/call
260 Class::MOP::Class->initialize(ref($instance))->get_meta_instance,
261 $instance,
262 $value
263 );
264}
265
266237µs2343µs
# spent 384µs (41+343) within Class::MOP::Attribute::set_value which was called 2 times, avg 192µs/call: # 2 times (41µs+343µs) by Class::MOP::Class::_clone_instance at line 824 of Class/MOP/Class.pm, avg 192µs/call
sub set_value { shift->set_raw_value(@_) }
# spent 343µs making 2 calls to Class::MOP::Attribute::set_raw_value, avg 172µs/call
267
268
# spent 343µs (131+212) within Class::MOP::Attribute::set_raw_value which was called 2 times, avg 172µs/call: # 2 times (131µs+212µs) by Class::MOP::Attribute::set_value at line 266, avg 172µs/call
sub set_raw_value {
26925µs my $self = shift;
27028µs my ($instance, $value) = @_;
271
272239µs4171µs my $mi = Class::MOP::Class->initialize(ref($instance))->get_meta_instance;
# spent 97µs making 2 calls to Class::MOP::Class::Immutable::Class::MOP::Class::get_meta_instance, avg 48µs/call # spent 74µs making 2 calls to Class::MOP::Class::initialize, avg 37µs/call
273274µs441µs return $mi->set_slot_value($instance, $self->name, $value);
# spent 30µs making 2 calls to Class::MOP::Instance::set_slot_value, avg 15µs/call # spent 11µs making 2 calls to Class::MOP::Mixin::AttributeCore::name, avg 6µs/call
274}
275
276
# spent 136ms (13.0+123) within Class::MOP::Attribute::_inline_set_value which was called 560 times, avg 243µs/call: # 254 times (5.59ms+50.5ms) by Class::MOP::Class::_inline_init_attr_from_constructor at line 684 of Class/MOP/Class.pm, avg 221µs/call # 89 times (2.36ms+31.0ms) by Moose::Meta::Attribute::_inline_set_value at line 579 of Moose/Meta/Attribute.pm, avg 375µs/call # 89 times (1.95ms+14.1ms) by Class::MOP::Class::_inline_init_attr_from_default at line 705 of Class/MOP/Class.pm, avg 180µs/call # 66 times (1.70ms+11.9ms) by Moose::Meta::Class::_inline_init_attr_from_constructor at line 374 of Moose/Meta/Class.pm, avg 207µs/call # 44 times (969µs+6.81ms) by Moose::Meta::Class::_inline_init_attr_from_default at line 399 of Moose/Meta/Class.pm, avg 177µs/call # 15 times (375µs+8.42ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:118] at line 110 of Class/MOP/Method/Accessor.pm, avg 587µs/call # 3 times (73µs+493µs) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:182] at line 177 of Class/MOP/Method/Accessor.pm, avg 188µs/call
sub _inline_set_value {
2775601.59ms my $self = shift;
27856011.6ms560123ms return $self->_inline_instance_set(@_) . ';';
# spent 123ms making 560 calls to Class::MOP::Attribute::_inline_instance_set, avg 220µs/call
279}
280
281
# spent 125ms (32.8+91.9) within Class::MOP::Attribute::_inline_instance_set which was called 571 times, avg 218µs/call: # 560 times (32.1ms+91.2ms) by Class::MOP::Attribute::_inline_set_value at line 278, avg 220µs/call # 11 times (690µs+722µs) by Moose::Meta::Attribute::_inline_init_slot at line 839 of Moose/Meta/Attribute.pm, avg 128µs/call
sub _inline_instance_set {
2825711.40ms my $self = shift;
2835712.03ms my ($instance, $value) = @_;
284
28557114.7ms114263.7ms my $mi = $self->associated_class->get_meta_instance;
# spent 31.2ms making 342 calls to Class::MOP::Class::Immutable::Class::MOP::Class::get_meta_instance, avg 91µs/call # spent 29.5ms making 229 calls to Class::MOP::Class::get_meta_instance, avg 129µs/call # spent 3.03ms making 571 calls to Class::MOP::Attribute::associated_class, avg 5µs/call
28657119.3ms114228.2ms return $mi->inline_set_slot_value($instance, $self->name, $value);
# spent 24.9ms making 571 calls to Class::MOP::Instance::inline_set_slot_value, avg 44µs/call # spent 3.25ms making 571 calls to Class::MOP::Mixin::AttributeCore::name, avg 6µs/call
287}
288
28914319µs142.73ms
# spent 3.01ms (277µs+2.73) within Class::MOP::Attribute::get_value which was called 14 times, avg 215µs/call: # 14 times (277µs+2.73ms) by Moose::Meta::Mixin::AttributeCore::is_lazy or Moose::Meta::Mixin::AttributeCore::is_required or Moose::Meta::Mixin::AttributeCore::is_weak_ref or Moose::Meta::Mixin::AttributeCore::should_auto_deref or Moose::Meta::Mixin::AttributeCore::should_coerce or Moose::Meta::Mixin::AttributeCore::type_constraint at line 131 of Class/MOP/Method/Accessor.pm, avg 215µs/call
sub get_value { shift->get_raw_value(@_) }
# spent 2.73ms making 14 calls to Class::MOP::Attribute::get_raw_value, avg 195µs/call
290
291
# spent 2.73ms (979µs+1.75) within Class::MOP::Attribute::get_raw_value which was called 14 times, avg 195µs/call: # 14 times (979µs+1.75ms) by Class::MOP::Attribute::get_value at line 289, avg 195µs/call
sub get_raw_value {
2921441µs my $self = shift;
2931443µs my ($instance) = @_;
294
29514391µs281.45ms my $mi = Class::MOP::Class->initialize(ref($instance))->get_meta_instance;
# spent 711µs making 14 calls to Class::MOP::Class::initialize, avg 51µs/call # spent 698µs making 11 calls to Class::MOP::Class::Immutable::Class::MOP::Class::get_meta_instance, avg 63µs/call # spent 37µs making 3 calls to Class::MOP::Class::get_meta_instance, avg 12µs/call
29614564µs28305µs return $mi->get_slot_value($instance, $self->name);
# spent 206µs making 14 calls to Class::MOP::Instance::get_slot_value, avg 15µs/call # spent 100µs making 14 calls to Class::MOP::Mixin::AttributeCore::name, avg 7µs/call
297}
298
299
# spent 21.4ms (1.74+19.6) within Class::MOP::Attribute::_inline_get_value which was called 68 times, avg 314µs/call: # 53 times (1.37ms+17.9ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:152] at line 140 of Class/MOP/Method/Accessor.pm, avg 364µs/call # 15 times (371µs+1.73ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:118] at line 110 of Class/MOP/Method/Accessor.pm, avg 140µs/call
sub _inline_get_value {
30068209µs my $self = shift;
301681.50ms6819.6ms return $self->_inline_instance_get(@_) . ';';
# spent 19.6ms making 68 calls to Class::MOP::Attribute::_inline_instance_get, avg 289µs/call
302}
303
304
# spent 86.6ms (9.20+77.4) within Class::MOP::Attribute::_inline_instance_get which was called 155 times, avg 559µs/call: # 73 times (4.41ms+60.7ms) by Moose::Meta::Attribute::_inline_get_value at line 748 of Moose/Meta/Attribute.pm, avg 892µs/call # 68 times (3.93ms+15.7ms) by Class::MOP::Attribute::_inline_get_value at line 301, avg 289µs/call # 14 times (858µs+998µs) by Moose::Meta::Method::Accessor::_get_value at line 121 of Moose/Meta/Method/Accessor.pm, avg 133µs/call
sub _inline_instance_get {
305155428µs my $self = shift;
306155493µs my ($instance) = @_;
307
3081554.26ms31069.5ms my $mi = $self->associated_class->get_meta_instance;
# spent 68.7ms making 155 calls to Class::MOP::Class::get_meta_instance, avg 443µs/call # spent 851µs making 155 calls to Class::MOP::Attribute::associated_class, avg 5µs/call
3091555.44ms3107.88ms return $mi->inline_get_slot_value($instance, $self->name);
# spent 7.02ms making 155 calls to Class::MOP::Instance::inline_get_slot_value, avg 45µs/call # spent 859µs making 155 calls to Class::MOP::Mixin::AttributeCore::name, avg 6µs/call
310}
311
312
# spent 1.59ms (589µs+1000µs) within Class::MOP::Attribute::has_value which was called 8 times, avg 199µs/call: # 8 times (589µs+1000µs) by Moose::Meta::Mixin::AttributeCore::has_handles or Moose::Meta::Mixin::AttributeCore::has_trigger or Moose::Meta::Mixin::AttributeCore::has_type_constraint at line 193 of Class/MOP/Method/Accessor.pm, avg 199µs/call
sub has_value {
313826µs my $self = shift;
314824µs my ($instance) = @_;
315
3168197µs16804µs my $mi = Class::MOP::Class->initialize(ref($instance))->get_meta_instance;
# spent 421µs making 7 calls to Class::MOP::Class::Immutable::Class::MOP::Class::get_meta_instance, avg 60µs/call # spent 369µs making 8 calls to Class::MOP::Class::initialize, avg 46µs/call # spent 14µs making 1 call to Class::MOP::Class::get_meta_instance
3178350µs16196µs return $mi->is_slot_initialized($instance, $self->name);
# spent 139µs making 8 calls to Class::MOP::Instance::is_slot_initialized, avg 17µs/call # spent 57µs making 8 calls to Class::MOP::Mixin::AttributeCore::name, avg 7µs/call
318}
319
320
# spent 3.17ms (486µs+2.69) within Class::MOP::Attribute::_inline_has_value which was called 20 times, avg 159µs/call: # 20 times (486µs+2.69ms) by Class::MOP::Method::Accessor::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Method/Accessor.pm:207] at line 202 of Class/MOP/Method/Accessor.pm, avg 159µs/call
sub _inline_has_value {
3212058µs my $self = shift;
32220429µs202.69ms return $self->_inline_instance_has(@_) . ';';
# spent 2.69ms making 20 calls to Class::MOP::Attribute::_inline_instance_has, avg 134µs/call
323}
324
325
# spent 4.06ms (1.88+2.19) within Class::MOP::Attribute::_inline_instance_has which was called 31 times, avg 131µs/call: # 20 times (1.21ms+1.48ms) by Class::MOP::Attribute::_inline_has_value at line 322, avg 134µs/call # 11 times (667µs+708µs) by Moose::Meta::Attribute::_inline_check_lazy at line 764 of Moose/Meta/Attribute.pm, avg 125µs/call
sub _inline_instance_has {
3263187µs my $self = shift;
3273191µs my ($instance) = @_;
328
32931837µs62562µs my $mi = $self->associated_class->get_meta_instance;
# spent 399µs making 31 calls to Class::MOP::Class::get_meta_instance, avg 13µs/call # spent 164µs making 31 calls to Class::MOP::Attribute::associated_class, avg 5µs/call
330311.15ms621.62ms return $mi->inline_is_slot_initialized($instance, $self->name);
# spent 1.45ms making 31 calls to Class::MOP::Instance::inline_is_slot_initialized, avg 47µs/call # spent 172µs making 31 calls to Class::MOP::Mixin::AttributeCore::name, avg 6µs/call
331}
332
333sub clear_value {
334 my $self = shift;
335 my ($instance) = @_;
336
337 my $mi = Class::MOP::Class->initialize(ref($instance))->get_meta_instance;
338 return $mi->deinitialize_slot($instance, $self->name);
339}
340
341sub _inline_clear_value {
342 my $self = shift;
343 return $self->_inline_instance_clear(@_) . ';';
344}
345
346sub _inline_instance_clear {
347 my $self = shift;
348 my ($instance) = @_;
349
350 my $mi = $self->associated_class->get_meta_instance;
351 return $mi->inline_deinitialize_slot($instance, $self->name);
352}
353
354## load em up ...
355
3562263.10ms
# spent 2.02ms within Class::MOP::Attribute::accessor_metaclass which was called 226 times, avg 9µs/call: # 169 times (1.46ms+0s) by Class::MOP::Attribute::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Attribute.pm:401] at line 393, avg 9µs/call # 57 times (560µs+0s) by Class::MOP::Attribute::_process_accessors at line 371, avg 10µs/call
sub accessor_metaclass { 'Class::MOP::Method::Accessor' }
357
358
# spent 628ms (41.8+586) within Class::MOP::Attribute::_process_accessors which was called 312 times, avg 2.01ms/call: # 151 times (19.4ms+144ms) by Class::MOP::Attribute::install_accessors at line 419, avg 1.08ms/call # 86 times (12.6ms+359ms) by Moose::Meta::Attribute::_process_accessors at line 944 of Moose/Meta/Attribute.pm, avg 4.32ms/call # 36 times (4.62ms+31.5ms) by Class::MOP::Attribute::install_accessors at line 427, avg 1.00ms/call # 31 times (4.19ms+43.9ms) by Class::MOP::Attribute::install_accessors at line 415, avg 1.55ms/call # 8 times (973µs+7.44ms) by Class::MOP::Attribute::install_accessors at line 423, avg 1.05ms/call
sub _process_accessors {
3593121.61ms my ($self, $type, $accessor, $generate_as_inline_methods) = @_;
360
361312557µs my $method_ctx;
362
3633127.76ms3121.85ms if ( my $ctx = $self->definition_context ) {
# spent 1.85ms making 312 calls to Class::MOP::Mixin::AttributeCore::definition_context, avg 6µs/call
364 $method_ctx = { %$ctx };
365 }
366
367312857µs if (ref($accessor)) {
36857181µs (ref($accessor) eq 'HASH')
369 || confess "bad accessor/reader/writer/predicate/clearer format, must be a HASH ref";
37057482µs my ($name, $method) = %{$accessor};
371573.08ms22813.9ms $method = $self->accessor_metaclass->wrap(
# spent 12.7ms making 57 calls to Class::MOP::Method::wrap, avg 223µs/call # spent 560µs making 57 calls to Class::MOP::Attribute::accessor_metaclass, avg 10µs/call # spent 308µs making 57 calls to Class::MOP::Attribute::associated_class, avg 5µs/call # spent 295µs making 57 calls to Class::MOP::Package::name, avg 5µs/call
372 $method,
373 package_name => $self->associated_class->name,
374 name => $name,
375 definition_context => $method_ctx,
376 );
37757674µs57913µs $self->associate_method($method);
# spent 913µs making 57 calls to Class::MOP::Attribute::associate_method, avg 16µs/call
37857851µs return ($name, $method);
379 }
380 else {
3812554.26ms2551.56ms my $inline_me = ($generate_as_inline_methods && $self->associated_class->instance_metaclass->is_inlinable);
# spent 661µs making 85 calls to Class::MOP::Instance::is_inlinable, avg 8µs/call # spent 463µs making 85 calls to Class::MOP::Attribute::associated_class, avg 5µs/call # spent 432µs making 85 calls to Class::MOP::Class::instance_metaclass, avg 5µs/call
382255476µs my $method;
383
# spent 535ms (18.7+517) within Class::MOP::Attribute::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Attribute.pm:401] which was called 255 times, avg 2.10ms/call: # 255 times (18.7ms+517ms) by Try::Tiny::try at line 76 of Try/Tiny.pm, avg 2.10ms/call
try {
384255739µs if ( $method_ctx ) {
38584499µs my $desc = "accessor $accessor";
386842.17ms98540µs if ( $accessor ne $self->name ) {
# spent 540µs making 98 calls to Class::MOP::Mixin::AttributeCore::name, avg 6µs/call
387 $desc .= " of attribute " . $self->name;
388 }
389
39084575µs $method_ctx->{description} = $desc;
391 }
392
39325516.4ms1020516ms $method = $self->accessor_metaclass->new(
# spent 511ms making 255 calls to Class::MOP::Method::Accessor::new, avg 2.00ms/call # spent 1.53ms making 255 calls to Class::MOP::Attribute::associated_class, avg 6µs/call # spent 1.46ms making 169 calls to Class::MOP::Attribute::accessor_metaclass, avg 9µs/call # spent 1.27ms making 255 calls to Class::MOP::Package::name, avg 5µs/call # spent 805µs making 86 calls to Moose::Meta::Attribute::accessor_metaclass, avg 9µs/call
394 attribute => $self,
395 is_inline => $inline_me,
396 accessor_type => $type,
397 package_name => $self->associated_class->name,
398 name => $accessor,
399 definition_context => $method_ctx,
400 );
401 }
402 catch {
403 confess "Could not create the '$type' method for " . $self->name . " because : $_";
40425514.7ms5104.99ms };
# spent 4.99ms making 255 calls to Try::Tiny::catch, avg 20µs/call # spent 558ms making 255 calls to Try::Tiny::try, avg 2.19ms/call, recursion: max depth 2, sum of overlapping time 558ms
4052554.05ms2554.65ms $self->associate_method($method);
# spent 4.65ms making 255 calls to Class::MOP::Attribute::associate_method, avg 18µs/call
4062553.92ms return ($accessor, $method);
407 }
408}
409
410
# spent 869ms (40.3+828) within Class::MOP::Attribute::install_accessors which was called 257 times, avg 3.38ms/call: # 116 times (18.1ms+145ms) by Class::MOP::Class::__ANON__[/home/doy/coding/src/Class-MOP/blib/lib//Class/MOP/Class.pm:932] at line 931 of Class/MOP/Class.pm, avg 1.40ms/call # 73 times (12.3ms+463ms) by Moose::Meta::Attribute::install_accessors at line 884 of Moose/Meta/Attribute.pm, avg 6.51ms/call # 68 times (9.81ms+221ms) by Class::MOP::Class::_inline_accessors at line 1446 of Class/MOP/Class.pm, avg 3.39ms/call
sub install_accessors {
411257806µs my $self = shift;
412257635µs my $inline = shift;
4132575.37ms2571.58ms my $class = $self->associated_class;
# spent 1.58ms making 257 calls to Class::MOP::Attribute::associated_class, avg 6µs/call
414
4152575.03ms383134ms $class->add_method(
# spent 63.6ms making 11 calls to Moose::Meta::Attribute::_process_accessors, avg 5.78ms/call # spent 48.1ms making 31 calls to Class::MOP::Attribute::_process_accessors, avg 1.55ms/call # spent 19.0ms making 42 calls to Class::MOP::Mixin::HasMethods::add_method, avg 453µs/call # spent 3.04ms making 257 calls to Class::MOP::Mixin::AttributeCore::has_accessor, avg 12µs/call # spent 237µs making 42 calls to Class::MOP::Mixin::AttributeCore::accessor, avg 6µs/call
416 $self->_process_accessors('accessor' => $self->accessor(), $inline)
417 ) if $self->has_accessor();
418
41925711.7ms896566ms $class->add_method(
# spent 307ms making 62 calls to Moose::Meta::Attribute::_process_accessors, avg 4.95ms/call # spent 164ms making 151 calls to Class::MOP::Attribute::_process_accessors, avg 1.08ms/call # spent 91.5ms making 213 calls to Class::MOP::Mixin::HasMethods::add_method, avg 430µs/call # spent 2.91ms making 257 calls to Class::MOP::Mixin::AttributeCore::has_reader, avg 11µs/call # spent 1.24ms making 213 calls to Class::MOP::Mixin::AttributeCore::reader, avg 6µs/call
420 $self->_process_accessors('reader' => $self->reader(), $inline)
421 ) if $self->has_reader();
422
4232574.23ms29942.9ms $class->add_method(
# spent 25.6ms making 6 calls to Moose::Meta::Attribute::_process_accessors, avg 4.27ms/call # spent 8.41ms making 8 calls to Class::MOP::Attribute::_process_accessors, avg 1.05ms/call # spent 5.66ms making 14 calls to Class::MOP::Mixin::HasMethods::add_method, avg 404µs/call # spent 3.15ms making 257 calls to Class::MOP::Mixin::AttributeCore::has_writer, avg 12µs/call # spent 79µs making 14 calls to Class::MOP::Mixin::AttributeCore::writer, avg 6µs/call
424 $self->_process_accessors('writer' => $self->writer(), $inline)
425 ) if $self->has_writer();
426
4272575.03ms38681.4ms $class->add_method(
# spent 36.1ms making 36 calls to Class::MOP::Attribute::_process_accessors, avg 1.00ms/call # spent 23.9ms making 7 calls to Moose::Meta::Attribute::_process_accessors, avg 3.42ms/call # spent 18.2ms making 43 calls to Class::MOP::Mixin::HasMethods::add_method, avg 424µs/call # spent 2.82ms making 257 calls to Class::MOP::Mixin::AttributeCore::has_predicate, avg 11µs/call # spent 243µs making 43 calls to Class::MOP::Mixin::AttributeCore::predicate, avg 6µs/call
428 $self->_process_accessors('predicate' => $self->predicate(), $inline)
429 ) if $self->has_predicate();
430
4312573.19ms2572.60ms $class->add_method(
# spent 2.60ms making 257 calls to Class::MOP::Mixin::AttributeCore::has_clearer, avg 10µs/call
432 $self->_process_accessors('clearer' => $self->clearer(), $inline)
433 ) if $self->has_clearer();
434
4352573.41ms return;
436}
437
438{
43914µs my $_remove_accessor = sub {
440 my ($accessor, $class) = @_;
441 if (ref($accessor) && ref($accessor) eq 'HASH') {
442 ($accessor) = keys %{$accessor};
443 }
444 my $method = $class->get_method($accessor);
445 $class->remove_method($accessor)
446 if (ref($method) && $method->isa('Class::MOP::Method::Accessor'));
447112µs };
448
449 sub remove_accessors {
450 my $self = shift;
451 # TODO:
452 # we really need to make sure to remove from the
453 # associates methods here as well. But this is
454 # such a slimly used method, I am not worried
455 # about it right now.
456 $_remove_accessor->($self->accessor(), $self->associated_class()) if $self->has_accessor();
457 $_remove_accessor->($self->reader(), $self->associated_class()) if $self->has_reader();
458 $_remove_accessor->($self->writer(), $self->associated_class()) if $self->has_writer();
459 $_remove_accessor->($self->predicate(), $self->associated_class()) if $self->has_predicate();
460 $_remove_accessor->($self->clearer(), $self->associated_class()) if $self->has_clearer();
461 return;
462 }
463
464}
465
466115µs1;
467
468__END__