more whitespace removal (from Michael G Schwern)
[p5sagit/p5-mst-13.2.git] / lib / Exporter / Heavy.pm
index f7e95e2..6647f70 100644 (file)
@@ -1,5 +1,18 @@
 package Exporter;
 
+=head1 NAME
+
+Exporter::Heavy - Exporter guts
+
+=head1 SYNOPIS
+
+(internal use only)
+
+=head1 DESCRIPTION
+
+No user-serviceable parts inside.
+
+=cut
 #
 # We go to a lot of trouble not to 'require Carp' at file scope,
 #  because Carp requires Exporter, and something has to give.
@@ -166,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, @_);
 }
@@ -199,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")