From fad39ff13c300fe483c6155ea2883280e12fc89c Mon Sep 17 00:00:00 2001 From: Stephen McCamant Date: Fri, 23 Jul 1999 10:55:22 -0500 Subject: allow arrow omission in $foo[10]->('foo') etc. (but not in foo()->()); rework grammar to remove conflicts Message-ID: <14232.54970.771570.548676@alias-2.pr.mcs.net> Subject: [PATCH _57, long] Re: optional arrow asymmetry p4raw-id: //depot/perl@3767 --- op.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'op.c') diff --git a/op.c b/op.c index 755c34e77e..ece04f701d 100644 --- a/op.c +++ b/op.c @@ -107,27 +107,6 @@ S_no_bareword_allowed(pTHX_ OP *o) ++PL_error_count; } -void -Perl_assertref(pTHX_ OP *o) -{ - int type = o->op_type; - if (type != OP_AELEM && type != OP_HELEM && type != OP_GELEM) { - yyerror(Perl_form(aTHX_ "Can't use subscript on %s", PL_op_desc[type])); - if (type == OP_ENTERSUB || type == OP_RV2HV || type == OP_PADHV) { - dTHR; - SV *msg = sv_2mortal( - Perl_newSVpvf(aTHX_ "(Did you mean $ or @ instead of %c?)\n", - type == OP_ENTERSUB ? '&' : '%')); - if (PL_in_eval & EVAL_WARNONLY) - Perl_warn(aTHX_ "%_", msg); - else if (PL_in_eval) - sv_catsv(GvSV(PL_errgv), msg); - else - PerlIO_write(PerlIO_stderr(), SvPVX(msg), SvCUR(msg)); - } - } -} - /* "register" allocation */ PADOFFSET -- cgit v1.2.1