X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fmetaclass.pm;h=7e1a292b6df3e316ceead501f8db169748f3cca3;hb=4fbd4b9bca7c0d3fead3f42a49e3671a6e7fc54f;hp=51a7ceabd5dd9c8d3015327de89cf75a17b71e8b;hpb=f65af096d1abfd83aea3cde248e6a5886aee648c;p=gitmo%2FClass-MOP.git diff --git a/lib/metaclass.pm b/lib/metaclass.pm index 51a7cea..7e1a292 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_04'; +our $VERSION = '0.98'; $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-2010 by Infinity Interactive, Inc. L