You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Sreeji K Das <sr...@yahoo.com> on 2002/02/28 06:34:04 UTC

PerlFreshRestart bug - comments please

Hi

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 
Thanx
Sreeji

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org