.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Types::Common::String 3" .TH Types::Common::String 3 2024-09-01 "perl v5.40.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Types::Common::String \- drop\-in replacement for MooseX::Types::Common::String .SH STATUS .IX Header "STATUS" This module is covered by the Type-Tiny stability policy. .SH DESCRIPTION .IX Header "DESCRIPTION" A drop-in replacement for MooseX::Types::Common::String. .SS Types .IX Subsection "Types" The following types are similar to those described in MooseX::Types::Common::String. .IP \(bu 4 \&\fBSimpleStr\fR .IP \(bu 4 \&\fBNonEmptySimpleStr\fR .IP \(bu 4 \&\fBNumericCode\fR .IP \(bu 4 \&\fBLowerCaseSimpleStr\fR .IP \(bu 4 \&\fBUpperCaseSimpleStr\fR .IP \(bu 4 \&\fBPassword\fR .IP \(bu 4 \&\fBStrongPassword\fR .IP \(bu 4 \&\fBNonEmptyStr\fR .IP \(bu 4 \&\fBLowerCaseStr\fR .IP \(bu 4 \&\fBUpperCaseStr\fR .PP This module also defines some extra type constraints not found in MooseX::Types::Common::String. .IP \(bu 4 \&\fBStrLength[`min, `max]\fR .Sp Type constraint for a string between min and max characters long. For example: .Sp .Vb 1 \& StrLength[4, 20] .Ve .Sp It is sometimes useful to combine this with another type constraint in an intersection. .Sp .Vb 1 \& (LowerCaseStr) & (StrLength[4, 20]) .Ve .Sp The max length can be omitted. .Sp .Vb 1 \& StrLength[10] # at least 10 characters .Ve .Sp Lengths are inclusive. .IP \(bu 4 \&\fBDelimitedStr[`delimiter, `type, `min, `max, `ws]\fR .Sp Parameterized constraint for delimited strings, such as comma-delimited. .Sp \&\fBDelimitedStr[",", Int, 1, 3]\fR will allow between 1 and 3 integers, separated by commas. So \f(CW"1,42,\-999"\fR will pass the type constraint, but \f(CW"Hello,45"\fR will fail. .Sp The ws parameter allows optional whitespace surrounding the delimiters, as well as optional leading and trailing whitespace. .Sp The type, min, max, and ws paramaters are optional. .Sp Parameterized \fBDelimitedStr\fR type constraints will automatically have a coercion from \fBArrayRef[`type]\fR which uses \f(CW\*(C`join\*(C'\fR to join by the delimiter. The plain unparameterized type constraint \fBDelimitedStr\fR has a coercion from \fBArrayRef[Str]\fR which joins the strings using the list separator \f(CW$"\fR (which is a space by default). .SH BUGS .IX Header "BUGS" Please report any bugs to . .SH "SEE ALSO" .IX Header "SEE ALSO" Types::Standard, Types::Common::Numeric. .PP MooseX::Types::Common, MooseX::Types::Common::Numeric, MooseX::Types::Common::String. .SH AUTHOR .IX Header "AUTHOR" Toby Inkster . .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2013\-2014, 2017\-2023 by Toby Inkster. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "DISCLAIMER OF WARRANTIES" .IX Header "DISCLAIMER OF WARRANTIES" THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.