File Coverage

blib/lib/Beam/Runner/Command.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 16 17 94.1


line stmt bran cond sub pod time code
1             package Beam::Runner::Command;
2             our $VERSION = '0.015';
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 command which loads and
12             #pod runs the specific C class.
13             #pod
14             #pod =head1 SEE ALSO
15             #pod
16             #pod The L commands: L,
17             #pod L, L
18             #pod
19             #pod =cut
20              
21 1     1   73385 use strict;
  1         12  
  1         29  
22 1     1   4 use warnings;
  1         2  
  1         26  
23 1     1   476 use Module::Runtime qw( use_module compose_module_name );
  1         1767  
  1         6  
24              
25             sub run {
26 1     1 0 1219 my ( $class, $cmd, @args ) = @_;
27 1         5 my $cmd_class = compose_module_name( 'Beam::Runner::Command', $cmd );
28 1         151 return use_module( $cmd_class )->run( @args );
29             }
30              
31             1;
32              
33             __END__