httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wheeler <da...@kineticode.com>
Subject Re: Makefile.PL Questions
Date Mon, 30 Jun 2003 20:00:51 GMT
On Monday, June 30, 2003, at 12:11  PM, David Wheeler wrote:

> BEGIN{
>     if (eval {require Apache::Test}) {
>         Apache::Test->import(qw(have_lwp plan));
>         require Apache::TestRequest;
>         Apache::TestRequest->import(qw(GET POST));
>         plan tests => 43, have_lwp;
>     } else {
>         plan skip_all => 'Apache::Test required to run tests.';
>     }
> }

Actually, to make it cooperate with Test::More, I had to do this:

BEGIN {
     if (eval {require Apache::Test}) {
         if (Apache::Test::have_lwp()) {
             require Apache::TestRequest;
             Apache::TestRequest->import(qw(GET POST));
             plan tests => 43;
         } else {
             plan skip_all => 'libwww-perl is not installed';
         }
     } else {
         plan skip_all => 'Apache::Test required to run tests';
     }
}

Thanks,

David

-- 
David Wheeler                                     AIM: dwTheory
david@kineticode.com                              ICQ: 15726394
http://kineticode.com/                         Yahoo!: dew7e
                                                Jabber: Theory@jabber.org
Kineticode. Setting knowledge in motion.[sm]


Mime
View raw message