1MooseX::App::Role(3)  User Contributed Perl Documentation MooseX::App::Role(3)
2
3
4

NAME

6       MooseX::App::Role - Define attributes in a role
7

SYNOPSIS

9        package MyApp::Role::SomeRole;
10
11        use MooseX::App::Role; # Alo loads Moose::Role
12
13        option 'testattr' => (
14           isa             => 'rw',
15           cmd_tags        => [qw(Important! Nice))],
16        );
17

DESCRIPTION

19       Enables the 'option' and 'parameter' keywords in your roles.
20
21       Alternatively you can also just use attribute traits:
22
23        has 'testattr' => (
24           isa             => 'rw',
25           traits          => ['AppOption'],   # required
26           cmd_type        => 'option',        # required
27           cmd_tags        => [qw(Important! Nice))],
28        );
29
30
31
32perl v5.32.0                      2020-07-28              MooseX::App::Role(3)
Impressum