Checking in changes prior to tagging of version 0.68.
[gitmo/Mouse.git] / lib / Mouse / Util.pm
index 01e0da5..75e2ba5 100644 (file)
@@ -1,9 +1,11 @@
 package Mouse::Util;
 use Mouse::Exporter; # enables strict and warnings
 
-sub get_linear_isa($;$); # must be here
+# must be here because it will be refered by other modules loaded
+sub get_linear_isa($;$); ## no critic
 
-sub install_subroutines { # must be here
+# must be here because it will called in Mouse::Exporter
+sub install_subroutines {
     my $into = shift;
 
     while(my($name, $code) = splice @_, 0, 2){
@@ -50,9 +52,9 @@ BEGIN{
     # Because Mouse::Util is loaded first in all the Mouse sub-modules,
     # XS loader is placed here, not in Mouse.pm.
 
-    our $VERSION = '0.50_08';
+    our $VERSION = '0.68';
 
-    my $xs = !(exists $INC{'Mouse/PurePerl.pm'} || $ENV{MOUSE_PUREPERL});
+    my $xs = !(exists $INC{'Mouse/PurePerl.pm'} || $ENV{MOUSE_PUREPERL} || $ENV{PERL_ONLY});
 
     if($xs){
         # XXX: XSLoader tries to get the object path from caller's file name
@@ -242,7 +244,6 @@ sub load_first_existing_class {
 }
 
 # taken from Class/MOP.pm
-my %is_class_loaded_cache;
 sub _try_load_one_class {
     my $class = shift;
 
@@ -251,7 +252,7 @@ sub _try_load_one_class {
         Carp::confess "Invalid class name ($display)";
     }
 
-    return undef if $is_class_loaded_cache{$class} ||= is_class_loaded($class);
+    return '' if is_class_loaded($class);
 
     $class  =~ s{::}{/}g;
     $class .= '.pm';
@@ -364,7 +365,7 @@ Mouse::Util - Features, with or without their dependencies
 
 =head1 VERSION
 
-This document describes Mouse version 0.50_08
+This document describes Mouse version 0.68
 
 =head1 IMPLEMENTATIONS FOR