NAME
Data::Schema::Type::Base - Base class for Data::Schema type handler
SYNOPSIS
use Data::Schema;
DESCRIPTION
This is the base class for most type handlers. Normally you wouldn't use this type but one of its subclasses.
METHODS
handle_pre_check_attrs($data)
This method is called by handle_type()
before checking type attributes. It should return true if checking passes or false if checking fails. By default it does nothing but returns true. Override this method if you want to add additional checking.
handle_type($data, $attrhash, ...)
Check data against type (and all type attributes). Returns 1 if success, 0 if fails. You normally do not need to override this method. This method is called by the validator (Data::Schema object).
Also handle the 'required' and 'forbidden' (and their alias: 'set') attributes, these are special so they're handled here. All the other attributes are handled using 'handle_attr_XXX' methods.
english($attrhash, ...)
Show an English representation of this data type.
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.