File Coverage

blib/lib/Boxer/CLI/Command/Commands.pm
Criterion Covered Total %
statement 36 36 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod 1 1 100.0
total 47 47 100.0


line stmt bran cond sub pod time code
1             package Boxer::CLI::Command::Commands;
2              
3             =encoding UTF-8
4              
5             =cut
6              
7 3     3   2939 use v5.20;
  3         13  
8 3     3   19 use utf8;
  3         5  
  3         21  
9 3     3   120 use Role::Commons -all;
  3         7  
  3         26  
10 3     3   5118 use feature 'signatures';
  3         7  
  3         343  
11 3     3   23 use namespace::autoclean 0.16;
  3         57  
  3         31  
12              
13 3     3   254 use Boxer::CLI -command;
  3         6  
  3         40  
14              
15 3     3   1054 use strictures 2;
  3         19  
  3         108  
16 3     3   561 no warnings "experimental::signatures";
  3         8  
  3         306  
17              
18             =head1 VERSION
19              
20             Version v1.4.1
21              
22             =cut
23              
24             our $VERSION = "v1.4.1";
25              
26             require App::Cmd::Command::commands;
27             our @ISA;
28             unshift @ISA, 'App::Cmd::Command::commands';
29              
30             use constant {
31 3         891 abstract => q[list installed boxer commands],
32 3     3   21 };
  3         12  
33              
34 1         5 sub sort_commands ( $self, @commands )
35 1     1 1 76 {
  1         3  
  1         3  
36 1         6 my $float = qr/^(?:help|commands|aliases|about)$/;
37 1         4 my @head = sort grep { $_ =~ $float } @commands;
  6         34  
38 1         3 my @tail = sort grep { $_ !~ $float } @commands;
  6         37  
39 1         6 return ( \@head, \@tail );
40             }
41              
42             =head1 AUTHOR
43              
44             Jonas Smedegaard C<< <dr@jones.dk> >>.
45              
46             =cut
47              
48             our $AUTHORITY = 'cpan:JONASS';
49              
50             =head1 COPYRIGHT AND LICENCE
51              
52             Copyright © 2013-2016 Jonas Smedegaard
53              
54             This is free software; you can redistribute it and/or modify it under
55             the same terms as the Perl 5 programming language system itself.
56              
57             =head1 DISCLAIMER OF WARRANTIES
58              
59             THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
60             WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
61             MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
62              
63             =cut
64              
65             1;