P5U/Command/Commands.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 43 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
sort_commands
2.0
CRAP 2.0
1 package P5U::Command::Commands;
2  
3 BEGIN {
4 $P5U::Command::Commands::AUTHORITY = 'cpan:TOBYINK';
5 $P5U::Command::Commands::VERSION = '0.100';
6 };
7  
8 use 5.010;
9 use strict;
10 use utf8;
11 use P5U-command;
12  
13 require App::Cmd::Command::commands;
14 our @ISA;
15 unshift @ISA, 'App::Cmd::Command::commands';
16  
17 BEGIN {
18 $P5U::Command::Commands::AUTHORITY = 'cpan:TOBYINK';
19 $P5U::Command::Commands::VERSION = '0.100';
20 };
21  
22 use constant {
23 abstract => q[list installed p5u commands],
24 };
25  
26 sub sort_commands
27 {
28 my ($self, @commands) = @_;
29 my $float = qr/^(?:help|commands|aliases|about)$/;
30 my @head = sort grep { $_ =~ $float } @commands;
31 my @tail = sort grep { $_ !~ $float } @commands;
32 return (\@head, \@tail);
33 }
34 1;