1Types::Common::String(3U)ser Contributed Perl DocumentatiToynpes::Common::String(3)
2
3
4

NAME

6       Types::Common::String - drop-in replacement for
7       MooseX::Types::Common::String
8

STATUS

10       This module is covered by the Type-Tiny stability policy.
11

DESCRIPTION

13       A drop-in replacement for MooseX::Types::Common::String.
14
15   Types
16       The following types are similar to those described in
17       MooseX::Types::Common::String.
18
19SimpleStr
20
21NonEmptySimpleStr
22
23NumericCode
24
25LowerCaseSimpleStr
26
27UpperCaseSimpleStr
28
29Password
30
31StrongPassword
32
33NonEmptyStr
34
35LowerCaseStr
36
37UpperCaseStr
38
39       This module also defines some extra type constraints not found in
40       MooseX::Types::Common::String.
41
42StrLength[`min, `max]
43
44           Type constraint for a string between min and max characters long.
45           For example:
46
47             StrLength[4, 20]
48
49           It is sometimes useful to combine this with another type constraint
50           in an intersection.
51
52             (LowerCaseStr) & (StrLength[4, 20])
53
54           The max length can be omitted.
55
56             StrLength[10]   # at least 10 characters
57
58           Lengths are inclusive.
59
60DelimitedStr[`delimiter, `type, `min, `max, `ws]
61
62           Parameterized constraint for delimited strings, such as comma-
63           delimited.
64
65           DelimitedStr[",", Int, 1, 3] will allow between 1 and 3 integers,
66           separated by commas. So "1,42,-999" will pass the type constraint,
67           but "Hello,45" will fail.
68
69           The ws parameter allows optional whitespace surrounding the
70           delimiters, as well as optional leading and trailing whitespace.
71
72           The type, min, max, and ws paramaters are optional.
73
74           Parameterized DelimitedStr type constraints will automatically have
75           a coercion from ArrayRef[`type] which uses "join" to join by the
76           delimiter. The plain unparameterized type constraint DelimitedStr
77           has a coercion from ArrayRef[Str] which joins the strings using the
78           list separator $" (which is a space by default).
79

BUGS

81       Please report any bugs to
82       <https://github.com/tobyink/p5-type-tiny/issues>.
83

SEE ALSO

85       Types::Standard, Types::Common::Numeric.
86
87       MooseX::Types::Common, MooseX::Types::Common::Numeric,
88       MooseX::Types::Common::String.
89

AUTHOR

91       Toby Inkster <tobyink@cpan.org>.
92
94       This software is copyright (c) 2013-2014, 2017-2023 by Toby Inkster.
95
96       This is free software; you can redistribute it and/or modify it under
97       the same terms as the Perl 5 programming language system itself.
98

DISCLAIMER OF WARRANTIES

100       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
101       WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
102       MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
103
104
105
106perl v5.36.0                      2023-04-24          Types::Common::String(3)
Impressum