Randy Kobes wrote:
On Thu, 15 Jul 2004, Stas Bekman wrote:


Stas Bekman wrote:

I see, that Philippe has found a nice trick to load Apache::PerlSections
at the server startup, w/o actually doing that explicitly. He deployed
the handlers automatic autoloading. Though this trick doesn't work for
other things. I want to move the pre-loading of APR::Error to the the
internals of mp2, but since it may reside in the Apache2/ subdir, we
can't try loading it, before a user loads Apache2.pm. Which may not
happen at all. And we may need to load other modules in the future as
well (e.g. things that we discussed before - load Apache::RequestRec
before handing user $r).

We can't force on user loading Apache2, since he may want to adjust
@INC, before Apache2.pm is loaded.

I thought that moving APR/* packages out of Apache2/ will solve that
problem, removing the dependancy on Apache2.pm, but as Joe suggested
it's probably not the best approach, due to versioning...

So if you have ideas how to resolve that issue, I'm all ears.

So any ideas? We need to preload APR::Error to start with.


I'm sure I don't appreciate all the issues involved, but
just to backtrack a moment - for the particular case of
APR::Error, what is that latest point at which it should be
loaded? For example, would it be enough to load APR::Error
when other modules are loaded (within an XSLoader,
perhaps?). Or is this too late? Or not possible?

APR::Error handles exceptions objects thrown by mod_perl. In theory the first exception object might be thrown as soon as the base perl interpreter starts. So it really should be loaded as soon as perl starts. It's the same issue as loading Dynaloader.pm, which we have no problem with since it's in the perl-core lib.


Until recently I was trying to load APR::Error on demand, i.e. just before the exception is thrown. First of all it's inefficient, since some exceptions are not fatal errors (e.g. timeout), second we have a problem with this POPSTACK issue in the in_error test. Dave Mitchel is looking at it.

We may want to add other modules at the server startup. For example the module we discussed before, that will either preload all modules or install AUTOLOAD, which might be a compile time option. It'd be nice to resolve this issue of early loading before we release 2.0.


-- __________________________________________________________________ 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]



Reply via email to