1b39c5158Smillert# Test to make sure object can be instantiated for tcp protocol. 2b39c5158Smillert 3898184e3Ssthenuse strict; 4*6fb12b70Safresh1use Config; 5898184e3Ssthen 6b39c5158SmillertBEGIN { 7b39c5158Smillert unless (eval "require Socket") { 8b39c5158Smillert print "1..0 \# Skip: no Socket\n"; 9b39c5158Smillert exit; 10b39c5158Smillert } 11b39c5158Smillert unless (getservbyname('echo', 'tcp')) { 12b39c5158Smillert print "1..0 \# Skip: no echo port\n"; 13b39c5158Smillert exit; 14b39c5158Smillert } 15*6fb12b70Safresh1 unless ($Config{d_getpbyname}) { 16*6fb12b70Safresh1 print "1..0 \# Skip: no getprotobyname\n"; 17*6fb12b70Safresh1 exit; 18*6fb12b70Safresh1 } 19b39c5158Smillert} 20b39c5158Smillert 21898184e3Ssthenuse Test::More tests => 2; 22898184e3SsthenBEGIN {use_ok 'Net::Ping'}; 23b39c5158Smillert 24b39c5158Smillertmy $p = new Net::Ping "tcp"; 25898184e3Ssthenisa_ok($p, 'Net::Ping', 'object can be instantiated for tcp protocol'); 26