Search results for "module:Specio"
Specio - Type constraints and coercions for Perl
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 inte...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::OO - A painfully poor reimplementation of Moo(se)
Specio can't depend on Moo or Moose, so this module provides a terrible reimplementation of a small slice of their features....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Subs - Make validation and coercion subs from Specio types
This module generates a set of helpful validation and coercion subroutines for all of the types defined in one or more libraries. To use it, simply import "Specio::Subs" passing a list of one or more library names. This module will load those librari...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Test::Specio - Test helpers for Specio
This package provides some helper functions and variables for testing Specio types....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Declare - Specio declaration subroutines
This package exports a set of type declaration helpers. Importing this package also causes it to create a "t" subroutine in the calling package....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Helpers - Helper subs for the Specio distro
There's nothing public here....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Registry - Implements the per-package type registry
There's nothing public here....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Exporter - Base class for type libraries
Inheriting from this package makes your package a type exporter. By default, types defined in a package are never visible outside of the package. When you inherit from this package, all the types you define internally become available via exports. Th...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Coercion - A class representing a coercion from one type to another
This class represents a coercion from one type to another. Internally, a coercion is a piece of code that takes a value of one type returns a new value of a new type. For example, a coercion from c<Num> to "Int" might round a number to its nearest in...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Exception - An exception class for type constraint failures
This exception class is thrown by Specio when a type check fails. It emulates the Throwable::Error API, but doesn't use that module to avoid adding a dependency on Moo....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::DeclaredAt - A class to represent where a type or coercion was declared
This class provides a thin wrapper around some of the return values from Perl's "caller" built-in. It's used internally to identify where types and coercions are being declared, which is useful when generating error messages....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::TypeChecks - Type checks used internally for Specio classes (it's not self-bootstrapping (yet?))
There's nothing public here....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::PartialDump - A partially rear-ended copy of Devel::PartialDump without prereqs
This is a copy of Devel::PartialDump with all the OO bits and prereqs removed. You may want to use this module in your own code to generate nicely formatted messages when a type constraint fails. This module optionally exports one sub, "partial_dump"...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Library::Perl - Implements type constraint objects for some common Perl language things
This library provides some additional string types for common cases. PackageName A valid package name. Unlike the "ClassName" constraint from the Specio::Library::Builtins library, this package does not need to be loaded. This type does allow Unicode...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Library::String - Implements type constraint objects for some common string types
This library provides some additional string types for common cases. NonEmptyStr A string which has at least one character. SimpleStr A string that is 255 characters or less with no vertical whitespace characters. NonEmptySimpleStr A non-empty string...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Role::Inlinable - A role for things which can be inlined (type constraints and coercions)
This role implements a common API for inlinable things, type constraints and coercions. It is fully documented in the relevant classes....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Constraint::Enum - A class for constraints which require a string matching one of a set of values
This is a specialized type constraint class for types which require a string that matches one of a list of values....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Library::Numeric - Implements type constraint objects for some common numeric types
This library provides some additional string numeric for common cases. PositiveNum PositiveOrZeroNum PositiveInt PositiveOrZeroInt NegativeNum NegativeOrZeroNum NegativeInt NegativeOrZeroInt SingleDigit A single digit from -9 to 9....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Constraint::Union - A class for union constraints
This is a specialized type constraint class for unions, which will allow a value which matches any one of several distinct types....
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC
Specio::Library::Builtins - Implements type constraint objects for Perl's built-in types
This library provides a set of types parallel to those provided by Moose. The types are in the following hierarchy Item Bool Maybe (of `a) Undef Defined Value Str Num Int ClassName Ref ScalarRef (of `a) ArrayRef (of `a) HashRef (of `a) CodeRef Regexp...
DROLSKY/Specio-0.48 - 11 Jun 2022 16:32:27 UTC