perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sreeji K Das <>
Subject PerlFreshRestart bug - comments please
Date Thu, 28 Feb 2002 05:34:04 GMT

I didn't get a response for my first post :-( So I'm
making another try (Sorry for cross-posting - but I
guess it's relevant to dev list as well)

PerlFreshRestart (is anyone using this feature ?) was
giving me a lot of problems giving a lot of 'Undefined
Subroutine' errors when I restart (USR1) httpd. I
found that it's due to a bug in mod_perl (perl_util.c
- perl_reload_inc()).

ie. the following seems to be  wrong:
while (($k, $v) = each(%INC))
 delete($INC{$k}); eval("require $k");

When you do a require $k, any further 'use' or
'require' in $k will not be loaded, since they are
already loaded as per %INC. However that's not the
case, since I've used Apache::Symbol to undefine all
those (otherwise I'd get a Subroutine redefined error)
in PerlRestartHandler.

mod_perl-1.19 seems to implement it correctly - but
that part of the code was removed in later versions -
Any idea why ?
ie. there was this line
GvHV(incgv) = Nullhv;
in perl_util.c (perl_reload_inc), but was removed on
later versions.
So basically I reintroduced this line to the current
version (mod_perl-1.26) & the problems are gone.
Can this patch go into the next version ? I guess this
is the reason for so many 'Evil things' happening if
Restart was on ?

I'd like to get some comments before I put this change
to production.

Expecting a reply this time 

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

View raw message