X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FAttribute.pm;h=b6b3f521327e659091fbafe60be08251336c36b9;hb=ec9e38e5fd24916a3b5a4b67b5e7c7d20674d0f5;hp=3e416528ce9b68eb3d4db4ffb2cfa105c6ecc08b;hpb=dbea6de4246cb1d75716f20bf5863ca4e15671a1;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index 3e41652..b6b3f52 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -57,6 +57,10 @@ sub new { sub _new { my $class = shift; + + return Class::MOP::Class->initialize($class)->new_object(@_) + if $class ne __PACKAGE__; + my $options = @_ == 1 ? $_[0] : {@_}; bless {