NAME
Data::Schema::Type::Sortable - Role for sortable types
SYNOPSIS
use Data::Schema;
DESCRIPTION
This is the sortable role. It provides attributes like less_than (lt), greater_than (gt), etc. It is used by many types, for example 'str', all numeric types, etc.
Role consumer must provide method '_compare' which takes two values and returns -1, 0, or 1 a la Perl's standard cmp operator.
TYPE ATTRIBUTES
min => MIN
Require that the value is not less than some specified minimum.
Synonyms: ge
minex => MIN
Require that the value is not less or equal than some specified minimum.
Synonyms: gt
max => MAX
Require that the value is less or equal than some specified maximum.
Synonyms: le
maxex => MAX
Require that the value is less than some specified maximum.
Synonyms: lt
between => [MIN, MAX]
A convenient attribut to combine min and max.
AUTHOR
Steven Haryanto, <steven at masterweb.net>
COPYRIGHT & LICENSE
Copyright 2009 Steven Haryanto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.