You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/12/18 01:36:22 UTC
cvs commit: modperl-2.0/t/response/TestAPR perlio.pm
dougm 01/12/17 16:36:22
Modified: t/response/TestAPR perlio.pm
Log:
testing for have_perl "iolayers" is not good enough; skip test if APR::PerlIO cannot be loaded
Revision Changes Path
1.2 +9 -2 modperl-2.0/t/response/TestAPR/perlio.pm
Index: perlio.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- perlio.pm 2001/12/17 16:20:27 1.1
+++ perlio.pm 2001/12/18 00:36:22 1.2
@@ -8,7 +8,7 @@
use Apache::Test;
use Apache::TestUtil;
-use APR::PerlIO ();
+my $have_perlio = eval { require APR::PerlIO };
use Fcntl ();
use File::Spec::Functions qw(catfile);
@@ -16,7 +16,14 @@
sub handler {
my $r = shift;
- plan $r, tests => 9, todo => [5], have_perl 'iolayers';
+ unless ($have_perlio) {
+ #XXX dunno why have_module doesn't work here.
+ my $reason = "APR::PerlIO is not available with this Perl";
+ $r->puts("1..0 #Skipped: $reason\n");
+ return Apache::OK;
+ }
+
+ plan $r, tests => 9, todo => [5];
my $vars = Apache::Test::config()->{vars};
my $dir = catfile $vars->{documentroot}, "perlio";