File Coverage

blib/lib/JMAP/Tester/Result/Download.pm
Criterion Covered Total %
statement 11 12 91.6
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 15 18 83.3


line stmt bran cond sub pod time code
1 1     1   19 use v5.10.0;
  1         5  
2 1     1   7 use strict;
  1         2  
  1         41  
3              
4             package JMAP::Tester::Result::Download 0.101;
5             # ABSTRACT: what you get when you download a blob
6              
7 1     1   5 use Moo;
  1         2  
  1         6  
8             with 'JMAP::Tester::Role::HTTPResult';
9              
10 1     1   413 use namespace::clean;
  1         2  
  1         9  
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__