Yup. Apache::Dispatch is what I'm looking for! Thanks for the reminder.
Even though I can't find Apache2::Dispatch (Dispatch for Apache2?), it
gives me an idea on how to implement it internally.
Thanks Stas.
Stas Bekman wrote:
Foo Ji-Haw wrote:
Hello guys,
I have been happily developing apps with MP2. Some hiccups, but
mostly all due to my bad coding. But generally MP2 is a great
platform and I will like to be a better MP2 guy. :)
For one of my applications, I have a bunch of modules that I wrote,
each actually maps to unique directory paths. For example:
app::module1 => http://www.domain.com/module1/
app::module2 => http://www.domain.com/module2/
I can do this by creating an exhaustive list in httpd.conf with:
<Location /module1>
SetHandler perl-script
PerlResponseHandler app::module1
</Location>
<Location /module2>
SetHandler perl-script
PerlResponseHandler app::module2
</Location>
...
But if I have a really long list of modules all with similar package
names, is there a way to do autoloading at the httpd.conf level? I
thought I read about it before, but now I just can't seem to find it
on the Web again...
Thanks in advance.
Foo Ji-Haw, please take a look at Geoff's:
http://search.cpan.org/dist/Apache-Dispatch/
I'm not sure if was ported to mp2, but it should be an easy thing to do.
Also take a look at:
http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.html