MooseX::Has::Sugar::Minimal(3pm)

MooseX::Has::Sugar::Minimal3pm

Less sugary syntax for moose 'has' fields

Usage

This is a legacy variant of Sugar which only exports "ro" and "rw" functions, the way MooseX::Has::Sugar used to with ":is";

    use MooseX::Types::Moose qw( Str );
    use MooseX::Has::Sugar::Minimal;
    has foo => (
            isa => Str,
            is  => ro,
            required => 1,
    );
    has bar => (
            isa => Str,
            is => rw,
            lazy_build => 1,
    );

All functions are exported by The Sub::Exporter Module.

Version

version 1.000006

Export groups

":default"

Exports ":is"

":is"

Exports "bare", "ro", "rw"

Exported functions

"bare"

returns "('bare')"

"ro"

returns "('ro')"

"rw"

returns "('rw')"

Conflicts

MooseX::Has::Sugar

MooseX::Has::Sugar::Saccharin

This module is not intended to be used in conjunction with
::Sugar or ::Sugar::Saccharin.

We all export "ro" and "rw" in different ways.

If you do however want to use them in conjunction, specific imports must
be done on MooseX::Has::Sugar's side to stop it exporting different
ro/rw. Any of the below should be fine.

    use MooseX::Has::Sugar::Minimal;
    use MooseX::Has::Sugar qw( :attrs );
    has foo =>( is => rw , lazy_build );
    use MooseX::Has::Sugar::Minimal;
    use MooseX::Has::Sugar qw( lazy_build );
    has foo =>( is => rw , lazy_build );

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7
  3. 8–9
  4. 10–11
  5. 12–13

Author

Kent Fredric <[email protected]>

From libmoosex-has-sugar-perl 1.000006-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.