X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fmetaclass.pm;h=fba087451f43c46e235734f1c6c0be3d03f8faea;hb=325efa88a7818d836e232b616cf218e6b70c3067;hp=eccb380e33dbe4121e4ff9fd60adf9196ac131b2;hpb=94278c1ba6283af20c09a6aef615954825d08162;p=gitmo%2FClass-MOP.git diff --git a/lib/metaclass.pm b/lib/metaclass.pm index eccb380..fba0874 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.65'; +our $VERSION = '0.93'; $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