summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2009-07-26 10:27:42 +0100
committerNicholas Clark <nick@ccl4.org>2009-07-26 10:27:42 +0100
commit4ba71d51f72efb2af8dc9748dd62219261f2e1fd (patch)
treedb33beb1f04b46d1f8f8202b570e72464a23aacd /toke.c
parentf0c5aa00eeb992584d6996af147c4c51fe7a6540 (diff)
downloadperl-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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 885027ee79..56e9620c69 100644
--- a/toke.c
+++ b/toke.c
@@ -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++;