Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'feature/apnic-objects' into develop

  • Loading branch information...
commit 0320226bb2963c9e22150fd2cb95a81c031217cb 2 parents 0362eea + c3b6fc2
@arhuman authored
Showing with 3,848 additions and 121 deletions.
  1. +5 −0 Changes
  2. +21 −0 MANIFEST
  3. +3 −1 TODO
  4. +59 −79 lib/Net/Whois/Generic.pm
  5. +4 −0 lib/Net/Whois/Object.pm
  6. +184 −0 lib/Net/Whois/Object/AsBlock/APNIC.pm
  7. +212 −0 lib/Net/Whois/Object/AsSet/APNIC.pm
  8. +263 −0 lib/Net/Whois/Object/AutNum/APNIC.pm
  9. +238 −0 lib/Net/Whois/Object/Domain/APNIC.pm
  10. +214 −0 lib/Net/Whois/Object/FilterSet/APNIC.pm
  11. +11 −22 lib/Net/Whois/Object/Inet6Num/APNIC.pm
  12. +263 −0 lib/Net/Whois/Object/InetNum/APNIC.pm
  13. +261 −0 lib/Net/Whois/Object/Irt/APNIC.pm
  14. +1 −1  lib/Net/Whois/Object/KeyCert/AFRINIC.pm
  15. +208 −0 lib/Net/Whois/Object/KeyCert/APNIC.pm
  16. +242 −0 lib/Net/Whois/Object/Mntner/APNIC.pm
  17. +8 −6 lib/Net/Whois/Object/Organisation.pm
  18. +194 −0 lib/Net/Whois/Object/Organisation/APNIC.pm
  19. +147 −0 lib/Net/Whois/Object/PeeringSet/APNIC.pm
  20. +145 −0 lib/Net/Whois/Object/Person/APNIC.pm
  21. +4 −4 lib/Net/Whois/Object/Poem.pm
  22. +121 −0 lib/Net/Whois/Object/Poem/APNIC.pm
  23. +100 −0 lib/Net/Whois/Object/PoeticForm/APNIC.pm
  24. +7 −7 lib/Net/Whois/Object/Role/AFRINIC.pm
  25. +163 −0 lib/Net/Whois/Object/Role/APNIC.pm
  26. +224 −0 lib/Net/Whois/Object/Route/APNIC.pm
  27. +210 −0 lib/Net/Whois/Object/Route6/APNIC.pm
  28. +155 −0 lib/Net/Whois/Object/RouteSet/APNIC.pm
  29. +157 −0 lib/Net/Whois/Object/RtrSet/APNIC.pm
  30. +1 −1  t/04-generic.t
  31. +23 −0 t/305-APNIC.t
View
5 Changes
@@ -1,6 +1,11 @@
Revision history for net-whois-ripe
+ - Add support for APNIC objects through Net::Whois::Generic
+ - Simplify query options handling in Net::Whois::Generic
+ (remove keepalive options)
+ - Start adding some documentation (far from enough although)
+
2.005000 2013-10-10
- Add support for generic objects (from various sources, AFRINIC being the first implemented)
through Net::Whois::Generic
View
21 MANIFEST
@@ -4,50 +4,69 @@ lib/Net/Whois/Generic.pm
lib/Net/Whois/Object.pm
lib/Net/Whois/Object/AsBlock.pm
lib/Net/Whois/Object/AsBlock/AFRINIC.pm
+lib/Net/Whois/Object/AsBlock/APNIC.pm
lib/Net/Whois/Object/AsSet.pm
lib/Net/Whois/Object/AsSet/AFRINIC.pm
+lib/Net/Whois/Object/AsSet/APNIC.pm
lib/Net/Whois/Object/AutNum.pm
lib/Net/Whois/Object/AutNum/AFRINIC.pm
+lib/Net/Whois/Object/AutNum/APNIC.pm
lib/Net/Whois/Object/Domain.pm
lib/Net/Whois/Object/Domain/AFRINIC.pm
+lib/Net/Whois/Object/Domain/APNIC.pm
lib/Net/Whois/Object/FilterSet.pm
lib/Net/Whois/Object/FilterSet/AFRINIC.pm
+lib/Net/Whois/Object/FilterSet/APNIC.pm
lib/Net/Whois/Object/Inet6Num.pm
lib/Net/Whois/Object/Inet6Num/AFRINIC.pm
lib/Net/Whois/Object/Inet6Num/APNIC.pm
lib/Net/Whois/Object/InetNum.pm
lib/Net/Whois/Object/InetNum/AFRINIC.pm
+lib/Net/Whois/Object/InetNum/APNIC.pm
lib/Net/Whois/Object/InetRtr.pm
lib/Net/Whois/Object/InetRtr/AFRINIC.pm
lib/Net/Whois/Object/Information.pm
lib/Net/Whois/Object/Information/AFRINIC.pm
lib/Net/Whois/Object/Irt.pm
lib/Net/Whois/Object/Irt/AFRINIC.pm
+lib/Net/Whois/Object/Irt/APNIC.pm
lib/Net/Whois/Object/KeyCert.pm
lib/Net/Whois/Object/KeyCert/AFRINIC.pm
+lib/Net/Whois/Object/KeyCert/APNIC.pm
lib/Net/Whois/Object/Limerick.pm
lib/Net/Whois/Object/Limerick/AFRINIC.pm
lib/Net/Whois/Object/Mntner.pm
lib/Net/Whois/Object/Mntner/AFRINIC.pm
+lib/Net/Whois/Object/Mntner/APNIC.pm
lib/Net/Whois/Object/Organisation.pm
lib/Net/Whois/Object/Organisation/AFRINIC.pm
+lib/Net/Whois/Object/Organisation/APNIC.pm
lib/Net/Whois/Object/PeeringSet.pm
lib/Net/Whois/Object/PeeringSet/AFRINIC.pm
+lib/Net/Whois/Object/PeeringSet/APNIC.pm
lib/Net/Whois/Object/Person.pm
lib/Net/Whois/Object/Person/AFRINIC.pm
+lib/Net/Whois/Object/Person/APNIC.pm
lib/Net/Whois/Object/Poem.pm
+lib/Net/Whois/Object/Poem/APNIC.pm
lib/Net/Whois/Object/PoeticForm.pm
+lib/Net/Whois/Object/PoeticForm/APNIC.pm
lib/Net/Whois/Object/Response.pm
lib/Net/Whois/Object/Role.pm
lib/Net/Whois/Object/Role/AFRINIC.pm
+lib/Net/Whois/Object/Role/APNIC.pm
lib/Net/Whois/Object/Route.pm
lib/Net/Whois/Object/Route/AFRINIC.pm
+lib/Net/Whois/Object/Route/APNIC.pm
lib/Net/Whois/Object/Route6.pm
lib/Net/Whois/Object/Route6/AFRINIC.pm
+lib/Net/Whois/Object/Route6/APNIC.pm
lib/Net/Whois/Object/RouteSet.pm
lib/Net/Whois/Object/RouteSet/AFRINIC.pm
+lib/Net/Whois/Object/RouteSet/APNIC.pm
lib/Net/Whois/Object/RtrSet.pm
lib/Net/Whois/Object/RtrSet/AFRINIC.pm
+lib/Net/Whois/Object/RtrSet/APNIC.pm
lib/Net/Whois/RIPE.pm
Makefile.PL
MANIFEST
@@ -88,7 +107,9 @@ t/210-FilterSet.t
t/215-SyncUpdates.t
t/216-SyncUpdates-Signed.t
t/300-AFRINIC.t
+t/305-APNIC.t
t/boilerplate.t
t/common.pl
t/pod-coverage.t
t/pod.t
+TODO
View
4 TODO
@@ -1,3 +1,5 @@
-* make abuse-c attribute mandatory by end of september
+* check abuse-c/abuse-mailbox status
* add option to query to get unfiltered data (-B on RIPE) and check for mail on aassad-ripe
(make it default ?)
+* change hardcoded options on query to non RIPE sources (use RIPE model)
+* Add more usage examples
View
138 lib/Net/Whois/Generic.pm
@@ -13,36 +13,21 @@ use constant {
SOON => 30,
END_OF_OBJECT_MARK => "\n\n",
EOL => "\015\012",
- QUERY_KEEPALIVE => q{-k },
- QUERY_NON_RECURSIVE => q{-r },
- QUERY_REFERRAL => q{-R },
- QUERY_GROUPING => q{-G },
- QUERY_UNFILTERED => q{-B },
QUERY_LIST_OBJECTS => q{-qtypes },
- QUERY_LIST_SOURCES => q{-qsources },
- QUERY_FETCH_TEMPLATE => q{-t%s },
- QUERY_LIMIT_OBJECT_TYPE => q{-T%s },
};
+# simplify if all servers happen to accept same options
our %RIR = (
- apnic => { SERVER => 'whois.apnic.net', QUERY => \&apnic_query },
- ripe => { SERVER => 'whois.ripe.net', QUERY => \&ripe_query },
- arin => { SERVER => 'whois.arin.net', QUERY => \&arin_query },
- lacnic => { SERVER => 'whois.lacnic.net', QUERY => \&lacnic_query },
- afrinic => { SERVER => 'whois.afrinic.net', QUERY => \&afrinic_query },
+ apnic => { SERVER => 'whois.apnic.net', QUERY_NON_RECURSIVE => q{-r }, QUERY_REFERRAL => q{-R }, QUERY_UNFILTERED => q{-B },},
+ ripe => { SERVER => 'whois.ripe.net', QUERY_NON_RECURSIVE => q{-r }, QUERY_REFERRAL => q{-R }, QUERY_UNFILTERED => q{-B },},
+ arin => { SERVER => 'whois.arin.net', QUERY_NON_RECURSIVE => q{-r }, QUERY_REFERRAL => q{-R }, QUERY_UNFILTERED => q{-B },},
+ lacnic => { SERVER => 'whois.lacnic.net', QUERY_NON_RECURSIVE => q{-r }, QUERY_REFERRAL => q{-R }, QUERY_UNFILTERED => q{-B },},
+ afrinic => { SERVER => 'whois.afrinic.net', QUERY_NON_RECURSIVE => q{-r }, QUERY_REFERRAL => q{-R }, QUERY_UNFILTERED => q{-B },},
);
=head1 NAME
-Net::Whois::Generic - a pure-Perl implementation of the RIPE Database client.
-
-=head1 VERSION
-
-Version 2.004001
-
-=cut
-
-our $VERSION = 2.004001;
+Net::Whois::Generic - a pure-Perl implementation of a multi source Whois client.
=head1 SYNOPSIS
@@ -50,11 +35,26 @@ Net::Whois::Generic is my first attempt to unify Whois information from differen
Historically Net::Whois::RIPE was the first written, then Net::Whois::Object was added to provide
a RPSL encapsultation of the data returned from RIPE database, with an API more object oriented.
-Net::Whois::Generic is a new interface designed to be more generic and encapsulated data from
+Net::Whois::Generic is a new interface designed to be more generic and to encapsulate data from
various sources (RIPE, but also AFRINIC, APNIC...)
-The current implementation is barely a proof of concept, and AFINIC is the only other source implemented,
+The current implementation is barely a proof of concept, AFRINIC and APNIC are the only other sources implemented,
but I expect to turn it into a generic/robust implementation based on the users feedback.
+Usage is very similar to the Net::Whois::Object :
+
+ my $c = Net::Whois::Generic->new( disconnected => 1, unfiltered => 1 );
+
+ my ($org) = $c->query( 'ORG-AFNC1-AFRINIC', { type => 'organisation' } );
+ # $org is a 'Net::Whois::Object::Organisation::AFRINIC' object;
+
+
+ my @o = $c->query('101.0.0.0/8');
+ # @o contains various Net::Whois::Object:Inetnum::APNIC, and Net::Whois::Object::Information objects
+
+As Net::Whois::Generic started as an improvment of Net::Whois::RIPE, and have a good amount of code in common,
+for this reason (and some others) it is currently bundled inside the the Net::Whois::RIPE package.
+This might change in the future although.
+
=head1 METHODS
=head2 B<new( %options )>
@@ -81,12 +81,6 @@ The TCP port of the service to connect to
The time-out (in seconds) for the TCP connection.
-=item B<keepalive> (boolean, default is C<false>)
-
-Wherever we want (C<true>) or not (C<false>) to keep the connection to the
-server open. This option implements the functionality available through RIPE
-Database's "-k" parameter.
-
=item B<referral> (boolean, default is C<false>)
When true, prevents the server from using the referral mechanism for domain
@@ -137,7 +131,6 @@ connection to the RIPE Database service desired.
hostname => 'whois.ripe.net',
port => '43',
timeout => 5,
- keepalive => 0,
referral => 0,
recursive => 0,
grouping => 1,
@@ -226,19 +219,6 @@ sub __boolean_accessor
return $self->{__options}{$attribute};
}
-=head2 B<keepalive()>
-
-Accessor to the keepalive configuration option. Accepts an optional keepalive,
-always return the current keepalive.
-
-=cut
-
-sub keepalive
-{
- my $self = shift;
- return $self->__boolean_accessor('keepalive', @_);
-}
-
=head2 B<referral()>
Accessor to the referral configuration option. Accepts an optional referral,
@@ -321,9 +301,6 @@ sub connect
else {
$self->{__state}{ioselect} = IO::Select->new($socket);
}
-
- # Set RIPE Database's "keepalive" capability
- $self->send(QUERY_KEEPALIVE) if $self->keepalive;
}
=head2 B<ios()>
@@ -440,27 +417,14 @@ sub _find_rir
my $rir;
- #
- # AFRINIC has been allocated the
- # IPv4 address blocks
- # 41.0.0.0/8
- # 102.0.0.0/8
- # 105.0.0.0/8
- # 154.0.0.0/8
- # 197.0.0.0/8
- # 196.0.0.0/8
- # IPv6 blocks
- # 2c00::/12
- # 2001:4200::/23
- #
if ( ($query =~ /^(41|102|105|154|196|197)\.\d+\.\d+\.\d+/)
or ($query =~ /AFRINIC/i)
- or ($query =~ /^2c00::/))
+ or ($query =~ /^2c00::/i))
{
$rir = 'afrinic';
}
elsif ( ( $query =~ /^(23|34|50|64|64|65|66|67|68|69|70|71|72|73|74|75|76|96|97|98|9|100|104|107|108|135|136|142|147|162|166|172|173|174|184|192|198|199|204|205|206|207|208|209|216)/
- or ($query =~ /^(2001:0400|2001:1800|2001:4800:|2600|2610:0000):/)
+ or ($query =~ /^(2001:0400|2001:1800|2001:4800:|2600|2610:0000):/i)
or $query =~ /ARIN/
)
)
@@ -468,6 +432,15 @@ sub _find_rir
$rir = 'arin';
}
+ elsif ( ( $query =~ /^(10|14|27|36|39|42|49|58|59|60|61|101|103|106|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|169\.208|175|180|182|183|202|203|210|211|218|219|220|221|222|223)\.\d+\.\d+/
+ or ($query =~ /^(2001:0200|2001:0C00|2001:0E00|2001:4400|2001:8000|2001:A000|2001:B000|2400:0000|2001:0DC0|2001:0DE8|2001:0DF0|2001:07FA|2001:0DE0|2001:0DB8):/i)
+ or $query =~ /APNIC/
+ )
+ )
+ {
+ $rir = 'apnic';
+
+ }
else {
$rir = 'ripe';
}
@@ -489,14 +462,9 @@ sub adapt_query
# determine RIR unless $rir;
$rir = $self->_find_rir($query) unless $rir;
+
if ($rir eq 'ripe') {
$self->hostname($RIR{ripe}{SERVER});
- my $parameters = "";
- $parameters .= q{ } . QUERY_KEEPALIVE if $self->keepalive;
- $parameters .= q{ } . QUERY_UNFILTERED if $self->unfiltered;
- $parameters .= q{ } . QUERY_NON_RECURSIVE unless $self->recursive;
- $parameters .= q{ } . QUERY_REFERRAL if $self->referral;
- $fullquery = $parameters . $query;
}
elsif ($rir eq 'afrinic') {
$fullquery = '-V Md5.0 ' . $query;
@@ -508,6 +476,15 @@ sub adapt_query
elsif ($rir eq 'lacnic') {
$self->hostname($RIR{lacnic}{SERVER});
}
+ elsif ($rir eq 'apnic') {
+ $self->hostname($RIR{apnic}{SERVER});
+ }
+
+ my $parameters = "";
+ $parameters .= q{ } . $RIR{$rir}{QUERY_UNFILTERED} if $self->unfiltered;
+ $parameters .= q{ } . $RIR{$rir}{QUERY_NON_RECURSIVE} unless $self->recursive;
+ $parameters .= q{ } . $RIR{$rir}{QUERY_REFERRAL} if $self->referral;
+ $fullquery = $parameters . $query;
return $fullquery;
}
@@ -536,13 +513,7 @@ sub query
}
$query = $self->adapt_query($query);
- my $parameters = "";
- $parameters .= q{ } . QUERY_KEEPALIVE if $self->keepalive;
- $parameters .= q{ } . QUERY_UNFILTERED if $self->unfiltered;
- $parameters .= q{ } . QUERY_NON_RECURSIVE unless $self->recursive;
- $parameters .= q{ } . QUERY_REFERRAL if $self->referral;
- my $fullquery = $parameters . $query;
- my $iterator = $self->__query($fullquery);
+ my $iterator = $self->__query($query);
my @objects = Net::Whois::Object->new($iterator);
@@ -577,7 +548,6 @@ sub __query
$self->connect;
- # $self->reconnect unless $self->keepalive;
# die "Not connected" unless $self->is_connected;
if ($self->ios->can_write(SOON + $self->timeout)) {
@@ -585,7 +555,7 @@ sub __query
return Iterator->new(
sub {
- local $/ = "\n\n";
+ local $/ = END_OF_OBJECT_MARK;
if ($self->ios->can_read(SOON + $self->timeout)) {
my $block = $self->socket->getline;
return $block if defined $block;
@@ -658,7 +628,7 @@ Update of objects from database other than RIPE is not currently implemented...
=item B<Sources>
-Currently the only sources implemented are RIPE, and AFRINIC.
+Currently the only sources implemented are RIPE, AFRINIC, and APNIC.
=item B<Maturity>
@@ -677,14 +647,24 @@ L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=net-whois-ripe>. I will be
notified, and then you'll automatically be notified of progress on your bug as
I make changes.
+=head1 SEE ALSO
+
+There are several tools similar to L<Net::Whois::Generic>, I'll list some of them below and some reasons why Net::Whois::Generic exists anyway:
+L<Net::Whois::IANA> - A universal WHOIS extractor: update not possible, no RPSL parser
+
+L<Net::Whois::ARIN> - ARIN whois client: update not possible, only subset of ARIN objects handled
+
+L<Net::Whois::Parser> - Module for parsing whois information: no query handling, parser can (must?) be added
+
+L<Net::Whois::RIPE> - RIPE whois client: the basis for L<Net::Whois::Generic> but only handle RIPE.
+
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Net::Whois::Generic
-
You can also look for information at:
=over 4
View
4 lib/Net/Whois/Object.pm
@@ -999,6 +999,10 @@ sub _TYPE {
$TYPES{ ref $_[0] || $_[0] } ||= {};
}
+=head1 SEE ALSO
+
+Please take a look at L<Net::Whois::Generic> the more generic whois client built on top of Net::Whois::RIPE.
+
=head1 TODO
The update part (in RIPE database) still needs a lot of work.
View
184 lib/Net/Whois/Object/AsBlock/APNIC.pm
@@ -0,0 +1,184 @@
+package Net::Whois::Object::AsBlock::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t as-block
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# as-block: [mandatory] [single] [primary/lookup key]
+# descr: [optional] [multiple] [ ]
+# remarks: [optional] [multiple] [ ]
+# country: [optional] [single] [ ]
+# admin-c: [mandatory] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# org: [optional] [multiple] [inverse key]
+# notify: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# mnt-lower: [optional] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+
+% This query was served by the APNIC Whois Service version 1.68.5 (WHOIS1)
+
+__PACKAGE__->attributes( 'primary', ['as_block'] );
+__PACKAGE__->attributes( 'mandatory', [ 'as_block', 'admin_c', 'tech_c', 'mnt_by', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'descr', 'remarks', 'country', 'org', 'notify', 'mnt_lower' ] );
+__PACKAGE__->attributes( 'single', [ 'as_block', 'country', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'remarks', 'admin_c', 'tech_c', 'org', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
+
+=head1 NAME
+
+Net::Whois::Object::AsBlock::APNIC - an object representation of the RPSL AsBlock block
+
+=head1 DESCRIPTION
+
+An as-block object is needed to delegate a range of AS numbers to a
+given repository. This object may be used for authorisation of the
+creation of aut-num objects within the range specified by the
+"as-block:" attribute.
+
+=head1 METHODS
+
+=head2 B<new( %options )>
+
+Constructor for the Net::Whois::Object::AsBlock::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+
+ return $self;
+}
+
+=head2 B<as_block( [$as_block] )>
+
+Accessor to the as_block attribute.
+Accepts an optional as_block, always return the current as_block value.
+
+An as_block is a range of AS numbers delegated to a Regional or National Internet Registry
+(NIR).
+
+The AS numbers in the range are subsequently assigned by the registry to
+members or end-users in the region.
+Information on individual AS numbers within an as-block object are
+stored in the appropriate Internet Registry's Whois Database.
+
+=head2 B<descr( [$descr] )>
+
+Accessor to the descr attribute.
+Accepts an optional descr, always return the current descr value.
+
+Description of the Internet Registry delegated the range of AS numbers shown
+in the as-block.
+
+=head2 B<remarks( [$remarks] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remarks to be added to the remarks array,
+always return the current remarks array.
+
+Information on the registry that maintains details of AS numbers assigned from
+the as-block.
+
+Also includes where to direct a whois client to find further information on
+the AS numbers.
+
+=head2 B<tech_c( [$tech_c] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional tech_c to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact 'person' or 'role' object. As more than
+one person often fulfills a role function, there may be more than one tech-c
+listed.
+
+A technical contact (tech-c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+
+=head2 B<admin_c( [$admin_c])>
+
+Accessor to the admin_c attribute.
+Accepts an optional admin_c to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact 'person' object. As more than one person
+often fulfills a role function, there may be more than one admin-c listed.
+
+An administrative contact(admin-c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional value to be added notify array,
+ always return the current notify array.
+
+The email address to which notifications of changes
+to the object should be sent.
+
+=head2 B<mnt_lower( [$mnt_lower] )>
+
+Accessor to the mnt_lower attribute.
+Accepts an optional mnt_lower value to be added to the mnt_lower array,
+always return the current mnt_lower array.
+
+The identifier of a registered 'mntner' object used to authorize the creation
+of 'aut-num' objects within the range specified by the as-block.
+
+If no 'mnt-lower' is specified, the 'mnt-by' attribute is used for
+authorization.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered 'mntner' used to authorize and authenticate changes to this
+object.
+
+When your database details are protected by a 'mntner' object, then
+only persons with access to the security information of that 'mntner'
+object will be able to change details.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org, always return the current org.
+
+The organisation entity this object is bound to.
+
+=cut
+
+1;
View
212 lib/Net/Whois/Object/AsSet/APNIC.pm
@@ -0,0 +1,212 @@
+package Net::Whois::Object::AsSet::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t as-set
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# as-set: [mandatory] [single] [primary/lookup key]
+# descr: [mandatory] [multiple] [ ]
+# country: [optional] [single] [ ]
+# members: [optional] [multiple] [ ]
+# mbrs-by-ref: [optional] [multiple] [inverse key]
+# remarks: [optional] [multiple] [ ]
+# org: [optional] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# admin-c: [mandatory] [multiple] [inverse key]
+# notify: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# mnt-lower: [optional] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+#
+# % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS2)
+
+__PACKAGE__->attributes( 'primary', ['as_set'] );
+__PACKAGE__->attributes( 'mandatory', [ 'as_set', 'descr', 'tech_c', 'admin_c', 'mnt_by', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'country', 'members', 'mbrs_by_ref', 'remarks', 'org', 'notify', 'mnt_lower' ] );
+__PACKAGE__->attributes( 'single', [ 'as_set', 'country', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'members', 'mbrs_by_ref', 'remarks', 'org', 'tech_c', 'admin_c', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
+
+=head1 NAME
+
+Net::Whois::Object::AsSet::APNIC - an object representation of a RPSL AsSet block
+
+=head1 DESCRIPTION
+
+An as-set object defines a set of aut-num objects.
+It defines a group of Autonomous Systems with the same routing policies.
+
+=head1 METHODS
+
+=head2 new ( @options )
+
+Constructor for the Net::Whois::Object::AsSet::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+ return $self;
+}
+
+=head2 B<as_set( [$as_set])>
+
+Accessor to the as_set attribute.
+Accepts an optional as_set, always return the current as_set value.
+
+The as_set attribute defines the name of the set. It is an RPSL name that
+starts with "as-" or as_set names and AS numbers separated by colon (':').
+The later form is called Hierarchical form, the former non-hierarchical.
+There must be at least one set-name within the hierarchical form that starts
+with 'as-'.
+
+
+=head2 B<descr( [$descr] )>
+
+Accessor to the descr attribute.
+Accepts an optional descr to be added to the descr array,
+always return the current descr array.
+
+A short description related to the object's purpose.
+
+=head2 B<members( [$member] )>
+
+Accessor to the members attribute.
+Accepts an optional member to be added to the members array,
+always return the current 'members' array.
+
+The members attribute lists the members of the set. It can be either a list
+of AS Numbers, or other as-set names.
+
+=head2 B<mbrs_by_ref( [$mbr] )>
+
+Accessor to the mbrs_by_ref attribute.
+Accepts an optional mbr to be added to the mbrs_by_ref array,
+always return the current mbrs_by_ref array.
+
+The identifier of a registered 'mntner' object that can be used to add members
+to the as-set indirectly.
+
+The mbrs_by_ref attribute can be used in all "set" objects; it allows
+indirect population of a set. If this attribute is used, the set also includes
+objects of the corresponding type (aut-num objects for as-set, for example)
+that are protected by one of these maintainers and whose "member-of:"
+attributes refer to the name of the set. If the value of a mbrs_by_ref
+attribute is ANY, any object of the corresponding type referring to the set is
+a member of the set. If the mbrs_by_ref attribute is missing, the set is
+defined explicitly by the members attribute.
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+Information about the object that cannot be stated in other attributes.
+May include a URL or email address.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org, always return the current org.
+
+Points to an existing organisation object representing the entity that
+holds the resource.
+
+The 'ORG-' string followed by 2 to 4 characters, followed by up to 5 digits
+followed by a source specification. The first digit must not be "0".
+Source specification starts with "-" followed by source name up to
+9-character length.
+
+=head2 B<tech_c( [$tech_c] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional tech_c to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact 'person' or 'role' object. As more than
+one person often fulfills a role function, there may be more than one tech-c
+listed.
+
+A technical contact (tech-c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<admin_c( [$admin_c] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional admin_c to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact 'person' object. As more than one person
+often fulfills a role function, there may be more than one admin-c listed.
+
+An administrative contact (admin-c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+The email address to which notifications of changes to this object will be
+sent.
+
+=head2 B<mnt_by( [$mnt] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered 'mntner' used to authorize and authenticate changes to this
+object.
+
+When your database details are protected by a 'mntner' object, then
+only persons with access to the security information of that 'mntner'
+object will be able to change details.
+
+=head2 B<mnt_lower( [$mnt] )>
+
+Accessor to the mnt_lower attribute.
+Accepts an optional mnt to be added to the mnt_lower array,
+always return the current mnt_lower array.
+
+Specifies the identifier of a registered mntner object used
+for hierarchical authorisation. Protects creation of objects
+directly (one level) below in the hierarchy of an object type.
+The authentication method of this maintainer object will then
+be used upon creation of any object directly below the object
+that contains the "mnt-lower:" attribute.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=cut
+
+1;
View
263 lib/Net/Whois/Object/AutNum/APNIC.pm
@@ -0,0 +1,263 @@
+package Net::Whois::Object::AutNum::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t aut-num
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# aut-num: [mandatory] [single] [primary/lookup key]
+# as-name: [mandatory] [single] [ ]
+# descr: [mandatory] [multiple] [ ]
+# country: [mandatory] [single] [ ]
+# member-of: [optional] [multiple] [inverse key]
+# import: [optional] [multiple] [ ]
+# mp-import: [optional] [multiple] [ ]
+# export: [optional] [multiple] [ ]
+# mp-export: [optional] [multiple] [ ]
+# default: [optional] [multiple] [ ]
+# mp-default: [optional] [multiple] [ ]
+# remarks: [optional] [multiple] [ ]
+# org: [optional] [single] [inverse key]
+# admin-c: [mandatory] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# notify: [optional] [multiple] [inverse key]
+# mnt-lower: [optional] [multiple] [inverse key]
+# mnt-routes: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# mnt-irt: [mandatory] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+#
+# % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS4)
+
+
+__PACKAGE__->attributes( 'primary', ['aut_num'] );
+__PACKAGE__->attributes( 'mandatory', [ 'aut_num', 'as_name', 'descr', 'country', 'admin_c', 'tech_c', 'mnt_by', 'mnt_irt', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'member_of', 'import', 'mp_import', 'export', 'mp_export', 'default', 'mp_default', 'remarks', 'org', 'notify', 'mnt_lower', 'mnt_routes' ] );
+__PACKAGE__->attributes( 'single', [ 'aut_num', 'as_name', 'country', 'org', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'member_of', 'import', 'mp_import', 'export', 'mp_export', 'default', 'mp_default', 'remarks', 'admin_c', 'tech_c', 'notify', 'mnt_lower', 'mnt_routes', 'mnt_by', 'mnt_irt', 'changed' ] );
+
+
+=head1 NAME
+
+Net::Whois::Object::AutNum::APNIC - an object representation of a RPSL AutNum block
+
+=head1 DESCRIPTION
+
+Autonomous System numbers ('aut-num' objects) are globally unique identifiers
+for Autonomous Systems.
+
+The aut-num object specifies routing policies. It refers to a group of IP
+networks that have a single and clearly defined external routing policy,
+operated by one or more network operators – an Autonomous System (AS).
+
+=head1 METHODS
+
+=head2 new ( @options )
+
+Constructor for the Net::Whois::Object::AutNum::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+ return $self;
+}
+
+=head2 B<aut_num( [$aut_num] )>
+
+Accessor to the aut_num attribute.
+Accepts an optional aut_num, always return the current aut_num array.
+
+The value of the aut_num attribute is the AS Number of the Autonomous
+System that this object describes and takes the form of ASn where n is
+a 32 bit number..
+
+Leading zeroes (AS0352) are not allowed and will be removed (AS352) by the
+database software.
+
+=cut
+
+sub aut_num {
+ my ( $self, $aut_num ) = @_;
+
+ if ( $aut_num and $aut_num !~ /^AS\d+/ ) {
+ warn "Illegal aut-num ($aut_num) : should be ASn, n being a 32 bit number with no leading 0";
+ }
+
+ return $self->_single_attribute_setget( 'aut_num', $aut_num );
+}
+
+=head2 B<as_name( [$as_name] )>
+
+Accessor to the as_name attribute.
+Accepts an optional as_name, always return the current as_name array.
+
+The as-name attribute is a symbolic name of the AS.
+
+=head2 B<descr( [$descr] )>
+
+Accessor to the descr attribute.
+Accepts an optional descr value to be added to the descr array, always return the current descr array.
+
+=head2 B<member_of( [$mbr_of] )>
+
+Accessor to the member_of attribute.
+Accepts an optional member_of value to be added to the member_of array,
+always return the current member_of array.
+
+The member_of attribute value identifies a set object that this object
+wants to be a member of. This claim, however, should be acknowledged by a
+respective mbrs_by_ref attribute in the referenced object.
+
+An aut-num may be useful to include in an 'as-set' if your network maintains a
+number of Autonomous Systems or wishes to include its routes in an upstream
+provider's routing information.
+
+To be included in an 'as-set', the 'as-set' object must:
+include the keyword "ANY" or the AS number's mbrs_by_ref attribute
+and/or list the AS number in the members attribute
+
+=head2 B<import( [$import] )>
+
+Accessor to the import attribute.
+Accepts an optional import line to be added to the import array,
+always return the current import array.
+
+The inbound IPv4 routing policy of the AS.
+
+=head2 B<mp_import( [$import] )>
+
+Accessor to the mp_import attribute.
+Accepts an optional mp_import line to be added to the import array,
+always return the current mp_import array.
+
+The inbound IPv6 routing policy of the AS.
+
+=head2 B<export( [$export] )>
+
+Accessor to the export attribute.
+Accepts an optional export line to be added to the export array,
+always return the current export array.
+
+The outbound routing policy of the AS.
+
+=head2 B<mp_export( [$mp_export] )>
+
+Accessor to the mp_export attribute.
+Accepts an optional mp_export line to be added to the mp_export array,
+always return the current mp_export array.
+
+The outbound IPv6 routing policy of the AS.
+
+=head2 B<default( [$default] )>
+
+Accessor to the default attribute.
+Accepts an optional default value to be added to the default array,
+always return the current default array.
+
+The peer network the AS will use for as a default, that is, when the AS has no
+more-specific information on where to send the traffic.
+
+=head2 B<mp_default( [$mp_default] )>
+
+Accessor to the mp_default attribute.
+Accepts an optional mp_default line to be added to the mp_default array,
+always return the current mp_default array.
+
+This attribute performs the same function as the 'default' attribute above.
+The difference is that mp-default allows both IPv4 and IPv6 addresses to be
+specified.
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+Information about the object that cannot be stated in other attributes. May
+include a URL or email address.
+
+=cut
+
+=head2 B<admin_c( [$contact] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional contact to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact 'person' object. As more than one person
+often fulfills a role function, there may be more than one admin_c listed.
+
+An administrative contact (admin_c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<tech_c( [$contact] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional contact to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact 'person' or 'role' object. As more than
+one person often fulfills a role function, there may be more than one tech_c
+listed.
+
+A technical contact (tech_c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+=cut
+
+=head2 B<mnt_lower( [$mnt_lower] )>
+
+Accessor to the mnt_lower attribute.
+Accepts an optional mnt_lower value to be added to the mnt_lower array,
+always return the current mnt_lower array.
+
+=head2 B<mnt_routes( [$mnt_routes] )>
+
+Accessor to the mnt_routes attribute.
+Accepts an optional mnt_routes value to be added to the mnt_routes array,
+always return the current mnt_routes array.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org, always return the current org.
+
+Only a single value for the org attribute is allowed in the aut-num object.
+This is to ensure only one organisation is responsible for this resource.
+
+=cut
+
+1;
View
238 lib/Net/Whois/Object/Domain/APNIC.pm
@@ -0,0 +1,238 @@
+package Net::Whois::Object::Domain::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t domain
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# domain: [mandatory] [single] [primary/lookup key]
+# descr: [mandatory] [multiple] [ ]
+# country: [optional] [single] [ ]
+# org: [optional] [multiple] [inverse key]
+# admin-c: [mandatory] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# zone-c: [mandatory] [multiple] [inverse key]
+# nserver: [optional] [multiple] [inverse key]
+# ds-rdata: [optional] [multiple] [inverse key]
+# remarks: [optional] [multiple] [ ]
+# notify: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# mnt-lower: [optional] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+#
+# % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS4)
+
+
+__PACKAGE__->attributes( 'primary', ['domain'] );
+__PACKAGE__->attributes( 'mandatory', [ 'domain', 'descr', 'admin_c', 'tech_c', 'zone_c', 'mnt_by', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'country', 'org', 'nserver', 'ds_rdata', 'remarks', 'notify', 'mnt_lower' ] );
+__PACKAGE__->attributes( 'single', [ 'domain', 'country', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'org', 'admin_c', 'tech_c', 'zone_c', 'nserver', 'ds_rdata', 'remarks', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
+
+
+=head1 NAME
+
+Net::Whois::Object::Domain::APNIC - an object representation of a RPSL Domain block
+
+=head1 DESCRIPTION
+
+The domain object represents Top Level Domain (TLD) and other domain
+registrations. It is also used for Reverse Delegations. The domain
+name is written in fully qualified format, without a trailing " . "
+
+=head1 METHODS
+
+=head2 new ( @options )
+
+Constructor for the Net::Whois::Object::Domain::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+ return $self;
+}
+
+=head2 B<domain( [$domain] )>
+
+Accessor to the domain attribute.
+Accepts an optional domain, always return the current domain.
+
+The domain name in fully qualified format, without a trailing dot. If a
+trailing dot is included it will be removed.
+
+=cut
+
+sub domain {
+ my ( $self, $domain ) = @_;
+
+ # Enforce the format
+ $domain =~ s/\.$// if $domain;
+
+ return $self->_single_attribute_setget( 'domain', $domain );
+}
+
+=head2 B<descr( [$descr] )>
+
+Accessor to the descr attribute.
+Accepts an optional descr line to be added to the descr array,
+always return the current descr array.
+
+The name of the organization responsible for the reverse delegation. Or can
+describe the use of the IP range described in the domain object.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org value to be added to the org array,
+always return the current org array.
+
+The organisation responsible for this domain.
+
+=head2 B<admin_c( [$contact] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional contact to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact 'person' object. As more than one person
+often fulfills a role function, there may be more than one admin_c listed.
+
+An administrative contact (admin_c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<tech_c( [$contact] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional contact to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact 'person' or 'role' object. As more than
+one person often fulfills a role function, there may be more than one tech_c
+listed.
+
+A technical contact (tech_c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<zone_c( [$contact] )>
+
+Accessor to the zone_c attribute.
+Accepts an optional contact to be added to the zone_c array,
+always return the current zone_c array.
+
+The NIC-handle of a 'person' or 'role' object with authority over a zone.
+
+=head2 B<nserver( [$server] )>
+
+Accessor to the nserver attribute.
+Accepts an optional server to be added to the nserver array,
+always return the current nserver array.
+
+A list of nameservers for a domain object. A minimum of one nameserver is
+mandatory.
+
+=head2 B<ds_rdata( [$server] )>
+
+Accessor to the ds_rdata attribute.
+Accepts an optional server to be added to the ds_rdata array,
+always return the current ds_rdata array.
+
+The ds_rdata attribute holds information about a signed delegation record
+for DNSSEC (short for DNS Security Extensions)
+
+=head2 B<sub_dom( [$dom] )>
+
+Accessor to the sub_dom attribute.
+Accepts an optional dom to be added to the sub_dom array,
+always return the current sub_dom array.
+
+The sub_dom attribute specifies a list of sub-domains of a domain. Domain
+names are relative to the domain represented by the domain object that
+contains this attribute
+
+=head2 B<dom_net( [$dom_net] )>
+
+Accessor to the dom_net attribute.
+Accepts an optional dom_net value to be added to the dom_net array,
+always return the current dom_net array.
+
+The dom_net attribute contains a list of IP networks in a domain.
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+General remarks. May include a URL or email address.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+The email address to which notifications of changes to this object should be
+sent.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered 'mntner' used to authorize and authenticate changes to
+this object.
+
+=head2 B<mnt_lower( [$mnt_lower] )>
+
+Accessor to the mnt_lower attribute.
+Accepts an optional mnt_lower value to be added to the mnt_lower array,
+always return the current mnt_lower array.
+
+The identifier of a registered mntner object used to authorize the creation of
+reverse domain objects more specific than the reverse domain specified by this
+object.
+
+=head2 B<refer( [$refer] )>
+
+Accessor to the refer attribute.
+Accepts an optional refer, always return the current refer.
+
+The refer attribute is used to refer a query to another authorative
+database. See the "RIPE Database Query Reference Manual" for an
+explanation of its use. This will be redundant when forward domains are
+removed and may be deprecated.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=cut
+
+1;
View
214 lib/Net/Whois/Object/FilterSet/APNIC.pm
@@ -0,0 +1,214 @@
+package Net::Whois::Object::FilterSet::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t filter-set
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# filter-set: [mandatory] [single] [primary/lookup key]
+# descr: [mandatory] [multiple] [ ]
+# filter: [optional] [single] [ ]
+# mp-filter: [optional] [single] [ ]
+# remarks: [optional] [multiple] [ ]
+# org: [optional] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# admin-c: [mandatory] [multiple] [inverse key]
+# notify: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# mnt-lower: [optional] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+#
+# % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS2)
+
+__PACKAGE__->attributes( 'primary', [ 'filter_set' ] );
+__PACKAGE__->attributes( 'mandatory', [ 'filter_set', 'descr', 'tech_c', 'admin_c', 'mnt_by', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'filter', 'mp_filter', 'remarks', 'org', 'notify', 'mnt_lower' ] );
+__PACKAGE__->attributes( 'single', [ 'filter_set', 'filter', 'mp_filter', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'remarks', 'org', 'tech_c', 'admin_c', 'notify', 'mnt_by', 'mnt_lower', 'changed' ] );
+
+=head1 NAME
+
+Net::Whois::Object::FilterSet::APNIC - an object representation of a RPSL FilterSet block
+
+=head1 DESCRIPTION
+
+A FilterSet object defines a set of routes that match the criteria that you
+specify in your 'filter' – in other words it filters out routes that you do
+not want to see.
+
+=head1 METHODS
+
+=head2 new ( @options )
+
+Constructor for the Net::Whois::Object::FilterSet::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+ return $self;
+}
+
+=head2 B<filter_set( [$filter_set] )>
+
+Accessor to the filter_set attribute.
+Accepts an optional filter_set value, always return the current filter_set value.
+
+The filter_set attribute defines the name of the filter. It is an RPSL
+name that starts with "fltr-".
+
+The name of a filter_set object can be hierarchical:
+
+A hierarchical filter_set name is a sequence of filter_set names and AS
+Numbers separated by colons. At least one component of the name must be an
+actual filter_set name (i.e. start with "fltr-"). All the set name
+components of a hierarchical filter-name have to be filter_set names.
+
+=cut
+
+sub filter_set {
+ my ( $self, $filter_set ) = @_;
+ if ( $filter_set and $filter_set !~ /^fltr-/i ) {
+ warn "Incorrect FilterSet's name ($filter_set) : Should start with 'FLTR-'";
+ }
+
+ return $self->_single_attribute_setget( 'filter_set', $filter_set );
+}
+
+=head2 B<descr( [$descr] )>
+
+Accessor to the descr attribute.
+Accepts an optional descr value to be added to the descr array,
+always return the current descr array.
+
+A short description related to the object's purpose.
+
+=head2 B<filter( [$filter] )>
+
+Accessor to the filter attribute.
+Accepts an optional filter value, always return the current filter.
+
+The filter attribute defines the policy filter of the set.
+
+A policy filter is a logical expression which, when applied to a
+set of routes, returns a subset of these routes – the ones that
+you have said you want to see.
+
+=head2 B<mp_filter( [$mp_filter] )>
+
+Accessor to the mp_filter attribute.
+Accepts an optional mp_filter value, always return the current mp_filter.
+
+Logical expression which when applied to a set of IPv4 or IPv6 routes returns
+a subset of these routes.
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+General remarks. May include a URL or email address.
+
+=head2 B<tech_c( [$contact] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional contact to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact 'person' or 'role' object. As more than
+one person often fulfills a role function, there may be more than one tech_c
+listed.
+
+A technical contact (tech_c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<admin_c( [$contact] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional contact to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact 'person' object. As more than one person
+often fulfills a role function, there may be more than one admin_c listed.
+
+An administrative contact (admin_c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org value to be added to the org array,
+always return the current org array.
+
+The organisation responsible for this FilterSet object.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered 'mntner' used to authorize and authenticate changes to this
+object.
+
+When the database details are protected by a Mntner object, then
+only persons with access to the security information of that Mntner
+object will be able to change details.
+
+=head2 B<mnt_lower( [$mnt_lower] )>
+
+Accessor to the mnt_lower attribute.
+Accepts an optional mnt_lower value to be added to the mnt_lower array,
+always return the current mnt_lower array.
+
+Sometimes there is a hierarchy of maintainers. In these cases, mnt_lower is
+used as well as mnt_by.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=cut
+
+1;
View
33 lib/Net/Whois/Object/Inet6Num/APNIC.pm
@@ -2,15 +2,9 @@ package Net::Whois::Object::Inet6Num::APNIC;
use base qw/Net::Whois::Object/;
-# http://www.ripe.net/data-tools/support/documentation/update-ref-manual#section-12
-# http://www.apnic.net/apnic-info/whois_search/using-whois/guide/inet6num
-#
-# From: whois -t inet6num
-# % This is the RIPE Database query service.
-# % The objects are in RPSL format.
-# %
-# % The RIPE Database is subject to Terms and Conditions.
-# % See http://www.ripe.net/db/support/db-terms-conditions.pdf
+# whois -h whois.apnic.net -t inet6num
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
#
# inet6num: [mandatory] [single] [primary/lookup key]
# netname: [mandatory] [single] [lookup key]
@@ -22,26 +16,21 @@ use base qw/Net::Whois::Object/;
# admin-c: [mandatory] [multiple] [inverse key]
# tech-c: [mandatory] [multiple] [inverse key]
# status: [mandatory] [single] [ ]
-# assignment-size:[optional] [single] [ ]
# remarks: [optional] [multiple] [ ]
# notify: [optional] [multiple] [inverse key]
# mnt-by: [mandatory] [multiple] [inverse key]
# mnt-lower: [optional] [multiple] [inverse key]
# mnt-routes: [optional] [multiple] [inverse key]
-# mnt-domains: [optional] [multiple] [inverse key]
-# mnt-irt: [optional] [multiple] [inverse key]
+# mnt-irt: [mandatory] [multiple] [inverse key]
# changed: [mandatory] [multiple] [ ]
# source: [mandatory] [single] [ ]
-#
-# % This query was served by the RIPE Database Query Service version 1.38 (WHOIS4)
-
-#
-# mnt-irt: [mandatory] [single] [inverse key]
-__PACKAGE__->attributes( 'primary', ['inet6num'] );
-__PACKAGE__->attributes( 'mandatory', [ 'inet6num', 'netname', 'status', 'source' ] );
-__PACKAGE__->attributes( 'optional', ['geoloc', 'language', 'org', 'remarks', 'notify', 'mnt_lower', 'mnt_routes', 'mnt_domains', 'mnt_irt', 'assignment_size' ] );
-__PACKAGE__->attributes( 'single', [ 'inet6num', 'netname', 'geoloc', 'org', 'status', 'source', 'assignment_size' ] );
-__PACKAGE__->attributes( 'multiple', [ 'descr', 'country','language', 'tech_c', 'admin_c', 'remarks', 'notify', 'mnt_by', 'mnt_lower', 'mnt_routes', 'mnt_domains', 'mnt_irt', 'changed' ] );
+
+
+__PACKAGE__->attributes( 'primary', [ 'inet6num'] );
+__PACKAGE__->attributes( 'mandatory', [ 'inet6num', 'netname', 'descr', 'country', 'admin_c', 'tech_c', 'status', 'mnt_by', 'mnt_irt', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'geoloc', 'language', 'org', 'remarks', 'notify', 'mnt_lower', 'mnt_routes' ] );
+__PACKAGE__->attributes( 'single', [ 'inet6num', 'netname', 'geoloc', 'org', 'status', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'country', 'language', 'admin_c', 'tech_c', 'remarks', 'notify', 'mnt_by', 'mnt_lower', 'mnt_routes', 'mnt_irt', 'changed' ] );
=head1 NAME
View
263 lib/Net/Whois/Object/InetNum/APNIC.pm
@@ -0,0 +1,263 @@
+package Net::Whois::Object::InetNum::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t inetnum
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# inetnum: [mandatory] [single] [primary/lookup key]
+# netname: [mandatory] [single] [lookup key]
+# descr: [mandatory] [multiple] [ ]
+# country: [mandatory] [multiple] [ ]
+# geoloc: [optional] [single] [ ]
+# language: [optional] [multiple] [ ]
+# org: [optional] [single] [inverse key]
+# admin-c: [mandatory] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# status: [mandatory] [single] [ ]
+# remarks: [optional] [multiple] [ ]
+# notify: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# mnt-lower: [optional] [multiple] [inverse key]
+# mnt-routes: [optional] [multiple] [inverse key]
+# mnt-irt: [mandatory] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+#
+# % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS4)
+
+__PACKAGE__->attributes( 'primary', [ 'inetnum' ] );
+__PACKAGE__->attributes( 'mandatory', [ 'inetnum', 'netname', 'descr', 'country', 'admin_c', 'tech_c', 'status', 'mnt_by', 'mnt_irt', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'geoloc', 'language', 'org', 'remarks', 'notify', 'mnt_lower', 'mnt_routes' ] );
+__PACKAGE__->attributes( 'single', [ 'inetnum', 'netname', 'geoloc', 'org', 'status', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'descr', 'country', 'language', 'admin_c', 'tech_c', 'remarks', 'notify', 'mnt_by', 'mnt_lower', 'mnt_routes', 'mnt_irt', 'changed' ] );
+
+=head1 NAME
+
+Net::Whois::Object::InetNum::APNIC - an object representation of a RPSL InetNum block
+
+=head1 DESCRIPTION
+
+An inetnum object contains information on allocations and assignments
+of IPv4 address space.
+
+=head1 METHODS
+
+=head2 new ( @options )
+
+Constructor for the Net::Whois::Object::InetNum::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+
+ $self->_init(@options);
+
+ return $self;
+}
+
+=head2 B<inetnum( [$inetnum] )>
+
+Accessor to the inetnum attribute.
+Accepts an optional inetnum value, always return the current inetnum value.
+
+=head2 B<netname( [$netname] )>
+
+Accessor to the netname attribute.
+Accepts an optional netname, always return the current netname.
+
+=head2 B<descr( [$descr] )>
+
+Accessor to the descr attribute.
+Accepts an optional descr value to be added to the descr array,
+always return the current descr array.
+
+=head2 B<country( [$country] )>
+
+Accessor to the country attribute.
+Accepts an optional country to be added to the country array,
+always return the current country array.
+
+=head2 B<geoloc( [$geoloc] )>
+
+Accessor to the geoloc attribute.
+Accepts an optional geoloc, always return the current geoloc.
+
+The location coordinates for the resource
+
+Location coordinates of the resource. Can take one of the following forms:
+[-90,90][-180,180]
+
+=head2 B<language( [$language] )>
+
+Accessor to the language attribute.
+Accepts an optional language to be added to the language array,
+always return the current language array.
+
+Identifies the language.
+
+Valid two-letter ISO 639-1 language code.
+=head2 B<org( [$org] )>
+
+Accessor to the 'org' attribute.
+Accepts an optional org, always return the current org.
+
+Only a single value for the org attribute is allowed in the Inetnum object.
+This is to ensure only one organisation is responsible for this resource.
+
+=head2 B<admin_c( [$contact] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional contact to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact Person object. As more than one person
+often fulfills a role function, there may be more than one admin_c listed.
+
+An administrative contact (admin_c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<tech_c( [$contact] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional contact to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact Person or Role object. As more than
+one person often fulfills a role function, there may be more than one tech_c
+listed.
+
+A technical contact (tech_c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<status( [$status] )>
+
+Accessor to the 'status' attribute.
+Accepts an optional status, always return the current status.
+
+The status attribute indicates where the address range represented by an
+inetnum object sits in a hierarchy and how it is used.
+
+Status can have one of these values:
+
+=over 4
+
+=item ALLOCATED UNSPECIFIED
+
+=item ALLOCATED PA
+
+=item ALLOCATED PI
+
+=item LIR-PARTITIONED PA
+
+=item LIR-PARTITIONED PI
+
+=item SUB-ALLOCATED PA
+
+=item ASSIGNED PA
+
+=item ASSIGNED PI
+
+=item ASSIGNED ANYCAST
+
+=item EARLY-REGISTRATION
+
+=item NOT-SET
+
+=back
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+General remarks. May include a URL or instructions on where to send abuse
+complaints.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+The email address to which notifications of changes to this object should be
+sent.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered Mntner used to authorize and authenticate changes to this
+object.
+
+=head2 B<mnt_lower( [$mnt_lower] )>
+
+Accessor to the mnt_lower attribute.
+Accepts an optional mnt_lower value to be added to the mnt_lower array,
+always return the current mnt_lower array.
+
+Sometimes there is a hierarchy of maintainers. In these cases, mnt_lower is
+used as well as mnt_by.
+
+=head2 B<mnt_routes( [$mnt_route] )>
+
+Accessor to the mnt_routes attribute.
+Accepts an optional mnt_route to be added to the mnt_routes array,
+always return the current mnt_routes array.
+
+The identifier of a registered Mntner object used to control the creation of
+Route objects associated with the address range specified by the Inetnum
+object.
+
+=head2 B<mnt_domains( [$mnt_domain] )>
+
+Accessor to the mnt_domains attribute.
+Accepts an optional mnt_domain to be added to the mnt_domains array,
+always return the current mnt_domains array.
+
+The identifier of a registered Mntner object used to control the creation of
+Domain objects associated with the address range specified by the Inetnum
+object.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=head2 B<mnt_irt( [$mnt_irt] )>
+
+Accessor to the mnt_irt attribute.
+Accepts an optional mnt_irt value to be added to the mnt_irt array,
+always return the current mnt_irt array.
+
+The identifier of a registered Mntner object used to provide information
+about a Computer Security Incident Response Team (CSIRT).
+
+=cut
+
+1;
View
261 lib/Net/Whois/Object/Irt/APNIC.pm
@@ -0,0 +1,261 @@
+package Net::Whois::Object::Irt::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -t irt -h whois.afrinic.net
+# % This is the AfriNIC Whois server.
+#
+# irt: [mandatory] [single] [primary/look-up key]
+# address: [mandatory] [multiple] [ ]
+# phone: [optional] [multiple] [ ]
+# fax-no: [optional] [multiple] [ ]
+# e-mail: [mandatory] [multiple] [lookup key]
+# abuse-mailbox: [mandatory] [multiple] [inverse key]
+# signature: [optional] [multiple] [ ]
+# encryption: [optional] [multiple] [ ]
+# org: [optional] [multiple] [inverse key]
+# admin-c: [mandatory] [multiple] [inverse key]
+# tech-c: [mandatory] [multiple] [inverse key]
+# auth: [mandatory] [multiple] [inverse key]
+# remarks: [optional] [multiple] [ ]
+# irt-nfy: [optional] [multiple] [inverse key]
+# notify: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+
+__PACKAGE__->attributes( 'primary', [ 'irt' ] );
+__PACKAGE__->attributes( 'mandatory', [ 'irt', 'address', 'e_mail', 'abuse_mailbox', 'admin_c', 'tech_c', 'auth', 'mnt_by', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'phone', 'fax_no', 'signature', 'encryption', 'org', 'remarks', 'irt_nfy', 'notify' ] );
+__PACKAGE__->attributes( 'single', [ 'irt', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'address', 'phone', 'fax_no', 'e_mail', 'abuse_mailbox', 'signature', 'encryption', 'org', 'admin_c', 'tech_c', 'auth', 'remarks', 'irt_nfy', 'notify', 'mnt_by', 'changed' ] );
+
+=head1 NAME
+
+Net::Whois::Object::Irt::APNIC - an object representation of the RPSL Irt block
+
+=head1 DESCRIPTION
+
+The irt object is used to provide information about a Computer Security
+Incident Response Team (CSIRT). IRTs or CSIRTs specifically respond to
+computer security incident reports and activity.
+
+They are dedicated abuse handling teams, (as distinct from network operational
+departments) which review and respond to abuse reports.
+
+=head1 METHODS
+
+=head2 B<new( %options )>
+
+Constructor for the Net::Whois::Object::Irt::APNIC class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+
+ return $self;
+
+}
+
+=head2 B<irt( [$irt] )>
+
+Accessor to the irt attribute.
+Accepts an optional irt, always return the current irt.
+
+The irt object name starts with "IRT-".
+
+=cut
+
+sub irt {
+ my ( $self, $irt ) = @_;
+ if ( $irt and $irt !~ /^IRT-/i ) {
+ warn "Irt name not valid ($irt) : Should start with 'IRT-'";
+ }
+ return $self->_single_attribute_setget( 'irt', $irt );
+}
+
+=head2 B<address( [$address] )>
+
+Accessor to the address attribute.
+Accepts an optional address to be added to the address array,
+always return the current address array.
+
+Full postal address of a contact.
+
+You can use any combination of alphanumeric characters.
+More than one line can be used.
+
+=cut
+
+sub address {
+ my ( $self, $address ) = @_;
+
+ return $self->_multiple_attribute_setget( 'address', $address );
+}
+
+=head2 B<phone( [$phone] )>
+
+Accessor to the phone attribute.
+Accepts an optional phone number to be added to the phone array,
+always return the current phone array.
+
+A contact telephone number.
+
++ <international code> <area code> <phone #>
+
++ <international code> <area code> <phone #> ext. <#>
+
+ EXAMPLE
+ phone: +681 368 0844 ext. 32
+
+=head2 B<fax_no( [$fax_no] )>
+
+Accessor to the fax_no attribute.
+Accepts an optional fax_no to be added to the fax_no array,
+always return the current fax_no array.
+
+A contact fax number.
+
++ <international code> <area code> <fax #>
+
+=head2 B<e_mail( [$e_mail] )>
+
+Accessor to the e_mail attribute.
+Accepts an optional e_mail to be added to the e_mail array,
+always return the current e_mail array.
+
+A contact email address for non-abuse/technical incidents.
+
+=head2 B<abuse_mailbox( [$abuse_mailbox] )>
+
+Accessor to the abuse_mailbox attribute.
+Accepts an optional abuse_mailbox to be added to the abuse_mailbox array,
+always return the current abuse_mailbox array.
+
+Specifies the email address to which abuse complaints should be sent.
+
+=head2 B<signature( [$signature] )>
+
+Accessor to the signature attribute.
+Accepts an optional signature to be added to the signature array,
+always return the current signature array.
+
+References a KeyCert object representing a CSIRT public key used by the
+team to sign their correspondence.
+
+=head2 B<encryption( [$encryption] )>
+
+Accessor to the encryption attribute.
+Accepts an optional encryption to be added to the encryption array,
+always return the current encryption array.
+
+References a KeyCert object representing a CSIRT public key used to encrypt
+correspondence sent to the CSIRT.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org value to be added to the org array,
+always return the current org array.
+
+The organisation responsible for this resource.
+
+=head2 B<auth( [$auth] )>
+
+Accessor to the auth attribute.
+Accepts an optional auth to be added to the auth array,
+always return the current auth array.
+
+The Auth defines an authentication scheme to be used. Any of the current
+authentication schemes used by the RIPE Database are allowed.
+
+=head2 B<admin_c( [$contact] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional contact to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site administrative contact. As more than one person
+often fulfills a role function, there may be more than one admin_c listed.
+
+An administrative contact (admin_c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<tech_c( [$contact] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional contact to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact. As more than one person often fulfills
+a role function, there may be more than one tech_c listed.
+
+A technical contact (tech_c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+Information about the object that cannot be stated in other attributes.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+The email address to which notifications of changes to this object should
+be sent.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered Mntner used to authorize and authenticate changes to
+this object.
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=head2 B<irt_nfy( [$irt_nfy] )>
+
+Accessor to the irt_nfy attribute.
+Accepts an optional irt_nfy value to be added to the irt_nfy array,
+always return the current irt_nfy array.
+
+The irt_nfy attribute specifies the email address to be notified when a
+reference to the irt object is added or removed.
+
+=cut
+
+1;
View
2  lib/Net/Whois/Object/KeyCert/AFRINIC.pm
@@ -21,7 +21,7 @@ use base qw/Net::Whois::Object/;
__PACKAGE__->attributes( 'primary', ['key_cert'] );
__PACKAGE__->attributes( 'mandatory', [ 'key_cert', 'certif', 'mnt_by', 'changed', 'source' ] );
-__PACKAGE__->attributes( 'optional', [ 'method', 'owner', 'figerpr', 'org', 'remarks', 'notify', 'admin_c', 'tech_c' ] );
+__PACKAGE__->attributes( 'optional', [ 'method', 'owner', 'fingerpr', 'org', 'remarks', 'notify', 'admin_c', 'tech_c' ] );
__PACKAGE__->attributes( 'single', [ 'key_cert', 'method', 'fingerpr', 'source' ] );
__PACKAGE__->attributes( 'multiple', [ 'owner', 'certif', 'org', 'remarks', 'notify', 'admin_c', 'tech_c', 'mnt_by', 'changed' ] );
View
208 lib/Net/Whois/Object/KeyCert/APNIC.pm
@@ -0,0 +1,208 @@
+ackage Net::Whois::Object::KeyCert::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t key-cert
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# key-cert: [mandatory] [single] [primary/lookup key]
+# method: [generated] [single] [ ]
+# owner: [generated] [multiple] [ ]
+# fingerpr: [generated] [single] [inverse key]
+# certif: [mandatory] [multiple] [ ]
+# org: [optional] [multiple] [inverse key]
+# remarks: [optional] [multiple] [ ]
+# notify: [optional] [multiple] [inverse key]
+# admin-c: [optional] [multiple] [inverse key]
+# tech-c: [optional] [multiple] [inverse key]
+# mnt-by: [mandatory] [multiple] [inverse key]
+# changed: [mandatory] [multiple] [ ]
+# source: [mandatory] [single] [ ]
+#
+# % This query was served by the APNIC Whois Service version 1.68.5 (WHOIS3)
+
+__PACKAGE__->attributes( 'primary', [ 'key_cert' ] );
+__PACKAGE__->attributes( 'mandatory', [ 'key_cert', 'certif', 'mnt_by', 'changed', 'source' ] );
+__PACKAGE__->attributes( 'optional', [ 'method', 'owner', 'fingerpr', 'org', 'remarks', 'notify', 'admin_c', 'tech_c' ] );
+__PACKAGE__->attributes( 'single', [ 'key_cert', 'method', 'fingerpr', 'source' ] );
+__PACKAGE__->attributes( 'multiple', [ 'owner', 'certif', 'org', 'remarks', 'notify', 'admin_c', 'tech_c', 'mnt_by', 'changed' ] );
+
+
+=head1 NAME
+
+Net::Whois::Object::KeyCert::APNIC - an object representation of the RPSL KeyCert block
+
+=head1 DESCRIPTION
+
+A key-cert object is a database public key certificate that is stored
+on the server and may be used with a mntner object for authentication
+when performing updates. Currently only PGP keys are supported.
+
+=head1 METHODS
+
+=head2 B<new( %options )>
+
+Constructor for the Net::Whois::Object::InetRtr class
+
+=cut
+
+sub new {
+ my ( $class, @options ) = @_;
+
+ my $self = bless {}, $class;
+ $self->_init(@options);
+
+ return $self;
+}
+
+=head2 B<key_cert( [$key_cert] )>
+
+Accessor to the key_cert attribute.
+Accepts an optional key_cert value, always return the current key_cert value.
+
+For PGP KeyCert objects, the value of the key_cert attribute must be
+PGP-"key-id". These keys are compliant with the Open PGP Internet Standard.
+
+For X.509 KeyCert objects, the database software assigns this value as
+X.509-n. Here, 'n' is the next available number assigned by the software. If
+you want to create an X.509 KeyCert object, you should specify the value as
+AUTO-xx. If you delete an X.509 KeyCert object, it is not possible to
+recreate it with the same name.
+
+=head2 B<method( [$method] )>
+
+Accessor to the method attribute.
+Accepts an optional method, always return the current method value.
+
+The method attribute is generated by the software.
+It is not necessary to include this attribute when you create or
+modify this object. If it is supplied, the software will check the value.
+If necessary the software will replace the supplied value with generated
+value. In this case a warning is returned to the user.
+
+=head2 B<owner( [$owner] )>
+
+Accessor to the owner attribute.
+Accepts an optional owner to be added to the owner array,
+always return the current owner array.
+
+The owner attribute is generated by the software.
+It is not necessary to include this attribute when you create or
+modify this object. If it is supplied, the software will check the value.
+If necessary the software will replace the supplied value with generated
+value. In this case a warning is returned to the user.
+
+=head2 B<fingerpr( [$fingerpr] )>
+
+Accessor to the fingerpr attribute.
+Accepts an optional fingerpr, always return the current fingerpr.
+
+The fingerpr attribute is generated by the software.
+It is not necessary to include this attribute when you create or
+modify this object. If it is supplied, the software will check the value.
+If necessary the software will replace the supplied value with generated
+value. In this case a warning is returned to the user.
+
+=head2 B<certif( [$certif] )>
+
+Accessor to the certif attribute.
+Accepts an optional certif to be added to the certif array,
+always return the current certif array.
+
+The certif attribute contains the public key. The value of the public key
+should be supplied either using multiple certif attributes, or in one
+certif attribute split over several lines. In the first case, this is
+easily done by exporting the key from your local key ring in ASCII armored
+format and adding the string certif to the start of each line of the key.
+In the second case, line continuation should be used to represent an ASCII
+armored format of the key. All the lines of the exported key must be included,
+as well as the start/end markers and the empty line which separates the header
+from the key body.
+
+=head2 B<remarks( [$remark] )>
+
+Accessor to the remarks attribute.
+Accepts an optional remark to be added to the remarks array,
+always return the current remarks array.
+
+General remarks. May include a URL or email address.
+
+=head2 B<org( [$org] )>
+
+Accessor to the org attribute.
+Accepts an optional org value to be added to the org array,
+always return the current org array.
+
+The organisation entity this object is bound to.
+
+=head2 B<notify( [$notify] )>
+
+Accessor to the notify attribute.
+Accepts an optional notify value to be added to the notify array,
+always return the current notify array.
+
+The email address to which notifications of changes to this object should be
+sent.
+
+=head2 B<admin_c( [$contact] )>
+
+Accessor to the admin_c attribute.
+Accepts an optional contact to be added to the admin_c array,
+always return the current admin_c array.
+
+The NIC-handle of an on-site contact Person object. As more than one person
+often fulfills a role function, there may be more than one admin_c listed.
+
+An administrative contact (admin_c) must be someone who is physically
+located at the site of the network.
+
+=head2 B<tech_c( [$contact] )>
+
+Accessor to the tech_c attribute.
+Accepts an optional contact to be added to the tech_c array,
+always return the current tech_c array.
+
+The NIC-handle of a technical contact Person or Role object. As more than
+one person often fulfills a role function, there may be more than one tech_c
+listed.
+
+A technical contact (tech_c) must be a person responsible for the
+day-to-day operation of the network, but does not need to be
+physically located at the site of the network.
+
+=head2 B<mnt_by( [$mnt_by] )>
+
+Accessor to the mnt_by attribute.
+Accepts an optional mnt_by value to be added to the mnt_by array,
+always return the current mnt_by array.
+
+Lists a registered Mntner used to authorize and authenticate changes to this
+object.
+
+
+=head2 B<changed( [$changed] )>
+
+Accessor to the changed attribute.
+Accepts an optional changed value to be added to the changed array,
+always return the current changed array.
+
+The email address of who last updated the database object and the date it
+occurred.
+
+Every time a change is made to a database object, this attribute will show
+the email address of the person who made those changes.
+Please use the address format specified in RFC 822 - Standard for
+the Format of ARPA Internet Text Message and provide the date
+format using one of the following two formats: YYYYMMDD or YYMMDD.
+
+=head2 B<source( [$source] )>
+
+Accessor to the source attribute.
+Accepts an optional source, always return the current source.
+
+The database where the object is registered.
+
+=cut
+
+1;
View
242 lib/Net/Whois/Object/Mntner/APNIC.pm
@@ -0,0 +1,242 @@
+package Net::Whois::Object::Mntner::APNIC;
+
+use base qw/Net::Whois::Object/;
+
+# whois -h whois.apnic.net -t mntner
+# % [whois.apnic.net]
+# % Whois data copyright terms http://www.apnic.net/db/dbcopyright.html
+#
+# mntner: [mandatory] [single] [primary/lookup key]
+# descr: [mandatory] [multiple] [ ]
+# country: [optional] [single] [ ]