forked from rafl/perlfaq
/
perlglossary.pod
3786 lines (2596 loc) · 134 KB
/
perlglossary.pod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
=encoding utf8
=head1 NAME
perlglossary - Perl Glossary
=head1 DESCRIPTION
A glossary of terms (technical and otherwise) used in the Perl
documentation, derived from the Glossary of I<Programming
Perl>, Fourth Edition. Words or phrases in bold are defined elsewhere in
this glossary.
Other useful sources include the Unicode Glossary L<http://unicode.org/glossary/>,
the Free On-Line Dictionary of Computing L<http://foldoc.org/>,
the Jargon File L<http://catb.org/~esr/jargon/>,
and Wikipedia L<http://www.wikipedia.org/>.
=head2 A
=over 4
=item accessor methods
A B<X<accessor methods, defined>X<methods, accessor>method> used to
indirectly inspect or update an B<object>’s state (its B<instance
variables>).
=item actual arguments
The B<X<actual arguments>X<arguments, actual>scalar values> that you supply
to a B<function> or B<subroutine> when you call it. For instance, when you
call C<power("puff")>, the string C<"puff"> is the actual argument. See also
B<argument> and B<formal arguments>.
=item address operator
Some X<address operator>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
B<hard reference>, which is much safer than a memory address.
=item algorithm
A X<algorithms (term)>well-defined sequence of steps, explained clearly
enough that even a computer could do them.
=item alias
A X<aliases, defined>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 C<foreach> loops, in
the C<$_> variable for C<map> or C<grep> operators, in C<$a> and C<$b>
during C<sort>’s comparison function, and in each element of C<@_> for the
B<actual arguments> of a subroutine call. Permanent aliases are explicitly
created in B<packages> by B<importing> symbols or by assignment to
B<typeglobs>. Lexically scoped aliases for package variables are explicitly
created by the C<our> declaration.
=item alphabetic
The X<alphabetic sort>sort of characters we put into words. In Unicode, this
is all letters including all ideographs and certain diacritics, letter
numbers like Roman numerals, and various combining marks.
=item alternatives
A X<alternative characters>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: C<|>.
Alternatives in normal Perl expressions are separated with a double vertical
bar: C<||>. Logical alternatives in B<Boolean> expressions are separated
with either C<||> or C<or>.
=item anonymous
Used to X<anonymous referents>X<referents, anonymous>describe a B<referent>
that is not directly accessible through a named B<variable>. Such a referent
must be indirectly accessible through at least one B<hard reference>. When
the last hard reference goes away, the anonymous referent is destroyed
without pity.
=item application
A X<applications (term)>bigger, fancier sort of B<program> with a fancier
name so people don’t realize they are using a program.
=item architecture
The kind of X<architecture>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 B<compiled>
into machine code. See also B<platform> and B<operating system>.
=item argument
A X<arguments, defined>piece of data supplied to a B<program>,
B<subroutine>, B<function>, or B<method> to tell it what it’s supposed to
do. Also called a “parameter”.
=item ARGV
The name of the X<ARGV filehandle>array containing the B<argument> B<vector>
from the command line. If you use the empty C<E<lt>E<gt>> operator, C<ARGV>
is the name of both the B<filehandle> used to traverse the arguments and the
B<scalar> containing the name of the current input file.
=item arithmetical operator
A B<X<arithmetic operators, about>symbol> such as C<+> or C</> that tells
Perl to do the arithmetic you were supposed to learn in grade school.
=item array
An X<arrays, defined>ordered sequence of B<values>, stored such that you can
easily access any of the values using an I<integer subscript> that specifies
the value’s B<offset> in the sequence.
=item array context
An archaic X<array context>expression for what is more correctly referred to
as B<list context>.
=item Artistic License
The open X<Artistic License>source license that X<Wall, Larry>Larry Wall
created for Perl, maximizing Perl’s usefulness, availability, and
modifiability. The current version is 2. (L<http://www.opensource.org/licenses/artistic-license.php>).
=item ASCII
The X<ASCII (American Standard Code for Information Interchange)>X<American
Standard Code for Information Interchange (ASCII)>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 B<Unicode>.
=item assertion
A X<assertions (in regexes), defined>X<regular expressions, assertions
in>component of a B<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 B<zero-width> assertion.
=item assignment
An X<assignments, defined>B<operator> whose assigned mission in life is to
change the value of a B<variable>.
=item assignment operator
Either a X<assignment operators, about>regular B<assignment> or a compound
B<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, C<$a += 2> adds C<2> to C<$a>.
=item associative array
See B<hash>. X<associative arrays>Please. The term associative array is the
old Perl 4 term for a B<hash>. Some languages call it a dictionary.
=item associativity
Determines X<associativity>whether you do the left B<operator> first or the
right B<operator> first when you have “A B<operator> B B<operator> C”, and
the two operators are of the same precedence. Operators like C<+> are left
associative, while operators like C<**> are right associative. See Camel
chapter 3, “Unary and Binary Operators” for a list of operators and their
associativity.
=item asynchronous
Said of X<asynchronous event processing>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.
=item atom
A B<regular X<atoms>expression> component potentially matching a
B<substring> containing one or more characters and treated as an indivisible
syntactic unit by any following B<quantifier>. (Contrast with an
B<assertion> that matches something of B<zero width> and may not be quantified.)
=item atomic operation
When X<atomic operation>Democritus gave the word “atom” to the indivisible
bits of matter, he meant literally something that could not be cut: I<ἀ->
(not) + I<-τομος> (cuttable). An atomic operation is an action that can’t be
interrupted, not one forbidden in a nuclear-free zone.
=item attribute
A new X<attribute feature>feature that allows the declaration of
B<variables> and B<subroutines> with modifiers, as in C<sub foo : locked
method>. Also another name for an B<instance variable> of an B<object>.
=item autogeneration
A X<autogeneration, about>feature of B<operator overloading> of B<objects>,
whereby the behavior of certain B<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 Camel
chapter 13, “Overloading”.
=item autoincrement
To X<autoincrement (term)>add one to something automatically, hence the name
of the C<++> operator. To instead subtract one from something automatically
is known as an “autodecrement”.
=item autoload
To X<autoloading, defined>load on demand. (Also called “lazy” loading.)
Specifically, to call an C<AUTOLOAD> subroutine on behalf of an undefined
subroutine.
=item autosplit
To X<autosplit (term)>split a string automatically, as the I<–a> B<switch>
does when running under I<–p> or I<–n> in order to emulate B<awk>. (See also
the C<AutoSplit>X<AutoSplit module> module, which has nothing to do with the
C<–a> switch but a lot to do with autoloading.)
=item autovivification
A X<autovivification>Graeco-Roman word meaning “to bring oneself to life”.
In Perl, storage locations (B<lvalues>) spontaneously generate themselves as
needed, including the creation of any B<hard reference> values to point to
the next level of storage. The assignment C<$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.
=item AV
Short X<AV (array value)>X<array value (AV)>X<values, array>for “array
value”, which refers to one of Perl’s internal data types that holds an
B<array>. The C<AV> type is a subclass of B<SV>.
=item awk
Descriptive X<awk (editing term)>editing term—short for “awkward”. Also
coincidentally refers to a venerable text-processing language from which
Perl derived some of its high-level ideas.
=back
=head2 B
=over 4
=item backreference
A X<backreferences, about>X<references, backreferences>substring B<captured>
by a subpattern within unadorned parentheses in a B<regex>. Backslashed
decimal numbers (C<\1>, C<\2>, etc.) later in the same pattern refer back to
the corresponding subpattern in the current match. Outside the pattern, the
numbered variables (C<$1>, C<$2>, etc.) continue to refer to these same
values, as long as the pattern was the last successful match of the current
B<dynamic scope>.
=item backtracking
The X<backtracking>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 B<regular expression>, and its earlier attempts don’t
pan out. See the section “The Little Engine That /Couldn(n’t)” in Camel
chapter 5, “Pattern Matching”.
=item backward compatibility
Means X<backward compatibility, defined>you can still run your old program
because we didn’t break any of the features or bugs it was relying on.
=item bareword
A word X<barewords, about>sufficiently ambiguous to be deemed illegal under
C<use strict 'subs'>. In the absence of that stricture, a bareword is
treated as if quotes were around it.
=item base class
A X<base classes>X<classes, base>generic B<object> type; that is, a B<class>
from which other, more specific classes are derived genetically by
B<inheritance>. Also called aX<superclasses>X<classes, superclasses>
“superclass” by people who respect their ancestors.
=item big-endian
From X<big–endian, defined>X<endianness, big–endian>Swift: someone who
eats eggs big end first. Also used of computers that store the most
significant B<byte> of a word at a lower byte address than the least
significant byte. Often considered superior to little-endian machines. See
also B<little-endian>.
=item binary
Having X<binary (term)>to do with numbers represented in base 2. That means
there’s basically two numbers: 0 and 1. Also used to describe a file of
“nontext”, presumably because such a file makes full use of all the binary
bits in its bytes. With the advent of B<Unicode>, this distinction, already
suspect, loses even more of its meaning.
=item binary operator
An B<X<binary operators, about>operator> that takes two B<operands>.
=item bind
To X<bind (term)>assign a specific B<network address> to a B<socket>.
=item bit
An X<bits, defined>integer in the range from 0 to 1, inclusive. The smallest
possible unit of information storage. An eighth of a B<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”.)
=item bit shift
The X<bit–shift operators, defined>movement of bits left or right in a
computer word, which has the effect of multiplying or dividing by a
power of 2.
=item bit string
A X<bit string>sequence of B<bits> that is actually being thought of as a
sequence of bits, for once.
=item bless
In X<bless function, about>X<bless (term)>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
B<referent> so that it can function as an B<object>, such as a WebCruncher
object. See the C<bless> function in Camel chapter 27, “Functions”.
=item block
What X<blocks, defined>a B<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 B<operating system> likes to
deal with (normally a power of 2 such as 512 or 8192). Typically refers to
a chunk of data that’s coming from or going to a disk file.
=item BLOCK
A X<BLOCK construct, about>X<constructs, BLOCK>syntactic construct
consisting of a sequence of Perl B<statements> that is delimited by braces.
The C<if> and C<while> statements are defined in terms of I<C<BLOCK>>s, for
instance. Sometimes we also say “block” to mean a lexical scope; that is, a
sequence of statements that acts like a I<C<BLOCK>>, such as within an
C<eval> or a file, even though the statements aren’t delimited by braces.
=item block buffering
A X<block buffering>X<buffering, block>method of making input and output
efficient by passing one B<block> at a time. By default, Perl does block
buffering to disk files. See B<buffer> and B<command buffering>.
=item Boolean
A X<Boolean values>X<values, Boolean>value that is either B<true> or
B<false>.
=item Boolean context
A X<Boolean context, about>X<context, Boolean>special kind of B<scalar
context> used in conditionals to decide whether the B<scalar value> returned
by an expression is B<true> or B<false>. Does not evaluate as either a
string or a number. See B<context>.
=item breakpoint
A X<breakpoints, defined>spot in your program where you’ve told the debugger
to stop B<execution> so you can poke around and see whether anything is
wrong yet.
=item broadcast
To X<broadcast (networking term)>send a B<datagram> to multiple destinations
simultaneously.
=item BSD
A X<BSD (Berkeley Standard Distribution)>X<Berkeley Standard Distribution
(BSD)>psychoactive drug, popular in the ’80s, probably developed at UC
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”.
=item bucket
A X<buckets (term)>location in a B<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.)
=item buffer
A X<buffers, defined>temporary holding location for data. Data that are
B<Block buffering> means that the data is passed on to its destination
whenever the buffer is full. B<Line buffering> means that it’s passed on
whenever a complete line is received. B<Command buffering> means that it’s
passed every time you do a C<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.
=item built-in
A B<X<built–in functions, about>function> that is predefined in the
language. Even when hidden by B<overriding>, you can always get at a built-
in function by B<qualifying> its name with the C<CORE::> pseudopackage.
=item bundle
A X<bundles (term)>group of related modules on B<CPAN>. (Also sometimes
refers to a group of command-line switches grouped into one B<switch
cluster>.)
=item byte
A X<bytes (term)>piece of data worth eight B<bits> in most places.
=item bytecode
A pidgin-like lingo spoken among ’droids when they don’t wish to reveal
their orientation (see B<endian>). Named after some similar languages spoken
(for similar reasons) between compilers and interpreters in the late 20ᵗʰ
century. These languages are characterized by representing everything as a
nonarchitecture-dependent sequence of bytes.
=back
=head2 C
=over 4
=item C
A X<C language, about>language beloved by many for its inside-out B<type>
definitions, inscrutable B<precedence> rules, and heavy B<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.
=item cache
A X<cache (term)>data repository. Instead of computing expensive answers
several times, compute it once and save the result.
=item callback
A B<X<callbacks>handler> that you register with some other part of your
program in the hope that the other part of your program will B<trigger> your
handler when some event of interest transpires.
=item call by reference
An B<argument>-passing X<call by reference>X<references, call by reference
mechanism>mechanism in which the B<formal arguments> refer directly to the
B<actual arguments>, and the B<subroutine> can change the actual arguments
by changing the formal arguments. That is, the formal argument is an
B<alias> for the actual argument. See also B<call by value>.
=item call by value
An B<X<call by value>argument>-passing mechanism in which the B<formal
arguments> refer to a copy of the B<actual arguments>, and the
B<subroutine> cannot change the actual arguments by changing the formal
arguments. See also B<call by reference>.
=item canonical
Reduced X<canonical (term)>to a standard form to facilitate comparison.
=item capture variables
The X<capture variables>X<variables, capture>variables—such as C<$1> and
C<$2>, and C<%+> and C<%– >—that hold the text remembered in a pattern
match. See Camel chapter 5, “Pattern Matching”.
=item capturing
The X<capturing in pattern matching>X<subpatterns, capturing>X<pattern
matching, capturing in>use of parentheses around a B<subpattern> in a
B<regular expression> to store the matched B<substring> as a
B<backreference>. (Captured strings are also returned as a list in B<list
context>.) See Camel chapter 5, “Pattern Matching”.
=item cargo cult
Copying X<cargo cult>and pasting code without understanding it, while
superstitiously believing in its value. This term originated from
preindustrial cultures dealing with the detritus of explorers and colonizers
of technologically advanced cultures. See I<The Gods Must Be Crazy>.
=item case
A X<case (character)>X<characters, case considerations>property of certain
characters. Originally, typesetter stored capital letters in the upper of
two cases and small letters in the lower one. Unicode recognizes three
cases: B<lowercase> (B<character property> C<\p{lower}>), B<titlecase>
(C<\p{title}>), and B<uppercase> (C<\p{upper}>). A fourth casemapping called
B<foldcase> is not itself a distinct case, but it is used internally to
implement B<casefolding>. Not all letters have case, and some nonletters
have case.
=item casefolding
Comparing X<casefolding>or matching a string case-insensitively. In Perl, it
is implemented with the C</i> pattern modifier, the C<fc> function, and the
C<\F> double-quote translation escape.
=item casemapping
The X<casemapping>process of converting a string to one of the four Unicode
B<casemaps>; in Perl, it is implemented with the C<fc>, C<lc>, C<ucfirst>,
and C<uc> functions.
=item character
The X<characters, defined>smallest individual element of a string. Computers
store characters as integers, but Perl lets you operate on them as text. The
integer used to represent a particular character is called that character’s
B<codepoint>.
=item character class
A X<character classes, about>X<classes, character>square-bracketed list of
characters used in a B<regular expression> to indicate that any character
of the set may occur at a given point. Loosely, any predefined set of
characters so used.
=item character property
A X<character property>predefined B<character class> matchable by the C<\p>
or C<\P> B<metasymbol>. B<Unicode> defines hundreds of standard properties
for every possible codepoint, and Perl defines a few of its own, too.
=item circumfix operator
An X<circumfix operator>B<operator> that surrounds its B<operand>, like the
angle operator, or parentheses, or a hug.
=item class
A X<classes, defined>user-defined B<type>, implemented in Perl via a
B<package> that provides (either directly or by inheritance) B<methods>
(that is, B<subroutines>) to handle B<instances> of the class (its
B<objects>). See also B<inheritance>.
=item class method
A B<X<class methods>X<methods, class>method> whose B<invocant> is a
B<package> name, not an B<object> reference. A method associated with the
class as a whole. Also see B<instance method>.
=item client
In X<clients, defined>X<processes, client>networking, a B<process> that
initiates contact with a B<server> process in order to exchange data and
perhaps receive a service.
=item closure
An B<X<closure subroutines>X<subroutines, closure>anonymous> subroutine
that, when a reference to it is generated at runtime, keeps track of the
identities of externally visible B<lexical variables>, even after those
lexical variables have supposedly gone out of B<scope>. They’re called
“closures” because this sort of behavior gives mathematicians a sense of
closure.
=item cluster
A X<clusters, defined>X<subpatterns, cluster>parenthesized B<subpattern>
used to group parts of a B<regular expression> into a single B<atom>.
=item CODE
The X<CODE (ref function)>X<ref function, about>word returned by the C<ref>
function when you apply it to a reference to a subroutine. See also B<CV>.
=item code generator
A X<code generators, defined>system that writes code for you in a low-level
language, such as code to implement the backend of a compiler. See B<program
generator>.
=item codepoint
The X<codepoints, about>integer a computer uses to represent a given
character. ASCII codepoints are in the range 0 to 127; Unicode codepoints
are in the range 0 to 0x1F_FFFF; and Perl codepoints are in the range 0 to
2³²−1 or 0 to 2⁶⁴−1, depending on your native integer size. In Perl Culture,
sometimes called B<ordinals>.
=item code subpattern
A B<X<code subpatterns>X<subpatterns, code>regular expression> subpattern
whose real purpose is to execute some Perl code—for example, the C<(?{...})>
and C<(??{...})> subpatterns.
=item collating sequence
The X<collating sequence>X<collating sequence>order into which B<characters>
sort. This is used by B<string> comparison routines to decide, for example,
where in this glossary to put “collating sequence”.
=item co-maintainer
A X<co–maintainers>person with permissions to index a B<namespace> in
B<PAUSE>. Anyone can upload any namespace, but only primary and
co-maintainers get their contributions indexed.
=item combining character
Any X<combining characters>X<characters, combining>character with the
General Category of Combining Mark (C<\p{GC=M}>), which may be spacing or
nonspacing. Some are even invisible. A sequence of combining characters
following a grapheme base character together make up a single user-visible
character called a B<grapheme>. Most but not all diacritics are combining
characters, and vice versa.
=item command
In B<shell> X<commands, defined>programming, the syntactic combination of a
program name and its arguments. More loosely, anything you type to a shell
(a command interpreter) that starts it doing something. Even more loosely, a
Perl B<statement>, which might start with a B<label> and typically ends with
a semicolon.
=item command buffering
A X<command buffering>X<buffering, command>mechanism in Perl that lets you
store up the output of each Perl B<command> and then flush it out as a
single request to the B<operating system>. It’s enabled by setting the C<$|>
(C<$AUTOFLUSH>) variable to a true value. It’s used when you don’t want data
sitting around, not going where it’s supposed to, which may happen because
the default on a B<file> or B<pipe> is to use B<block buffering>.
=item command-line arguments
The X<command–line arguments>B<X<arguments, command–line>values> you supply
along with a program name when you tell a B<shell> to execute a B<command>.
These values are passed to a Perl program through C<@ARGV>.
=item command name
The X<command names>name of the program currently executing, as typed on the
command line. In C, the B<command> name is passed to the program as the
first command-line argument. In Perl, it comes in separately as C<$0>.
=item comment
A X<comments, defined>remark that doesn’t affect the meaning of the program.
In Perl, a comment is introduced by a C<#> character and continues to the
end of the line.
=item compilation unit
The X<compilation units>B<file> (or B<string>, in the case of C<eval>) that
is currently being B<compiled>.
=item compile
The process of turning source code into a machine-usable form. See B<compile
phase>.
=item compile phase
Any X<compile phase, defined>time before Perl starts running your main
program. See also B<run phase>. Compile phase is mostly spent in B<compile
time>, but may also be spent in B<runtime> when C<BEGIN> blocks, C<use> or
C<no> declarations, or constant subexpressions are being evaluated. The
startup and import code of any C<use> declaration is also run during
compile phase.
=item compiler
Strictly X<compilers and compiling, about>speaking, a program that munches
up another program and spits out yet another file containing the program in
a “more executable” form, typically containing native machine instructions.
The I<perl> program is not a compiler by this definition, but it does
contain a kind of compiler that takes a program and turns it into a more
executable form (B<syntax trees>) within the I<perl> process itself, which
the B<interpreter> then interprets. There are, however, extension B<modules>
to get Perl to act more like a “real” compiler. See Camel chapter 16,
“Compiling”.
=item compile time
The X<compile time, defined>time when Perl is trying to make sense of your
code, as opposed to when it thinks it knows what your code means and is
merely trying to do what it thinks your code says to do, which is B<runtime>.
=item composer
A “constructor” X<composers, about>for a B<referent> that isn’t really an
B<object>, like an anonymous array or a hash (or a sonata, for that matter).
For example, a pair of braces acts as a composer for a hash, and a pair of
brackets acts as a composer for an array. See the section “Creating
References” in Camel chapter 8, “References”.
=item concatenation
The X<concatenating strings>X<strings, concatenating>process of gluing one
cat’s nose to another cat’s tail. Also a similar operation on two
B<strings>.
=item conditional
SomethingX<conditional (term)> “iffy”. See B<Boolean context>.
=item connection
In X<connections (term)>telephony, the temporary electrical circuit between
the caller’s and the callee’s phone. In networking, the same kind of
temporary circuit between a B<client> and a B<server>.
=item construct
As a X<constructs, defined>noun, a piece of syntax made up of smaller
pieces. As a transitive verb, to create an B<object> using a B<constructor>.
=item constructor
AnyX<constructors, defined> B<class method>, B<instance>, or B<subroutine>
that composes, initializes, blesses, and returns an B<object>. Sometimes we
use the term loosely to mean a B<composer>.
=item context
The X<context, about>surroundings or environment. The context given by the
surrounding code determines what kind of data a particular B<expression> is
expected to return. The three primary contexts are B<list context>,
B<scalar>, and B<void context>. Scalar context is sometimes subdivided into
B<Boolean context>, B<numeric context>, B<string context>, and B<void
context>. There’s also a “don’t care” context (which is dealt with in Camel
chapter 2, “Bits and Pieces”, if you care).
=item continuation
The X<continuation lines>treatment of more than one physical B<line> as a
single logical line. B<Makefile> lines are continued by putting a backslash
before the B<newline>. Mail headers, as defined by X<RFC 822>RFC 822, are
continued by putting a space or tab I<after> the newline. In general, lines
in Perl do not need any form of continuation mark, because B<whitespace>
(including newlines) is gleefully ignored. Usually.
=item core dump
The X<core dump>corpse of a B<process>, in the form of a file left in the
B<working directory> of the process, usually as a result of certain kinds
of fatal errors.
=item CPAN
The X<Comprehensive Perl Archive Network>X<CPAN (Comprehensive Perl Archive
Network), about>Comprehensive Perl Archive Network. (See the Camel Preface
and Camel chapter 19, “CPAN” for details.)
=item C preprocessor
The X<C preprocessor>typical C compiler’s first pass, which processes lines
beginning with C<#> for conditional compilation and macro definition, and
does various manipulations of the program text based on the current
definitions. Also known as I<cpp>(1).
=item cracker
Someone X<crackers>who breaks security on computer systems. A cracker may
be a true B<hacker> or only a B<script kiddie>.
=item currently selected output channel
The X<currently selected output channel>last B<filehandle> that was
designated with C<select(FILEHANDLE)>; C<STDOUT>, if no filehandle has
been selected.
=item current package
The B<package> X<current package>in which the current statement is
B<compiled>. Scan backward in the text of your program through the current
B<lexical scope> or any enclosing lexical scopes until you find a package
declaration. That’s your current package name.
=item current working directory
SeeX<current working directory> B<working directory>.
=item CV
In academia, a curriculum vitæ, a fancy kind of résumé. In Perl, an X<CV
(code value)>X<code value (CV)>internal “code value” typedef holding a
B<subroutine>. The C<CV> type is a subclass of B<SV>.
=back
=head2 D
=over 4
=item dangling statement
A bare, single B<X<dangling statements>X<statements, dangling>statement>,
without any braces, hanging off an C<if> or C<while> conditional. C allows
them. Perl doesn’t.
=item datagram
A packet of X<datagrams, defined>data, such as a B<UDP> message, that (from
the viewpoint of the programs involved) can be sent independently over the
network. (In fact, all packets are sent independently at the B<IP> level,
but B<stream> protocols such as B<TCP> hide this from your program.)
=item data structure
How your X<data structures, defined>various pieces of data relate to each
other and what shape they make when you put them all together, as in a
rectangular table or a triangular tree.
=item data type
A set of X<data types, defined>possible values, together with all the
operations that know how to deal with those values. For example, a numeric
data type has a certain set of numbers that you can work with, as well as
various mathematical operations that you can do on the numbers, but would
make little sense on, say, a string such as C<"Kilroy">. Strings have their
own operations, such as B<concatenation>. Compound types made of a number of
smaller pieces generally have operations to compose and decompose them, and
perhaps to rearrange them. B<Objects> that model things in the real world
often have operations that correspond to real activities. For instance, if
you model an elevator, your elevator object might have an C<open_door>
B<method>.
=item DBM
Stands for X<DBM (Database Management) routines>X<Database Management (DBM)
routines>“Database Management” routines, a set of routines that emulate an
B<associative array> using disk files. The routines use a dynamic hashing
scheme to locate any entry with only two disk accesses. DBM files allow a
Perl program to keep a persistent B<hash> across multiple invocations. You
can C<tie> your hash variables to various DBM implementations.
=item declaration
An B<assertion> X<declarations, defined>that states something exists and
perhaps describes what it’s like, without giving any commitment as to how
or where you’ll use it. A declaration is like the part of your recipe that
says, “two cups flour, one large egg, four or five tadpoles…” See
B<statement> for its opposite. Note that some declarations also function
as statements. Subroutine declarations also act as definitions if a body
is supplied.
=item declarator
Something X<declarators>that tells your program what sort of variable
you’d like. Perl doesn’t require you to declare variables, but you can use
C<my>, C<our>, or C<state> to denote that you want something other than
the default.
=item decrement
To X<decrementing values>X<values, decrementing>subtract a value from a
variable, as in “decrement C<$x>” (meaning to remove 1 from its value) or
“decrement C<$x> by 3”.
=item default
A B<value> X<default values>X<values, default>chosen for you if you don’t
supply a value of your own.
=item defined
Having a X<defined (term)>meaning. Perl thinks that some of the things
people try to do are devoid of meaning; in particular, making use of
variables that have never been given a B<value> and performing certain
operations on data that isn’t there. For example, if you try to read data
past the end of a file, Perl will hand you back an undefined value. See also
B<false> and the C<defined> entry in Camel chapter 27, “Functions”.
=item delimiter
A B<character> X<delimiters (term)>or B<string> that sets bounds to an
arbitrarily sized textual object, not to be confused with a B<separator> or
B<terminator>. “To delimit” really just means “to surround” or “to enclose”
(like these parentheses are doing).
=item dereference
A fancy X<dereference (term)>X<references, dereference>computer science term
meaning “to follow a B<reference> to what it points to”. The “de” part of it
refers to the fact that you’re taking away one level of B<indirection>.
=item derived class
A B<class> that X<derived classes>X<classes, derived>X<subclasses>X<classes,
subclasses>defines some of its B<methods> in terms of a more generic class,
called a B<base class>. Note that classes aren’t classified exclusively into
base classes or derived classes: a class can function as both a derived
class and a base class simultaneously, which is kind of classy.
=item descriptor
See B<file descriptor>.
=item destroy
To deallocate the X<destroy (term)>memory of a B<referent> (first triggering
its C<DESTROY> method, if it has one).
=item destructor
A special B<method> X<destructor method>X<methods, destructor>that is called
when an B<object> is thinking about B<destroying> itself. A Perl program’s
C<DESTROY> method doesn’t do the actual destruction; Perl just B<triggers>
the method in case the B<class> wants to do any associated cleanup.
=item device
A whiz-bang X<devices (term)>hardware gizmo (like a disk or tape drive or a
modem or a joystick or a mouse) attached to your computer, which the
B<operating system> tries to make look like a B<file> (or a bunch of files).
Under Unix, these fake files tend to live in the I</dev> directory.
=item directive
A B<pod> X<directives, defined>directive. See Camel chapter 23, “Plain Old
Documentation”.
=item directory
A special X<directories, defined>file that contains other files. Some
B<operating systems> call these “folders”, “drawers”, “catalogues”, or
“catalogs”.
=item directory handle
A name X<directory handle>that represents a particular instance of opening a
directory to read it, until you close it. See the C<opendir> function.
=item discipline
Some X<discipline (I/O layer)>people need this and some people avoid it.
For Perl, it’s an old way to say B<I/O layer>.
=item dispatch
To send X<dispatching>something to its correct destination. Often used
metaphorically to indicate a transfer of programmatic control to a
destination selected algorithmically, often by lookup in a table of function
B<references> or, in the case of object B<methods>, by traversing the
inheritance tree looking for the most specific definition for the method.
=item distribution
A standard, X<distributions, defined>bundled release of a system of
software. The default usage implies source code is included. If that is not
the case, it will be called a “binary-only” distribution.
=item dual-lived
Some X<dual–lived modules>X<modules, dual–lived>modules live both in the
B<Standard Library> and on B<CPAN>. These modules might be developed on two
tracks as people modify either version. The trend currently is to untangle
these situations.
=item dweomer
An enchantment, illusion, X<dweomer>phantasm, or jugglery. Said when Perl’s
magical B<dwimmer> effects don’t do what you expect, but rather seem to be
the product of arcane I<dweomercraft>, sorcery, or wonder working. [From
Middle English.]
=item dwimmer
DWIM X<DWIM (Do What I Mean) principle>X<Do What I Mean (DWIM) principle>is
an acronym for X<dwimming>“Do What I Mean”, the principle that something
should just do what you want it to do without an undue amount of fuss. A bit
of code that does “dwimming” is a “dwimmer”. Dwimming can require a great
deal of behind-the-scenes magic, which (if it doesn’t stay properly behind
the scenes) is called a B<dweomer> instead.
=item dynamic scoping
Dynamic X<dynamic scope>X<scopes, dynamic>scoping works over a B<dynamic
scope>, making variables visible throughout the rest of the B<block> in
which they are first used and in any B<subroutines> that are called by the
rest of the block. Dynamically scoped variables can have their values
temporarily changed (and implicitly restored later) by a C<local> operator.