diff options
Diffstat (limited to 'lib')
45 files changed, 97 insertions, 68 deletions
diff --git a/lib/Devel/TypeTiny/Perl58Compat.pm b/lib/Devel/TypeTiny/Perl58Compat.pm index e6231646..c515aef8 100644 --- a/lib/Devel/TypeTiny/Perl58Compat.pm +++ b/lib/Devel/TypeTiny/Perl58Compat.pm @@ -7,7 +7,7 @@ use strict; use warnings; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '2.000000'; +our $VERSION = '2.000001'; $VERSION =~ tr/_//d; diff --git a/lib/Error/TypeTiny.pm b/lib/Error/TypeTiny.pm index 7a544d2a..d4e6562e 100644 --- a/lib/Error/TypeTiny.pm +++ b/lib/Error/TypeTiny.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Error::TypeTiny::AUTHORITY = 'cpan:TOBYINK'; - $Error::TypeTiny::VERSION = '2.000000'; + $Error::TypeTiny::VERSION = '2.000001'; } $Error::TypeTiny::VERSION =~ tr/_//d; diff --git a/lib/Error/TypeTiny/Assertion.pm b/lib/Error/TypeTiny/Assertion.pm index 56fed0a2..b36a7ac7 100644 --- a/lib/Error/TypeTiny/Assertion.pm +++ b/lib/Error/TypeTiny/Assertion.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Error::TypeTiny::Assertion::AUTHORITY = 'cpan:TOBYINK'; - $Error::TypeTiny::Assertion::VERSION = '2.000000'; + $Error::TypeTiny::Assertion::VERSION = '2.000001'; } $Error::TypeTiny::Assertion::VERSION =~ tr/_//d; diff --git a/lib/Error/TypeTiny/Compilation.pm b/lib/Error/TypeTiny/Compilation.pm index 8ff062ed..be917d2e 100644 --- a/lib/Error/TypeTiny/Compilation.pm +++ b/lib/Error/TypeTiny/Compilation.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Error::TypeTiny::Compilation::AUTHORITY = 'cpan:TOBYINK'; - $Error::TypeTiny::Compilation::VERSION = '2.000000'; + $Error::TypeTiny::Compilation::VERSION = '2.000001'; } $Error::TypeTiny::Compilation::VERSION =~ tr/_//d; diff --git a/lib/Error/TypeTiny/WrongNumberOfParameters.pm b/lib/Error/TypeTiny/WrongNumberOfParameters.pm index c3675f2a..b424e558 100644 --- a/lib/Error/TypeTiny/WrongNumberOfParameters.pm +++ b/lib/Error/TypeTiny/WrongNumberOfParameters.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Error::TypeTiny::WrongNumberOfParameters::AUTHORITY = 'cpan:TOBYINK'; - $Error::TypeTiny::WrongNumberOfParameters::VERSION = '2.000000'; + $Error::TypeTiny::WrongNumberOfParameters::VERSION = '2.000001'; } $Error::TypeTiny::WrongNumberOfParameters::VERSION =~ tr/_//d; diff --git a/lib/Eval/TypeTiny.pm b/lib/Eval/TypeTiny.pm index 8972e023..128793b5 100644 --- a/lib/Eval/TypeTiny.pm +++ b/lib/Eval/TypeTiny.pm @@ -63,7 +63,7 @@ BEGIN { } our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '2.000000'; +our $VERSION = '2.000001'; our @EXPORT = qw( eval_closure ); our @EXPORT_OK = qw( HAS_LEXICAL_SUBS HAS_LEXICAL_VARS ALIAS_IMPLEMENTATION diff --git a/lib/Eval/TypeTiny/CodeAccumulator.pm b/lib/Eval/TypeTiny/CodeAccumulator.pm index 8d94c307..3e13373f 100644 --- a/lib/Eval/TypeTiny/CodeAccumulator.pm +++ b/lib/Eval/TypeTiny/CodeAccumulator.pm @@ -10,7 +10,7 @@ BEGIN { BEGIN { $Eval::TypeTiny::CodeAccumulator::AUTHORITY = 'cpan:TOBYINK'; - $Eval::TypeTiny::CodeAccumulator::VERSION = '2.000000'; + $Eval::TypeTiny::CodeAccumulator::VERSION = '2.000001'; } $Eval::TypeTiny::CodeAccumulator::VERSION =~ tr/_//d; diff --git a/lib/Reply/Plugin/TypeTiny.pm b/lib/Reply/Plugin/TypeTiny.pm index 784d60df..4cd35e48 100644 --- a/lib/Reply/Plugin/TypeTiny.pm +++ b/lib/Reply/Plugin/TypeTiny.pm @@ -5,7 +5,7 @@ use warnings; BEGIN { $Reply::Plugin::TypeTiny::AUTHORITY = 'cpan:TOBYINK'; - $Reply::Plugin::TypeTiny::VERSION = '2.000000'; + $Reply::Plugin::TypeTiny::VERSION = '2.000001'; } $Reply::Plugin::TypeTiny::VERSION =~ tr/_//d; diff --git a/lib/Test/TypeTiny.pm b/lib/Test/TypeTiny.pm index 1e06154a..bac23b05 100644 --- a/lib/Test/TypeTiny.pm +++ b/lib/Test/TypeTiny.pm @@ -16,7 +16,7 @@ BEGIN { } our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '2.000000'; +our $VERSION = '2.000001'; our @EXPORT = qw( should_pass should_fail ok_subtype ); our @EXPORT_OK = qw( EXTENDED_TESTING matchfor ); diff --git a/lib/Type/Coercion.pm b/lib/Type/Coercion.pm index d2372a92..510aa1b7 100644 --- a/lib/Type/Coercion.pm +++ b/lib/Type/Coercion.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Coercion::AUTHORITY = 'cpan:TOBYINK'; - $Type::Coercion::VERSION = '2.000000'; + $Type::Coercion::VERSION = '2.000001'; } $Type::Coercion::VERSION =~ tr/_//d; diff --git a/lib/Type/Coercion/FromMoose.pm b/lib/Type/Coercion/FromMoose.pm index 48861a8e..7d2e0ded 100644 --- a/lib/Type/Coercion/FromMoose.pm +++ b/lib/Type/Coercion/FromMoose.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Coercion::FromMoose::AUTHORITY = 'cpan:TOBYINK'; - $Type::Coercion::FromMoose::VERSION = '2.000000'; + $Type::Coercion::FromMoose::VERSION = '2.000001'; } $Type::Coercion::FromMoose::VERSION =~ tr/_//d; diff --git a/lib/Type/Coercion/Union.pm b/lib/Type/Coercion/Union.pm index 4233bd7e..961c658c 100644 --- a/lib/Type/Coercion/Union.pm +++ b/lib/Type/Coercion/Union.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Coercion::Union::AUTHORITY = 'cpan:TOBYINK'; - $Type::Coercion::Union::VERSION = '2.000000'; + $Type::Coercion::Union::VERSION = '2.000001'; } $Type::Coercion::Union::VERSION =~ tr/_//d; diff --git a/lib/Type/Library.pm b/lib/Type/Library.pm index 0a7d1f54..122eccd4 100644 --- a/lib/Type/Library.pm +++ b/lib/Type/Library.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Library::AUTHORITY = 'cpan:TOBYINK'; - $Type::Library::VERSION = '2.000000'; + $Type::Library::VERSION = '2.000001'; } $Type::Library::VERSION =~ tr/_//d; diff --git a/lib/Type/Params.pm b/lib/Type/Params.pm index e074ff20..9c3e7994 100644 --- a/lib/Type/Params.pm +++ b/lib/Type/Params.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Params::AUTHORITY = 'cpan:TOBYINK'; - $Type::Params::VERSION = '2.000000'; + $Type::Params::VERSION = '2.000001'; } $Type::Params::VERSION =~ tr/_//d; diff --git a/lib/Type/Params/Alternatives.pm b/lib/Type/Params/Alternatives.pm index 3d6b48ca..b39e7767 100644 --- a/lib/Type/Params/Alternatives.pm +++ b/lib/Type/Params/Alternatives.pm @@ -12,7 +12,7 @@ BEGIN { BEGIN { $Type::Params::Alternatives::AUTHORITY = 'cpan:TOBYINK'; - $Type::Params::Alternatives::VERSION = '2.000000'; + $Type::Params::Alternatives::VERSION = '2.000001'; } $Type::Params::Alternatives::VERSION =~ tr/_//d; diff --git a/lib/Type/Params/Parameter.pm b/lib/Type/Params/Parameter.pm index 4e3be2f1..a5990496 100644 --- a/lib/Type/Params/Parameter.pm +++ b/lib/Type/Params/Parameter.pm @@ -12,7 +12,7 @@ BEGIN { BEGIN { $Type::Params::Parameter::AUTHORITY = 'cpan:TOBYINK'; - $Type::Params::Parameter::VERSION = '2.000000'; + $Type::Params::Parameter::VERSION = '2.000001'; } $Type::Params::Parameter::VERSION =~ tr/_//d; diff --git a/lib/Type/Params/Signature.pm b/lib/Type/Params/Signature.pm index a9628b8b..11d9449c 100644 --- a/lib/Type/Params/Signature.pm +++ b/lib/Type/Params/Signature.pm @@ -12,7 +12,7 @@ BEGIN { BEGIN { $Type::Params::Signature::AUTHORITY = 'cpan:TOBYINK'; - $Type::Params::Signature::VERSION = '2.000000'; + $Type::Params::Signature::VERSION = '2.000001'; } $Type::Params::Signature::VERSION =~ tr/_//d; diff --git a/lib/Type/Parser.pm b/lib/Type/Parser.pm index bb0e97a9..32c09196 100644 --- a/lib/Type/Parser.pm +++ b/lib/Type/Parser.pm @@ -7,7 +7,7 @@ use warnings; sub _croak ($;@) { require Error::TypeTiny; goto \&Error::TypeTiny::croak } our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '2.000000'; +our $VERSION = '2.000001'; $VERSION =~ tr/_//d; @@ -200,7 +200,7 @@ Evaluate: { package Type::Parser::AstBuilder; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; $VERSION =~ tr/_//d; @@ -349,7 +349,7 @@ Evaluate: { package Type::Parser::Token; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; $VERSION =~ tr/_//d; @@ -361,7 +361,7 @@ Evaluate: { package Type::Parser::TokenStream; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; $VERSION =~ tr/_//d; diff --git a/lib/Type/Registry.pm b/lib/Type/Registry.pm index 6f03d24d..9d32e1d7 100644 --- a/lib/Type/Registry.pm +++ b/lib/Type/Registry.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Registry::AUTHORITY = 'cpan:TOBYINK'; - $Type::Registry::VERSION = '2.000000'; + $Type::Registry::VERSION = '2.000001'; } $Type::Registry::VERSION =~ tr/_//d; diff --git a/lib/Type/Tie.pm b/lib/Type/Tie.pm index 9a9ba754..7942fafa 100644 --- a/lib/Type/Tie.pm +++ b/lib/Type/Tie.pm @@ -11,7 +11,7 @@ use Scalar::Util (); { package Type::Tie; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; our @ISA = qw( Exporter::Tiny ); our @EXPORT = qw( ttie ); @@ -40,7 +40,7 @@ use Scalar::Util (); { package Type::Tie::BASE; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; $VERSION =~ tr/_//d; @@ -165,7 +165,7 @@ use Scalar::Util (); { package Type::Tie::ARRAY; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; our @ISA = qw( Type::Tie::BASE ); $VERSION =~ tr/_//d; @@ -203,7 +203,7 @@ use Scalar::Util (); { package Type::Tie::HASH; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; our @ISA = qw( Type::Tie::BASE ); $VERSION =~ tr/_//d; @@ -229,7 +229,7 @@ use Scalar::Util (); { package Type::Tie::SCALAR; our $AUTHORITY = 'cpan:TOBYINK'; - our $VERSION = '2.000000'; + our $VERSION = '2.000001'; our @ISA = qw( Type::Tie::BASE ); $VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny.pm b/lib/Type/Tiny.pm index 78d6eb39..2caa4541 100644 --- a/lib/Type/Tiny.pm +++ b/lib/Type/Tiny.pm @@ -10,7 +10,7 @@ BEGIN { BEGIN { $Type::Tiny::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::VERSION = '2.000000'; + $Type::Tiny::VERSION = '2.000001'; $Type::Tiny::XS_VERSION = '0.016'; } diff --git a/lib/Type/Tiny/Class.pm b/lib/Type/Tiny/Class.pm index 9e1046b0..94373b32 100644 --- a/lib/Type/Tiny/Class.pm +++ b/lib/Type/Tiny/Class.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::Class::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::Class::VERSION = '2.000000'; + $Type::Tiny::Class::VERSION = '2.000001'; } $Type::Tiny::Class::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/ConstrainedObject.pm b/lib/Type/Tiny/ConstrainedObject.pm index 3ddf6691..f463801c 100644 --- a/lib/Type/Tiny/ConstrainedObject.pm +++ b/lib/Type/Tiny/ConstrainedObject.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::ConstrainedObject::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::ConstrainedObject::VERSION = '2.000000'; + $Type::Tiny::ConstrainedObject::VERSION = '2.000001'; } $Type::Tiny::ConstrainedObject::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/Duck.pm b/lib/Type/Tiny/Duck.pm index 67b30462..20dbf3f8 100644 --- a/lib/Type/Tiny/Duck.pm +++ b/lib/Type/Tiny/Duck.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::Duck::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::Duck::VERSION = '2.000000'; + $Type::Tiny::Duck::VERSION = '2.000001'; } $Type::Tiny::Duck::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/Enum.pm b/lib/Type/Tiny/Enum.pm index c6dad7bb..a4ed8d6a 100644 --- a/lib/Type/Tiny/Enum.pm +++ b/lib/Type/Tiny/Enum.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::Enum::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::Enum::VERSION = '2.000000'; + $Type::Tiny::Enum::VERSION = '2.000001'; } $Type::Tiny::Enum::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/Intersection.pm b/lib/Type/Tiny/Intersection.pm index f3b36708..86865c97 100644 --- a/lib/Type/Tiny/Intersection.pm +++ b/lib/Type/Tiny/Intersection.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::Intersection::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::Intersection::VERSION = '2.000000'; + $Type::Tiny::Intersection::VERSION = '2.000001'; } $Type::Tiny::Intersection::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/Role.pm b/lib/Type/Tiny/Role.pm index 36e27ee9..75d92982 100644 --- a/lib/Type/Tiny/Role.pm +++ b/lib/Type/Tiny/Role.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::Role::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::Role::VERSION = '2.000000'; + $Type::Tiny::Role::VERSION = '2.000001'; } $Type::Tiny::Role::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/Union.pm b/lib/Type/Tiny/Union.pm index f097eda7..d13b5dd9 100644 --- a/lib/Type/Tiny/Union.pm +++ b/lib/Type/Tiny/Union.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::Union::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::Union::VERSION = '2.000000'; + $Type::Tiny::Union::VERSION = '2.000001'; } $Type::Tiny::Union::VERSION =~ tr/_//d; @@ -30,7 +30,7 @@ sub new_by_overload { if ( my @makers = map scalar( blessed($_) && $_->can( 'new_union' ) ), @types ) { my $first_maker = shift @makers; if ( ref $first_maker ) { - my $all_same = not grep $_ ne $first_maker, @makers; + my $all_same = not grep +( !defined $_ or $_ ne $first_maker ), @makers; if ( $all_same ) { return ref( $types[0] )->$first_maker( %opts ); } diff --git a/lib/Type/Tiny/_DeclaredType.pm b/lib/Type/Tiny/_DeclaredType.pm index 7bfa8ae3..67e4e3b5 100644 --- a/lib/Type/Tiny/_DeclaredType.pm +++ b/lib/Type/Tiny/_DeclaredType.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::_DeclaredType::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::_DeclaredType::VERSION = '2.000000'; + $Type::Tiny::_DeclaredType::VERSION = '2.000001'; } $Type::Tiny::_DeclaredType::VERSION =~ tr/_//d; diff --git a/lib/Type/Tiny/_HalfOp.pm b/lib/Type/Tiny/_HalfOp.pm index f7e4e758..50625317 100644 --- a/lib/Type/Tiny/_HalfOp.pm +++ b/lib/Type/Tiny/_HalfOp.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Tiny::_HalfOp::AUTHORITY = 'cpan:TOBYINK'; - $Type::Tiny::_HalfOp::VERSION = '2.000000'; + $Type::Tiny::_HalfOp::VERSION = '2.000001'; } $Type::Tiny::_HalfOp::VERSION =~ tr/_//d; diff --git a/lib/Type/Utils.pm b/lib/Type/Utils.pm index 7464ea81..06b97402 100644 --- a/lib/Type/Utils.pm +++ b/lib/Type/Utils.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Type::Utils::AUTHORITY = 'cpan:TOBYINK'; - $Type::Utils::VERSION = '2.000000'; + $Type::Utils::VERSION = '2.000001'; } $Type::Utils::VERSION =~ tr/_//d; diff --git a/lib/Types/Common.pm b/lib/Types/Common.pm index e61df8ad..03ccb41c 100644 --- a/lib/Types/Common.pm +++ b/lib/Types/Common.pm @@ -11,7 +11,7 @@ BEGIN { BEGIN { $Types::Common::AUTHORITY = 'cpan:TOBYINK'; - $Types::Common::VERSION = '2.000000'; + $Types::Common::VERSION = '2.000001'; } our ( @EXPORT, @EXPORT_OK, %EXPORT_TAGS ); diff --git a/lib/Types/Common/Numeric.pm b/lib/Types/Common/Numeric.pm index 5d77d3ff..ac0fccba 100644 --- a/lib/Types/Common/Numeric.pm +++ b/lib/Types/Common/Numeric.pm @@ -6,7 +6,7 @@ use warnings; BEGIN { $Types::Common::Numeric::AUTHORITY = 'cpan:TOBYINK'; - $Types::Common::Numeric::VERSION = '2.000000'; + $Types::Common::Numeric::VERSION = '2.000001'; } $Types::Common::Numeric::VERSION =~ tr/_//d; diff --git a/lib/Types/Common/String.pm b/lib/Types/Common/String.pm index d4d546c8..e8a817a7 100644 --- a/lib/Types/Common/String.pm +++ b/lib/Types/Common/String.pm @@ -7,7 +7,7 @@ use utf8; BEGIN { $Types::Common::String::AUTHORITY = 'cpan:TOBYINK'; - $Types::Common::String::VERSION = '2.000000'; + $Types::Common::String::VERSION = '2.000001'; } $Types::Common::String::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard.pm b/lib/Types/Standard.pm index 28f01e47..dd061233 100644 --- a/lib/Types/Standard.pm +++ b/lib/Types/Standard.pm @@ -11,7 +11,7 @@ BEGIN { BEGIN { $Types::Standard::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::VERSION = '2.000000'; + $Types::Standard::VERSION = '2.000001'; } $Types::Standard::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/ArrayRef.pm b/lib/Types/Standard/ArrayRef.pm index 9178f0f7..2ce5351c 100644 --- a/lib/Types/Standard/ArrayRef.pm +++ b/lib/Types/Standard/ArrayRef.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::ArrayRef::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::ArrayRef::VERSION = '2.000000'; + $Types::Standard::ArrayRef::VERSION = '2.000001'; } $Types::Standard::ArrayRef::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/CycleTuple.pm b/lib/Types/Standard/CycleTuple.pm index 10005ec4..1f20cc44 100644 --- a/lib/Types/Standard/CycleTuple.pm +++ b/lib/Types/Standard/CycleTuple.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::CycleTuple::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::CycleTuple::VERSION = '2.000000'; + $Types::Standard::CycleTuple::VERSION = '2.000001'; } $Types::Standard::CycleTuple::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/Dict.pm b/lib/Types/Standard/Dict.pm index 4f8ae1c2..ce1347e2 100644 --- a/lib/Types/Standard/Dict.pm +++ b/lib/Types/Standard/Dict.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::Dict::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::Dict::VERSION = '2.000000'; + $Types::Standard::Dict::VERSION = '2.000001'; } $Types::Standard::Dict::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/HashRef.pm b/lib/Types/Standard/HashRef.pm index 663534e8..5cb2d391 100644 --- a/lib/Types/Standard/HashRef.pm +++ b/lib/Types/Standard/HashRef.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::HashRef::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::HashRef::VERSION = '2.000000'; + $Types::Standard::HashRef::VERSION = '2.000001'; } $Types::Standard::HashRef::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/Map.pm b/lib/Types/Standard/Map.pm index 344ac651..c70fafec 100644 --- a/lib/Types/Standard/Map.pm +++ b/lib/Types/Standard/Map.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::Map::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::Map::VERSION = '2.000000'; + $Types::Standard::Map::VERSION = '2.000001'; } $Types::Standard::Map::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/ScalarRef.pm b/lib/Types/Standard/ScalarRef.pm index e4791455..418bb1db 100644 --- a/lib/Types/Standard/ScalarRef.pm +++ b/lib/Types/Standard/ScalarRef.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::ScalarRef::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::ScalarRef::VERSION = '2.000000'; + $Types::Standard::ScalarRef::VERSION = '2.000001'; } $Types::Standard::ScalarRef::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/StrMatch.pm b/lib/Types/Standard/StrMatch.pm index 01fac75e..82f2c878 100644 --- a/lib/Types/Standard/StrMatch.pm +++ b/lib/Types/Standard/StrMatch.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::StrMatch::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::StrMatch::VERSION = '2.000000'; + $Types::Standard::StrMatch::VERSION = '2.000001'; } $Types::Standard::StrMatch::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/Tied.pm b/lib/Types/Standard/Tied.pm index cd3109e0..cd676212 100644 --- a/lib/Types/Standard/Tied.pm +++ b/lib/Types/Standard/Tied.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::Tied::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::Tied::VERSION = '2.000000'; + $Types::Standard::Tied::VERSION = '2.000001'; } $Types::Standard::Tied::VERSION =~ tr/_//d; diff --git a/lib/Types/Standard/Tuple.pm b/lib/Types/Standard/Tuple.pm index 4e53dff5..8ad344eb 100644 --- a/lib/Types/Standard/Tuple.pm +++ b/lib/Types/Standard/Tuple.pm @@ -8,7 +8,7 @@ use warnings; BEGIN { $Types::Standard::Tuple::AUTHORITY = 'cpan:TOBYINK'; - $Types::Standard::Tuple::VERSION = '2.000000'; + $Types::Standard::Tuple::VERSION = '2.000001'; } $Types::Standard::Tuple::VERSION =~ tr/_//d; diff --git a/lib/Types/TypeTiny.pm b/lib/Types/TypeTiny.pm index 0402a7c3..669c93a4 100644 --- a/lib/Types/TypeTiny.pm +++ b/lib/Types/TypeTiny.pm @@ -5,7 +5,7 @@ use strict; use warnings; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '2.000000'; +our $VERSION = '2.000001'; $VERSION =~ tr/_//d; @@ -439,7 +439,7 @@ my %ttt_cache; sub _is_ForeignTypeConstraint { my $t = @_ ? $_[0] : $_; return !!1 if ref $t eq 'CODE'; - if ( my $class = blessed $t) { + if ( my $class = blessed $t ) { return !!0 if $class->isa( "Type::Tiny" ); return !!1 if $class->isa( "Moose::Meta::TypeConstraint" ); return !!1 if $class->isa( "MooseX::Types::TypeDecorator" ); @@ -838,23 +838,52 @@ Yes, the underscore is included. =item C<< to_TypeTiny($constraint) >> -Promotes (or "demotes" if you prefer) a Moose::Meta::TypeConstraint object -to a Type::Tiny object. +Promotes (or "demotes" if you prefer) a "foreign" type constraint to a +Type::Tiny object. Can handle: + +=over + +=item * + +Moose types (including L<Moose::Meta::TypeConstraint> objects and +L<MooseX::Types::TypeDecorator> objects). + +=item * + +Mouse types (including L<Mouse::Meta::TypeConstraint> objects). + +=item * -Can also handle L<Validation::Class> objects. Type constraints built from -Validation::Class objects deliberately I<ignore> field filters when they -do constraint checking (and go to great lengths to do so); using filters for -coercion only. (The behaviour of C<coerce> if we don't do that is just too -weird!) +L<Validation::Class> and L<Validation::Class::Simple> objects. -Can also handle any object providing C<check> and C<get_message> methods. -(This includes L<Mouse::Meta::TypeConstraint> objects.) If the object also -provides C<has_coercion> and C<coerce> methods, these will be used too. +=item * + +Types built using L<Type::Library::Compiler>. + +=item * + +Any object which provides C<check> and C<get_message> methods. +(This includes L<Specio> and L<Type::Nano> types.) If the object +provides C<has_coercion> and L<coerce> methods, these will +be used to handle quoting. If the object provides C<can_be_inlined> +and C<inline_check> methods, these will be used to handling inlining. +If the object provides a C<name> method, this will be assumed to +return the type name. + +=item * + +Coderefs (but not blessed coderefs or objects overloading C<< &{} >> +unless they provide the methods described above!) Coderefs are expected +to return true iff C<< $_ >> passes the constraint. If C<< $_ >> fails +the type constraint, they may either return false, or die with a helpful +error message. + +=item * + +L<Sub::Quote>-enabled coderefs. These are handled the same way as above, +but Type::Tiny will consult Sub::Quote to determine if they can be inlined. -Can also handle coderefs (but not blessed coderefs or objects overloading -C<< &{} >>). Coderefs are expected to return true iff C<< $_ >> passes the -constraint. If C<< $_ >> fails the type constraint, they may either return -false, or die with a helpful error message. +=back =back |