Skip Menu |

This queue is for tickets about the Pod-POM-Web CPAN distribution.

Report information
The Basics
Id: 27298
Status: resolved
Priority: 0/
Queue: Pod-POM-Web

People
Owner: Nobody in particular
Requestors: ASKSH [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Add hint about 'PerlModule Apache2::compat' to documentation?
Hi! Nice work! But there's a small problem, Pod::POM::Web dies because Apache2::RequestRec etc. is not loaded when using the suggested httpd.conf configuration in the perldoc for Pod::Pom::Web: [SNIP] As a mod_perl service The recommended way to run this application is within a mod_perl envi- ronment. If you have Apache2 with mod_perl 2.0, then edit your perl.conf as follows : <Location /perldoc> SetHandler modperl PerlResponseHandler Pod::POM::Web->handler </Location> [/SNIP] Maybe add: PerlModule Apache2::compat ? Atleast that will make it work with Apache2 and mod_perl2. Sincerly, Ask Solem [asksh@cpan.org] From the apache2 error_log when using the suggested configuration: [Sat May 26 02:24:16 2007] [error] [client 127.0.0.1] Can't locate object method "path_info" via package "Apache2::RequestRec" at /usr/local/lib/perl5/site_perl/5.8.8/Pod/POM/Web.pm line 102.
Show quoted text
> From the apache2 error_log when using the suggested configuration: > [Sat May 26 02:24:16 2007] [error] [client 127.0.0.1] Can't locate > object method "path_info" > via package "Apache2::RequestRec" at > /usr/local/lib/perl5/site_perl/5.8.8/Pod/POM/Web.pm > line 102. > >
Hi Ask, I think the problem you mention comes from something else. Method "path_info" is defined in Apache2::RequestRec, and I don't see why adding a modperl1 compatibility layer, as you suggest, would change anything. Are you sure you have Apache2/modperl2 ? The described Pod::POM::Web configuration is just to make the perldoc service available, but it assumes that you have a correct modperl2 installation to start with -- for setting it up, just refer to the modperl documentation. Laurent
Subject: Re: [rt.cpan.org #27298] Add hint about 'PerlModule Apache2::compat' to documentation?
Date: Mon, 28 May 2007 22:40:16 +0200
To: bug-Pod-POM-Web [...] rt.cpan.org
From: Ask Solem Hoel <ask [...] 0x61736b.net>
On May 28, 2007, at 5:18 PM, via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=27298 > > >
>> From the apache2 error_log when using the suggested configuration: >> [Sat May 26 02:24:16 2007] [error] [client 127.0.0.1] Can't locate >> object method "path_info" >> via package "Apache2::RequestRec" at >> /usr/local/lib/perl5/site_perl/5.8.8/Pod/POM/Web.pm >> line 102. >> >>
> > Hi Ask, > > I think the problem you mention comes from something else. > Method "path_info" is defined in Apache2::RequestRec, and I don't see > why adding a modperl1 compatibility layer, as you suggest, would > change anything. > > > Are you sure you have Apache2/modperl2 ? > > The described Pod::POM::Web configuration is just to make the perldoc > service available, but it assumes that you have a correct modperl2 > installation to start with -- for setting it up, just refer to the > modperl documentation. > > Laurent > >
Hi Laurent! There is nothing wrong with my mod_perl2 installation. I'm assuming some startup script loads Apache2::RequestRec on your server? You either have to 1) Load Apache2::RequestRec (and other required modules) in Pod/POM/ Web.pm. 2) Use a startup script that loads these modules at server start. 3) Use Apache2::compat, which loads these modules when necessary. -- ad()((!!!ÆÆ::)(,..c.xz("F(=ÀxS&@#.da####!!(); cell: +47 41545862 http://www.0x61736b.net
Show quoted text
> I'm assuming some startup script loads Apache2::RequestRec on your > server? >
Correct, and I wrongly thought that every modperl installation does the same. Show quoted text
> You either have to > > 1) Load Apache2::RequestRec (and other required modules) in Pod/POM/ > Web.pm. >
I just tried to dynamically eval "use Apache2::RequestRec; use Apache2::RequestIO" if Pod::Pom::Web detects that it is running under modperl. But that doesn't work, the request object still doesn't find its methods. There seems to be much magic in modperl, because the request object is blessed as Apache2::RequestRec, even if that module is not loaded .. however it only finds its methods when the module is _statically_ loaded. Stating loading of Apache2::* in Pod::POM::Web would not be appropriate, even with an eval, because maybe we are running under the standalone server (don't know which before the first request comes in). Show quoted text
> 2) Use a startup script that loads these modules at server start. > > 3) Use Apache2::compat, which loads these modules when necessary. >
I'll change the documentation, saying that you have to configure Apache like this: PerlModule Apache2::RequestRec PerlModule Apache2::RequestIO <Location /perlfoo> SetHandler modperl PerlResponseHandler Pod::POM::Web->handler </Location> Thanks for your contribution, Laurent
ticket closed