diff options
author | Stephen McCamant <smcc@mit.edu> | 1998-05-31 07:56:14 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-06-10 07:56:06 +0000 |
commit | 640b9ef65a730c6484f9d9597619ff4535510ea6 (patch) | |
tree | 3a32f39a6e8e6123a1b763a44e5c2ea2c0112b29 /t | |
parent | 20e9db593ef4f0b3ec4e4dbedd03ab5782525eaf (diff) | |
download | perl-640b9ef65a730c6484f9d9597619ff4535510ea6.tar.gz |
Added patch, regenerated perly.c and perly.c.diff
Message-Id: <m0ygCL8-000Eb3C@alias-2.pr.mcs.net>
Subject: [PATCH] too many RV2GVs in *foo{THING}
p4raw-id: //depot/perl@1112
Diffstat (limited to 't')
-rwxr-xr-x | t/op/gv.t | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -4,7 +4,7 @@ # various typeglob tests # -print "1..16\n"; +print "1..23\n"; # type coersion on assignment $foo = 'foo'; @@ -83,3 +83,16 @@ print +($foo || @foo || %foo) ? "not ok" : "ok", " 14\n"; *foo = undef; print $msg ? "ok" : "not ok", " 16\n"; } + +# test *glob{THING} syntax +$x = "ok 17\n"; +@x = ("ok 18\n"); +%x = ("ok 19" => "\n"); +sub x { "ok 20\n" } +print ${*x{SCALAR}}, @{*x{ARRAY}}, %{*x{HASH}}, &{*x{CODE}}; +*x = *STDOUT; +print *{*x{GLOB}} eq "*main::STDOUT" ? "ok 21\n" : "not ok 21\n"; +print {*x{IO}} "ok 22\n"; +print {*x{FILEHANDLE}} "ok 23\n"; + + |