| 1 | package Docker::Registry::Request; | ||||||||||
| 2 | 6 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 6 | ▶ | use Types::Standard qw/Str Maybe InstanceOf/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use HTTP::Headers; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 19 | ▶ | has headers => (is => 'ro', isa => InstanceOf['HTTP::Headers'], default => sub { HTTP::Headers->new }); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 6 | has method => (is => 'ro', isa => Str, required => 1); | |||||||||
| 8 | 6 | has url => (is => 'ro', isa => Str, required => 1); | |||||||||
| 9 | 6 | has content => (is => 'ro', isa => Maybe[Str]); | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub header_hash { | ||||||||
|
Subroutine
header_hash: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 12 | 0 | my $self = shift; | |||||||||
| 13 | 0 | my $headers = {}; | |||||||||
| 14 | 0 | ▶ | $self->headers->scan(sub { $headers->{ $_[0] } = $_[1] }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 15 | 0 | return $headers; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 3 | ▶ | sub header { | ||||||||
|
Subroutine
header: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 19 | 3 | my ($self, $header, $value) = @_; | |||||||||
| 20 | 3 | ▶ | $self->headers->header($header, $value) if (defined $value); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 3 | return $self->headers->header($header); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 6 | 1; | |||||||||