Moose::Meta::Attribute::Native::Trait::String - Helper trait for Str attributes |
Moose::Meta::Attribute::Native::Trait::String - Helper trait for Str attributes
version 2.1605
package MyHomePage; use Moose;
has 'text' => ( traits => ['String'], is => 'rw', isa => 'Str', default => q{}, handles => { add_text => 'append', replace_text => 'replace', }, );
my $page = MyHomePage->new(); $page->add_text("foo"); # same as $page->text($page->text . "foo");
This trait provides native delegation methods for strings.
If you don't provide an isa
value for your attribute, it will default to
Str
.
--
, so
dec
is not available. This method returns the new value.
This method does not accept any arguments.
.=
, and returns the new value.
This method requires a single argument.
This method requires a single argument.
g
flag, but code references will be accepted for the replacement, causing
the regex to be modified with a single e
. /smxi
can be applied using the
qr
operator. This method returns the new value.
This method requires two arguments.
This method requires a single argument.
This method does not accept any arguments.
This method does not accept any arguments.
default
).
This method does not have a defined return value.
This method does not accept any arguments.
This method requires at least one argument, and accepts no more than three.
See Moose/BUGS for details on reporting bugs.
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Moose::Meta::Attribute::Native::Trait::String - Helper trait for Str attributes |