X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP.pm;h=c4b9933af665e74651dccba00ab838d456783209;hb=92e250b0af746085306392cd25e053f3000ca3d3;hp=45874698bd60d8ea3a2c41847ad9f1fcd95d5b4e;hpb=fea440458d576b905b932dc475c2e14f0e999c82;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 4587469..c4b9933 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -31,7 +31,7 @@ BEGIN { *check_package_cache_flag = \&mro::get_pkg_gen; } -our $VERSION = '0.67'; +our $VERSION = '0.69_01'; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -125,8 +125,7 @@ sub load_first_existing_class { } } - return get_metaclass_by_name($found) || $found - if $found; + return $found if $found; confess join( "\n", @@ -155,7 +154,8 @@ sub _try_load_one_class { } sub load_class { - load_first_existing_class($_[0]); + my $class = load_first_existing_class($_[0]); + return get_metaclass_by_name($class) || $class; } sub _is_valid_class_name { @@ -950,9 +950,8 @@ B Given a list of class names, this function will attempt to load each one in turn. -If it finds a class it can load, it will return that class's -metaclass. If none of the classes can be loaded, it will throw an -exception. +If it finds a class it can load, it will return that class' name. +If none of the classes can be loaded, it will throw an exception. =back