File Coverage

examples/io/gzip/gzstream
Criterion Covered Total %
statement 10 10 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod n/a
total 14 15 93.3


line stmt bran cond sub pod time code
1             #!/usr/local/bin/perl
2              
3 1     1   36268 use strict ;
  1         3  
  1         45  
4 1     1   5 use warnings ;
  1         2  
  1         101  
5 1     1   711 use IO::Compress::Gzip qw(gzip $GzipError);
  1         5  
  1         2105  
6              
7 1 50       206512 gzip '-' => '-', Minimal => 1
8             or die "gzstream: $GzipError\n" ;
9              
10             #exit 0;
11              
12             __END__
13              
14             #my $gz = new IO::Compress::Gzip *STDOUT
15             my $gz = new IO::Compress::Gzip '-'
16             or die "gzstream: Cannot open stdout as gzip stream: $GzipError\n" ;
17              
18             while (<>) {
19             $gz->write($_)
20             or die "gzstream: Error writing gzip output stream: $GzipError\n" ;
21             }
22              
23             $gz->close
24             or die "gzstream: Error closing gzip output stream: $GzipError\n" ;