From: David Golden Date: Sat, 16 Jan 2010 23:03:52 +0000 (-0500) Subject: Parse 'use NAME VERSION' with C locale X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d08d9baca8b5e17813fd3fbfe3510d7ba6097f7;p=p5sagit%2Fp5-mst-13.2.git Parse 'use NAME VERSION' with C locale --- diff --git a/toke.c b/toke.c index 2b98ada..2d383b3 100644 --- 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)) {