blib/lib/Cikl/Smrt/Decoders/Gzip.pm untested

filter: Statementstmt 0.0% 0 / 32 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 10 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 47 CC 1 SCAR 6.9
CC
1
Cov
0%
mime_types
2.0
decode
2.0
BEGIN
2.0
CRAP 2.0
1 package Cikl::Smrt::Decoders::Gzip;
2  
3 use strict;
4 use warnings;
5 use Cikl::Smrt::DecoderRole;
6 use Cikl::Smrt::AutoDecodableRole;
7 use namespace::autoclean;
8 use Mouse;
9 with 'Cikl::Smrt::DecoderRole';
10 with 'Cikl::Smrt::AutoDecodableRole';
11  
12 use IO::Uncompress::Gunzip qw/gunzip $GunzipError/;
13  
14 use constant MIME_TYPES => (
15 'application/x-gzip'
16 );
17 sub mime_types { return MIME_TYPES; }
18  
19 sub decode {
20 my $class = shift;
21 my $fh = shift;
22 my $gzfh = IO::Uncompress::Gunzip->new($fh, AutoClose => 1) or die($!);
23 return $gzfh;
24 }
25  
26 __PACKAGE__->meta->make_immutable();
27  
28 1;
29