update p5-Net-Ping-External to 0.12

This commit is contained in:
jasper 2007-03-15 07:56:33 +00:00
parent a01f257986
commit 2f6924e17a
4 changed files with 77 additions and 17 deletions

View File

@ -1,14 +1,14 @@
# $OpenBSD: Makefile,v 1.8 2007/01/14 20:49:05 simon Exp $ # $OpenBSD: Makefile,v 1.9 2007/03/15 07:56:33 jasper Exp $
COMMENT= "alternative Perl interface to ping(1)" COMMENT= "alternative Perl interface to ping(1)"
MODULES= cpan MODULES= cpan
DISTNAME= Net-Ping-External-0.11 DISTNAME= Net-Ping-External-0.12
CATEGORIES= net CATEGORIES= net
MAINTAINER= Jasper Lievisse Adriaanse <jasper@nedbsd.nl> MAINTAINER= Jasper Lievisse Adriaanse <jasper@openbsd.org>
# License: Artistic / GPL # perl
PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_CDROM= Yes

View File

@ -1,4 +1,5 @@
MD5 (Net-Ping-External-0.11.tar.gz) = de9fd436c6749e1a2330eae4aae856fb MD5 (Net-Ping-External-0.12.tar.gz) = 29c6cd74081861f4bffe1f83943f5792
RMD160 (Net-Ping-External-0.11.tar.gz) = 75e8016c0ec1fe93c26491d4c710f42d8de4e11b RMD160 (Net-Ping-External-0.12.tar.gz) = 5813385f2358a19754697a7ce02482f3758ed620
SHA1 (Net-Ping-External-0.11.tar.gz) = e1a689b2cc24b40319ce2165f64710da291f546c SHA1 (Net-Ping-External-0.12.tar.gz) = b4c77107cc490399cc0bcbc5dd24d66755e107e1
SIZE (Net-Ping-External-0.11.tar.gz) = 6377 SHA256 (Net-Ping-External-0.12.tar.gz) = 319ceb07eddd601acfe6bfbb4354cbbef2b38402c36b725d5fcd0c251fb499b2
SIZE (Net-Ping-External-0.12.tar.gz) = 7592

View File

@ -0,0 +1,61 @@
$OpenBSD: patch-test_pl,v 1.1 2007/03/15 07:56:33 jasper Exp $
--- test.pl.orig Wed Feb 14 14:36:12 2007
+++ test.pl Wed Feb 14 14:36:50 2007
@@ -6,7 +6,7 @@
# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)
-BEGIN { $| = 1; $num_tests = 6; print "1..$num_tests\n"; }
+BEGIN { $| = 1; $num_tests = 5; print "1..$num_tests\n"; }
END {print "not ok 1\n" unless $loaded;}
use Net::Ping::External qw(ping);
$loaded = 1;
@@ -21,9 +21,8 @@ print "ok 1\n";
%test_names = (1 => "use Net::Ping::External qw(ping)",
2 => "ping(host => '127.0.0.1')",
3 => "ping(host => '127.0.0.1', timeout => 5)",
- 4 => "ping(host => 'some.non.existent.host')",
- 5 => "ping(host => '127.0.0.1', count => 10)",
- 6 => "ping(host => '127.0.0.1', size => 32)"
+ 4 => "ping(host => '127.0.0.1', count => 10)",
+ 5 => "ping(host => '127.0.0.1', size => 32)"
);
@passed = ();
@@ -51,8 +50,8 @@ else {
push @failed, 3;
}
-eval { $ret = ping(host => 'some.non.existent.host') };
-if (!$@ && !$ret) {
+eval { $ret = ping(host => '127.0.0.1', count => 2) };
+if (!$@ && $ret) {
print "ok 4\n";
push @passed, 4;
}
@@ -61,7 +60,7 @@ else {
push @failed, 4;
}
-eval { $ret = ping(host => '127.0.0.1', count => 2) };
+eval { $ret = ping(host => '127.0.0.1', size => 32) };
if (!$@ && $ret) {
print "ok 5\n";
push @passed, 5;
@@ -69,16 +68,6 @@ if (!$@ && $ret) {
else {
print "not ok 5\n";
push @failed, 5;
-}
-
-eval { $ret = ping(host => '127.0.0.1', size => 32) };
-if (!$@ && $ret) {
- print "ok 6\n";
- push @passed, 6;
-}
-else {
- print "not ok 6\n";
- push @failed, 6;
}
print "\nRunning a more verbose test suite.";

View File

@ -1,9 +1,7 @@
Net::Ping::External is a module which interfaces with the ping(1) Net::Ping::External is a module which interfaces with the ping(1)
command on the system. It presently provides a single function, command on the system. It presently provides a single function, ping(),
ping(), that takes in a hostname and (optionally) a timeout and that takes in a hostname and (optionally) a timeout and returns true if
returns true if the host is alive, and false otherwise. Unless the host is alive, and false otherwise. Unless you have the ability (and
you have the ability (and willingness) to run your scripts as willingness) to run your scripts as the superuser on your system, this
the superuser on your system, this module will probably provide module will probably provide more accurate results than Net::Ping
more accurate results than Net::Ping (bundled with the perl (bundled with the perl base installation) will.
base installation) will.