perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: modperl-2.0/t/response/TestDirective perlrequire.pm
Date Wed, 16 Apr 2003 05:23:55 GMT
Stas Bekman wrote:

>> The other problems
>> with the tests that I had mentioned earlier have also now been
>> fixed with this, except for apr/perlio, which gets a 500
>> response. I believe this was skipped in earlier versions, due to
>> not having APR::PerlIO?
[...]
> The module is always available, though it won't boot if perlio_layers 
> aren't available. So I though that this will work:

ah, no, scratch that. This module is confusing... it provides special 
functionality when perl is built w/ perlio layers. However it provides another 
important C-level functionality which doesn't require perlio layers (an 
example of use is in Apache::Subprocess). The attached patch should probably 
skip OK on win32.

Randy, when you will get a chance can you please check why we special-case 
win32? it has to work on win32 too. See xs/APR/PerlIO/apr_perlio.c. Thanks!

Index: t/response/TestAPR/perlio.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
retrieving revision 1.17
diff -u -r1.17 perlio.pm
--- t/response/TestAPR/perlio.pm        8 Apr 2003 02:05:34 -0000       1.17
+++ t/response/TestAPR/perlio.pm        16 Apr 2003 05:21:25 -0000
@@ -23,11 +23,15 @@

      $tests += $lfs_tests unless LARGE_FILES_CONFLICT;

-    eval { require APR::PerlIO };
+    # 1) APR::PerlIO is not available on all platforms
+    # 2) on those platforms where available,
+    #    PerlIO-enabled perl is needed to run this test
+    my $run = eval { require APR::PerlIO } &&
+        APR::PerlIO::PERLIO_LAYERS_ARE_ENABLED()
+            ? 1
+            : have  { "This Perl build doesn't support PerlIO layers" => 0 };

-    plan $r, tests => $tests, have {
-        "This Perl build doesn't support PerlIO layers" =>
-            APR::PerlIO::PERLIO_LAYERS_ARE_ENABLED() };
+    plan $r, tests => $tests, $run;

      my $vars = Apache::Test::config()->{vars};
      my $dir  = catfile $vars->{documentroot}, "perlio";



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message