Instead of loading by path, we let Perl do its thing and load by
[gitmo/Class-MOP.git] / lib / Class / MOP.pm
index a646e00..cbe2eae 100644 (file)
@@ -48,7 +48,7 @@ BEGIN {
         : sub () { 1 };
 }
 
-our $VERSION   = '0.64_04';
+our $VERSION   = '0.64_06';
 our $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';    
@@ -104,9 +104,7 @@ sub load_class {
     # if the class is not already loaded in the symbol table..
     unless (is_class_loaded($class)) {
         # require it
-        my $file = $class . '.pm';
-        $file =~ s{::}{/}g;
-        my $e = do { local $@; eval { require($file) }; $@ };
+        my $e = do { local $@; eval "require $class"; $@ };
         confess "Could not load class ($class) because : $e" if $e;
     }