summaryrefslogtreecommitdiff
path: root/t/op/local.t
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>1998-02-03 04:16:50 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 14:56:30 +0000
commit85aff5773f2412a54180cc35f86370c56b65bf77 (patch)
tree58aa1481b34d450e99d317950157b92887658fa2 /t/op/local.t
parente1c148c28bf3335bbd0ad9a2070b0917265c00c3 (diff)
downloadperl-85aff5773f2412a54180cc35f86370c56b65bf77.tar.gz
Some Chip patches (some tweaked to match _5x source):
Subject: [PATCH] local leakage Date: Tue, 3 Feb 1998 09:16:50 -0500 (EST) Subject: [PATCH] NULs in patterns Date: Wed, 4 Feb 1998 01:33:51 -0500 (EST) Subject: [PATCH] Configure on PerlIO Date: Wed, 4 Feb 1998 01:38:43 -0500 (EST) Subject: [PATCH] Avoid core dump on package alias Date: Wed, 4 Feb 1998 15:38:42 -0500 (EST) Subject: [PATCH] Fix name of $Foo::{'Bar::'} Date: Wed, 4 Feb 1998 16:37:51 -0500 (EST) p4raw-id: //depot/perl@462
Diffstat (limited to 't/op/local.t')
-rwxr-xr-xt/op/local.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/local.t b/t/op/local.t
index f527c9c9a9..3e30306218 100755
--- a/t/op/local.t
+++ b/t/op/local.t
@@ -2,7 +2,7 @@
# $RCSfile: local.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:04 $
-print "1..23\n";
+print "1..24\n";
sub foo {
local($a, $b) = @_;
@@ -52,3 +52,9 @@ print +($@ =~ /Can't localize through a reference/) ? "" : "not ", "ok 22\n";
eval 'local(%$e)';
print +($@ =~ /Can't localize through a reference/) ? "" : "not ", "ok 23\n";
+
+# check for scope leakage
+$a = 'outer';
+if (1) { local $a = 'inner' }
+print +($a eq 'outer') ? "" : "not ", "ok 24\n";
+