| 1 | # Program: Net::ParseWhois::Domain::Registrar class for GoDaddy registrar | ||
| 2 | # Version: 1.0 | ||
| 3 | # Purpose: Parsing methods and configuration for the GoDaddy.com registrar | ||
| 4 | # Written: 11/21/05 by Jeff Mercer <riffer@vaxer.net> | ||
| 5 | |||
| 6 | package Net::ParseWhois::Domain::Registrar::GoDaddy; | ||
| 7 | |||
| 8 | require 5.004; | ||
| 9 | use strict; | ||
| 10 | |||
| 11 | @Net::ParseWhois::Domain::Registrar::GoDaddy::ISA = qw(Net::ParseWhois::Domain::Registrar); | ||
| 12 | $Net::ParseWhois::Domain::Registrar::GoDaddy::VERSION = 1.0; | ||
| 13 | |||
| 14 | sub rdebug { 0 } | ||
| 15 | sub regex_org_start { '^Registrant:'} | ||
| 16 | sub regex_no_match { '^No match for' } | ||
| 17 | sub regex_created { '^Created on: (.*)$' } | ||
| 18 | sub regex_expires { '^Expires on: (.*)$' } | ||
| 19 | sub regex_updated { '^Last Updated on: (.*)$' } | ||
| 20 | sub regex_domain { '^Domain Name: (.*)$' } | ||
| 21 | sub regex_nameservers { '^Domain servers in listed order:' } | ||
| 22 | sub my_nameservers_noips { 1 } | ||
| 23 | sub my_contacts { [ qw(Administrative Technical) ] } | ||
| 24 | sub my_data { [ qw(my_nameservers_noips my_contacts regex_org_start regex_no_match regex_created regex_updated regex_expires regex_domain regex_nameservers) ] } | ||
| 25 | |||
| 26 | sub parse_text { | ||
| 27 | my $self = shift; | ||
| 28 | my $text = shift; # array ref, one line per element | ||
| 29 | |||
| 30 | $self->dump_text($text) if $self->rdebug; | ||
| 31 | $self->parse_start($text); | ||
| 32 | $self->dump_text($text) if $self->rdebug; | ||
| 33 | $self->parse_org($text); | ||
| 34 | $self->dump_text($text) if $self->rdebug; | ||
| 35 | $self->parse_domain_name($text); | ||
| 36 | $self->dump_text($text) if $self->rdebug; | ||
| 37 | $self->parse_domain_stats($text); | ||
| 38 | $self->dump_text($text) if $self->rdebug; | ||
| 39 | $self->parse_contacts($text); | ||
| 40 | $self->dump_text($text) if $self->rdebug; | ||
| 41 | $self->parse_nameservers($text); | ||
| 42 | $self->dump_text($text) if $self->rdebug; | ||
| 43 | |||
| 44 | return $self; | ||
| 45 | } | ||
| 46 | |||
| 47 | 1; |