blib/lib/App/MatrixTool/SubCommands.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 60.7% 17 / 28 SCAR 8.2
CC
2
Cov
59%
run
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« blib/lib/App/MatrixTool/Command/client/login.pm ↑ Summary
1 # You may distribute under the terms of either the GNU General Public License
2 # or the Artistic License (the same terms as Perl itself)
3 #
4 # (C) Paul Evans, 2016 -- leonerd@leonerd.org.uk
5  
6 package App::MatrixTool::SubCommands;
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use base qw( App::MatrixTool );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use constant ARGUMENTS => ( "command", "..." );
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 sub run
15 {
16 0 ▶ my $self = shift;
Subroutine run: not called CC=2 SCAR=17.9
Pod undocumented
17 0 my @args = @_;
18  
19 0 my $cmd = shift @args;
20  
21 0 my $pkg = $self->_pkg_for_command( $cmd );
22 0 ▶ $pkg->can( "new" ) or
Branch: 1 branch
BranchTrueFalseTotal
$pkg->can("new") or return $self->error("No such command '${cmd}'") 0 0 0
23 return $self->error( "No such command '$cmd'" );
24  
25 # TODO: ponder global opts?
26 0 my $runner = $pkg->new( %$self );
27  
28 0 $self->run_command_in_runner( $runner, @args );
29 }
30  
31 1 0x55AA;
« blib/lib/App/MatrixTool/Command/client/login.pm ↑ Summary