summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-01 12:56:10 +0100
committerYves Orton <demerphq@gmail.com>2023-03-02 18:48:25 +0800
commit3cae8eb1db142433616d4df6c72f9274a2099735 (patch)
treef0b65733b79a29062fe698f26e23edf77b9d2c6b /dist
parent951cf800219e68a149e7567b76718b1a009147a8 (diff)
downloadperl-3cae8eb1db142433616d4df6c72f9274a2099735.tar.gz
dist/Net-Ping - add missing build artifacts
Files copied from https://github.com/rurban/Net-Ping with minor changes made to point at the perl5 repo as we are upstream, also changed the INSTALLDIRS rule to make the other files. This fixes the module for https://github.com/Perl/perl5/issues/20874
Diffstat (limited to 'dist')
-rw-r--r--dist/Net-Ping/.gitignore1
-rw-r--r--dist/Net-Ping/Makefile.PL75
-rw-r--r--dist/Net-Ping/TODO34
3 files changed, 110 insertions, 0 deletions
diff --git a/dist/Net-Ping/.gitignore b/dist/Net-Ping/.gitignore
new file mode 100644
index 0000000000..e54624d60d
--- /dev/null
+++ b/dist/Net-Ping/.gitignore
@@ -0,0 +1 @@
+!/Makefile.PL
diff --git a/dist/Net-Ping/Makefile.PL b/dist/Net-Ping/Makefile.PL
new file mode 100644
index 0000000000..ebf05a08a1
--- /dev/null
+++ b/dist/Net-Ping/Makefile.PL
@@ -0,0 +1,75 @@
+use strict;
+use warnings;
+use v5.002; # not using our in the CPAN release
+use ExtUtils::MakeMaker;
+
+my @extras = ();
+my $EUMM_VER = $ExtUtils::MakeMaker::VERSION;
+my @AUTHORS = (
+ 'Reini Urban <rurban@cpan.org>',
+ 'Steve Peters <steve@fisharerojo.org>',
+ 'Matthew Musgrove <mr.muskrat@gmail.com>',
+ 'Karl Williamson <khw@cpan.org>',
+ 'Brian Fraser <fraserbn@gmail.com>',
+ 'Mark Gardner <mjgardner@cpan.org>',
+ );
+
+push @extras,
+ AUTHOR => join(", ", @AUTHORS)
+ if $EUMM_VER gt '5.4301' and $EUMM_VER lt '6.57_02';
+push @extras,
+ AUTHOR => [ @AUTHORS ]
+ if $EUMM_VER ge '6.57_02';
+push @extras, SIGN => 1
+ if $EUMM_VER ge '6.18';
+push @extras, LICENSE => 'perl_5'
+ if $EUMM_VER ge '6.31' and $EUMM_VER le '6.46';
+push @extras,
+ META_MERGE => {
+ 'meta-spec' => { version => 2 },
+ resources => {
+ # TODO: 26 old issues still open at RT
+ # https://rt.cpan.org/Public/Dist/Display.html?Name=Net-Ping
+ bugtracker => 'https://github.com/Perl/perl5/issues',
+ repository => {
+ type => 'git',
+ url => 'https://github.com/Perl/perl5.git',
+ web => 'https://github.com/Perl/perl5',
+ },
+ license => [ 'http://dev.perl.org/licenses/' ],
+ },
+ release_status => 'stable',
+ }
+ if $EUMM_VER gt '6.46';
+
+WriteMakefile(
+ NAME => 'Net::Ping',
+ VERSION_FROM => 'lib/Net/Ping.pm',
+ ABSTRACT_FROM => 'lib/Net/Ping.pm',
+ PREREQ_PM => {
+ 'Socket' => '2.007',
+ 'Test::More' => 0,
+ 'Time::HiRes' => 0,
+ },
+ TEST_REQUIRES => {
+ 'Test::Pod' => '1.22',
+ 'Test::More' => 0,
+ },
+ INSTALLDIRS => ( $] < 5.011 ? 'perl' : 'site' ),
+ clean => { FILES => 'Net-Ping-*' },
+ @extras
+);
+
+package MY;
+
+sub depend {
+ "
+README : lib/Net/Ping.pm
+ pod2text lib/Net/Ping.pm > README
+release : dist
+ git tag \$(VERSION)
+ cpan-upload \$(DISTVNAME).tar\$(SUFFIX)
+ git push
+ git push --tags
+"
+}
diff --git a/dist/Net-Ping/TODO b/dist/Net-Ping/TODO
new file mode 100644
index 0000000000..f79a9753cf
--- /dev/null
+++ b/dist/Net-Ping/TODO
@@ -0,0 +1,34 @@
+TODO list for Net::Ping (in case anyone is looking for things to do)
+
+- More IPv6 support
+Some options like IP_TOS and IP_TTL are not available on IPv6
+
+- POD rewriting
+Some things, such as the return from $p->ping(), are cryptic. The location of the
+source is off as well.
+
+- Device
+Setting the device uses SO_BINDTODEVICE. This is Linux-only and should not work anywhere
+else. I think deprecating this is probably the right thing to do.
+
+-TOS
+The incoming TOS value can be just about anything from my testing. This valid values are
+supposed to be (in decimal) 0, 1, 2, 4, and 8 assuming we aren't talking DS and ECN.
+I don't know right now if this is a bug in Socket, Darwin (tesing on Mac OS X currently)
+or if that's just the way it is. Time for some C level testing for this one.
+P.S. TOS is IPv4 only.
+
+- Tests
+Nicholas Clark converted the tests to Test::More which is a good start. The tests need some
+cleanup and modernizing. Below is the current test coverage when testing as root.
+
+----------------------------------- ------ ------ ------ ------ ------ ------
+File stmt bran cond sub time total
+----------------------------------- ------ ------ ------ ------ ------ ------
+blib/lib/Net/Ping.pm 62.6 42.8 33.0 76.9 100.0 52.6
+Total 62.6 42.8 33.0 76.9 100.0 52.6
+----------------------------------- ------ ------ ------ ------ ------ ------
+
+This needs to be quite a bit higher all around to make me comfortable with a refactor.
+
+