NAME

MooseX::Has::Sugar - Sugar Syntax for moose 'has' fields

VERSION

version 1.000001

SYNOPSIS

Moosehas syntax is generally fine, but sometimes one gets bothered with the constant typing of string quotes for things. The MooseX::Types module exists and in many ways reduces the need for constant string creation.

Primary Benefits at a Glance

Reduced Typing in has declarations.

The constant need to type => and '' is fine for one-off cases, but the instant you have more than about 4 attributes it starts to get annoying.

More compact declarations.

Reduces much of the redundant typing in most cases, which makes your life easier, and makes it take up less visual space, which makes it faster to read.

No String Worries

Strings are often problematic, due to white-space etc. Noted that if you do happen to mess them up, Moose should at least warn you that you've done something daft. Using this alleviates that worry.

EXPORT GROUPS

:default

Since 0.0300, this exports all our syntax, the same as :attrs:isattrs. Primarily because I found you generally want all the sugar, not just part of it. This also gets rid of that nasty exclusion logic.

:isattrs

This exports ro, rw and bare as lists, so they behave as stand-alone attributes like "lazy" does.