This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ab4af70
)
Should fix the infinite loop on a dynamic %ENV fetch
author
Nicholas Clark
<nick@ccl4.org>
Mon, 24 Nov 2003 20:07:29 +0000
(20:07 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Mon, 24 Nov 2003 20:07:29 +0000
(20:07 +0000)
p4raw-id: //depot/perl@21782
hv.c
patch
|
blob
|
blame
|
history
diff --git
a/hv.c
b/hv.c
index
a39fdcd
..
39684b0
100644
(file)
--- 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) {