Class::MOP::Attribute->meta->add_attribute(
Class::MOP::Attribute->new('insertion_order' => (
reader => { 'insertion_order' => \&Class::MOP::Attribute::insertion_order },
- writer => { 'set_insertion_order' => \&Class::MOP::Attribute::set_insertion_order },
+ writer => { '_set_insertion_order' => \&Class::MOP::Attribute::_set_insertion_order },
predicate => { 'has_insertion_order' => \&Class::MOP::Attribute::has_insertion_order },
))
);
sub initializer { $_[0]->{'initializer'} }
sub definition_context { $_[0]->{'definition_context'} }
sub insertion_order { $_[0]->{'insertion_order'} }
-sub set_insertion_order { $_[0]->{'insertion_order'} = $_[1] }
+sub _set_insertion_order { $_[0]->{'insertion_order'} = $_[1] }
# end bootstrapped away method section.
# (all methods below here are kept intact)
# get our count of previously inserted attributes and
# increment by one so this attribute knows its order
my $order = (scalar keys %{$self->get_attribute_map}) - 1;
- $attribute->set_insertion_order($order + 1);
+ $attribute->_set_insertion_order($order + 1);
# then onto installing the new accessors
$self->get_attribute_map->{$attribute->name} = $attribute;