Parrot::Configure::Options - Process command-line options to Configure.pl
use Parrot::Configure::Options qw( process_options ); $args = process_options( { argv => [ @ARGV ], script => $0, parrot_version => $parrot_version, svnid => '$Id: /parrotcode/trunk/lib/Parrot/Configure/Options.pm 3467 2007-05-12T14:16:07.178849Z jkeenan $', } ); @valid_options = get_valid_options();
Parrot::Configure::Options exports on demand two subroutines: process_options(), which processes the command-line options provided to Configure.pl; and get_valid_options(), which returns the list of currently valid options.
process_options()
get_valid_options()
If you provide Configure.pl with either --help or --version, process_options() will print out the appropriate message and perform a bare return, i.e., the return value will be undef. The calling script -- whether Configure.pl or a test file -- can then check for the definedness of process_options()'s return value and proceed appropriately.
--help
--version
return
undef
An array of valid command-line option names stored internally is consulted; the program will die if an invalid option is called.
Purpose
Process command-line options provided to Configure.pl and proceed appropriately.
Arguments
One argument: Reference to a hash holding the following key-value pairs:
argv : reference to @ARGV; defaults to [] script : Perl's $0: the calling program; defaults to 'Configure.pl' parrot_version : string holding Parrot version number (currently supplied by Parrot::BuildUtil::parrot_version()) svnid : string holding Subversion Id string
Return Value
--version or --help
Bare return (undef).
All other options
Reference to a hash of option names and values.
Comment
Get a list of options currently valid for Configure.pl.
None.
List of currently valid options.
The functionality in this package was transferred from Configure.pl by Jim Keenan.
Configure.pl.
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.