[Moose-commits] r7258 - Moose/branches/meta-independence/lib
sartak at code2.0beta.co.uk
sartak at code2.0beta.co.uk
Wed Jan 7 15:39:45 GMT 2009
Author: sartak
Date: 2009-01-07 07:39:45 -0800 (Wed, 07 Jan 2009)
New Revision: 7258
Modified:
Moose/branches/meta-independence/lib/Moose.pm
Log:
We (will) no longer need to worry about a locally-defined method named "meta"
Modified: Moose/branches/meta-independence/lib/Moose.pm
===================================================================
--- Moose/branches/meta-independence/lib/Moose.pm 2009-01-07 15:22:04 UTC (rev 7257)
+++ Moose/branches/meta-independence/lib/Moose.pm 2009-01-07 15:39:45 UTC (rev 7258)
@@ -195,25 +195,7 @@
$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 {
More information about the Moose-commits
mailing list