examples/compress-zlib/filtdef

filter: Statementstmt 100% 20 / 20 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 90.3% 28 / 31 CC 1 SCAR 0.0
CC
1
Cov
89%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« examples/io/gzip/gzgrep ↑ Summary examples/compress-zlib/gzgrep »
1 #!/usr/local/bin/perl
2  
3 2 ▶use strict ;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings ;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Compress::Zlib ;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 binmode STDIN;
9 2 binmode STDOUT;
10 2 ▶my $x = deflateInit()
Branch: 1 branch
BranchTrueFalseTotal
my $x = &deflateInit() or die "Cannot create a deflation stream\n" 2 0 2
11 or die "Cannot create a deflation stream\n" ;
12  
13 2 my ($output, $status) ;
14 2 ▶while (<>)
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline ARGV)) 30 2 32
15 {
16 30 ($output, $status) = $x->deflate($_) ;
17  
18 30 ▶ $status == Z_OK
Branch: 1 branch
BranchTrueFalseTotal
$status == Z_OK() or die "deflation failed\n" 30 0 30
19 or die "deflation failed\n" ;
20  
21 30 print $output ;
22 }
23  
24 2 ($output, $status) = $x->flush() ;
25  
26 2 ▶$status == Z_OK
Branch: 1 branch
BranchTrueFalseTotal
$status == Z_OK() or die "deflation failed\n" 2 0 2
27 or die "deflation failed\n" ;
28  
29 2 print $output ;
« examples/io/gzip/gzgrep ↑ Summary examples/compress-zlib/gzgrep »