| 1 | package Dist::Zilla::PluginBundle::Author::GETTY; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # ABSTRACT: BeLike::GETTY when you build your dists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 30 | our $VERSION = '0.328'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 30 | ▶ | use Moose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 30 | ▶ | use Dist::Zilla; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 30 | ▶ | use File::Spec; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 30 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | # Defaults published for any [@Author::GETTY::Docker / ...] subsections that | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | # appear after [@Author::GETTY] in dist.ini. The subsection bundle reads from | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | # here when no explicit value is set on the subsection itself. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 30 | our %DOCKER_DEFAULTS; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | # The same for [@Author::GETTY::Binary / ...] subsections, from the binary_* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | # keys. has_release says whether the GitHub release plugin is active. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 30 | our %BINARY_DEFAULTS; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 91 | ▶ | sub bundle_config { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
bundle_config: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 91 | my ($class, $section) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 91 | my $self = $class->new($section); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | %DOCKER_DEFAULTS = ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | image => $self->payload->{docker_image}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | tags => $self->payload->{docker_tags}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | local => $self->payload->{docker_local}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 91 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 91 | %BINARY_DEFAULTS = $self->_binary_defaults; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 91 | $self->configure; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 87 | return @{ $self->plugins }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 30 | ▶ | use Dist::Zilla::PluginBundle::Basic; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 30 | ▶ | use Dist::Zilla::PluginBundle::Git; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 30 | ▶ | use Dist::Zilla::PluginBundle::Git::VersionManager; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | has manual_version => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 170 | ▶ | default => sub { $_[0]->payload->{manual_version} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | has major_version => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | isa => 'Int', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 6 | ▶ | default => sub { $_[0]->payload->{version} || 0 }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | has author => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 178 | ▶ | default => sub { $_[0]->payload->{author} || 'GETTY' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | has authority => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 164 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 164 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 164 | ▶ | my $id = $self->payload->{authority} || $self->author; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$self->payload->{'authority'} || $self->author
MC/DC0%0/2
$self->payload->{'authority'} || $self->author
$self->payload->{'authority'}
$self->author
Truth table66%2/3
A || B
A= $self->payload->{'authority'}B= $self->author
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 164 | $id =~ s/\Acpan://i; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 164 | return 'cpan:'.$id; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | has installrelease_command => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 166 | ▶ | default => sub { $_[0]->payload->{installrelease_command} || 'cpanm .' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | has no_installrelease => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 170 | ▶ | default => sub { $_[0]->payload->{no_installrelease} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | has release_branch => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 170 | ▶ | default => sub { $_[0]->payload->{release_branch} || 'main' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | has tag_format => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 173 | ▶ | default => sub { $_[0]->payload->{tag_format} || '%v' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | # Git::NextVersion version_regexp matching the tags tag_format produces: the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | # literal parts quoted, the single %v as the capture. Git::NextVersion's own | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | # default ^v(.+)$ misses bare %v tags, so a dist without $VERSION in its | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | # source would restart at first_version (0.001). Undef (keep that default) when | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | # tag_format has any other %-code or not exactly one %v. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | has _version_regexp => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | isa => 'Maybe[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 158 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 158 | my @literals = split /%v/, $_[0]->tag_format, -1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 158 | ▶ | return undef unless @literals == 2 && !grep { /%/ } @literals; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
@literals == 2 and not grep({/%/;} @literals)
MC/DC50%1/2
@literals == 2 and not grep({/%/;} @literals)
@literals == 2
not grep({/%/;} @literals)
Truth table66%2/3
A and not(B)
A= @literals == 2B= not grep({/%/;} @literals)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 157 | return '^'.quotemeta($literals[0]).'(\d[\d._]*)'.quotemeta($literals[1]).'$'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | has deprecated => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 170 | ▶ | default => sub { $_[0]->payload->{deprecated} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | has no_github => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 184 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 184 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 184 | ▶ | return $self->payload->{no_github} if defined $self->payload->{no_github}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 136 | ▶ | return $self->_has_github_remote ? 0 : 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | has no_github_release => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 60 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | 60 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 60 | ▶ | return $self->payload->{no_github_release} if defined $self->payload->{no_github_release}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 16 | ▶ | return $self->_has_github_remote ? 0 : 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | # Remote URLs of the repository around the cwd (which dzil sets to the dist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | # root), origin first, as a list of [ name, url ]. Asks git instead of reading | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | # .git/config, so linked worktrees and submodules (where .git is a file) work. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | # Empty when there is no repository, no git, or no remote. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 556 | ▶ | sub _remote_urls { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_remote_urls: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 556 | my @remotes; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 556 | my $out = _git_output('config', '--get-regexp', '^remote\..*\.url$'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 556 | ▶ | return () unless defined $out; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 192 | for my $line (split /\n/, $out) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 223 | ▶ | my ($key, $url) = $line =~ m{^remote\.(.+)\.url\s+(\S+)} or next; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 223 | push @remotes, [ $key, $url ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 192 | return ( (grep { $_->[0] eq 'origin' } @remotes), (grep { $_->[0] ne 'origin' } @remotes) ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | # Output of `git ARGS` in the cwd; undef when git cannot be started or exits | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | # non-zero. git runs without a shell: cmd.exe, the shell of backticks on | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | # Windows, knows neither ' quoting nor 2>/dev/null. Its STDERR goes to the null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | # device. Author::GETTY::GiteaMeta has the same helper. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 556 | ▶ | sub _git_output { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_git_output: called CC=6 SCAR=18.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 556 | my (@args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 556 | ▶ | open my $stderr, '>&', \*STDERR or die "cannot dup STDERR: $!\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 556 | my $fh; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 556 | ▶ | my $started = open(STDERR, '>', File::Spec->devnull) && open($fh, '-|', 'git', @args); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
open(STDERR, '>', 'File::Spec'->devnull) && open($fh, '-|', 'git', @args)
MC/DC50%1/2
open(STDERR, '>', 'File::Spec'->devnull) && open($fh, '-|', 'git', @args)
open(STDERR, '>', 'File::Spec'->devnull)
open($fh, '-|', 'git', @args)
Truth table66%2/3
A && B
A= open(STDERR, '>', 'File::Spec'->devnull)B= open($fh, '-|', 'git', @args)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 556 | ▶ | open STDERR, '>&', $stderr or die "cannot restore STDERR: $!\n"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 556 | ▶ | return undef unless $started; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 555 | my $out = do { local $/; <$fh> }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 555 | ▶ | return close($fh) ? $out : undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | # True if any remote URL points at github.com. Used to auto-disable the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | # GitHub-specific plugins when the dist lives somewhere else (GitLab, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | # Codeberg, a private Gitea, no remote at all, ...). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | has _has_github_remote => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 139 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 139 | ▶ | return (grep { $_->[1] =~ m{\bgithub\.com\b}i } _remote_urls()) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | # True if the repository has any remote at all. Without one there is no URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | # for [Repository] to report: it would only fall back to `git svn info`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | has _has_remote => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 119 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 119 | my @remotes = _remote_urls(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | 119 | ▶ | return @remotes ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | has gitea => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 33 | ▶ | default => sub { $_[0]->payload->{gitea} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | # Known Gitea/Forgejo forge hosts for this author — these get GiteaMeta without | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | # any per-dist flag: Codeberg (Forgejo) and the author's own instance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | 30 | my @KNOWN_GITEA_HOSTS = qw( codeberg.org src.ci ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | # Host of the dist's origin remote, or of the first remote if there is no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | # origin (GiteaMeta is pointed at the same remote and wants the hosts to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | # match). Undef when there is no remote. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | has _remote_host => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | isa => 'Maybe[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | 124 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 124 | ▶ | my ($remote) = _remote_urls() or return undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 34 | my ($host) = $remote->[1] =~ m{(?: ^\w+:// (?:[^/\@]+\@)? | ^[^/\@]+\@ ) ([^/:]+)}x; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | 34 | return $host; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | # Name of the same remote: origin, or the first remote if there is no origin. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | # Undef when there is no remote. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | has _remote_name => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | isa => 'Maybe[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | 170 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | 170 | ▶ | my ($remote) = _remote_urls() or return undef; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 77 | return $remote->[0]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | # True when the dist should get Gitea/Forgejo metadata (Author::GETTY::GiteaMeta) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | # instead of the generic [Repository]: a known Gitea host, or an explicit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | # gitea = 1 flag. Requires a usable remote host and no GitHub remote (GitHub | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | # always wins). Additive — GitHub dists are unaffected. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | has _is_gitea_remote => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 124 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 124 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 124 | ▶ | return 0 unless $self->no_github; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 123 | ▶ | my $host = $self->_remote_host or return 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 33 | ▶ | return 1 if $self->gitea; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 32 | ▶ | return ( grep { lc($host) eq $_ } @KNOWN_GITEA_HOSTS ) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | has no_cpan => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 180 | ▶ | default => sub { $_[0]->payload->{no_cpan} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | has no_changes => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 170 | ▶ | default => sub { $_[0]->payload->{no_changes} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | has commit_files_after_release => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 160 | ▶ | default => sub { defined $_[0]->payload->{commit_files_after_release} ? $_[0]->payload->{commit_files_after_release} : [] }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | has no_install => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 172 | ▶ | default => sub { $_[0]->payload->{no_install} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | has no_makemaker => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 171 | ▶ | default => sub { ($_[0]->payload->{no_makemaker} || $_[0]->is_alien || $_[0]->xs || $_[0]->xs_alien) ? 1 : 0 }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=5 SCAR=16.1
Branch: 1 branch
Condition100%9/9
$_[0]->payload->{"no_makemaker"} or $_[0]->is_alien or $_[0]->xs or $_[0]->xs_alien
$_[0]->payload->{"no_makemaker"} or $_[0]->is_alien or $_[0]->xs
$_[0]->payload->{"no_makemaker"} or $_[0]->is_alien
MC/DC100%4/4
$_[0]->payload->{"no_makemaker"} or $_[0]->is_alien or $_[0]->xs or $_[0]->xs_alien
$_[0]->payload->{"no_makemaker"}
$_[0]->is_alien
$_[0]->xs
$_[0]->xs_alien
Truth table100%5/5
A or B or C or D
A= $_[0]->payload->{"no_makemaker"}B= $_[0]->is_alienC= $_[0]->xsD= $_[0]->xs_alien
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | has alien_build => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | 170 | ▶ | default => sub { $_[0]->payload->{alien_build} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | has no_podweaver => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | 164 | ▶ | default => sub { $_[0]->payload->{no_podweaver} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | has include_readme => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 175 | ▶ | default => sub { $_[0]->payload->{include_readme} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | has generate_license => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 171 | ▶ | default => sub { $_[0]->payload->{generate_license} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | has no_license => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 171 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | 171 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | 171 | ▶ | return $self->payload->{no_license} if defined $self->payload->{no_license}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 168 | ▶ | return ($self->no_cpan && !$self->generate_license) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_cpan and not $self->generate_license
MC/DC100%2/2
$self->no_cpan and not $self->generate_license
$self->no_cpan
not $self->generate_license
Truth table100%3/3
A and not(B)
A= $self->no_cpanB= not $self->generate_license
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | has xs => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 170 | ▶ | default => sub { $_[0]->payload->{xs} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | has is_task => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 174 | ▶ | default => sub { $_[0]->payload->{task} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | has is_alien => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | 170 | ▶ | default => sub { $_[0]->alien_repo ? 1 : 0 }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | has weaver_config => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | 170 | ▶ | default => sub { $_[0]->payload->{weaver_config} || '@Author::GETTY' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | has irc => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 170 | ▶ | default => sub { $_[0]->payload->{irc} || '' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | has irc_server => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 1 | ▶ | default => sub { $_[0]->payload->{irc_server} || 'irc.perl.org' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | has irc_user => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | 5 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | 5 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 5 | ▶ | return $self->payload->{irc_user} if $self->payload->{irc_user}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 3 | ▶ | return 'Getty' if $self->author eq 'GETTY'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | 1 | return ''; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | has adoptme => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | 173 | ▶ | default => sub { $_[0]->payload->{adoptme} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | has xs_alien => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | 170 | ▶ | default => sub { $_[0]->payload->{xs_alien} || '' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | has xs_object => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 1 | ▶ | default => sub { $_[0]->payload->{xs_object} || '' }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | has version_finder => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 175 | ▶ | default => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 175 | my ( $self ) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | return $self->payload->{version_finder} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | 175 | ▶ | if defined $self->payload->{version_finder}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | # A dist that never reaches CPAN has no per-package indexing to satisfy, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | # so one $VERSION in the main module is all it needs. CPAN dists version | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | # installed modules and Perl executables, but never parse other executables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | # (for example Bash scripts) with the PPI-based version plugins. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 169 | ▶ | return $self->no_cpan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | ? [':MainModule'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | : [':InstallModules', ':PerlExecFiles']; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | 30 | my @gather_array_options = qw( exclude_filename exclude_match ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | 30 | my @gather_array_attributes = map { 'gather_'.$_ } @gather_array_options; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | 30 | for my $attr (@gather_array_attributes) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | has $attr => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 345 | ▶ | default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : [] }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | 60 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | has gather_include_dotfiles => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | 170 | ▶ | default => sub { exists $_[0]->payload->{gather_include_dotfiles} ? $_[0]->payload->{gather_include_dotfiles} : 1 }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | has gather_include_untracked => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | isa => 'Bool', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | 170 | ▶ | default => sub { $_[0]->payload->{gather_include_untracked} }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 30 | my @run_options = qw( after_build before_build before_release release after_release test ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | 30 | my @run_ways = qw( run run_if_trial run_no_trial run_if_release run_no_release ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | 30 | my @run_attributes = map { my $o = $_; map { join('_',$_,$o) } @run_ways } @run_options; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | 30 | for my $attr (@run_attributes) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | has $attr => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | 5100 | ▶ | default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : [] }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | 900 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | 30 | my @alien_options = qw( msys repo name bins pattern_prefix pattern_suffix pattern_version pattern autoconf_with_pic isolate_dynamic version_check ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | 30 | my @alien_array_options = qw( build_command install_command test_command ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | 30 | my @alien_attributes = map { 'alien_'.$_ } @alien_options; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | 30 | my @alien_array_attributes = map { 'alien_'.$_ } @alien_array_options; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 | 30 | for my $attr (@alien_attributes) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | has $attr => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | isa => 'Str', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 | 200 | ▶ | default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : "" }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 | 330 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | 30 | for my $attr (@alien_array_attributes) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | has $attr => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | 9 | ▶ | default => sub { defined $_[0]->payload->{$attr} ? $_[0]->payload->{$attr} : [] }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | 90 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | has alien_bin_requires => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | is => 'ro', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | lazy => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 | 3 | ▶ | default => sub { defined $_[0]->payload->{alien_bin_requires} ? $_[0]->payload->{alien_bin_requires} : [] }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | 30 | ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | 77 | ▶ | sub mvp_multivalue_args { @run_attributes, @gather_array_attributes, 'alien_bin_requires', @alien_array_attributes, 'commit_files_after_release', 'version_finder', qw(binary binary_modules binary_require binary_platforms) } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
mvp_multivalue_args: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 | 345 | ▶ | sub effective_gather_exclude_filename { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
effective_gather_exclude_filename: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | 345 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 | 345 | my @exclude = @{ $self->gather_exclude_filename }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | 345 | ▶ | push @exclude, 'README.md' unless $self->include_readme; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 | 345 | ▶ | push @exclude, '.karr' unless $self->no_cpan; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | 345 | my %seen; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | 345 | return [ grep { !$seen{$_}++ } @exclude ]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | # True when docker_image makes the bundle add the default Docker subsection. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 | 176 | ▶ | sub _docker_default { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_docker_default: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 | 176 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 | return defined $self->payload->{docker_image} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 | && length $self->payload->{docker_image} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | 176 | ▶ | && ($self->payload->{docker_default} // 1); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition87%7/8
defined $self->payload->{'docker_image'} && length $self->payload->{'docker_image'} && ($self->payload->{'docker_default'} // 1)
defined $self->payload->{"docker_image"} and length $self->payload->{"docker_image"}
$self->payload->{"docker_default"} // 1
MC/DC66%2/3
defined $self->payload->{'docker_image'} && length $self->payload->{'docker_image'} && ($self->payload->{'docker_default'} // 1)
defined $self->payload->{"docker_image"}
length $self->payload->{"docker_image"}
$self->payload->{"docker_default"}
Truth table75%3/4
A and B && C
A= defined $self->payload->{"docker_image"}B= length $self->payload->{"docker_image"}C= $self->payload->{"docker_default"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 | # The binary_* keys, as the defaults of the Binary subsections (their own | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | # names, without the prefix). Only those that are set. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | 91 | ▶ | sub _binary_defaults { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_binary_defaults: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | 91 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | 91 | my $p = $self->payload; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | 91 | my %d; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | 91 | for my $k (qw( modules require platforms pp_args verify smoke prepare )) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 | 637 | ▶ | $d{$k} = $p->{"binary_$k"} if defined $p->{"binary_$k"}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | 91 | ▶ | $d{has_release} = ($self->no_github || $self->no_github_release) ? 0 : 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_github or $self->no_github_release
MC/DC100%2/2
$self->no_github or $self->no_github_release
$self->no_github
$self->no_github_release
Truth table100%3/3
A or B
A= $self->no_githubB= $self->no_github_release
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 | 91 | return %d; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | # The run_*_<phase> keys of one phase, as the options of its Run::<Phase> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | # plugin (their own names, without the phase suffix). Only those that are set. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | 1032 | ▶ | sub _run_config { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_run_config: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | 1032 | my ($self, $phase) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | 1032 | my %run; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | 1032 | for my $way (@run_ways) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 | 5160 | my $attr = $way.'_'.$phase; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | 5160 | ▶ | $run{$way} = $self->$attr if @{ $self->$attr }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 | 1032 | return \%run; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | # The binary names declared with binary = ..., whitespace split. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | 202 | ▶ | sub _binaries { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_binaries: called CC=4 SCAR=14.3
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | 202 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | 202 | my $b = $self->payload->{binary}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | 202 | ▶ | return () unless defined $b; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | 71 | ▶ | return map { split /\s+/ } grep { defined && length } ref $b eq 'ARRAY' ? @$b : ($b); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $_ && length $_
MC/DC0%0/2
defined $_ && length $_
defined $_
length $_
Truth table33%1/3
A && B
A= defined $_B= length $_
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | 174 | ▶ | sub configure { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
configure: called CC=81 SCAR=44.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | 174 | my ($self) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | 174 | ▶ | die "[\@Author::GETTY] you must not specify both weaver_config and is_task\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->is_task and $self->weaver_config ne "\@Author::GETTY"
MC/DC100%2/2
$self->is_task and $self->weaver_config ne "\@Author::GETTY"
$self->is_task
$self->weaver_config ne "\@Author::GETTY"
Truth table100%3/3
A and B
A= $self->is_taskB= $self->weaver_config ne "\@Author::GETTY"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | if $self->is_task and $self->weaver_config ne '@Author::GETTY'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | 173 | ▶ | die "[\@Author::GETTY] you must not specify both author and no_cpan\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_cpan and $self->author ne "GETTY"
MC/DC100%2/2
$self->no_cpan and $self->author ne "GETTY"
$self->no_cpan
$self->author ne "GETTY"
Truth table100%3/3
A and B
A= $self->no_cpanB= $self->author ne "GETTY"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | if $self->no_cpan and $self->author ne 'GETTY'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | 172 | ▶ | die "[\@Author::GETTY] no_install can't be used together with no_makemaker\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_install and $self->no_makemaker
MC/DC100%2/2
$self->no_install and $self->no_makemaker
$self->no_install
$self->no_makemaker
Truth table100%3/3
A and B
A= $self->no_installB= $self->no_makemaker
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | if $self->no_install and $self->no_makemaker; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | 171 | ▶ | die "[\@Author::GETTY] you must not specify both no_license and generate_license\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_license and $self->generate_license
MC/DC100%2/2
$self->no_license and $self->generate_license
$self->no_license
$self->generate_license
Truth table100%3/3
A and B
A= $self->no_licenseB= $self->generate_license
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | if $self->no_license and $self->generate_license; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | $self->add_plugins([ 'Git::GatherDir' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | include_dotfiles => $self->gather_include_dotfiles, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | include_untracked => $self->gather_include_untracked, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | 170 | ▶ | scalar @{ $self->effective_gather_exclude_filename } > 0 ? ( exclude_filename => $self->effective_gather_exclude_filename ) : (), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | 170 | ▶ | scalar @{$self->gather_exclude_match} > 0 ? ( exclude_match => $self->gather_exclude_match ) : (), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | }]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | # Snapshot the agent context (.claude/.codex/CLAUDE.md/...) into the build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 | # under misc/agent-context/ for build provenance (not installed). Reads from | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | # disk, so it also captures skilletor-installed (git-ignored) skills. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 | 170 | $self->add_plugins('GatherAgentContext'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | 170 | my @removes = ('GatherDir','PruneCruft'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 | # ConfirmRelease is always added again further down (behind InstallCheck, or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | # on its own), so the Filter drops the one @Basic carries. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 | 170 | ▶ | my $install_check = !($self->no_installrelease || $self->is_alien); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition100%3/3
$self->no_installrelease || $self->is_alien
MC/DC100%2/2
$self->no_installrelease || $self->is_alien
$self->no_installrelease
$self->is_alien
Truth table100%3/3
A || B
A= $self->no_installreleaseB= $self->is_alien
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | 170 | push @removes, 'ConfirmRelease'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | 170 | ▶ | if ($self->no_cpan || $self->no_makemaker) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_cpan or $self->no_makemaker
MC/DC100%2/2
$self->no_cpan or $self->no_makemaker
$self->no_cpan
$self->no_makemaker
Truth table100%3/3
A or B
A= $self->no_cpanB= $self->no_makemaker
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | 18 | ▶ | push @removes, 'UploadToCPAN' if $self->no_cpan; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | 18 | ▶ | push @removes, 'MakeMaker' if $self->no_makemaker; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | # LICENSE is a committed repository file, gathered from git like any other | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 | # source file, so that the hosting platform detects the licence. @Basic's | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | # License plugin would generate a second one and abort the build. With | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | # no_license nothing generates a LICENSE and nothing demands one. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 | 170 | ▶ | push @removes, 'License' unless $self->generate_license; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 | 170 | $self->add_bundle('Filter' => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | -bundle => '@Basic', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | -remove => [@removes], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | # Test-install the tarball before the upload: after TestRelease, before the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 | # question whether to release. ConfirmRelease keeps its place either way. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 | 170 | ▶ | $self->add_plugins('Author::GETTY::InstallCheck') if $install_check; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | 170 | $self->add_plugins('ConfirmRelease'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | 170 | ▶ | $self->add_plugins('LicenseFile') unless $self->generate_license || $self->no_license; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->generate_license or $self->no_license
MC/DC100%2/2
$self->generate_license or $self->no_license
$self->generate_license
$self->no_license
Truth table100%3/3
A or B
A= $self->generate_licenseB= $self->no_license
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | 170 | ▶ | if ($self->no_install) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | 1 | $self->add_plugins('MakeMaker::SkipInstall'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | 170 | ▶ | if ($self->xs) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | 1 | $self->add_plugins(qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | ModuleBuildTiny | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | )); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 | 170 | ▶ | if ($self->alien_build) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 | 1 | $self->add_plugins('AlienBuild'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 | 170 | ▶ | if ($self->xs_alien) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 | 1 | my $alien = $self->xs_alien; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 | # Get the XS object name from xs_object or derive from alien name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | 1 | my $xs_object = $self->xs_object; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 | 1 | ▶ | unless ($xs_object) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | # Derive from Alien module name (e.g., Alien::TinyCDB -> TinyCDB) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | 1 | $xs_object = $alien; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | 1 | $xs_object =~ s/.*:://; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 | $self->add_plugins([ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | 1 | 'MakeMaker::Awesome' => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 | header => "use $alien;", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | WriteMakefile_arg => [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | "LIBS => [ $alien->libs ]", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | "INC => $alien->cflags", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | "OBJECT => '${xs_object}\$(OBJ_EXT)'", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | 170 | ▶ | if ($self->deprecated) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | 1 | $self->add_plugins(qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | Deprecated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | )); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | 170 | ▶ | unless ($self->manual_version) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 | 164 | ▶ | if ($self->is_task) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | my $v_format = q<{{cldr('yyyyMMdd')}}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | 6 | ▶ | . sprintf('.%03u', ($ENV{N} || 0)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$ENV{'N'} || 0
MC/DC0%0/1
$ENV{'N'} || 0
$ENV{'N'}
Truth table50%1/2
A
A= $ENV{'N'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | 6 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | AutoVersion => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | major => $self->major_version, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | format => $v_format, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | # Git::VersionManager handles versioning for non-task distributions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 656 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 657 | 170 | for (@run_options) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | 1020 | my $net = $_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | 1020 | my $run = $self->_run_config($_); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 660 | 1020 | ▶ | if (%$run) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 661 | 23 | my $plugin = join('',map { ucfirst($_) } split(/_/,$_)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | 23 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | 'Run::'.$plugin => $run, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 664 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 665 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 666 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 667 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 668 | # PkgVersion only when NOT using @Git::VersionManager (which uses RewriteVersion) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | 170 | ▶ | if ($self->is_task || $self->manual_version) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->is_task or $self->manual_version
MC/DC100%2/2
$self->is_task or $self->manual_version
$self->is_task
$self->manual_version
Truth table100%3/3
A or B
A= $self->is_taskB= $self->manual_version
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | $self->add_plugins( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 671 | 12 | ▶ | @{ $self->version_finder } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 672 | ? [ 'PkgVersion' => { finder => $self->version_finder } ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 673 | : 'PkgVersion' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 676 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | 170 | $self->add_plugins(qw( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | MetaConfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | MetaJSON | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 680 | PodSyntaxTests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | )); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 682 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | # The generated test looks for a heading of the version being released in | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | # Changes. NextRelease writes it (for a task too, see below), but not with | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 685 | # no_changes (blank format), so the test could only fail there. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | 170 | ▶ | $self->add_plugins('Test::ChangesHasContent') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | unless $self->no_changes; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 689 | 170 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | 'MetaProvides::Package' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | inherit_version => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 692 | inherit_missing => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | meta_noindex => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 695 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | # Repository metadata. Three-way, additive: GitHub dists keep GithubMeta | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | # exactly as before; Gitea/Forgejo dists (a known host, or gitea = 1) get | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | # proper forge URLs via Author::GETTY::GiteaMeta built for the actual remote | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | # host; anything else with a remote falls back to the generic Repository. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | # Without any remote there is no URL to report, and Repository would only | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | # run `git svn info` ("git: 'svn' is not a git command"), so none is added. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | # Each of the three reads a single remote, origin by default, so a | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | # repository with no origin points them at its first remote (the one | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | # _remote_host comes from). With origin nothing is passed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | 170 | my $remote = $self->_remote_name; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | 170 | ▶ | undef $remote if defined $remote && $remote eq 'origin'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $remote and $remote eq "origin"
MC/DC100%2/2
defined $remote and $remote eq "origin"
defined $remote
$remote eq "origin"
Truth table100%3/3
A and B
A= defined $remoteB= $remote eq "origin"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | 170 | ▶ | if (!$self->no_github) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | 54 | ▶ | $self->add_plugins([ 'GithubMeta' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | issues => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | (defined $remote ? (remote => $remote) : ()), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | } ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 714 | elsif ($self->_is_gitea_remote) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | 7 | ▶ | $self->add_plugins([ 'Author::GETTY::GiteaMeta' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 716 | issues => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | host => $self->_remote_host, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | (defined $remote ? (remote => $remote) : ()), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | } ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | elsif ($self->_has_remote) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | 20 | ▶ | $self->add_plugins(defined $remote | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | ? [ 'Repository' => { git_remote => $remote } ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | : 'Repository'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 727 | # Add IRC metadata if configured | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | 170 | ▶ | if ($self->irc) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 729 | 1 | my $channel = $self->irc; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 730 | 1 | ▶ | $channel = '#' . $channel unless $channel =~ /^#/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | 1 | my $irc_url = 'irc://' . $self->irc_server . '/' . $channel; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | 1 | my %irc_resources = ( 'x_IRC' => $irc_url ); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 733 | 1 | ▶ | $irc_resources{'x_IRC_user'} = $self->irc_user if $self->irc_user; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 734 | 1 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | 'MetaResources' => \%irc_resources | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 737 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 738 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 739 | # Add adoptme metadata if configured | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 740 | 170 | ▶ | if ($self->adoptme) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 741 | 1 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | 'MetaResources' => 'adoptme' => { 'x_adoptme' => 1 } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 744 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 745 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 746 | 170 | ▶ | if ($self->is_alien) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | 3 | my %alien_values; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 748 | 3 | for (@alien_options) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | 33 | my $func = 'alien_'.$_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | 33 | ▶ | $alien_values{$_} = $self->$func if defined $self->$func && $self->$func ne ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $self->$func and $self->$func ne ""
MC/DC50%1/2
defined $self->$func and $self->$func ne ""
defined $self->$func
$self->$func ne ""
Truth table66%2/3
A and B
A= defined $self->$funcB= $self->$func ne ""
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 751 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | 3 | for (@alien_array_options) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 753 | 9 | my $func = 'alien_'.$_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 754 | 9 | ▶ | $alien_values{$_} = $self->$func if @{ $self->$func }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | 3 | ▶ | if(@{ $self->alien_bin_requires }) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | 0 | $alien_values{bin_requires} = $self->alien_bin_requires; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | $self->add_plugins([ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | 3 | 'Alien' => \%alien_values, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 764 | 170 | ▶ | unless ($self->no_installrelease || $self->is_alien) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_installrelease or $self->is_alien
MC/DC100%2/2
$self->no_installrelease or $self->is_alien
$self->no_installrelease
$self->is_alien
Truth table100%3/3
A or B
A= $self->no_installreleaseB= $self->is_alien
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | 166 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | 'InstallRelease' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 767 | install_command => $self->installrelease_command, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 770 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | 170 | ▶ | unless (!$self->is_alien || $self->no_installrelease) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not $self->is_alien or $self->no_installrelease
MC/DC50%1/2
not $self->is_alien or $self->no_installrelease
not $self->is_alien
$self->no_installrelease
Truth table66%2/3
not(A) or B
A= not $self->is_alienB= $self->no_installrelease
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | 3 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | 'Run::Test' => 'AlienInstallTestHack' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | run_if_release => ['./Build install'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | 170 | ▶ | unless ($self->no_cpan) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | 157 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | 'Authority' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | ':version' => '1.009', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | authority => $self->authority, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | do_munging => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | do_metadata => 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 787 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 788 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 789 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 790 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 791 | # @Basic's UploadToCPAN is the Releaser that no_cpan removes, and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | # Dist::Zilla refuses to release without any Releaser. Unless the dist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | # brings its own (the Docker default, or the Run::Release that any | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | # run_*_release adds), fake one so the rest of the flow (changelog, tag, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 795 | # version bump, push) runs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 796 | 170 | ▶ | if ($self->no_cpan && !$self->_docker_default && !%{ $self->_run_config('release') }) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
$self->no_cpan and not $self->_docker_default and not %{$self->_run_config("release");}
$self->no_cpan and not $self->_docker_default
MC/DC100%3/3
$self->no_cpan and not $self->_docker_default and not %{$self->_run_config("release");}
$self->no_cpan
not $self->_docker_default
not %{$self->_run_config("release");}
Truth table100%4/4
A and not(B) and not(C)
A= $self->no_cpanB= not $self->_docker_defaultC= not %{$self->_run_config("release");}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 797 | 10 | $self->add_plugins('FakeRelease'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 799 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | $self->add_plugins([ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | 170 | 'Git::CheckFor::CorrectBranch' => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | release_branch => $self->release_branch, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 804 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | 170 | $self->add_plugins('Prereqs::FromCPANfile'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | # NextRelease is handled by @Git::VersionManager, except for a task, which | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | # uses @Git: it stamps Changes here, with the same format and time zone as | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | # @Git::VersionManager (changes_version_columns 10). It has to come before | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | # @Git, so that its Git::Commit sees the stamped Changes (allow_dirty), and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | # before Author::GETTY::GitHubRelease, which reads the release notes from Changes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | 170 | ▶ | if ($self->is_task && !$self->no_changes) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->is_task and not $self->no_changes
MC/DC100%2/2
$self->is_task and not $self->no_changes
$self->is_task
not $self->no_changes
Truth table100%3/3
A and not(B)
A= $self->is_taskB= not $self->no_changes
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | 3 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | 'NextRelease' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | ':version' => '5.033', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | time_zone => 'UTC', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | format => q<%-8v %{yyyy-MM-dd HH:mm:ss'Z'}d%{ (TRIAL RELEASE)}T>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 819 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 820 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 821 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 822 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 823 | 170 | ▶ | if ($self->is_task) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 824 | 6 | $self->add_plugins('TaskWeaver'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 826 | 164 | ▶ | unless ($self->no_podweaver) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | 163 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | PodWeaver => { config_plugin => $self->weaver_config } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 829 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | 170 | ▶ | unless ($self->is_task || $self->manual_version) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->is_task or $self->manual_version
MC/DC100%2/2
$self->is_task or $self->manual_version
$self->is_task
$self->manual_version
Truth table100%3/3
A or B
A= $self->is_taskB= $self->manual_version
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 834 | $self->add_bundle('@Git::VersionManager' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | 'RewriteVersion::Transitional.fallback_version_provider' => 'Git::NextVersion', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | 'Git::Tag.tag_format' => $self->tag_format, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | # RewriteVersion::Transitional hands this on to its Git::NextVersion. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | defined $self->_version_regexp | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | ? ( 'RewriteVersion::Transitional.version_regexp' => $self->_version_regexp ) : (), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | # The configured default bumps :InstallModules and :PerlExecFiles, but | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 841 | # @Git::VersionManager's post-release commit only allows ^lib/.*\.pm$ to be | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 842 | # dirty. Without this, bumped Perl executables under bin/ are left behind | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 843 | # as uncommitted changes, so their source stays one version behind lib/. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 844 | 'post-release commit.allow_dirty_match' => [ '^bin/' ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 845 | $self->no_changes ? ( 'NextRelease.format' => '' ) : (), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 846 | 158 | ▶ | @{ $self->commit_files_after_release } ? ( commit_files_after_release => $self->commit_files_after_release ) : (), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | 158 | ▶ | @{ $self->version_finder } ? ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 848 | 'RewriteVersion::Transitional.finder' => $self->version_finder, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | 'BumpVersionAfterRelease.finder' => $self->version_finder, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | ) : (), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 851 | }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | 158 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | 'Git::Push' => { push_to => 'origin' } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 856 | 12 | $self->add_bundle('@Git' => { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | tag_format => $self->tag_format, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | push_to => [ qw(origin) ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | 170 | ▶ | unless ($self->no_github || $self->no_github_release) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_github or $self->no_github_release
MC/DC100%2/2
$self->no_github or $self->no_github_release
$self->no_github
$self->no_github_release
Truth table100%3/3
A or B
A= $self->no_githubB= $self->no_github_release
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | 50 | $self->add_plugins([ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | 'Author::GETTY::GitHubRelease' => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | branch => $self->release_branch, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | notes_from => 'ChangeLog', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | ]); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | # Binaries: one @Author::GETTY::Binary per binary = ..., sharing the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | # binary_* keys. They are published as assets of the GitHub release, so | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | # that has to exist. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | 170 | ▶ | if ($self->_binaries) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | 39 | ▶ | die "[\@Author::GETTY] binary release needs the GitHub release, but it is off " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$self->no_github or $self->no_github_release
MC/DC100%2/2
$self->no_github or $self->no_github_release
$self->no_github
$self->no_github_release
Truth table100%3/3
A or B
A= $self->no_githubB= $self->no_github_release
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | . "(no_github, no_github_release or no GitHub remote)\n" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | if $self->no_github || $self->no_github_release; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | 32 | ▶ | unless (defined $self->payload->{binary_default} && !$self->payload->{binary_default}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $self->payload->{"binary_default"} and not $self->payload->{"binary_default"}
MC/DC0%0/2
defined $self->payload->{"binary_default"} and not $self->payload->{"binary_default"}
defined $self->payload->{"binary_default"}
not $self->payload->{"binary_default"}
Truth table33%1/3
A and not(B)
A= defined $self->payload->{"binary_default"}B= not $self->payload->{"binary_default"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | 32 | $self->add_bundle('@Author::GETTY::Binary' => { binary_name => $_ }) for $self->_binaries; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 881 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 882 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | # Docker support: if docker_image is set on this bundle, auto-add a single | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | # default [@Author::GETTY::Docker] subsection so the dist has a working | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | # Releaser without any extra config. Users who want multiple targets via | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 886 | # explicit [@Author::GETTY::Docker / name] subsections can opt out with | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | # docker_default = 0 to suppress the auto-default. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 888 | 163 | ▶ | if ($self->_docker_default) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | 4 | $self->add_bundle('@Author::GETTY::Docker' => {}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 890 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 893 | 30 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | 30 | ▶ | no Moose; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||