summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-09-09 19:39:07 -0600
committerKarl Williamson <public@khwilliamson.com>2013-11-26 21:03:39 -0700
commit6c6eab558a00ed52629a7966596424346615a595 (patch)
tree035878572a7bb8c6c9f7609e90fe961ddea13bf7 /mg.c
parent46f3e16cfc41a4d949826dcd68ab50e346fc3f25 (diff)
downloadperl-6c6eab558a00ed52629a7966596424346615a595.tar.gz
mg.c: Reorder if else clauses
This is to allow two cases in the switch statement to be combined in the next commit. There should be no effective logic change
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mg.c b/mg.c
index 613a14ea34..1f494dc33d 100644
--- a/mg.c
+++ b/mg.c
@@ -788,7 +788,11 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
sv_setiv(sv, (IV)(PL_debug & DEBUG_MASK));
break;
case '\005': /* ^E */
- if (nextchar == '\0') {
+ if (nextchar != '\0') {
+ if (strEQ(remaining, "NCODING"))
+ sv_setsv(sv, PL_encoding);
+ }
+ else {
#if defined(VMS)
{
char msg[255];
@@ -834,8 +838,6 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
SvRTRIM(sv);
SvNOK_on(sv); /* what a wonderful hack! */
}
- else if (strEQ(remaining, "NCODING"))
- sv_setsv(sv, PL_encoding);
break;
case '!':