perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@cpan.org>
Subject Re: [Fwd: Apache::Reload Module]
Date Wed, 18 Jun 2003 15:49:29 GMT
On Wed, 2003-06-18 at 17:19, Steve Hay wrote:
> Hi Philippe,
> 
> Philippe M. Chiasson wrote:
> 
> >Here is some code I've ripped from an in-house Apache::Reload
> >equivalent... It's a bit convoluted, but does work quite nicely.
> >
> Thanks for the code -- it looks excellent to me.

no problem

> I've attached a patch for Apache::Reload that makes use of your code to 
> achieve what I'm after.  The patch is against the Apache::Reload 
> currently in mp2 cvs.  Things to note:
> 
> 1. I've removed Apache::ServerUtil and Apache::RequestUtil -- they 
> didn't seem to be being used.
> 2. I've removed the ConstantRedefineWarnings option because your code 
> makes use of Apache::Symbol::undef() which avoids those warnings anyway.
> 3. I've removed the part of your code that skipped removing top-level 
> packages -- I (perhaps unwisely) use such names a lot!
> 
> If this is going to be put into mp2 (which I certainly hope it is) then 
> Apache::Symbol will need to be put back too since your code relies on it.
> 
> I've also attached a patch that will produce a mp1-compatible version of 
> the same:  Start with the current cvs mp2 Apache::Reload and apply the 
> main patch to it, then apply the "for_mp1" patch to that.

Can you instead look at this patch:
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105591352209314&w=2

And integrate that into an mod_perl 1 & 2 Apache::Reload instead? I
would rather not have to maintain 2 ever so slightly different versions
of Apache::Reload if that can be avoided.

> I've quickly tested this mp1-compatible version, and it seems to be 
> working so far: no "subroutine redefined" warnings are being produced 
> (not even for constant subroutines), and imported subroutines are not 
> being mistakenly undefined.  I hope this can be added to mp1.28 (which 
> already has Apache::Symbol, of course).

Just might ;-)

I guess Apache::Symbol might need to be re-created for mp2.  According
to :
$> fgrep Apache::Symbpl mp2/docs/deprecated_features.txt
  + Apache::Symbol: unknown

There are only 3 functions in there, and they are:
undef
sv_name
cv_const_sv

I don't see why we can't find some room for those somewhere in mp2,
especially the magical 'undef' function in there.

Stas: BTW, for Apache::Reload, to get rid of that constant subroutine
redefined, that XS implemtation would get rid of it without a need for
skip_redefine_const_sub_warn. No more $SIG{__WARN__} ;-)

How about if I ported Apache::Symbol::undef to ModPerl::Util::undef ?

Gozer out to bed.

> Steve
> 
> ______________________________________________________________________
-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'


Mime
View raw message