M.J.T. Guy [Fri, 13 Jun 1997 04:08:45 +0000 (16:08 +1200)]
If you attempt to import a symbol which a module doesn't export, the
error is reported as in Exporter.pm rather than in the offending module,
because Exporter.pm uses warn instead of carp. Patch attached.
(Against either 5.004 or 5.004_01.)
p5p-msgid: E0wdJra-0000n8-00@taurus.cus.cam.ac.uk
last;
}
} elsif ($sym !~ s/^&// || !$exports{$sym}) {
- warn qq["$sym" is not exported by the $pkg module];
+ require Carp;
+ Carp::carp(qq["$sym" is not exported by the $pkg module]);
$oops++;
}
}
if (@failed) {
@failed = $pkg->export_fail(@failed);
foreach $sym (@failed) {
- warn qq["$sym" is not implemented by the $pkg module ],
- "on this architecture";
+ require Carp;
+ Carp::carp(qq["$sym" is not implemented by the $pkg module ],
+ "on this architecture");
}
if (@failed) {
require Carp;