The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Schema::Type::Object - Type handler for Perl objects ('object')

VERSION

version 0.134

SYNOPSIS

 use Data::Schema;

DESCRIPTION

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

TYPE ATTRIBUTES

Object is Scalar, so you might want to consult the docs of those roles to see what type attributes are available.

can_one => (meth OR [meth, ...])

Requires that the object be able (UNIVERSAL::can) to do any one of the specified methods.

can_all => (meth OR [meth, ...])

Aliases: can

Requires that the object be able (UNIVERSAL::can) to do all of the specified methods.

cannot => (meth OR [meth, ...])

Aliases: cant

Requires that the object not be able (UNIVERSAL::can) to do any of the specified methods.

isa_one => (class OR [class, ...])

Requires that the object be of (UNIVERSAL::isa) any one of the specified classes.

isa_all => (class OR [class, ...])

Aliases: isa

Requires that the object be of (UNIVERSAL::isa) all of the specified classes.

not_isa => (class OR [class, ...])

Requires that the object not be of (UNIVERSAL::isa) any of the specified classes.

AUTHOR

  Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE

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.