From d8bdd59a731e612643be6a230102949e419f17db Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Mon, 14 Dec 2015 12:10:45 +0000 Subject: [PATCH] pp_leavesublv(): document PL_sv_undef exception --- pp_ctl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pp_ctl.c b/pp_ctl.c index b49f86d..cde30a4 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2401,6 +2401,12 @@ PP(pp_leavesublv) ? *MARK : sv_2mortal(SvREFCNT_inc_simple_NN(*MARK)); else for (; MARK <= SP; MARK++) { + /* the PL_sv_undef exception is to allow things like this to + * work, where PL_sv_undef acts as 'skip' placeholder on the + * LHS of list assigns: + * sub foo :lvalue { undef } + * ($a, undef, foo(), $b) = 1..4; + */ if (*MARK != &PL_sv_undef && (SvPADTMP(*MARK) || SvREADONLY(*MARK)) ) { -- 1.8.3.1