2016-09-19 00:42:42 +02:00
|
|
|
The Specio distribution provides classes for representing type
|
|
|
|
constraints and coercion, along with syntax sugar for declaring
|
|
|
|
them.
|
2016-09-18 09:15:35 +02:00
|
|
|
|
2016-09-19 00:42:42 +02:00
|
|
|
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.
|
2016-09-18 09:15:35 +02:00
|
|
|
|
2016-09-19 00:42:42 +02:00
|
|
|
Instead, you can explicitly check a value against a type, and
|
|
|
|
optionally coerce values to that type.
|