mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-01 18:25:59 +00:00
137 lines
48 KiB
HTML
137 lines
48 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>OptionParser</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
|
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
|
|
|
<!-- Generated by Natural Docs, version 1.52 -->
|
|
<!-- http://www.naturaldocs.org -->
|
|
|
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
|
|
|
|
|
|
|
|
|
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="OptionParser"></a>OptionParser</h1><div class=CBody><p>OptionParser parses command line options from a tool’s POD. By default it parses a description and usage from the POD’s SYNOPSIS section and command line options from the OPTIONS section.</p><p>The SYNOPSIS section should look like,</p><blockquote><pre class="prettyprint">=head1 SYNOPSIS
|
|
|
|
Usage: mk-archiver [OPTION...] --source DSN --where WHERE
|
|
|
|
mk-archiver nibbles records from a MySQL table. The --source and --dest
|
|
arguments use DSN syntax; if COPY is yes, --dest defaults to the key's value
|
|
from --source.
|
|
|
|
Examples:
|
|
...</pre></blockquote><p>The key, required parts are the “Usage:” line and the following description paragraph.</p><p>The OPTIONS section shoud look like,</p><blockquote><pre class="prettyprint">=head1 OPTIONS
|
|
|
|
Optional rules, one per line.
|
|
|
|
=over
|
|
|
|
=item --analyze
|
|
|
|
type: string
|
|
|
|
Run ANALYZE TABLE afterwards on L<"--source"> and/or L<"--dest">.
|
|
ect.</pre></blockquote><p>The option’s full name is given as the “=item”. The next, optional para is the option’s attributes. And the next, required para is the option’s description (the first period-terminated sentence).</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#OptionParser" >OptionParser</a></td><td class=SDescription>OptionParser parses command line options from a tool’s POD. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#OptionParser.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.$POD_link_re" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">$POD_link_re</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#OptionParser.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.new" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">new</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.get_specs" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">get_specs</a></td><td class=SDescription>Read and parse options from the OPTIONS section of the POD. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.DSNParser" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">DSNParser</a></td><td class=SDescription>Return the <a href="#OptionParser.DSNParser" class=LFunction id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">DSNParser</a> object automatically created for DSN type opts.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.get_defaults_files" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">get_defaults_files</a></td><td class=SDescription>Return the program’s defaults files.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser._pod_to_specs" id=link7 onMouseOver="ShowTip(event, 'tt6', 'link7')" onMouseOut="HideTip('tt6')">_pod_to_specs()</a></td><td class=SDescription>Parse basic specs for each option. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser._parse_specs" id=link8 onMouseOver="ShowTip(event, 'tt7', 'link8')" onMouseOut="HideTip('tt7')">_parse_specs</a></td><td class=SDescription>Parse option specs and rules. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser._get_participants" id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">_get_participants</a></td><td class=SDescription>Extract option names from a string. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.opts" id=link10 onMouseOver="ShowTip(event, 'tt9', 'link10')" onMouseOut="HideTip('tt9')">opts</a></td><td class=SDescription>A copy of the internal opts hash</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.short_opts" id=link11 onMouseOver="ShowTip(event, 'tt10', 'link11')" onMouseOut="HideTip('tt10')">short_opts</a></td><td class=SDescription>A copy of the internal short_opts hash</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.set_defaults" id=link12 onMouseOver="ShowTip(event, 'tt11', 'link12')" onMouseOut="HideTip('tt11')">set_defaults</a></td><td class=SDescription>Set default values for options.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.get_defaults" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">get_defaults</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.get_groups" id=link14 onMouseOver="ShowTip(event, 'tt13', 'link14')" onMouseOut="HideTip('tt13')">get_groups</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser._set_option" id=link15 onMouseOver="ShowTip(event, 'tt14', 'link15')" onMouseOut="HideTip('tt14')">_set_option</a></td><td class=SDescription>Getopt::Long calls this sub for each opt it finds on the cmd line. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.get_opts" id=link16 onMouseOver="ShowTip(event, 'tt15', 'link16')" onMouseOut="HideTip('tt15')">get_opts</a></td><td class=SDescription>Get command line options and enforce option rules. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser._check_opts" id=link17 onMouseOver="ShowTip(event, 'tt16', 'link17')" onMouseOut="HideTip('tt16')">_check_opts</a></td><td class=SDescription>Check options against rules and group restrictions.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser._validate_type" id=link18 onMouseOver="ShowTip(event, 'tt17', 'link18')" onMouseOut="HideTip('tt17')">_validate_type</a></td><td class=SDescription>Validate special option types like sizes and DSNs.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.get" id=link19 onMouseOver="ShowTip(event, 'tt18', 'link19')" onMouseOut="HideTip('tt18')">get</a></td><td class=SDescription>Get an option’s value. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.got" id=link20 onMouseOver="ShowTip(event, 'tt19', 'link20')" onMouseOut="HideTip('tt19')">got</a></td><td class=SDescription>Test if an option was explicitly given on the command line.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.has" id=link21 onMouseOver="ShowTip(event, 'tt20', 'link21')" onMouseOut="HideTip('tt20')">has</a></td><td class=SDescription>Test if an option exists (i.e. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.set" id=link22 onMouseOver="ShowTip(event, 'tt21', 'link22')" onMouseOut="HideTip('tt21')">set</a></td><td class=SDescription>Set an option’s value. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.save_error" id=link23 onMouseOver="ShowTip(event, 'tt22', 'link23')" onMouseOut="HideTip('tt22')">save_error</a></td><td class=SDescription>Save an error message to be reported later by <a href="#OptionParser.usage_or_errors" class=LFunction id=link24 onMouseOver="ShowTip(event, 'tt23', 'link24')" onMouseOut="HideTip('tt23')">usage_or_errors()</a>.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.errors" id=link25 onMouseOver="ShowTip(event, 'tt24', 'link25')" onMouseOut="HideTip('tt24')">errors</a></td><td class=SDescription>Used for testing.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.usage" id=link26 onMouseOver="ShowTip(event, 'tt25', 'link26')" onMouseOut="HideTip('tt25')">usage</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.descr" id=link27 onMouseOver="ShowTip(event, 'tt26', 'link27')" onMouseOut="HideTip('tt26')">descr</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.usage_or_errors" id=link28 onMouseOver="ShowTip(event, 'tt23', 'link28')" onMouseOut="HideTip('tt23')">usage_or_errors</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.print_errors" id=link29 onMouseOver="ShowTip(event, 'tt27', 'link29')" onMouseOut="HideTip('tt27')">print_errors</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.print_usage" id=link30 onMouseOver="ShowTip(event, 'tt28', 'link30')" onMouseOut="HideTip('tt28')">print_usage</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#OptionParser.prompt_noecho" id=link31 onMouseOver="ShowTip(event, 'tt29', 'link31')" onMouseOut="HideTip('tt29')">prompt_noecho</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#OptionParser.read_para_after" >read_para_after</a></td><td class=SDescription>Read the POD paragraph after a magical regex. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="OptionParser.Variables"></a>Variables</h3></div></div>
|
|
|
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="OptionParser.$POD_link_re"></a>$POD_link_re</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">my $POD_link_re</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="OptionParser.Functions"></a>Functions</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.new"></a>new</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub new</td></tr></table></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Optional Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>file</td><td class=CDLDescription>Filename to parse POD stuff from. Several subs take a $file param mostly for testing purposes. This arg provides a “global” default for even easier testing.</td></tr><tr><td class=CDLEntry>description</td><td class=CDLDescription>Tool’s description (overrides description from SYNOPSIS).</td></tr><tr><td class=CDLEntry>usage</td><td class=CDLDescription>Tool’s usage line (overrides Usage from SYNOPSIS).</td></tr><tr><td class=CDLEntry>head1</td><td class=CDLDescription>head1 heading under which options are listed</td></tr><tr><td class=CDLEntry>skip_rules</td><td class=CDLDescription>Don’t read paras before options as rules</td></tr><tr><td class=CDLEntry>item</td><td class=CDLDescription>Regex pattern to match options after =item</td></tr><tr><td class=CDLEntry>attributes</td><td class=CDLDescription>Hashref of allowed option attributes</td></tr><tr><td class=CDLEntry>parse_attributes</td><td class=CDLDescription>Coderef for parsing option attributes</td></tr></table><h4 class=CHeading>Returns</h4><p>OptionParser object</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.get_specs"></a>get_specs</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_specs</td></tr></table></blockquote><p>Read and parse options from the OPTIONS section of the POD. This sub should be called first, then <a href="#OptionParser.get_opts" class=LFunction id=link32 onMouseOver="ShowTip(event, 'tt15', 'link32')" onMouseOut="HideTip('tt15')">get_opts()</a>. <a href="#OptionParser._pod_to_specs" class=LFunction id=link33 onMouseOver="ShowTip(event, 'tt6', 'link33')" onMouseOut="HideTip('tt6')">_pod_to_specs()</a> and <a href="#OptionParser._parse_specs" class=LFunction id=link34 onMouseOver="ShowTip(event, 'tt7', 'link34')" onMouseOut="HideTip('tt7')">_parse_specs()</a> do most of the work. If the POD has a DSN OPTIONS section then a <a href="#OptionParser.DSNParser" class=LFunction id=link35 onMouseOver="ShowTip(event, 'tt4', 'link35')" onMouseOut="HideTip('tt4')">DSNParser</a> object is created which can be accessed with <a href="#OptionParser.DSNParser" class=LFunction id=link36 onMouseOver="ShowTip(event, 'tt4', 'link36')" onMouseOut="HideTip('tt4')">DSNParser()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$file</td><td class=CDLDescription>File name to read, <u> FILE </u> if none given</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.DSNParser"></a>DSNParser</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub DSNParser</td></tr></table></blockquote><p>Return the <a href="#OptionParser.DSNParser" class=LFunction id=link37 onMouseOver="ShowTip(event, 'tt4', 'link37')" onMouseOut="HideTip('tt4')">DSNParser</a> object automatically created for DSN type opts.</p><h4 class=CHeading>Returns</h4><p><a href="#OptionParser.DSNParser" class=LFunction id=link38 onMouseOver="ShowTip(event, 'tt4', 'link38')" onMouseOut="HideTip('tt4')">DSNParser</a> object</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.get_defaults_files"></a>get_defaults_files</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_defaults_files</td></tr></table></blockquote><p>Return the program’s defaults files.</p><h4 class=CHeading>Returns</h4><p>Array of defaults files</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser._pod_to_specs"></a>_pod_to_specs()</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _pod_to_specs</td></tr></table></blockquote><p>Parse basic specs for each option. Each opt spec is a hashref like:</p><blockquote><pre class="prettyprint">{
|
|
spec => GetOpt::Long specification,
|
|
desc => short description for --help
|
|
group => option group (default: 'default')
|
|
}</pre></blockquote><p>This is step 1 of 2 of parsing the POD opts. The second is C<_parse_specs()>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$file</td><td class=CDLDescription>File name to read, <u> FILE </u> if none given</td></tr></table><h4 class=CHeading>Returns</h4><p>Array of opt spec hashrefs to pass to <a href="#OptionParser._parse_specs" class=LFunction id=link39 onMouseOver="ShowTip(event, 'tt7', 'link39')" onMouseOut="HideTip('tt7')">_parse_specs()</a>.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser._parse_specs"></a>_parse_specs</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _parse_specs</td></tr></table></blockquote><p>Parse option specs and rules. The opt specs and rules are returned by <a href="#OptionParser._pod_to_specs" class=LFunction id=link40 onMouseOver="ShowTip(event, 'tt6', 'link40')" onMouseOut="HideTip('tt6')">_pod_to_specs()</a>. The following attributes are added to each opt spec:</p><blockquote><pre class="prettyprint">short => the option's short key (-A for --charset)
|
|
is_cumulative => true if the option is cumulative
|
|
is_negatable => true if the option is negatable
|
|
is_required => true if the option is required
|
|
type => the option's type, one of $self->{types}
|
|
got => true if the option was given explicitly on the cmd line
|
|
value => the option's value</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>@specs</td><td class=CDLDescription>Opt specs and rules from <a href="#OptionParser._pod_to_specs" class=LFunction id=link41 onMouseOver="ShowTip(event, 'tt6', 'link41')" onMouseOut="HideTip('tt6')">_pod_to_specs()</a></td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser._get_participants"></a>_get_participants</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _get_participants</td></tr></table></blockquote><p>Extract option names from a string. This is used to find the “participants” of option rules (i.e. the options to which a rule applies).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$str</td><td class=CDLDescription>String containing option names like “Options L<”--[no]foo”> and --bar are mutually exclusive.”</td></tr></table><h4 class=CHeading>Returns</h4><p>Array of option names</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.opts"></a>opts</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub opts</td></tr></table></blockquote><h4 class=CHeading>Returns</h4><p>A copy of the internal opts hash</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.short_opts"></a>short_opts</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub short_opts</td></tr></table></blockquote><h4 class=CHeading>Returns</h4><p>A copy of the internal short_opts hash</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.set_defaults"></a>set_defaults</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub set_defaults</td></tr></table></blockquote><p>Set default values for options.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.get_defaults"></a>get_defaults</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_defaults</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.get_groups"></a>get_groups</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_groups</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser._set_option"></a>_set_option</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _set_option</td></tr></table></blockquote><p>Getopt::Long calls this sub for each opt it finds on the cmd line. We have to do this in order to know which opts were “got” on the cmd line.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.get_opts"></a>get_opts</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_opts</td></tr></table></blockquote><p>Get command line options and enforce option rules. Option values are saved internally in $self->{opts} and accessed later by <a href="#OptionParser.get" class=LFunction id=link42 onMouseOver="ShowTip(event, 'tt18', 'link42')" onMouseOut="HideTip('tt18')">get()</a>, <a href="#OptionParser.got" class=LFunction id=link43 onMouseOver="ShowTip(event, 'tt19', 'link43')" onMouseOut="HideTip('tt19')">got()</a>, and <a href="#OptionParser.set" class=LFunction id=link44 onMouseOver="ShowTip(event, 'tt21', 'link44')" onMouseOut="HideTip('tt21')">set()</a>. Call <a href="#OptionParser.get_specs" class=LFunction id=link45 onMouseOver="ShowTip(event, 'tt3', 'link45')" onMouseOut="HideTip('tt3')">get_specs()</a> before calling this sub.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser._check_opts"></a>_check_opts</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _check_opts</td></tr></table></blockquote><p>Check options against rules and group restrictions.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>@long</td><td class=CDLDescription>Array of option names</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser._validate_type"></a>_validate_type</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _validate_type</td></tr></table></blockquote><p>Validate special option types like sizes and DSNs.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$opt</td><td class=CDLDescription>Long option name to validate</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.get"></a>get</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get</td></tr></table></blockquote><p>Get an option’s value. The option can be either a short or long name (e.g. -A or --charset).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$opt</td><td class=CDLDescription>Option name, long (--charset) or short (-A)</td></tr></table><h4 class=CHeading>Returns</h4><p>The option’s value</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.got"></a>got</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub got</td></tr></table></blockquote><p>Test if an option was explicitly given on the command line.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$opt</td><td class=CDLDescription>Option name, long (--charset) or short (-A)</td></tr></table><h4 class=CHeading>Returns</h4><p>Bool</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.has"></a>has</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub has</td></tr></table></blockquote><p>Test if an option exists (i.e. is specified in the tool’s POD).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$opt</td><td class=CDLDescription>Option name, long (--charset) or short (-A)</td></tr></table><h4 class=CHeading>Returns</h4><p>Bool</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.set"></a>set</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub set</td></tr></table></blockquote><p>Set an option’s value. No type checking is done so be careful to not set, for example, an integer option with a DSN.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$opt</td><td class=CDLDescription>Option name, long (--charset) or short (-A)</td></tr><tr><td class=CDLEntry>$val</td><td class=CDLDescription>Option’s new value</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.save_error"></a>save_error</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub save_error</td></tr></table></blockquote><p>Save an error message to be reported later by <a href="#OptionParser.usage_or_errors" class=LFunction id=link46 onMouseOver="ShowTip(event, 'tt23', 'link46')" onMouseOut="HideTip('tt23')">usage_or_errors()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$error</td><td class=CDLDescription>Error message</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.errors"></a>errors</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub errors</td></tr></table></blockquote><p>Used for testing.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.usage"></a>usage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub usage</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.descr"></a>descr</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub descr</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.usage_or_errors"></a>usage_or_errors</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub usage_or_errors</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.print_errors"></a>print_errors</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub print_errors</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.print_usage"></a>print_usage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub print_usage</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.prompt_noecho"></a>prompt_noecho</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub prompt_noecho</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="OptionParser.read_para_after"></a>read_para_after</h3><div class=CBody><p>Read the POD paragraph after a magical regex. This is used, for exmaple, to get default CREATE TABLE from the POD. We write something like:</p><blockquote><pre class="prettyprint">This is the default MAGIC_foo_table:
|
|
|
|
CREATE TABLE `foo` (i INT)
|
|
|
|
Blah blah...</pre></blockquote><p>Then to get that CREATE TABLE, you pass “MAGIC_foo_table” as the magical regex.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$file</td><td class=CDLDescription>File to read</td></tr><tr><td class=CDLEntry>$regex</td><td class=CDLDescription>Regex to find something magical before the desired POD paragraph</td></tr></table><h4 class=CHeading>Returns</h4><p>POD paragraph after magical regex</p></div></div></div>
|
|
|
|
</div><!--Content-->
|
|
|
|
|
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
|
|
|
|
|
<div id=Menu><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Modules</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="Advisor-pm.html">Advisor</a></div></div><div class=MEntry><div class=MFile><a href="AdvisorRules-pm.html">AdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="BinaryLogParser-pm.html">BinaryLogParser</a></div></div><div class=MEntry><div class=MFile><a href="ChangeHandler-pm.html">ChangeHandler</a></div></div><div class=MEntry><div class=MFile><a href="CompareQueryTimes-pm.html">CompareQueryTimes</a></div></div><div class=MEntry><div class=MFile><a href="CompareResults-pm.html">CompareResults</a></div></div><div class=MEntry><div class=MFile><a href="CompareTableStructs-pm.html">CompareTableStructs</a></div></div><div class=MEntry><div class=MFile><a href="CompareWarnings-pm.html">CompareWarnings</a></div></div><div class=MEntry><div class=MFile><a href="CopyRowsInsertSelect-pm.html">CopyRowsInsertSelect</a></div></div><div class=MEntry><div class=MFile><a href="Daemon-pm.html">Daemon</a></div></div><div class=MEntry><div class=MFile><a href="DSNParser-pm.html">DSNParser</a></div></div><div class=MEntry><div class=MFile><a href="DuplicateKeyFinder-pm.html">DuplicateKeyFinder</a></div></div><div class=MEntry><div class=MFile><a href="EventAggregator-pm.html">EventAggregator</a></div></div><div class=MEntry><div class=MFile><a href="EventTimeline-pm.html">EventTimeline</a></div></div><div class=MEntry><div class=MFile><a href="ExecutionThrottler-pm.html">ExecutionThrottler</a></div></div><div class=MEntry><div class=MFile><a href="ExplainAnalyzer-pm.html">ExplainAnalyzer</a></div></div><div class=MEntry><div class=MFile><a href="FileIterator-pm.html">FileIterator</a></div></div><div class=MEntry><div class=MFile><a href="ForeignKeyIterator-pm.html">ForeignKeyIterator</a></div></div><div class=MEntry><div class=MFile><a href="GeneralLogParser-pm.html">GeneralLogParser</a></div></div><div class=MEntry><div class=MFile><a href="HTTPProtocolParser-pm.html">HTTPProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="IndexUsage-pm.html">IndexUsage</a></div></div><div class=MEntry><div class=MFile><a href="InnoDBStatusParser-pm.html">InnoDBStatusParser</a></div></div><div class=MEntry><div class=MFile><a href="KeySize-pm.html">KeySize</a></div></div><div class=MEntry><div class=MFile><a href="LogSplitter-pm.html">LogSplitter</a></div></div><div class=MEntry><div class=MFile><a href="MaatkitTest-pm.html">MaatkitTest</a></div></div><div class=MEntry><div class=MFile><a href="MasterSlave-pm.html">MasterSlave</a></div></div><div class=MEntry><div class=MFile><a href="MemcachedEvent-pm.html">MemcachedEvent</a></div></div><div class=MEntry><div class=MFile><a href="MemcachedProtocolParser-pm.html">MemcachedProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="MockSth-pm.html">MockSth</a></div></div><div class=MEntry><div class=MFile><a href="MockSync-pm.html">MockSync</a></div></div><div class=MEntry><div class=MFile><a href="MockSyncStream-pm.html">MockSyncStream</a></div></div><div class=MEntry><div class=MFile><a href="MySQLConfig-pm.html">MySQLConfig</a></div></div><div class=MEntry><div class=MFile><a href="MySQLConfigComparer-pm.html">MySQLConfigComparer</a></div></div><div class=MEntry><div class=MFile><a href="MySQLDump-pm.html">MySQLDump</a></div></div><div class=MEntry><div class=MFile><a href="MySQLProtocolParser-pm.html">MySQLProtocolParser</a></div></div><div class=MEntry><div class=MFile id=MSelected>OptionParser</div></div><div class=MEntry><div class=MFile><a href="OSCCaptureSync-pm.html">OSCCaptureSync</a></div></div><div class=MEntry><div class=MFile><a href="Outfile-pm.html">Outfile</a></div></div><div class=MEntry><div class=MFile><a href="PgLogParser-pm.html">PgLogParser</a></div></div><div class=MEntry><div class=MFile><a href="Pipeline-pm.html">Pipeline</a></div></div><div class=MEntry><div class=MFile><a href="PodParser-pm.html">PodParser</a></div></div><div class=MEntry><div class=MFile><a href="Processlist-pm.html">Processlist</a></div></div><div class=MEntry><div class=MFile><a href="ProcesslistAggregator-pm.html">ProcesslistAggregator</a></div></div><div class=MEntry><div class=MFile><a href="Progress-pm.html">Progress</a></div></div><div class=MEntry><div class=MFile><a href="ProtocolParser-pm.html">ProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="QueryAdvisorRules-pm.html">QueryAdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="QueryParser-pm.html">QueryParser</a></div></div><div class=MEntry><div class=MFile><a href="QueryReportFormatter-pm.html">QueryReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="QueryReview-pm.html">QueryReview</a></div></div><div class=MEntry><div class=MFile><a href="QueryRewriter-pm.html">QueryRewriter</a></div></div><div class=MEntry><div class=MFile><a href="Quoter-pm.html">Quoter</a></div></div><div class=MEntry><div class=MFile><a href="ReportFormatter-pm.html">ReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="Retry-pm.html">Retry</a></div></div><div class=MEntry><div class=MFile><a href="RowDiff-pm.html">RowDiff</a></div></div><div class=MEntry><div class=MFile><a href="Runtime-pm.html">Runtime</a></div></div><div class=MEntry><div class=MFile><a href="Sandbox-pm.html">Sandbox</a></div></div><div class=MEntry><div class=MFile><a href="Schema-pm.html">Schema</a></div></div><div class=MEntry><div class=MFile><a href="SchemaIterator-pm.html">SchemaIterator</a></div></div><div class=MEntry><div class=MFile><a href="SimpleTCPDumpParser-pm.html">SimpleTCPDumpParser</a></div></div><div class=MEntry><div class=MFile><a href="SlowLogParser-pm.html">SlowLogParser</a></div></div><div class=MEntry><div class=MFile><a href="SlowLogWriter-pm.html">SlowLogWriter</a></div></div><div class=MEntry><div class=MFile><a href="SQLParser-pm.html">SQLParser</a></div></div><div class=MEntry><div class=MFile><a href="SysLogParser-pm.html">SysLogParser</a></div></div><div class=MEntry><div class=MFile><a href="TableChecksum-pm.html">TableChecksum</a></div></div><div class=MEntry><div class=MFile><a href="TableChunker-pm.html">TableChunker</a></div></div><div class=MEntry><div class=MFile><a href="TableNibbler-pm.html">TableNibbler</a></div></div><div class=MEntry><div class=MFile><a href="TableParser-pm.html">TableParser</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncChunk-pm.html">TableSyncChunk</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncer-pm.html">TableSyncer</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncGroupBy-pm.html">TableSyncGroupBy</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncNibble-pm.html">TableSyncNibble</a></div></div><div class=MEntry><div class=MFile><a href="TableSyncStream-pm.html">TableSyncStream</a></div></div><div class=MEntry><div class=MFile><a href="TableUsage-pm.html">TableUsage</a></div></div><div class=MEntry><div class=MFile><a href="TcpdumpParser-pm.html">TcpdumpParser</a></div></div><div class=MEntry><div class=MFile><a href="TCPRequestAggregator-pm.html">TCPRequestAggregator</a></div></div><div class=MEntry><div class=MFile><a href="TextResultSetParser-pm.html">TextResultSetParser</a></div></div><div class=MEntry><div class=MFile><a href="TimeSeriesTrender-pm.html">TimeSeriesTrender</a></div></div><div class=MEntry><div class=MFile><a href="Transformers-pm.html">Transformers</a></div></div><div class=MEntry><div class=MFile><a href="UpgradeReportFormatter-pm.html">UpgradeReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="VariableAdvisorRules-pm.html">VariableAdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="VersionParser-pm.html">VersionParser</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Tools</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../tools/pt-archiver-pm.html">pt_archiver</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-config-diff-pm.html">pt_config_diff</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-deadlock-logger-pm.html">pt_deadlock_logger</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-duplicate-key-checker-pm.html">pt_duplicate_key_checker</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-fifo-split-pm.html">pt_fifo_split</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-find-pm.html">pt_find</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-fk-error-logger-pm.html">pt_fk_error_logger</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-heartbeat-pm.html">pt_heartbeat</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-index-usage-pm.html">pt_index_usage</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-kill-pm.html">pt_kill</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-log-player-pm.html">pt_log_player</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-online-schema-change-pm.html">pt_online_schema_change</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-profile-compact-pm.html">pt_profile_compact</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-query-advisor-pm.html">pt_query_advisor</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-query-digest-pm.html">pt_query_digest</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-query-profiler-pm.html">pt_query_profiler</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-schema-advisor-pm.html">pt_schema_advisor</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-show-grants-pm.html">pt_show_grants</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-slave-delay-pm.html">pt_slave_delay</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-slave-find-pm.html">pt_slave_find</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-slave-restart-pm.html">pt_slave_restart</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-table-checksum-pm.html">pt_table_checksum</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-table-sync-pm.html">pt_table_sync</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-table-usage-pm.html">pt_table_usage</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-tcp-model-pm.html">pt_tcp_model</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-trend-pm.html">pt_trend</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-upgrade-pm.html">pt_upgrade</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-variable-advisor-pm.html">pt_variable_advisor</a></div></div><div class=MEntry><div class=MFile><a href="../tools/pt-visual-explain-pm.html">pt_visual_explain</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Index</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
|
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
|
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
|
HideAllBut([1], 4);// --></script></div><!--Menu-->
|
|
|
|
|
|
|
|
<!--START_ND_TOOLTIPS-->
|
|
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">my $POD_link_re</td></tr></table></blockquote></div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub new</td></tr></table></blockquote></div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_specs</td></tr></table></blockquote>Read and parse options from the OPTIONS section of the POD. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub DSNParser</td></tr></table></blockquote>Return the DSNParser object automatically created for DSN type opts.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_defaults_files</td></tr></table></blockquote>Return the program’s defaults files.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _pod_to_specs</td></tr></table></blockquote>Parse basic specs for each option. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _parse_specs</td></tr></table></blockquote>Parse option specs and rules. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _get_participants</td></tr></table></blockquote>Extract option names from a string. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub opts</td></tr></table></blockquote>A copy of the internal opts hash</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub short_opts</td></tr></table></blockquote>A copy of the internal short_opts hash</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub set_defaults</td></tr></table></blockquote>Set default values for options.</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_defaults</td></tr></table></blockquote></div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_groups</td></tr></table></blockquote></div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _set_option</td></tr></table></blockquote>Getopt::Long calls this sub for each opt it finds on the cmd line. </div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_opts</td></tr></table></blockquote>Get command line options and enforce option rules. </div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _check_opts</td></tr></table></blockquote>Check options against rules and group restrictions.</div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub _validate_type</td></tr></table></blockquote>Validate special option types like sizes and DSNs.</div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get</td></tr></table></blockquote>Get an option’s value. </div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub got</td></tr></table></blockquote>Test if an option was explicitly given on the command line.</div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub has</td></tr></table></blockquote>Test if an option exists (i.e. </div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub set</td></tr></table></blockquote>Set an option’s value. </div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub save_error</td></tr></table></blockquote>Save an error message to be reported later by usage_or_errors().</div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub usage_or_errors</td></tr></table></blockquote></div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub errors</td></tr></table></blockquote>Used for testing.</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub usage</td></tr></table></blockquote></div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub descr</td></tr></table></blockquote></div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub print_errors</td></tr></table></blockquote></div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub print_usage</td></tr></table></blockquote></div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub prompt_noecho</td></tr></table></blockquote></div></div><!--END_ND_TOOLTIPS-->
|
|
|
|
|
|
|
|
|
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
|
|
|
|
|
<script language=JavaScript><!--
|
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |