=head1 DESCRIPTION
No user-serviceable parts inside.
-
+
=cut
#
# We go to a lot of trouble not to 'require Carp' at file scope,
{
my $pkg = shift;
my $level = shift;
+ (undef) = shift; # XXX redundant arg
my $callpkg = caller($level);
$pkg->export($callpkg, @_);
}
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")