| 1 | package Kubernetes::REST::RemoteError; | ||
| 2 | 2 | our $VERSION = '1.110'; | |
| 3 | # ABSTRACT: Compatibility helper for deprecated v0 remote errors | ||
| 4 | 2 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use Types::Standard qw/Int/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use Kubernetes::REST::Error; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 2 | extends 'Kubernetes::REST::Error'; | |
| 8 | |||
| 9 | 2 | ▶ | has '+type' => (default => sub { 'Remote' }); |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 10 | 2 | has status => (is => 'ro', isa => Int, required => 1); | |
| 11 | |||
| 12 | |||
| 13 | 5 | ▶ | around header => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 14 | 5 | my ($orig, $self) = @_; | |
| 15 | 5 | my $orig_message = $self->$orig; | |
| 16 | 5 | sprintf "%s with HTTP status %d", $orig_message, $self->status; | |
| 17 | 2 | }; | |
| 18 | |||
| 19 | |||
| 20 | 2 | 1; | |
| 21 | |||
| 22 | __END__ | ||