| 1 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package Dist::Zilla::Plugin::Run::AfterBuild; | ||
| 5 | # ABSTRACT: execute a command of the distribution after build | ||
| 6 | |||
| 7 | 4 | our $VERSION = '0.050'; | |
| 8 | |||
| 9 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 4 | with qw( | |
| 11 | Dist::Zilla::Role::AfterBuild | ||
| 12 | Dist::Zilla::Plugin::Run::Role::Runner | ||
| 13 | ); | ||
| 14 | |||
| 15 | 4 | ▶ | use Path::Tiny 'path'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 4 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 6 | ▶ | sub after_build { |
|
Subroutine
after_build: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 19 | 6 | my ($self, $param) = @_; | |
| 20 | $self->_call_script({ | ||
| 21 | dir => $param->{ build_root }, | ||
| 22 | 6 | ▶ | pos => [path($param->{ build_root })->canonpath, sub { $self->zilla->version }] |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 23 | }); | ||
| 24 | } | ||
| 25 | |||
| 26 | #pod =head1 SYNOPSIS | ||
| 27 | #pod | ||
| 28 | #pod [Run::AfterBuild] | ||
| 29 | #pod run = script/do_this.pl --dir %d --version %v | ||
| 30 | #pod run = script/do_that.pl | ||
| 31 | #pod | ||
| 32 | #pod =head1 DESCRIPTION | ||
| 33 | #pod | ||
| 34 | #pod This plugin executes the specified command after building the distribution. | ||
| 35 | #pod | ||
| 36 | #pod =head1 POSITIONAL PARAMETERS | ||
| 37 | #pod | ||
| 38 | #pod See L<Dist::Zilla::Plugin::Run/CONVERSIONS> | ||
| 39 | #pod for the list of common formatting variables available to all plugins. | ||
| 40 | #pod | ||
| 41 | #pod For backward compatibility: | ||
| 42 | #pod | ||
| 43 | #pod =for :list | ||
| 44 | #pod * The 1st C<%s> will be replaced by the directory in which the distribution was built. | ||
| 45 | #pod * The 2nd C<%s> will be replaced by the distribution version. | ||
| 46 | #pod | ||
| 47 | #pod =cut | ||
| 48 | |||
| 49 | 4 | 1; | |
| 50 | |||
| 51 | __END__ | ||