#!perl

use 5.010001;
use strict;
use warnings;
use Test::Rinci;

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

our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2023-07-09'; # DATE
our $DIST = 'Test-Rinci'; # DIST
our $VERSION = '0.156'; # VERSION

my %opts = (
    include_packages => [],
    include_functions => [],
    exclude_packages => [],
    exclude_functions => [],
    wrap_function => 1,
    test_function_examples => 1,
);
GetOptions(
    '<>' => sub {
        push @{ $opts{include_packages} }, $_[0];
    },
    'exclude-package=s' => $opts{exclude_packages},
    'exclude-function=s' => $opts{exclude_functions},
    'W' => sub { $opts{wrap_function} = 0 },
    'E' => sub { $opts{test_function_examples} = 0 },
);

metadata_in_all_modules_ok(
    \%opts,
);

1;
# ABSTRACT: Test Rinci metadata in all dist's modules
# PODNAME: test-rinci

__END__

=pod

=encoding UTF-8

=head1 NAME

test-rinci - Test Rinci metadata in all dist's modules

=head1 VERSION

This document describes version 0.156 of test-rinci (from Perl distribution Test-Rinci), released on 2023-07-09.

=head1 SYNOPSIS

In your dist directory:

 % test-rinci [options] [module]...

To test certain modules only:

 % test-rinci Module1 Module2::Sub

For more options, see documentation.

=head1 DESCRIPTION

This script is an command-line interface for L<Test::Rinci>'s
C<metadata_in_all_modules_ok()> function.

=head1 OPTIONS

=over

=item * --exclude-package=s

Exclude a package. Can be specified multiple times.

=item * --exclude-function=s

Exclude a function. Can be specified multiple times.

=item * -E

This sets C<test_function_examples> to 0.

=item * -W

This sets C<wrap_function> to 0.

=back

=head1 HOMEPAGE

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

=head1 SOURCE

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

=head1 SEE ALSO

L<Test::Rinci>

=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) 2023, 2020, 2019, 2018, 2016, 2015, 2014, 2013, 2012 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-Rinci>

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
