File Coverage

blib/lib/Dist/Zilla/Plugin/Run/AfterRelease.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 1 0.0
total 21 22 95.4


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