| 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; |