methods from the method providers (below). Currying with delegated methods
works normally for C<< handles >>.
-=head1 METHOD PROVIDERS
+=head1 NATIVE TYPES
=over
-=item L<Number|Moose::Meta::Attribute::Native::Trait::Number>
+=item L<Array|Moose::Meta::Attribute::Native::Trait::Array>
-Common numerical operations.
+Common methods for array references.
- has 'integer' => (
- traits => ['Number'],
+ has 'queue' => (
+ traits => ['Array'],
is => 'ro',
- isa => 'Int',
- default => 5,
+ isa => 'ArrayRef[Str]',
+ default => sub { [] },
handles => {
- set => 'set',
- add => 'add',
- sub => 'sub',
- mul => 'mul',
- div => 'div',
- mod => 'mod',
- abs => 'abs',
+ add_item => 'push',
+ next_item => 'shift',
# ...
}
);
-=item L<String|Moose::Meta::Attribute::Native::Trait::String>
+=item L<Bool|Moose::Meta::Attribute::Native::Trait::Bool>
-Common methods for string operations.
+Common methods for boolean values.
- has 'text' => (
- traits => ['String'],
+ has 'is_lit' => (
+ traits => ['Bool'],
is => 'rw',
- isa => 'Str',
- default => q{},
+ isa => 'Bool',
+ default => 0,
handles => {
- add_text => 'append',
- replace_text => 'replace',
+ illuminate => 'set',
+ darken => 'unset',
+ flip_switch => 'toggle',
+ is_dark => 'not',
+ # ...
+ }
+ );
+
+=item L<Code|Moose::Meta::Attribute::Native::Trait::Code>
+
+Common methods for code references.
+
+ has 'callback' => (
+ traits => ['Code'],
+ is => 'ro',
+ isa => 'CodeRef',
+ default => sub { sub { 'called' } },
+ handles => {
+ call => 'execute',
# ...
}
);
}
);
-=item L<Bool|Moose::Meta::Attribute::Native::Trait::Bool>
-
-Common methods for boolean values.
-
- has 'is_lit' => (
- traits => ['Bool'],
- is => 'rw',
- isa => 'Bool',
- default => 0,
- handles => {
- illuminate => 'set',
- darken => 'unset',
- flip_switch => 'toggle',
- is_dark => 'not',
- # ...
- }
- );
-
=item L<Hash|Moose::Meta::Attribute::Native::Trait::Hash>
Common methods for hash references.
}
);
-=item L<Array|Moose::Meta::Attribute::Native::Trait::Array>
+=item L<Number|Moose::Meta::Attribute::Native::Trait::Number>
-Common methods for array references.
+Common numerical operations.
- has 'queue' => (
- traits => ['Array'],
+ has 'integer' => (
+ traits => ['Number'],
is => 'ro',
- isa => 'ArrayRef[Str]',
- default => sub { [] },
+ isa => 'Int',
+ default => 5,
handles => {
- add_item => 'push',
- next_item => 'shift',
+ set => 'set',
+ add => 'add',
+ sub => 'sub',
+ mul => 'mul',
+ div => 'div',
+ mod => 'mod',
+ abs => 'abs',
# ...
}
);
-=item L<Code|Moose::Meta::Attribute::Native::Trait::Code>
+=item L<String|Moose::Meta::Attribute::Native::Trait::String>
-Common methods for code references.
+Common methods for string operations.
- has 'callback' => (
- traits => ['Code'],
- is => 'ro',
- isa => 'CodeRef',
- default => sub { sub { 'called' } },
+ has 'text' => (
+ traits => ['String'],
+ is => 'rw',
+ isa => 'Str',
+ default => q{},
handles => {
- call => 'execute',
+ add_text => 'append',
+ replace_text => 'replace',
# ...
}
);