blib/lib/Docker/Registry/GCE.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 6 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | n/a | ||
total | 8 | 8 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Docker::Registry::GCE; | ||||||
2 | 1 | 1 | 14308 | use Moo; | |||
1 | 3 | ||||||
1 | 7 | ||||||
3 | 1 | 1 | 388 | use Types::Standard qw/Str Maybe/; | |||
1 | 3 | ||||||
1 | 8 | ||||||
4 | extends 'Docker::Registry::V2'; | ||||||
5 | |||||||
6 | has region => (is => 'ro', isa => Maybe[Str], default => undef); | ||||||
7 | |||||||
8 | has '+url' => (lazy => 1, default => sub { | ||||||
9 | my $self = shift; | ||||||
10 | if (defined $self->region) { | ||||||
11 | sprintf 'https://%s.gcr.io', $self->region; | ||||||
12 | } else { | ||||||
13 | 'https://gcr.io'; | ||||||
14 | } | ||||||
15 | }); | ||||||
16 | |||||||
17 | 1; |