This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor t/lib/proxy_constant_subs.t to use skip_all_without_extension()
[perl5.git] / t / lib / proxy_constant_subs.t
index 7c00830..c6de618 100644 (file)
@@ -1,18 +1,11 @@
 my @symbols;
 BEGIN {
-    require Config;
-    if (($Config::Config{'extensions'} !~ /\bB\b/) ){
-        print "1..0 # Skip -- Perl configured without B module\n";
-        exit 0;
-    }
-    if ($Config::Config{'extensions'} !~ /\bFcntl\b/) {
-        print "1..0 # Skip -- Perl configured without Fcntl\n";
-        exit 0;
-    }
+    require './test.pl';
+    skip_all_without_extension('B');
+    skip_all_without_extension('Fcntl');
     # S_IFMT is a real subroutine, and acts as control
     # SEEK_SET is a proxy constant subroutine.
     @symbols = qw(S_IFMT SEEK_SET);
-    require './test.pl';
 }
 
 use strict;