From: Shawn M Moore Date: Wed, 7 Jan 2009 15:39:45 +0000 (+0000) Subject: We (will) no longer need to worry about a locally-defined method named "meta" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=255a58948e874f0a84af8ea2f196fffc52019a5f;p=gitmo%2FMoose.git We (will) no longer need to worry about a locally-defined method named "meta" --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 45ac965..62d1f43 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -195,25 +195,7 @@ sub init_meta { $meta = $metaclass->initialize($class); } - if ( $class->can('meta') ) { - # check 'meta' method - - # it may be inherited - - # NOTE: - # this is the case where the metaclass pragma - # was used before the 'use Moose' statement to - # override a specific class - my $method_meta = $class->meta; - - ( blessed($method_meta) && $method_meta->isa('Moose::Meta::Class') ) - || Moose->throw_error("$class already has a &meta function, but it does not return a Moose::Meta::Class ($meta)"); - - $meta = $method_meta; - } - unless ( $meta->has_method("meta") ) { # don't overwrite - # also check for inherited non moose 'meta' method? # FIXME also skip this if the user requested by passing an option $meta->add_method( 'meta' => sub {