From: JD Laub Date: Fri, 12 Nov 1999 08:58:28 +0000 (-0700) Subject: [ID 19991112.002] patch: Exporter.pm not reporting path X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=767440f46f463f51b4463f7f2470eafa206b1367;p=p5sagit%2Fp5-mst-13.2.git [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 --- diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm index 95ffc55..1f9b432 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")