Data::Schema::Type::Object - Type handler for Perl objects ('object')
version 0.134
use Data::Schema;
Aliases: obj
You can validate Perl objects with this type handler.
Example schema (in YAML syntax):
- object - can: [validate]
Example valid data:
Data::Schema->new(); # can validate()
Example invalid data:
IO::Handler->new(); # cannot validate() 1; # is not a Perl object
Object is Scalar, so you might want to consult the docs of those roles to see what type attributes are available.
Requires that the object be able (UNIVERSAL::can) to do any one of the specified methods.
Aliases: can
Requires that the object be able (UNIVERSAL::can) to do all of the specified methods.
Aliases: cant
Requires that the object not be able (UNIVERSAL::can) to do any of the specified methods.
Requires that the object be of (UNIVERSAL::isa) any one of the specified classes.
Aliases: isa
Requires that the object be of (UNIVERSAL::isa) all of the specified classes.
Requires that the object not be of (UNIVERSAL::isa) any of the specified classes.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2009 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Schema, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Schema
CPAN shell
perl -MCPAN -e shell install Data::Schema
For more information on module installation, please visit the detailed CPAN module installation guide.