Include method name in immutable methods (fixes #49680)
[gitmo/Class-MOP.git] / lib / metaclass.pm
index b0539c3..11ebac8 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use Carp         'confess';
 use Scalar::Util 'blessed';
 
-our $VERSION   = '0.64_06';
+our $VERSION   = '0.92_01';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -31,10 +31,10 @@ sub import {
         || confess "The metaclass ($metaclass) must be derived from Class::MOP::Class";
 
     # make sure the custom metaclasses get loaded
-    foreach my $class (grep { 
-                            /^(attribute|method|instance)_metaclass/ 
-                        } keys %options) {
-        Class::MOP::load_class($options{$class})
+    foreach my $key (grep { /_(?:meta)?class$/ } keys %options) {
+        unless ( ref( my $class = $options{$key} ) ) {
+            Class::MOP::load_class($class)
+        }
     }
 
     my $package = caller();
@@ -99,7 +99,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>