use B 'svref_2object';
use Sub::Exporter;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
+our $AUTHORITY = 'cpan:STEVAN';
use Moose::Meta::TypeConstraint;
use Moose::Meta::TypeCoercion;
=head1 DESCRIPTION
-This module provides Moose with the ability to create type contraints
-to be are used in both attribute definitions and for method argument
-validation.
+This module provides Moose with the ability to create custom type
+contraints to be used in attribute definition.
=head2 Important Caveat
yet to have been created yet, is to simply do this:
use DateTime;
- subtype 'DateTime' => as Object => where { $_->isa('DateTime') };
+ subtype 'DateTime' => as 'Object' => where { $_->isa('DateTime') };
=head2 Default Type Constraints
=item B<optimize_as>
+This can be used to define a "hand optimized" version of your
+type constraint which can be used to avoid traversing a subtype
+constraint heirarchy.
+
+B<NOTE:> You should only use this if you know what you are doing,
+all the built in types use this, so your subtypes (assuming they
+are shallow) will not likely need to use this.
+
=back
=head2 Type Coercion Constructors