| 1 | package Beam::Runner::Command; | ||
| 2 | 2 | our $VERSION = '0.016'; | |
| 3 | # ABSTRACT: Main command handler delegating to individual commands | ||
| 4 | |||
| 5 | #pod =head1 SYNOPSIS | ||
| 6 | #pod | ||
| 7 | #pod exit Beam::Runner::Command->run( $cmd => @args ); | ||
| 8 | #pod | ||
| 9 | #pod =head1 DESCRIPTION | ||
| 10 | #pod | ||
| 11 | #pod This is the entry point for the L<beam> command which loads and | ||
| 12 | #pod runs the specific C<Beam::Runner::Command> class. | ||
| 13 | #pod | ||
| 14 | #pod =head1 SEE ALSO | ||
| 15 | #pod | ||
| 16 | #pod The L<Beam::Runner> commands: L<Beam::Runner::Command::run>, | ||
| 17 | #pod L<Beam::Runner::Command::list>, L<Beam::Runner::Command::help> | ||
| 18 | #pod | ||
| 19 | #pod =cut | ||
| 20 | |||
| 21 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | 2 | ▶ | use Module::Runtime qw( use_module compose_module_name ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | |||
| 25 | 1 | ▶ | sub run { |
|
Subroutine
run: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 26 | 1 | my ( $class, $cmd, @args ) = @_; | |
| 27 | 1 | my $cmd_class = compose_module_name( 'Beam::Runner::Command', $cmd ); | |
| 28 | 1 | return use_module( $cmd_class )->run( @args ); | |
| 29 | } | ||
| 30 | |||
| 31 | 2 | 1; | |
| 32 | |||
| 33 | __END__ | ||