summaryrefslogtreecommitdiff
path: root/lib/Exporter
diff options
context:
space:
mode:
authorJD Laub <jdl@access-health.com>1999-11-12 01:58:28 -0700
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-13 18:03:52 +0000
commit767440f46f463f51b4463f7f2470eafa206b1367 (patch)
tree3c726ff870dd87803d86cd4a40e3647a15700a00 /lib/Exporter
parenta85d71bc598e6f8a919997b62e4449e29d1fbb95 (diff)
downloadperl-767440f46f463f51b4463f7f2470eafa206b1367.tar.gz
[ID 19991112.002] patch: Exporter.pm not reporting path
To: perl5-porters@perl.org Message-Id: <199911121558.IAA08915@mocha.iasi.com> p4raw-id: //depot/cfgperl@4567
Diffstat (limited to 'lib/Exporter')
-rw-r--r--lib/Exporter/Heavy.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm
index 95ffc554be..1f9b432514 100644
--- a/lib/Exporter/Heavy.pm
+++ b/lib/Exporter/Heavy.pm
@@ -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")