From: Simon Cozens Date: Fri, 29 Dec 2000 14:34:04 +0000 (+0000) Subject: Re: [PATCH] Interesting syntax idea X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=26191e783d73bf5f223253769d4bfbf74617dc91;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Interesting syntax idea Message-ID: <20001229143404.A7762@deep-dark-truthful-mirror.perlhacker.org> Tests for #8254. p4raw-id: //depot/perl@8255 --- diff --git a/t/pragma/sub_lval.t b/t/pragma/sub_lval.t index 1b8b73a..a54075d 100755 --- a/t/pragma/sub_lval.t +++ b/t/pragma/sub_lval.t @@ -1,4 +1,4 @@ -print "1..47\n"; +print "1..49\n"; BEGIN { chdir 't' if -d 't'; @@ -436,3 +436,16 @@ foobar() = 12; print "# '$newvar'.\nnot " unless $newvar eq "12"; print "ok 47\n"; +# Testing DWIM of foo = bar; +sub foo : lvalue { + $a; +} +$a = "not ok 48\n"; +foo = "ok 48\n"; +print $a; + +open bar, ">nothing" or die $!; +bar = *STDOUT; +print bar "ok 49\n"; +unlink "nothing"; +