- PERFORMANCE NOTES
- SEE ALSO
- COPYRIGHT AND LICENSE
Data::Sah::Tiny - Validate Sah schemas with as little code as possible
This document describes version 0.000001 of Data::Sah::Tiny (from Perl distribution Data-Sah-Tiny), released on 2021-08-01.
use Data::Sah::Tiny qw(normalize_schema gen_validator); my $v = gen_validator([int => min=>1]); say $v->(0); # false say $v->(2); # true
Early release. Not all types and clauses are supported.
This is a tiny alternative to Data::Sah, with fewer dependencies and much faster compilation speed. But it supports only a subset of Data::Sah's features.
Validator generation is several times faster than Data::Sah, so Params::Sah with Data::Sah::Tiny backend is in the same order of magnitude with other validator generators like Type::Params and Params::ValidationCompiler. See Bencher::Scenarios::ParamsSah.
See Data::Sah's documentation. Supported options:
Str. Only "bool_valid" and "bool_valid+val" are supported.
Str. Defaults to
Bool. Set to 1 to return source code instead of compiled coderef.
Bool. If set to 1 will return compilation result details.
See Data::Sah::Normalize's documentation.
Please visit the project's homepage at https://metacpan.org/release/Data-Sah-Tiny.
Source repository is at https://github.com/perlancar/perl-Data-Sah-Tiny.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah-Tiny
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2021 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.