MooseX::App::Role
Define attributes in a role
- Provided by: libmoosex-app-perl (Version: 1.33-1)
- Report a bug
Define attributes in a role
package MyApp::Role::SomeRole;
use Moose::Role; # optional
use MooseX::App::Role;
option 'testattr' => (
isa => 'rw',
cmd_tags => [qw(Important! Nice))],
);
Enables the 'option' and 'parameter' keywords in your roles.
Alternatively you can also just use attribute traits:
has 'testattr' => (
isa => 'rw',
traits => ['AppOption'], # required
cmd_type => 'option', # required
cmd_tags => [qw(Important! Nice))],
);