diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-05-30 23:01:39 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-30 23:01:39 -0700 |
commit | a0aa6076c554bfbd5053136f26077d9c58b3526e (patch) | |
tree | 8c153e41cd018b87c35c8f5bb65b7c286294d0c5 /t | |
parent | b724cc14b25929aee44eee20bd26102cceb520b6 (diff) | |
download | perl-a0aa6076c554bfbd5053136f26077d9c58b3526e.tar.gz |
Allow lvalue subs to return COWs in list context
Commit f71f472 missed list assignment. :-(
Diffstat (limited to 't')
-rw-r--r-- | t/op/sub_lval.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/op/sub_lval.t b/t/op/sub_lval.t index 6aa516b749..e51936fdd8 100644 --- a/t/op/sub_lval.t +++ b/t/op/sub_lval.t @@ -3,7 +3,7 @@ BEGIN { @INC = '../lib'; require './test.pl'; } -plan tests=>97; +plan tests=>99; sub a : lvalue { my $a = 34; ${\(bless \$a)} } # Return a temporary sub b : lvalue { ${\shift} } @@ -656,3 +656,6 @@ sub fleen : lvalue { $pnare } $pnare = __PACKAGE__; ok eval { fleen = 1 }, "lvalues can return COWs (CATTLE?) [perl #75656]";\ is $pnare, 1, 'and returning CATTLE actually works'; +$pnare = __PACKAGE__; +ok eval { (fleen) = 1 }, "lvalues can return COWs in list context"; +is $pnare, 1, 'and returning COWs in list context actually works'; |