lib/App/Sandy/BGZF.pm

filter: Statementstmt 100% 3 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 4 / 4 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« lib/App/Sandy.pm ↑ Summary lib/App/Sandy/CLI.pm »
1 package App::Sandy::BGZF;
2 # ABSTRACT: Wrapper around Compress::BGZF::Writer in order
3 # to enable compression-level option
4  
5 1 ▶use App::Sandy::Base 'class';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 use Compress::BGZF::Writer;
7  
8 our $VERSION = '0.25'; # VERSION
9  
10 sub TIEHANDLE {
11 my ($class, $file, $level) = @_;
12 my $writer = Compress::BGZF::Writer->new($file);
13 $writer->set_level($level);
14 return $writer;
15 }
16  
17 sub new_filehandle {
18 my ($class, $file, $level) = @_;
19 open my $fh, "<", undef;
20 tie *$fh, $class, $file, $level
21 or croak "Failed to tie filehandle: $!";
22 return $fh;
23 }
24  
25 __END__
« lib/App/Sandy.pm ↑ Summary lib/App/Sandy/CLI.pm »