130_tcp_inst.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
# Test to make sure object can be instantiated for tcp 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 "tcp";
ok !!$p;