perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <>
Subject Re: right patch for Apache::Reload
Date Wed, 18 Jan 2006 02:02:59 GMT
Javier Uruen Val wrote:
> Hi,
> 	Yesterday I sent an email attaching a patch for what i thought it could be a 
> bug in Apache::Reload. I attached the wrong patch, so here it is the proper 
> one.
> Previous mail:
> -----------------
> First of all thank you very much for maintaining Apache::Reload. We want to 
> use it in our project [0] to avoid restarting apache when upgrading our 
> modules running under mod_perl. Everything works ok and gets reloaded 
> properly when modifying files except for the following case:
>         - Module A uses symbols exported by Module B
>         - Module A is located before than B in %INC when iterating.
>         - Module A and B have changed and A uses new symbols exported by B
>         When that happens we got an error when Apache::Reload tries to 
> recompile A having the old B symbols still  in memory and it can't found the 
> new symbol.
>         I don't know if this is the expected behavior and I misunderstood 
> everything or maybe I'm using the wrong module and it's totally deprecated.

This is actually a nice bug in Apache::Reload, thanks for the investigative work.

Your patch is conceptually correct. Apache:Reload should first unload all modified
modules, _then_ attempt to reload them all. That way, module dependencies would
be correctly satisfied and the problem you are having would dissapear.

>         Anyway, I've written a small patch to workaround this problem. 
> Basically, it removes all the modified modules before reloading them. Instead 
> of doing a remove/reload per module.
>         The patch is attached.

I guess you are using mod_perl 1.x and not 2.x. I've committed r370007 that
implements your change in the mod_perl-2.x codebase, since that's where most of
the active development happens.

If/When there comes a time for another mod_perl-1.x release, I'll probably take
the time to apply a similar patch to Apache::Reload.

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

View raw message