1Type::Tiny::Manual::AllUTsyepresC(o3n)tributed Perl DocuTmyepnet:a:tTiionny::Manual::AllTypes(3)
2
3
4
6 Type::Tiny::Manual::AllTypes - alphabetical list of all type
7 constraints bundled with Type::Tiny
8
10 The following is a list of type constraints bundled with Type::Tiny,
11 with very brief descriptions. For more information, see the type
12 library's documentation, and the test cases in "t/21-types/".
13
14 GitHub link:
15 <https://github.com/tobyink/p5-type-tiny/tree/master/t/21-types>.
16
17 • Any in Types::Standard
18
19 Anything. Absolutely anything.
20
21 • ArrayLike [parameterizable] in Types::TypeTiny
22
23 Arrayrefs and objects overloading arrayfication.
24
25 • ArrayRef [parameterizable] in Types::Standard
26
27 Arrayrefs.
28
29 • Bool [has coercion] in Types::Standard
30
31 Booleans; the numbers or strings "0" and "1", the empty string, or
32 undef.
33
34 • BoolLike in Types::TypeTiny
35
36 Similar to Bool, but without coercions, and accepts objects
37 overloading "bool".
38
39 • ClassName in Types::Standard
40
41 Any loaded package name.
42
43 • CodeLike in Types::TypeTiny
44
45 Coderefs and objects overloading coderefification.
46
47 • CodeRef in Types::Standard
48
49 Coderefs.
50
51 • ConsumerOf [parameterizable] in Types::Standard
52
53 An object that DOES a particular role.
54
55 • CycleTuple [parameterizable] in Types::Standard
56
57 An arrayref with a repeating pattern of constraints on its values.
58
59 • Defined in Types::Standard
60
61 Any value other than undef.
62
63 • DelimitedStr [parameterizable] in Types::Common::String
64
65 A comma-delimited or other delimited string.
66
67 • Dict [parameterizable] in Types::Standard
68
69 A hashref with constraints on each of its values.
70
71 • Enum [parameterizable] in Types::Standard
72
73 A string from an allowed set of strings.
74
75 • _ForeignTypeConstraint in Types::TypeTiny
76
77 A coderef or an object which Type::Tiny knows how to convert into a
78 Type::Tiny instance. (Yes, the name of this type starts with an
79 underscore.)
80
81 • FileHandle in Types::Standard
82
83 A reference where Scalar::Util::openhandle returns true, or a
84 blessed object in the IO::Handle class.
85
86 • GlobRef in Types::Standard
87
88 Globrefs
89
90 • HashLike [parameterizable] in Types::TypeTiny
91
92 Hashrefs and objects overloading hashrefification.
93
94 • HashRef [parameterizable] in Types::Standard
95
96 Hashrefs.
97
98 • HasMethods [parameterizable] in Types::Standard
99
100 An object that can do particular methods.
101
102 • InstanceOf [parameterizable] in Types::Standard
103
104 An object that isa particular class.
105
106 • Int in Types::Standard
107
108 A whole number, either positive, negative, or zero.
109
110 • IntRange [parameterizable] in Types::Common::Numeric
111
112 An integer within a particular numeric range.
113
114 • Item in Types::Standard
115
116 Any single item; effectively the same as Any.
117
118 • LaxNum in Types::Standard
119
120 A number; relaxed constraint that allows "inf".
121
122 • LowerCaseSimpleStr [has coercion] in Types::Common::String
123
124 A string less than 256 characters long with no line breaks or
125 uppercase letters.
126
127 • LowerCaseStr [has coercion] in Types::Common::String
128
129 A string with no uppercase letters.
130
131 • Map [parameterizable] in Types::Standard
132
133 A hashref with a constraint for the values and keys.
134
135 • Maybe [parameterizable] in Types::Standard
136
137 When parameterized, the same as its parameter, but also allows
138 undef.
139
140 • NegativeInt in Types::Common::Numeric
141
142 An integer below 0.
143
144 • NegativeNum in Types::Common::Numeric
145
146 A number below 0.
147
148 • NegativeOrZeroInt in Types::Common::Numeric
149
150 An integer below 0, or 0.
151
152 • NegativeOrZeroNum in Types::Common::Numeric
153
154 A number below 0, or 0.
155
156 • NonEmptySimpleStr in Types::Common::String
157
158 A string with more than 0 but less than 256 characters with no line
159 breaks.
160
161 • NonEmptyStr in Types::Common::String
162
163 A string with more than 0 characters.
164
165 • Num in Types::Standard
166
167 The same as LaxNum or StrictNum depending on environment.
168
169 • NumericCode [has coercion] in Types::Common::String
170
171 A string containing only digits.
172
173 • NumRange [parameterizable] in Types::Common::Numeric
174
175 A number within a particular numeric range.
176
177 • Object in Types::Standard
178
179 A blessed object.
180
181 • Optional [parameterizable] in Types::Standard
182
183 Used in conjunction with Dict, Tuple, or CycleTuple.
184
185 • OptList in Types::Standard
186
187 An arrayref of arrayrefs, where each of the inner arrayrefs are two
188 values, the first value being a string.
189
190 • Overload [parameterizable] in Types::Standard
191
192 An overloaded object.
193
194 • Password in Types::Common::String
195
196 A string at least 4 characters long and less than 256 characters
197 long with no line breaks.
198
199 • PositiveInt in Types::Common::Numeric
200
201 An integer above 0.
202
203 • PositiveNum in Types::Common::Numeric
204
205 A number above 0.
206
207 • PositiveOrZeroInt in Types::Common::Numeric
208
209 An integer above 0, or 0.
210
211 • PositiveOrZeroNum in Types::Common::Numeric
212
213 An number above 0, or 0.
214
215 • Ref [parameterizable] in Types::Standard
216
217 Any reference.
218
219 • RegexpRef in Types::Standard
220
221 A regular expression.
222
223 • RoleName in Types::Standard
224
225 Any loaded package name where there is no `new` method.
226
227 • ScalarRef [parameterizable] in Types::Standard
228
229 Scalarrefs.
230
231 • SimpleStr in Types::Common::String
232
233 A string with less than 256 characters with no line breaks.
234
235 • SingleDigit in Types::Common::Numeric
236
237 A single digit number. This includes single digit negative numbers!
238
239 • Slurpy [parameterizable] in Types::Standard
240
241 Used in conjunction with Dict or Tuple.
242
243 • Str in Types::Standard
244
245 A string.
246
247 • StrictNum in Types::Standard
248
249 A number; strict constaint.
250
251 • StringLike in Types::TypeTiny
252
253 Strings and objects overloading stringification.
254
255 • StrLength [parameterizable] in Types::Common::String
256
257 A string with length in a particular range.
258
259 • StrMatch [parameterizable] in Types::Standard
260
261 A string matching a particular regular expression.
262
263 • StrongPassword in Types::Common::String
264
265 A string at least 4 characters long and less than 256 characters
266 long with no line breaks and at least one non-alphabetic character.
267
268 • Tied [parameterizable] in Types::Standard
269
270 A reference to a tied variable.
271
272 • Tuple [parameterizable] in Types::Standard
273
274 An arrayref with constraints on its values.
275
276 • TypeTiny [has coercion] in Types::TypeTiny
277
278 Blessed objects in the Type::Tiny class.
279
280 • Undef in Types::Standard
281
282 undef.
283
284 • UpperCaseSimpleStr [has coercion] in Types::Common::String
285
286 A string less than 256 characters long with no line breaks or
287 lowercase letters.
288
289 • UpperCaseStr [has coercion] in Types::Common::String
290
291 A string with no lowercase letters.
292
293 • Value in Types::Standard
294
295 Any non-reference value, including undef.
296
297 The module Types::Common incorporates all of the above.
298
300 Here's your next step:
301
302 • Type::Tiny::Manual::Policies
303
304 Policies related to Type::Tiny development.
305
307 Toby Inkster <tobyink@cpan.org>.
308
310 This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
311
312 This is free software; you can redistribute it and/or modify it under
313 the same terms as the Perl 5 programming language system itself.
314
316 THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
317 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
318 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
319
320
321
322perl v5.36.0 2023-04-24 Type::Tiny::Manual::AllTypes(3)