skip all apache_mvc tests if missing mod_perl
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@313
48953598-375a-da11-a14b-
00016c27c3ee
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 10;
-
+use Test::More;
+BEGIN { if (eval { require mod_perl }) {
+ plan tests => 2;
+ } else { Test::More->import(skip_all =>"mod_perl is not installed: $@") }
+ }
require_ok('Apache::MVC');
ok($Apache::MVC::VERSION, 'defines $VERSION');
# defines $VERSION
can_ok($r => 'send_output');
SKIP: {
eval "require IO::CaptureOutput";
- skip "IO::CaptureOutput not installed", 3 if $@;
+ skip "IO::CaptureOutput not installed", 2 if $@;
$r->content_type('text/plain');
$r->document_encoding('iso8859-1');
$r->output('Hello World!');