GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Sah::Normalize(3) User Contributed Perl Documentation Data::Sah::Normalize(3)

Data::Sah::Normalize - Normalize Sah schema

This document describes version 0.051 of Data::Sah::Normalize (from Perl distribution Data-Sah-Normalize), released on 2021-07-29.

 use Data::Sah::Normalize qw(normalize_clset normalize_schema);

 my $nclset = normalize_clset({'!a'=>1}); # -> {a=>1, 'a.op'=>'not'}
 my $nsch   = normalize_schema("int");    # -> ["int", {}]

This often-needed functionality is split from the main Data::Sah to keep it in a small and minimal-dependencies package.

Steven Haryanto <sharyanto@cpan.org>

Normalize a clause set (hash). Return a shallow copy of the original hash. Die on failure.

TODO: option to recursively normalize clause which contains sah clauses (e.g. "of").

Normalize a Sah schema (scalar or array). Return an array. Produce a 2-level copy of schema, so it's safe to add/delete/modify the normalized schema's clause set, but clause set's values are still references to the original. Die on failure.

TODO: recursively normalize clause which contains sah clauses (e.g. "of").

Please visit the project's homepage at <https://metacpan.org/release/Data-Sah-Normalize>.

Source repository is at <https://github.com/perlancar/perl-Data-Sah-Normalize>.

Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Sah-Normalize>

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.

Sah, Data::Sah

perlancar <perlancar@cpan.org>

This software is copyright (c) 2021, 2018, 2015, 2014 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2021-07-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.