From: nperez Date: Fri, 8 May 2009 18:08:23 +0000 (-0500) Subject: Add bootstrapping code for insertion_order in Attribute.pm X-Git-Tag: 0.84~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95b67145fa85b30e5d1f992545321ecaa0ecb63a;p=gitmo%2FClass-MOP.git Add bootstrapping code for insertion_order in Attribute.pm --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 6ca3bbc..bdc1783 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -507,6 +507,14 @@ Class::MOP::Attribute->meta->add_attribute( )) ); +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 }, + predicate => { 'has_insertion_order' => \&Class::MOP::Attribute::has_insertion_order }, + )) +); + Class::MOP::Attribute->meta->add_method('clone' => sub { my $self = shift; $self->meta->clone_object($self, @_);