This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: t/op/ver.t using skip() improperly
[perl5.git] / t / op / ver.t
index 4ccc84c..f64cf47 100755 (executable)
@@ -185,9 +185,9 @@ eval { require Socket; gethostbyaddr(v127.0.0.1, Socket::AF_INET) };
 if ($@) {
     # No - so do not test insane fails.
     $@ =~ s/\n/\n# /g;
-    skip("No Socket::AF_INET # $@");
 }
-else {
+SKIP: {
+    skip("No Socket::AF_INET # $@") if $@;
     my $ip   = v2004.148.0.1;
     my $host;
     eval { $host = gethostbyaddr($ip,Socket::AF_INET) };