| 1 | package Net::Kubernetes::Resource::State; | ||||||||||
| 2 | 2 | $Net::Kubernetes::Resource::State::VERSION = '0.05'; | |||||||||
| 3 | 2 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | =head1 NAME | ||||||||||
| 6 | |||||||||||
| 7 | Net::Kubernetes::Resource::State | ||||||||||
| 8 | |||||||||||
| 9 | =head1 VERSION | ||||||||||
| 10 | |||||||||||
| 11 | version 0.05 | ||||||||||
| 12 | |||||||||||
| 13 | =cut | ||||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | 2 | has status => ( | |||||||||
| 17 | is => 'rw', | ||||||||||
| 18 | isa => 'HashRef', | ||||||||||
| 19 | required => 1 | ||||||||||
| 20 | ); | ||||||||||
| 21 | |||||||||||
| 22 | sub refresh { | ||||||||||
| 23 | 0 | ▶ | my($self) = @_; | ||||||||
|
Subroutine
refresh: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 24 | 0 | my($res) = $self->ua->request($self->create_request(GET => $self->url.'/'.$self->base_path)); | |||||||||
| 25 | 0 | ▶ | if ($res->is_success) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 0 | my($data) = $self->json->decode($res->content); | |||||||||
| 27 | 0 | $self->status($data->{status}); | |||||||||
| 28 | 0 | return 1; | |||||||||
| 29 | } | ||||||||||
| 30 | 0 | return 0; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 2 | return 42; | |||||||||