MooseX::HasDefaults(3pm)

MooseX::HasDefaults3pm

Default "is" to "ro" or "rw" for all attributes

Usage

    package Person;
    use Moose;
    use MooseX::HasDefaults::RO;
    has name => (
        isa => 'Str',
    );
    has age => (
        is  => 'rw',
        isa => 'Int',
        documentation => "Changes most years",
    );

Overview

The module MooseX::HasDefaults::RO defaults "is" to "ro".

The module MooseX::HasDefaults::RW defaults "is" to "rw".

If you pass a specific value to any "has"'s "is", that overrides the default. If you do not want an accessor, pass "is => undef".

Releases

7 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7–9
  2. 10–11
  3. 12–13

Author

Shawn M Moore, "[email protected]"

From libmoosex-hasdefaults-perl 0.03-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.