Net-DNS-LivedoorDomain-DDNS

 view release on metacpan or  search on metacpan

lib/Net/DNS/LivedoorDomain/DDNS/Response.pm  view on Meta::CPAN

    my $self = shift;
    return $self->result_code eq '200';
}

sub _init {
    my ($self, $res) = @_;
    return unless $res->code =~ m/^(2|3)/;
    my $content = $res->content;
    return unless $content =~ m/<PRE>\n(.*)<\/PRE>/s;
    $content = $1;
    my @lines = split m/\n/, $content;
    my %data;
    for my $line(@lines) {
        my ($key, $val) = split m/\:\s*/, $line;
        $key = lc($key);
        $self->$key($val);
    }
}

1;
__END__



( run in 0.724 second using v1.01-cache-2.11-cpan-71847e10f99 )