File Coverage

blib/lib/IO/Compress/Brotli.pm
Criterion Covered Total %
statement 17 20 85.0
branch 0 2 0.0
condition n/a
subroutine 6 7 85.7
pod 1 1 100.0
total 24 30 80.0


line stmt bran cond sub pod time code
1             package IO::Compress::Brotli;
2              
3 2     2   358708 use 5.008000;
  2         9  
4 2     2   13 use strict;
  2         3  
  2         84  
5 2     2   10 use warnings;
  2         4  
  2         164  
6 2     2   533 use parent qw/Exporter/;
  2         407  
  2         12  
7              
8 2     2   176 use Carp qw/croak/;
  2         3  
  2         127  
9              
10 2     2   946 use IO::Uncompress::Brotli;
  2         7  
  2         460  
11              
12             our @EXPORT = qw/bro/;
13             our @EXPORT_OK = @EXPORT;
14              
15             our $VERSION = '0.019';
16              
17             my %BROTLI_ENCODER_MODE = ( generic => 0, text => 1, font => 2 );
18             sub mode {
19 0     0 1   my ($self, $mode) = @_;
20              
21             croak 'Invalid encoder mode'
22 0 0         unless $BROTLI_ENCODER_MODE{$mode};
23              
24 0           _mode($$self, $mode)
25             }
26              
27              
28             1;
29             __END__