Command/Delete/Domain.pm

filter: Statementstmt 83.3% 10 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 87.5% 14 / 16 CC 1 SCAR 0.7
CC
1
Cov
83%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Command/Delete/Contact.pm ↑ Summary Command/Info/Contact.pm »
1  
2  
3 package SRS::EPP::Command::Delete::Domain;
4  
5 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 extends 'SRS::EPP::Command::Delete';
7 1 ▶use MooseX::Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Crypt::Password;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use SRS::EPP::Session;
Subroutine BEGIN: called CC=1 SCAR=2.6
10 use XML::EPP::Domain;
11  
12 # for plugin system to connect
13 sub xmlns {
14 XML::EPP::Domain::Node::xmlns();
15 }
16  
17 method process( SRS::EPP::Session $session ) {
18 $self->session($session);
19 my $epp = $self->message;
20 my $message = $epp->message;
21  
22 my $payload = $message->argument->payload;
23 my $action_id = $message->client_id || sprintf("auto.%x",time());
24  
25 return XML::SRS::Domain::Update->new(
26 filter => [$payload->name],
27 action_id => $action_id,
28 cancel => 1,
29 full_result => 0,
30 );
31 }
32  
33 method notify( SRS::EPP::SRSResponse @rs ) {
34 my $message = $rs[0]->message;
35 my $response = $message->response;
36  
37 if ( ! $response ) {
38 # Lets just assume the domain doesn't exist
39 return $self->make_response(code => 2303);
40 }
41 if ( $response->isa("XML::SRS::Error") ) {
42 return $self->make_response(code => 2400);
43 }
44 if ( $response->status eq "Available" ) {
45 return $self->make_response(code => 1000);
46 }
47 }
48  
49 1;
« Command/Delete/Contact.pm ↑ Summary Command/Info/Contact.pm »