LDAP/Role/Stem.pm

filter: Statementstmt 44.4% 12 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 1 totaltotal 45.4% 15 / 33 CC 2 SCAR 10.4
CC
2
Cov
44%
__ANON__
6.0
current_handler
2.0
BEGIN
1.0
CRAP 2.8
« LDAP/Command/Del/Ou.pm ↑ Summary LDAP/Command/Init.pm »
1 package App::LDAP::Role::Stem;
2  
3 4 ▶use Modern::Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 4 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 with qw( App::LDAP::Role );
8  
9 0 ▶around run => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
10 0 my $orig = shift;
11 0 my $self = shift;
12  
13 0 $self->$orig(@_);
14  
15 0 my $handler = $self->current_handler;
16  
17 0 say "usage: ldap$handler [subhandler]\n";
18  
19 0 say "Available subhandlers are:";
20  
21 0 my $leaves = ref($self)->leaves();
22  
23 0 for (@$leaves) {
24 0 printf(" %-11s", $_);
25 # show annotation of the module here;
26 0 say "";
27 }
28 4 };
29  
30 0 ▶sub current_handler {
Subroutine current_handler: not called CC=1 SCAR=6.9
Pod undocumented
31 0 my ($self, ) = @_;
32  
33 0 my $command = lc(ref($self));
34  
35 0 $command =~ s{app::ldap::command}{};
36 0 $command =~ s{::}{ }g;
37 0 return $command;
38 }
39  
40 4 ▶no Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
41  
42 4 1;
43  
44 =pod
45  
46 =head1 NAME
47  
48 App::LDAP::Role::Stem - A stem command shows its submodules
49  
50 =head1 SYNOPSIS
51  
52 package App::LDAP::Command::AStemCommand;
53 use Moose;
54 with qw( App::LDAP::Role::Command
55 App::LDAP::Role::Stem );
56  
57 sub run {
58  
59 }
60  
61 =cut
« LDAP/Command/Del/Ou.pm ↑ Summary LDAP/Command/Init.pm »