export metaclass() to give a functional export for __PACKAGE__->meta
Chris Prather [Sat, 15 Mar 2008 18:44:32 +0000 (18:44 +0000)]
-- the make_immutable export is a degenerate version of this and it's causing problems with debugging if you forget to unimport it

lib/Moose.pm

index 6ad45b6..09a9603 100644 (file)
@@ -165,6 +165,12 @@ use Moose::Util ();
                 $class->meta->add_augment_method_modifier( $name => $method );
             };
         },
+        metaclass => sub {
+            my $class = $CALLER;
+            return subname 'Moose::metaclass' => sub { 
+                $class->meta;
+            };
+        },
         make_immutable => sub {
             my $class = $CALLER;
             return subname 'Moose::make_immutable' => sub {