NAME

MooseX::Types::Varchar - Str type parameterizable by length.

SYNOPSIS

  package MyClass;
  use Moose;
  use MooseX::Types::Varchar qw/ Varchar TrimmableVarchar /;

  has 'attr1' => (is => 'rw', isa => Varchar[40]);
  has 'attr2' => (is => 'rw', isa => TrimmableVarchar[40], coerce => 1);

  package main;
  my $obj = MyClass->new(
    attr1 => 'this must be under 40 chars',
    attr2 => 'this will be trimmed to 40 chars',
  );

DESCRIPTION

This module provides a type based on Str, where a length restriction is paramterizable.

EXPORTS

Nothing by default. You will want to request "Varchar", provided as a MooseX::Types type.

SEE ALSO

MooseX::Types
MooseX::Types::Parameterizable

AUTHOR

Chris Andrews <chris@nodnol.org>

COPYRIGHT

This program is Free software, you may redistribute it under the same terms as Perl itself.