diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-02-06 15:46:35 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-02-06 15:46:35 +0000 |
commit | cdaebead333273a920fe10cbcb2213a9fbefa241 (patch) | |
tree | 16a4f7c9dca71b61211eac8a55ea494c5552a29b /op.c | |
parent | 49d8d3a1123fb996c090905424ed66f675b3df17 (diff) | |
download | perl-cdaebead333273a920fe10cbcb2213a9fbefa241.tar.gz |
More Chip patches (tweaked for _5x). The final one mentioned here
(@ARGV with -i) actually went in at change 462 but I failed to
add it to the change description:
Subject: [PATCH] Fix typo: "FORM{,AT}LINE"
Date: Sun, 11 Jan 1998 19:37:17 -0500 (EST)
Subject: [PATCH] Fix for C<@x = my @y>
Date: Sun, 11 Jan 1998 18:12:16 -0500 (EST)
Subject: [PATCH] Fix SEGV on C<*glob{SCALAR,ARRAY}>
Date: Thu, 5 Feb 1998 21:30:13 -0500 (EST)
Subject: [PATCH] Allow last() to mean last
Date: Thu, 5 Feb 1998 21:42:57 -0500 (EST)
Subject: [PATCH] Consider @ARGV to be plain files if inplace (-i)
Date: Wed, 4 Feb 1998 16:04:47 -0500 (EST)
p4raw-id: //depot/perl@465
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1588,7 +1588,6 @@ localize(OP *o, I32 lex) if (o->op_flags & OPf_PARENS) list(o); else { - scalar(o); if (dowarn && bufptr > oldbufptr && bufptr[-1] == ',') { char *s; for (s = bufptr; *s && (isALNUM(*s) || strchr("@$%, ",*s)); s++) ; @@ -2980,10 +2979,14 @@ newLOOPEX(I32 type, OP *label) dTHR; OP *o; if (type != OP_GOTO || label->op_type == OP_CONST) { - o = newPVOP(type, 0, savepv( - label->op_type == OP_CONST - ? SvPVx(((SVOP*)label)->op_sv, na) - : "" )); + /* "last()" means "last" */ + if (label->op_type == OP_STUB && (label->op_flags & OPf_PARENS)) + o = newOP(type, OPf_SPECIAL); + else { + o = newPVOP(type, 0, savepv(label->op_type == OP_CONST + ? SvPVx(((SVOP*)label)->op_sv, na) + : "")); + } op_free(label); } else { |