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

filter: Statementstmt 50.0% 7 / 14 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 100% 3 / 3 totaltotal 42.8% 12 / 28 CC 4 SCAR 23.7
CC
4
Cov
35%
execute
20.0
opt_spec
2.0
abstract
2.0
CRAP 10.8
« blib/lib/Dist/Zilla/App/Command/release.pm ↑ Summary blib/lib/Dist/Zilla/App.pm »
1 package Dist::Zilla::App::Command::smoke 6.040;
2 # ABSTRACT: smoke your dist
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 smoke [ --release ] [ --author ] [ --no-automated ]
11 #pod
12 #pod =head1 DESCRIPTION
13 #pod
14 #pod This command builds and tests the distribution in "smoke testing mode."
15 #pod
16 #pod This command is a thin wrapper around the L<test|Dist::Zilla::Dist::Builder/test> method in
17 #pod Dist::Zilla. It builds your dist and runs the tests with the AUTOMATED_TESTING
18 #pod environment variable turned on, so it's like doing this:
19 #pod
20 #pod export AUTOMATED_TESTING=1
21 #pod dzil build --no-tgz
22 #pod cd $BUILD_DIRECTORY
23 #pod perl Makefile.PL
24 #pod make
25 #pod make test
26 #pod
27 #pod A build that fails tests will be left behind for analysis, and F<dzil> will
28 #pod exit a non-zero value. If the tests are successful, the build directory will
29 #pod be removed and F<dzil> will exit with status 0.
30 #pod
31 #pod =cut
32  
33 0 ▶sub opt_spec {
Subroutine opt_spec: not called CC=1 SCAR=6.9
Pod documented
34 0 [ 'release' => 'enables the RELEASE_TESTING env variable', { default => 0 } ],
35 [ 'automated!' => 'enables the AUTOMATED_TESTING env variable (default behavior)', { default => 1 } ],
36 [ 'author' => 'enables the AUTHOR_TESTING env variable', { default => 0 } ]
37 }
38  
39 #pod =head1 OPTIONS
40 #pod
41 #pod =head2 --release
42 #pod
43 #pod This will run the test suite with RELEASE_TESTING=1
44 #pod
45 #pod =head2 --no-automated
46 #pod
47 #pod This will run the test suite without setting AUTOMATED_TESTING
48 #pod
49 #pod =head2 --author
50 #pod
51 #pod This will run the test suite with AUTHOR_TESTING=1
52 #pod
53 #pod =cut
54  
55 0 ▶sub abstract { 'smoke your dist' }
Subroutine abstract: not called CC=1 SCAR=6.9
Pod documented
56  
57 0 ▶sub execute {
Subroutine execute: not called CC=4 SCAR=30.0
Pod documented
58 0 my ($self, $opt, $arg) = @_;
59  
60 0 ▶ local $ENV{RELEASE_TESTING} = 1 if $opt->release;
Branch: 1 branch
BranchTrueFalseTotal
if $opt->release 0 0 0
61 0 ▶ local $ENV{AUTHOR_TESTING} = 1 if $opt->author;
Branch: 1 branch
BranchTrueFalseTotal
if $opt->author 0 0 0
62 0 ▶ local $ENV{AUTOMATED_TESTING} = 1 if $opt->automated;
Branch: 1 branch
BranchTrueFalseTotal
if $opt->automated 0 0 0
63  
64 0 $self->zilla->test;
65 }
66  
67 4 1;
68  
69 __END__
« blib/lib/Dist/Zilla/App/Command/release.pm ↑ Summary blib/lib/Dist/Zilla/App.pm »