.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Type::Tiny::XS 3pm" .TH Type::Tiny::XS 3pm "2015-02-26" "perl v5.24.1" "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" Type::Tiny::XS \- provides an XS boost for some of Type::Tiny's built\-in type constraints .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Types::Standard qw(Int); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is optionally used by Type::Tiny 0.045_03 and above to provide faster, C\-based implementations of some type constraints. (This package has only core dependencies, and does not depend on Type::Tiny, so other data validation frameworks might also consider using it!) .PP Only the following two functions should be considered part of the supported \s-1API:\s0 .ie n .IP """Type::Tiny::XS::get_coderef_for($type)""" 4 .el .IP "\f(CWType::Tiny::XS::get_coderef_for($type)\fR" 4 .IX Item "Type::Tiny::XS::get_coderef_for($type)" Given a supported type constraint name, such as \f(CW"Int"\fR, returns a coderef that can be used to validate a parameter against this constraint. .Sp Returns undef if this module cannot provide a suitable coderef. .ie n .IP """Type::Tiny::XS::get_subname_for($type)""" 4 .el .IP "\f(CWType::Tiny::XS::get_subname_for($type)\fR" 4 .IX Item "Type::Tiny::XS::get_subname_for($type)" Like \f(CW\*(C`get_coderef_for\*(C'\fR but returns the name of such a sub as a string. .Sp Returns undef if this module cannot provide a suitable sub name. .ie n .IP """Type::Tiny::XS::is_known($coderef)""" 4 .el .IP "\f(CWType::Tiny::XS::is_known($coderef)\fR" 4 .IX Item "Type::Tiny::XS::is_known($coderef)" Returns true if the coderef was provided by Type::Tiny::XS. .PP In addition to the above functions, the subs returned by \&\f(CW\*(C`get_coderef_for\*(C'\fR and \f(CW\*(C`get_subname_for\*(C'\fR are considered part of the \&\*(L"supported \s-1API\*(R",\s0 but only for the lifetime of the Perl process that returned them. .PP To clarify, if you call \f(CW\*(C`get_subname_for("ArrayRef[Int]")\*(C'\fR in a script, this will return the name of a sub. That sub (which can be used to validate arrayrefs of integers) is now considered part of the supported \s-1API\s0 of Type::Tiny::XS until the script finishes running. Next time the script runs, there is no guarantee that the sub will continue to exist, or continue to do the same thing. .SH "BUGS" .IX Header "BUGS" Please report any bugs to . .SH "SEE ALSO" .IX Header "SEE ALSO" Type::Tiny, Types::Standard. .SH "AUTHOR" .IX Header "AUTHOR" Toby Inkster forked all this from Mouse::Util::TypeConstraints. .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2014 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" \&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0