line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package SRS::EPP::SRSMessage; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
$SRS::EPP::SRSMessage::VERSION = '0.22'; |
5
|
|
|
|
|
|
|
} |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2634
|
use 5.010; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
42
|
|
8
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends "SRS::EPP::Message"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'parts' => |
13
|
|
|
|
|
|
|
is => "rw", |
14
|
|
|
|
|
|
|
isa => "ArrayRef[SRS::EPP::Message]", |
15
|
|
|
|
|
|
|
; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has "+message" => |
18
|
|
|
|
|
|
|
isa => "XML::SRS", |
19
|
|
|
|
|
|
|
; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
after 'message_trigger' => sub { |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
|
|
|
|
|
|
return if $self->parts and @{$self->parts}; |
24
|
|
|
|
|
|
|
my $message = $self->message; |
25
|
|
|
|
|
|
|
my ($class, $method); |
26
|
|
|
|
|
|
|
if ( $message->isa("XML::SRS::Request") ) { |
27
|
|
|
|
|
|
|
$class = "SRS::EPP::SRSRequest"; |
28
|
|
|
|
|
|
|
$method = "requests"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
|
|
|
|
|
|
$class = "SRS::EPP::SRSResponse"; |
32
|
|
|
|
|
|
|
$method = "results"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
$self->parts( [ |
35
|
|
|
|
|
|
|
map { |
36
|
|
|
|
|
|
|
$class->new( message => $_ ) |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
@{ $message->$method//[] } |
39
|
|
|
|
|
|
|
] |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |