/usr/share/perl5/MooseX/App/Meta/Role/Class/Simple.pm is in libmoosex-app-perl 1.37-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 | # ============================================================================
package MooseX::App::Meta::Role::Class::Simple;
# ============================================================================
use utf8;
use 5.010;
use namespace::autoclean;
use Moose::Role;
around 'command_usage_header' => sub {
my ($orig,$self) = @_;
my $caller = $self->app_base;
my $usage;
# Get usage from command if available
if ($self->can('command_usage')
&& $self->command_usage_predicate) {
$usage = MooseX::App::Utils::format_text($self->command_usage);
}
# Autobuild usage
unless ($usage) {
my $command = $caller;
my @parameter= $self->command_usage_attributes($self,'parameter');
foreach my $attribute (@parameter) {
if ($attribute->is_required) {
$command .= " <".$attribute->cmd_usage_name.'>';
} else {
$command .= ' ['.$attribute->cmd_usage_name.']';
}
}
$usage = MooseX::App::Utils::format_text("$command [long options...]
$caller --help")
}
return $self->command_message(
header => 'usage:',
body => $usage
); # LOCALIZE
};
1;
|