X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fmetaclass.pm;h=90c5af613563f7afb011251d5fe28bb17d9bd6fb;hb=5eddddd664f6ff31e984aa6247ddd4b3b5227edc;hp=138108aab42274f68a43111a33c6b6039cb8c140;hpb=df7077cdfcea7ebdedef42da0082b43d6129ca7a;p=gitmo%2FClass-MOP.git diff --git a/lib/metaclass.pm b/lib/metaclass.pm index 138108a..90c5af6 100644 --- a/lib/metaclass.pm +++ b/lib/metaclass.pm @@ -7,7 +7,7 @@ use warnings; use Carp 'confess'; use Scalar::Util 'blessed'; -our $VERSION = '0.64_03'; +our $VERSION = '0.91'; $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 Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2008 by Infinity Interactive, Inc. +Copyright 2006-2009 by Infinity Interactive, Inc. L