summaryrefslogtreecommitdiff
path: root/t/op/ref.t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-25 13:10:22 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-10-10 21:56:36 -0700
commit217e35650316a762c07b3b02d10140d30830fb20 (patch)
treea29fc92d8f5ec96b7defc52f2d8dea18834138f5 /t/op/ref.t
parentc146a62a4cab49a74d6cee4acf18e3ec9b40ee60 (diff)
downloadperl-217e35650316a762c07b3b02d10140d30830fb20.tar.gz
Make \($x,$y) assignment work
This applies to \ with multiple kids (refgen). Up till now, op_lvalue_flags only handled srefgen (single refgen). Before I was converting srefgen to lvref and nulling the kid op: srefgen ex-list rv2sv gv became: lvref ex-list ex-rv2sv gv Now I’m converting the kid instead and nulling the srefgen: ex-srefgen ex-list lvref gv so that the same code can apply to refgen: refgen ex-list pushmark rv2sv gv rv2sv gv becomes ex-refgen ex-list ex-pushmark lvref gv lvref gv
Diffstat (limited to 't/op/ref.t')
-rw-r--r--t/op/ref.t4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/op/ref.t b/t/op/ref.t
index 8c9e3fd302..dbd532271c 100644
--- a/t/op/ref.t
+++ b/t/op/ref.t
@@ -319,8 +319,10 @@ is (scalar grep(ref($_), @baa), 3);
is (scalar (@bzz), 3);
# also, it can't be an lvalue
+# (That’s what *you* think! --sprout)
eval '\\($x, $y) = (1, 2);';
-like ($@, qr/Can\'t modify.*ref.*in.*assignment/);
+like ($@, qr/Can\'t modify.*ref.*in.*assignment(?x:
+ )|Experimental lvalue references not enabled/);
# test for proper destruction of lexical objects
$test = curr_test();