| 1 | package WWW::Hetzner::Cloud::Datacenter; | ||
| 2 | # ABSTRACT: Hetzner Cloud Datacenter object | ||
| 3 | |||
| 4 | 60 | our $VERSION = '0.102'; | |
| 5 | |||
| 6 | 60 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 60 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | 60 | has _client => ( | |
| 11 | is => 'ro', | ||
| 12 | required => 1, | ||
| 13 | weak_ref => 1, | ||
| 14 | init_arg => 'client', | ||
| 15 | ); | ||
| 16 | |||
| 17 | 60 | has id => ( is => 'ro' ); | |
| 18 | |||
| 19 | |||
| 20 | 60 | has name => ( is => 'ro' ); | |
| 21 | |||
| 22 | |||
| 23 | 60 | has description => ( is => 'ro' ); | |
| 24 | |||
| 25 | |||
| 26 | 0 | ▶ | has location_data => ( is => 'ro', init_arg => 'location', default => sub { {} } ); |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 27 | |||
| 28 | 5 | ▶ | sub location { shift->location_data->{name} } |
|
Subroutine
location: called CC=1 SCAR=0.0
Pod
documented
| |||
| 29 | |||
| 30 | |||
| 31 | 3 | ▶ | sub data { |
|
Subroutine
data: called CC=1 SCAR=0.0
Pod
documented
| |||
| 32 | 3 | my ($self) = @_; | |
| 33 | return { | ||
| 34 | 3 | id => $self->id, | |
| 35 | name => $self->name, | ||
| 36 | description => $self->description, | ||
| 37 | location => $self->location_data, | ||
| 38 | }; | ||
| 39 | } | ||
| 40 | |||
| 41 | |||
| 42 | |||
| 43 | 60 | 1. | |
| 44 | |||
| 45 | __END__ | ||