11 Jun 2022 16:32:27 UTC
- Distribution: Specio
- Module version: 0.48
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (3)
- Testers (743 / 1 / 0)
- KwaliteeBus factor: 1
- 91.85% Coverage
- License: artistic_2
- Perl: v5.8.0
- Activity24 month
- Download (105.76KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:5 non-PAUSE usersDROLSKY Dave Rolsky
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- COPYRIGHT AND LICENSE
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 RegexpRef GlobRef FileHandle Object
Accepts any value
Accepts a non-reference that is
undef, an empty string,
1. It also accepts any object which overloads boolification.
A parameterizable type which accepts
undefor the type
`a. If not parameterized this type will accept any value.
Accepts any non-reference value.
Accepts any non-reference value or an object which overloads stringification.
Accepts nearly the same values as
Scalar::Util::looks_like_number, but does not accept numbers with leading or trailing spaces, infinities, or NaN. Also accepts an object which overloads numification.
Accepts any integer value, or an object which overloads numification and numifies to an integer.
Accepts any value which passes
Strwhere the string is a loaded package.
Accepts any reference.
Accepts a scalar reference or an object which overloads scalar dereferencing. If parameterized, the dereferenced value must be of type
Accepts a array reference or an object which overloads array dereferencing. If parameterized, the values in the arrayref must be of type
Accepts a hash reference or an object which overloads hash dereferencing. If parameterized, the values in the hashref must be of type
Accepts a code (sub) reference or an object which overloads code dereferencing.
Accepts a regex object created by
qr//or an object which overloads regex interpolation.
Accepts a glob reference or an object which overloads glob dereferencing.
Accepts a glob reference which is an open file handle, any
IO::HandleObject or subclass, or an object which overloads glob dereferencing and returns a glob reference which is an open file handle.
Accepts any blessed object.
Bugs may be submitted at https://github.com/houseabsolute/Specio/issues.
The source code repository for Specio can be found at https://github.com/houseabsolute/Specio.
Dave Rolsky <firstname.lastname@example.org>
This software is Copyright (c) 2012 - 2022 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution.