perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [mp2] Making Apache::ASP optimized for mod_perl 2
Date Tue, 06 May 2003 15:23:41 GMT

> I don't really use that much of the Apache API, just part of what is
> exposed with the basic mod_perl 1 API.  So why then would I have to 
> explicitly
> load 9 separate modules?  

personally, I think this is the hardest part of the migration - finding out 
where all the stuff you know exists lives.  it's frustrating, especially 
when you _know_ the exact name of the method you need, you just can't find it.

ModPerl::MethodLookup::lookup_method() does make it a bit easier, though - 
it was much harder a few months ago :)

> I was really astonished when I had to load
> Apache::Log for using log_error(), just as an example.

actually, Apache::Log is probably one of the few classes in mp1 that mimics 
what mp2 does - outside of $r->log_error(), if you want to use the other 
logging methods (like $r->log->error()) you need to load Apache::Log manually.

I'm only pointing this out because it was something that made me feel a 
_little_ better when I was cursing all those module requirements ("oh, ok... 
it was _kinda_ like this before")

> So how about some generic loader that loads a partial "CORE" set of
> modules, especially to help with porting like Apache::Common or some such,
> that just exposes what developers are used to programming with from mp1 
> days,
> but without the full  &ModPerl::MethodLookup::preload_all_modules();

we've talked about this before, and I'm still in favor of the idea (although 
I was going to call it Apache::AllTheStuffGeoffWantsByDefault :)

> So an Apache::Common, might just be:
> package Apache::Common;

I would suggest that Apache::Common be only the things we used to have in 
mp1 - for example, people are used to having $r->print and $r->server but 
$r->pool is new.  even though we need pools for cleanups, I think _not_ 
hiding it will help people migrate as well.

> use Apache::RequestRec ();
> use Apache::RequestUtil ();
> use Apache::RequestIO ();
> use Apache::Response ();
> use APR::Table ();
> use APR::Pool ();

leave APR::Pool out

> use Apache::Connection ();
> use Apache::Server ();

Apache::ServerUtil is probably a good idea as well

> use Apache::Log ();

I'm not sure about this, since the behavior differs between $r->log_error 
and $r->log->error.  maybe it's a good transitional class to leave out.

anyway, just some thoughts...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message