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 [EMAIL PROTECTED] ICQ: 15726394 http://kineticode.com/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]