<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>test-dev@perl.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/"/>
<id>http://mail-archives.apache.org/mod_mbox/perl-test-dev/</id>
<updated>2009-12-09T17:29:38Z</updated>
<entry>
<title>[PATCH] Apache-Test/lib/Apache/TestConfig.pm compatibility with httpd	trunk</title>
<author><name>Jeff Trawick &lt;trawick@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200912.mbox/%3ccc67648e0912021004v455cf644rb4e6a54dd94367c2@mail.gmail.com%3e"/>
<id>urn:uuid:%3ccc67648e0912021004v455cf644rb4e6a54dd94367c2@mail-gmail-com%3e</id>
<updated>2009-12-02T18:04:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
All the old mutex directives were replaced by Mutex.  IfVersion ==
2.3.4 isn't handled in the patch because of a change to the Mutex
syntax in 2.3.5-dev.

Note that mod_version is now a dependency for APACHE2.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: fixing an httpd test which is confused about which modules are	loaded in the test conf</title>
<author><name>Joe Orton &lt;jorton@redhat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200910.mbox/%3c20091021114855.GB5682@redhat.com%3e"/>
<id>urn:uuid:%3c20091021114855-GB5682@redhat-com%3e</id>
<updated>2009-10-21T11:48:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Fri, Oct 16, 2009 at 03:32:04PM -0400, Jeff Trawick wrote:
..
&gt; --- Apache-Test/lib/Apache/TestConfigParse.pm	(revision 822728)
&gt; +++ Apache-Test/lib/Apache/TestConfigParse.pm	(working copy)
&gt; @@ -224,15 +224,15 @@
&gt; 
&gt;          $name = $modname_alias{$name} if $modname_alias{$name};
&gt; 
&gt; -        # remember all found modules
&gt; -        $self-&gt;{modules}-&gt;{$name} = $file;
&gt; -        debug "Found: $modname =&gt; $name";
&gt; -
...
&gt; 
&gt; So is either of these a reasonable fix?  (It doesn't seem right that
&gt; info.t has to worry about modules which were found in the
&gt; configuration but not loaded, but I don't know what is expected of the
&gt; configuration object.)

Either seems reasonable to me, though the use of the word "all" in the 
original comment above might imply the placement of that code is 
deliberate, so I'd probably go for the info.t patch.

Regards, Joe


</pre>
</div>
</content>
</entry>
<entry>
<title>fixing an httpd test which is confused about which modules are loaded	in the test conf</title>
<author><name>Jeff Trawick &lt;trawick@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200910.mbox/%3ccc67648e0910161232x6a9f35d2r7ef6d1515026468a@mail.gmail.com%3e"/>
<id>urn:uuid:%3ccc67648e0910161232x6a9f35d2r7ef6d1515026468a@mail-gmail-com%3e</id>
<updated>2009-10-16T19:32:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The mod_info test (t/modules/info.t) asks Apache::Test::config() for a
list of modules.  It then expects each of those modules to be reported
by mod_info.  But some of those modules are not actually loaded
because of modules which are skipped by TestConfigParse.pm

#XXX mod_jk requires JkWorkerFile or JkWorker to be configured
#skip it for now, tomcat has its own test suite anyhow.
#XXX: mod_casp2.so requires other settings in addition to LoadModule
#XXX: mod_bwshare.so blocks fast requests that tests are doing
my @autoconfig_skip_module = qw(mod_jk.c mod_casp2.c mod_bwshare.c);

If mod_jk is in the configuration being tested, the mod_info test will
fail because it expects mod_jk to be reported by mod_info, even though
the LoadModule for mod_jk is skipped.

One possible fix is to consult should_skip_module() to see if it was
skipped from the test httpd.conf file too:

Index: t/modules/info.t
===================================================================
--- t/modules/info.t	(revision 825306)
+++ t/modules/info.t	(working copy)
@@ -28,7 +28,7 @@
 }

 foreach (sort keys %$mods) {
-    push(@expected,$_) if $mods-&gt;{$_};
+    push(@expected,$_) if $mods-&gt;{$_} &amp;&amp; !$config-&gt;should_skip_module($_);
 }
 @actual = sort @actual;
 @expected = sort @expected;

Another possible fix is to omit skipped modules from the module list:

Index: Apache-Test/lib/Apache/TestConfigParse.pm
===================================================================
--- Apache-Test/lib/Apache/TestConfigParse.pm	(revision 822728)
+++ Apache-Test/lib/Apache/TestConfigParse.pm	(working copy)
@@ -224,15 +224,15 @@

         $name = $modname_alias{$name} if $modname_alias{$name};

-        # remember all found modules
-        $self-&gt;{modules}-&gt;{$name} = $file;
-        debug "Found: $modname =&gt; $name";
-
         if ($self-&gt;should_skip_module($name)) {
             debug "Skipping LoadModule of $name";
             next;
         }

+        # remember all found modules that aren't skipped
+        $self-&gt;{modules}-&gt;{$name} = $file;
+        debug "Found: $modname =&gt; $name";
+
         debug "LoadModule $modname $name";

         # sometimes people have broken system-wide httpd.conf files,

So is either of these a reasonable fix?  (It doesn't seem right that
info.t has to worry about modules which were found in the
configuration but not loaded, but I don't know what is expected of the
configuration object.)


</pre>
</div>
</content>
</entry>
<entry>
<title>mp2 hangs when running make test</title>
<author><name>Oliver Block &lt;lists@oliver-block.eu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200903.mbox/%3c200903201929.43212.lists@oliver-block.eu%3e"/>
<id>urn:uuid:%3c200903201929-43212-lists@oliver-block-eu%3e</id>
<updated>2009-03-20T18:29:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello everybody,

I'd like to submit the following bug report. In order to understand the 
problem I changed /conf/modperl_extra.pl after `make test` has failed. I 
wanted to know if startup_info() returns, so I added code to an empty line 
(line 37):

(/conf/modperl_extra.pl)
...
startup_info();
Apache2::ServerUtil-&gt;server-&gt;log-&gt;info('peep'); # manually added 
test_add_config();
...


It seems to me as if the call to Apache Apache2::ServerUtil-&gt;server-&gt;log-&gt;info 
helps to prevent the test from hanging.

I have no idea why, but you may find out. I enclosed both test summaries, make 
test and make test with modificions. to the end of this posting.

Best regards,

Oliver Block


****************** apache2ctl -v ***************************
  

Server version: Apache/2.2.11 (Linux/SUSE)
Server built:   Mar 18 2009 18:09:34

********************** perl -V *******************************

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.6.25, archname=x86_64-linux-thread-multi
    uname='linux oldfield 2.6.25 #1 smp 2008-12-08 03:55:28 +0100 x86_64 
x86_64 x86_64 gnulinux '
    
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db
-Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -g -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags 
='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    
optimize='-O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -Wall -pipe',
    
cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing
-pipe'
    ccversion='', gccversion='4.3.1 20080507 (prerelease) [gcc-4_3-branch 
revision 135036]', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib64'
    libpth=/lib64 /usr/lib64 /usr/local/lib64
    libs=-lm -ldl -lcrypt -lpthread
    perllibs=-lm -ldl -lcrypt -lpthread
    libc=/lib64/libc-2.8.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.8'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, 
ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib64'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_TRACK_MEMPOOL PERL_USE_SAFE_PUTENV
                        USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS
                        USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
  Built under linux
  Compiled at Jan 28 2009 15:28:34
  @INC:
    /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/5.10.0
    /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/site_perl/5.10.0
    /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.10.0
    /usr/lib/perl5/vendor_perl
    .
********************* make test ****************************
...
/usr/bin/perl -Iblib/arch -Iblib/lib \
        t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c 
unlimited; /usr/bin/perl /usr/src/packages/BUILD/mod_perl-2.0.4/t/TEST -clean
APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= 
APACHE_TEST_APXS= \
        /usr/bin/perl -Iblib/arch -Iblib/lib \
        t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c 
unlimited; /usr/bin/perl /usr/src/packages/BUILD/mod_perl-2.0.4/t/TEST -bugreport -verbose=0
[warning] root mode: changing the files ownership to 'nobody' (65534:65533)
[warning] testing whether 'nobody' is able 
to -rwx /usr/src/packages/BUILD/mod_perl-2.0.4/t
"/usr/bin/perl" -Mlib=/usr/src/packages/BUILD/mod_perl-2.0.4/Apache-Test/lib -MApache::TestRun
-e 'eval 
{ Apache::TestRun::run_root_fs_test(65534, 65533, 
q[/usr/src/packages/BUILD/mod_perl-2.0.4/t]) }';


[warning] result: OK
[warning] the client side drops 'root' permissions and becomes 'nobody'
/usr/sbin/httpd2-prefork  -d /usr/src/packages/BUILD/mod_perl-2.0.4/t -f /usr/src/packages/BUILD/mod_perl-2.0.4/t/conf/httpd.conf
-D 
APACHE2 -D PERL_USEITHREADS
using Apache/2.2.11 (prefork MPM)

waiting 120 seconds for server to start: .[Fri Mar 20 19:02:26 2009] [info] 6 
Apache2:: modules loaded
[Fri Mar 20 19:02:26 2009] [info] 0 APR:: modules loaded
[Fri Mar 20 19:02:26 2009] [info] base server + 28 vhosts ready to run tests
..........................................................................................................................
waiting 120 seconds for server to start: not ok
[  error] giving up after 121 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 420) and repeat the last command.

[  error] server failed to start! (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Fehler 1

************ make test (with modifications) ****************

Failed Test     Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/apache/util.t                8    4  1-4
7 tests and 1 subtest skipped.
Failed 1/238 test scripts. 4/2457 subtests failed.
Files=238, Tests=2457, 127 wallclock secs (88.53 cusr + 16.14 csys = 104.67 
CPU)
Failed 1/238 test programs. 4/2457 subtests failed.
[warning] server localhost:8529 shutdown
[  error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Fehler 1

************************************************************

--


</pre>
</div>
</content>
</entry>
<entry>
<title>query regarding project participation ASF.</title>
<author><name>&quot;battipatisainagendra Bhavaniprasad&quot; &lt;sainagendrabhavaniprasad@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200901.mbox/%3cdec0fd580901080435v204e6b4cs29a2e63592494ffb@mail.gmail.com%3e"/>
<id>urn:uuid:%3cdec0fd580901080435v204e6b4cs29a2e63592494ffb@mail-gmail-com%3e</id>
<updated>2009-01-08T12:35:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,
            I am prasad i am new to open source.I am interested in
participating in ASF (Any Project).Let me tell about me first.I am basically
test engineer with 5+ years of exp.I know "selenium tool" which is web
functional testing tool.I wisited the ASF home page but there are many
projects.Let me know who ever is eagerlly waiting for some testing work
using selinium,i am ready to contribute.

please reply ASAP.

Rgds,
Prasad


</pre>
</div>
</content>
</entry>
<entry>
<title>[Fwd: [rt.cpan.org #36305] Overridden get_basic_credentials broken w/ NTLM Authentication]</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200805.mbox/%3c484066D8.3010805@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c484066D8-3010805@modperlcookbook-org%3e</id>
<updated>2008-05-30T20:43:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


-------- Original Message --------
Subject: [rt.cpan.org #36305] Overridden get_basic_credentials broken w/ 
NTLM Authentication
Date: Fri, 30 May 2008 13:43:17 -0400
From: RFRANKEL via RT &lt;bug-Apache-Test@rt.cpan.org&gt;
Reply-To: bug-Apache-Test@rt.cpan.org
To: undisclosed-recipients:;
References: &lt;RT-Ticket-36305@rt.cpan.org&gt;


Fri May 30 13:43:16 2008: Request 36305 was acted upon.
Transaction: Ticket created by RFRANKEL
        Queue: Apache-Test
      Subject: Overridden get_basic_credentials broken w/ NTLM 
Authentication
    Broken in: 1.29, 1.30
     Severity: Important
        Owner: Nobody
   Requestors: RFRANKEL@cpan.org
       Status: new
  Ticket &lt;URL: http://rt.cpan.org/Ticket/Display.html?id=36305 &gt;


Apache::TestRequest::get_basic_credentials dies when accessing a realm
using mod_ntlm for authentication. The reason is that $realm is undefined.

Patch to fix below:

--- TestRequest.pm~     2007-11-14 01:44:36.000000000 -0500
+++ TestRequest.pm      2008-05-30 11:35:57.681722000 -0400
@@ -260,7 +260,7 @@
      my($self, $realm, $uri, $proxy) = @_;

      for ($realm, '__ALL__') {
-        next unless $credentials{$_};
+        next unless $_ &amp;&amp; $credentials{$_};
          return @{ $credentials{$_} };
      }


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [rt.cpan.org #34470] make test trying to  load os2 process on cygwin</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200803.mbox/%3c47EBCD5E.5040403@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c47EBCD5E-5040403@modperlcookbook-org%3e</id>
<updated>2008-03-27T16:37:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

&gt; Can't locate loadable object for module OS2::Process in @INC (@INC 
&gt; contains: 
&gt; C:\cygwin\opt\spikesource\var\tmp\portage\apache-2.2.3\work\Apache-Test-1.28\blib\lib

&gt; C:\cygwin\opt\spikesource\var\tmp\portage\apache-2.2.3\work\Apache-Test-1.28\blib\arch

&gt; C:\cygwin\opt\spikesource\var\tmp\portage\apache-2.2.3\work\Apache-Test-1.28 
&gt; lib ../lib blib\arch blib\lib 
&gt; C:/cygwin/opt/spikesource/share/perl/lib/5.8.7 
&gt; C:/cygwin/opt/spikesource/share/perl/lib 
&gt; C:/cygwin/opt/spikesource/share/perl/site/lib .) at 
&gt; C:/cygwin/opt/spikesource/share/perl/lib/Win32/Process.pm line 25
&gt; BEGIN failed--compilation aborted at 
&gt; C:/cygwin/opt/spikesource/share/perl/lib/Win32/Process.pm line 25.

this line is the problem... and it's in Win32::Process, not Apache-Test 
- nowhere do we attempt to load OS2::Process.

closing bug.

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>[Fwd: [rt.cpan.org #34470] make test trying to  load os2 process on cygwin]</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200803.mbox/%3c47EBC07F.40009@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c47EBC07F-40009@modperlcookbook-org%3e</id>
<updated>2008-03-27T15:42:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


-------- Original Message --------
Subject: [rt.cpan.org #34470] make test trying to  load os2 process on 
cygwin
Date: Thu, 27 Mar 2008 09:25:43 -0400
From: SatheeshKumar Mohan via RT &lt;bug-Apache-Test@rt.cpan.org&gt;
Reply-To: bug-Apache-Test@rt.cpan.org
To: undisclosed-recipients:;
References: &lt;RT-Ticket-34470@rt.cpan.org&gt; &lt;47EBA031.8000500@spikesource.com&gt;


Thu Mar 27 09:25:42 2008: Request 34470 was acted upon.
Transaction: Ticket created by skumar@spikesource.com
        Queue: Apache-Test
      Subject: make test trying to  load os2 process on cygwin
    Broken in: (no value)
     Severity: (no value)
        Owner: Nobody
   Requestors: skumar@spikesource.com
       Status: new
  Ticket &lt;URL: http://rt.cpan.org/Ticket/Display.html?id=34470 &gt;


Operating system:
Cygwin (on Windows 2003)

CYGWIN_NT-5.2  i686 Cygwin

Perl version:
v5.8.7 built for MSWin32-x86-multi-thread

Description:
When i run nmake test on cygwin, I am getting the following error,

nmake test

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

C:\cygwin\opt\spikesource\share\perl\bin\perl.exe -Iblib\arch -Iblib\lib
t/TEST -clean
Can't locate loadable object for module OS2::Process in @INC (@INC
contains:
C:\cygwin\opt\spikesource\var\tmp\portage\apache-2.2.3\work\Apache-Test-1.28\blib\lib 

C:\cygwin\opt\spikesource\var\tmp\portage\apache-2.2.3\work\Apache-Test-1.28\blib\arch 

C:\cygwin\opt\spikesource\var\tmp\portage\apache-2.2.3\work\Apache-Test-1.28 

lib ../lib blib\arch blib\lib
C:/cygwin/opt/spikesource/share/perl/lib/5.8.7
C:/cygwin/opt/spikesource/share/perl/lib
C:/cygwin/opt/spikesource/share/perl/site/lib .) at
C:/cygwin/opt/spikesource/share/perl/lib/Win32/Process.pm line 25
BEGIN failed--compilation aborted at
C:/cygwin/opt/spikesource/share/perl/lib/Win32/Process.pm line 25.
Compilation failed in require at lib/Apache/TestServer.pm line 380.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x2'
Stop.

Note:  It is trying to load OS2::Process module which is wrong.


Thanks,
SatheeshKumar.




</pre>
</div>
</content>
</entry>
<entry>
<title>[ANNOUNCE] Apache-Test 1.30</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c474B2355.9040200@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c474B2355-9040200@taperfriendlymusic-org%3e</id>
<updated>2007-11-26T19:49:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Greetings,

Version 1.30 of Apache::Test will be coming to a CPAN mirror near you 
shortly.

md5: f4e34be218a25048def5a4f797ae7cb9

Summary of changes in version 1.30:

Added t_write_test_lib for temporary testing packages
[Fred Moyer &lt;fred@redhotpenguin.com&gt;]

Fix syntax error in generated PHP files t/conf/*.php.in
[Philippe M. Chiasson]

Add bwshare.so to the list of modules to not inherit b/c
it rate limits requests to less then that of a test suite.
PR: 25548
[imacat &lt;imacat@mail.imacat.idv.tw&gt;]

Add EXTRA_CFLAGS to c-module building if defined in the environment
[Geoffrey Young]



Enjoy!

- the modperl development team


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c474B1327.6070205@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c474B1327-6070205@taperfriendlymusic-org%3e</id>
<updated>2007-11-26T18:40:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Geoffrey Young wrote:
&gt; 
&gt; Joe Orton wrote:
&gt;&gt; On Wed, Nov 21, 2007 at 11:31:27AM -0800, Fred Moyer wrote:
&gt;&gt;&gt; Geoffrey Young wrote:
&gt;&gt;&gt;&gt; fwiw, I just watched fred get caught by this exact thing at apachecon -
&gt;&gt;&gt;&gt; don't forget to nuke ~/.apache-test beforehand :)
&gt;&gt;&gt; Yeah that was no fun, and I don't think it was the first time it happened 
&gt;&gt;&gt; to me.  This suggestion may be too verbose for most people's tastes, but it 
&gt;&gt;&gt; would be helpful to me to always have the 'inheriting config file:' output 
&gt;&gt;&gt; present under normal A::T execution.
&gt;&gt; I would rather see the caching stuff disabled by default.
&gt; 
&gt; I didn't want to support any of that nonsense, but I lost.
&gt; 
&gt;&gt; I put "export 
&gt;&gt; APACHE_TEST_NO_STICKY_PREFERENCES=y" in my ~/.bash_profile after getting 
&gt;&gt; by this one time too many, and forgot about it.
&gt; 
&gt; :)

I can see where this feature would be useful during core development of 
Apache::Test, but not so useful when using Apache::Test on varied platforms.

If I can scrape up some tuits later this week I'll see about putting a 
patch together which makes this more user friendly.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c474B0858.8030005@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c474B0858-8030005@modperlcookbook-org%3e</id>
<updated>2007-11-26T17:54:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Joe Orton wrote:
&gt; On Wed, Nov 21, 2007 at 11:31:27AM -0800, Fred Moyer wrote:
&gt;&gt; Geoffrey Young wrote:
&gt;&gt;&gt; fwiw, I just watched fred get caught by this exact thing at apachecon -
&gt;&gt;&gt; don't forget to nuke ~/.apache-test beforehand :)
&gt;&gt; Yeah that was no fun, and I don't think it was the first time it happened 
&gt;&gt; to me.  This suggestion may be too verbose for most people's tastes, but it 
&gt;&gt; would be helpful to me to always have the 'inheriting config file:' output 
&gt;&gt; present under normal A::T execution.
&gt; 
&gt; I would rather see the caching stuff disabled by default.

I didn't want to support any of that nonsense, but I lost.

&gt; I put "export 
&gt; APACHE_TEST_NO_STICKY_PREFERENCES=y" in my ~/.bash_profile after getting 
&gt; by this one time too many, and forgot about it.

:)

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c474B07FB.20708@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c474B07FB-20708@modperlcookbook-org%3e</id>
<updated>2007-11-26T17:52:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

&gt; I did try to run TEST using the -httpd_conf option as follows but it's
&gt; still trying to inherit from /etc/apache2/httpd.conf:
&gt; 
&gt;   ./t/TEST -httpd_conf=/etc/apache2/apache2.conf -conf -trace=debug

there is no equal sign in there, so it's

  t/TEST -httpd_conf /etc/apache2/apache2.conf -conf -trace=debug

yeah, that's right, some options expect you to assign a value to them,
some automagically parse the next argument.  I didn't make this crap up.

if you can keep them straight in your mind, configure-time things are
automagic (TestConfig*.pm) while run-time things use an equal sign.

*sigh*

anyway, I verified that -httpd_conf works when you do it my way, but it
fails to see the file if you do it your way.  that it doesn't
complain... well, like I said, I didn't design the interface :)

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Joe Orton &lt;jorton@redhat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071126115937.GB8258@redhat.com%3e"/>
<id>urn:uuid:%3c20071126115937-GB8258@redhat-com%3e</id>
<updated>2007-11-26T11:59:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, Nov 24, 2007 at 11:50:54AM -0500, William McKee wrote:
...
&gt; I did try to run TEST using the -httpd_conf option as follows but it's
&gt; still trying to inherit from /etc/apache2/httpd.conf:
&gt; 
&gt;   ./t/TEST -httpd_conf=/etc/apache2/apache2.conf -conf -trace=debug

Ah, OK.  A::TestConfig is finding apxs and then setting the default conf 
file location to `apxs -q sysconfdir`/httpd.conf.  From a quick look at 
the code it's not obvious to me why the command-line argument is being 
overridden by the apxs-based default, but I agree it's a bug.  (sorry, 
not much help, I know!)

joe



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>William McKee &lt;william@knowmad.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071124165054.GD3483@knowmad.com%3e"/>
<id>urn:uuid:%3c20071124165054-GD3483@knowmad-com%3e</id>
<updated>2007-11-24T16:50:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; &gt; Yes, I think that should work.  Can you try:
&gt; &gt; 
&gt; &gt; ./t/TEST -conf -trace=debug
&gt; &gt; 
&gt; &gt; and follow the lines from "inheriting config file:" to see what happens.

It's not finding apache.conf which is where Ubuntu is keeping all config
info. As I mentioned before, httpd.conf is empty. I don't know why they
are doing this. I've included the trace output below from just before
the "inheriting config file" line to the end. It's discovering the
SERVER_CONFIG_FILE but not using it when doing inheritance.

I did check the output of `/usr/sbin/apache2 -V` which shows the
following config setting:

 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

`TEST.PL -help` tells me that the value of -httpd_conf is derived from
apxs. What is the apxs command that gets this value? I'd like to check
that there is not a misconfiguration problem in my copy of apxs.

I did try to run TEST using the -httpd_conf option as follows but it's
still trying to inherit from /etc/apache2/httpd.conf:

  ./t/TEST -httpd_conf=/etc/apache2/apache2.conf -conf -trace=debug


&gt; fwiw, I just watched fred get caught by this exact thing at apachecon -
&gt; don't forget to nuke ~/.apache-test beforehand :)

I don't have that file on my system. Perhaps that's because A::T is not
finding a default config file to inherit from?



Thanks,
William


 -SNIP-
[  debug] isolated httpd_defines SERVER_CONFIG_FILE = /etc/apache2/apache2.conf
[  debug] inheriting config file: /etc/apache2/httpd.conf
[  debug] Matched Apache revision Apache/2.2.3 2
[warning] cleaning out current configuration
[  debug] unlink /home/william/Web/t/logs/apache_runtime_status.sem: No
such file or directory
[  debug] found mod_mime.so =&gt; /usr/lib/apache2/modules/mod_mime.so
[  debug] generating conf/mime.types
[  debug] Will 'Include' /home/william/Web/t/conf/extra.conf config file
[  debug] generating conf/extra.conf from
/home/william/Web/t/conf/extra.conf.in
[  debug] generating conf/httpd.conf
[  debug] found mod_alias.so =&gt; /usr/lib/apache2/modules/mod_alias.so
[  debug] found mod_perl.so =&gt; /usr/lib/apache2/modules/mod_perl.so
[  debug] generating conf/modperl_inc.pl
[  debug] generating conf/modperl_startup.pl
[  debug] generating conf/apache_test_config.pm
[  debug] saving config data to apache_test_config.pm
[warning] reconfiguration done


-- 
Knowmad Technologies - Software development &amp; Process automation
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Joe Orton &lt;jorton@redhat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071121194313.GB10308@redhat.com%3e"/>
<id>urn:uuid:%3c20071121194313-GB10308@redhat-com%3e</id>
<updated>2007-11-21T19:43:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Wed, Nov 21, 2007 at 07:35:37PM +0000, Joe Orton wrote:
&gt; On Wed, Nov 21, 2007 at 11:31:27AM -0800, Fred Moyer wrote:
&gt; &gt; Geoffrey Young wrote:
&gt; &gt;&gt; fwiw, I just watched fred get caught by this exact thing at apachecon -
&gt; &gt;&gt; don't forget to nuke ~/.apache-test beforehand :)
&gt; &gt;
&gt; &gt; Yeah that was no fun, and I don't think it was the first time it happened 
&gt; &gt; to me.  This suggestion may be too verbose for most people's tastes, but it 
&gt; &gt; would be helpful to me to always have the 'inheriting config file:' output 
&gt; &gt; present under normal A::T execution.
&gt; 
&gt; I would rather see the caching stuff disabled by default.  I put "export 
&gt; APACHE_TEST_NO_STICKY_PREFERENCES=y" in my ~/.bash_profile after getting 
&gt; by this one time too many, and forgot about it.

^burned




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Joe Orton &lt;jorton@redhat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071121193537.GA10308@redhat.com%3e"/>
<id>urn:uuid:%3c20071121193537-GA10308@redhat-com%3e</id>
<updated>2007-11-21T19:35:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Wed, Nov 21, 2007 at 11:31:27AM -0800, Fred Moyer wrote:
&gt; Geoffrey Young wrote:
&gt;&gt; fwiw, I just watched fred get caught by this exact thing at apachecon -
&gt;&gt; don't forget to nuke ~/.apache-test beforehand :)
&gt;
&gt; Yeah that was no fun, and I don't think it was the first time it happened 
&gt; to me.  This suggestion may be too verbose for most people's tastes, but it 
&gt; would be helpful to me to always have the 'inheriting config file:' output 
&gt; present under normal A::T execution.

I would rather see the caching stuff disabled by default.  I put "export 
APACHE_TEST_NO_STICKY_PREFERENCES=y" in my ~/.bash_profile after getting 
by this one time too many, and forgot about it.

joe


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c4744878F.1000807@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c4744878F-1000807@taperfriendlymusic-org%3e</id>
<updated>2007-11-21T19:31:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Geoffrey Young wrote:
&gt; 
&gt; Joe Orton wrote:
&gt;&gt; On Mon, Nov 19, 2007 at 11:45:59PM -0500, William McKee wrote:
&gt;&gt;&gt; On Mon, Nov 19, 2007 at 09:31:30AM +0000, Joe Orton wrote:
&gt;&gt;&gt;&gt;&gt; Debian/Ubuntu does not use httpd.conf to load modules; it uses
&gt;&gt;&gt;&gt;&gt; apache2.conf and loads the modules from a directory
&gt;&gt;&gt;&gt;&gt; (/etc/apache2/mods-enabled). mod_env, which provides the PassEnv
&gt;&gt;&gt;&gt;&gt; directive, is being loaded in this way. I guess A::T does not support
&gt;&gt;&gt;&gt;&gt; auto-detecting these modules yet. Is any work being done in this area?
&gt;&gt;&gt;&gt; I presume the "mods-enabled" directory contains config files included 
&gt;&gt;&gt;&gt; via "Include" from the main configuration file?  A::T follows "Include" 
&gt;&gt;&gt;&gt; directives so this should work.
&gt;&gt;&gt; The apache.conf file contains the following two lines which load the
&gt;&gt;&gt; modules and any configuration directives:
&gt;&gt;&gt;
&gt;&gt;&gt;   Include /etc/apache2/mods-enabled/*.load
&gt;&gt;&gt;   Include /etc/apache2/mods-enabled/*.conf
&gt;&gt;&gt;
&gt;&gt;&gt; Should that work? Isn't there a way to debug or trace the config
&gt;&gt;&gt; process?
&gt;&gt; Yes, I think that should work.  Can you try:
&gt;&gt;
&gt;&gt; ./t/TEST -conf -trace=debug
&gt;&gt;
&gt;&gt; and follow the lines from "inheriting config file:" to see what happens.
&gt; 
&gt; fwiw, I just watched fred get caught by this exact thing at apachecon -
&gt; don't forget to nuke ~/.apache-test beforehand :)

Yeah that was no fun, and I don't think it was the first time it 
happened to me.  This suggestion may be too verbose for most people's 
tastes, but it would be helpful to me to always have the 'inheriting 
config file:' output present under normal A::T execution.

Most people have at least one httpd.conf file on their system, and those 
with system installed apaches usually have /etc/httpd.conf also ( I did 
and didn't know about it ).


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c47442827.7050501@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c47442827-7050501@modperlcookbook-org%3e</id>
<updated>2007-11-21T12:44:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Joe Orton wrote:
&gt; On Mon, Nov 19, 2007 at 11:45:59PM -0500, William McKee wrote:
&gt;&gt; On Mon, Nov 19, 2007 at 09:31:30AM +0000, Joe Orton wrote:
&gt;&gt;&gt;&gt; Debian/Ubuntu does not use httpd.conf to load modules; it uses
&gt;&gt;&gt;&gt; apache2.conf and loads the modules from a directory
&gt;&gt;&gt;&gt; (/etc/apache2/mods-enabled). mod_env, which provides the PassEnv
&gt;&gt;&gt;&gt; directive, is being loaded in this way. I guess A::T does not support
&gt;&gt;&gt;&gt; auto-detecting these modules yet. Is any work being done in this area?
&gt;&gt;&gt; I presume the "mods-enabled" directory contains config files included 
&gt;&gt;&gt; via "Include" from the main configuration file?  A::T follows "Include" 
&gt;&gt;&gt; directives so this should work.
&gt;&gt; The apache.conf file contains the following two lines which load the
&gt;&gt; modules and any configuration directives:
&gt;&gt;
&gt;&gt;   Include /etc/apache2/mods-enabled/*.load
&gt;&gt;   Include /etc/apache2/mods-enabled/*.conf
&gt;&gt;
&gt;&gt; Should that work? Isn't there a way to debug or trace the config
&gt;&gt; process?
&gt; 
&gt; Yes, I think that should work.  Can you try:
&gt; 
&gt; ./t/TEST -conf -trace=debug
&gt; 
&gt; and follow the lines from "inheriting config file:" to see what happens.

fwiw, I just watched fred get caught by this exact thing at apachecon -
don't forget to nuke ~/.apache-test beforehand :)

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Joe Orton &lt;jorton@redhat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071121103056.GA4582@redhat.com%3e"/>
<id>urn:uuid:%3c20071121103056-GA4582@redhat-com%3e</id>
<updated>2007-11-21T10:30:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Mon, Nov 19, 2007 at 11:45:59PM -0500, William McKee wrote:
&gt; On Mon, Nov 19, 2007 at 09:31:30AM +0000, Joe Orton wrote:
&gt; &gt; &gt; Debian/Ubuntu does not use httpd.conf to load modules; it uses
&gt; &gt; &gt; apache2.conf and loads the modules from a directory
&gt; &gt; &gt; (/etc/apache2/mods-enabled). mod_env, which provides the PassEnv
&gt; &gt; &gt; directive, is being loaded in this way. I guess A::T does not support
&gt; &gt; &gt; auto-detecting these modules yet. Is any work being done in this area?
&gt; &gt; 
&gt; &gt; I presume the "mods-enabled" directory contains config files included 
&gt; &gt; via "Include" from the main configuration file?  A::T follows "Include" 
&gt; &gt; directives so this should work.
&gt; 
&gt; The apache.conf file contains the following two lines which load the
&gt; modules and any configuration directives:
&gt; 
&gt;   Include /etc/apache2/mods-enabled/*.load
&gt;   Include /etc/apache2/mods-enabled/*.conf
&gt; 
&gt; Should that work? Isn't there a way to debug or trace the config
&gt; process?

Yes, I think that should work.  Can you try:

./t/TEST -conf -trace=debug

and follow the lines from "inheriting config file:" to see what happens.

joe


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>William McKee &lt;william@knowmad.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071120044559.GD18004@knowmad.com%3e"/>
<id>urn:uuid:%3c20071120044559-GD18004@knowmad-com%3e</id>
<updated>2007-11-20T04:45:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Mon, Nov 19, 2007 at 09:31:30AM +0000, Joe Orton wrote:
&gt; &gt; Debian/Ubuntu does not use httpd.conf to load modules; it uses
&gt; &gt; apache2.conf and loads the modules from a directory
&gt; &gt; (/etc/apache2/mods-enabled). mod_env, which provides the PassEnv
&gt; &gt; directive, is being loaded in this way. I guess A::T does not support
&gt; &gt; auto-detecting these modules yet. Is any work being done in this area?
&gt; 
&gt; I presume the "mods-enabled" directory contains config files included 
&gt; via "Include" from the main configuration file?  A::T follows "Include" 
&gt; directives so this should work.

The apache.conf file contains the following two lines which load the
modules and any configuration directives:

  Include /etc/apache2/mods-enabled/*.load
  Include /etc/apache2/mods-enabled/*.conf

Should that work? Isn't there a way to debug or trace the config
process?


Thanks,
William

-- 
Knowmad Technologies - Software development &amp; Process automation
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Auto-detecting modules on Ubuntu</title>
<author><name>Joe Orton &lt;jorton@redhat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071119093130.GA4178@redhat.com%3e"/>
<id>urn:uuid:%3c20071119093130-GA4178@redhat-com%3e</id>
<updated>2007-11-19T09:31:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sun, Nov 18, 2007 at 12:30:22PM -0500, William McKee wrote:
...
&gt; Debian/Ubuntu does not use httpd.conf to load modules; it uses
&gt; apache2.conf and loads the modules from a directory
&gt; (/etc/apache2/mods-enabled). mod_env, which provides the PassEnv
&gt; directive, is being loaded in this way. I guess A::T does not support
&gt; auto-detecting these modules yet. Is any work being done in this area?

I presume the "mods-enabled" directory contains config files included 
via "Include" from the main configuration file?  A::T follows "Include" 
directives so this should work.

joe


</pre>
</div>
</content>
</entry>
<entry>
<title>Auto-detecting modules on Ubuntu</title>
<author><name>William McKee &lt;william@knowmad.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c20071118173022.GA9526@knowmad.com%3e"/>
<id>urn:uuid:%3c20071118173022-GA9526@knowmad-com%3e</id>
<updated>2007-11-18T17:30:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

After being away from Apache::Test for some time, I've started to
investigate using it again for testing. I am working from a directory
that had been working with Apache::Test and Apache 1.3.x.

I successfully installed Apache::Test via CPAN. I then went to my
working directory and ran the following:

  perl Build.PL
  ./Build
  t/TEST -config
  t/TEST -start (I just wanted to start the Apache server)

Here's the error message I received:

 Syntax error on line 31 of /home/william/Web/t/conf/extra.conf:
 Invalid command 'PassEnv', perhaps misspelled or defined by a module not included in the
server configuration
 [  error] 
 server has died with status 255 (t/logs/error_log wasn't created, start the server in the
debug mode)
 Terminated

Debian/Ubuntu does not use httpd.conf to load modules; it uses
apache2.conf and loads the modules from a directory
(/etc/apache2/mods-enabled). mod_env, which provides the PassEnv
directive, is being loaded in this way. I guess A::T does not support
auto-detecting these modules yet. Is any work being done in this area?

I was able to work around the problem by loading the modules in my
extra.conf.in by putting the contents of the symlinks in mods-enabled
into my conf file as follows:

  # Load Modules that A::T cannot autodetect (Debian/Ubuntu)
  LoadModule env_module /usr/lib/apache2/modules/mod_env.so
  LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
  LoadModule status_module /usr/lib/apache2/modules/mod_status.so
  LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
  LoadModule negotiation_module /usr/lib/apache2/modules/mod_negotiation.so
  LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
  LoadModule cgid_module /usr/lib/apache2/modules/mod_cgid.so
  LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so
  LoadModule auth_basic_module /usr/lib/apache2/modules/mod_auth_basic.so
  LoadModule authn_file_module /usr/lib/apache2/modules/mod_authn_file.so
  LoadModule authz_default_module /usr/lib/apache2/modules/mod_authz_default.so
  LoadModule authz_groupfile_module /usr/lib/apache2/modules/mod_authz_groupfile.so
  LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
  LoadModule authz_user_module /usr/lib/apache2/modules/mod_authz_user.so
  LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so
  &lt;IfModule mod_dir.c&gt;
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
  &lt;/IfModule&gt;

Does anyone have a more elegant solution?


Cheers,
William

-- 
Knowmad Technologies - Software development &amp; Process automation
W: http://www.knowmad.com | E: william@knowmad.com
P: 704.343.9330 | http://www.LinkedIn.com/in/williammckee


</pre>
</div>
</content>
</entry>
<entry>
<title>[RELEASE CANDIDATE] Apache-Test-1.30 RC1</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473DCAAB.1070200@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c473DCAAB-1070200@taperfriendlymusic-org%3e</id>
<updated>2007-11-16T16:51:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Greetings,

A release candidate for Apache::Test is now available:

http://people.apache.org/~phred/Apache-Test-1.30-RC1.tar.gz

Please take a moment to download, build, and report test failures or 
success back to the list.  Thanks!


Summary of changes in this version:

Added t_write_test_lib for temporary testing packages
[Fred Moyer &lt;fred@redhotpenguin.com&gt;]

Fix syntax error in generated PHP files t/conf/*.php.in
[Philippe M. Chiasson]

Add bwshare.so to the list of modules to not inherit b/c
it rate limits requests to less then that of a test suite.
PR: 25548
[imacat &lt;imacat@mail.imacat.idv.tw&gt;]

Add EXTRA_CFLAGS to c-module building if defined in the environment
[Geoffrey Young]


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] mod_alias needed to run t/cookies.t</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473DAF56.9000304@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c473DAF56-9000304@modperlcookbook-org%3e</id>
<updated>2007-11-16T14:55:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Fred Moyer wrote:
&gt; t/cookies.t fails if mod_alias is not installed, since ScriptAlias is used:
&gt; 
&gt;   ScriptAlias /cgi-bin/ "@ServerRoot@/cgi-bin/"
&gt; 
&gt; Index: t/cookies.t
&gt; ===================================================================
&gt; --- t/cookies.t (revision 595664)
&gt; +++ t/cookies.t (working copy)
&gt; @@ -8,7 +8,7 @@
&gt;  use Apache::TestUtil;
&gt; 
&gt;  plan tests =&gt; 2, need [qw(CGI CGI::Cookie)],
&gt; -                      need_cgi, need_lwp;
&gt; +                      need_cgi, need_lwp, need need_module('mod_alias.c');
&gt; 
&gt;  Apache::TestRequest::user_agent( cookie_jar =&gt; {} );

+1

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>[patch] mod_alias needed to run t/cookies.t</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473DADA2.5070608@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c473DADA2-5070608@taperfriendlymusic-org%3e</id>
<updated>2007-11-16T14:48:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
t/cookies.t fails if mod_alias is not installed, since ScriptAlias is used:

   ScriptAlias /cgi-bin/ "@ServerRoot@/cgi-bin/"

Index: t/cookies.t
===================================================================
--- t/cookies.t (revision 595664)
+++ t/cookies.t (working copy)
@@ -8,7 +8,7 @@
  use Apache::TestUtil;

  plan tests =&gt; 2, need [qw(CGI CGI::Cookie)],
-                      need_cgi, need_lwp;
+                      need_cgi, need_lwp, need need_module('mod_alias.c');

  Apache::TestRequest::user_agent( cookie_jar =&gt; {} );


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] add method for writing temporary test libraries</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473CD48A.6090108@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c473CD48A-6090108@taperfriendlymusic-org%3e</id>
<updated>2007-11-15T23:21:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Geoffrey Young wrote:
&gt; 
&gt; Philippe M. Chiasson wrote:
&gt;&gt; How do you make sure that tmp directory gets cleaned up at the end of the
&gt;&gt; test run ?
&gt; 
&gt; he's using t_write_file() under the hood, which keeps track of
&gt; directories it creates and cleans them up afterward.

Updated patch attached with dies instead of warns if Apache::TestUtil 
can't be loaded.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] add method for writing temporary test libraries</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473CCE0F.20105@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c473CCE0F-20105@modperlcookbook-org%3e</id>
<updated>2007-11-15T22:54:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Philippe M. Chiasson wrote:
&gt; Fred Moyer wrote:
&gt;&gt; Please find attached a patch which adds t_write_test_lib, a method use 
&gt;&gt; to create temporary perl packages used in testing.  The patch adds a 
&gt;&gt; temp dir to @INC in modperl_inc.pl.
&gt;&gt;
&gt;&gt; - Fred
&gt;&gt;
&gt;&gt; [...]
&gt;&gt; Index: lib/Apache/TestUtil.pm
&gt;&gt; ===================================================================
&gt;&gt; [...]
&gt;&gt; @@ -191,6 +191,14 @@
&gt;&gt;       return $fh;
&gt;&gt;   }
&gt;&gt;
&gt;&gt; +sub _temp_package_dir {
&gt;&gt; +    return catdir(tmpdir(), 'apache_test');
&gt;&gt; +}
&gt; 
&gt; How do you make sure that tmp directory gets cleaned up at the end of the
&gt; test run ?

he's using t_write_file() under the hood, which keeps track of
directories it creates and cleans them up afterward.

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] add method for writing temporary test libraries</title>
<author><name>&quot;Philippe M. Chiasson&quot; &lt;gozer@ectoplasm.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473CCD6B.2030607@ectoplasm.org%3e"/>
<id>urn:uuid:%3c473CCD6B-2030607@ectoplasm-org%3e</id>
<updated>2007-11-15T22:51:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Fred Moyer wrote:
&gt; Please find attached a patch which adds t_write_test_lib, a method use 
&gt; to create temporary perl packages used in testing.  The patch adds a 
&gt; temp dir to @INC in modperl_inc.pl.
&gt; 
&gt; - Fred
&gt; 
&gt; [...]
&gt; Index: lib/Apache/TestUtil.pm
&gt; ===================================================================
&gt; [...]
&gt; @@ -191,6 +191,14 @@
&gt;       return $fh;
&gt;   }
&gt; 
&gt; +sub _temp_package_dir {
&gt; +    return catdir(tmpdir(), 'apache_test');
&gt; +}

How do you make sure that tmp directory gets cleaned up at the end of the
test run ?

-- 
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/



</pre>
</div>
</content>
</entry>
<entry>
<title>[patch] add method for writing temporary test libraries</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200711.mbox/%3c473CCC8B.1010604@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c473CCC8B-1010604@taperfriendlymusic-org%3e</id>
<updated>2007-11-15T22:47:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Please find attached a patch which adds t_write_test_lib, a method use 
to create temporary perl packages used in testing.  The patch adds a 
temp dir to @INC in modperl_inc.pl.

- Fred

Index: lib/Apache/TestConfigPerl.pm
===================================================================
--- lib/Apache/TestConfigPerl.pm        (revision 594783)
+++ lib/Apache/TestConfigPerl.pm        (working copy)
@@ -206,6 +206,15 @@
              print $fh "use lib '$tlib';\n";
          }

+        # directory for temp packages which can change during testing
+        # e.g. Apache::Reload
+        eval { require Apache::TestUtil; };
+        if ($@) {
+            warn("could not require Apache::TestUtil");
+        } else {
+            print $fh "use lib '" . 
Apache::TestUtil::_temp_package_dir() . "';\n";
+        }
+
          # if Apache::Test is used to develop a project, we want the
          # project/lib directory to be first in @INC (loaded last)
          if ($ENV{APACHE_TEST_LIVE_DEV}) {
Index: lib/Apache/TestUtil.pm
===================================================================
--- lib/Apache/TestUtil.pm      (revision 594783)
+++ lib/Apache/TestUtil.pm      (working copy)
@@ -24,7 +24,7 @@
  use Carp ();
  use Config;
  use File::Basename qw(dirname);
-use File::Spec::Functions qw(catfile file_name_is_absolute);
+use File::Spec::Functions qw(catfile catdir file_name_is_absolute tmpdir);
  use Symbol ();
  use Fcntl qw(SEEK_END);

@@ -37,7 +37,7 @@
  @ISA     = qw(Exporter);

  @EXPORT = qw(t_cmp t_debug t_append_file t_write_file t_open_file
-    t_mkdir t_rmtree t_is_equal t_filepath_cmp
+    t_mkdir t_rmtree t_is_equal t_filepath_cmp t_write_test_lib
      t_server_log_error_is_expected t_server_log_warn_is_expected
      t_client_log_error_is_expected t_client_log_warn_is_expected
  );
@@ -191,6 +191,14 @@
      return $fh;
  }

+sub _temp_package_dir {
+    return catdir(tmpdir(), 'apache_test');
+}
+
+sub t_write_test_lib {
+    return t_write_file(catdir(_temp_package_dir(), shift), @_);
+}
+
  sub t_write_file {
      my $file = shift;

@@ -547,6 +555,17 @@

  This function is exported by default.

+=item t_write_test_lib()
+
+  t_write_test_lib($filename, @lines)
+
+t_write_test_lib() creates a new file at I&lt;$filename&gt; or overwrites
+the existing file with the content passed in I&lt;@lines&gt;.  The file
+is created in a temporary directory which is added to @INC at
+test configuration time.  It is intended to be used for creating
+temporary packages for testing which can be modified at run time,
+see the Apache::Reload unit tests for an example.
+
  =item t_write_file()

    t_write_file($filename, @lines);
Index: Changes
===================================================================
--- Changes     (revision 594783)
+++ Changes     (working copy)
@@ -8,6 +8,9 @@

  =item 1.30-dev

+Added t_write_test_lib for temporary testing packages
+[Fred Moyer &lt;fred@redhotpenguin.com&gt;]
+
  Fix syntax error in generated PHP files t/conf/*.php.in
  [Philippe M. Chiasson]



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: svn commit: r590575 - in /perl/Apache-Test/trunk: Changes lib/Apache/TestConfig.pm</title>
<author><name>&quot;Philippe M. Chiasson&quot; &lt;gozer@ectoplasm.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200710.mbox/%3c47282D23.7030009@ectoplasm.org%3e"/>
<id>urn:uuid:%3c47282D23-7030009@ectoplasm-org%3e</id>
<updated>2007-10-31T07:22:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

gozer@apache.org wrote:
&gt; Author: gozer
&gt; Date: Wed Oct 31 00:15:30 2007
&gt; New Revision: 590575
&gt; 
&gt; URL: http://svn.apache.org/viewvc?rev=590575&amp;view=rev
&gt; Log:
&gt; Teach Apache::TestConfig to generate valid PHP comments 
&gt; &lt;?php /* */i ?&gt; when generating PHP files from t/conf/*.php.in

Sorry, there was a typo in the commit message, a php comment will
look like:

&lt;?php /* */ ?&gt;

I fixed the log message, btw.

$&gt; svn propedit -r 590575 --revprop svn:log
Set new value for property 'svn:log' on revision 590575

------------------------------------------------------------------------
Philippe M. Chiasson     GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/       m/gozer\@(apache|cpan|ectoplasm)\.org/



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] Passing an existing request object to shortcuts methods</title>
<author><name>Stas Bekman &lt;stas@stason.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200710.mbox/%3c47179EBA.9020006@stason.org%3e"/>
<id>urn:uuid:%3c47179EBA-9020006@stason-org%3e</id>
<updated>2007-10-18T17:58:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Fred Moyer wrote:
&gt; Stas Bekman wrote:
&gt;&gt; Geoffrey Young wrote:
&gt;&gt;&gt;
&gt;&gt;&gt; Stas Bekman wrote:
&gt;&gt;&gt;&gt; I was trying to get GET, POST and other Apache::TestRequest methods to
&gt;&gt;&gt;&gt; accept a pre-existing HTTP::Request object, rather than pass arguments
&gt;&gt;&gt;&gt; that will construct one.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; The reason, I was trying to use HTML::TreeBuilder and
&gt;&gt;&gt;&gt; HTTP::Request::Form to fill-out a form and submit that, rather than raw
&gt;&gt;&gt;&gt; POST, e.g.:
&gt;&gt;&gt;
&gt;&gt;&gt; have you tried mech for this?  I haven't but have always wanted to
&gt;&gt;&gt;
&gt;&gt;&gt;   http://search.cpan.org/dist/WWW-Mechanize/
&gt;&gt;
&gt;&gt; What difference does it make?
&gt; 
&gt; There's some great syntactic sugar that make submitting forms relatively 
&gt;  painless.  I've used it in my A::T programs by grabbing the port number 
&gt; from the config hash and used a WWW::Mechanize-&gt;new object to do the calls.

Though it bypasses the A-T infrastructure, so if you are trying to rely 
on any of the features A-T provides, you can't. Which is probably OK for 
most people anyway.

-- 
_____________________________________________________________
Stas Bekman    mailto:stas@stason.org http://stason.org/
http://www.linkedin.com/in/stasbekman http://stasosphere.com/
http://stason.org/photos/gallery/     http://healingcloud.com
http://chestofbooks.com/              http://modperlbook.org/
                                       http://modperl2book.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] Passing an existing request object to shortcuts methods</title>
<author><name>Fred Moyer &lt;fred@taperfriendlymusic.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200710.mbox/%3c4715841F.6030207@taperfriendlymusic.org%3e"/>
<id>urn:uuid:%3c4715841F-6030207@taperfriendlymusic-org%3e</id>
<updated>2007-10-17T03:40:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Stas Bekman wrote:
&gt; Geoffrey Young wrote:
&gt;&gt;
&gt;&gt; Stas Bekman wrote:
&gt;&gt;&gt; I was trying to get GET, POST and other Apache::TestRequest methods to
&gt;&gt;&gt; accept a pre-existing HTTP::Request object, rather than pass arguments
&gt;&gt;&gt; that will construct one.
&gt;&gt;&gt;
&gt;&gt;&gt; The reason, I was trying to use HTML::TreeBuilder and
&gt;&gt;&gt; HTTP::Request::Form to fill-out a form and submit that, rather than raw
&gt;&gt;&gt; POST, e.g.:
&gt;&gt;
&gt;&gt; have you tried mech for this?  I haven't but have always wanted to
&gt;&gt;
&gt;&gt;   http://search.cpan.org/dist/WWW-Mechanize/
&gt; 
&gt; What difference does it make?

There's some great syntactic sugar that make submitting forms relatively 
  painless.  I've used it in my A::T programs by grabbing the port 
number from the config hash and used a WWW::Mechanize-&gt;new object to do 
the calls.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] Passing an existing request object to shortcuts methods</title>
<author><name>Stas Bekman &lt;stas@stason.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200710.mbox/%3c4715224A.8010406@stason.org%3e"/>
<id>urn:uuid:%3c4715224A-8010406@stason-org%3e</id>
<updated>2007-10-16T20:42:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Geoffrey Young wrote:
&gt; 
&gt; Stas Bekman wrote:
&gt;&gt; I was trying to get GET, POST and other Apache::TestRequest methods to
&gt;&gt; accept a pre-existing HTTP::Request object, rather than pass arguments
&gt;&gt; that will construct one.
&gt;&gt;
&gt;&gt; The reason, I was trying to use HTML::TreeBuilder and
&gt;&gt; HTTP::Request::Form to fill-out a form and submit that, rather than raw
&gt;&gt; POST, e.g.:
&gt; 
&gt; have you tried mech for this?  I haven't but have always wanted to
&gt; 
&gt;   http://search.cpan.org/dist/WWW-Mechanize/

What difference does it make?

&gt;&gt;     my $content = get_content($url);
&gt;&gt;
&gt;&gt;     my $tree = HTML::TreeBuilder-&gt;new;
&gt;&gt;     $tree-&gt;parse($content);
&gt;&gt;     $tree-&gt;eof();
&gt;&gt;
&gt;&gt;     my @forms = $tree-&gt;find_by_tag_name('form');
&gt;&gt;     die "What, no forms in $url?" unless @forms;
&gt;&gt;     my $f = HTTP::Request::Form-&gt;new($forms[0], $url);
&gt;&gt;     $f-&gt;field("foo", $foo);
&gt;&gt;     $f-&gt;field("bar", $bar);
&gt;&gt;     my $req = $f-&gt;press();
&gt;&gt;
&gt;&gt; and now
&gt;&gt;
&gt;&gt;     POST $req;
&gt; 
&gt; can you deconstruct $req into it's parts and use them?  ugly, but it may
&gt; save you the full url issues.

Probably. If it's an HTTP::Request object, it should be doable. I just 
wasn't sure whether the idea would be supported at all, before spending 
any more time on it.

Here it is:

Index: lib/Apache/TestRequest.pm
===================================================================
--- lib/Apache/TestRequest.pm   (revision 585204)
+++ lib/Apache/TestRequest.pm   (working copy)
@@ -200,6 +200,13 @@
      my $url = shift;
      Carp::croak("no url passed") unless defined $url;

+    # is a request object?
+    if (ref $url eq 'HTTP::Request') {
+        # dig out the uri portion and resolve it
+        $url-&gt;uri(resolve_url($url-&gt;uri));
+        return $url;
+    }
+
      return $url if $url =~ m,^(\w+):/,;
      $url = "/$url" unless $url =~ m,^/,;

@@ -473,7 +480,7 @@
  sub lwp_call {
      my($name, $shortcut) = (shift, shift);

-    my $r = (\&amp;{$name})-&gt;(@_);
+    my $r = ($_[0] &amp;&amp; ref $_[0]) ? $_[0] : (\&amp;{$name})-&gt;(@_);

      Carp::croak("$name(@_) didn't return a response object") unless $r;




&gt;&gt; With the patch below the basic thing works. The issues I've encountered
&gt;&gt; so far:
&gt;&gt;  - requiring full url, since Apache::TestRequest won't expand it for you)
&gt;&gt;  - redirects aren't handled
&gt;&gt;  - doesn't seem to work with shortcuts like POST_BODY
&gt;&gt;
&gt;&gt; The patch simply gives another functionality to the $url argument to any
&gt;&gt; of the public methods in Apache::TestRequest, to allow an object to be
&gt;&gt; passed in addition to the string url.
&gt;&gt;
&gt;&gt; I'm not sure whether it's worth trying to add this functionality, or
&gt;&gt; just have the test create its own $UA.
&gt; 
&gt; yeah, that's the thing.  the patch is simple enough, and provided it
&gt; does't break antything it should be fine.  but, really, what is probably
&gt; more useful is for us to figure out how to get the magic of TestRequest
&gt; working well with other interesting LWP classes like mech,
&gt; HTTP::Request::Form, etc

Yup. I'm now trying to make it work with: HTTP::Request::Form

&gt; glad to see you back with us :)

;)


-- 
_____________________________________________________________
Stas Bekman    mailto:stas@stason.org http://stason.org/
http://www.linkedin.com/in/stasbekman http://stasosphere.com/
http://stason.org/photos/gallery/     http://healingcloud.com
http://chestofbooks.com/              http://modperlbook.org/
                                       http://modperl2book.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [patch] Passing an existing request object to shortcuts methods</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200710.mbox/%3c47150F38.10605@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c47150F38-10605@modperlcookbook-org%3e</id>
<updated>2007-10-16T19:21:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Stas Bekman wrote:
&gt; I was trying to get GET, POST and other Apache::TestRequest methods to
&gt; accept a pre-existing HTTP::Request object, rather than pass arguments
&gt; that will construct one.
&gt; 
&gt; The reason, I was trying to use HTML::TreeBuilder and
&gt; HTTP::Request::Form to fill-out a form and submit that, rather than raw
&gt; POST, e.g.:

have you tried mech for this?  I haven't but have always wanted to

  http://search.cpan.org/dist/WWW-Mechanize/

&gt; 
&gt;     my $content = get_content($url);
&gt; 
&gt;     my $tree = HTML::TreeBuilder-&gt;new;
&gt;     $tree-&gt;parse($content);
&gt;     $tree-&gt;eof();
&gt; 
&gt;     my @forms = $tree-&gt;find_by_tag_name('form');
&gt;     die "What, no forms in $url?" unless @forms;
&gt;     my $f = HTTP::Request::Form-&gt;new($forms[0], $url);
&gt;     $f-&gt;field("foo", $foo);
&gt;     $f-&gt;field("bar", $bar);
&gt;     my $req = $f-&gt;press();
&gt; 
&gt; and now
&gt; 
&gt;     POST $req;

can you deconstruct $req into it's parts and use them?  ugly, but it may
save you the full url issues.

&gt; 
&gt; With the patch below the basic thing works. The issues I've encountered
&gt; so far:
&gt;  - requiring full url, since Apache::TestRequest won't expand it for you)
&gt;  - redirects aren't handled
&gt;  - doesn't seem to work with shortcuts like POST_BODY
&gt; 
&gt; The patch simply gives another functionality to the $url argument to any
&gt; of the public methods in Apache::TestRequest, to allow an object to be
&gt; passed in addition to the string url.
&gt; 
&gt; I'm not sure whether it's worth trying to add this functionality, or
&gt; just have the test create its own $UA.

yeah, that's the thing.  the patch is simple enough, and provided it
does't break antything it should be fine.  but, really, what is probably
more useful is for us to figure out how to get the magic of TestRequest
working well with other interesting LWP classes like mech,
HTTP::Request::Form, etc

glad to see you back with us :)

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>[patch] Passing an existing request object to shortcuts methods</title>
<author><name>Stas Bekman &lt;stas@stason.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200710.mbox/%3c47150C18.3050604@stason.org%3e"/>
<id>urn:uuid:%3c47150C18-3050604@stason-org%3e</id>
<updated>2007-10-16T19:08:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I was trying to get GET, POST and other Apache::TestRequest methods to 
accept a pre-existing HTTP::Request object, rather than pass arguments 
that will construct one.

The reason, I was trying to use HTML::TreeBuilder and 
HTTP::Request::Form to fill-out a form and submit that, rather than raw 
POST, e.g.:

     my $content = get_content($url);

     my $tree = HTML::TreeBuilder-&gt;new;
     $tree-&gt;parse($content);
     $tree-&gt;eof();

     my @forms = $tree-&gt;find_by_tag_name('form');
     die "What, no forms in $url?" unless @forms;
     my $f = HTTP::Request::Form-&gt;new($forms[0], $url);
     $f-&gt;field("foo", $foo);
     $f-&gt;field("bar", $bar);
     my $req = $f-&gt;press();

and now

     POST $req;

With the patch below the basic thing works. The issues I've encountered 
so far:
  - requiring full url, since Apache::TestRequest won't expand it for you)
  - redirects aren't handled
  - doesn't seem to work with shortcuts like POST_BODY

The patch simply gives another functionality to the $url argument to any 
of the public methods in Apache::TestRequest, to allow an object to be 
passed in addition to the string url.

I'm not sure whether it's worth trying to add this functionality, or 
just have the test create its own $UA.

Index: lib/Apache/TestRequest.pm
===================================================================
--- lib/Apache/TestRequest.pm   (revision 585204)
+++ lib/Apache/TestRequest.pm   (working copy)
@@ -200,6 +200,9 @@
      my $url = shift;
      Carp::croak("no url passed") unless defined $url;

+    # is a request object?
+    return $url if ref $url;
+
      return $url if $url =~ m,^(\w+):/,;
      $url = "/$url" unless $url =~ m,^/,;

@@ -473,7 +476,7 @@
  sub lwp_call {
      my($name, $shortcut) = (shift, shift);

-    my $r = (\&amp;{$name})-&gt;(@_);
+    my $r = ($_[0] &amp;&amp; ref $_[0]) ? $_[0] : (\&amp;{$name})-&gt;(@_);

      Carp::croak("$name(@_) didn't return a response object") unless $r;


-- 
_____________________________________________________________
Stas Bekman    mailto:stas@stason.org http://stason.org/
http://www.linkedin.com/in/stasbekman http://stasosphere.com/
http://stason.org/photos/gallery/     http://healingcloud.com
http://chestofbooks.com/              http://modperlbook.org/
                                       http://modperl2book.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Apache-Test on the Perl Advent Calendar?</title>
<author><name>Jim Martinez &lt;jjm@bigbigorg.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200612.mbox/%3cPine.LNX.4.44.0612111145520.29266-100000@xwing.e-techservices.com%3e"/>
<id>urn:uuid:%3cPine-LNX-4-44-0612111145520-29266-100000@xwing-e-techservices-com%3e</id>
<updated>2006-12-11T16:51:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi all,

Wouldn't it be neat if Apache-Test made it on the Perl Advent Calendar.

I heard on the perl podcast that there was a list of candidates, yet I
couldn't find it.  Apache-Test is not listed in the archives, so it's not
been featured on the calendar.

 http://perladvent.pm.org/index.html

I hope this content is appropriate for this list.
 
Warm regards,
Jim




</pre>
</div>
</content>
</entry>
<entry>
<title>[ANNOUNCE] Apache-Test 1.29</title>
<author><name>&quot;Philip M. Gollucci&quot; &lt;pgollucci@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200611.mbox/%3c20061128232138.H92194@minotaur.apache.org%3e"/>
<id>urn:uuid:%3c20061128232138-H92194@minotaur-apache-org%3e</id>
<updated>2006-11-29T07:34:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The URL

   http://people.apache.org/~pgollucci/at/Apache-Test-1.29.tar.gz

has entered CPAN as

   file: $CPAN/authors/id/P/PG/PGOLLUCCI/Apache-Test-1.29.tar.gz
   size: 151416 bytes
    md5: d99c88b856302420211cee2f891ad931

=item 1.29 November 28, 2006

Require a minium of Module::Build 0.18 when using Apache::TestMB.
PR: 19513
[Philip M. Gollucci]

Teach Apache::TestClient to encode spaces(' ') in query string of URLs
as %20.  This is not a full mapping of ASCII to URL encoding.
If you need this, install LWP -- then Apache-Test will use
LWP -- which does this for you.
[Philip M. Gollucci]

Allow Apache::TestClient which is used when LWP is not installed
to accept mutiple headers of the same name.
[Philip M. Gollucci]

Add t_start_error_log_watch() and t_finish_error_log_watch()
to the Apache::TestUtil API which are only exported unpon request.
[Torsten Foertsch &lt;torsten.foertsch@gmx.net&gt;]

Allow version variants of debuggers to be passed as arguments
to -debug.  i.e. -debug=gdb65 for systems with multiple
versions of the same debugger. [Philip M. Gollucci]

On Win32, the Apache executable is called httpd.exe in Apache/2.2,
so let Apache::TestConfig try to find that if Apache.exe isn't
found [Randy Kobes]

force reconfiguration if existing configuration was generated
by an older version of Apache-Test [Geoffrey Young]

the -t_pid_file code resulted in confusing and fatal error message
for people using stale 1.27 configurations.  so take steps to make
sure things continue to work.  [Geoffrey Young]


------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F


</pre>
</div>
</content>
</entry>
<entry>
<title>[RESULTS]: [RELEASE CANDIDATE]: Apache-Test-1.29-RC3</title>
<author><name>&quot;Philip M. Gollucci&quot; &lt;pgollucci@p6m7g8.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200611.mbox/%3c456C877E.5010801@p6m7g8.com%3e"/>
<id>urn:uuid:%3c456C877E-5010801@p6m7g8-com%3e</id>
<updated>2006-11-28T19:01:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Randy K.  linux    (2.0.55/prefork)                         +1 binding
           win32    (2.2.3/winnt)

Philip G. FreeBSD  perl 5.8.8 httpd 2.2.3/prefork           +1 binding
                    perl 5.8.8-ithread httpd 2.2.3/worker

Geoff Y.  fc5      perl 5.8.8 2.2.3/prefork                 +1 binding

Steve H.   win32   perl 5.8.8 httpd 1.3.34 mod_perl 1.29    +1 committer

Nickolay A. Cygwin perl 5.8.7, Apache/2.2.2 (prefork MPM)   +1
             Win32 perl 5.8.8, Apache/2.2.3 (winnt MPM)

Isaac G.    Win32 Perl-5.8.8 + Apache 2.2.3            +1 apreq comitter


I don't see darwin represented, but Phillippe C. gave a +1 on -rc2 which
was a trivial difference from -rc3.  At any rate, I've enough votes to 
release.  ETA: tonight!

Thanks all.

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [RELEASE CANDIDATE]: Apache-Test-1.29-RC3</title>
<author><name>Geoffrey Young &lt;geoff@modperlcookbook.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200611.mbox/%3c456C3811.4080503@modperlcookbook.org%3e"/>
<id>urn:uuid:%3c456C3811-4080503@modperlcookbook-org%3e</id>
<updated>2006-11-28T13:22:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Steve Hay wrote:
&gt; Philip M. Gollucci wrote:
&gt; 
&gt;&gt; A release candidate for Apache-Test 1.29-rc3 is now available.
&gt;&gt;
&gt;&gt; http://people.apache.org/~pgollucci/at/Apache-Test-1.29-rc3.tar.gz

looks good on apache 2.2.2, perl 5.8.8

+1

--Geoff


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [RELEASE CANDIDATE]: Apache-Test-1.29-RC3</title>
<author><name>Randy Kobes &lt;randy@theoryx5.uwinnipeg.ca&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/perl-test-dev/200611.mbox/%3cPine.LNX.4.64.0611202246040.31356@theoryx5.uwinnipeg.ca%3e"/>
<id>urn:uuid:%3cPine-LNX-4-64-0611202246040-31356@theoryx5-uwinnipeg-ca%3e</id>
<updated>2006-11-21T04:48:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, 18 Nov 2006, Philip M. Gollucci wrote:

&gt; A release candidate for Apache-Test 1.29-rc3 is now available.
&gt;
&gt; http://people.apache.org/~pgollucci/at/Apache-Test-1.29-rc3.tar.gz

+1 - tested on
    linux: Apache/2.0.55 (prefork)
    Win32: Apache/2.2.3 (winnt)

-- 
best regards,
Randy Kobes


</pre>
</div>
</content>
</entry>
</feed>
