summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorSam Tregar <sam@tregar.com>2002-01-02 09:04:26 -0500
committerAbhijit Menon-Sen <ams@wiw.org>2002-01-02 18:34:26 +0000
commitd37a953848a8a5e776efddc4a0591621effaf5f1 (patch)
treefed7ad7eafb008d18686846b7b34ce3c9f02138e /toke.c
parent96af66be42b7864817b8cbb1e321096e1a058501 (diff)
downloadperl-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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/toke.c b/toke.c
index faa1eac4c2..de71ceebed 100644
--- a/toke.c
+++ b/toke.c
@@ -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;