File Coverage

blib/lib/Dist/Zilla/Plugin/Run/BeforeRelease.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 3     3   11261 use strict;
  3         9  
  3         152  
2 3     3   28 use warnings;
  3         8  
  3         406  
3              
4             package Dist::Zilla::Plugin::Run::BeforeRelease;
5             # ABSTRACT: execute a command of the distribution before release
6              
7             our $VERSION = '0.049';
8              
9 3     3   89 use Moose;
  3         10  
  3         23  
10             with qw(
11             Dist::Zilla::Role::BeforeRelease
12             Dist::Zilla::Plugin::Run::Role::Runner
13             );
14              
15 3     3   23233 use namespace::autoclean;
  3         10  
  3         33  
16              
17             sub before_release {
18 4     4 0 513673 my ( $self, $archive ) = @_;
19 4         199 $self->_call_script({
20             archive => $archive,
21             pos => [$archive]
22             });
23             }
24              
25             #pod =head1 SYNOPSIS
26             #pod
27             #pod [Run::BeforeRelease]
28             #pod run = script/myapp_before.pl %v %d
29             #pod
30             #pod or
31             #pod
32             #pod [Run::BeforeRelease / MyAppBefore]
33             #pod run = script/myapp_before.pl %v %d
34             #pod
35             #pod =head1 DESCRIPTION
36             #pod
37             #pod This plugin executes the specified command before releasing.
38             #pod
39             #pod =head1 POSITIONAL PARAMETERS
40             #pod
41             #pod See L<Dist::Zilla::Plugin::Run/CONVERSIONS>
42             #pod for the list of common formatting variables available to all plugins.
43             #pod
44             #pod For backward compatibility:
45             #pod
46             #pod =for :list
47             #pod * The 1st C<%s> will be replaced by the archive of the release.
48             #pod
49             #pod =cut
50              
51             1;
52              
53             __END__
54              
55             =pod
56              
57             =encoding UTF-8
58              
59             =head1 NAME
60              
61             Dist::Zilla::Plugin::Run::BeforeRelease - execute a command of the distribution before release
62              
63             =head1 VERSION
64              
65             version 0.049
66              
67             =head1 SYNOPSIS
68              
69             [Run::BeforeRelease]
70             run = script/myapp_before.pl %v %d
71              
72             or
73              
74             [Run::BeforeRelease / MyAppBefore]
75             run = script/myapp_before.pl %v %d
76              
77             =head1 DESCRIPTION
78              
79             This plugin executes the specified command before releasing.
80              
81             =head1 POSITIONAL PARAMETERS
82              
83             See L<Dist::Zilla::Plugin::Run/CONVERSIONS>
84             for the list of common formatting variables available to all plugins.
85              
86             For backward compatibility:
87              
88             =over 4
89              
90             =item *
91              
92             The 1st C<%s> will be replaced by the archive of the release.
93              
94             =back
95              
96             =head1 SUPPORT
97              
98             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-Run>
99             (or L<bug-Dist-Zilla-Plugin-Run@rt.cpan.org|mailto:bug-Dist-Zilla-Plugin-Run@rt.cpan.org>).
100              
101             There is also a mailing list available for users of this distribution, at
102             L<http://dzil.org/#mailing-list>.
103              
104             There is also an irc channel available for users of this distribution, at
105             L<C<#distzilla> on C<irc.perl.org>|irc://irc.perl.org/#distzilla>.
106              
107             =head1 AUTHOR
108              
109             Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>
110              
111             =head1 COPYRIGHT AND LICENCE
112              
113             This software is copyright (c) 2010 by L<Raudssus Social Software|https://raudss.us/>.
114              
115             This is free software; you can redistribute it and/or modify it under
116             the same terms as the Perl 5 programming language system itself.
117              
118             =cut