Faster File::Compare
[p5sagit/p5-mst-13.2.git] / lib / English.pm
CommitLineData
8990e307 1package English;
2
3require Exporter;
4@ISA = (Exporter);
5
f06db76b 6=head1 NAME
7
8English - use nice English (or awk) names for ugly punctuation variables
9
10=head1 SYNOPSIS
11
12 use English;
13 ...
14 if ($ERRNO =~ /denied/) { ... }
15
16=head1 DESCRIPTION
17
18This module provides aliases for the built-in variables whose
19names no one seems to like to read. Variables with side-effects
20which get triggered just by accessing them (like $0) will still
21be affected.
22
23For those variables that have an B<awk> version, both long
24and short English alternatives are provided. For example,
25the C<$/> variable can be referred to either $RS or
26$INPUT_RECORD_SEPARATOR if you are using the English module.
27
28See L<perlvar> for a complete list of these.
29
30=cut
31
748a9306 32local $^W = 0;
33
34# Grandfather $NAME import
35sub import {
36 my $this = shift;
37 my @list = @_;
38 local $Exporter::ExportLevel = 1;
39 Exporter::import($this,grep {s/^\$/*/} @list);
40}
a0d0e21e 41
8990e307 42@EXPORT = qw(
43 *ARG
748a9306 44 *MATCH
45 *PREMATCH
46 *POSTMATCH
47 *LAST_PAREN_MATCH
48 *INPUT_LINE_NUMBER
49 *NR
50 *INPUT_RECORD_SEPARATOR
51 *RS
52 *OUTPUT_AUTOFLUSH
53 *OUTPUT_FIELD_SEPARATOR
54 *OFS
55 *OUTPUT_RECORD_SEPARATOR
56 *ORS
57 *LIST_SEPARATOR
58 *SUBSCRIPT_SEPARATOR
59 *SUBSEP
60 *FORMAT_PAGE_NUMBER
61 *FORMAT_LINES_PER_PAGE
62 *FORMAT_LINES_LEFT
63 *FORMAT_NAME
64 *FORMAT_TOP_NAME
65 *FORMAT_LINE_BREAK_CHARACTERS
66 *FORMAT_FORMFEED
67 *CHILD_ERROR
f86702cc 68 *SYSTEM_CHILD_STATUS
748a9306 69 *OS_ERROR
70 *ERRNO
d57fa8b6 71 *EXTENDED_OS_ERROR
748a9306 72 *EVAL_ERROR
73 *PROCESS_ID
74 *PID
75 *REAL_USER_ID
76 *UID
77 *EFFECTIVE_USER_ID
78 *EUID
79 *REAL_GROUP_ID
80 *GID
81 *EFFECTIVE_GROUP_ID
82 *EGID
83 *PROGRAM_NAME
84 *PERL_VERSION
85 *ACCUMULATOR
86 *DEBUGGING
87 *SYSTEM_FD_MAX
88 *INPLACE_EDIT
89 *PERLDB
90 *BASETIME
91 *WARNING
92 *EXECUTABLE_NAME
d57fa8b6 93 *OSNAME
8990e307 94);
95
96# The ground of all being.
97
8990e307 98 *ARG = *_ ;
99
100# Matching.
101
748a9306 102 *MATCH = *& ;
103 *PREMATCH = *` ;
104 *POSTMATCH = *' ;
105 *LAST_PAREN_MATCH = *+ ;
8990e307 106
107# Input.
108
748a9306 109 *INPUT_LINE_NUMBER = *. ;
110 *NR = *. ;
111 *INPUT_RECORD_SEPARATOR = */ ;
112 *RS = */ ;
8990e307 113
114# Output.
115
748a9306 116 *OUTPUT_AUTOFLUSH = *| ;
117 *OUTPUT_FIELD_SEPARATOR = *, ;
118 *OFS = *, ;
119 *OUTPUT_RECORD_SEPARATOR = *\ ;
120 *ORS = *\ ;
8990e307 121
122# Interpolation "constants".
123
748a9306 124 *LIST_SEPARATOR = *" ;
125 *SUBSCRIPT_SEPARATOR = *; ;
126 *SUBSEP = *; ;
8990e307 127
128# Formats
129
748a9306 130 *FORMAT_PAGE_NUMBER = *% ;
131 *FORMAT_LINES_PER_PAGE = *= ;
132 *FORMAT_LINES_LEFT = *- ;
133 *FORMAT_NAME = *~ ;
134 *FORMAT_TOP_NAME = *^ ;
135 *FORMAT_LINE_BREAK_CHARACTERS = *: ;
136 *FORMAT_FORMFEED = *^L ;
8990e307 137
138# Error status.
139
748a9306 140 *CHILD_ERROR = *? ;
f86702cc 141 *SYSTEM_CHILD_STATUS = *^S ;
748a9306 142 *OS_ERROR = *! ;
143 *ERRNO = *! ;
f86702cc 144 *EXTENDED_OS_ERROR = *^E ;
748a9306 145 *EVAL_ERROR = *@ ;
8990e307 146
147# Process info.
148
748a9306 149 *PROCESS_ID = *$ ;
150 *PID = *$ ;
151 *REAL_USER_ID = *< ;
152 *UID = *< ;
153 *EFFECTIVE_USER_ID = *> ;
154 *EUID = *> ;
155 *REAL_GROUP_ID = *( ;
156 *GID = *( ;
157 *EFFECTIVE_GROUP_ID = *) ;
158 *EGID = *) ;
159 *PROGRAM_NAME = *0 ;
8990e307 160
161# Internals.
162
748a9306 163 *PERL_VERSION = *] ;
164 *ACCUMULATOR = *^A ;
165 *DEBUGGING = *^D ;
166 *SYSTEM_FD_MAX = *^F ;
167 *INPLACE_EDIT = *^I ;
168 *PERLDB = *^P ;
169 *BASETIME = *^T ;
170 *WARNING = *^W ;
171 *EXECUTABLE_NAME = *^X ;
d57fa8b6 172 *OSNAME = *^O ;
8990e307 173
174# Deprecated.
175
748a9306 176# *ARRAY_BASE = *[ ;
177# *OFMT = *# ;
178# *MULTILINE_MATCHING = ** ;
8990e307 179
1801;