httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [apreq-2] Various test issues
Date Thu, 22 Jul 2004 04:24:58 GMT
Markus Wichitill wrote:
>>> mod_cgid is enabled. If tests are run as root, it's included in the
>>> generated httpd.conf. And I don't see any permissions that would 
>>> preclude
>>> the tests from including it when not run as root.
>>
>>
>> Neither do I - the system httpd.conf is parsed for available
>> modules, which should find mod_cgi and/or mod_cgid, if
>> enabled. I'll try to reproduce your problem (although
>> I'm using mod_cgi - not sure if that makes a difference).
> 
> 
> Silly me, I didn't look at my system httpd.conf's permissions, only the 
> modules'. After "chmod o+r httpd.conf", it works, not that the test can 
> rely  on that of course.
> 
> Well, actually for me it only works if A-R is already installed globally 
> (which it wasn't after a Perl 5.8.5 upgrade), since the test assumes 
> MP_INST_APACHE2=1. error_log of "perl t/TEST -verbose t/apreq/cgi.t":
> 
> [Thu Jul 22 01:59:12 2004] [error] [client 127.0.0.1] Premature end of 
> script headers: test_cgi.pl
> Can't locate Apache/Request.pm in @INC (@INC contains: 
> ../../blib/lib/Apache2 ../../blib/arch/Apache2 /usr/local/perl/lib .) at 
> test_cgi.pl line 13.
> 
> In my case, it's blib/lib/Apache/Request.pm. Would the following work 
> for MP_INST_APACHE2=1, too?

that's the right thing to do.

> Index: glue/perl/t/apreq/cgi.t
> ===================================================================
> RCS file: /home/cvspublic/httpd-apreq-2/glue/perl/t/apreq/cgi.t,v
> retrieving revision 1.5
> diff -u -r1.5 cgi.t
> --- glue/perl/t/apreq/cgi.t  11 Jul 2004 02:21:52 -0000  1.5
> +++ glue/perl/t/apreq/cgi.t  22 Jul 2004 00:53:20 -0000
> @@ -149,11 +149,11 @@
>  use strict;
>  use File::Basename;
>  use warnings FATAL => 'all';
> +use lib qw(../../blib/lib
> +           ../../blib/arch);
>  use Apache2;
>  use APR;
>  use APR::Pool;
> -use lib qw(../../blib/lib/Apache2
> -           ../../blib/arch/Apache2);
>  use Apache::Request;
>  use Apache::Cookie;

btw blib.pm does all the work for you, no need to work hard to setup lib 
and arch sub-dirs.

use blib qw(../..);
use Apache2;

or even:

use blib;
use Apache2;

NAME
        blib - Use MakeMaker's uninstalled version of a package

SYNOPSIS
         perl -Mblib script [args...]

         perl -Mblib=dir script [args...]

DESCRIPTION
        Looks for MakeMaker-like 'blib' directory structure starting in 
dir (or
        current directory) and working back up to five levels of '..'.
...

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message