summaryrefslogtreecommitdiff
path: root/dist/Net-Ping/t/140_stream_inst.t
blob: 4492332429347c0256bad3eb45ad14cf92d1d02c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Test to make sure object can be instantiated for stream protocol.

BEGIN {
  unless (eval "require Socket") {
    print "1..0 \# Skip: no Socket\n";
    exit;
  }
  unless (getservbyname('echo', 'tcp')) {
    print "1..0 \# Skip: no echo port\n";
    exit;
  }
}

use Test;
use Net::Ping;
plan tests => 2;

# Everything loaded fine
ok 1;

my $p = new Net::Ping "stream";
ok !!$p;