From 0ed299501d408b6e22065c36966752a861574a3d Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 24 Nov 2003 20:07:29 +0000 Subject: [PATCH] Should fix the infinite loop on a dynamic %ENV fetch p4raw-id: //depot/perl@21782 --- hv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hv.c b/hv.c index a39fdcd..39684b0 100644 --- a/hv.c +++ b/hv.c @@ -682,7 +682,8 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, return entry; } #ifdef DYNAMIC_ENV_FETCH /* %ENV lookup? If so, try to fetch the value now */ - if (SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env)) { + if (!(action & HV_FETCH_ISSTORE) + && SvRMAGICAL((SV*)hv) && mg_find((SV*)hv, PERL_MAGIC_env)) { unsigned long len; char *env = PerlEnv_ENVgetenv_len(key,&len); if (env) { -- 1.8.3.1