Change 13748 by jhi@alpha on 2001/12/17 23:54:41
Subject: [PATCH] slightly more for Exporter.pm
From: Nicholas Clark <[EMAIL PROTECTED]>
Date: Tue, 18 Dec 2001 00:22:03 +0000
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/lib/Exporter.pm#23 edit
Differences ...
==== //depot/perl/lib/Exporter.pm#23 (text) ====
Index: perl/lib/Exporter.pm
--- perl/lib/Exporter.pm.~1~ Mon Dec 17 17:00:05 2001
+++ perl/lib/Exporter.pm Mon Dec 17 17:00:05 2001
@@ -47,14 +47,15 @@
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;
End of Patch.