Specio::Exception - A Throwable::Error subclass for type constraint failures
version 0.06
This is a subclass of Throwable::Error which adds a few additional attributes specific to type constraint failures.
use Try::Tiny; try { $type->validate_or_die($value); } catch { if ( $_->isa('Specio::Exception') ) { print $_->message(), "\n"; print $_->type()->name(), "\n"; print $_->value(), "\n"; } };
The two attributes it adds are type and value, both of which are required. The type must be a Specio::Constraint::Role::Interface object, and the value can be anything (including undef).
type
value
undef
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2013 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Specio, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Specio
CPAN shell
perl -MCPAN -e shell install Specio
For more information on module installation, please visit the detailed CPAN module installation guide.