diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 04:58:29 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-28 04:58:29 +0000 |
commit | 8593bda5eaf2f40ae7a609c286d223c8f721fc0d (patch) | |
tree | 1e073ef96866a8d08b7c1705857ef8eb6acf00c3 /toke.c | |
parent | 71d280e38f6b1166e3ba01f7a839868275eb4b7f (diff) | |
download | perl-8593bda5eaf2f40ae7a609c286d223c8f721fc0d.tar.gz |
downgrade fatal error on C<"foo@nosucharray.com"> to optional warning
(from Mark-Jason Dominus)
p4raw-id: //depot/perl@6122
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -2149,9 +2149,14 @@ Perl_yylex(pTHX) */ if (pit == '@' && PL_lex_state != LEX_NORMAL && !PL_lex_brackets) { GV *gv = gv_fetchpv(PL_tokenbuf+1, FALSE, SVt_PVAV); - if (!gv || ((PL_tokenbuf[0] == '@') ? !GvAV(gv) : !GvHV(gv))) - yyerror(Perl_form(aTHX_ "In string, %s now must be written as \\%s", - PL_tokenbuf, PL_tokenbuf)); + if ((!gv || ((PL_tokenbuf[0] == '@') ? !GvAV(gv) : !GvHV(gv))) + && ckWARN(WARN_AMBIGUOUS)) + { + /* Downgraded from fatal to warning 20000522 mjd */ + Perl_warner(aTHX_ WARN_AMBIGUOUS, + "Possible unintended interpolation of %s in string", + PL_tokenbuf); + } } /* build ops for a bareword */ |