perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Hay <steve....@uk.radan.com>
Subject Re: [Fwd: Apache::Reload Module]
Date Mon, 16 Jun 2003 10:07:13 GMT
[Matt - Shall we drop you from this discussion now, or are you still 
interested?]

Hi Stas,

Stas Bekman wrote:

> Steve Hay wrote:
>
>> I would therefore prefer to have an explicit symbols undef done.  I 
>> don't necessarily want an *option* for it, though -- I'd be happy if 
>> it *always* did that.  Would you ever want to see those redefine 
>> warnings? If so, then maybe have an "UndefOnReload" option that 
>> defaults to "On", and users can turn it "Off" if they wish -- like 
>> your "ReloadConstantRedefineWarnings" option.  (Presumably you would 
>> consolidate both of these things into one single option.)
>
>
> You are correct.
>
> Since we are talking about undef-ing only CODE refs, the option should 
> have a good mnemonic, "UndefOnReload" doesn't imply subs. So I suggest 
> to have
>
>   ReloadSubRedefineWarnings off
>
> with default being 'on' - no action taken. Or 
> ReloadSubroutineRedefineWarnings. 

I'd agree with that.

>
>
> Can you adjust the original patch to use Symbol and not 
> Apache::Symbol, so we can re-use the same code in mp1 and mp2? mp2 
> doesn't carry Apache::Symbol. 

No.  (Well, not straight-forwardly, anyway.)  Apache::Symbol is not a 
simple Apache-savvy replacement for Symbol -- it is quite a different beast.

The patch uses Apache::Symbol::undef_functions(), which wraps calls to 
Apache::Symbol::undef().  Neither of these functions are in Symbol, so 
I'd have to copy them from Apache::Symbol into Apache::Reload itself. 
 (And that's more work than it sounds because undef() is an XSUB.)

Would it not be simpler to put Apache::Symbol back into mp2?

Steve


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


Mime
View raw message