We generally don't want to switch to the default underlying locale
unless we are in the scope of some form of 'use locale'. Prior to this
commit, this code did not allow the switch for
'use locale ":not_characters"'.
bool was_local = PL_numeric_local; \
if (was_local) SET_NUMERIC_STANDARD();
+/* Doesn't change to underlying locale unless within the scope of some form of
+ * 'use locale'. This is the usual desired behavior. */
#define STORE_NUMERIC_STANDARD_SET_LOCAL() \
- bool was_standard = PL_numeric_standard && IN_LOCALE; \
+ bool was_standard = PL_numeric_standard && IN_SOME_LOCALE_FORM; \
if (was_standard) SET_NUMERIC_LOCAL();
#define RESTORE_NUMERIC_LOCAL() \
}
{
+ fresh_perl_is(<<'EOF', $difference, {},
+use locale ":not_characters";
+format STDOUT =
+@.#
+4.179
+.
+write;
+EOF
+ "format() looks at LC_NUMERIC with 'use locale \":not_characters\"'");
+ }
+
+ {
fresh_perl_is(<<'EOF', "4.2", {},
format STDOUT =
@.#
} # SKIP
-sub last { 11 }
+sub last { 12 }