- New upstream release 0.39
- Many bug fixes and improvements to the types created by
{any,object}_{can,does,isa}_type; in some cases, an invalid value could
cause an exception in type check itself, and in other cases, a value that
failed a type check would cause an exception when generating a message
describing the failure
- The messages describing a failure for all of these types have been improved
- You can now create anonymous *_does and *_isa types using the exports from
Specio::Declare
- New upstream release 0.38
- Simplify checks for overloading to not call overload::Overloaded(); just
checking the return value of overload::Method() is sufficient
- New upstream release 0.36
- Inlined coercions would attempt to coerce for every type that matched the
value given, instead of stopping after the first type (GH#11)
- Inlined coercions did not include the inline environment variables needed
by the type from which the coercion was being performed (GH#8)
- When you use the same type repeatedly as coderef (for example, as a
constraint with Moo), it will only generate its subified form once, rather
than regenerating it each time it is de-referenced
- Added an API to Specio::Subs to allow you to combine type libraries and
helper subs in one package for exporting; see the Specio::Exporter docs for
more detail
- New upstream release 0.35
- Added Specio::Subs, a module that allows you to turn one or more library's
types into subroutines like is_Int() and to_Int()
- Added an inline_coercion method to Specio constraints
- New upstream release 0.34
- Packages with Specio::Exporter can now specify additional arbitrary subs to
exporter; see the Specio::Exporter docs for details
- Importing the same library twice in a given package would throw an
exception; the second attempt to import is now ignored
- New upstream release 0.33
- Fixed a mistake in the SYNOPSIS for Specio::Declare; the example for the
- *_isa_type helpers was not correct
- Removed the alpha warning from the docs; this is being used by enough of my
modules on CPAN that I don't plan on doing any big breaking changes without
a deprecation first
- New upstream release 0.32
- Fixed a bug in the inlining for types create by any_can_type() and
object_can_type(); this inlining mostly worked by accident because of some
List::Util XS magic, but this broke under the debugger (GH#17,
https://github.com/houseabsolute/DateTime.pm/issues/49)
- New upstream release 0.31
- The stack trace contained by Specio::Exception objects no longer includes
stack frames for the Specio::Exception package
- Made the inline_environment() and description() methods public on type and
coercion objects
The Specio will replace Moose type constrain system in the future.
Thus Moose will run-require Specio in the future. Therefore the best
place for cutting the build cycle are perl-Specio optional tests.
There is similar issue with perl-Mouse that build-require perl-Moose
for optional tests. The tests make sense there because Mouse tries to
mimic Moose.
- New upstream release 0.30
- Fix a bug with the Sub::Quoted sub returned by $type->coercion_sub; if a
type had more than one coercion, the generated sub could end up coercing
the value to undef some of the time and, depending on hash key ordering,
this could end up being a heisenbug that only occured some of the time
- New upstream release 0.28
- Added a Test::Specio module to provide helpers for testing Specio libraries
- Fixed another bug with a subtype of special types and inlining
- Introduce sub-package perl-Test-Specio to avoid dependencies on Test::Fatal
and Test::More in main package
- New upstream release 0.27
- Cloning a type with coercions defined on it would cause an exception
- Creating a subtype of a special type created by *_isa_type, *_can_type, or
*_does_type, or enum would die when trying to inline type constraint
- Removed the never-documented Any type
- Added documentation for each type in Specio::Library::Builtins
- New upstream release 0.25
- Calling {any,object}_{isa,does}_type repeatedly in a package with the same
class or role name would die; these subs are now special-cased to simply
return an existing type for the given name when they receive a single
argument (the name of the class or role)
The Specio distribution provides classes for representing type constraints
and coercion, along with syntax sugar for declaring them.
Note that this is not a proper type system for Perl. Nothing in this
distribution will magically make the Perl interpreter start checking a value's
type on assignment to a variable. In fact, there's no built-in way to apply a
type to a variable at all.
Instead, you can explicitly check a value against a type, and optionally coerce
values to that type.