diff options
author | Simon Cozens <simon@netthink.co.uk> | 2000-12-27 02:30:03 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-28 22:59:16 +0000 |
commit | d32f2495b04e916e41d6514e2a6126c7223b49c9 (patch) | |
tree | d2bc308597a2f631eff0c83a1337d1f1582a352d /t/pragma | |
parent | f72d64f00dcc19f7e88984b22d52340f7101e18f (diff) | |
download | perl-d32f2495b04e916e41d6514e2a6126c7223b49c9.tar.gz |
lvalue AUTOLOAD. No, really.
Message-ID: <20001227023003.A7677@deep-dark-truthful-mirror.perlhacker.org>
p4raw-id: //depot/perl@8243
Diffstat (limited to 't/pragma')
-rwxr-xr-x | t/pragma/sub_lval.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/pragma/sub_lval.t b/t/pragma/sub_lval.t index 660e72d646..1b8b73a7d8 100755 --- a/t/pragma/sub_lval.t +++ b/t/pragma/sub_lval.t @@ -1,4 +1,4 @@ -print "1..46\n"; +print "1..47\n"; BEGIN { chdir 't' if -d 't'; @@ -427,3 +427,12 @@ $a = \&lv1nn; $a->() = 8; print "# '$nnewvar'.\nnot " unless $nnewvar eq '8'; print "ok 46\n"; + +# This must happen at run time +eval { + sub AUTOLOAD : lvalue { $newvar }; +}; +foobar() = 12; +print "# '$newvar'.\nnot " unless $newvar eq "12"; +print "ok 47\n"; + |