| 1 | |||||||||||
| 2 | package SRS::EPP::Response::Info; | ||||||||||
| 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 | has 'payload' => | ||||||||||
| 13 | is => 'rw', | ||||||||||
| 14 | isa => 'XML::EPP::Plugin', # XML::EPP::Plugin | ||||||||||
| 15 | required => 1, | ||||||||||
| 16 | ; | ||||||||||
| 17 | |||||||||||
| 18 | sub make_response { | ||||||||||
| 19 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
make_response: not called CC=5 SCAR=34.0
| |||||||||||
| 20 | |||||||||||
| 21 | 0 | my $server_id = $self->server_id; | |||||||||
| 22 | 0 | my $client_id = $self->client_id; | |||||||||
| 23 | |||||||||||
| 24 | 0 | my $tx_id; | |||||||||
| 25 | 0 | ▶ | if ( $server_id ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 0 | ▶ | $tx_id = XML::EPP::TrID->new( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | server_id => $server_id, | ||||||||||
| 28 | ($client_id ? (client_id => $client_id) : () ), | ||||||||||
| 29 | ); | ||||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 0 | my $msg = $self->extra; | |||||||||
| 33 | 0 | ▶ | my $result = XML::EPP::Result->new( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | ($msg ? (msg => $msg) : ()), | ||||||||||
| 35 | # msg => '', | ||||||||||
| 36 | code => $self->code, | ||||||||||
| 37 | ); | ||||||||||
| 38 | |||||||||||
| 39 | 0 | ▶ | my $xml_epp = XML::EPP->new( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | message => XML::EPP::Response->new( | ||||||||||
| 41 | result => [$result], | ||||||||||
| 42 | response => XML::EPP::SubResponse->new( | ||||||||||
| 43 | payload => $self->payload, | ||||||||||
| 44 | ), | ||||||||||
| 45 | ($tx_id ? (tx_id => $tx_id) : () ), | ||||||||||
| 46 | ), | ||||||||||
| 47 | ); | ||||||||||
| 48 | 0 | return $xml_epp; | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | 1; | ||||||||||