summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-02-14 21:15:40 -0700
committerKarl Williamson <khw@cpan.org>2018-02-18 11:20:32 -0700
commitf512d242c9d4638098e64ccb855ca371e916bd5a (patch)
treeb791e97b54e265a01fc4efb6159d5f4df32849ee /gv.c
parentb119c2beea90ac8d7c9a63881ec4c00357d2f309 (diff)
downloadperl-f512d242c9d4638098e64ccb855ca371e916bd5a.tar.gz
Add ${^SAFE_LOCALES}
This read-only variable returns a boolean as to whether it is safe to use locales in this perl. Without threads it returns 1; when a future commit adds thread-safe locale handling, it will also return 1 if that is enabled.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 00adb8995c..0dcbabc9ec 100644
--- a/gv.c
+++ b/gv.c
@@ -2067,6 +2067,10 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
goto storeparen;
}
break;
+ case '\023':
+ if (memEQs(name, len, "\023AFE_LOCALES"))
+ goto ro_magicalize;
+ break;
case '\024': /* ${^TAINT} */
if (memEQs(name, len, "\024AINT"))
goto ro_magicalize;