Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 69545 invoked from network); 17 May 2006 16:42:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 May 2006 16:42:35 -0000 Received: (qmail 23941 invoked by uid 500); 17 May 2006 16:42:27 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 23922 invoked by uid 500); 17 May 2006 16:42:27 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 23908 invoked by uid 99); 17 May 2006 16:42:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 09:42:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.77.29.165] (HELO secure.exclamationlabs.net) (66.77.29.165) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2006 09:42:26 -0700 Received: from [192.168.2.160] (c-69-141-1-101.hsd1.pa.comcast.net [69.141.1.101]) (authenticated (0 bits)) by secure.exclamationlabs.net (8.11.6/8.11.6) with ESMTP id k4HGg5515211; Wed, 17 May 2006 11:42:05 -0500 Message-ID: <446B525A.60706@modperlcookbook.org> Date: Wed, 17 May 2006 12:42:02 -0400 From: Geoffrey Young User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Charles Bueche CC: modperl@perl.apache.org Subject: Re: [mp2] accessing the config of another module References: <1147871650.16452.66.camel@bluez.bueche.ch> <446B2747.6040503@modperlcookbook.org> <1147883041.16436.70.camel@bluez.bueche.ch> In-Reply-To: <1147883041.16436.70.camel@bluez.bueche.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Charles Bueche wrote: > Hi Geoffrey, > > I own your book, and wasn't aware of this recipe. there's lots of stuff in there people just don't know about :) > > I find this method a bit complicated, until now, my module was pure > perl. But if this is the only way... > yeah, it pretty much is. essentially, each C module's directives are private to themselves... unless you make them publically available through an api. of course, you could write your C access handler in perl, even with custom directives - that would give you full access in perl. or you could write your C access handler in C in XS land and offer a perl api for your fixup handler. an example of that is something like this http://search.cpan.org/dist/Apache-IncludeHook/ note the BOOT section in IncludeHook.xs - that's pretty much the same as writing the module in C, and it gives you the opportunity to offer a perl api. for an example of that, see http://search.cpan.org/dist/Apache-SSLLookup/ combine the two and you could be all set... or just write your access handler in perl and be done with it :) if it's custom directives in httpd.conf you want, see this http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-Template-2.00_01.tar.gz and some of the other Apache2 modules on CPAN. > Thanks anyway for your hint. sure :) > > BTW : do you prepare a 2.x version of the cookbook ? I think that's unlikely at this point - everyone has far less tuits these days than we did back in 2000 :) > I find it a great resource, I learned a lot from it. thanks. --Geoff