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