[svn:Module-Build] r13122 - in Module-Build/trunk: . lib/Module/Build

[email protected] Sun, 26 Jul 2009 19:48:50 -0700 (PDT)
Newsgroups perl.module.build.checkins
Message-ID <[email protected]>
Author: dagolden
Date: Sun Jul 26 19:48:49 2009
New Revision: 13122

Modified:
   Module-Build/trunk/Changes
   Module-Build/trunk/lib/Module/Build/Version.pm

Log:
updated M::B::Version to match version.pm 0.77 on CPAN

Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes	(original)
+++ Module-Build/trunk/Changes	Sun Jul 26 19:48:49 2009
@@ -2,6 +2,10 @@
 
 0.34_02 - 
 
+ Bug-fixes:
+ - Bundled Module::Build::Version updated to bring into sync with CPAN
+   version.pm 0.77
+
 0.34_01 - Sat Jul 18 16:32:09 EDT 2009
 
  Enhancements:

Modified: Module-Build/trunk/lib/Module/Build/Version.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Version.pm	(original)
+++ Module-Build/trunk/lib/Module/Build/Version.pm	Sun Jul 26 19:48:49 2009
@@ -628,17 +628,13 @@
     my $class = ref($obj) || $obj;
 
     no strict 'refs';
-    unless (%{"$class\::"}) { # class not already loaded
-       eval "require $class";
-       return undef if $@ =~ /Can't locate/ and not defined $req;
-    }
-    
-    if ( not %{"$class\::"} and $] >= 5.008) { # file but no package
+    if ( exists $INC{"$class.pm"} and not %{"$class\::"} and $] >= 5.008) {
+	 # file but no package
 	require Carp;
 	Carp::croak( "$class defines neither package nor VERSION"
 	    ."--version check failed");
     }
-    
+
     my $version = eval "\$$class\::VERSION";
     if ( defined $version ) {
 	local $^W if $] <= 5.008;