The Opts package includes the following subroutines:
■
■
■ Adds custom options so that they can be submitted to parsing and validation. After the script has validated the options, the script can use them at run time.
■ Return value of func (after execution) if a function is associated with the option
■ Undef if none of the above are specifiedChecks whether an option has been explicitly set by a script or from the command line or whether the option has a default value or computed value (return value of a func).
Boolean. Returns 1 (true) if the option value has been explicitly set. Returns 0 (false) if the option value is a default value, is null, or has not been explicitly set. For a discussion of Boolean, see vSphere SDK for Perl Programming Conventions.Reads options from the command line, an environment variable, or a configuration file and transforms the option into appropriate data structures for validation.Returns nothing. Displays an error message and quits if the parse operation is not successful. If you want to use a configuration file, call Opts::get_config() to make sure the file can be opened. See Opts::get_config().Ensures that input values (from the command line, an environment variable, or a configuration file) are complete, consistent, and valid.