Tester/Result/Download.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 85.0% 17 / 20 CC 1 SCAR 1.8
CC
1
Cov
93%
is_success
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Tester/Role/HTTPResult.pm ↑ Summary Tester/Manual.pm »
1 2 ▶use v5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package JMAP::Tester::Result::Download 0.113;
4 # ABSTRACT: what you get when you download a blob
5  
6 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 with 'JMAP::Tester::Role::HTTPResult';
8  
9 2 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 #pod =head1 OVERVIEW
12 #pod
13 #pod A JMAP::Tester::Result::Download object represents the successful download of a
14 #pod JMAP blob. It is a successful L<JMAP::Tester::Role::HTTPResult>, meaning it
15 #pod has a C<http_response> method that returns an L<HTTP::Response> object.
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<bytes_ref> method which will return a reference to the
22 #pod raw bytes of the download.
23 #pod
24 #pod =cut
25  
26 0 ▶sub is_success { 1 }
Subroutine is_success: not called CC=1 SCAR=6.9
Pod undocumented
27  
28 has bytes_ref => (
29 is => 'ro',
30 lazy => 1,
31 1 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
32 1 my $str = $_[0]->http_response->decoded_content(charset => 'none');
33 1 return \$str;
34 },
35 2 );
36  
37 2 1;
38  
39 __END__
« Tester/Role/HTTPResult.pm ↑ Summary Tester/Manual.pm »