Inkt/Profile/Simple.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 35 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::Profile::Simple;
2  
3 our $AUTHORITY = 'cpan:TOBYINK';
4 our $VERSION = '0.026';
5  
6 use Moose;
7 use Types::Standard qw( ArrayRef Str );
8 use namespace::autoclean;
9  
10 extends 'Dist::Inkt';
11  
12 with qw(
13 Dist::Inkt::Role::CPANfile
14 Dist::Inkt::Role::CopyStandardDocuments
15 Dist::Inkt::Role::CopyFiles
16 Dist::Inkt::Role::MetaProvides
17 Dist::Inkt::Role::MetaProvidesScripts
18 Dist::Inkt::Role::StaticInstall
19 Dist::Inkt::Role::WriteMakefilePL
20 Dist::Inkt::Role::WriteMetaJSON
21 Dist::Inkt::Role::WriteMetaYML
22 Dist::Inkt::Role::WriteDOAPLite
23 Dist::Inkt::Role::WriteLICENSE
24 Dist::Inkt::Role::WriteREADME
25 Dist::Inkt::Role::WriteINSTALL
26 );
27  
28 has abstract => (
29 is => 'ro',
30 isa => Str,
31 predicate => 'has_abstract',
32 );
33  
34 has author => (
35 is => 'ro',
36 isa => ArrayRef[Str],
37 predicate => 'has_author',
38 );
39  
40 has license => (
41 is => 'ro',
42 isa => ArrayRef[Str],
43 predicate => 'has_license',
44 );
45  
46 around _build_metadata => sub
47 {
48 my $next = shift;
49 my $self = shift;
50 my $meta = $self->$next(@_);
51
52 $meta->{abstract} = $self->abstract if $self->has_abstract;
53 $meta->{author} = $self->author if $self->has_author;
54 $meta->{license} = $self->license if $self->has_license;
55
56 return $meta;
57 };
58  
59 1;