📄 gloss.htm
字号:
<html><head><title>Glossary (Programming Perl)</title><!-- STYLESHEET --><link rel="stylesheet" type="text/css" href="../style/style1.css"><!-- METADATA --><!--Dublin Core Metadata--><meta name="DC.Creator" content=""><meta name="DC.Date" content=""><meta name="DC.Format" content="text/xml" scheme="MIME"><meta name="DC.Generator" content="XSLT stylesheet, xt by James Clark"><meta name="DC.Identifier" content=""><meta name="DC.Language" content="en-US"><meta name="DC.Publisher" content="O'Reilly & Associates, Inc."><meta name="DC.Source" content="" scheme="ISBN"><meta name="DC.Subject.Keyword" content=""><meta name="DC.Title" content="Glossary"><meta name="DC.Type" content="Text.Monograph"></head><body><!-- START OF BODY --><!-- TOP BANNER --><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home"><map name="banner-map"><AREA SHAPE="RECT" COORDS="0,0,466,71" HREF="index.htm" ALT="Programming Perl"><AREA SHAPE="RECT" COORDS="467,0,514,18" HREF="jobjects/fsearch.htm" ALT="Search this book"></map><!-- TOP NAV BAR --><div class="navbar"><table width="515" border="0"><tr><td align="left" valign="top" width="172"><a href="ch33_01.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0"></a></td><td align="center" valign="top" width="171"><a href="part5.htm">Part 5: Reference Material</a></td><td align="right" valign="top" width="172"></td></tr></table></div><hr width="515" align="left"><!-- SECTION BODY --><h2>Glossary</h2><dl><a name="INDEX-5960"></a><dt>accessor methods</dt><dd><p>A <em class="emphasis">method</em> used to indirectly inspect or update an<em class="emphasis">object</em>'s state (its <em class="emphasis">instancevariables</em>).</p></dd></dl><dl><a name="INDEX-"></a><dt>actual arguments</dt><dd><p>The <em class="emphasis">scalar values</em> that you supply to a<em class="emphasis">function</em> or <em class="emphasis">subroutine</em> whenyou call it. For instance, when you call<tt class="literal">power("puff")</tt>, the string<tt class="literal">"puff"</tt> is the actual argument. See also<em class="emphasis">argument</em> and <em class="emphasis">formalarguments</em>.</p></dd></dl><dl><a name="INDEX-"></a><dt>address operator</dt><dd><p>Some languages work directly with the memory addresses of values, butthis can be like playing with fire. Perl provides a set of asbestosgloves for handling all memory management. The closest to an addressoperator in Perl is the backslash operator, but it gives you a<em class="emphasis">hard reference</em>, which is much safer than a memoryaddress.</p></dd></dl><dl><a name="INDEX-5963"></a><dt>algorithm</dt><dd><p>A well-defined sequence of steps, clearly enough explained thateven a computer could do them.</p></dd></dl><dl><a name="INDEX-5964"></a><dt>alias</dt><dd><p>A nickname for something, which behaves in all ways as though you'dused the original name instead of the nickname. Temporary aliases areimplicitly created in the loop variable for<tt class="literal">foreach</tt>loops, in the <tt class="literal">$_</tt> variable for<tt class="literal">map</tt> or <tt class="literal">grep</tt>operators, in<tt class="literal">$a</tt> and <tt class="literal">$b</tt> during<tt class="literal">sort</tt>'s comparison function, and in each element of<tt class="literal">@_</tt> for the <em class="emphasis">actual arguments</em> ofa subroutine call. Permanent aliases are explicitly created in<em class="emphasis">packages</em> by <em class="emphasis">importing</em>symbols or by assignment to <em class="emphasis">typeglobs</em>. Lexicallyscoped aliases for package variables are explicitly created by the<tt class="literal">our</tt> declaration.</p></dd></dl><dl><a name="INDEX-"></a><dt>alternatives</dt><dd><p>A list of possible choices from which you may select only one, as in"Would you like door A, B, or C?" Alternatives in regular expressionsare separated with a single vertical bar: <tt class="literal">|</tt>.Alternatives in normal Perl expressions are separated with a doublevertical bar: <tt class="literal">||</tt>. Logical alternatives in<em class="emphasis">Boolean</em> expressions are separated with either<tt class="literal">||</tt> or <tt class="literal">or</tt>.</p></dd></dl><dl><a name="INDEX-5966"></a><dt>anonymous</dt><dd><p>Used to describe a <em class="emphasis">referent</em> that is not directlyaccessible through a named <em class="emphasis">variable</em>. Such areferent must be indirectly accessible through at least one<em class="emphasis">hard reference</em>. When the last hard referencegoes away, the anonymous referent is destroyed without pity.</p></dd></dl><dl><a name="INDEX-5967"></a><dt>architecture</dt><dd><p>The kind of compluter you're working on, where one "kind" of computermeans all those computers sharing a compatible machine language. SincePerl programs are (typically) simple text files, not executableimages, a Perl program is much less sensitive to the architecture it'srunning on than programs in other languages, such as C, that arecompiled into machine code. See also <em class="emphasis">platform</em>and <em class="emphasis">operating system</em>.</p></dd></dl><dl><a name="INDEX-5968"></a><a name="INDEX-5969"></a><dt>argument</dt><dd><p>A piece of data supplied to a <em class="emphasis">program</em>,<em class="emphasis">subroutine</em>, <em class="emphasis">function</em>, or<em class="emphasis">method</em> to tell it what it's supposed to do. Alsocalled a "parameter".</p></dd></dl><dl><a name="INDEX-6047"></a><dt>ARGV</dt><dd><p>The name of the array containing the <em class="emphasis">argument</em><em class="emphasis">vector</em> from the command line. If you use theempty <tt class="literal"><></tt> operator, <tt class="literal">ARGV</tt> isthe name of both the <em class="emphasis">filehandle</em> used to traversethe arguments and the <em class="emphasis">scalar</em> containing thename of the current input file.</p></dd></dl><dl><a name="INDEX-5971"></a><dt>arithmetical operator</dt><dd><p>A <em class="emphasis">symbol</em> such as <tt class="literal">+</tt> or<tt class="literal">/</tt> that tells Perl to do the arithmetic you weresupposed to learn in grade school.</p></dd></dl><dl><a name="INDEX-5972"></a><dt>array</dt><dd><p>An ordered sequence of <em class="emphasis">values</em>, stored such thatyou can easily access any of the values using an <em class="emphasis">integersubscript</em> that specifies the value's<em class="emphasis">offset</em> in the sequence.</p></dd></dl><dl><a name="INDEX-"></a><a name="INDEX-"></a><dt>array context</dt><dd><p>An archaic expression for what is more correctly referred to as <em class="emphasis">listcontext</em>.</p></dd></dl><dl><a name="INDEX-5976"></A><a name="INDEX-"></a><dt>ASCII</dt><dd><p>The American Standard Code for Information Interchange (a 7-bitcharacter set adequate only for poorly representing English text).Often used loosely to describe the lowest 128 values of the variousISO-8859-X character sets, a bunch of mutually incompatible 8-bitcodes best described as half ASCII. See also <em class="emphasis">Unicode</em>.</p></dd></dl><dl><a name="INDEX-5978"></a><dt>assertion</dt><dd><p>A component of a <em class="emphasis">regular expression</em> that must betrue for the pattern to match but does not necessarily match anycharacters itself. Often used specifically to mean a<em class="emphasis">zero-width</em> assertion.</p></dd></dl><dl><dt>assignment</dt><dd><p>An <em class="emphasis">operator</em> whose assigned mission in life is tochange the value of a <em class="emphasis">variable</em>.</p></dd></dl><dl><a name="INDEX-5979"></a><dt>assignment operator</dt><dd><p>Either a regular <em class="emphasis">assignment</em>, or a compound<em class="emphasis">operator</em> composed of an ordinary assignment andsome other operator, that changes the value of a variable in place,that is, relative to its old value. For example, <tt class="literal">$a +=2</tt> adds <tt class="literal">2</tt> to <tt class="literal">$a</tt>.</p></dd></dl><dl><dt>associative array</dt><dd><p>See <em class="emphasis">hash</em>. Please.</p></dd></dl><dl><a name="INDEX-5980"></a><dt>associativity</dt><dd><p>Determines whether you do the left <em class="emphasis">operator</em> firstor the right <em class="emphasis">operator</em> first when you have "A<em class="emphasis">operator</em> B <em class="emphasis">operator</em> C" andthe two operators are of the same precedence. Operators like<tt class="literal">+</tt> are left associative, while operators like<tt class="literal">**</tt> are right associative. See <a href="ch03_01.htm">Chapter 3, "Unary and Binary Operators"</a>, for a list ofoperators and their associativity.</p></dd></dl><dl><a name="INDEX-5981"></a><dt>asynchronous</dt><dd><p>Said of events or activities whose relative temporal ordering isindeterminate because too many things are going on at once. Hence,an asynchronous event is one you didn't know when to expect.</p></dd></dl><dl><a name="INDEX-"></a><dt>atom</dt><dd><p>A <em class="emphasis">regular expression</em> component potentiallymatching a <em class="emphasis">substring</em> containing one or morecharacters and treated as an indivisible syntactic unit by anyfollowing <em class="emphasis">quantifier</em>. (Contrast with an<em class="emphasis">assertion</em> that matches something of<em class="emphasis">zero width</em> and may not be quantified.)</p></dd></dl><dl><dt>atomic operation</dt><dd><p>When Democritus gave the word "atom" to the indivisible bits ofmatter, he meant literally something that could not be cut:<em class="emphasis">a-</em> (not) + <em class="emphasis">tomos</em> (cuttable).An atomic operation is an action that can't be interrupted, not oneforbidden in a nuclear-free zone.</p></dd></dl><dl><a name="INDEX-"></a><dt>attribute</dt><dd><p>A new feature that allows the declaration of<em class="emphasis">variables</em> and <em class="emphasis">subroutines</em>with modifiers as in <tt class="literal">sub foo : locked method</tt>.Also, another name for an <em class="emphasis">instance variable</em> of an<em class="emphasis">object</em>.</p></dd></dl><a name="INDEX-5984"></a><dl><dt>autogeneration</dt><dd><p>A feature of <em class="emphasis">operator overloading</em> of<em class="emphasis">objects</em>, whereby the behavior of certain<em class="emphasis">operators</em> can be reasonably deduced using morefundamental operators. This assumes that the overloaded operatorswill often have the same relationships as the regular operators. See<a href="ch13_01.htm">Chapter 13, "Overloading"</a>.</p></dd></dl><dl><a name="INDEX-5985"></a><dt>autoincrement</dt><dd><p>To add one to something automatically, hence the name of the the<tt class="literal">++</tt> operator. To instead subtract one fromsomething automatically is known as an "autodecrement".</p></dd></dl><dl><a name="INDEX-"></a><dt>autoload</dt><dd><p>To load on demand. (Also called "lazy" loading.) Specifically, tocall an <tt class="literal">AUTOLOAD</tt> subroutine on behalf of anundefined subroutine.</p></dd></dl><dl><a name="INDEX-5987"></a><dt>autosplit</dt><dd><p>To split a string automatically, as the <span class="option">-a</span><em class="emphasis">switch</em> does when running under <span class="option">-p</span>or <span class="option">-n</span> in order to emulate <em class="emphasis">awk</em>. (Seealso the <tt class="literal">AutoSplit</tt> module, which has nothing to dowith the <span class="option">-a</span> switch, but a lot to do with autoloading.)</p></dd></dl><dl><a name="INDEX-5988"></a><dt>autovivification</dt><dd><p>A Greco-Roman word meaning "to bring oneself to life". In Perl,storage locations (<em class="emphasis">lvalues</em>) spontaneouslygenerate themselves as needed, including the creation of any<em class="emphasis">hard reference</em> values to point to the next levelof storage. The assignment <tt class="literal">$a[5][5][5][5][5] ="quintet"</tt> potentially creates five scalar storagelocations, plus four references (in the first four scalar locations)pointing to four new anonymous arrays (to hold the last four scalarlocations). But the point of autovivification is that you don't haveto worry about it.</p></dd></dl><dl><a name="INDEX-5989"></a><dt>AV</dt><dd><p>Short for "array value", which refers to one of Perl's internal datatypes that holds an <em class="emphasis">array</em>. The<tt class="literal">AV</tt> type is a subclass of <em class="emphasis">SV</em>.</p></dd></dl><dl><a name="INDEX-5990"></a><dt>awk</dt><dd><p>Descriptive editing term--short for "awkward". Also coincidentallyrefers to a venerable text-processing language from which Perlderived some of its high-level ideas.</p></dd></dl><dl><a name="INDEX-"></a><dt>backreference</dt><dd><p>A substring <em class="emphasis">captured</em> by a subpattern withinunadorned parentheses in a <em class="emphasis">regex</em>. Backslasheddecimal numbers (<tt class="literal">\1</tt>, <tt class="literal">\2</tt>, etc.)later in the same pattern refer back to the corresponding subpatternin the current match. Outside the pattern, the numbered variables(<tt class="literal">$1</tt>, <tt class="literal">$2</tt>, etc.) continue to referto these same values, as long as the pattern was the last successfulmatch of the current dynamic scope.</p></dd></dl><dl><a name="INDEX-"></a><dt>backtracking</dt><dd><p>The practice of saying, "If I had to do it all over, I'd do itdifferently," and then actually going back and doing it all over
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -