ManiacDownloader/_File.pm

filter: Statementstmt 61.7% 21 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod n/a totaltotal 61.9% 26 / 42 CC 1 SCAR 3.2
CC
1
Cov
62%
_set_url
2.0
_downloading_path
2.0
_resume_info_path
2.0
CRAP 1.4
« ManiacDownloader/_BytesDownloaded.pm ↑ Summary
1 package App::ManiacDownloader::_File;
2 3 $App::ManiacDownloader::_File::VERSION = '0.0.13';
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use MooX qw/late/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 ▶use File::Basename qw(basename);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 has '_url' => ( is => 'rw' );
12 3 has '_url_path' => ( isa => 'Str', is => 'rw' );
13 3 has '_url_basename' => ( isa => 'Str', is => 'rw' );
14 3 has '_is_ftp' => ( isa => 'Bool', is => 'rw' );
15  
16 sub _set_url
17 0 ▶{
Subroutine _set_url: not called CC=1 SCAR=6.9
18 0 my ( $self, $url_s ) = @_;
19  
20 0 my $url = URI->new($url_s);
21 0 $self->_url($url);
22  
23 0 my $url_path = $url->path();
24 0 $self->_url_path($url_path);
25  
26 0 $self->_url_basename( basename($url_path) );
27  
28 0 my $is_ftp = ( $url->scheme eq 'ftp' );
29 0 $self->_is_ftp($is_ftp);
30  
31 0 return;
32 }
33  
34 sub _downloading_path
35 0 ▶{
Subroutine _downloading_path: not called CC=1 SCAR=6.9
36 0 my ($self) = @_;
37  
38 0 return $self->_url_basename . '.mdown-intermediate';
39 }
40  
41 sub _resume_info_path
42 0 ▶{
Subroutine _resume_info_path: not called CC=1 SCAR=6.9
43 0 my ($self) = @_;
44  
45 0 return $self->_url_basename . '.mdown-resume.json';
46 }
47  
48 3 1;
49  
50 __END__
« ManiacDownloader/_BytesDownloaded.pm ↑ Summary