more whitespace removal (from Michael G Schwern)
[p5sagit/p5-mst-13.2.git] / lib / Exporter / Heavy.pm
index f049e72..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,
@@ -179,6 +179,7 @@ sub heavy_export_to_level
 {
       my $pkg = shift;
       my $level = shift;
+      (undef) = shift;                 # XXX redundant arg
       my $callpkg = caller($level);
       $pkg->export($callpkg, @_);
 }
@@ -212,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")