From: Rafael Garcia-Suarez Date: Tue, 22 Mar 2005 14:53:01 +0000 (+0000) Subject: Forbid the -C option on the command-line X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ffe3ee448ef9bbf97ab82f8e68a3a749541b012;p=p5sagit%2Fp5-mst-13.2.git Forbid the -C option on the command-line as suggested by Merijn (see [perl #34087]) p4raw-id: //depot/perl@24070 --- diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 0f71025..c6354cc 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3889,7 +3889,7 @@ system call to call, silly dilly. =item Too late for "-%s" option (X) The #! line (or local equivalent) in a Perl script contains the -B<-M> or B<-m> option. This is an error because B<-M> and B<-m> options +B<-M>, B<-m> or B<-C> option. This is an error because those options are not intended for use inside scripts. Use the C pragma instead. =item Too late to run %s block diff --git a/toke.c b/toke.c index e131eb2..c2c7ba2 100644 --- a/toke.c +++ b/toke.c @@ -2866,7 +2866,7 @@ Perl_yylex(pTHX) if (*d++ == '-') { bool switches_done = PL_doswitches; do { - if (*d == 'M' || *d == 'm') { + if (*d == 'M' || *d == 'm' || *d == 'C') { char *m = d; while (*d && !isSPACE(*d)) d++; Perl_croak(aTHX_ "Too late for \"-%.*s\" option",