Inkt/Role/StaticInstall.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 12 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 41 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::StaticInstall;
2  
3 our $AUTHORITY = 'cpan:TOBYINK';
4 our $VERSION = '0.026';
5  
6 use Moose::Role;
7 use Path::Tiny 'path';
8 use namespace::autoclean;
9  
10 has no_static_install => (is => 'ro', default => sub { !!0 });
11  
12 after PopulateMetadata => sub
13 {
14 my $self = shift;
15
16 return if $self->no_static_install;
17  
18 return if $self->needs_conflict_check_code;
19 return if $self->needs_optional_features_code;
20 return if $self->sourcefile->child('meta/DYNAMIC_CONFIG.PL')->exists;
21 return if $self->sourcefile->child('bin')->exists;
22 return if $self->sourcefile->children( qr/\.(h|c|xs)$/ );
23
24 $self->log('Distribution seems suitable for static install');
25
26 $self->metadata->{x_static_install} //= 1;
27 };
28  
29 1;