File Coverage

blib/lib/JMAP/Tester/Result/Download.pm
Criterion Covered Total %
statement 8 9 88.8
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 11 14 78.5


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