File Coverage

blib/lib/IO/Compress/Brotli.pm
Criterion Covered Total %
statement 14 17 82.3
branch 0 2 0.0
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 20 26 76.9


line stmt bran cond sub pod time code
1             package IO::Compress::Brotli;
2              
3 2     2   182438 use 5.014000;
  2         17  
4 2     2   17 use strict;
  2         5  
  2         61  
5 2     2   10 use warnings;
  2         4  
  2         58  
6 2     2   1029 use parent qw/Exporter/;
  2         659  
  2         12  
7              
8 2     2   1029 use IO::Uncompress::Brotli;
  2         5  
  2         335  
9              
10             our @EXPORT = qw/bro/;
11             our @EXPORT_OK = @EXPORT;
12              
13             our $VERSION = '0.004001';
14              
15             my %BROTLI_ENCODER_MODE = ( generic => 0, text => 1, font => 2 );
16             sub mode {
17 0     0 1   my ($self, $mode) = @_;
18              
19             die "Invalid encoder mode"
20 0 0         unless $BROTLI_ENCODER_MODE{$mode};
21              
22 0           _mode($$self, $mode)
23             }
24              
25              
26             1;
27             __END__