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

Changes for version 1.007_000 - 2019-11-17

  • Bug Fixes
    • Strip underscores in version numbers for dev releases. Fixes RT#125839. <https://rt.cpan.org/Ticket/Display.html?id=125839> <https://rt.cpan.org/Ticket/Display.html?id=125839>
    • Type::Params will now keep a reference to all type constraints passed to it; this may use more memory in some cases, but will improve exceptions thrown. Fixes RT#121763. <https://rt.cpan.org/Ticket/Display.html?id=121763> <https://rt.cpan.org/Ticket/Display.html?id=121763>
    • Type::Tiny better mimics the Moose::Meta::TypeConstraint::Parameterized API, adding `parameterized_from` and `has_parameterized_from` methods. Fixes RT#114915. <https://rt.cpan.org/Ticket/Display.html?id=114915> <https://rt.cpan.org/Ticket/Display.html?id=114915>
    • Type::Tiny::Enum will now avoid triggering a Type::Tiny::XS bug involving hyphens in strings. Fixes RT#129729. <https://rt.cpan.org/Ticket/Display.html?id=129729> <https://rt.cpan.org/Ticket/Display.html?id=129729>
    • When extending a MooseX::Types library, be more careful checking to see if types have coercions, because a Moose::Meta::TypeCoercion object may be an empty list of coercions. Fixes RT#102748. <https://rt.cpan.org/Ticket/Display.html?id=102748> <https://rt.cpan.org/Ticket/Display.html?id=102748>
  • Test Suite
    • Add a test that Specio type constraints can be converted to Type::Tiny types, and inlining works.
    • Bundle some tests for Types::ReadOnly because it does interesting stuff with coercions and parameterizable types.
    • Bundle test from RT#104154, which turned out to not be a bug. <https://rt.cpan.org/Ticket/Display.html?id=104154>
    • More tests for extending MooseX::Types libraries.
  • Packaging
    • Dropped the TODO file from the repo and distribution because it was mostly out of date. Use RT instead.
  • Other
    • Added: Many type constraints now support `stringifies_to`, `numifies_to`, and `with_attribute_values` methods. Type::Tiny 1.006000 accidentally included an undocumented early implementation of these with some differences.
    • Added: Provide a control over whether types are allowed to make callbacks in inlined code.
    • Added: Type::Tiny::ConstrainedObject exists as a superclass for Type::Tiny::Class, Type::Tiny::Role, and Type::Tiny::Duck.
    • Added: When Types::TypesTiny::to_TypeTiny converts a Moose/Mouse type to a Type::Tiny type, the returned type will now be parameterizable if they original type was parameterizable.
    • Added: When importing type constraints from non-Moose/non-Mouse blessed type constraint systems (Specio, Types::Nano, others?), support inlining.
    • Smarter caching and reuse of parameterized types.

Documentation

an overview of Type::Tiny
adding coercions to type constraints
how to build a type library with Type::Tiny, Type::Library and Type::Utils
squeeze the most out of your CPU
coerce and validate arguments to functions and methods
Type::Tiny policies
how to use Type::Tiny and Type::Library with Moo
how to use Type::Tiny and Type::Library with Moose
how to use Type::Tiny and Type::Library with Mouse
how to use Type::Tiny and Type::Library with other OO frameworks

Modules

shims to allow Type::Tiny to run on Perl 5.6.x
shims to allow Type::Tiny to run on Perl 5.8.x
exceptions for Type::Tiny and friends
exception when a value fails a type constraint
exception for Eval::TypeTiny
exception for Type::Params
utility to evaluate a string of Perl code in a clean environment
improved type constraint exceptions in Reply
useful functions for testing the efficacy of type constraints
a set of coercions to a particular target type constraint
a set of coercions borrowed from Moose
a set of coercions to a union type constraint
tiny, yet Moo(se)-compatible type libraries
Params::Validate-like parameter validation using Type::Tiny type constraints and coercions
parse type constraint strings
a glorified hashref for looking up type constraints
tiny, yet Moo(se)-compatible type constraint
type constraints based on the "isa" method
shared behavour for Type::Tiny::Class, etc
type constraints based on the "can" method
string enum type constraints
intersection type constraints
type constraints based on the "DOES" method
union type constraints
half-completed overloaded operation
utility functions to make defining and using type constraints a little easier
drop-in replacement for MooseX::Types::Common::Numeric
drop-in replacement for MooseX::Types::Common::String
bundled set of built-in types for Type::Tiny
internals for the Types::Standard ArrayRef type constraint
internals for the Types::Standard CycleTuple type constraint
internals for the Types::Standard Dict type constraint
internals for the Types::Standard HashRef type constraint
internals for the Types::Standard Map type constraint
internals for the Types::Standard ScalarRef type constraint
internals for the Types::Standard StrMatch type constraint
internals for the Types::Standard Tied type constraint
internals for the Types::Standard Tuple type constraint
type constraints used internally by Type::Tiny