diff options
Diffstat (limited to 'lib/Exporter')
-rw-r--r-- | lib/Exporter/Heavy.pm | 3 |
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") |