From: Rafael Garcia-Suarez Date: Mon, 26 Mar 2007 13:51:30 +0000 (+0000) Subject: say() should parse exactly like print() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ef1310e8095f478a1ddff6a842410f27b75e186;p=p5sagit%2Fp5-mst-13.2.git say() should parse exactly like print() p4raw-id: //depot/perl@30760 --- diff --git a/sv.c b/sv.c index 51dffcb..c10eb93 100644 --- a/sv.c +++ b/sv.c @@ -11997,6 +11997,7 @@ S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool match) case OP_PRTF: case OP_PRINT: + case OP_SAY: /* skip filehandle as it can't produce 'undef' warning */ o = cUNOPx(obase)->op_first; if ((obase->op_flags & OPf_STACKED) && o->op_type == OP_PUSHMARK) diff --git a/toke.c b/toke.c index e4a52e3..935a32a 100644 --- a/toke.c +++ b/toke.c @@ -2646,7 +2646,8 @@ S_intuit_method(pTHX_ char *start, GV *gv, CV *cv) */ if (*start == '$') { - if (gv || PL_last_lop_op == OP_PRINT || isUPPER(*PL_tokenbuf)) + if (gv || PL_last_lop_op == OP_PRINT || PL_last_lop_op == OP_SAY || + isUPPER(*PL_tokenbuf)) return 0; #ifdef PERL_MAD len = start - SvPVX(PL_linestr);