vSphere SDK for Perl Programming Guide - Documentation - VMware
vSphere SDK for Perl Programming Guide - Documentation - VMware
vSphere SDK for Perl Programming Guide - Documentation - VMware
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Returns<br />
Returns one of the following, depending upon the attributes defined <strong>for</strong> the option:<br />
Return value of func (after execution) if a function is associated with the option<br />
Default value, if one is specified <strong>for</strong> the option<br />
Value of the option, as passed to the script<br />
Undef if none of the above are specified<br />
option_is_set<br />
parse<br />
Chapter 4 <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Subroutine Reference<br />
Checks whether an option has been explicitly set by a script or from the command line or whether the option<br />
has a default value or computed value (return value of a func).<br />
Parameters<br />
Returns<br />
Boolean. Returns 1 (true) if the option value has been explicitly set. Returns 0 (false) if the option value is a<br />
default value, is null, or has not been explicitly set. For a discussion of Boolean, see “<strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong><br />
<strong>Programming</strong> Conventions” on page 12.<br />
Reads options from the command line, an environment variable, or a configuration file and trans<strong>for</strong>ms the<br />
option into appropriate data structures <strong>for</strong> validation.<br />
Parameters<br />
No parameters.<br />
Returns<br />
Returns nothing. Displays an error message and quits if the parse operation is not successful. If you want to<br />
use a configuration file, call Opts::get_config() to make sure the file can be opened. See<br />
“Opts::get_config()” on page 40.<br />
validate<br />
Ensures that input values (from the command line, an environment variable, or a configuration file) are<br />
complete, consistent, and valid.<br />
usage<br />
Parameter Description<br />
option_name String value of the built‐in or custom option.<br />
Parameters<br />
No parameters.<br />
Returns<br />
Returns nothing. It displays an error message and quits if the parse operation is not successful.<br />
Displays the help text message.<br />
Parameters<br />
No parameters.<br />
Returns<br />
Returns nothing.<br />
<strong>VMware</strong>, Inc. 43