| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ABSTRACT: used for testing to provide test fixtures |
|
2
|
|
|
|
|
|
|
$Shared::Examples::Net::Amazon::S3::Fixture::VERSION = '0.991'; |
|
3
|
|
|
|
|
|
|
use parent qw[ Exporter::Tiny ]; |
|
4
|
40
|
|
|
40
|
|
279
|
|
|
|
40
|
|
|
|
|
91
|
|
|
|
40
|
|
|
|
|
299
|
|
|
5
|
|
|
|
|
|
|
use HTTP::Status; |
|
6
|
40
|
|
|
40
|
|
2509
|
|
|
|
40
|
|
|
|
|
87
|
|
|
|
40
|
|
|
|
|
20619
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT_OK = ( |
|
8
|
|
|
|
|
|
|
qw[ error_fixture ], |
|
9
|
|
|
|
|
|
|
qw[ response_fixture ], |
|
10
|
|
|
|
|
|
|
qw[ fixture ], |
|
11
|
|
|
|
|
|
|
); |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my (%params) = @_; |
|
14
|
|
|
|
|
|
|
|
|
15
|
86
|
|
|
86
|
0
|
324
|
return +{ |
|
16
|
|
|
|
|
|
|
content_type => 'application/xml', |
|
17
|
|
|
|
|
|
|
content_length => length $params{with_response_data}, |
|
18
|
|
|
|
|
|
|
response_code => HTTP::Status::HTTP_OK, |
|
19
|
|
|
|
|
|
|
|
|
20
|
86
|
|
|
|
|
1479
|
%params, |
|
21
|
|
|
|
|
|
|
}; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my (%params) = @_; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
return +{ |
|
27
|
33
|
|
|
33
|
0
|
148
|
content_type => 'application/xml', |
|
28
|
|
|
|
|
|
|
content_length => length $params{with_response_data}, |
|
29
|
|
|
|
|
|
|
response_code => HTTP::Status::HTTP_OK, |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
%params, |
|
32
|
33
|
|
|
|
|
635
|
}; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my ($error_code, $http_status, $error_message) = @_; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
unless (defined $error_message) { |
|
38
|
|
|
|
|
|
|
$error_message = $error_code; |
|
39
|
86
|
|
|
86
|
0
|
312
|
$error_message =~ s/ (?<=[[:lower:]]) ([[:upper:]])/ \L$1\E/gx; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
86
|
100
|
|
|
|
321
|
|
|
42
|
85
|
|
|
|
|
166
|
return response_fixture ( |
|
43
|
85
|
|
|
|
|
906
|
response_code => $http_status, |
|
44
|
|
|
|
|
|
|
content => <<"XML", |
|
45
|
|
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
46
|
86
|
|
|
|
|
512
|
<Error> |
|
47
|
|
|
|
|
|
|
<Code>$error_code</Code> |
|
48
|
|
|
|
|
|
|
<Message>$error_message error message</Message> |
|
49
|
|
|
|
|
|
|
<Resource>/some-resource</Resource> |
|
50
|
|
|
|
|
|
|
<RequestId>4442587FB7D0A2F9</RequestId> |
|
51
|
|
|
|
|
|
|
</Error> |
|
52
|
|
|
|
|
|
|
XML |
|
53
|
|
|
|
|
|
|
); |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=pod |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=encoding UTF-8 |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 NAME |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Shared::Examples::Net::Amazon::S3::Fixture - used for testing to provide test fixtures |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 VERSION |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
version 0.991 |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Branislav Zahradník <barney@cpan.org> |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
80
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |