/usr/share/perl5/Scrappy/Action/Help.pm is in libscrappy-perl 0.94112090-2.
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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | package Scrappy::Action::Help;
BEGIN {
$Scrappy::Action::Help::VERSION = '0.94112090';
}
use Moose::Role;
sub menu {
my @actions = @{shift->actions};
my @header = ();
while (<DATA>) {
chomp;
push @header, $_;
}
@actions = map {
my $action = $_;
$action =~ s/^Scrappy::Action:://;
$action =~ s/::/\-/g;
$action =~ s/([a-z])([A-Z])/$1\_$2/g;
lc "\t$action"
} sort @actions;
return
join("\n", @header) . "\n"
. "These commands are currently available:\n\n"
. join("\n", @actions) . "\n";
}
sub help {
my $self = shift;
my $data = shift;
$data .= "::DATA";
my @header = ();
my @content = ();
while (<DATA>) {
chomp;
push @header, $_;
}
if ($data =~ /^Scrappy::Action::/) {
if ($data ne 'Scrappy::Action::Help::DATA') {
while (<$data>) {
chomp;
push @content, $_;
}
}
}
return
join("\n", @header) . "\n"
. (@content ? join("\n", @content) . "\n" : "");
}
1;
__DATA__
Welcome to the Scrappy command-line interface.
This application should be used to create new projects and
execute various installed actions (under the Scrappy::Action namespace);
* See `scrappy [COMMAND]` for more information on a specific command.
|