MooseX::App::Role - 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'], cmd_type => 'option', cmd_tags => [qw(Important! Nice))], );
To install MooseX::App, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::App
CPAN shell
perl -MCPAN -e shell install MooseX::App
For more information on module installation, please visit the detailed CPAN module installation guide.