perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cho...@apache.org
Subject svn commit: r124322 - /perl/modperl/trunk/t/response/TestPerl/signals.pm
Date Thu, 06 Jan 2005 00:23:33 GMT
Author: cholet
Date: Wed Jan  5 16:23:32 2005
New Revision: 124322

URL: http://svn.apache.org/viewcvs?view=rev&rev=124322
Log:
use Apache::TestConfig::OSX and fix indent

Modified:
   perl/modperl/trunk/t/response/TestPerl/signals.pm

Modified: perl/modperl/trunk/t/response/TestPerl/signals.pm
Url: http://svn.apache.org/viewcvs/perl/modperl/trunk/t/response/TestPerl/signals.pm?view=diff&rev=124322&p1=perl/modperl/trunk/t/response/TestPerl/signals.pm&r1=124321&p2=perl/modperl/trunk/t/response/TestPerl/signals.pm&r2=124322
==============================================================================
--- perl/modperl/trunk/t/response/TestPerl/signals.pm	(original)
+++ perl/modperl/trunk/t/response/TestPerl/signals.pm	Wed Jan  5 16:23:32 2005
@@ -6,11 +6,14 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::BuildConfig;
+use Apache::TestConfig;
 
 use Apache::MPM ();
 
 use POSIX qw(SIGALRM);
 
+use constant OSX => Apache::TestConfig::OSX;
+
 use Apache::Const -compile => qw(OK);
 
 my $mpm = lc Apache::MPM->show;
@@ -32,20 +35,20 @@
 
     # doesn't work under static prefork
     if (!$static) {
-      if ($^O eq 'darwin') {
-        skip "ALRM can't be used on darwin", 0;
-      }
-      else {
-        local $ENV{PERL_SIGNALS} = "unsafe";
-
-        eval {
-            local $SIG{ALRM} = sub { die "alarm" };
-            alarm 2;
-            run_for_5_sec();
-            alarm 0;
-        };
-        ok t_cmp $@, qr/alarm/, "SIGALRM / unsafe %SIG";
-      }
+        if (OSX) {
+            skip "ALRM can't be used on darwin", 0;
+        }
+        else {
+            local $ENV{PERL_SIGNALS} = "unsafe";
+
+            eval {
+                local $SIG{ALRM} = sub { die "alarm" };
+                alarm 2;
+                run_for_5_sec();
+                alarm 0;
+            };
+            ok t_cmp $@, qr/alarm/, "SIGALRM / unsafe %SIG";
+        }
     }
 
     # POSIX::sigaction doesn't work under 5.6.x

Mime
View raw message