File Coverage

blib/lib/CPAN/Packager/DownloaderFactory.pm
Criterion Covered Total %
statement 6 10 60.0
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 16 50.0


line stmt bran cond sub pod time code
1             package CPAN::Packager::DownloaderFactory;
2 1     1   6 use strict;
  1         2  
  1         38  
3 1     1   6 use warnings;
  1         2  
  1         6131  
4              
5             sub create {
6 0     0 0   my ( $class, $downloader, $config ) = @_;
7 0           my $builder_class = join '::',
8             ( 'CPAN', 'Packager', 'Downloader', $downloader );
9 0 0         eval "require $builder_class;" or die "Can't load module $@"; ## no critic
10 0           $builder_class->new;
11             }
12              
13             1;
14              
15             __END__