This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
alphabetically sort flag descriptions in embed.fnc
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 2b98ada..9df0ff2 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2093,7 +2093,13 @@ S_force_version(pTHX_ char *s, int guessing)
 #endif
         if (*d == ';' || isSPACE(*d) || *d == '}' || !*d) {
            SV *ver;
+#ifdef USE_LOCALE_NUMERIC
+           char *loc = setlocale(LC_NUMERIC, "C");
+#endif
             s = scan_num(s, &pl_yylval);
+#ifdef USE_LOCALE_NUMERIC
+           setlocale(LC_NUMERIC, loc);
+#endif
             version = pl_yylval.opval;
            ver = cSVOPx(version)->op_sv;
            if (SvPOK(ver) && !SvNIOK(ver)) {
@@ -7008,6 +7014,7 @@ Perl_yylex(pTHX)
 
        case KEY_package:
            s = force_word(s,WORD,FALSE,TRUE,FALSE);
+           s = SKIPSPACE1(s);
            s = force_strict_version(s);
            OPERATOR(PACKAGE);