| MooseX-Types-Common documentation | view source | Contained in the MooseX-Types-Common distribution. |
MooseX::Types::Common::String - Commonly used string types
use MooseX::Types::Common::String qw/SimpleStr/;
has short_str => (is => 'rw', isa => SimpleStr);
...
#this will fail
$object->short_str("string\nwith\nbreaks");
A set of commonly-used string type constraints that do not ship with Moose by default.
A Str with no new-line characters.
Does what it says on the tin.
Please see:: MooseX::Types::Common
| MooseX-Types-Common documentation | view source | Contained in the MooseX-Types-Common distribution. |