#!perl

use 5.010001;
use strict;
use warnings;

use Getopt::Long qw(:config bundling no_ignore_case auto_help auto_version);
use Test::Sah::Schema;

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2022-09-25'; # DATE
our $DIST = 'Test-Sah-Schema'; # DIST
our $VERSION = '0.014'; # VERSION

my %opts = (
    exclude_modules => [],
    include_modules => [],
    test_schema_examples => 1,
);
GetOptions(
    'include-module=s' => $opts{include_modules},
    '<>' => sub {
        push @{ $opts{include_modules} }, $_[0];
    },
    'exclude-module=s' => $opts{exclude_modules},
    'E' => sub { $opts{test_schema_examples} = 0 },
);

sah_schema_modules_ok(
    \%opts,
);

1;
# ABSTRACT: Test all Schema modules in distribution
# PODNAME: test-sah-schema-modules

__END__

=pod

=encoding UTF-8

=head1 NAME

test-sah-schema-modules - Test all Schema modules in distribution

=head1 VERSION

This document describes version 0.014 of test-sah-schema-modules (from Perl distribution Test-Sah-Schema), released on 2022-09-25.

=head1 SYNOPSIS

In your dist directory:

 % test-sah-schema-modules [options] [included_module]...

Examples:

 # test all Sah::Schema modules in dist
 % test-sah-schema-modules

 # only test a single Sah::Schema module
 % test-sah-schema-modules --include-module date::tz_offset

 # only test a couple of Sah::Schema modules
 % test-sah-schema-modules date::tz_offset date::tz_name

=head1 DESCRIPTION

This script is a command-line interface for L<Test::Sah::Schema>'s
C<sah_schema_modules_ok()> function.

=head1 OPTIONS

=over

=item * --include-modules=s

Include a module. Can be specified multiple times. If specified then only
included modules will be tested.

=item * --exclude-modules=s

Exclude a module. Can be specified multiple times.

=item * -E

This sets C<test_schema_examples> to 0.

=back

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Test-Sah-Schema>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Test-Sah-Schema>.

=head1 SEE ALSO

L<Test::Sah::Schema>

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 CONTRIBUTING


To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.

Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:

 % prove -l

If you want to build the distribution (e.g. to try to install it locally on your
system), you can install L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
that are considered a bug and can be reported to me.

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2022, 2020 by perlancar <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.

=head1 BUGS

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

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.

=cut
