summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-06-18 18:27:31 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-21 00:10:18 +0000
commit2a841d1398ee9bbf30a942905192cc2591b3e92a (patch)
treeff2c559e5659a94c9783d486c766217cb43b0d92 /toke.c
parentfbb426e4e4fa9111602f64c566d240fa509dea6f (diff)
downloadperl-2a841d1398ee9bbf30a942905192cc2591b3e92a.tar.gz
added patch, regen headers
Message-Id: <199806190227.WAA07371@monk.mps.ohio-state.edu> Subject: Re: Ilya's patches p4raw-id: //depot/perl@1169
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/toke.c b/toke.c
index c035563847..f8b31bd692 100644
--- a/toke.c
+++ b/toke.c
@@ -2893,8 +2893,11 @@ yylex(void)
oldoldbufptr < bufptr &&
(oldoldbufptr == last_lop || oldoldbufptr == last_uni) &&
/* NO SKIPSPACE BEFORE HERE! */
- (expect == XREF ||
- ((opargs[last_lop_op] >> OASHIFT)& 7) == OA_FILEREF) )
+ (expect == XREF
+ || ((opargs[last_lop_op] >> OASHIFT)& 7) == OA_FILEREF
+ || (last_lop_op == OP_ENTERSUB
+ && last_proto
+ && last_proto[last_proto[0] == ';' ? 1 : 0] == '*')) )
{
bool immediate_paren = *s == '(';
@@ -2975,16 +2978,17 @@ yylex(void)
/* Is there a prototype? */
if (SvPOK(cv)) {
STRLEN len;
- char *proto = SvPV((SV*)cv, len);
+ last_proto = SvPV((SV*)cv, len);
if (!len)
TERM(FUNC0SUB);
- if (strEQ(proto, "$"))
+ if (strEQ(last_proto, "$"))
OPERATOR(UNIOPSUB);
- if (*proto == '&' && *s == '{') {
+ if (*last_proto == '&' && *s == '{') {
sv_setpv(subname,"__ANON__");
PREBLOCK(LSTOPSUB);
}
- }
+ } else
+ last_proto = NULL;
nextval[nexttoke].opval = yylval.opval;
expect = XTERM;
force_next(WORD);