diff options
author | Chip Salzenberg <chip@pobox.com> | 1998-02-03 04:16:50 -0500 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-02-06 14:56:30 +0000 |
commit | 85aff5773f2412a54180cc35f86370c56b65bf77 (patch) | |
tree | 58aa1481b34d450e99d317950157b92887658fa2 /t | |
parent | e1c148c28bf3335bbd0ad9a2070b0917265c00c3 (diff) | |
download | perl-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')
-rwxr-xr-x | t/op/gv.t | 10 | ||||
-rwxr-xr-x | t/op/local.t | 8 |
2 files changed, 16 insertions, 2 deletions
@@ -4,7 +4,7 @@ # various typeglob tests # -print "1..11\n"; +print "1..13\n"; # type coersion on assignment $foo = 'foo'; @@ -57,3 +57,11 @@ if (defined $baa) { print ref(\$baa) eq 'GLOB' ? "ok 11\n" : "not ok 11\n"; } +# nested package globs +# NOTE: It's probably OK if these semantics change, because the +# fact that %X::Y:: is stored in %X:: isn't documented. +# (I hope.) + +{ package Foo::Bar } +print exists $Foo::{'Bar::'} ? "ok 12\n" : "not ok 12\n"; +print $Foo::{'Bar::'} eq '*Foo::Bar::' ? "ok 13\n" : "not ok 13\n"; 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"; + |