App/Plugin/Man/Command.pm

filter: Statementstmt 63.6% 21 / 33 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 1 totaltotal 54.0% 27 / 50 CC 4 SCAR 21.5
CC
4
Cov
52%
man
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 8.6
« App/ParsedArgv/Element.pm ↑ Summary App/Plugin/ConfigHome/Meta/Class.pm »
1 # ============================================================================
2 package MooseX::App::Plugin::Man::Command;
3 # ============================================================================
4  
5 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use MooseX::App::Command;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Pod::Perldoc;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 command_short_description q(Full manpage);
14  
15 1 has 'command' => (
16 is => 'ro',
17 isa => 'ArrayRef',
18 predicate => 'has_command',
19 documentation => q[Command],
20 traits => ['MooseX::App::Meta::Role::Attribute::Option'],
21 cmd_type => 'parameter',
22 cmd_position => 1,
23 );
24  
25 0 ▶sub man {
Subroutine man: not called CC=4 SCAR=30.0
Pod undocumented
26 0 my ($self,$app) = @_;
27  
28 0 my $meta = $app->meta;
29 0 my $class;
30  
31 0 ▶ if ($self->has_command) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->has_command) { } 0 0 0
32 0 my $return = $meta->command_find($self->command);
33 # Nothing found
34 0 ▶ if (blessed $return
Branch: 1 branch
BranchTrueFalseTotal
if (builtin::blessed($return) and $return->isa("MooseX::App::Message::Block")) 0 0 0
Condition0%0/3
builtin::blessed($return) and $return->isa("MooseX::App::Message::Block")
!ll&&!rl&&r
000
MC/DC0%0/2
builtin::blessed($return) and $return->isa("MooseX::App::Message::Block")
builtin::blessed($return) $return->isa("MooseX::App::Message::Block")
Truth table0%0/3
A and B
A= builtin::blessed($return)B= $return->isa("MooseX::App::Message::Block")
ABresult
0X0
100
111
35 && $return->isa('MooseX::App::Message::Block')) {
36 0 return MooseX::App::Message::Envelope->new(
37 $return,
38 $meta->command_usage_command($self->meta),
39 );
40 }
41 0 $class = $meta->command_get($return);
42 } else {
43 0 $class = $meta->name;
44 }
45  
46 0 Class::Load::load_class($class);
47 0 my $filename = MooseX::App::Utils::package_to_filename($class);
48  
49 0 exec('perldoc',$filename);
50 #return $MooseX::App::Null::NULL;
51 }
52  
53 1 __PACKAGE__->meta->make_immutable;
54 1 1;
« App/ParsedArgv/Element.pm ↑ Summary App/Plugin/ConfigHome/Meta/Class.pm »