| 1 | # Net::ParseWhois registrar parser driver | ||
| 2 | # | ||
| 3 | # Registrar: Easyspace Ltd | ||
| 4 | # Version: 0.2 | ||
| 5 | # Contributor: Adam Stubbs <astubbs@advantagecommunication.com> | ||
| 6 | # Date: 04/14/2001 | ||
| 7 | # Updated: 11/16/2005 by Jeff Mercer <riffer@vaxer.net> | ||
| 8 | |||
| 9 | package Net::ParseWhois::Domain::Registrar::Easyspace; | ||
| 10 | |||
| 11 | require 5.004; | ||
| 12 | use strict; | ||
| 13 | |||
| 14 | @Net::ParseWhois::Domain::Registrar::Easyspace::ISA = qw(Net::ParseWhois::Domain::Registrar); | ||
| 15 | $Net::ParseWhois::Domain::Registrar::Easyspace::VERSION = 0.2; | ||
| 16 | |||
| 17 | sub rdebug { 0 } | ||
| 18 | sub regex_org_start { '^Registrant:'} | ||
| 19 | sub regex_no_match { '^No match for' } | ||
| 20 | sub regex_created { '^Record created on (.*)\.$' } | ||
| 21 | sub regex_expires { '^Record expires on (.*)\.$' } | ||
| 22 | sub regex_updated { '^Record last updated on (.*)\.$' } | ||
| 23 | sub regex_domain { '^Domain name: (.*)$' } | ||
| 24 | sub regex_nameservers { '^Domain servers in listed order:$' } | ||
| 25 | sub my_contacts { [ qw(Administrative Technical) ] } | ||
| 26 | sub my_data { [ qw(my_contacts regex_org_start regex_no_match regex_created regex_expires regex_updated regex_domain regex_nameservers) ] } | ||
| 27 | |||
| 28 | sub parse_text { | ||
| 29 | my $self = shift; | ||
| 30 | my $text = shift; # array ref, one line per element | ||
| 31 | |||
| 32 | my $atext = join("\n",@{ $text }); | ||
| 33 | $atext =~ s/\nRegistrar:\s*\n\s*".*?".*?hostmaster\@easyspace\.com.*?\n.*?\s*Phone:\s*.*?\n\s*Fax:\s*.*?\n/\n/gsi; | ||
| 34 | my @newtext = split(/\n/, $atext); | ||
| 35 | $text = \@newtext; | ||
| 36 | |||
| 37 | $self->dump_text($text) if $self->rdebug; | ||
| 38 | |||
| 39 | $self->parse_start($text); | ||
| 40 | $self->parse_org($text); | ||
| 41 | $self->parse_domain_name($text); | ||
| 42 | $self->parse_contacts($text); | ||
| 43 | $self->parse_domain_stats($text); | ||
| 44 | $self->parse_nameservers($text); | ||
| 45 | |||
| 46 | return $self; | ||
| 47 | } | ||
| 48 | |||
| 49 | 1; |