httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Perl Testing
Date Tue, 17 Jun 2003 16:03:17 GMT

> 1. The documentation is pretty lacking. Granted, it was bad in 
> Apache::test, too, but I sure would like to see some decent pod in each 
> of the important Apache::Test* modules.

agreed.  resources you may find useful (if you haven't seen them already):

http://www.perl.com/pub/a/2003/05/22/testing.html
http://perl.apache.org/docs/general/testing/testing.html

there is also some good information in the README
http://search.cpan.org/src/STAS/Apache-Test-1.01/README


> 3. Those of us porting from Apache::test typically have a special 
> configuration file (now nicely able to be t/lib/extra.conf.in -- 
> thanks!) and loads up the libraries we want to test. However, Apache 
> isn't being started during `make test` with C<use blib>. Now, since 
> tests run from t, even it it did C<use blib>, it wouldn't work. So I had 
> to add this code to my extra.conf.in:
> 
> <Perl>
>   use File::Spec::Functions qw(catdir);
>   use lib catdir '@ServerRoot@', '..', 'blib';
>   use lib catdir '@ServerRoot@', '..', 'lib';
> </Perl>

for the most part, Apache-Test does the right thing.  the only exception I've noticed is 
for modules that use XS or otherwise need to be preloaded.  the solution for this is to to

use t/conf/extra.last.conf.in in place of t/conf/extra.conf.in.  this allows Apache-Test 
to set the proper blib (via PerlRequre) before including modules from your configuration.

  even if you don't use XS, this may solve your problem.

you can also extend libraries, etc, via t/conf/modperl_extra.pl

HTH

--Geoff


Mime
View raw message