logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Description

       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))],
        );

perl v5.36.0                                       2023-10-22                             MooseX::App::Role(3pm)

Name

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

Synopsis

        package MyApp::Role::SomeRole;

        use MooseX::App::Role; # Alo loads Moose::Role

        option 'testattr' => (
           isa             => 'rw',
           cmd_tags        => [qw(Important! Nice))],
        );

See Also