| 1 | package Docker::Registry::ECR; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use Types::Standard qw/Str/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | extends 'Docker::Registry::V2'; | |||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | has '+url' => (lazy => 1, default => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=12.5
| |||||||||||||||||||||||||||||
| 7 | 1 | my $self = shift; | |||||||||||||||||||||||||||
| 8 | 1 | ▶ | die "Must specify account_id and region in constructor" if (not defined $self->account_id or | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $self->account_id and defined $self->region
MC/DC0%0/2
defined $self->account_id and defined $self->region
defined $self->account_id
defined $self->region
Truth table33%1/3
A and B
A= defined $self->account_idB= defined $self->region
| |||||||||||||||||||||||||||||
| 9 | not defined $self->region); | ||||||||||||||||||||||||||||
| 10 | 1 | sprintf 'https://%s.dkr.ecr.%s.amazonaws.com', $self->account_id, $self->region; | |||||||||||||||||||||||||||
| 11 | 1 | }); | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 0 | ▶ | around build_auth => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 14 | 0 | my ($orig, $self) = @_; | |||||||||||||||||||||||||||
| 15 | 0 | require Docker::Registry::Auth::ECR; | |||||||||||||||||||||||||||
| 16 | 0 | Docker::Registry::Auth::ECR->new(region => $self->region); | |||||||||||||||||||||||||||
| 17 | 1 | }; | |||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 1 | has account_id => (is => 'ro', isa => Str); | |||||||||||||||||||||||||||
| 20 | 1 | has region => (is => 'ro', isa => Str); | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 1 | 1; | |||||||||||||||||||||||||||