line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
10
|
use v5.10.0; |
|
1
|
|
|
|
|
3
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package JMAP::Tester::Result::Download 0.102; |
5
|
|
|
|
|
|
|
# ABSTRACT: what you get when you download a blob |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
8
|
|
|
|
|
|
|
with 'JMAP::Tester::Role::HTTPResult'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
288
|
use namespace::clean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
#pod =head1 OVERVIEW |
13
|
|
|
|
|
|
|
#pod |
14
|
|
|
|
|
|
|
#pod This is what you get when you download! It's got an C method. It |
15
|
|
|
|
|
|
|
#pod returns true. It also has: |
16
|
|
|
|
|
|
|
#pod |
17
|
|
|
|
|
|
|
#pod =method bytes_ref |
18
|
|
|
|
|
|
|
#pod |
19
|
|
|
|
|
|
|
#pod The raw bytes of the blob. |
20
|
|
|
|
|
|
|
#pod |
21
|
|
|
|
|
|
|
#pod It also has a C method which will return a reference to the |
22
|
|
|
|
|
|
|
#pod raw bytes of the download. |
23
|
|
|
|
|
|
|
#pod |
24
|
|
|
|
|
|
|
#pod =cut |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
0
|
|
sub is_success { 1 } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has bytes_ref => ( |
29
|
|
|
|
|
|
|
is => 'ro', |
30
|
|
|
|
|
|
|
lazy => 1, |
31
|
|
|
|
|
|
|
default => sub { |
32
|
|
|
|
|
|
|
my $str = $_[0]->http_response->decoded_content(charset => 'none'); |
33
|
|
|
|
|
|
|
return \$str; |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |