diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-12-18 00:22:03 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-17 23:54:41 +0000 |
commit | fa1bb02feecc6f4fdaff36b2895f96803af07c6a (patch) | |
tree | 078ee37f6b61d6439602eaf105ea2b34a0583561 /lib/Exporter.pm | |
parent | 77bc9082d5f32bccec35cc0887964884d1ca682b (diff) | |
download | perl-fa1bb02feecc6f4fdaff36b2895f96803af07c6a.tar.gz |
slightly more for Exporter.pm
Message-ID: <20011218002203.M21702@plum.flirble.org>
p4raw-id: //depot/perl@13748
Diffstat (limited to 'lib/Exporter.pm')
-rw-r--r-- | lib/Exporter.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Exporter.pm b/lib/Exporter.pm index daa78d5641..bd55160f87 100644 --- a/lib/Exporter.pm +++ b/lib/Exporter.pm @@ -47,14 +47,15 @@ sub import { s/^&//, $export_cache->{$_} = 1 foreach (@$exports, @{"$pkg\::EXPORT_OK"}); } - my $heavy = $Verbose || $Debug; - unless ($heavy) { - # Try very hard not to use {} and hence have to enter scope on the foreach - # We bomb out of the loop with last as soon as heavy is set. + my $heavy; + # Try very hard not to use {} and hence have to enter scope on the foreach + # We bomb out of the loop with last as soon as heavy is set. + if ($args or $fail) { ($heavy = (/\W/ or $args and not exists $export_cache->{$_} - or @$fail and $_ eq $fail->[0] - or (@{"$pkg\::EXPORT_OK"} and $_ eq ${"$pkg\::EXPORT_OK"}[0]))) - and last + or @$fail and $_ eq $fail->[0])) and last + foreach (@_); + } else { + ($heavy = /\W/) and last foreach (@_); } return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy; |