« blib/lib/WebDyne/Cloudflare/D1/Blob.pm
↑ Summary
blib/lib/WebDyne/Cloudflare/Hyperdrive/Error.pm »
| 1 | package WebDyne::Cloudflare::SecretsStore::Error; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use 5.020; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use overload '""' => 'as_string', fallback => 1; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | our $VERSION='0.001'; | |||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | my %message=( | |||||||||||||||||||||||||||||||||||||||||
| 11 | SECRETS_STORE_ERROR => 'Secrets Store request failed', | ||||||||||||||||||||||||||||||||||||||||||
| 12 | SECRETS_STORE_HOST_ERROR => 'Secrets Store host call failed', | ||||||||||||||||||||||||||||||||||||||||||
| 13 | SECRETS_STORE_PROTOCOL_ERROR => 'Invalid Secrets Store protocol response or request', | ||||||||||||||||||||||||||||||||||||||||||
| 14 | SECRETS_STORE_CAPABILITY_ERROR => 'Secrets Store capability is invalid or has expired', | ||||||||||||||||||||||||||||||||||||||||||
| 15 | SECRETS_STORE_BINDING_ERROR => 'Secrets Store binding is not available to this request', | ||||||||||||||||||||||||||||||||||||||||||
| 16 | SECRETS_STORE_READ_ERROR => 'Secrets Store retrieval failed', | ||||||||||||||||||||||||||||||||||||||||||
| 17 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | 7 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 7 | my ($class, %opt)=@_; | |||||||||||||||||||||||||||||||||||||||||
| 21 | 7 | my $name=$opt{'name'}; | |||||||||||||||||||||||||||||||||||||||||
| 22 | $name='SECRETS_STORE_ERROR' | ||||||||||||||||||||||||||||||||||||||||||
| 23 | 7 | ▶ | unless (defined($name)&&!ref($name)&&exists($message{$name})); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%3/6
defined $name and not ref $name and exists $message{$name}
defined $name and not ref $name
MC/DC33%1/3
defined $name and not ref $name and exists $message{$name}
defined $name
not ref $name
exists $message{$name}
Truth table50%2/4
A and not(B) and C
A= defined $nameB= not ref $nameC= exists $message{$name}
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 7 | my $self=bless({ name => $name, message => $message{$name} }, $class); | |||||||||||||||||||||||||||||||||||||||||
| 25 | 7 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | 1 | ▶ | sub name { return shift()->{'name'}; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | sub message { return shift()->{'message'}; } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
message: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||
| 33 | 21 | ▶ | sub as_string { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 34 | 21 | my ($self)=@_; | |||||||||||||||||||||||||||||||||||||||||
| 35 | 21 | return "$self->{'name'}: $self->{'message'}"; | |||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||