blib/lib/Dist/Zilla/App/Command/release.pm

filter: Statementstmt 41.1% 7 / 17 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 40.0% 2 / 5 Podpod 100% 3 / 3 totaltotal 37.5% 12 / 32 CC 4 SCAR 23.7
CC
4
Cov
30%
execute
20.0
abstract
2.0
opt_spec
2.0
CRAP 10.8
« blib/lib/Dist/Zilla/Plugin/PruneCruft.pm ↑ Summary blib/lib/Dist/Zilla/App/Command/smoke.pm »
1 package Dist::Zilla::App::Command::release 6.040;
2 # ABSTRACT: release your dist to the CPAN
3  
4 4 ▶use Dist::Zilla::Pragmas;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use Dist::Zilla::App -command;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 #pod =head1 SYNOPSIS
9 #pod
10 #pod dzil release
11 #pod
12 #pod dzil release --trial
13 #pod
14 #pod # long form, jobs takes an integer
15 #pod dzil release --jobs 9
16 #pod
17 #pod # short form, same as above
18 #pod dzil release -j 9
19 #pod
20 #pod This command is a very, very thin wrapper around the
21 #pod C<L<release|Dist::Zilla/release>> method on the Dist::Zilla object. It will
22 #pod build, archive, and release your distribution using your Releaser plugins.
23 #pod
24 #pod Available options are:
25 #pod
26 #pod =over
27 #pod
28 #pod =item C<--trial>, will cause it to build a trial build.
29 #pod
30 #pod =item C<--jobs|-j=i>, number of test jobs run in parallel using L<Test::Harness|Test::Harness>.
31 #pod
32 #pod =back
33 #pod
34 #pod The default for L<Test::Harness|Test::Harness> is C<9>. The number of parallel jobs can also be specified setting C<HARNESS_OPTIONS>.
35 #pod
36 #pod HARNESS_OPTIONS=j9
37 #pod
38 #pod See L<Test::Harness|Test::Harness> for more details.
39 #pod
40 #pod =cut
41  
42 0 ▶sub abstract { 'release your dist' }
Subroutine abstract: not called CC=1 SCAR=6.9
Pod documented
43  
44 0 ▶sub opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
45 0 [ 'trial' => 'build a trial release that PAUSE will not index' ],
46 [ 'jobs|j=i' => 'number of parallel test jobs to run' ],
47 }
48  
49 0 ▶sub execute {
Subroutine execute: not called CC=4 SCAR=30.0
Pod documented
50 0 my ($self, $opt, $arg) = @_;
51  
52 0 my $zilla;
53 {
54 # isolate changes to RELEASE_STATUS to zilla construction
55 0 local $ENV{RELEASE_STATUS} = $ENV{RELEASE_STATUS};
56 0 ▶ $ENV{RELEASE_STATUS} = 'testing' if $opt->trial;
Branch: 1 branch
BranchTrueFalseTotal
if $opt->trial 0 0 0
57 0 $zilla = $self->zilla;
58 }
59  
60 0 ▶ local $ENV{HARNESS_OPTIONS} = join ':', split(':', $ENV{HARNESS_OPTIONS} // ''), 'j'.$opt->jobs if $opt->jobs;
Branch: 1 branch
BranchTrueFalseTotal
if $opt->jobs 0 0 0
Condition0%0/2
$ENV{"HARNESS_OPTIONS"} // ""
l!l
00
MC/DC0%0/1
$ENV{"HARNESS_OPTIONS"} // ""
$ENV{"HARNESS_OPTIONS"}
Truth table0%0/2
A
A= $ENV{"HARNESS_OPTIONS"}
Aresult
11
00
61 0 $self->zilla->release;
62 }
63  
64 4 1;
65  
66 __END__
« blib/lib/Dist/Zilla/Plugin/PruneCruft.pm ↑ Summary blib/lib/Dist/Zilla/App/Command/smoke.pm »