| 1 | package Beam::Runner::Command::make; | ||
| 2 | 1 | our $VERSION = '0.003'; | |
| 3 | # ABSTRACT: Build recipes and their dependencies | ||
| 4 | |||
| 5 | #pod =head1 SYNOPSIS | ||
| 6 | #pod | ||
| 7 | #pod beam make [-v|-q] [<recipe...>|<variable...>] | ||
| 8 | #pod | ||
| 9 | #pod =head1 DESCRIPTION | ||
| 10 | #pod | ||
| 11 | #pod Run a service from the given container, passing in any arguments. | ||
| 12 | #pod | ||
| 13 | #pod =head1 ARGUMENTS | ||
| 14 | #pod | ||
| 15 | #pod =head2 <recipe> | ||
| 16 | #pod | ||
| 17 | #pod The name of a recipe in the C<Beamfile> to build. See L<Beam::Make> for | ||
| 18 | #pod how to write a C<Beamfile>. | ||
| 19 | #pod | ||
| 20 | #pod =head2 <variable> | ||
| 21 | #pod | ||
| 22 | #pod A C<< <NAME>=<VALUE> >> pair. Will be set as an environment variable for | ||
| 23 | #pod recipes to use. | ||
| 24 | #pod | ||
| 25 | #pod =head1 OPTIONS | ||
| 26 | #pod | ||
| 27 | #pod =head2 -v | --verbose | ||
| 28 | #pod | ||
| 29 | #pod Increase the verbosity of the output. By default, writes logs at the | ||
| 30 | #pod C<warning> level to C<STDERR>. May be specified up to 3 times for | ||
| 31 | #pod increased verbosity (C<info>, C<debug>, C<trace>). | ||
| 32 | #pod | ||
| 33 | #pod =head2 -q | --quiet | ||
| 34 | #pod | ||
| 35 | #pod Decrease the verbosity of the log output to C<error> (from the default, | ||
| 36 | #pod C<warning>). | ||
| 37 | #pod | ||
| 38 | #pod =head1 SEE ALSO | ||
| 39 | #pod | ||
| 40 | #pod L<Beam::Make>, L<beam> | ||
| 41 | #pod | ||
| 42 | #pod =cut | ||
| 43 | |||
| 44 | 1 | ▶ | use v5.20; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 45 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 46 | 1 | ▶ | use Beam::Make; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 47 | 1 | ▶ | use Log::Any::Adapter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 48 | 1 | ▶ | use Getopt::Long qw( GetOptionsFromArray :config pass_through bundling ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 49 | |||
| 50 | 0 | ▶ | sub run { |
|
Subroutine
run: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 51 | 0 | my ( $class, @args ) = @_; | |
| 52 | 0 | my %opt = ( | |
| 53 | verbose => 1, | ||
| 54 | quiet => 0, | ||
| 55 | ); | ||
| 56 | 0 | GetOptionsFromArray( \@args, \%opt, | |
| 57 | 'verbose|v+', | ||
| 58 | 'quiet|q', | ||
| 59 | ); | ||
| 60 | 0 | my @log_levels = qw( error warning info debug trace ); | |
| 61 | 0 | Log::Any::Adapter->set( Stderr => ( log_level => $log_levels[ $opt{verbose} - $opt{quiet} ] ) ); | |
| 62 | |||
| 63 | 0 | my $make = Beam::Make->new(); | |
| 64 | 0 | $make->run( @args ); | |
| 65 | } | ||
| 66 | |||
| 67 | 1 | 1; | |
| 68 | |||
| 69 | __END__ | ||