/usr/share/perl5/CLI/Framework/Command/List.pm is in libcli-framework-perl 0.05-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | package CLI::Framework::Command::List;
use base qw( CLI::Framework::Command::Meta );
use strict;
use warnings;
our $VERSION = 0.01;
#-------
sub usage_text {
q{
list: print a concise list of the names of all commands available to the application
}
}
sub run {
my ($self, $opts, @args) = @_;
my $app = $self->get_app(); # metacommand is app-aware
# If interactive, exclude commands that do not apply in interactive mode...
my @command_set = $app->get_interactivity_mode()
? $app->get_interactive_commands()
: keys %{ $app->command_map_hashref() };
my $result = join(', ', map { lc $_ } @command_set ) . "\n";
return $result;
}
#-------
1;
__END__
=pod
=head1 NAME
CLI::Framework::Command::List - CLIF built-in command to print a list of
commands available to the running application
=head1 SEE ALSO
L<command_map|CLI::Framework::Application/command_map()>
L<CLI::Framework::Command>
=cut
|