Test::Rinci::CmdLine - Test Rinci metadata of Perinci::CmdLine scripts
This document describes version 0.001 of Test::Rinci::CmdLine (from Perl distribution Test-Rinci-CmdLine), released on 2018-11-22.
To check all metadata in a script:
use Test::Rinci::CmdLine tests => 1; metadata_in_script_ok("script.pl", {opt => ...}, $msg);
Alternatively, you can check all metadata in all scripts in a distro:
# save in release-rinci-cmdline.t, put in distro's t/ subdirectory use Test::More; plan skip_all => "Not release testing" unless $ENV{RELEASE_TESTING}; eval "use Test::Rinci::CmdLine"; plan skip_all => "Test::Rinci::CmdLine required for testing Rinci metadata" if $@; metadata_in_all_scripts_ok({opt => ...}, $msg);
This module is like Test::Rinci except that it looks for metadata in the main package of scripts, instead of modules.
main
Some code taken from Test::Pod::Coverage by Andy Lester.
All these functions are exported by default.
Load $script, get its metadata in the main package, and perform test on the metadata on the main package using Test::Rinci's metadata_in_module_ok(). See Test::Rinci for available options.
$script
metadata_in_module_ok()
Run metadata_in_script_ok() for each script specified in @scripts.
metadata_in_script_ok()
@scripts
Options are the same as in metadata_in_script_ok().
Look for scripts in directory script (and scripts and bin) and run metadata_in_script_ok() on each of them.
script
scripts
bin
Please visit the project's homepage at https://metacpan.org/release/Test-Rinci-CmdLine.
Source repository is at https://github.com/perlancar/perl-Test-Rinci-CmdLine.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Rinci-CmdLine
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.
test-rinci-cmdline, a command-line interface for metadata_in_all_scripts_ok().
metadata_in_all_scripts_ok()
Test::Rinci and test-rinci.
Rinci
perlancar <perlancar@cpan.org>
This software is copyright (c) 2018 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.
To install Test::Rinci::CmdLine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Rinci::CmdLine
CPAN shell
perl -MCPAN -e shell install Test::Rinci::CmdLine
For more information on module installation, please visit the detailed CPAN module installation guide.