Inkt/Role/WriteMetaYML.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
Build_MetaYML
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Dist::Inkt::Role::WriteMetaYML;
2  
3 our $AUTHORITY = 'cpan:TOBYINK';
4 our $VERSION = '0.026';
5  
6 use Moose::Role;
7 use namespace::autoclean;
8  
9 after BUILD => sub {
10 my $self = shift;
11 unshift @{ $self->targets }, 'MetaYML';
12 };
13  
14 sub Build_MetaYML
15 {
16 my $self = shift;
17 my $file = $self->targetfile('META.yml');
18 $file->exists and return $self->log('Skipping %s; it already exists', $file);
19 $self->log('Writing %s', $file);
20 $self->rights_for_generated_files->{'META.yml'} ||= [
21 $self->_inherited_rights
22 ];
23 $self->metadata->save($file, { version => '1.4' });
24 }
25  
26 1;