diff options
author | Sam Tregar <sam@tregar.com> | 2002-01-02 09:04:26 -0500 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-01-02 18:34:26 +0000 |
commit | d37a953848a8a5e776efddc4a0591621effaf5f1 (patch) | |
tree | fed7ad7eafb008d18686846b7b34ce3c9f02138e /toke.c | |
parent | 96af66be42b7864817b8cbb1e321096e1a058501 (diff) | |
download | perl-d37a953848a8a5e776efddc4a0591621effaf5f1.tar.gz |
Bad prototype detection changed from error to warning
Message-Id: <Pine.LNX.4.33.0201021400110.15420-200000@localhost.localdomain>
p4raw-id: //depot/perl@14025
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -4957,15 +4957,17 @@ Perl_yylex(pTHX) tmp = 0; bad_proto = FALSE; for (p = d; *p; ++p) { - if (!strchr("$@%*;[]&\\ ", *p)) - bad_proto = TRUE; - if (!isSPACE(*p)) + if (!isSPACE(*p)) { d[tmp++] = *p; + if (!strchr("$@%*;[]&\\", *p)) + bad_proto = TRUE; + } } d[tmp] = '\0'; if (bad_proto) - Perl_croak(aTHX_ "Malformed prototype for %s : %s", - SvPVX(PL_subname), d); + Perl_warn(aTHX_ + "Illegal character in prototype for %s : %s", + SvPVX(PL_subname), d); SvCUR(PL_lex_stuff) = tmp; have_proto = TRUE; |