line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Boxer::CLI::Command::Aliases; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=encoding UTF-8 |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=cut |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1744
|
use v5.20; |
|
3
|
|
|
|
|
9
|
|
8
|
3
|
|
|
3
|
|
13
|
use utf8; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
12
|
|
9
|
3
|
|
|
3
|
|
88
|
use Role::Commons -all; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
13
|
|
10
|
3
|
|
|
3
|
|
3658
|
use feature 'signatures'; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
218
|
|
11
|
3
|
|
|
3
|
|
17
|
use namespace::autoclean 0.16; |
|
3
|
|
|
|
|
39
|
|
|
3
|
|
|
|
|
17
|
|
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
195
|
use match::simple qw(match); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
27
|
|
14
|
3
|
|
|
3
|
|
677
|
use Boxer::CLI -command; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
16
|
|
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
3
|
|
764
|
use strictures 2; |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
87
|
|
17
|
3
|
|
|
3
|
|
415
|
no warnings "experimental::signatures"; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
212
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 VERSION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Version v1.4.3 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our $VERSION = "v1.4.3"; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use constant { |
28
|
3
|
|
|
|
|
1019
|
abstract => q[show aliases for boxer commands], |
29
|
|
|
|
|
|
|
usage_desc => q[%c aliases], |
30
|
3
|
|
|
3
|
|
19
|
}; |
|
3
|
|
|
|
|
4
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub description |
33
|
|
|
|
|
|
|
{ |
34
|
0
|
|
|
0
|
1
|
0
|
<<'DESCRIPTION'; |
35
|
|
|
|
|
|
|
Some boxer commands can be invoked with shorter aliases. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
boxer version |
38
|
|
|
|
|
|
|
boxer --version # same thing |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
The aliases command (which, ironically, has no shorter alias) shows existing |
41
|
|
|
|
|
|
|
aliases. |
42
|
|
|
|
|
|
|
DESCRIPTION |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub command_names |
46
|
|
|
|
|
|
|
{ |
47
|
5
|
|
|
5
|
1
|
246
|
qw( |
48
|
|
|
|
|
|
|
aliases |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub opt_spec |
53
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
0
|
1
|
|
return; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
sub execute ( $self, $opt, $args ) |
|
0
|
|
|
|
|
|
|
58
|
0
|
|
|
0
|
1
|
|
{ |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $filter |
60
|
|
|
|
|
|
|
= scalar(@$args) |
61
|
|
|
|
|
|
|
? $args |
62
|
0
|
0
|
|
0
|
|
|
: sub { not( match( shift, [qw(aliases commands help)] ) ) }; |
|
0
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
foreach my $cmd ( sort $self->app->command_plugins ) { |
65
|
0
|
|
|
|
|
|
my ( $preferred, @aliases ) = $cmd->command_names; |
66
|
0
|
0
|
|
|
|
|
printf( "%-16s: %s\n", $preferred, "@aliases" ) |
67
|
|
|
|
|
|
|
if match( $preferred, $filter ); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Jonas Smedegaard C<< >>. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:JONASS'; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Copyright © 2013-2016 Jonas Smedegaard |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
84
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
89
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
90
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
1; |