diff options
author | Father Chrysostomos <sprout@cpan.org> | 2009-07-26 10:27:42 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-07-26 10:27:42 +0100 |
commit | 4ba71d51f72efb2af8dc9748dd62219261f2e1fd (patch) | |
tree | db33beb1f04b46d1f8f8202b570e72464a23aacd /toke.c | |
parent | f0c5aa00eeb992584d6996af147c4c51fe7a6540 (diff) | |
download | perl-4ba71d51f72efb2af8dc9748dd62219261f2e1fd.tar.gz |
Allow -C on the #! line when it is identical to -C on the command line.
Change from dieing whenever -C is seen on the #! line, to dieing only when it
differs from that on the command line, or was not specified on the command line.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3999,7 +3999,15 @@ Perl_yylex(pTHX) const char *d1 = d; do { - if (*d1 == 'M' || *d1 == 'm' || *d1 == 'C') { + bool baduni = FALSE; + if (*d1 == 'C') { + const char *d2 = d1; + d2++; + parse_unicode_opts( (const char **)&d2 ) + == PL_unicode + || (baduni = TRUE); + } + if (baduni || *d1 == 'M' || *d1 == 'm') { const char * const m = d1; while (*d1 && !isSPACE(*d1)) d1++; |