Allow -C on the #! line when it is identical to -C on the command line.
[p5sagit/p5-mst-13.2.git] / util.c
diff --git a/util.c b/util.c
index d3fe00a..0d524e9 100644 (file)
--- a/util.c
+++ b/util.c
@@ -4229,7 +4229,7 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
     pos = s;
 
     /* pre-scan the input string to check for decimals/underbars */
-    while ( *pos == '.' || *pos == '_' || isDIGIT(*pos) )
+    while ( *pos == '.' || *pos == '_' || *pos == ',' || isDIGIT(*pos) )
     {
        if ( *pos == '.' )
        {
@@ -4245,6 +4245,12 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
            alpha = 1;
            width = pos - last - 1; /* natural width of sub-version */
        }
+       else if ( *pos == ',' && isDIGIT(pos[1]) )
+       {
+           saw_period++ ;
+           last = pos;
+       }
+
        pos++;
     }
 
@@ -4332,6 +4338,8 @@ Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv)
                s = ++pos;
            else if ( *pos == '_' && isDIGIT(pos[1]) )
                s = ++pos;
+           else if ( *pos == ',' && isDIGIT(pos[1]) )
+               s = ++pos;
            else if ( isDIGIT(*pos) )
                s = pos;
            else {
@@ -5475,11 +5483,11 @@ Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp)
  * the default implementation, unless -DPERL_MEM_LOG_NOIMPL is also
  * given, and you supply your own implementation.
  *
- * The default implementation reads a single envar; PERL_MEM_LOG,
+ * The default implementation reads a single env var, PERL_MEM_LOG,
  * expecting one or more of the following:
  *
  *    \d+ - fd         fd to write to          : must be 1st (atoi)
- *    'm' - memlog     was PERL_MEM_LOG=1      
+ *    'm' - memlog     was PERL_MEM_LOG=1
  *    's' - svlog      was PERL_SV_LOG=1
  *    't' - timestamp  was PERL_MEM_LOG_TIMESTAMP=1
  *