| blib/lib/CPAN/Packager/BuilderFactory.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::BuilderFactory; | ||||||
| 2 | 1 | 1 | 8 | use strict; | |||
| 1 | 2 | ||||||
| 1 | 47 | ||||||
| 3 | 1 | 1 | 6 | use warnings; | |||
| 1 | 3 | ||||||
| 1 | 152 | ||||||
| 4 | |||||||
| 5 | # TODO decited Builder based on OS type | ||||||
| 6 | sub create { | ||||||
| 7 | 0 | 0 | 0 | my ( $class, $builder, $config ) = @_; | |||
| 8 | 0 | my $builder_class = join '::', | |||||
| 9 | ( 'CPAN', 'Packager', 'Builder', $builder ); | ||||||
| 10 | 0 | 0 | eval "require $builder_class;" or die "Can't load module $@"; ## no critic | ||||
| 11 | 0 | $builder_class->new( conf => $config ); | |||||
| 12 | } | ||||||
| 13 | |||||||
| 14 | 1; | ||||||
| 15 | |||||||
| 16 | __END__ |