make setpgrpstack.t use skip_all_without_config
authorFather Chrysostomos <sprout@cpan.org>
Mon, 29 Aug 2011 16:02:35 +0000 (09:02 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 29 Aug 2011 19:33:52 +0000 (12:33 -0700)
t/op/setpgrpstack.t

index 31f498e..b40969c 100644 (file)
@@ -4,13 +4,10 @@ BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
     require './test.pl';
+    skip_all_without_config('d_setpgrp');
 }
 
-use Config;
 plan tests => 2;
 
-SKIP: {
-    skip "setpgrp() is not available", 2 unless $Config{d_setpgrp};
-    ok(!eval { package A;sub foo { die("got here") }; package main; A->foo(setpgrp())});
-    ok($@ =~ /got here/, "setpgrp() should extend the stack before modifying it");
-}
+ok(!eval { package A;sub foo { die("got here") }; package main; A->foo(setpgrp())});
+ok($@ =~ /got here/, "setpgrp() should extend the stack before modifying it");