Merge branch 'master' of http://repo.or.cz/r/msysgit into devel
[msysgit/historical-msysgit.git] / lib / perl5 / 5.6.1 / English.pm
blobf38c313bebe23e9d749c74704a20fde4b593d315
1 package English;
3 require Exporter;
4 @ISA = (Exporter);
6 =head1 NAME
8 English - use nice English (or awk) names for ugly punctuation variables
10 =head1 SYNOPSIS
12 use English;
13 ...
14 if ($ERRNO =~ /denied/) { ... }
16 =head1 DESCRIPTION
18 This module provides aliases for the built-in variables whose
19 names no one seems to like to read. Variables with side-effects
20 which get triggered just by accessing them (like $0) will still
21 be affected.
23 For those variables that have an B<awk> version, both long
24 and short English alternatives are provided. For example,
25 the C<$/> variable can be referred to either $RS or
26 $INPUT_RECORD_SEPARATOR if you are using the English module.
28 See L<perlvar> for a complete list of these.
30 =head1 BUGS
32 This module provokes sizeable inefficiencies for regular expressions,
33 due to unfortunate implementation details. If performance matters,
34 consider avoiding English.
36 =cut
38 no warnings;
40 # Grandfather $NAME import
41 sub import {
42 my $this = shift;
43 my @list = @_;
44 local $Exporter::ExportLevel = 1;
45 Exporter::import($this,grep {s/^\$/*/} @list);
48 @EXPORT = qw(
49 *ARG
50 *MATCH
51 *PREMATCH
52 *POSTMATCH
53 *LAST_PAREN_MATCH
54 *INPUT_LINE_NUMBER
55 *NR
56 *INPUT_RECORD_SEPARATOR
57 *RS
58 *OUTPUT_AUTOFLUSH
59 *OUTPUT_FIELD_SEPARATOR
60 *OFS
61 *OUTPUT_RECORD_SEPARATOR
62 *ORS
63 *LIST_SEPARATOR
64 *SUBSCRIPT_SEPARATOR
65 *SUBSEP
66 *FORMAT_PAGE_NUMBER
67 *FORMAT_LINES_PER_PAGE
68 *FORMAT_LINES_LEFT
69 *FORMAT_NAME
70 *FORMAT_TOP_NAME
71 *FORMAT_LINE_BREAK_CHARACTERS
72 *FORMAT_FORMFEED
73 *CHILD_ERROR
74 *OS_ERROR
75 *ERRNO
76 *EXTENDED_OS_ERROR
77 *EVAL_ERROR
78 *PROCESS_ID
79 *PID
80 *REAL_USER_ID
81 *UID
82 *EFFECTIVE_USER_ID
83 *EUID
84 *REAL_GROUP_ID
85 *GID
86 *EFFECTIVE_GROUP_ID
87 *EGID
88 *PROGRAM_NAME
89 *PERL_VERSION
90 *ACCUMULATOR
91 *DEBUGGING
92 *SYSTEM_FD_MAX
93 *INPLACE_EDIT
94 *PERLDB
95 *BASETIME
96 *WARNING
97 *EXECUTABLE_NAME
98 *OSNAME
99 *LAST_REGEXP_CODE_RESULT
100 *EXCEPTIONS_BEING_CAUGHT
101 @LAST_MATCH_START
102 @LAST_MATCH_END
105 # The ground of all being. @ARG is deprecated (5.005 makes @_ lexical)
107 *ARG = *_ ;
109 # Matching.
111 *MATCH = *& ;
112 *PREMATCH = *` ;
113 *POSTMATCH = *' ;
114 *LAST_PAREN_MATCH = *+ ;
115 *LAST_MATCH_START = *-{ARRAY} ;
116 *LAST_MATCH_END = *+{ARRAY} ;
118 # Input.
120 *INPUT_LINE_NUMBER = *. ;
121 *NR = *. ;
122 *INPUT_RECORD_SEPARATOR = */ ;
123 *RS = */ ;
125 # Output.
127 *OUTPUT_AUTOFLUSH = *| ;
128 *OUTPUT_FIELD_SEPARATOR = *, ;
129 *OFS = *, ;
130 *OUTPUT_RECORD_SEPARATOR = *\ ;
131 *ORS = *\ ;
133 # Interpolation "constants".
135 *LIST_SEPARATOR = *" ;
136 *SUBSCRIPT_SEPARATOR = *; ;
137 *SUBSEP = *; ;
139 # Formats
141 *FORMAT_PAGE_NUMBER = *% ;
142 *FORMAT_LINES_PER_PAGE = *= ;
143 *FORMAT_LINES_LEFT = *- ;
144 *FORMAT_NAME = *~ ;
145 *FORMAT_TOP_NAME = *^ ;
146 *FORMAT_LINE_BREAK_CHARACTERS = *: ;
147 *FORMAT_FORMFEED = *^L ;
149 # Error status.
151 *CHILD_ERROR = *? ;
152 *OS_ERROR = *! ;
153 *ERRNO = *! ;
154 *EXTENDED_OS_ERROR = *^E ;
155 *EVAL_ERROR = *@ ;
157 # Process info.
159 *PROCESS_ID = *$ ;
160 *PID = *$ ;
161 *REAL_USER_ID = *< ;
162 *UID = *< ;
163 *EFFECTIVE_USER_ID = *> ;
164 *EUID = *> ;
165 *REAL_GROUP_ID = *( ;
166 *GID = *( ;
167 *EFFECTIVE_GROUP_ID = *) ;
168 *EGID = *) ;
169 *PROGRAM_NAME = *0 ;
171 # Internals.
173 *PERL_VERSION = *^V ;
174 *ACCUMULATOR = *^A ;
175 *COMPILING = *^C ;
176 *DEBUGGING = *^D ;
177 *SYSTEM_FD_MAX = *^F ;
178 *INPLACE_EDIT = *^I ;
179 *PERLDB = *^P ;
180 *LAST_REGEXP_CODE_RESULT = *^R ;
181 *EXCEPTIONS_BEING_CAUGHT = *^S ;
182 *BASETIME = *^T ;
183 *WARNING = *^W ;
184 *EXECUTABLE_NAME = *^X ;
185 *OSNAME = *^O ;
187 # Deprecated.
189 # *ARRAY_BASE = *[ ;
190 # *OFMT = *# ;
191 # *MULTILINE_MATCHING = ** ;
192 # *OLD_PERL_VERSION = *] ;