perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: [mp2] accessing the config of another module
Date Wed, 17 May 2006 16:42:02 GMT
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

Mime
View raw message