Inkt/Role/CPANfile.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 27 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Dist::Inkt::Role::CPANfile;
2  
3 our $AUTHORITY = 'cpan:TOBYINK';
4 our $VERSION = '0.026';
5  
6 use Moose::Role;
7 use namespace::autoclean;
8  
9 after PopulateMetadata => sub
10 {
11 my $self = shift;
12
13 return unless $self->sourcefile('cpanfile')->exists;
14
15 $self->log('Processing cpanfile');
16
17 require Module::CPANfile;
18 my $file = Module::CPANfile->load( $self->sourcefile('cpanfile') );
19
20 my $orig = $self->metadata->prereqs;
21 $orig = CPAN::Meta::Prereqs->new($orig) unless blessed($orig);
22 my $merged = $file->prereqs->with_merged_prereqs($orig);
23 $self->metadata->{prereqs} = $merged->as_string_hash;
24 };
25  
26 1;