diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-11-26 12:38:20 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-11-26 12:38:20 +0000 |
commit | 792941b2ff890591e57d24cadb288f2aa39dfb7b (patch) | |
tree | 50c7dc4bab75b50c57851dee403313d8b26003cc /lib/Carp | |
parent | 1dc5a1cd6365e08f4fc3eb112b57b3cba7f744d7 (diff) | |
download | perl-792941b2ff890591e57d24cadb288f2aa39dfb7b.tar.gz |
Stop mod_perl looping forever in &Carp::shortmess_jmp as it somehow
manages to forcibly re-load Carp.pm without re-loading Carp/Heavy.pm
p4raw-id: //depot/perl@29382
Diffstat (limited to 'lib/Carp')
-rw-r--r-- | lib/Carp/Heavy.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm index 4355584d20..d5711ce859 100644 --- a/lib/Carp/Heavy.pm +++ b/lib/Carp/Heavy.pm @@ -64,7 +64,12 @@ sub shortmess_real { # aliasing the whole glob rather than just the CV slot avoids 'redefined' # warnings, even in the presence of perl -W (as used by lib/warnings.t !) +# However it has the potential to create infinite loops, if somehow Carp +# is forcibly reloaded, but $INC{"Carp/Heavy.pm"} remains true. +# Hence the extra hack of deleting the previous typeglob first. +delete $Carp::{shortmess_jmp}; +delete $Carp::{longmess_jmp}; *longmess_jmp = *longmess_real; *shortmess_jmp = *shortmess_real; |