{(flag), (name)} \
}
-OP_PRIVATE_ONCE(op_aassign, OPpASSIGN_COMMON, ",COMMON");
OP_PRIVATE_ONCE(op_leavesub, OPpREFCOUNTED, ",REFCOUNTED");
OP_PRIVATE_ONCE(op_repeat, OPpREPEAT_DOLIST, ",DOLIST");
OP_PRIVATE_ONCE(op_reverse, OPpREVERSE_INPLACE, ",INPLACE");
{OP_LEAVE, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
{OP_LEAVESUBLV, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
{OP_LEAVEWRITE, C_ARRAY_LENGTH(op_leavesub_names), op_leavesub_names },
- {OP_AASSIGN, C_ARRAY_LENGTH(op_aassign_names), op_aassign_names },
{OP_DIE, C_ARRAY_LENGTH(op_die_names), op_die_names },
{OP_DELETE, C_ARRAY_LENGTH(op_delete_names), op_delete_names },
{OP_EXISTS, C_ARRAY_LENGTH(op_exists_names), op_exists_names },
if (oppriv & OPpFT_AFTER_t) \
sv_catpv(tmpsv, ",AFTER_t"); \
} \
+ else if (o->op_type == OP_AASSIGN) { \
+ if (oppriv & OPpASSIGN_COMMON) \
+ sv_catpvs(tmpsv, ",COMMON"); \
+ if (oppriv & OPpMAYBE_LVSUB) \
+ sv_catpvs(tmpsv, ",MAYBE_LVSUB"); \
+ } \
if (o->op_flags & OPf_MOD && oppriv & OPpLVAL_INTRO) \
sv_catpv(tmpsv, ",INTRO"); \
if (o->op_type == OP_PADRANGE) \
# use strict;
-plan tests => 308;
+plan tests => 309;
my @comma = ("key", "value");
$_++ foreach %h = ($x,$x);
is($x, 0, "returned values are not aliased to RHS of the assignment operation");
+ %h = ();
+ $x = 0;
+ $_++ foreach sub :lvalue { %h = ($x,$x) }->();
+ is($x, 0,
+ "returned values are not aliased to RHS of assignment in lvalue sub");
+
$_++ foreach ($x,$y,%h,$z) = (0);
ok( eq_array([$x,$y,%h,$z], [1,undef,undef]), "only assigned values are returned" );