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 4     4   290626 use v5.20.0;
  4         14  
2              
3             package JMAP::Tester::Result::Download 0.109;
4             # ABSTRACT: what you get when you download a blob
5              
6 4     4   444 use Moo;
  4         7123  
  4         20  
7             with 'JMAP::Tester::Role::HTTPResult';
8              
9 4     4   2836 use namespace::clean;
  4         13333  
  4         39  
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__