This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SYN SYN
[perl5.git] / t / lib / hostname.t
index 6f61fb9..85a04cd 100755 (executable)
@@ -2,7 +2,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    @INC = '../lib';
+    require Config; import Config;
+    if ($Config{'extensions'} !~ /\bSys\/Hostname\b/) {
+      print "1..0 # Skip: Sys::Hostname was not built\n";
+      exit 0;
+    }
 }
 
 use Sys::Hostname;