blib/lib/IO/Compress/Adapter/Identity.pm

filter: Statementstmt 67.3% 31 / 46 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 58.3% 7 / 12 Podpod 0.0% 0 / 8 totaltotal 54.6% 41 / 75 CC 4 SCAR 8.3
CC
4
Cov
64%
compr
4.6
flush
2.0
reset
2.0
CRAP 2.3
« bin/streamzip ↑ Summary blib/lib/IO/Compress/Adapter/Deflate.pm »
1 package IO::Compress::Adapter::Identity ;
2  
3 47 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 47 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 47 ▶use bytes;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 47 ▶use IO::Compress::Base::Common 2.225 qw(:Status);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 47 our ($VERSION);
9  
10 47 $VERSION = '2.225';
11  
12 sub mkCompObject
13 36 ▶{
Subroutine mkCompObject: called CC=1 SCAR=0.0
Pod undocumented
14 36 my $level = shift ;
15 36 my $strategy = shift ;
16  
17 36 return bless {
18 'CompSize' => 0,
19 'UnCompSize' => 0,
20 'Error' => '',
21 'ErrorNo' => 0,
22 } ;
23 }
24  
25 sub compr
26 32 ▶{
Subroutine compr: called CC=4 SCAR=15.2
Pod undocumented
27 32 my $self = shift ;
28  
29 32 ▶ if (defined ${ $_[0] } && length ${ $_[0] }) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined ${$_[0];} and length ${$_[0];}) 32 0 32
Condition33%1/3
defined ${$_[0];} and length ${$_[0];}
!ll&&!rl&&r
0032
MC/DC0%0/2
defined ${$_[0];} and length ${$_[0];}
defined ${$_[0];} length ${$_[0];}
Truth table33%1/3
A and B
A= defined ${$_[0];}B= length ${$_[0];}
ABresult
0X0
100
111
30 32 $self->{CompSize} += length ${ $_[0] } ;
31 32 $self->{UnCompSize} = $self->{CompSize} ;
32  
33 32 ▶ if ( ref $_[1] )
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[1]) { } 0 32 32
34 0 { ${ $_[1] } .= ${ $_[0] } }
35 else
36 32 { $_[1] .= ${ $_[0] } }
37 }
38  
39 32 return STATUS_OK ;
40 }
41  
42 sub flush
43 0 ▶{
Subroutine flush: not called CC=1 SCAR=6.9
Pod undocumented
44 0 my $self = shift ;
45  
46 0 return STATUS_OK;
47 }
48  
49 sub close
50 36 ▶{
Subroutine close: called CC=1 SCAR=0.0
Pod undocumented
51 36 my $self = shift ;
52  
53 36 return STATUS_OK;
54 }
55  
56 sub reset
57 0 ▶{
Subroutine reset: not called CC=1 SCAR=6.9
Pod undocumented
58 0 my $self = shift ;
59  
60 0 $self->{CompSize} = 0;
61 0 $self->{UnCompSize} = 0;
62  
63 0 return STATUS_OK;
64 }
65  
66 sub deflateParams
67 0 ▶{
Subroutine deflateParams: not called CC=1 SCAR=6.9
Pod undocumented
68 0 my $self = shift ;
69  
70 0 return STATUS_OK;
71 }
72  
73 #sub total_out
74 #{
75 # my $self = shift ;
76 # return $self->{UnCompSize} ;
77 #}
78 #
79 #sub total_in
80 #{
81 # my $self = shift ;
82 # return $self->{UnCompSize} ;
83 #}
84  
85 sub compressedBytes
86 0 ▶{
Subroutine compressedBytes: not called CC=1 SCAR=6.9
Pod undocumented
87 0 my $self = shift ;
88 0 return $self->{UnCompSize} ;
89 }
90  
91 sub uncompressedBytes
92 0 ▶{
Subroutine uncompressedBytes: not called CC=1 SCAR=6.9
Pod undocumented
93 0 my $self = shift ;
94 0 return $self->{UnCompSize} ;
95 }
96  
97 47 1;
98  
99  
100 __END__
« bin/streamzip ↑ Summary blib/lib/IO/Compress/Adapter/Deflate.pm »