NAME
    Data::Sah::Util::Subschema - Extract subschemas from a schema

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

SYNOPSIS
     use Data::Sah::Util::Subschema qw(extract_subschemas)

     my $subschemas = extract_subschemas([array => of=>"int*"]);
     # => ("int*")

     $subschemas = extract_subschemas([any => of=>["int*", [array => of=>"int"]]]);
     # => ("int*", [array => of=>"int"], "int")

DESCRIPTION
FUNCTIONS
  extract_subschemas([ \%opts, ] $sch) => list
    Extract all subschemas found inside Sah schema $sch. Schema will be
    normalized first, then schemas from all clauses which contains
    subschemas will be collected recursively.

    Known options:

    *   schema_is_normalized => bool (default: 0)

        When set to true, function will skip normalizing schema and assume
        input schema is normalized.

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

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

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

    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, 2016 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.