« blib/lib/WWW/LogicBoxes/Role/Command/Domain/PrivateNameServer.pm
↑ Summary
blib/lib/WWW/LogicBoxes/DomainTransfer.pm »
| 1 | package WWW::LogicBoxes::Domain::Factory; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 38 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 38 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | |||||||||||||||
| 6 | 38 | ▶ | use WWW::LogicBoxes::Domain; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | 38 | ▶ | use WWW::LogicBoxes::DomainTransfer; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 8 | |||||||||||||||
| 9 | 38 | ▶ | use Carp; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 10 | |||||||||||||||
| 11 | 38 | our $VERSION = '1.2.0'; # VERSION | |||||||||||||
| 12 | # ABSTRACT: Domain Factory for Building Domain Objects from Responses | ||||||||||||||
| 13 | |||||||||||||||
| 14 | sub construct_from_response { | ||||||||||||||
| 15 | 0 | ▶ | my $self = shift; | ||||||||||||
|
Subroutine
construct_from_response: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||
| 16 | 0 | my $response = shift; | |||||||||||||
| 17 | |||||||||||||||
| 18 | 0 | ▶ | if( !$response ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 19 | 0 | return; | |||||||||||||
| 20 | } | ||||||||||||||
| 21 | |||||||||||||||
| 22 | 0 | ▶ | if( $response->{actiontype} ) { | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 23 | 0 | ▶ | if( $response->{actiontype} eq 'AddTransferDomain' ) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 24 | 0 | return WWW::LogicBoxes::DomainTransfer->construct_from_response( $response ); | |||||||||||||
| 25 | } | ||||||||||||||
| 26 | elsif( $response->{actiontype} eq 'DelDomain' ) { | ||||||||||||||
| 27 | 0 | return WWW::LogicBoxes::Domain->construct_from_response( $response ); | |||||||||||||
| 28 | } | ||||||||||||||
| 29 | else { | ||||||||||||||
| 30 | 0 | croak $response->{actiontype} . ' is an unknown action type'; | |||||||||||||
| 31 | } | ||||||||||||||
| 32 | } | ||||||||||||||
| 33 | else { | ||||||||||||||
| 34 | 0 | return WWW::LogicBoxes::Domain->construct_from_response( $response ); | |||||||||||||
| 35 | } | ||||||||||||||
| 36 | } | ||||||||||||||
| 37 | |||||||||||||||
| 38 | 38 | 1; | |||||||||||||
| 39 | |||||||||||||||
| 40 | __END__ | ||||||||||||||