diff options
author | Thibault DUPONCHELLE <thibault.duponchelle@gmail.com> | 2021-07-12 17:49:33 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-07-24 12:52:52 -0700 |
commit | c402596f74f277914d7a5685efc2d1ddae87435b (patch) | |
tree | da0184bcc08965c1fc772fca8a9eefc2eca6a6bb /dist | |
parent | b5ce5cb9f9a0445fed7925e06ba59e706bafc471 (diff) | |
download | perl-c402596f74f277914d7a5685efc2d1ddae87435b.tar.gz |
Skip 501_ping_icmpv6.t when icmpv6 cannot be initialized. Credits to rurban
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Net-Ping/t/501_ping_icmpv6.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dist/Net-Ping/t/501_ping_icmpv6.t b/dist/Net-Ping/t/501_ping_icmpv6.t index 7d89f01cc9..d59d4beef4 100644 --- a/dist/Net-Ping/t/501_ping_icmpv6.t +++ b/dist/Net-Ping/t/501_ping_icmpv6.t @@ -46,7 +46,11 @@ if (0 && !Net::Ping::_isroot()) { SKIP: { skip "icmpv6 ping requires root privileges.", 1 if !Net::Ping::_isroot() or $^O eq 'MSWin32'; - my $p = new Net::Ping "icmpv6"; + my $p; + eval { $p = new Net::Ping "icmpv6"; }; + if ($@) { + plan skip_all => "no icmpv6 on this machine $@"; + } # message_type can't be used eval { $p->message_type(); |