SGML::Opt - command-line option parsing for SGML::* programs
use SGML::Opt; AddOptions('opt1=s', "opt1 description", 'opt2=s', "opt2 description"); GetOptions(); $opt1_string = $OptValues{'opt1'};
SGML::Opt provides common base for command-line option parsing for SGML::* programs.
Flag if the -debug or -verbose option was specified.
Variable that the application can define to give a brief description of the application. This is defines the description part of the output generated by the Usage function.
Flag if the -help option was specified.
Name of the program.
Variable that the application can define that represents the synopsis output generated by the Usage function.
List of SGML Open catalags specified by the -catalog option. Mulitple catalogs are specified by mulitple -catalog options.
List of parameter entities that should be defined to "IGNORE" via the -ignore option. Mulitple parameter entities are specified by mulitple -ignore options.
List of parameter entities that should be defined to "INCLUDE" via the -include option. Mulitple parameter entities are specified by mulitple -include options.
Hash containing values of command-line options. Keys are the option name. The values' types are dependent on the option specification.
AddOptions( $opt_spec1, $desc1, $opt_spec2, $desc2, $opt_spec3, $desc3, ... );
N/A
AddOptions takes a list of spec/description pairs. The spec is the option specification in the same format as the Getopt::Long module. Descriptions are brief descriptions of the associated option. The descriptions are used by the Usage function. Any specifications are added to the current option specifications and will be used by the GetOptions function.
GetOptions( $opt_spec1, $desc1, $opt_spec2, $desc2, $opt_spec3, $desc3, ... );
1 on success, 0 on error.
GetOptions parses the command-line (@ARGV) and fills the %OptValues hash. The keys of the %OptValues has will be the options defined on the command-line. There associated values are dependent on the option specifications which follows the same rules as the Getopt::Long module.
A list of spec/description pairs can be passed into GetOptions just like AddOptions.
Usage prints out usage information to STDOUT.
perl(1), Getopt::Long(3)
This software is part of the perlSGML package; see (http://www.oac.uci.edu/indiv/ehood/perlSGML.html)