diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-11-19 14:48:35 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-11-19 14:48:35 +0000 |
commit | 7fc307b5b2c2555eb36e722b92df29f8a8d5db19 (patch) | |
tree | 3ae4847a4572f181a5cf394df7c6a39e49ef918d /toke.c | |
parent | 1bb8ad523126a79135f26a08af30cf96a4989f0f (diff) | |
download | perl-7fc307b5b2c2555eb36e722b92df29f8a8d5db19.tar.gz |
Make "err" a weak keyword;
that is, it will be overriden by any sub named "err", except when
really an operator is expected at this point. ([perl #32347])
p4raw-id: //depot/perl@23519
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4037,6 +4037,16 @@ Perl_yylex(pTHX) { tmp = 0; /* any sub overrides "weak" keyword */ } + else if (gv && !gvp + && tmp == -KEY_err + && GvCVu(gv) + && PL_expect != XOPERATOR + && PL_expect != XTERMORDORDOR) + { + /* any sub overrides the "err" keyword, except when really an + * operator is expected */ + tmp = 0; + } else { /* no override */ tmp = -tmp; if (tmp == KEY_dump && ckWARN(WARN_MISC)) { |