Return-Path: Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 1160 invoked by uid 500); 6 May 2003 15:24:39 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 880 invoked from network); 6 May 2003 15:24:34 -0000 Received: from unknown (HELO secure.exclamationlabs.net) (66.77.29.176) by daedalus.apache.org with SMTP; 6 May 2003 15:24:34 -0000 Received: from modperlcookbook.org (ham-nat.covad.net [68.165.151.221]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id h46FNg830991; Tue, 6 May 2003 10:23:42 -0500 Message-ID: <3EB7D37D.3090603@modperlcookbook.org> Date: Tue, 06 May 2003 11:23:41 -0400 From: Geoffrey Young User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Josh Chamas CC: Stas Bekman , dev@perl.apache.org Subject: Re: [mp2] Making Apache::ASP optimized for mod_perl 2 References: <3EB753DB.70908@chamas.com> <3EB760F0.50709@stason.org> <3EB7CEC9.8070307@chamas.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > > 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... --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org