• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

fallback/H03-May-2022-146136

lib/Type/Tiny/H03-May-2022-328160

t/H03-May-2022-713489

COPYRIGHTH A D25-Sep-20201.8 KiB8569

CREDITSH A D25-Sep-2020405 1713

ChangesH A D25-Sep-20204 KiB160113

INSTALLH A D25-Sep-2020957 3923

LICENSEH A D25-Sep-202017.9 KiB380292

MANIFESTH A D25-Sep-2020502 4140

META.jsonH A D25-Sep-20202.1 KiB8180

META.ymlH A D25-Sep-20201.3 KiB4645

Makefile.PLH A D25-Sep-20205.9 KiB180156

READMEH A D25-Sep-20202.6 KiB7050

SIGNATUREH A D25-Sep-20203.9 KiB6255

Util.xsH A D25-Sep-202011.5 KiB531427

XS.xsH A D25-Sep-202023.8 KiB1,030842

dist.iniH A D25-Sep-202062 42

doap.ttlH A D25-Sep-202020.7 KiB459423

ppport.hH A D25-Sep-2020176 KiB7,2593,105

typetiny.hH A D25-Sep-20205.6 KiB136101

xs_version.hH A D25-Sep-202053 43

xshelper.hH A D25-Sep-20202.1 KiB10053

README

1NAME
2    Type::Tiny::XS - provides an XS boost for some of Type::Tiny's built-in
3    type constraints
4
5SYNOPSIS
6       use Types::Standard qw(Int);
7
8DESCRIPTION
9    This module is optionally used by Type::Tiny 0.045_03 and above to provide
10    faster, C-based implementations of some type constraints. (This package
11    has only core dependencies, and does not depend on Type::Tiny, so other
12    data validation frameworks might also consider using it!)
13
14    Only the following three functions should be considered part of the
15    supported API:
16
17    `Type::Tiny::XS::get_coderef_for($type)`
18        Given a supported type constraint name, such as "Int", returns a
19        coderef that can be used to validate a parameter against this
20        constraint.
21
22        Returns undef if this module cannot provide a suitable coderef.
23
24    `Type::Tiny::XS::get_subname_for($type)`
25        Like `get_coderef_for` but returns the name of such a sub as a string.
26
27        Returns undef if this module cannot provide a suitable sub name.
28
29    `Type::Tiny::XS::is_known($coderef)`
30        Returns true if the coderef was provided by Type::Tiny::XS.
31
32    In addition to the above functions, the subs returned by `get_coderef_for`
33    and `get_subname_for` are considered part of the "supported API", but only
34    for the lifetime of the Perl process that returned them.
35
36    To clarify, if you call `get_subname_for("ArrayRef[Int]")` in a script,
37    this will return the name of a sub. That sub (which can be used to
38    validate arrayrefs of integers) is now considered part of the supported
39    API of Type::Tiny::XS until the script finishes running. Next time the
40    script runs, there is no guarantee that the sub will continue to exist, or
41    continue to do the same thing.
42
43BUGS
44    Please report any bugs to
45    <http://rt.cpan.org/Dist/Display.html?Queue=Type-Tiny-XS>.
46
47SEE ALSO
48    Type::Tiny, Types::Standard.
49
50AUTHOR
51    Toby Inkster <tobyink@cpan.org> forked all this from
52    Mouse::Util::TypeConstraints.
53
54    ArrayLike, HashLike, CodeLike, and StringLike constraints based on code by
55    ikegami on StackOverflow.
56
57    <https://stackoverflow.com/a/64019481/1990570>.
58
59COPYRIGHT AND LICENCE
60    This software is copyright (c) 2014, 2018-2020 by Toby Inkster.
61
62    This is free software; you can redistribute it and/or modify it under the
63    same terms as the Perl 5 programming language system itself.
64
65DISCLAIMER OF WARRANTIES
66    THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
67    WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
68    MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
69
70