/usr/share/perl5/MooseX/App/Role.pm is in libmoosex-app-perl 1.22-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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # ============================================================================
package MooseX::App::Role;
# ============================================================================
use 5.010;
use utf8;
use strict;
use warnings;
use Moose::Role ();
use MooseX::App::Exporter qw(option parameter);
use Moose::Exporter;
Moose::Exporter->setup_import_methods(
also => 'Moose::Role',
with_meta => [qw(option parameter)],
);
sub init_meta {
my (undef,%args) = @_;
my $meta = Moose::Role->init_meta( %args );
Moose::Util::MetaRole::apply_metaroles(
for => $meta,
role_metaroles => {
applied_attribute => ['MooseX::App::Meta::Role::Attribute::Option'],
},
);
return $meta;
}
1;
__END__
=pod
=head1 NAME
MooseX::App::Role - Define attributes in a role
=head1 SYNOPSIS
package MyApp::Role::SomeRole;
use Moose::Role; # optional
use MooseX::App::Role;
option 'testattr' => (
isa => 'rw',
cmd_tags => [qw(Important! Nice))],
);
=head1 DESCRIPTION
Enables the 'option' and 'parameter' keywords in your roles.
Alternatively you can also just use attribute traits:
has 'testattr' => (
isa => 'rw',
traits => ['AppOption'],
cmd_type => 'option',
cmd_tags => [qw(Important! Nice))],
);
=cut
|