File Coverage

blib/lib/Dist/Zilla/Plugin/Run/Test.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1 1     1   3249892 use strict;
  1         2  
  1         39  
2 1     1   8 use warnings;
  1         3  
  1         65  
3              
4             package Dist::Zilla::Plugin::Run::Test;
5             # ABSTRACT: execute a command of the distribution after build
6              
7             our $VERSION = '0.048';
8              
9 1     1   7 use Moose;
  1         2  
  1         8  
10             with qw(
11             Dist::Zilla::Role::TestRunner
12             Dist::Zilla::Plugin::Run::Role::Runner
13             );
14              
15 1     1   7174 use namespace::autoclean;
  1         3  
  1         11  
16              
17             sub test {
18 1     1 0 174841 my ($self, $dir) = @_;
19              
20 1         10 $self->_call_script({
21             dir => $dir
22             });
23             }
24              
25             #pod =head1 SYNOPSIS
26             #pod
27             #pod [Run::Test]
28             #pod run = script/tester.pl --name %n --version %v some_file.ext
29             #pod
30             #pod =head1 DESCRIPTION
31             #pod
32             #pod This plugin executes the specified command during the test phase.
33             #pod
34             #pod =head1 CAVEAT
35             #pod
36             #pod Unlike the other [Run::*] plugins, when running the scripts, the
37             #pod current working directory will be the directory with
38             #pod newly built distribution. This is the way Dist::Zilla works.
39             #pod
40             #pod =head1 POSITIONAL PARAMETERS
41             #pod
42             #pod See L<Dist::Zilla::Plugin::Run/CONVERSIONS>
43             #pod for the list of common formatting variables available to all plugins.
44             #pod
45             #pod There are no positional parameters for this plugin.
46             #pod
47             #pod =cut
48              
49             1;
50              
51             __END__
52              
53             =pod
54              
55             =encoding UTF-8
56              
57             =head1 NAME
58              
59             Dist::Zilla::Plugin::Run::Test - execute a command of the distribution after build
60              
61             =head1 VERSION
62              
63             version 0.048
64              
65             =head1 SYNOPSIS
66              
67             [Run::Test]
68             run = script/tester.pl --name %n --version %v some_file.ext
69              
70             =head1 DESCRIPTION
71              
72             This plugin executes the specified command during the test phase.
73              
74             =head1 CAVEAT
75              
76             Unlike the other [Run::*] plugins, when running the scripts, the
77             current working directory will be the directory with
78             newly built distribution. This is the way Dist::Zilla works.
79              
80             =head1 POSITIONAL PARAMETERS
81              
82             See L<Dist::Zilla::Plugin::Run/CONVERSIONS>
83             for the list of common formatting variables available to all plugins.
84              
85             There are no positional parameters for this plugin.
86              
87             =head1 SUPPORT
88              
89             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Run>
90             (or L<bug-Dist-Zilla-Plugin-Run@rt.cpan.org|mailto:bug-Dist-Zilla-Plugin-Run@rt.cpan.org>).
91              
92             There is also a mailing list available for users of this distribution, at
93             L<http://dzil.org/#mailing-list>.
94              
95             There is also an irc channel available for users of this distribution, at
96             L<C<#distzilla> on C<irc.perl.org>|irc://irc.perl.org/#distzilla>.
97              
98             =head1 AUTHOR
99              
100             Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>
101              
102             =head1 COPYRIGHT AND LICENCE
103              
104             This software is copyright (c) 2010 by L<Raudssus Social Software|https://raudss.us/>.
105              
106             This is free software; you can redistribute it and/or modify it under
107             the same terms as the Perl 5 programming language system itself.
108              
109             =cut