1Specio::Library::BuiltiUnsse(r3)Contributed Perl DocumenStpaetciioon::Library::Builtins(3)
2
3
4

NAME

6       Specio::Library::Builtins - Implements type constraint objects for
7       Perl's built-in types
8

VERSION

10       version 0.46
11

DESCRIPTION

13       This library provides a set of types parallel to those provided by
14       Moose.
15
16       The types are in the following hierarchy
17
18         Item
19             Bool
20             Maybe (of `a)
21             Undef
22             Defined
23                 Value
24                     Str
25                         Num
26                             Int
27                         ClassName
28                 Ref
29                     ScalarRef (of `a)
30                     ArrayRef (of `a)
31                     HashRef (of `a)
32                     CodeRef
33                     RegexpRef
34                     GlobRef
35                     FileHandle
36                     Object
37
38   Item
39       Accepts any value
40
41   Bool
42       Accepts a non-reference that is "undef", an empty string, 0, or 1. It
43       also accepts any object which overloads boolification.
44
45   Maybe (of `a)
46       A parameterizable type which accepts "undef" or the type "`a". If not
47       parameterized this type will accept any value.
48
49   Undef
50       Only accepts "undef".
51
52   Value
53       Accepts any non-reference value.
54
55   Str
56       Accepts any non-reference value or an object which overloads
57       stringification.
58
59   Num
60       Accepts nearly the same values as "Scalar::Util::looks_like_number",
61       but does not accept numbers with leading or trailing spaces,
62       infinities, or NaN. Also accepts an object which overloads
63       numification.
64
65   Int
66       Accepts any integer value, or an object which overloads numification
67       and numifies to an integer.
68
69   ClassName
70       Accepts any value which passes "Str" where the string is a loaded
71       package.
72
73   Ref
74       Accepts any reference.
75
76   ScalarRef (of `a)
77       Accepts a scalar reference or an object which overloads scalar
78       dereferencing. If parameterized, the dereferenced value must be of type
79       "`a".
80
81   ArrayRef (of `a)
82       Accepts a array reference or an object which overloads array
83       dereferencing. If parameterized, the values in the arrayref must be of
84       type "`a".
85
86   HashRef (of `a)
87       Accepts a hash reference or an object which overloads hash
88       dereferencing. If parameterized, the values in the hashref must be of
89       type "`a".
90
91   CodeRef
92       Accepts a code (sub) reference or an object which overloads code
93       dereferencing.
94
95   RegexpRef
96       Accepts a regex object created by "qr//" or an object which overloads
97       regex interpolation.
98
99   GlobRef
100       Accepts a glob reference or an object which overloads glob
101       dereferencing.
102
103   FileHandle
104       Accepts a glob reference which is an open file handle, any "IO::Handle"
105       Object or subclass, or an object which overloads glob dereferencing and
106       returns a glob reference which is an open file handle.
107
108   Object
109       Accepts any blessed object.
110

SUPPORT

112       Bugs may be submitted at
113       <https://github.com/houseabsolute/Specio/issues>.
114
115       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".
116

SOURCE

118       The source code repository for Specio can be found at
119       <https://github.com/houseabsolute/Specio>.
120

AUTHOR

122       Dave Rolsky <autarch@urth.org>
123
125       This software is Copyright (c) 2012 - 2020 by Dave Rolsky.
126
127       This is free software, licensed under:
128
129         The Artistic License 2.0 (GPL Compatible)
130
131       The full text of the license can be found in the LICENSE file included
132       with this distribution.
133
134
135
136perl v5.32.0                      2020-07-28      Specio::Library::Builtins(3)
Impressum