line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
$Net::Amazon::S3::Error::Handler::Confess::VERSION = '0.991'; |
2
|
|
|
|
|
|
|
# ABSTRACT: An internal class to report errors via Carp::confess |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Moose; |
5
|
99
|
|
|
99
|
|
633
|
use Carp; |
|
99
|
|
|
|
|
206
|
|
|
99
|
|
|
|
|
633
|
|
6
|
99
|
|
|
99
|
|
538187
|
use HTTP::Status; |
|
99
|
|
|
|
|
242
|
|
|
99
|
|
|
|
|
6587
|
|
7
|
99
|
|
|
99
|
|
622
|
|
|
99
|
|
|
|
|
197
|
|
|
99
|
|
|
|
|
42868
|
|
8
|
|
|
|
|
|
|
extends 'Net::Amazon::S3::Error::Handler'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @CARP_NOT = (__PACKAGE__); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my %return_false = ( |
13
|
|
|
|
|
|
|
NoSuchKey => { |
14
|
|
|
|
|
|
|
'Net::Amazon::S3::Operation::Object::Head::Response' => 1, |
15
|
|
|
|
|
|
|
}, |
16
|
|
|
|
|
|
|
NoSuchBucket => { |
17
|
|
|
|
|
|
|
'Net::Amazon::S3::Operation::Object::Head::Response' => 1, |
18
|
|
|
|
|
|
|
}, |
19
|
|
|
|
|
|
|
'404' => { |
20
|
|
|
|
|
|
|
'Net::Amazon::S3::Operation::Object::Head::Response' => 1, |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my ($self, $response) = @_; |
25
|
|
|
|
|
|
|
|
26
|
99
|
|
|
99
|
1
|
257
|
return 1 unless $response->is_error; |
27
|
|
|
|
|
|
|
|
28
|
99
|
100
|
|
|
|
496
|
return 0 |
29
|
|
|
|
|
|
|
if exists $return_false{ $response->error_code } |
30
|
|
|
|
|
|
|
&& exists $return_false{ $response->error_code }{ ref $response } |
31
|
|
|
|
|
|
|
; |
32
|
57
|
100
|
100
|
|
|
1985
|
|
33
|
|
|
|
|
|
|
Carp::confess ("${\ $response->error_code }: ${\ $response->error_message }"); |
34
|
|
|
|
|
|
|
} |
35
|
55
|
|
|
|
|
116
|
|
|
55
|
|
|
|
|
1353
|
|
|
55
|
|
|
|
|
1448
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding UTF-8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Net::Amazon::S3::Error::Handler::Confess - An internal class to report errors via Carp::confess |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
version 0.991 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 DESCRIPTION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Carp::confess on error. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Branislav Zahradník <barney@cpan.org> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |