|
perlglossary - Perl Glossary
A glossary of terms (technical and otherwise) used in the Perl documentation.
Other useful sources include the Free On-Line Dictionary of Computing
http://foldoc.doc.ic.ac.uk/foldoc/index.html, the Jargon File
http://catb.org/~esr/jargon/, and Wikipedia http://www.wikipedia.org/.
- accessor methods
-
A method used to indirectly inspect or update an object's
state (its instance variables).
- actual arguments
-
The scalar values that you supply to a function
or subroutine when you call it. For instance, when you call
power("puff"), the string "puff" is the actual argument. See
also argument and formal arguments.
- address operator
-
Some languages work directly with the memory addresses of values, but
this can be like playing with fire. Perl provides a set of asbestos
gloves for handling all memory management. The closest to an address
operator in Perl is the backslash operator, but it gives you a hard reference, which is much safer than a memory address.
- algorithm
-
A well-defined sequence of steps, clearly enough explained that even a
computer could do them.
- alias
-
A nickname for something, which behaves in all ways as though you'd
used the original name instead of the nickname. Temporary aliases are
implicitly created in the loop variable for foreach loops, in the
$_ variable for map or grep
operators, in $a and $b during sort's
comparison function, and in each element of @_ for the actual arguments of a subroutine call. Permanent aliases are explicitly
created in packages by importing symbols or by
assignment to typeglobs. Lexically scoped aliases for
package variables are explicitly created by the our
declaration.
- alternatives
-
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 expressions
are separated with a single vertical bar: |. Alternatives in
normal Perl expressions are separated with a double vertical bar:
||. Logical alternatives in Boolean expressions are separated
with either || or or.
- anonymous
-
Used to describe a referent that is not directly accessible
through a named variable. Such a referent must be indirectly
accessible through at least one hard reference. When the last
hard reference goes away, the anonymous referent is destroyed without
pity.
- architecture
-
The kind of computer you're working on, where one "kind" of computer
means all those computers sharing a compatible machine language.
Since Perl programs are (typically) simple text files, not executable
images, a Perl program is much less sensitive to the architecture it's
running on than programs in other languages, such as C, that are
compiled into machine code. See also platform and operating system.
- argument
-
A piece of data supplied to a program,
subroutine, function, or method to tell it what it's
supposed to do. Also called a "parameter".
- ARGV
-
The name of the array containing the argument vector from the
command line. If you use the empty <> operator, ARGV is
the name of both the filehandle used to traverse the arguments and
the scalar containing the name of the current input file.
- arithmetical operator
-
A symbol such as + or / that tells Perl to do the arithmetic
you were supposed to learn in grade school.
- array
-
An ordered sequence of values, stored such that you can
easily access any of the values using an integer subscript
that specifies the value's offset in the sequence.
- array context
-
An archaic expression for what is more correctly referred to as
list context.
- ASCII
-
The American Standard Code for Information Interchange (a 7-bit
character set adequate only for poorly representing English text).
Often used loosely to describe the lowest 128 values of the various
ISO-8859-X character sets, a bunch of mutually incompatible 8-bit
codes best described as half ASCII. See also Unicode.
- assertion
-
A component of a regular expression that must be true for the
pattern to match but does not necessarily match any characters itself.
Often used specifically to mean a zero width assertion.
- assignment
-
An operator whose assigned mission in life is to change the value
of a variable.
- assignment operator
-
Either a regular assignment, or a compound operator composed
of an ordinary assignment and some other operator, that changes the
value of a variable in place, that is, relative to its old value. For
example, $a += 2 adds 2 to $a.
- associative array
-
See hash. Please.
- associativity
-
Determines whether you do the left operator first or the right
operator first when you have "A operator B operator C" and
the two operators are of the same precedence. Operators like + are
left associative, while operators like ** are right associative.
See the perlop manpage for a list of operators and their associativity.
- asynchronous
-
Said of events or activities whose relative temporal ordering is
indeterminate because too many things are going on at once. Hence, an
asynchronous event is one you didn't know when to expect.
- atom
-
A regular expression component potentially matching a
substring containing one or more characters and treated as an
indivisible syntactic unit by any following quantifier. (Contrast
with an assertion that matches something of zero width and may
not be quantified.)
- atomic operation
-
When Democritus gave the word "atom" to the indivisible bits of
matter, he meant literally something that could not be cut: a-
(not) + tomos (cuttable). An atomic operation is an action that
can't be interrupted, not one forbidden in a nuclear-free zone.
- attribute
-
A new feature that allows the declaration of variables
and subroutines with modifiers as in sub foo : locked
method. Also, another name for an instance variable of an
object.
- autogeneration
-
A feature of operator overloading of objects, whereby
the behavior of certain operators can be reasonably
deduced using more fundamental operators. This assumes that the
overloaded operators will often have the same relationships as the
regular operators. See the perlop manpage.
- autoincrement
-
To add one to something automatically, hence the name of the ++
operator. To instead subtract one from something automatically is
known as an "autodecrement".
- autoload
-
To load on demand. (Also called "lazy" loading.) Specifically, to
call an AUTOLOAD subroutine on behalf of an
undefined subroutine.
- autosplit
-
To split a string automatically, as the -a switch does when
running under -p or -n in order to emulate awk. (See also
the the AutoSplit manpage module, which has nothing to do with the -a
switch, but a lot to do with autoloading.)
- autovivification
-
A Greco-Roman word meaning "to bring oneself to life". In Perl,
storage locations (lvalues) spontaneously generate
themselves as needed, including the creation of any hard reference
values to point to the next level of storage. The assignment
$a[5][5][5][5][5] = "quintet" potentially creates five scalar
storage locations, plus four references (in the first four scalar
locations) pointing to four new anonymous arrays (to hold the last
four scalar locations). But the point of autovivification is that you
don't have to worry about it.
- AV
-
Short for "array value", which refers to one of Perl's internal data
types that holds an array. The AV type is a subclass of
SV.
- awk
-
Descriptive editing term--short for "awkward". Also coincidentally
refers to a venerable text-processing language from which Perl derived
some of its high-level ideas.
- backreference
-
A substring captured by a subpattern within
unadorned parentheses in a regex. Backslashed decimal numbers
(\1, \2, etc.) later in the same pattern refer back to the
corresponding subpattern in the current match. Outside the pattern,
the numbered variables ($1, $2, etc.) continue to refer to these
same values, as long as the pattern was the last successful match of
the current dynamic scope.
- backtracking
-
The practice of saying, "If I had to do it all over, I'd do it
differently," and then actually going back and doing it all over
differently. Mathematically speaking, it's returning from an
unsuccessful recursion on a tree of possibilities. Perl backtracks
when it attempts to match patterns with a regular expression, and
its earlier attempts don't pan out. See Backtracking in the perlre manpage.
- backward compatibility
-
Means you can still run your old program because we didn't break any
of the features or bugs it was relying on.
- bareword
-
A word sufficiently ambiguous to be deemed illegal under use strict 'subs'. In the absence of that stricture, a
bareword is treated as if quotes were around it.
- base class
-
A generic object type; that is, a class from which other, more
specific classes are derived genetically by inheritance. Also
called a "superclass" by people who respect their ancestors.
- big-endian
-
From Swift: someone who eats eggs big end first. Also used of
computers that store the most significant byte of a word at a
lower byte address than the least significant byte. Often considered
superior to little-endian machines. See also little-endian.
- binary
-
Having to do with numbers represented in base 2. That means there's
basically two numbers, 0 and 1. Also used to describe a "non-text
file", presumably because such a file makes full use of all the binary
bits in its bytes. With the advent of Unicode, this distinction,
already suspect, loses even more of its meaning.
- binary operator
-
An operator that takes two operands.
- bind
-
To assign a specific network address to a socket.
- bit
-
An integer in the range from 0 to 1, inclusive. The smallest possible
unit of information storage. An eighth of a byte or of a dollar.
(The term "Pieces of Eight" comes from being able to split the old
Spanish dollar into 8 bits, each of which still counted for money.
That's why a 25-cent piece today is still "two bits".)
- bit shift
-
The movement of bits left or right in a computer word, which has the
effect of multiplying or dividing by a power of 2.
- bit string
-
A sequence of bits that is actually being thought of as a
sequence of bits, for once.
- bless
-
In corporate life, to grant official approval to a thing, as in, "The
VP of Engineering has blessed our WebCruncher project." Similarly in
Perl, to grant official approval to a referent so that it can
function as an object, such as a WebCruncher object. See
bless in the perlfunc manpage.
- block
-
What a process does when it has to wait for something: "My process
blocked waiting for the disk." As an unrelated noun, it refers to a
large chunk of data, of a size that the operating system likes to
deal with (normally a power of two such as 512 or 8192). Typically
refers to a chunk of data that's coming from or going to a disk file.
- BLOCK
-
A syntactic construct consisting of a sequence of Perl
statements that is delimited by braces. The if and
while statements are defined in terms of BLOCKs, for instance.
Sometimes we also say "block" to mean a lexical scope; that is, a
sequence of statements that act like a BLOCK, such as within an
eval or a file, even though the statements aren't
delimited by braces.
- block buffering
-
A method of making input and output efficient by passing one block
at a time. By default, Perl does block buffering to disk files. See
buffer and command buffering.
- Boolean
-
A value that is either true or false.
- Boolean context
-
A special kind of scalar context used in conditionals to decide
whether the scalar value returned by an expression is true or
false. Does not evaluate as either a string or a number. See
context.
- breakpoint
-
A spot in your program where you've told the debugger to stop
execution so you can poke around and see whether anything
is wrong yet.
- broadcast
-
To send a datagram to multiple destinations simultaneously.
- BSD
-
A psychoactive drug, popular in the 80s, probably developed at
U. C. Berkeley or thereabouts. Similar in many ways to the
prescription-only medication called "System V", but infinitely more
useful. (Or, at least, more fun.) The full chemical name is
"Berkeley Standard Distribution".
- bucket
-
A location in a hash table containing (potentially) multiple
entries whose keys "hash" to the same hash value according to its hash
function. (As internal policy, you don't have to worry about it,
unless you're into internals, or policy.)
- buffer
-
A temporary holding location for data. Block buffering means that the data is passed on to its destination
whenever the buffer is full. Line buffering means
that it's passed on whenever a complete line is received. Command buffering means that it's passed every time you do
a print command (or equivalent). If your output is
unbuffered, the system processes it one byte at a time without the use
of a holding area. This can be rather inefficient.
- built-in
-
A function that is predefined in the language. Even when hidden
by overriding, you can always get at a built-in function by
qualifying its name with the CORE:: pseudo-package.
- bundle
-
A group of related modules on CPAN. (Also, sometimes refers to a
group of command-line switches grouped into one switch cluster.)
- byte
-
A piece of data worth eight bits in most places.
- bytecode
-
A pidgin-like language spoken among 'droids when they don't wish to
reveal their orientation (see endian). Named after some similar
languages spoken (for similar reasons) between compilers and
interpreters in the late 20th century. These languages are
characterized by representing everything as a
non-architecture-dependent sequence of bytes.
- C
-
A language beloved by many for its inside-out type definitions,
inscrutable precedence rules, and heavy overloading of the
function-call mechanism. (Well, actually, people first switched to C
because they found lowercase identifiers easier to read than upper.)
Perl is written in C, so it's not surprising that Perl borrowed a few
ideas from it.
- C preprocessor
-
The typical C compiler's first pass, which processes lines beginning
with # for conditional compilation and macro definition and does
various manipulations of the program text based on the current
definitions. Also known as cpp(1).
- call by reference
-
An argument-passing mechanism in which the formal arguments
refer directly to the actual arguments, and the subroutine can
change the actual arguments by changing the formal arguments. That
is, the formal argument is an alias for the actual argument. See
also call by value.
- call by value
-
An argument-passing mechanism in which the formal arguments
refer to a copy of the actual arguments, and the subroutine
cannot change the actual arguments by changing the formal arguments.
See also call by reference.
- callback
-
A handler that you register with some other part of your program
in the hope that the other part of your program will trigger your
handler when some event of interest transpires.
- canonical
-
Reduced to a standard form to facilitate comparison.
- capturing
-
The use of parentheses around a subpattern in a regular expression to store the matched substring as a backreference.
(Captured strings are also returned as a list in list context.)
- character
-
A small integer representative of a unit of orthography.
Historically, characters were usually stored as fixed-width integers
(typically in a byte, or maybe two, depending on the character set),
but with the advent of UTF-8, characters are often stored in a
variable number of bytes depending on the size of the integer that
represents the character. Perl manages this transparently for you,
for the most part.
- character class
-
A square-bracketed list of characters used in a regular expression
to indicate that any character of the set may occur at a given point.
Loosely, any predefined set of characters so used.
- character property
-
A predefined character class matchable by the \p
metasymbol. Many standard properties are defined for Unicode.
- circumfix operator
-
An operator that surrounds its operand, like the angle
operator, or parentheses, or a hug.
- class
-
A user-defined type, implemented in Perl via a package that
provides (either directly or by inheritance) methods (that
is, subroutines) to handle instances of
the class (its objects). See also inheritance.
- class method
-
A method whose invocant is a package name, not an
object reference. A method associated with the class as a whole.
- client
-
In networking, a process that initiates contact with a server
process in order to exchange data and perhaps receive a service.
- cloi
|