more whitespace removal (from Michael G Schwern)
[p5sagit/p5-mst-13.2.git] / lib / Exporter / Heavy.pm
index 95ffc55..6647f70 100644 (file)
@@ -11,7 +11,7 @@ Exporter::Heavy - Exporter guts
 =head1 DESCRIPTION
 
 No user-serviceable parts inside.
+
 =cut
 #
 # We go to a lot of trouble not to 'require Carp' at file scope,
@@ -213,7 +213,8 @@ sub require_version {
     my $version = ${"${pkg}::VERSION"};
     if (!$version or $version < $wanted) {
        $version ||= "(undef)";
-       my $file = $INC{"$pkg.pm"};
+           # %INC contains slashes, but $pkg contains double-colons.
+       my $file = (map {s,::,/,g; $INC{$_}} "$pkg.pm")[0];
        $file &&= " ($file)";
        require Carp;
        Carp::croak("$pkg $wanted required--this is only version $version$file")