| Net-Whois-ARIN documentation | Contained in the Net-Whois-ARIN distribution. |
Net::Whois::ARIN::Contact - ARIN whois Contact record class
use Net::Whois::ARIN::Contact;
my $poc = Net::Whois::ARIN::Contact->new(
Name => 'Caine, Todd',
Handle => 'TCA53-ARIN',
Company => 'Electric Lightwave',
Address => '4400 NE 77th Ave',
City => 'Vancouver',
StateProv => 'WA',
PostalCode => '98662',
Country => 'US',
Comment => '',
RegDate => '1995-07-25',
Updated => '2001-05-17',
Phone => '503-555-1212',
Email => 'nobody@nobody.net',
);
printf "The ARIN contact handle for %s is %s.\n",
$poc->Name,
$poc->Handle;
The Net::Whois::ARIN::Contact module is simple class which is used to store the attributes of a point-of-contact record in ARIN's Whois server. Each attribute of the contact record has an accessor/mutator of the same name.
print $o->dump;
These methods are the accessors/mutators for the fields found in the Whois record.
Todd Caine <todd.caine at gmail.com>
Copyright (c) 2004-2011 Todd Caine. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Net-Whois-ARIN documentation | Contained in the Net-Whois-ARIN distribution. |
package Net::Whois::ARIN::Contact;
use strict; use Carp "croak"; our $AUTOLOAD;
sub new { my $class = shift; return bless { @_ }, $class; }
sub dump { my $self = shift; my $record = sprintf "\nName: %s\n",$self->Name; $record .= sprintf "Handle: %s\n",$self->Handle; $record .= sprintf "Company: %s\n",$self->Company; $record .= sprintf("Address: %s\n", $_) for @{ $self->Address }; $record .= sprintf "City: %s\n",$self->City; $record .= sprintf "StateProv: %s\n",$self->StateProv; $record .= sprintf "PostalCode: %s\n",$self->PostalCode; $record .= sprintf "Country: %s\n",$self->Country; $record .= sprintf "Comment: %s\n",$self->Comment; $record .= sprintf "RegDate: %s\n",$self->RegDate; $record .= sprintf "Updated: %s\n",$self->Updated; $record .= sprintf "Phone: %s\n",$self->Phone; $record .= sprintf "Email: %s\n",$self->Email; return $record; } sub Type { my $self = shift; $self->{Type} = shift if @_; return $self->{Type}; }
sub AUTOLOAD { my $self = shift; my $name = $AUTOLOAD; $name =~ s/.*://; return if $name eq 'DESTROY'; if ($name !~ /^_/ && exists $self->{$name}) { if (@_) { return $self->{$name} = shift; } else { return $self->{$name}; } } croak "Undefined subroutine \&$AUTOLOAD called"; }
1; __END__