| 1 | package WWW::eNom; | ||||||||||
| 2 | |||||||||||
| 3 | 43 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 43 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 43 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 43 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 43 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 43 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 43 | ▶ | use WWW::eNom::Types qw( Bool Str ResponseType URI ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 43 | ▶ | use URI; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 43 | our $VERSION = 'v2.7.0'; # VERSION | |||||||||
| 16 | # ABSTRACT: Interact with eNom, Inc.'s Reseller API | ||||||||||
| 17 | |||||||||||
| 18 | 43 | has username => ( | |||||||||
| 19 | is => 'ro', | ||||||||||
| 20 | isa => Str, | ||||||||||
| 21 | required => 1, | ||||||||||
| 22 | ); | ||||||||||
| 23 | |||||||||||
| 24 | 43 | has password => ( | |||||||||
| 25 | is => 'ro', | ||||||||||
| 26 | isa => Str, | ||||||||||
| 27 | required => 1, | ||||||||||
| 28 | ); | ||||||||||
| 29 | |||||||||||
| 30 | 43 | has test => ( | |||||||||
| 31 | is => 'ro', | ||||||||||
| 32 | isa => Bool, | ||||||||||
| 33 | default => 0, | ||||||||||
| 34 | ); | ||||||||||
| 35 | |||||||||||
| 36 | 43 | has response_type => ( | |||||||||
| 37 | is => 'rw', | ||||||||||
| 38 | isa => ResponseType, | ||||||||||
| 39 | default => 'xml_simple', | ||||||||||
| 40 | ); | ||||||||||
| 41 | |||||||||||
| 42 | 43 | has _uri => ( | |||||||||
| 43 | isa => URI, | ||||||||||
| 44 | is => 'ro', | ||||||||||
| 45 | lazy => 1, | ||||||||||
| 46 | builder => '_build_uri', | ||||||||||
| 47 | ); | ||||||||||
| 48 | |||||||||||
| 49 | 43 | with 'WWW::eNom::Role::Command'; | |||||||||
| 50 | |||||||||||
| 51 | 0 | ▶ | sub _build_uri { | ||||||||
|
Subroutine
_build_uri: not called CC=2 SCAR=17.9
| |||||||||||
| 52 | 0 | my $self = shift; | |||||||||
| 53 | |||||||||||
| 54 | 0 | ▶ | my $subdomain = $self->test ? 'resellertest' : 'reseller'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 55 | 0 | return URI->new("https://$subdomain.enom.com/interface.asp"); | |||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | 43 | 1; | |||||||||
| 59 | |||||||||||
| 60 | __END__ | ||||||||||