6b46c62d2e
File too long (should be no more than 24 lines). Line too long (should be no more than 80 characters). Trailing empty lines. Trailing white-space. Trucated the long files as best as possible while preserving the most info contained in them.
24 lines
532 B
Text
24 lines
532 B
Text
MooseX::Has::Options provides a succinct syntax for declaring options for
|
|
Moose attributes. It hijacks the has function imported by Moose and replaces
|
|
it with one that understands following options syntax:
|
|
|
|
use Moose;
|
|
use MooseX::Has::Options;
|
|
|
|
has 'some_attribute' => (
|
|
qw(:ro :required),
|
|
isa => 'Str',
|
|
...
|
|
);
|
|
|
|
This will converted into:
|
|
|
|
use Moose;
|
|
use MooseX::Has::Options;
|
|
|
|
has 'some_attribute' => (
|
|
is => 'ro',
|
|
required => 1,
|
|
isa => 'Str',
|
|
...
|
|
);
|