diff options
author | Anders Nordby <anders@FreeBSD.org> | 2002-06-18 21:19:40 +0000 |
---|---|---|
committer | Anders Nordby <anders@FreeBSD.org> | 2002-06-18 21:19:40 +0000 |
commit | f3b6343c0f4d5256162037c423991f21b039a3a1 (patch) | |
tree | 6e5b5ce448a365a4c69342b9ac37b6eb9b980ee0 /net | |
parent | add kprof 1.3 (diff) |
Add Net::Whois::Raw.
PR: 37312
Submitted by: Alex Kapranoff <kappa@freebsd.org.ua>
Notes
Notes:
svn path=/head/; revision=61527
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/Makefile | 24 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/distinfo | 1 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/files/patch-Raw.pm | 54 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/files/patch-pwhois.PL | 40 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/pkg-comment | 1 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/pkg-descr | 16 | ||||
-rw-r--r-- | net/p5-Net-Whois-Raw/pkg-plist | 8 |
8 files changed, 145 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 3625efaa232c..480966380edb 100644 --- a/net/Makefile +++ b/net/Makefile @@ -353,6 +353,7 @@ SUBDIR += p5-Net-Traceroute6 SUBDIR += p5-Net-Wake SUBDIR += p5-Net-Whois + SUBDIR += p5-Net-Whois-Raw SUBDIR += p5-Net-XWhois SUBDIR += p5-Net-Z3950 SUBDIR += p5-Net-Z3950-SimpleServer diff --git a/net/p5-Net-Whois-Raw/Makefile b/net/p5-Net-Whois-Raw/Makefile new file mode 100644 index 000000000000..509407025bf1 --- /dev/null +++ b/net/p5-Net-Whois-Raw/Makefile @@ -0,0 +1,24 @@ +# New ports collection makefile for: p5-Net-Whois-Raw +# Date created: March 25th 2002 +# Whom: Alex Kapranoff <kappa@freebsd.org.ua> +# +# $FreeBSD$ +# + +PORTNAME= Net-Whois-Raw +PORTVERSION= 0.20 +CATEGORIES= net perl5 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITE_SUBDIR= Net +PKGNAMEPREFIX= p5- + +MAINTAINER= kappa@freebsd.org.ua + +PERL_CONFIGURE= yes +INSTALL_TARGET= pure_install + +MAN3= Net::Whois::Raw.3 +MAN1= pwhois.1 +MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} + +.include <bsd.port.mk> diff --git a/net/p5-Net-Whois-Raw/distinfo b/net/p5-Net-Whois-Raw/distinfo new file mode 100644 index 000000000000..1be39df50e36 --- /dev/null +++ b/net/p5-Net-Whois-Raw/distinfo @@ -0,0 +1 @@ +MD5 (Net-Whois-Raw-0.20.tar.gz) = c4587920433b0f9b010e38c4790deb56 diff --git a/net/p5-Net-Whois-Raw/files/patch-Raw.pm b/net/p5-Net-Whois-Raw/files/patch-Raw.pm new file mode 100644 index 000000000000..2f68263a553d --- /dev/null +++ b/net/p5-Net-Whois-Raw/files/patch-Raw.pm @@ -0,0 +1,54 @@ +--- Raw.pm.orig Fri Mar 22 01:36:28 2002 ++++ Raw.pm Sun Apr 21 16:29:50 2002 +@@ -23,6 +23,8 @@ + MIL whois.nic.mil + COOP whois.nic.coop + MUSEUM whois.museum ++ INFO whois.afilias.net ++ BIZ whois.neulevel.biz + AD whois.ripe.net + AL whois.ripe.net + AM whois.ripe.net +@@ -130,6 +132,8 @@ + # ZA apies.frd.ac.za + + %notfound = ( ++ 'whois.neulevel.biz.error' => '^Not found:', ++ 'whois.afilias.net.error' => '^NOT FOUND', + 'whois.nic.cc.error' => '^No match for', + 'whois.arin.net.error' => '^No match for', + 'whois.nic.br.error' => 'No match for', +@@ -180,7 +184,7 @@ + 'ns.litnet.lt.error' => 'No matches found', + 'whois.adamsnames.tc.error' => 'is not a domain controlled by', + 'whois.nic.la.error' => '^NO MATCH for', +- 'whois.networksolutions.com.error' => '^No match for', ++ 'whois.networksolutions.com.error' => '^NO MATCH:', + 'whois.thnic.net.error' => 'No entries found'); + + %strip = ( +@@ -421,6 +425,9 @@ + ] + ); + ++$OMIT_MSG = 0; ++$CHECK_FAIL = 0; ++ + sub whois { + my ($dom, $srv) = @_; + my $res; +@@ -480,12 +487,12 @@ + + sub finish { + my ($text, $srv) = @_; +- my $notfound = $notfound{lc($srv)}; ++ my $notfound = $notfound{lc("$srv.error")}; + my @strip = $strip{lc($srv)} ? @{$strip{lc($srv)}} : (); + return $text unless $CHECK_FAIL || $OMIT_MSG; + my @lines; + MAIN: foreach (split(/\n/, $text)) { +- return undef if $CHECK_FAIL && /$notfound/; ++ return undef if $CHECK_FAIL && defined ($notfound) && /$notfound/; + if ($OMIT_MSG) { + foreach my $re (@strip) { + next MAIN if (/$re/); diff --git a/net/p5-Net-Whois-Raw/files/patch-pwhois.PL b/net/p5-Net-Whois-Raw/files/patch-pwhois.PL new file mode 100644 index 000000000000..28dab45fefa2 --- /dev/null +++ b/net/p5-Net-Whois-Raw/files/patch-pwhois.PL @@ -0,0 +1,40 @@ +--- pwhois.PL.orig Fri Mar 22 01:35:53 2002 ++++ pwhois.PL Mon Mar 25 14:20:16 2002 +@@ -59,23 +59,27 @@ + + =head1 SYNOPSIS + +-pwhois perl.com +-pwhois gnu.org +-pwhois -s police.co.il +-pwhois -c there.is.no.tld.called.foobar +-pwhois yahoo.com whois.networksolutions.com +-pwhois -T 10 funet.fi ++ pwhois perl.com ++ pwhois gnu.org ++ pwhois -s police.co.il ++ pwhois -c there.is.no.tld.called.foobar ++ pwhois yahoo.com whois.networksolutions.com ++ pwhois -T 10 funet.fi + + etc etc..... + + =head1 DESCRIPTION + + Just invoke with a domain name, optionally with a whois server name. +-The -s switch attempts to strip the copyright message or disclaimer. +-The -c switch attempts to return an empty answer for failed searches. +-The -T switch takes a parameter that is used for the timeout for ++ ++The B<-s> switch attempts to strip the copyright message or disclaimer. ++ ++The B<-c> switch attempts to return an empty answer for failed searches. ++ ++The B<-T> switch takes a parameter that is used for the timeout for + connection attempts. + ++ + =head1 AUTHOR + + Ariel Brosh, B<schop@cpan.org> + diff --git a/net/p5-Net-Whois-Raw/pkg-comment b/net/p5-Net-Whois-Raw/pkg-comment new file mode 100644 index 000000000000..67d970512634 --- /dev/null +++ b/net/p5-Net-Whois-Raw/pkg-comment @@ -0,0 +1 @@ +Very simple Perl interface to query raw whois data diff --git a/net/p5-Net-Whois-Raw/pkg-descr b/net/p5-Net-Whois-Raw/pkg-descr new file mode 100644 index 000000000000..c2c25508e744 --- /dev/null +++ b/net/p5-Net-Whois-Raw/pkg-descr @@ -0,0 +1,16 @@ +Net::Whois::Raw - Perl extension for retrieving unparsed raw whois +information. There is also a simple way of checking whether a domain +is registered or not. + +Usage: + use Net::Whois::Raw; + + $s = whois('perl.com'); + $s = whois('freebsd.org'); + $s = whois('freebsd.org.ua'); + + $Net::Whois::Raw::CHECK_FAIL = 1; + + print "Hurry up!\n" if !whois('microsoft.com'); + +-- Alex Kapranoff <kappa@freebsd.org.ua> diff --git a/net/p5-Net-Whois-Raw/pkg-plist b/net/p5-Net-Whois-Raw/pkg-plist new file mode 100644 index 000000000000..18bd79350b4d --- /dev/null +++ b/net/p5-Net-Whois-Raw/pkg-plist @@ -0,0 +1,8 @@ +bin/pwhois +lib/perl5/site_perl/%%PERL_VER%%/Net/Whois/Raw.pm +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Net/Whois 2>/dev/null || true +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/Net 2>/dev/null || true +lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/Whois/Raw/.packlist +@dirrm lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/Whois/Raw +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net/Whois 2>/dev/null || true +@unexec rmdir %D/lib/perl5/site_perl/%%PERL_VER%%/%%PERL_ARCH%%/auto/Net 2>/dev/null || true |