diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-01 18:18:34 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-01 18:18:34 +0000 |
commit | 7c8d2b2109deeb6d2652b240018487f91c577a6c (patch) | |
tree | 8a39159a4ec547ff1c42d40a0cacb59f0c4278b2 /lib/Exporter | |
parent | bb2cbcd1ec679f28ec7f1a4f685707a368d32502 (diff) | |
download | perl-7c8d2b2109deeb6d2652b240018487f91c577a6c.tar.gz |
(replaced by #13556)
If we are inside an eval, let's be silent about
separate symbols and just croak() in the end.
p4raw-id: //depot/perl@13408
Diffstat (limited to 'lib/Exporter')
-rw-r--r-- | lib/Exporter/Heavy.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Exporter/Heavy.pm b/lib/Exporter/Heavy.pm index abdae6c4b6..76a5bad17c 100644 --- a/lib/Exporter/Heavy.pm +++ b/lib/Exporter/Heavy.pm @@ -126,8 +126,13 @@ sub heavy_export { last; } } elsif ($sym !~ s/^&// || !$export_cache->{$sym}) { - require Carp; - Carp::carp(qq["$sym" is not exported by the $pkg module]); + unless ($^S) { + # If we are trying to trap import of non-existent + # symbols using eval, let's be silent for now and + # just croak in the end. + require Carp; + Carp::carp(qq["$sym" is not exported by the $pkg module]); + } $oops++; } } |