From: Jesse Luehrs Date: Sun, 7 Feb 2010 05:32:12 +0000 (-0600) Subject: explicitly call ->meta for ::Object and ::Mixin, so they get cached X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fattic%2Ftopic%2Fnonmoose_gets_cmop_meta;p=gitmo%2FClass-MOP.git explicitly call ->meta for ::Object and ::Mixin, so they get cached --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index d79c0ac..05b299d 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -656,6 +656,10 @@ Class::MOP::Instance->meta->add_attribute( ), ); +# cache the metaclasses for ::Object and ::Mixin, since they don't get this +# done above (because they have no attributes to add) +$_->meta for qw(Class::MOP::Object Class::MOP::Mixin); + require Class::MOP::Deprecated unless our $no_deprecated; # we need the meta instance of the meta instance to be created now, in order