File: README

package info (click to toggle)
libdata-sah-normalize-perl 0.051-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 172 kB
  • sloc: perl: 209; makefile: 2
file content (65 lines) | stat: -rw-r--r-- 2,060 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
NAME
    Data::Sah::Normalize - Normalize Sah schema

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

SYNOPSIS
     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", {}]

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

CONTRIBUTOR
    Steven Haryanto <sharyanto@cpan.org>

FUNCTIONS
  normalize_clset($clset) => HASH
    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_schema($sch) => ARRAY
    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").

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

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

BUGS
    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.

SEE ALSO
    Sah, Data::Sah

AUTHOR
    perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE
    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.