This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5a5:pat/env.pat
authorLarry Wall <larry@netlabs.com>
Fri, 10 Dec 1993 00:00:00 +0000 (00:00 +0000)
committerLarry Wall <larry@netlabs.com>
Fri, 10 Dec 1993 00:00:00 +0000 (00:00 +0000)
[random patch found in the perl-5alpha5 tarball applied separately]

perl.c

diff --git a/perl.c b/perl.c
index e2b4821..342714f 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1303,7 +1303,6 @@ register char **env;
        SvMULTI_on(envgv);
        hv = GvHVn(envgv);
        hv_clear(hv);
-       hv_magic(hv, envgv, 'E');
        if (env != environ)
            environ[0] = Nullch;
        for (; *env; env++) {
@@ -1314,6 +1313,7 @@ register char **env;
            (void)hv_store(hv, *env, s - *env, sv, 0);
            *s = '=';
        }
+       hv_magic(hv, envgv, 'E');
     }
     tainted = 0;
     if (tmpgv = gv_fetchpv("$",TRUE))