DESCRIPTIONThis is a decorator object that contains an underlying type constraint. We use this to control access to the type constraint and to add some features.
METHODSThis class defines the following methods.
newOld school instantiation
__type_constraint ($type_constraint)Set/Get the type_constraint.
isahandle "$self->isa" since "AUTOLOAD" can't - this tries both the type constraint, and for a class type, the class.
canhandle $self->can since AUTOLOAD can't.
_throw_errorproperly delegate error messages
DESTROYWe might need it later
AUTOLOADDelegate to the decorator target, unless this is a class type, in which case it will try to delegate to the type object, then if that fails try the class. The method 'new' is special cased to only be permitted on the class; if there is no class, or it does not provide a new method, an exception will be thrown.
AUTHORRobert ``phaylon'' Sedlacek <[email protected]>
COPYRIGHT AND LICENSEThis software is copyright (c) 2007 by Robert ``phaylon'' Sedlacek.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.