#!perl

our $DATE = '2016-07-19'; # DATE
our $VERSION = '0.36'; # VERSION

use Data::Dump::Color;

@ARGV == 1 or die "Usage: $0 <sah-schema-in-perl-code>\n";
eval "\$sch = $ARGV[0]";
die if $@;

require Data::Sah::Resolve;
my $nsch = Data::Sah::Resolve::resolve_schema($sch);
dd $nsch;

# ABSTRACT: Resolve Sah schema
# PODNAME: resolve-sah-schema

__END__

=pod

=encoding UTF-8

=head1 NAME

resolve-sah-schema - Resolve Sah schema

=head1 VERSION

This document describes version 0.36 of resolve-sah-schema (from Perl distribution App-SahUtils), released on 2016-07-19.

=head1 SYNOPSIS

 % resolve-sah-schema '"int"'
 ["int", []]

 % resolve-sah-schema '["posint", div_by=>2]'
 ["int", {min=>1}, {div_by=>2}]

 % resolve-sah-schema '["posint", "merge.delete.min"=>undef, div_by=>2]'
 ["int", {div_by=>2}]

=head1 DESCRIPTION

This script can be used to quickly produce/see the resolved form of a L<Sah>
schema. Both input and output are in the form of Perl code.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-SahUtils>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-SahUtils>.

=head1 BUGS

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

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.

=head1 SEE ALSO

L<Data::Sah::Resolve>

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 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.

=cut
