Response/Check.pm

filter: Statementstmt 37.5% 6 / 16 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 29.6% 8 / 27 CC 5 SCAR 30.8
CC
5
Cov
25%
make_response
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 21.7
« Proxy/SimpleConfig.pm ↑ Summary Response/Info.pm »
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
BranchTrueFalseTotal
if ($server_id) 0 0 0
32 0 ▶ $tx_id = XML::EPP::TrID->new(
Branch: 1 branch
BranchTrueFalseTotal
$client_id ? : 0 0 0
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
BranchTrueFalseTotal
$msg ? : 0 0 0
40 ($msg ? (msg => $msg) : ()),
41 # msg => '',
42 code => $self->code,
43 );
44  
45 0 ▶ my $xml_epp = XML::EPP->new(
Branch: 1 branch
BranchTrueFalseTotal
$tx_id ? : 0 0 0
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;
« Proxy/SimpleConfig.pm ↑ Summary Response/Info.pm »