NAME
Poz::Types::is - Type handling for Poz framework
SYNOPSIS
use Poz qw/z/;
my $is_type = z->is('Some::Class');
my $obj = bless {}, 'Some::Class';
my $other_obj = bless {}, 'Some::Other::Class';
$is_type->parse($obj); # returns $obj
$is_type->parse($other_obj); # throws exception
DESCRIPTION
Poz::Types::is provides methods to handle types based on their class within the Poz. It allows setting default values, marking values as nullable or optional, and coercing values.
METHODS
- new
-
Creates a new instance of Poz::Types::is.
- rule
-
Validates the value against the type.
SEE ALSO
Poz::Types, Poz::Types::scalar
AUTHOR
ytnobody <ytnobody@gmail.com>