| 1 | |||||||||||
| 2 | package SRS::EPP::Response::Check; | ||||||||||
| 3 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | extends 'SRS::EPP::Response'; | ||||||||||
| 5 | 1 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | has "+message" => | ||||||||||
| 8 | lazy => 1, | ||||||||||
| 9 | default => \&make_response, | ||||||||||
| 10 | ; | ||||||||||
| 11 | |||||||||||
| 12 | #subtype 'XML::EPP::CheckRS' | ||||||||||
| 13 | # => as 'XML::EPP::Plugin' | ||||||||||
| 14 | # => where { $_->root_element eq 'check' } | ||||||||||
| 15 | # ; | ||||||||||
| 16 | |||||||||||
| 17 | has 'payload' => | ||||||||||
| 18 | is => 'rw', | ||||||||||
| 19 | # isa => 'XML::EPP::CheckRS', # XML::EPP::Plugin | ||||||||||
| 20 | isa => 'XML::EPP::Plugin', # XML::EPP::Plugin | ||||||||||
| 21 | required => 1, | ||||||||||
| 22 | ; | ||||||||||
| 23 | |||||||||||
| 24 | sub make_response { | ||||||||||
| 25 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
make_response: not called CC=5 SCAR=34.0
| |||||||||||
| 26 | |||||||||||
| 27 | 0 | my $server_id = $self->server_id; | |||||||||
| 28 | 0 | my $client_id = $self->client_id; | |||||||||
| 29 | |||||||||||
| 30 | 0 | my $tx_id; | |||||||||
| 31 | 0 | ▶ | if ( $server_id ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | ▶ | $tx_id = XML::EPP::TrID->new( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | server_id => $server_id, | ||||||||||
| 34 | ($client_id ? (client_id => $client_id) : () ), | ||||||||||
| 35 | ); | ||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 0 | my $msg = $self->extra; | |||||||||
| 39 | 0 | ▶ | my $result = XML::EPP::Result->new( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | ($msg ? (msg => $msg) : ()), | ||||||||||
| 41 | # msg => '', | ||||||||||
| 42 | code => $self->code, | ||||||||||
| 43 | ); | ||||||||||
| 44 | |||||||||||
| 45 | 0 | ▶ | my $xml_epp = XML::EPP->new( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 46 | message => XML::EPP::Response->new( | ||||||||||
| 47 | result => [$result], | ||||||||||
| 48 | response => XML::EPP::SubResponse->new( | ||||||||||
| 49 | payload => $self->payload, | ||||||||||
| 50 | ), | ||||||||||
| 51 | ($tx_id ? (tx_id => $tx_id) : () ), | ||||||||||
| 52 | ), | ||||||||||
| 53 | ); | ||||||||||
| 54 | 0 | return $xml_epp; | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | 1; | ||||||||||