Git::Reduce::Tests::Opts - Prepare parameters for Git::Reduce::Tests
use Git::Reduce::Tests::Opts qw( process_options ); my $params = process_options( 'include' => 't/001-load.t' );
This package exports on demand only one subroutine,
process_options(), used to prepare parameters for Git::Reduce::Tests.
The subroutine takes as arguments an optional list of key-value pairs. This approach is useful in testing the subroutine but is not expected to be used otherwise. The subroutine is a wrapper around Getopt::Long::GetOptions(), so is devoted to processing command-line arguments provided, for example, to the command-line utility reduce-tests included in this CPAN distribution.
Whether the subroutine is populated directly or via command-line arguments, one, but not both, of the
exclude options must be populated with the name of a test file to be included in, or excluded from, the reduced branch.
The subroutine returns a reference to a hash populated with values in the following order:
- 1 Default values hard-coded within the subroutine.
- 2 Command-line options.
- 3 Key-value pairs provided as arguments to the function.