oCLI/Command.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 61.5% 16 / 26 CC 1 SCAR 3.4
CC
1
Cov
68%
define
2.0
setup
2.0
BEGIN
1.0
CRAP 1.4
« oCLI/View/Text.pm ↑ Summary
1 package oCLI::Command;
2 1 ▶use Import::Into;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Package::Stash;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 push our @ISA, qw( Exporter );
5 1 push our @EXPORT, qw( setup define );
6  
7 1 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
8 1 shift->export_to_level(1);
9 1 my $target = caller;
10 1 Package::Stash->new($target)->add_symbol( '%stash', { class => $target } );
11 1 Moo->import::into($target);
12 }
13  
14 0 ▶sub define {
Subroutine define: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my ( $name, @args ) = @_;
16  
17 0 ${Package::Stash->new(scalar caller)->get_symbol('%stash')}{command}->{$name} = { @args };
18 }
19  
20 0 ▶sub setup {
Subroutine setup: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my ( $name, @args ) = @_;
22  
23 0 ${Package::Stash->new(scalar caller)->get_symbol('%stash')}{info} = { name => $name, @args };
24 }
25  
26 1 1;
« oCLI/View/Text.pm ↑ Summary