summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-10-01 13:50:33 -0600
committerKarl Williamson <public@khwilliamson.com>2011-12-20 22:02:42 -0700
commitf8988b416c244747b17eb3004ac6f8bbcf366e7a (patch)
tree93d9ec7bd9c2d53de27c4dc7598f9b0061d3af08 /toke.c
parentc94ac4efffd0af7bf45337e9ca42da3a9008752f (diff)
downloadperl-f8988b416c244747b17eb3004ac6f8bbcf366e7a.tar.gz
toke.c: Reorder a test
This is in preparation for a later commit
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index 7f8faf4b82..40790d16a2 100644
--- a/toke.c
+++ b/toke.c
@@ -8618,6 +8618,10 @@ S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen,
PERL_ARGS_ASSERT_NEW_CONSTANT;
+ /* charnames doesn't work well if there have been errors found */
+ if (PL_error_count > 0 && strEQ(key,"charnames"))
+ return &PL_sv_undef;
+
if (!table || !(PL_hints & HINT_LOCALIZE_HH)) {
SV *msg;
@@ -8644,10 +8648,6 @@ S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen,
return sv;
}
- /* charnames doesn't work well if there have been errors found */
- if (PL_error_count > 0 && strEQ(key,"charnames"))
- return &PL_sv_undef;
-
cvp = hv_fetch(table, key, keylen, FALSE);
if (!cvp || !SvOK(*cvp)) {
why1 = "$^H{";