From d37a953848a8a5e776efddc4a0591621effaf5f1 Mon Sep 17 00:00:00 2001 From: Sam Tregar Date: Wed, 2 Jan 2002 09:04:26 -0500 Subject: Bad prototype detection changed from error to warning Message-Id: p4raw-id: //depot/perl@14025 --- toke.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'toke.c') 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; -- cgit v1.2.1