From: Chris Prather Date: Sat, 15 Mar 2008 18:44:32 +0000 (+0000) Subject: export metaclass() to give a functional export for __PACKAGE__->meta X-Git-Tag: 0_55~275 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eee3f27c59845e6d4ae356590e299f52a9c1b709;p=gitmo%2FMoose.git export metaclass() to give a functional export for __PACKAGE__->meta -- the make_immutable export is a degenerate version of this and it's causing problems with debugging if you forget to unimport it --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 6ad45b6..09a9603 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -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 {