Allow -C on the #! line when it is identical to -C on the command line.
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index 885027e..56e9620 100644 (file)
--- 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++;