File Coverage

blib/lib/CPAN/Packager/Downloader/Role.pm
Criterion Covered Total %
statement 9 16 56.2
branch n/a
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 21 57.1


line stmt bran cond sub pod time code
1             package CPAN::Packager::Downloader::Role;
2 1     1   1296 use Mouse::Role;
  1         2  
  1         56  
3 1     1   904 use File::Basename;
  1         2  
  1         445  
4 1     1   1337 use CPAN::DistnameInfo;
  1         2234  
  1         589  
5              
6             requires 'set_cpan_mirrors';
7             requires 'download';
8              
9             sub analyze_distname_info {
10 0     0 0   my ($self, $archive, $where) = @_;
11 0           my $basename = fileparse($archive);
12 0           my $distro = CPAN::DistnameInfo->new($basename);
13 0           my $dist_name = $distro->dist;
14 0           my $version = $distro->version;
15 0           $dist_name =~ s/-/::/g;
16              
17             return {
18 0           tgz_path => $archive,
19             src_dir => $where,
20             version => $version,
21             dist_name => $dist_name
22             };
23             }
24              
25             1;
26              
27             __END__