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