[Matt - Shall we drop you from this discussion now, or are you still interested?]
Matt is on the dev list, so I've removed him from CC.
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.
Good.
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.)
Certainly, I just prefer to have the mp1 and mp2 code bases as close as possible.
Would it not be simpler to put Apache::Symbol back into mp2?
There is no need for it in mp2. We require perl 5.6.1 or higher which includes filehandle autovivification, via: open my $foo, "bar" or die $!;
Look at ModPerl::RegistryCooker::flush_namespace_normal, which does the necessary undef'ing. You really need just a chunk of it.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
