Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "PERLPORT 1" | |
132 | .TH PERLPORT 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | perlport \- Writing portable Perl | |
135 | .SH "DESCRIPTION" | |
136 | .IX Header "DESCRIPTION" | |
137 | Perl runs on numerous operating systems. While most of them share | |
138 | much in common, they also have their own unique features. | |
139 | .PP | |
140 | This document is meant to help you to find out what constitutes portable | |
141 | Perl code. That way once you make a decision to write portably, | |
142 | you know where the lines are drawn, and you can stay within them. | |
143 | .PP | |
144 | There is a tradeoff between taking full advantage of one particular | |
145 | type of computer and taking advantage of a full range of them. | |
146 | Naturally, as you broaden your range and become more diverse, the | |
147 | common factors drop, and you are left with an increasingly smaller | |
148 | area of common ground in which you can operate to accomplish a | |
149 | particular task. Thus, when you begin attacking a problem, it is | |
150 | important to consider under which part of the tradeoff curve you | |
151 | want to operate. Specifically, you must decide whether it is | |
152 | important that the task that you are coding have the full generality | |
153 | of being portable, or whether to just get the job done right now. | |
154 | This is the hardest choice to be made. The rest is easy, because | |
155 | Perl provides many choices, whichever way you want to approach your | |
156 | problem. | |
157 | .PP | |
158 | Looking at it another way, writing portable code is usually about | |
159 | willfully limiting your available choices. Naturally, it takes | |
160 | discipline and sacrifice to do that. The product of portability | |
161 | and convenience may be a constant. You have been warned. | |
162 | .PP | |
163 | Be aware of two important points: | |
164 | .IP "Not all Perl programs have to be portable" 4 | |
165 | .IX Item "Not all Perl programs have to be portable" | |
166 | There is no reason you should not use Perl as a language to glue Unix | |
167 | tools together, or to prototype a Macintosh application, or to manage the | |
168 | Windows registry. If it makes no sense to aim for portability for one | |
169 | reason or another in a given program, then don't bother. | |
170 | .IP "Nearly all of Perl already \fIis\fR portable" 4 | |
171 | .IX Item "Nearly all of Perl already is portable" | |
172 | Don't be fooled into thinking that it is hard to create portable Perl | |
173 | code. It isn't. Perl tries its level-best to bridge the gaps between | |
174 | what's available on different platforms, and all the means available to | |
175 | use those features. Thus almost all Perl code runs on any machine | |
176 | without modification. But there are some significant issues in | |
177 | writing portable code, and this document is entirely about those issues. | |
178 | .PP | |
179 | Here's the general rule: When you approach a task commonly done | |
180 | using a whole range of platforms, think about writing portable | |
181 | code. That way, you don't sacrifice much by way of the implementation | |
182 | choices you can avail yourself of, and at the same time you can give | |
183 | your users lots of platform choices. On the other hand, when you have to | |
184 | take advantage of some unique feature of a particular platform, as is | |
185 | often the case with systems programming (whether for Unix, Windows, | |
186 | Mac\ \s-1OS\s0, \s-1VMS\s0, etc.), consider writing platform-specific code. | |
187 | .PP | |
188 | When the code will run on only two or three operating systems, you | |
189 | may need to consider only the differences of those particular systems. | |
190 | The important thing is to decide where the code will run and to be | |
191 | deliberate in your decision. | |
192 | .PP | |
193 | The material below is separated into three main sections: main issues of | |
194 | portability (\*(L"\s-1ISSUES\s0\*(R"), platform-specific issues (\*(L"\s-1PLATFORMS\s0\*(R"), and | |
195 | built-in perl functions that behave differently on various ports | |
196 | (\*(L"\s-1FUNCTION\s0 \s-1IMPLEMENTATIONS\s0\*(R"). | |
197 | .PP | |
198 | This information should not be considered complete; it includes possibly | |
199 | transient information about idiosyncrasies of some of the ports, almost | |
200 | all of which are in a state of constant evolution. Thus, this material | |
201 | should be considered a perpetual work in progress | |
202 | (\f(CW\*(C`<IMG SRC="yellow_sign.gif" ALT="Under Construction">\*(C'\fR). | |
203 | .SH "ISSUES" | |
204 | .IX Header "ISSUES" | |
205 | .Sh "Newlines" | |
206 | .IX Subsection "Newlines" | |
207 | In most operating systems, lines in files are terminated by newlines. | |
208 | Just what is used as a newline may vary from \s-1OS\s0 to \s-1OS\s0. Unix | |
209 | traditionally uses \f(CW\*(C`\e012\*(C'\fR, one type of DOSish I/O uses \f(CW\*(C`\e015\e012\*(C'\fR, | |
210 | and Mac\ \s-1OS\s0 uses \f(CW\*(C`\e015\*(C'\fR. | |
211 | .PP | |
212 | Perl uses \f(CW\*(C`\en\*(C'\fR to represent the \*(L"logical\*(R" newline, where what is | |
213 | logical may depend on the platform in use. In MacPerl, \f(CW\*(C`\en\*(C'\fR always | |
214 | means \f(CW\*(C`\e015\*(C'\fR. In DOSish perls, \f(CW\*(C`\en\*(C'\fR usually means \f(CW\*(C`\e012\*(C'\fR, but | |
215 | when accessing a file in \*(L"text\*(R" mode, \s-1STDIO\s0 translates it to (or | |
216 | from) \f(CW\*(C`\e015\e012\*(C'\fR, depending on whether you're reading or writing. | |
217 | Unix does the same thing on ttys in canonical mode. \f(CW\*(C`\e015\e012\*(C'\fR | |
218 | is commonly referred to as \s-1CRLF\s0. | |
219 | .PP | |
220 | A common cause of unportable programs is the misuse of \fIchop()\fR to trim | |
221 | newlines: | |
222 | .PP | |
223 | .Vb 6 | |
224 | \& # XXX UNPORTABLE! | |
225 | \& while(<FILE>) { | |
226 | \& chop; | |
227 | \& @array = split(/:/); | |
228 | \& #... | |
229 | \& } | |
230 | .Ve | |
231 | .PP | |
232 | You can get away with this on Unix and Mac \s-1OS\s0 (they have a single | |
233 | character end\-of\-line), but the same program will break under DOSish | |
234 | perls because you're only \fIchop()\fRing half the end\-of\-line. Instead, | |
235 | \&\fIchomp()\fR should be used to trim newlines. The Dunce::Files module | |
236 | can help audit your code for misuses of \fIchop()\fR. | |
237 | .PP | |
238 | When dealing with binary files (or text files in binary mode) be sure | |
239 | to explicitly set $/ to the appropriate value for your file format | |
240 | before using \fIchomp()\fR. | |
241 | .PP | |
242 | Because of the \*(L"text\*(R" mode translation, DOSish perls have limitations | |
243 | in using \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR on a file accessed in \*(L"text\*(R" mode. | |
244 | Stick to \f(CW\*(C`seek\*(C'\fR\-ing to locations you got from \f(CW\*(C`tell\*(C'\fR (and no | |
245 | others), and you are usually free to use \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR even | |
246 | in \*(L"text\*(R" mode. Using \f(CW\*(C`seek\*(C'\fR or \f(CW\*(C`tell\*(C'\fR or other file operations | |
247 | may be non\-portable. If you use \f(CW\*(C`binmode\*(C'\fR on a file, however, you | |
248 | can usually \f(CW\*(C`seek\*(C'\fR and \f(CW\*(C`tell\*(C'\fR with arbitrary values in safety. | |
249 | .PP | |
250 | A common misconception in socket programming is that \f(CW\*(C`\en\*(C'\fR eq \f(CW\*(C`\e012\*(C'\fR | |
251 | everywhere. When using protocols such as common Internet protocols, | |
252 | \&\f(CW\*(C`\e012\*(C'\fR and \f(CW\*(C`\e015\*(C'\fR are called for specifically, and the values of | |
253 | the logical \f(CW\*(C`\en\*(C'\fR and \f(CW\*(C`\er\*(C'\fR (carriage return) are not reliable. | |
254 | .PP | |
255 | .Vb 2 | |
256 | \& print SOCKET "Hi there, client!\er\en"; # WRONG | |
257 | \& print SOCKET "Hi there, client!\e015\e012"; # RIGHT | |
258 | .Ve | |
259 | .PP | |
260 | However, using \f(CW\*(C`\e015\e012\*(C'\fR (or \f(CW\*(C`\ecM\ecJ\*(C'\fR, or \f(CW\*(C`\ex0D\ex0A\*(C'\fR) can be tedious | |
261 | and unsightly, as well as confusing to those maintaining the code. As | |
262 | such, the Socket module supplies the Right Thing for those who want it. | |
263 | .PP | |
264 | .Vb 2 | |
265 | \& use Socket qw(:DEFAULT :crlf); | |
266 | \& print SOCKET "Hi there, client!$CRLF" # RIGHT | |
267 | .Ve | |
268 | .PP | |
269 | When reading from a socket, remember that the default input record | |
270 | separator \f(CW$/\fR is \f(CW\*(C`\en\*(C'\fR, but robust socket code will recognize as | |
271 | either \f(CW\*(C`\e012\*(C'\fR or \f(CW\*(C`\e015\e012\*(C'\fR as end of line: | |
272 | .PP | |
273 | .Vb 3 | |
274 | \& while (<SOCKET>) { | |
275 | \& # ... | |
276 | \& } | |
277 | .Ve | |
278 | .PP | |
279 | Because both \s-1CRLF\s0 and \s-1LF\s0 end in \s-1LF\s0, the input record separator can | |
280 | be set to \s-1LF\s0 and any \s-1CR\s0 stripped later. Better to write: | |
281 | .PP | |
282 | .Vb 2 | |
283 | \& use Socket qw(:DEFAULT :crlf); | |
284 | \& local($/) = LF; # not needed if $/ is already \e012 | |
285 | .Ve | |
286 | .PP | |
287 | .Vb 4 | |
288 | \& while (<SOCKET>) { | |
289 | \& s/$CR?$LF/\en/; # not sure if socket uses LF or CRLF, OK | |
290 | \& # s/\e015?\e012/\en/; # same thing | |
291 | \& } | |
292 | .Ve | |
293 | .PP | |
294 | This example is preferred over the previous one\*(--even for Unix | |
295 | platforms\*(--because now any \f(CW\*(C`\e015\*(C'\fR's (\f(CW\*(C`\ecM\*(C'\fR's) are stripped out | |
296 | (and there was much rejoicing). | |
297 | .PP | |
298 | Similarly, functions that return text data\*(--such as a function that | |
299 | fetches a web page\*(--should sometimes translate newlines before | |
300 | returning the data, if they've not yet been translated to the local | |
301 | newline representation. A single line of code will often suffice: | |
302 | .PP | |
303 | .Vb 2 | |
304 | \& $data =~ s/\e015?\e012/\en/g; | |
305 | \& return $data; | |
306 | .Ve | |
307 | .PP | |
308 | Some of this may be confusing. Here's a handy reference to the \s-1ASCII\s0 \s-1CR\s0 | |
309 | and \s-1LF\s0 characters. You can print it out and stick it in your wallet. | |
310 | .PP | |
311 | .Vb 2 | |
312 | \& LF eq \e012 eq \ex0A eq \ecJ eq chr(10) eq ASCII 10 | |
313 | \& CR eq \e015 eq \ex0D eq \ecM eq chr(13) eq ASCII 13 | |
314 | .Ve | |
315 | .PP | |
316 | .Vb 8 | |
317 | \& | Unix | DOS | Mac | | |
318 | \& --------------------------- | |
319 | \& \en | LF | LF | CR | | |
320 | \& \er | CR | CR | LF | | |
321 | \& \en * | LF | CRLF | CR | | |
322 | \& \er * | CR | CR | LF | | |
323 | \& --------------------------- | |
324 | \& * text-mode STDIO | |
325 | .Ve | |
326 | .PP | |
327 | The Unix column assumes that you are not accessing a serial line | |
328 | (like a tty) in canonical mode. If you are, then \s-1CR\s0 on input becomes | |
329 | \&\*(L"\en\*(R", and \*(L"\en\*(R" on output becomes \s-1CRLF\s0. | |
330 | .PP | |
331 | These are just the most common definitions of \f(CW\*(C`\en\*(C'\fR and \f(CW\*(C`\er\*(C'\fR in Perl. | |
332 | There may well be others. For example, on an \s-1EBCDIC\s0 implementation | |
333 | such as z/OS (\s-1OS/390\s0) or \s-1OS/400\s0 (using the \s-1ILE\s0, the \s-1PASE\s0 is ASCII\-based) | |
334 | the above material is similar to \*(L"Unix\*(R" but the code numbers change: | |
335 | .PP | |
336 | .Vb 4 | |
337 | \& LF eq \e025 eq \ex15 eq \ecU eq chr(21) eq CP-1047 21 | |
338 | \& LF eq \e045 eq \ex25 eq chr(37) eq CP-0037 37 | |
339 | \& CR eq \e015 eq \ex0D eq \ecM eq chr(13) eq CP-1047 13 | |
340 | \& CR eq \e015 eq \ex0D eq \ecM eq chr(13) eq CP-0037 13 | |
341 | .Ve | |
342 | .PP | |
343 | .Vb 8 | |
344 | \& | z/OS | OS/400 | | |
345 | \& ---------------------- | |
346 | \& \en | LF | LF | | |
347 | \& \er | CR | CR | | |
348 | \& \en * | LF | LF | | |
349 | \& \er * | CR | CR | | |
350 | \& ---------------------- | |
351 | \& * text-mode STDIO | |
352 | .Ve | |
353 | .Sh "Numbers endianness and Width" | |
354 | .IX Subsection "Numbers endianness and Width" | |
355 | Different CPUs store integers and floating point numbers in different | |
356 | orders (called \fIendianness\fR) and widths (32\-bit and 64\-bit being the | |
357 | most common today). This affects your programs when they attempt to transfer | |
358 | numbers in binary format from one \s-1CPU\s0 architecture to another, | |
359 | usually either \*(L"live\*(R" via network connection, or by storing the | |
360 | numbers to secondary storage such as a disk file or tape. | |
361 | .PP | |
362 | Conflicting storage orders make utter mess out of the numbers. If a | |
363 | little-endian host (Intel, \s-1VAX\s0) stores 0x12345678 (305419896 in | |
364 | decimal), a big-endian host (Motorola, Sparc, \s-1PA\s0) reads it as | |
365 | 0x78563412 (2018915346 in decimal). Alpha and \s-1MIPS\s0 can be either: | |
366 | Digital/Compaq used/uses them in little-endian mode; SGI/Cray uses | |
367 | them in big-endian mode. To avoid this problem in network (socket) | |
368 | connections use the \f(CW\*(C`pack\*(C'\fR and \f(CW\*(C`unpack\*(C'\fR formats \f(CW\*(C`n\*(C'\fR and \f(CW\*(C`N\*(C'\fR, the | |
369 | \&\*(L"network\*(R" orders. These are guaranteed to be portable. | |
370 | .PP | |
371 | As of perl 5.8.5, you can also use the \f(CW\*(C`>\*(C'\fR and \f(CW\*(C`<\*(C'\fR modifiers | |
372 | to force big\- or little-endian byte\-order. This is useful if you want | |
373 | to store signed integers or 64\-bit integers, for example. | |
374 | .PP | |
375 | You can explore the endianness of your platform by unpacking a | |
376 | data structure packed in native format such as: | |
377 | .PP | |
378 | .Vb 3 | |
379 | \& print unpack("h*", pack("s2", 1, 2)), "\en"; | |
380 | \& # '10002000' on e.g. Intel x86 or Alpha 21064 in little-endian mode | |
381 | \& # '00100020' on e.g. Motorola 68040 | |
382 | .Ve | |
383 | .PP | |
384 | If you need to distinguish between endian architectures you could use | |
385 | either of the variables set like so: | |
386 | .PP | |
387 | .Vb 2 | |
388 | \& $is_big_endian = unpack("h*", pack("s", 1)) =~ /01/; | |
389 | \& $is_little_endian = unpack("h*", pack("s", 1)) =~ /^1/; | |
390 | .Ve | |
391 | .PP | |
392 | Differing widths can cause truncation even between platforms of equal | |
393 | endianness. The platform of shorter width loses the upper parts of the | |
394 | number. There is no good solution for this problem except to avoid | |
395 | transferring or storing raw binary numbers. | |
396 | .PP | |
397 | One can circumnavigate both these problems in two ways. Either | |
398 | transfer and store numbers always in text format, instead of raw | |
399 | binary, or else consider using modules like Data::Dumper (included in | |
400 | the standard distribution as of Perl 5.005) and Storable (included as | |
401 | of perl 5.8). Keeping all data as text significantly simplifies matters. | |
402 | .PP | |
403 | The v\-strings are portable only up to v2147483647 (0x7FFFFFFF), that's | |
404 | how far \s-1EBCDIC\s0, or more precisely UTF-EBCDIC will go. | |
405 | .Sh "Files and Filesystems" | |
406 | .IX Subsection "Files and Filesystems" | |
407 | Most platforms these days structure files in a hierarchical fashion. | |
408 | So, it is reasonably safe to assume that all platforms support the | |
409 | notion of a \*(L"path\*(R" to uniquely identify a file on the system. How | |
410 | that path is really written, though, differs considerably. | |
411 | .PP | |
412 | Although similar, file path specifications differ between Unix, | |
413 | Windows, Mac\ \s-1OS\s0, \s-1OS/2\s0, \s-1VMS\s0, \s-1VOS\s0, \s-1RISC\s0\ \s-1OS\s0, and probably others. | |
414 | Unix, for example, is one of the few OSes that has the elegant idea | |
415 | of a single root directory. | |
416 | .PP | |
417 | \&\s-1DOS\s0, \s-1OS/2\s0, \s-1VMS\s0, \s-1VOS\s0, and Windows can work similarly to Unix with \f(CW\*(C`/\*(C'\fR | |
418 | as path separator, or in their own idiosyncratic ways (such as having | |
419 | several root directories and various \*(L"unrooted\*(R" device files such \s-1NIL:\s0 | |
420 | and \s-1LPT:\s0). | |
421 | .PP | |
422 | Mac\ \s-1OS\s0 uses \f(CW\*(C`:\*(C'\fR as a path separator instead of \f(CW\*(C`/\*(C'\fR. | |
423 | .PP | |
424 | The filesystem may support neither hard links (\f(CW\*(C`link\*(C'\fR) nor | |
425 | symbolic links (\f(CW\*(C`symlink\*(C'\fR, \f(CW\*(C`readlink\*(C'\fR, \f(CW\*(C`lstat\*(C'\fR). | |
426 | .PP | |
427 | The filesystem may support neither access timestamp nor change | |
428 | timestamp (meaning that about the only portable timestamp is the | |
429 | modification timestamp), or one second granularity of any timestamps | |
430 | (e.g. the \s-1FAT\s0 filesystem limits the time granularity to two seconds). | |
431 | .PP | |
432 | The \*(L"inode change timestamp\*(R" (the \f(CW\*(C`\-C\*(C'\fR filetest) may really be the | |
433 | \&\*(L"creation timestamp\*(R" (which it is not in \s-1UNIX\s0). | |
434 | .PP | |
435 | \&\s-1VOS\s0 perl can emulate Unix filenames with \f(CW\*(C`/\*(C'\fR as path separator. The | |
436 | native pathname characters greater\-than, less\-than, number\-sign, and | |
437 | percent-sign are always accepted. | |
438 | .PP | |
439 | \&\s-1RISC\s0\ \s-1OS\s0 perl can emulate Unix filenames with \f(CW\*(C`/\*(C'\fR as path | |
440 | separator, or go native and use \f(CW\*(C`.\*(C'\fR for path separator and \f(CW\*(C`:\*(C'\fR to | |
441 | signal filesystems and disk names. | |
442 | .PP | |
443 | Don't assume \s-1UNIX\s0 filesystem access semantics: that read, write, | |
444 | and execute are all the permissions there are, and even if they exist, | |
445 | that their semantics (for example what do r, w, and x mean on | |
446 | a directory) are the \s-1UNIX\s0 ones. The various \s-1UNIX/POSIX\s0 compatibility | |
447 | layers usually try to make interfaces like \fIchmod()\fR work, but sometimes | |
448 | there simply is no good mapping. | |
449 | .PP | |
450 | If all this is intimidating, have no (well, maybe only a little) | |
451 | fear. There are modules that can help. The File::Spec modules | |
452 | provide methods to do the Right Thing on whatever platform happens | |
453 | to be running the program. | |
454 | .PP | |
455 | .Vb 6 | |
456 | \& use File::Spec::Functions; | |
457 | \& chdir(updir()); # go up one directory | |
458 | \& $file = catfile(curdir(), 'temp', 'file.txt'); | |
459 | \& # on Unix and Win32, './temp/file.txt' | |
460 | \& # on Mac OS, ':temp:file.txt' | |
461 | \& # on VMS, '[.temp]file.txt' | |
462 | .Ve | |
463 | .PP | |
464 | File::Spec is available in the standard distribution as of version | |
465 | 5.004_05. File::Spec::Functions is only in File::Spec 0.7 and later, | |
466 | and some versions of perl come with version 0.6. If File::Spec | |
467 | is not updated to 0.7 or later, you must use the object-oriented | |
468 | interface from File::Spec (or upgrade File::Spec). | |
469 | .PP | |
470 | In general, production code should not have file paths hardcoded. | |
471 | Making them user-supplied or read from a configuration file is | |
472 | better, keeping in mind that file path syntax varies on different | |
473 | machines. | |
474 | .PP | |
475 | This is especially noticeable in scripts like Makefiles and test suites, | |
476 | which often assume \f(CW\*(C`/\*(C'\fR as a path separator for subdirectories. | |
477 | .PP | |
478 | Also of use is File::Basename from the standard distribution, which | |
479 | splits a pathname into pieces (base filename, full path to directory, | |
480 | and file suffix). | |
481 | .PP | |
482 | Even when on a single platform (if you can call Unix a single platform), | |
483 | remember not to count on the existence or the contents of particular | |
484 | system-specific files or directories, like \fI/etc/passwd\fR, | |
485 | \&\fI/etc/sendmail.conf\fR, \fI/etc/resolv.conf\fR, or even \fI/tmp/\fR. For | |
486 | example, \fI/etc/passwd\fR may exist but not contain the encrypted | |
487 | passwords, because the system is using some form of enhanced security. | |
488 | Or it may not contain all the accounts, because the system is using \s-1NIS\s0. | |
489 | If code does need to rely on such a file, include a description of the | |
490 | file and its format in the code's documentation, then make it easy for | |
491 | the user to override the default location of the file. | |
492 | .PP | |
493 | Don't assume a text file will end with a newline. They should, | |
494 | but people forget. | |
495 | .PP | |
496 | Do not have two files or directories of the same name with different | |
497 | case, like \fItest.pl\fR and \fITest.pl\fR, as many platforms have | |
498 | case-insensitive (or at least case\-forgiving) filenames. Also, try | |
499 | not to have non-word characters (except for \f(CW\*(C`.\*(C'\fR) in the names, and | |
500 | keep them to the 8.3 convention, for maximum portability, onerous a | |
501 | burden though this may appear. | |
502 | .PP | |
503 | Likewise, when using the AutoSplit module, try to keep your functions to | |
504 | 8.3 naming and case-insensitive conventions; or, at the least, | |
505 | make it so the resulting files have a unique (case\-insensitively) | |
506 | first 8 characters. | |
507 | .PP | |
508 | Whitespace in filenames is tolerated on most systems, but not all, | |
509 | and even on systems where it might be tolerated, some utilities | |
510 | might become confused by such whitespace. | |
511 | .PP | |
512 | Many systems (\s-1DOS\s0, \s-1VMS\s0) cannot have more than one \f(CW\*(C`.\*(C'\fR in their filenames. | |
513 | .PP | |
514 | Don't assume \f(CW\*(C`>\*(C'\fR won't be the first character of a filename. | |
515 | Always use \f(CW\*(C`<\*(C'\fR explicitly to open a file for reading, or even | |
516 | better, use the three-arg version of open, unless you want the user to | |
517 | be able to specify a pipe open. | |
518 | .PP | |
519 | .Vb 1 | |
520 | \& open(FILE, '<', $existing_file) or die $!; | |
521 | .Ve | |
522 | .PP | |
523 | If filenames might use strange characters, it is safest to open it | |
524 | with \f(CW\*(C`sysopen\*(C'\fR instead of \f(CW\*(C`open\*(C'\fR. \f(CW\*(C`open\*(C'\fR is magic and can | |
525 | translate characters like \f(CW\*(C`>\*(C'\fR, \f(CW\*(C`<\*(C'\fR, and \f(CW\*(C`|\*(C'\fR, which may | |
526 | be the wrong thing to do. (Sometimes, though, it's the right thing.) | |
527 | Three-arg open can also help protect against this translation in cases | |
528 | where it is undesirable. | |
529 | .PP | |
530 | Don't use \f(CW\*(C`:\*(C'\fR as a part of a filename since many systems use that for | |
531 | their own semantics (Mac \s-1OS\s0 Classic for separating pathname components, | |
532 | many networking schemes and utilities for separating the nodename and | |
533 | the pathname, and so on). For the same reasons, avoid \f(CW\*(C`@\*(C'\fR, \f(CW\*(C`;\*(C'\fR and | |
534 | \&\f(CW\*(C`|\*(C'\fR. | |
535 | .PP | |
536 | Don't assume that in pathnames you can collapse two leading slashes | |
537 | \&\f(CW\*(C`//\*(C'\fR into one: some networking and clustering filesystems have special | |
538 | semantics for that. Let the operating system to sort it out. | |
539 | .PP | |
540 | The \fIportable filename characters\fR as defined by \s-1ANSI\s0 C are | |
541 | .PP | |
542 | .Vb 4 | |
543 | \& a b c d e f g h i j k l m n o p q r t u v w x y z | |
544 | \& A B C D E F G H I J K L M N O P Q R T U V W X Y Z | |
545 | \& 0 1 2 3 4 5 6 7 8 9 | |
546 | \& . _ - | |
547 | .Ve | |
548 | .PP | |
549 | and the \*(L"\-\*(R" shouldn't be the first character. If you want to be | |
550 | hypercorrect, stay case-insensitive and within the 8.3 naming | |
551 | convention (all the files and directories have to be unique within one | |
552 | directory if their names are lowercased and truncated to eight | |
553 | characters before the \f(CW\*(C`.\*(C'\fR, if any, and to three characters after the | |
554 | \&\f(CW\*(C`.\*(C'\fR, if any). (And do not use \f(CW\*(C`.\*(C'\fRs in directory names.) | |
555 | .Sh "System Interaction" | |
556 | .IX Subsection "System Interaction" | |
557 | Not all platforms provide a command line. These are usually platforms | |
558 | that rely primarily on a Graphical User Interface (\s-1GUI\s0) for user | |
559 | interaction. A program requiring a command line interface might | |
560 | not work everywhere. This is probably for the user of the program | |
561 | to deal with, so don't stay up late worrying about it. | |
562 | .PP | |
563 | Some platforms can't delete or rename files held open by the system, | |
564 | this limitation may also apply to changing filesystem metainformation | |
565 | like file permissions or owners. Remember to \f(CW\*(C`close\*(C'\fR files when you | |
566 | are done with them. Don't \f(CW\*(C`unlink\*(C'\fR or \f(CW\*(C`rename\*(C'\fR an open file. Don't | |
567 | \&\f(CW\*(C`tie\*(C'\fR or \f(CW\*(C`open\*(C'\fR a file already tied or opened; \f(CW\*(C`untie\*(C'\fR or \f(CW\*(C`close\*(C'\fR | |
568 | it first. | |
569 | .PP | |
570 | Don't open the same file more than once at a time for writing, as some | |
571 | operating systems put mandatory locks on such files. | |
572 | .PP | |
573 | Don't assume that write/modify permission on a directory gives the | |
574 | right to add or delete files/directories in that directory. That is | |
575 | filesystem specific: in some filesystems you need write/modify | |
576 | permission also (or even just) in the file/directory itself. In some | |
577 | filesystems (\s-1AFS\s0, \s-1DFS\s0) the permission to add/delete directory entries | |
578 | is a completely separate permission. | |
579 | .PP | |
580 | Don't assume that a single \f(CW\*(C`unlink\*(C'\fR completely gets rid of the file: | |
581 | some filesystems (most notably the ones in \s-1VMS\s0) have versioned | |
582 | filesystems, and \fIunlink()\fR removes only the most recent one (it doesn't | |
583 | remove all the versions because by default the native tools on those | |
584 | platforms remove just the most recent version, too). The portable | |
585 | idiom to remove all the versions of a file is | |
586 | .PP | |
587 | .Vb 1 | |
588 | \& 1 while unlink "file"; | |
589 | .Ve | |
590 | .PP | |
591 | This will terminate if the file is undeleteable for some reason | |
592 | (protected, not there, and so on). | |
593 | .PP | |
594 | Don't count on a specific environment variable existing in \f(CW%ENV\fR. | |
595 | Don't count on \f(CW%ENV\fR entries being case\-sensitive, or even | |
596 | case\-preserving. Don't try to clear \f(CW%ENV\fR by saying \f(CW\*(C`%ENV = ();\*(C'\fR, or, | |
597 | if you really have to, make it conditional on \f(CW\*(C`$^O ne 'VMS'\*(C'\fR since in | |
598 | \&\s-1VMS\s0 the \f(CW%ENV\fR table is much more than a per-process key-value string | |
599 | table. | |
600 | .PP | |
601 | Don't count on signals or \f(CW%SIG\fR for anything. | |
602 | .PP | |
603 | Don't count on filename globbing. Use \f(CW\*(C`opendir\*(C'\fR, \f(CW\*(C`readdir\*(C'\fR, and | |
604 | \&\f(CW\*(C`closedir\*(C'\fR instead. | |
605 | .PP | |
606 | Don't count on per-program environment variables, or per-program current | |
607 | directories. | |
608 | .PP | |
609 | Don't count on specific values of \f(CW$!\fR, neither numeric nor | |
610 | especially the strings values\*(-- users may switch their locales causing | |
611 | error messages to be translated into their languages. If you can | |
612 | trust a POSIXish environment, you can portably use the symbols defined | |
613 | by the Errno module, like \s-1ENOENT\s0. And don't trust on the values of \f(CW$!\fR | |
614 | at all except immediately after a failed system call. | |
615 | .Sh "Command names versus file pathnames" | |
616 | .IX Subsection "Command names versus file pathnames" | |
617 | Don't assume that the name used to invoke a command or program with | |
618 | \&\f(CW\*(C`system\*(C'\fR or \f(CW\*(C`exec\*(C'\fR can also be used to test for the existence of the | |
619 | file that holds the executable code for that command or program. | |
620 | First, many systems have \*(L"internal\*(R" commands that are built-in to the | |
621 | shell or \s-1OS\s0 and while these commands can be invoked, there is no | |
622 | corresponding file. Second, some operating systems (e.g., Cygwin, | |
623 | \&\s-1DJGPP\s0, \s-1OS/2\s0, and \s-1VOS\s0) have required suffixes for executable files; | |
624 | these suffixes are generally permitted on the command name but are not | |
625 | required. Thus, a command like \*(L"perl\*(R" might exist in a file named | |
626 | \&\*(L"perl\*(R", \*(L"perl.exe\*(R", or \*(L"perl.pm\*(R", depending on the operating system. | |
627 | The variable \*(L"_exe\*(R" in the Config module holds the executable suffix, | |
628 | if any. Third, the \s-1VMS\s0 port carefully sets up $^X and | |
629 | \&\f(CW$Config\fR{perlpath} so that no further processing is required. This is | |
630 | just as well, because the matching regular expression used below would | |
631 | then have to deal with a possible trailing version number in the \s-1VMS\s0 | |
632 | file name. | |
633 | .PP | |
634 | To convert $^X to a file pathname, taking account of the requirements | |
635 | of the various operating system possibilities, say: | |
636 | .PP | |
637 | .Vb 4 | |
638 | \& use Config; | |
639 | \& $thisperl = $^X; | |
640 | \& if ($^O ne 'VMS') | |
641 | \& {$thisperl .= $Config{_exe} unless $thisperl =~ m/$Config{_exe}$/i;} | |
642 | .Ve | |
643 | .PP | |
644 | To convert \f(CW$Config\fR{perlpath} to a file pathname, say: | |
645 | .PP | |
646 | .Vb 4 | |
647 | \& use Config; | |
648 | \& $thisperl = $Config{perlpath}; | |
649 | \& if ($^O ne 'VMS') | |
650 | \& {$thisperl .= $Config{_exe} unless $thisperl =~ m/$Config{_exe}$/i;} | |
651 | .Ve | |
652 | .Sh "Networking" | |
653 | .IX Subsection "Networking" | |
654 | Don't assume that you can reach the public Internet. | |
655 | .PP | |
656 | Don't assume that there is only one way to get through firewalls | |
657 | to the public Internet. | |
658 | .PP | |
659 | Don't assume that you can reach outside world through any other port | |
660 | than 80, or some web proxy. ftp is blocked by many firewalls. | |
661 | .PP | |
662 | Don't assume that you can send email by connecting to the local \s-1SMTP\s0 port. | |
663 | .PP | |
664 | Don't assume that you can reach yourself or any node by the name | |
665 | \&'localhost'. The same goes for '127.0.0.1'. You will have to try both. | |
666 | .PP | |
667 | Don't assume that the host has only one network card, or that it | |
668 | can't bind to many virtual \s-1IP\s0 addresses. | |
669 | .PP | |
670 | Don't assume a particular network device name. | |
671 | .PP | |
672 | Don't assume a particular set of \fIioctl()\fRs will work. | |
673 | .PP | |
674 | Don't assume that you can ping hosts and get replies. | |
675 | .PP | |
676 | Don't assume that any particular port (service) will respond. | |
677 | .PP | |
678 | Don't assume that Sys::Hostname (or any other \s-1API\s0 or command) | |
679 | returns either a fully qualified hostname or a non-qualified hostname: | |
680 | it all depends on how the system had been configured. Also remember | |
681 | things like \s-1DHCP\s0 and NAT\*(-- the hostname you get back might not be very | |
682 | useful. | |
683 | .PP | |
684 | All the above \*(L"don't\*(R":s may look daunting, and they are \*(-- but the key | |
685 | is to degrade gracefully if one cannot reach the particular network | |
686 | service one wants. Croaking or hanging do not look very professional. | |
687 | .Sh "Interprocess Communication (\s-1IPC\s0)" | |
688 | .IX Subsection "Interprocess Communication (IPC)" | |
689 | In general, don't directly access the system in code meant to be | |
690 | portable. That means, no \f(CW\*(C`system\*(C'\fR, \f(CW\*(C`exec\*(C'\fR, \f(CW\*(C`fork\*(C'\fR, \f(CW\*(C`pipe\*(C'\fR, | |
691 | \&\f(CW``\fR, \f(CW\*(C`qx//\*(C'\fR, \f(CW\*(C`open\*(C'\fR with a \f(CW\*(C`|\*(C'\fR, nor any of the other things | |
692 | that makes being a perl hacker worth being. | |
693 | .PP | |
694 | Commands that launch external processes are generally supported on | |
695 | most platforms (though many of them do not support any type of | |
696 | forking). The problem with using them arises from what you invoke | |
697 | them on. External tools are often named differently on different | |
698 | platforms, may not be available in the same location, might accept | |
699 | different arguments, can behave differently, and often present their | |
700 | results in a platform-dependent way. Thus, you should seldom depend | |
701 | on them to produce consistent results. (Then again, if you're calling | |
702 | \&\fInetstat \-a\fR, you probably don't expect it to run on both Unix and \s-1CP/M\s0.) | |
703 | .PP | |
704 | One especially common bit of Perl code is opening a pipe to \fBsendmail\fR: | |
705 | .PP | |
706 | .Vb 2 | |
707 | \& open(MAIL, '|/usr/lib/sendmail -t') | |
708 | \& or die "cannot fork sendmail: $!"; | |
709 | .Ve | |
710 | .PP | |
711 | This is fine for systems programming when sendmail is known to be | |
712 | available. But it is not fine for many non-Unix systems, and even | |
713 | some Unix systems that may not have sendmail installed. If a portable | |
714 | solution is needed, see the various distributions on \s-1CPAN\s0 that deal | |
715 | with it. Mail::Mailer and Mail::Send in the MailTools distribution are | |
716 | commonly used, and provide several mailing methods, including mail, | |
717 | sendmail, and direct \s-1SMTP\s0 (via Net::SMTP) if a mail transfer agent is | |
718 | not available. Mail::Sendmail is a standalone module that provides | |
719 | simple, platform-independent mailing. | |
720 | .PP | |
721 | The Unix System V \s-1IPC\s0 (\f(CW\*(C`msg*(), sem*(), shm*()\*(C'\fR) is not available | |
722 | even on all Unix platforms. | |
723 | .PP | |
724 | Do not use either the bare result of \f(CW\*(C`pack("N", 10, 20, 30, 40)\*(C'\fR or | |
725 | bare v\-strings (such as \f(CW\*(C`v10.20.30.40\*(C'\fR) to represent IPv4 addresses: | |
726 | both forms just pack the four bytes into network order. That this | |
727 | would be equal to the C language \f(CW\*(C`in_addr\*(C'\fR struct (which is what the | |
728 | socket code internally uses) is not guaranteed. To be portable use | |
729 | the routines of the Socket extension, such as \f(CW\*(C`inet_aton()\*(C'\fR, | |
730 | \&\f(CW\*(C`inet_ntoa()\*(C'\fR, and \f(CW\*(C`sockaddr_in()\*(C'\fR. | |
731 | .PP | |
732 | The rule of thumb for portable code is: Do it all in portable Perl, or | |
733 | use a module (that may internally implement it with platform-specific | |
734 | code, but expose a common interface). | |
735 | .Sh "External Subroutines (\s-1XS\s0)" | |
736 | .IX Subsection "External Subroutines (XS)" | |
737 | \&\s-1XS\s0 code can usually be made to work with any platform, but dependent | |
738 | libraries, header files, etc., might not be readily available or | |
739 | portable, or the \s-1XS\s0 code itself might be platform\-specific, just as Perl | |
740 | code might be. If the libraries and headers are portable, then it is | |
741 | normally reasonable to make sure the \s-1XS\s0 code is portable, too. | |
742 | .PP | |
743 | A different type of portability issue arises when writing \s-1XS\s0 code: | |
744 | availability of a C compiler on the end\-user's system. C brings | |
745 | with it its own portability issues, and writing \s-1XS\s0 code will expose | |
746 | you to some of those. Writing purely in Perl is an easier way to | |
747 | achieve portability. | |
748 | .Sh "Standard Modules" | |
749 | .IX Subsection "Standard Modules" | |
750 | In general, the standard modules work across platforms. Notable | |
751 | exceptions are the \s-1CPAN\s0 module (which currently makes connections to external | |
752 | programs that may not be available), platform-specific modules (like | |
753 | ExtUtils::MM_VMS), and \s-1DBM\s0 modules. | |
754 | .PP | |
755 | There is no one \s-1DBM\s0 module available on all platforms. | |
756 | SDBM_File and the others are generally available on all Unix and DOSish | |
757 | ports, but not in MacPerl, where only NBDM_File and DB_File are | |
758 | available. | |
759 | .PP | |
760 | The good news is that at least some \s-1DBM\s0 module should be available, and | |
761 | AnyDBM_File will use whichever module it can find. Of course, then | |
762 | the code needs to be fairly strict, dropping to the greatest common | |
763 | factor (e.g., not exceeding 1K for each record), so that it will | |
764 | work with any \s-1DBM\s0 module. See AnyDBM_File for more details. | |
765 | .Sh "Time and Date" | |
766 | .IX Subsection "Time and Date" | |
767 | The system's notion of time of day and calendar date is controlled in | |
768 | widely different ways. Don't assume the timezone is stored in \f(CW$ENV{TZ}\fR, | |
769 | and even if it is, don't assume that you can control the timezone through | |
770 | that variable. Don't assume anything about the three-letter timezone | |
771 | abbreviations (for example that \s-1MST\s0 would be the Mountain Standard Time, | |
772 | it's been known to stand for Moscow Standard Time). If you need to | |
773 | use timezones, express them in some unambiguous format like the | |
774 | exact number of minutes offset from \s-1UTC\s0, or the \s-1POSIX\s0 timezone | |
775 | format. | |
776 | .PP | |
777 | Don't assume that the epoch starts at 00:00:00, January 1, 1970, | |
778 | because that is \s-1OS\-\s0 and implementation\-specific. It is better to | |
779 | store a date in an unambiguous representation. The \s-1ISO\s0 8601 standard | |
780 | defines YYYY-MM-DD as the date format, or YYYY-MM-DDTHH-MM-SS | |
781 | (that's a literal \*(L"T\*(R" separating the date from the time). | |
782 | Please do use the \s-1ISO\s0 8601 instead of making us to guess what | |
783 | date 02/03/04 might be. \s-1ISO\s0 8601 even sorts nicely as\-is. | |
784 | A text representation (like \*(L"1987\-12\-18\*(R") can be easily converted | |
785 | into an OS-specific value using a module like Date::Parse. | |
786 | An array of values, such as those returned by \f(CW\*(C`localtime\*(C'\fR, can be | |
787 | converted to an OS-specific representation using Time::Local. | |
788 | .PP | |
789 | When calculating specific times, such as for tests in time or date modules, | |
790 | it may be appropriate to calculate an offset for the epoch. | |
791 | .PP | |
792 | .Vb 2 | |
793 | \& require Time::Local; | |
794 | \& $offset = Time::Local::timegm(0, 0, 0, 1, 0, 70); | |
795 | .Ve | |
796 | .PP | |
797 | The value for \f(CW$offset\fR in Unix will be \f(CW0\fR, but in Mac \s-1OS\s0 will be | |
798 | some large number. \f(CW$offset\fR can then be added to a Unix time value | |
799 | to get what should be the proper value on any system. | |
800 | .PP | |
801 | On Windows (at least), you shouldn't pass a negative value to \f(CW\*(C`gmtime\*(C'\fR or | |
802 | \&\f(CW\*(C`localtime\*(C'\fR. | |
803 | .Sh "Character sets and character encoding" | |
804 | .IX Subsection "Character sets and character encoding" | |
805 | Assume very little about character sets. | |
806 | .PP | |
807 | Assume nothing about numerical values (\f(CW\*(C`ord\*(C'\fR, \f(CW\*(C`chr\*(C'\fR) of characters. | |
808 | Do not use explicit code point ranges (like \exHH\-\exHH); use for | |
809 | example symbolic character classes like \f(CW\*(C`[:print:]\*(C'\fR. | |
810 | .PP | |
811 | Do not assume that the alphabetic characters are encoded contiguously | |
812 | (in the numeric sense). There may be gaps. | |
813 | .PP | |
814 | Do not assume anything about the ordering of the characters. | |
815 | The lowercase letters may come before or after the uppercase letters; | |
816 | the lowercase and uppercase may be interlaced so that both \*(L"a\*(R" and \*(L"A\*(R" | |
817 | come before \*(L"b\*(R"; the accented and other international characters may | |
818 | be interlaced so that a\*: comes before \*(L"b\*(R". | |
819 | .Sh "Internationalisation" | |
820 | .IX Subsection "Internationalisation" | |
821 | If you may assume \s-1POSIX\s0 (a rather large assumption), you may read | |
822 | more about the \s-1POSIX\s0 locale system from perllocale. The locale | |
823 | system at least attempts to make things a little bit more portable, | |
824 | or at least more convenient and native-friendly for non-English | |
825 | users. The system affects character sets and encoding, and date | |
826 | and time formatting\*(--amongst other things. | |
827 | .PP | |
828 | If you really want to be international, you should consider Unicode. | |
829 | See perluniintro and perlunicode for more information. | |
830 | .PP | |
831 | If you want to use non-ASCII bytes (outside the bytes 0x00..0x7f) in | |
832 | the \*(L"source code\*(R" of your code, to be portable you have to be explicit | |
833 | about what bytes they are. Someone might for example be using your | |
834 | code under a \s-1UTF\-8\s0 locale, in which case random native bytes might be | |
835 | illegal (\*(L"Malformed \s-1UTF\-8\s0 ...\*(R") This means that for example embedding | |
836 | \&\s-1ISO\s0 8859\-1 bytes beyond 0x7f into your strings might cause trouble | |
837 | later. If the bytes are native 8\-bit bytes, you can use the \f(CW\*(C`bytes\*(C'\fR | |
838 | pragma. If the bytes are in a string (regular expression being a | |
839 | curious string), you can often also use the \f(CW\*(C`\exHH\*(C'\fR notation instead | |
840 | of embedding the bytes as\-is. If they are in some particular legacy | |
841 | encoding (ether single-byte or something more complicated), you can | |
842 | use the \f(CW\*(C`encoding\*(C'\fR pragma. (If you want to write your code in \s-1UTF\-8\s0, | |
843 | you can use either the \f(CW\*(C`utf8\*(C'\fR pragma, or the \f(CW\*(C`encoding\*(C'\fR pragma.) | |
844 | The \f(CW\*(C`bytes\*(C'\fR and \f(CW\*(C`utf8\*(C'\fR pragmata are available since Perl 5.6.0, and | |
845 | the \f(CW\*(C`encoding\*(C'\fR pragma since Perl 5.8.0. | |
846 | .Sh "System Resources" | |
847 | .IX Subsection "System Resources" | |
848 | If your code is destined for systems with severely constrained (or | |
849 | missing!) virtual memory systems then you want to be \fIespecially\fR mindful | |
850 | of avoiding wasteful constructs such as: | |
851 | .PP | |
852 | .Vb 3 | |
853 | \& # NOTE: this is no longer "bad" in perl5.005 | |
854 | \& for (0..10000000) {} # bad | |
855 | \& for (my $x = 0; $x <= 10000000; ++$x) {} # good | |
856 | .Ve | |
857 | .PP | |
858 | .Vb 1 | |
859 | \& @lines = <VERY_LARGE_FILE>; # bad | |
860 | .Ve | |
861 | .PP | |
862 | .Vb 2 | |
863 | \& while (<FILE>) {$file .= $_} # sometimes bad | |
864 | \& $file = join('', <FILE>); # better | |
865 | .Ve | |
866 | .PP | |
867 | The last two constructs may appear unintuitive to most people. The | |
868 | first repeatedly grows a string, whereas the second allocates a | |
869 | large chunk of memory in one go. On some systems, the second is | |
870 | more efficient that the first. | |
871 | .Sh "Security" | |
872 | .IX Subsection "Security" | |
873 | Most multi-user platforms provide basic levels of security, usually | |
874 | implemented at the filesystem level. Some, however, do | |
875 | not\*(-- unfortunately. Thus the notion of user id, or \*(L"home\*(R" directory, | |
876 | or even the state of being logged\-in, may be unrecognizable on many | |
877 | platforms. If you write programs that are security\-conscious, it | |
878 | is usually best to know what type of system you will be running | |
879 | under so that you can write code explicitly for that platform (or | |
880 | class of platforms). | |
881 | .PP | |
882 | Don't assume the \s-1UNIX\s0 filesystem access semantics: the operating | |
883 | system or the filesystem may be using some \s-1ACL\s0 systems, which are | |
884 | richer languages than the usual rwx. Even if the rwx exist, | |
885 | their semantics might be different. | |
886 | .PP | |
887 | (From security viewpoint testing for permissions before attempting to | |
888 | do something is silly anyway: if one tries this, there is potential | |
889 | for race conditions\*(-- someone or something might change the | |
890 | permissions between the permissions check and the actual operation. | |
891 | Just try the operation.) | |
892 | .PP | |
893 | Don't assume the \s-1UNIX\s0 user and group semantics: especially, don't | |
894 | expect the \f(CW$<\fR and \f(CW$>\fR (or the \f(CW$(\fR and \f(CW$)\fR) to work | |
895 | for switching identities (or memberships). | |
896 | .PP | |
897 | Don't assume set-uid and set-gid semantics. (And even if you do, | |
898 | think twice: set-uid and set-gid are a known can of security worms.) | |
899 | .Sh "Style" | |
900 | .IX Subsection "Style" | |
901 | For those times when it is necessary to have platform-specific code, | |
902 | consider keeping the platform-specific code in one place, making porting | |
903 | to other platforms easier. Use the Config module and the special | |
904 | variable \f(CW$^O\fR to differentiate platforms, as described in | |
905 | \&\*(L"\s-1PLATFORMS\s0\*(R". | |
906 | .PP | |
907 | Be careful in the tests you supply with your module or programs. | |
908 | Module code may be fully portable, but its tests might not be. This | |
909 | often happens when tests spawn off other processes or call external | |
910 | programs to aid in the testing, or when (as noted above) the tests | |
911 | assume certain things about the filesystem and paths. Be careful not | |
912 | to depend on a specific output style for errors, such as when checking | |
913 | \&\f(CW$!\fR after a failed system call. Using \f(CW$!\fR for anything else than | |
914 | displaying it as output is doubtful (though see the Errno module for | |
915 | testing reasonably portably for error value). Some platforms expect | |
916 | a certain output format, and Perl on those platforms may have been | |
917 | adjusted accordingly. Most specifically, don't anchor a regex when | |
918 | testing an error value. | |
919 | .SH "CPAN Testers" | |
920 | .IX Header "CPAN Testers" | |
921 | Modules uploaded to \s-1CPAN\s0 are tested by a variety of volunteers on | |
922 | different platforms. These \s-1CPAN\s0 testers are notified by mail of each | |
923 | new upload, and reply to the list with \s-1PASS\s0, \s-1FAIL\s0, \s-1NA\s0 (not applicable to | |
924 | this platform), or \s-1UNKNOWN\s0 (unknown), along with any relevant notations. | |
925 | .PP | |
926 | The purpose of the testing is twofold: one, to help developers fix any | |
927 | problems in their code that crop up because of lack of testing on other | |
928 | platforms; two, to provide users with information about whether | |
929 | a given module works on a given platform. | |
930 | .PP | |
931 | Also see: | |
932 | .IP "\(bu" 4 | |
933 | Mailing list: cpan\-testers@perl.org | |
934 | .IP "\(bu" 4 | |
935 | Testing results: http://testers.cpan.org/ | |
936 | .SH "PLATFORMS" | |
937 | .IX Header "PLATFORMS" | |
938 | As of version 5.002, Perl is built with a \f(CW$^O\fR variable that | |
939 | indicates the operating system it was built on. This was implemented | |
940 | to help speed up code that would otherwise have to \f(CW\*(C`use Config\*(C'\fR | |
941 | and use the value of \f(CW$Config{osname}\fR. Of course, to get more | |
942 | detailed information about the system, looking into \f(CW%Config\fR is | |
943 | certainly recommended. | |
944 | .PP | |
945 | \&\f(CW%Config\fR cannot always be trusted, however, because it was built | |
946 | at compile time. If perl was built in one place, then transferred | |
947 | elsewhere, some values may be wrong. The values may even have been | |
948 | edited after the fact. | |
949 | .Sh "Unix" | |
950 | .IX Subsection "Unix" | |
951 | Perl works on a bewildering variety of Unix and Unix-like platforms (see | |
952 | e.g. most of the files in the \fIhints/\fR directory in the source code kit). | |
953 | On most of these systems, the value of \f(CW$^O\fR (hence \f(CW$Config{'osname'}\fR, | |
954 | too) is determined either by lowercasing and stripping punctuation from the | |
955 | first field of the string returned by typing \f(CW\*(C`uname \-a\*(C'\fR (or a similar command) | |
956 | at the shell prompt or by testing the file system for the presence of | |
957 | uniquely named files such as a kernel or header file. Here, for example, | |
958 | are a few of the more popular Unix flavors: | |
959 | .PP | |
960 | .Vb 29 | |
961 | \& uname $^O $Config{'archname'} | |
962 | \& -------------------------------------------- | |
963 | \& AIX aix aix | |
964 | \& BSD/OS bsdos i386-bsdos | |
965 | \& Darwin darwin darwin | |
966 | \& dgux dgux AViiON-dgux | |
967 | \& DYNIX/ptx dynixptx i386-dynixptx | |
968 | \& FreeBSD freebsd freebsd-i386 | |
969 | \& Linux linux arm-linux | |
970 | \& Linux linux i386-linux | |
971 | \& Linux linux i586-linux | |
972 | \& Linux linux ppc-linux | |
973 | \& HP-UX hpux PA-RISC1.1 | |
974 | \& IRIX irix irix | |
975 | \& Mac OS X darwin darwin | |
976 | \& MachTen PPC machten powerpc-machten | |
977 | \& NeXT 3 next next-fat | |
978 | \& NeXT 4 next OPENSTEP-Mach | |
979 | \& openbsd openbsd i386-openbsd | |
980 | \& OSF1 dec_osf alpha-dec_osf | |
981 | \& reliantunix-n svr4 RM400-svr4 | |
982 | \& SCO_SV sco_sv i386-sco_sv | |
983 | \& SINIX-N svr4 RM400-svr4 | |
984 | \& sn4609 unicos CRAY_C90-unicos | |
985 | \& sn6521 unicosmk t3e-unicosmk | |
986 | \& sn9617 unicos CRAY_J90-unicos | |
987 | \& SunOS solaris sun4-solaris | |
988 | \& SunOS solaris i86pc-solaris | |
989 | \& SunOS4 sunos sun4-sunos | |
990 | .Ve | |
991 | .PP | |
992 | Because the value of \f(CW$Config{archname}\fR may depend on the | |
993 | hardware architecture, it can vary more than the value of \f(CW$^O\fR. | |
994 | .Sh "\s-1DOS\s0 and Derivatives" | |
995 | .IX Subsection "DOS and Derivatives" | |
996 | Perl has long been ported to Intel-style microcomputers running under | |
997 | systems like \s-1PC\-DOS\s0, \s-1MS\-DOS\s0, \s-1OS/2\s0, and most Windows platforms you can | |
998 | bring yourself to mention (except for Windows \s-1CE\s0, if you count that). | |
999 | Users familiar with \fI\s-1COMMAND\s0.COM\fR or \fI\s-1CMD\s0.EXE\fR style shells should | |
1000 | be aware that each of these file specifications may have subtle | |
1001 | differences: | |
1002 | .PP | |
1003 | .Vb 4 | |
1004 | \& $filespec0 = "c:/foo/bar/file.txt"; | |
1005 | \& $filespec1 = "c:\e\efoo\e\ebar\e\efile.txt"; | |
1006 | \& $filespec2 = 'c:\efoo\ebar\efile.txt'; | |
1007 | \& $filespec3 = 'c:\e\efoo\e\ebar\e\efile.txt'; | |
1008 | .Ve | |
1009 | .PP | |
1010 | System calls accept either \f(CW\*(C`/\*(C'\fR or \f(CW\*(C`\e\*(C'\fR as the path separator. | |
1011 | However, many command-line utilities of \s-1DOS\s0 vintage treat \f(CW\*(C`/\*(C'\fR as | |
1012 | the option prefix, so may get confused by filenames containing \f(CW\*(C`/\*(C'\fR. | |
1013 | Aside from calling any external programs, \f(CW\*(C`/\*(C'\fR will work just fine, | |
1014 | and probably better, as it is more consistent with popular usage, | |
1015 | and avoids the problem of remembering what to backwhack and what | |
1016 | not to. | |
1017 | .PP | |
1018 | The \s-1DOS\s0 \s-1FAT\s0 filesystem can accommodate only \*(L"8.3\*(R" style filenames. Under | |
1019 | the \*(L"case\-insensitive, but case\-preserving\*(R" \s-1HPFS\s0 (\s-1OS/2\s0) and \s-1NTFS\s0 (\s-1NT\s0) | |
1020 | filesystems you may have to be careful about case returned with functions | |
1021 | like \f(CW\*(C`readdir\*(C'\fR or used with functions like \f(CW\*(C`open\*(C'\fR or \f(CW\*(C`opendir\*(C'\fR. | |
1022 | .PP | |
1023 | \&\s-1DOS\s0 also treats several filenames as special, such as \s-1AUX\s0, \s-1PRN\s0, | |
1024 | \&\s-1NUL\s0, \s-1CON\s0, \s-1COM1\s0, \s-1LPT1\s0, \s-1LPT2\s0, etc. Unfortunately, sometimes these | |
1025 | filenames won't even work if you include an explicit directory | |
1026 | prefix. It is best to avoid such filenames, if you want your code | |
1027 | to be portable to \s-1DOS\s0 and its derivatives. It's hard to know what | |
1028 | these all are, unfortunately. | |
1029 | .PP | |
1030 | Users of these operating systems may also wish to make use of | |
1031 | scripts such as \fIpl2bat.bat\fR or \fIpl2cmd\fR to | |
1032 | put wrappers around your scripts. | |
1033 | .PP | |
1034 | Newline (\f(CW\*(C`\en\*(C'\fR) is translated as \f(CW\*(C`\e015\e012\*(C'\fR by \s-1STDIO\s0 when reading from | |
1035 | and writing to files (see \*(L"Newlines\*(R"). \f(CW\*(C`binmode(FILEHANDLE)\*(C'\fR | |
1036 | will keep \f(CW\*(C`\en\*(C'\fR translated as \f(CW\*(C`\e012\*(C'\fR for that filehandle. Since it is a | |
1037 | no-op on other systems, \f(CW\*(C`binmode\*(C'\fR should be used for cross-platform code | |
1038 | that deals with binary data. That's assuming you realize in advance | |
1039 | that your data is in binary. General-purpose programs should | |
1040 | often assume nothing about their data. | |
1041 | .PP | |
1042 | The \f(CW$^O\fR variable and the \f(CW$Config{archname}\fR values for various | |
1043 | DOSish perls are as follows: | |
1044 | .PP | |
1045 | .Vb 17 | |
1046 | \& OS $^O $Config{archname} ID Version | |
1047 | \& -------------------------------------------------------- | |
1048 | \& MS-DOS dos ? | |
1049 | \& PC-DOS dos ? | |
1050 | \& OS/2 os2 ? | |
1051 | \& Windows 3.1 ? ? 0 3 01 | |
1052 | \& Windows 95 MSWin32 MSWin32-x86 1 4 00 | |
1053 | \& Windows 98 MSWin32 MSWin32-x86 1 4 10 | |
1054 | \& Windows ME MSWin32 MSWin32-x86 1 ? | |
1055 | \& Windows NT MSWin32 MSWin32-x86 2 4 xx | |
1056 | \& Windows NT MSWin32 MSWin32-ALPHA 2 4 xx | |
1057 | \& Windows NT MSWin32 MSWin32-ppc 2 4 xx | |
1058 | \& Windows 2000 MSWin32 MSWin32-x86 2 5 00 | |
1059 | \& Windows XP MSWin32 MSWin32-x86 2 5 01 | |
1060 | \& Windows 2003 MSWin32 MSWin32-x86 2 5 02 | |
1061 | \& Windows CE MSWin32 ? 3 | |
1062 | \& Cygwin cygwin cygwin | |
1063 | .Ve | |
1064 | .PP | |
1065 | The various MSWin32 Perl's can distinguish the \s-1OS\s0 they are running on | |
1066 | via the value of the fifth element of the list returned from | |
1067 | \&\fIWin32::GetOSVersion()\fR. For example: | |
1068 | .PP | |
1069 | .Vb 4 | |
1070 | \& if ($^O eq 'MSWin32') { | |
1071 | \& my @os_version_info = Win32::GetOSVersion(); | |
1072 | \& print +('3.1','95','NT')[$os_version_info[4]],"\en"; | |
1073 | \& } | |
1074 | .Ve | |
1075 | .PP | |
1076 | There are also \fIWin32::IsWinNT()\fR and \fIWin32::IsWin95()\fR, try \f(CW\*(C`perldoc Win32\*(C'\fR, | |
1077 | and as of libwin32 0.19 (not part of the core Perl distribution) | |
1078 | \&\fIWin32::GetOSName()\fR. The very portable \fIPOSIX::uname()\fR will work too: | |
1079 | .PP | |
1080 | .Vb 2 | |
1081 | \& c:\e> perl -MPOSIX -we "print join '|', uname" | |
1082 | \& Windows NT|moonru|5.0|Build 2195 (Service Pack 2)|x86 | |
1083 | .Ve | |
1084 | .PP | |
1085 | Also see: | |
1086 | .IP "\(bu" 4 | |
1087 | The djgpp environment for \s-1DOS\s0, http://www.delorie.com/djgpp/ | |
1088 | and perldos. | |
1089 | .IP "\(bu" 4 | |
1090 | The \s-1EMX\s0 environment for \s-1DOS\s0, \s-1OS/2\s0, etc. emx@iaehv.nl, | |
1091 | http://www.leo.org/pub/comp/os/os2/leo/gnu/emx+gcc/index.html or | |
1092 | ftp://hobbes.nmsu.edu/pub/os2/dev/emx/ Also perlos2. | |
1093 | .IP "\(bu" 4 | |
1094 | Build instructions for Win32 in perlwin32, or under the Cygnus environment | |
1095 | in perlcygwin. | |
1096 | .IP "\(bu" 4 | |
1097 | The \f(CW\*(C`Win32::*\*(C'\fR modules in Win32. | |
1098 | .IP "\(bu" 4 | |
1099 | The ActiveState Pages, http://www.activestate.com/ | |
1100 | .IP "\(bu" 4 | |
1101 | The Cygwin environment for Win32; \fI\s-1README\s0.cygwin\fR (installed | |
1102 | as perlcygwin), http://www.cygwin.com/ | |
1103 | .IP "\(bu" 4 | |
1104 | The U/WIN environment for Win32, | |
1105 | http://www.research.att.com/sw/tools/uwin/ | |
1106 | .IP "\(bu" 4 | |
1107 | Build instructions for \s-1OS/2\s0, perlos2 | |
1108 | .Sh "Mac\ \s-1OS\s0" | |
1109 | .IX Subsection "MacOS" | |
1110 | Any module requiring \s-1XS\s0 compilation is right out for most people, because | |
1111 | MacPerl is built using non-free (and non\-cheap!) compilers. Some \s-1XS\s0 | |
1112 | modules that can work with MacPerl are built and distributed in binary | |
1113 | form on \s-1CPAN\s0. | |
1114 | .PP | |
1115 | Directories are specified as: | |
1116 | .PP | |
1117 | .Vb 6 | |
1118 | \& volume:folder:file for absolute pathnames | |
1119 | \& volume:folder: for absolute pathnames | |
1120 | \& :folder:file for relative pathnames | |
1121 | \& :folder: for relative pathnames | |
1122 | \& :file for relative pathnames | |
1123 | \& file for relative pathnames | |
1124 | .Ve | |
1125 | .PP | |
1126 | Files are stored in the directory in alphabetical order. Filenames are | |
1127 | limited to 31 characters, and may include any character except for | |
1128 | null and \f(CW\*(C`:\*(C'\fR, which is reserved as the path separator. | |
1129 | .PP | |
1130 | Instead of \f(CW\*(C`flock\*(C'\fR, see \f(CW\*(C`FSpSetFLock\*(C'\fR and \f(CW\*(C`FSpRstFLock\*(C'\fR in the | |
1131 | Mac::Files module, or \f(CW\*(C`chmod(0444, ...)\*(C'\fR and \f(CW\*(C`chmod(0666, ...)\*(C'\fR. | |
1132 | .PP | |
1133 | In the MacPerl application, you can't run a program from the command line; | |
1134 | programs that expect \f(CW@ARGV\fR to be populated can be edited with something | |
1135 | like the following, which brings up a dialog box asking for the command | |
1136 | line arguments. | |
1137 | .PP | |
1138 | .Vb 3 | |
1139 | \& if (!@ARGV) { | |
1140 | \& @ARGV = split /\es+/, MacPerl::Ask('Arguments?'); | |
1141 | \& } | |
1142 | .Ve | |
1143 | .PP | |
1144 | A MacPerl script saved as a \*(L"droplet\*(R" will populate \f(CW@ARGV\fR with the full | |
1145 | pathnames of the files dropped onto the script. | |
1146 | .PP | |
1147 | Mac users can run programs under a type of command line interface | |
1148 | under \s-1MPW\s0 (Macintosh Programmer's Workshop, a free development | |
1149 | environment from Apple). MacPerl was first introduced as an \s-1MPW\s0 | |
1150 | tool, and \s-1MPW\s0 can be used like a shell: | |
1151 | .PP | |
1152 | .Vb 1 | |
1153 | \& perl myscript.plx some arguments | |
1154 | .Ve | |
1155 | .PP | |
1156 | ToolServer is another app from Apple that provides access to \s-1MPW\s0 tools | |
1157 | from \s-1MPW\s0 and the MacPerl app, which allows MacPerl programs to use | |
1158 | \&\f(CW\*(C`system\*(C'\fR, backticks, and piped \f(CW\*(C`open\*(C'\fR. | |
1159 | .PP | |
1160 | "Mac\ \s-1OS\s0" is the proper name for the operating system, but the value | |
1161 | in \f(CW$^O\fR is \*(L"MacOS\*(R". To determine architecture, version, or whether | |
1162 | the application or \s-1MPW\s0 tool version is running, check: | |
1163 | .PP | |
1164 | .Vb 5 | |
1165 | \& $is_app = $MacPerl::Version =~ /App/; | |
1166 | \& $is_tool = $MacPerl::Version =~ /MPW/; | |
1167 | \& ($version) = $MacPerl::Version =~ /^(\eS+)/; | |
1168 | \& $is_ppc = $MacPerl::Architecture eq 'MacPPC'; | |
1169 | \& $is_68k = $MacPerl::Architecture eq 'Mac68K'; | |
1170 | .Ve | |
1171 | .PP | |
1172 | Mac\ \s-1OS\s0\ X, based on NeXT's OpenStep \s-1OS\s0, runs MacPerl natively, under the | |
1173 | \&\*(L"Classic\*(R" environment. There is no \*(L"Carbon\*(R" version of MacPerl to run | |
1174 | under the primary Mac \s-1OS\s0 X environment. Mac\ \s-1OS\s0\ X and its Open Source | |
1175 | version, Darwin, both run Unix perl natively. | |
1176 | .PP | |
1177 | Also see: | |
1178 | .IP "\(bu" 4 | |
1179 | MacPerl Development, http://dev.macperl.org/ . | |
1180 | .IP "\(bu" 4 | |
1181 | The MacPerl Pages, http://www.macperl.com/ . | |
1182 | .IP "\(bu" 4 | |
1183 | The MacPerl mailing lists, http://lists.perl.org/ . | |
1184 | .IP "\(bu" 4 | |
1185 | \&\s-1MPW\s0, ftp://ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/ | |
1186 | .Sh "\s-1VMS\s0" | |
1187 | .IX Subsection "VMS" | |
1188 | Perl on \s-1VMS\s0 is discussed in perlvms in the perl distribution. | |
1189 | Perl on \s-1VMS\s0 can accept either \s-1VMS\-\s0 or Unix-style file | |
1190 | specifications as in either of the following: | |
1191 | .PP | |
1192 | .Vb 2 | |
1193 | \& $ perl -ne "print if /perl_setup/i" SYS$LOGIN:LOGIN.COM | |
1194 | \& $ perl -ne "print if /perl_setup/i" /sys$login/login.com | |
1195 | .Ve | |
1196 | .PP | |
1197 | but not a mixture of both as in: | |
1198 | .PP | |
1199 | .Vb 2 | |
1200 | \& $ perl -ne "print if /perl_setup/i" sys$login:/login.com | |
1201 | \& Can't open sys$login:/login.com: file specification syntax error | |
1202 | .Ve | |
1203 | .PP | |
1204 | Interacting with Perl from the Digital Command Language (\s-1DCL\s0) shell | |
1205 | often requires a different set of quotation marks than Unix shells do. | |
1206 | For example: | |
1207 | .PP | |
1208 | .Vb 2 | |
1209 | \& $ perl -e "print ""Hello, world.\en""" | |
1210 | \& Hello, world. | |
1211 | .Ve | |
1212 | .PP | |
1213 | There are several ways to wrap your perl scripts in \s-1DCL\s0 \fI.COM\fR files, if | |
1214 | you are so inclined. For example: | |
1215 | .PP | |
1216 | .Vb 6 | |
1217 | \& $ write sys$output "Hello from DCL!" | |
1218 | \& $ if p1 .eqs. "" | |
1219 | \& $ then perl -x 'f$environment("PROCEDURE") | |
1220 | \& $ else perl -x - 'p1 'p2 'p3 'p4 'p5 'p6 'p7 'p8 | |
1221 | \& $ deck/dollars="__END__" | |
1222 | \& #!/usr/bin/perl | |
1223 | .Ve | |
1224 | .PP | |
1225 | .Vb 1 | |
1226 | \& print "Hello from Perl!\en"; | |
1227 | .Ve | |
1228 | .PP | |
1229 | .Vb 2 | |
1230 | \& __END__ | |
1231 | \& $ endif | |
1232 | .Ve | |
1233 | .PP | |
1234 | Do take care with \f(CW\*(C`$ ASSIGN/nolog/user SYS$COMMAND: SYS$INPUT\*(C'\fR if your | |
1235 | perl-in-DCL script expects to do things like \f(CW\*(C`$read = <STDIN>;\*(C'\fR. | |
1236 | .PP | |
1237 | Filenames are in the format \*(L"name.extension;version\*(R". The maximum | |
1238 | length for filenames is 39 characters, and the maximum length for | |
1239 | extensions is also 39 characters. Version is a number from 1 to | |
1240 | 32767. Valid characters are \f(CW\*(C`/[A\-Z0\-9$_\-]/\*(C'\fR. | |
1241 | .PP | |
1242 | \&\s-1VMS\s0's \s-1RMS\s0 filesystem is case-insensitive and does not preserve case. | |
1243 | \&\f(CW\*(C`readdir\*(C'\fR returns lowercased filenames, but specifying a file for | |
1244 | opening remains case\-insensitive. Files without extensions have a | |
1245 | trailing period on them, so doing a \f(CW\*(C`readdir\*(C'\fR with a file named \fIA.;5\fR | |
1246 | will return \fIa.\fR (though that file could be opened with | |
1247 | \&\f(CW\*(C`open(FH, 'A')\*(C'\fR). | |
1248 | .PP | |
1249 | \&\s-1RMS\s0 had an eight level limit on directory depths from any rooted logical | |
1250 | (allowing 16 levels overall) prior to \s-1VMS\s0 7.2. Hence | |
1251 | \&\f(CW\*(C`PERL_ROOT:[LIB.2.3.4.5.6.7.8]\*(C'\fR is a valid directory specification but | |
1252 | \&\f(CW\*(C`PERL_ROOT:[LIB.2.3.4.5.6.7.8.9]\*(C'\fR is not. \fIMakefile.PL\fR authors might | |
1253 | have to take this into account, but at least they can refer to the former | |
1254 | as \f(CW\*(C`/PERL_ROOT/lib/2/3/4/5/6/7/8/\*(C'\fR. | |
1255 | .PP | |
1256 | The VMS::Filespec module, which gets installed as part of the build | |
1257 | process on \s-1VMS\s0, is a pure Perl module that can easily be installed on | |
1258 | non-VMS platforms and can be helpful for conversions to and from \s-1RMS\s0 | |
1259 | native formats. | |
1260 | .PP | |
1261 | What \f(CW\*(C`\en\*(C'\fR represents depends on the type of file opened. It usually | |
1262 | represents \f(CW\*(C`\e012\*(C'\fR but it could also be \f(CW\*(C`\e015\*(C'\fR, \f(CW\*(C`\e012\*(C'\fR, \f(CW\*(C`\e015\e012\*(C'\fR, | |
1263 | \&\f(CW\*(C`\e000\*(C'\fR, \f(CW\*(C`\e040\*(C'\fR, or nothing depending on the file organization and | |
1264 | record format. The VMS::Stdio module provides access to the | |
1265 | special \fIfopen()\fR requirements of files with unusual attributes on \s-1VMS\s0. | |
1266 | .PP | |
1267 | \&\s-1TCP/IP\s0 stacks are optional on \s-1VMS\s0, so socket routines might not be | |
1268 | implemented. \s-1UDP\s0 sockets may not be supported. | |
1269 | .PP | |
1270 | The value of \f(CW$^O\fR on OpenVMS is \*(L"\s-1VMS\s0\*(R". To determine the architecture | |
1271 | that you are running on without resorting to loading all of \f(CW%Config\fR | |
1272 | you can examine the content of the \f(CW@INC\fR array like so: | |
1273 | .PP | |
1274 | .Vb 2 | |
1275 | \& if (grep(/VMS_AXP/, @INC)) { | |
1276 | \& print "I'm on Alpha!\en"; | |
1277 | .Ve | |
1278 | .PP | |
1279 | .Vb 2 | |
1280 | \& } elsif (grep(/VMS_VAX/, @INC)) { | |
1281 | \& print "I'm on VAX!\en"; | |
1282 | .Ve | |
1283 | .PP | |
1284 | .Vb 3 | |
1285 | \& } else { | |
1286 | \& print "I'm not so sure about where $^O is...\en"; | |
1287 | \& } | |
1288 | .Ve | |
1289 | .PP | |
1290 | On \s-1VMS\s0, perl determines the \s-1UTC\s0 offset from the \f(CW\*(C`SYS$TIMEZONE_DIFFERENTIAL\*(C'\fR | |
1291 | logical name. Although the \s-1VMS\s0 epoch began at 17\-NOV\-1858 00:00:00.00, | |
1292 | calls to \f(CW\*(C`localtime\*(C'\fR are adjusted to count offsets from | |
1293 | 01\-JAN\-1970 00:00:00.00, just like Unix. | |
1294 | .PP | |
1295 | Also see: | |
1296 | .IP "\(bu" 4 | |
1297 | \&\fI\s-1README\s0.vms\fR (installed as README_vms), perlvms | |
1298 | .IP "\(bu" 4 | |
1299 | vmsperl list, majordomo@perl.org | |
1300 | .Sp | |
1301 | (Put the words \f(CW\*(C`subscribe vmsperl\*(C'\fR in message body.) | |
1302 | .IP "\(bu" 4 | |
1303 | vmsperl on the web, http://www.sidhe.org/vmsperl/index.html | |
1304 | .Sh "\s-1VOS\s0" | |
1305 | .IX Subsection "VOS" | |
1306 | Perl on \s-1VOS\s0 is discussed in \fI\s-1README\s0.vos\fR in the perl distribution | |
1307 | (installed as perlvos). Perl on \s-1VOS\s0 can accept either \s-1VOS\-\s0 or | |
1308 | Unix-style file specifications as in either of the following: | |
1309 | .PP | |
1310 | .Vb 2 | |
1311 | \& C<< $ perl -ne "print if /perl_setup/i" >system>notices >> | |
1312 | \& C<< $ perl -ne "print if /perl_setup/i" /system/notices >> | |
1313 | .Ve | |
1314 | .PP | |
1315 | or even a mixture of both as in: | |
1316 | .PP | |
1317 | .Vb 1 | |
1318 | \& C<< $ perl -ne "print if /perl_setup/i" >system/notices >> | |
1319 | .Ve | |
1320 | .PP | |
1321 | Even though \s-1VOS\s0 allows the slash character to appear in object | |
1322 | names, because the \s-1VOS\s0 port of Perl interprets it as a pathname | |
1323 | delimiting character, \s-1VOS\s0 files, directories, or links whose names | |
1324 | contain a slash character cannot be processed. Such files must be | |
1325 | renamed before they can be processed by Perl. Note that \s-1VOS\s0 limits | |
1326 | file names to 32 or fewer characters. | |
1327 | .PP | |
1328 | Perl on \s-1VOS\s0 can be built using two different compilers and two different | |
1329 | versions of the \s-1POSIX\s0 runtime. The recommended method for building full | |
1330 | Perl is with the \s-1GNU\s0 C compiler and the generally-available version of | |
1331 | \&\s-1VOS\s0 \s-1POSIX\s0 support. See \fI\s-1README\s0.vos\fR (installed as perlvos) for | |
1332 | restrictions that apply when Perl is built using the \s-1VOS\s0 Standard C | |
1333 | compiler or the alpha version of \s-1VOS\s0 \s-1POSIX\s0 support. | |
1334 | .PP | |
1335 | The value of \f(CW$^O\fR on \s-1VOS\s0 is \*(L"\s-1VOS\s0\*(R". To determine the architecture that | |
1336 | you are running on without resorting to loading all of \f(CW%Config\fR you | |
1337 | can examine the content of the \f(CW@INC\fR array like so: | |
1338 | .PP | |
1339 | .Vb 6 | |
1340 | \& if ($^O =~ /VOS/) { | |
1341 | \& print "I'm on a Stratus box!\en"; | |
1342 | \& } else { | |
1343 | \& print "I'm not on a Stratus box!\en"; | |
1344 | \& die; | |
1345 | \& } | |
1346 | .Ve | |
1347 | .PP | |
1348 | .Vb 2 | |
1349 | \& if (grep(/860/, @INC)) { | |
1350 | \& print "This box is a Stratus XA/R!\en"; | |
1351 | .Ve | |
1352 | .PP | |
1353 | .Vb 2 | |
1354 | \& } elsif (grep(/7100/, @INC)) { | |
1355 | \& print "This box is a Stratus HP 7100 or 8xxx!\en"; | |
1356 | .Ve | |
1357 | .PP | |
1358 | .Vb 2 | |
1359 | \& } elsif (grep(/8000/, @INC)) { | |
1360 | \& print "This box is a Stratus HP 8xxx!\en"; | |
1361 | .Ve | |
1362 | .PP | |
1363 | .Vb 3 | |
1364 | \& } else { | |
1365 | \& print "This box is a Stratus 68K!\en"; | |
1366 | \& } | |
1367 | .Ve | |
1368 | .PP | |
1369 | Also see: | |
1370 | .IP "\(bu" 4 | |
1371 | \&\fI\s-1README\s0.vos\fR (installed as perlvos) | |
1372 | .IP "\(bu" 4 | |
1373 | The \s-1VOS\s0 mailing list. | |
1374 | .Sp | |
1375 | There is no specific mailing list for Perl on \s-1VOS\s0. You can post | |
1376 | comments to the comp.sys.stratus newsgroup, or subscribe to the general | |
1377 | Stratus mailing list. Send a letter with \*(L"subscribe Info\-Stratus\*(R" in | |
1378 | the message body to majordomo@list.stratagy.com. | |
1379 | .IP "\(bu" 4 | |
1380 | \&\s-1VOS\s0 Perl on the web at http://ftp.stratus.com/pub/vos/posix/posix.html | |
1381 | .Sh "\s-1EBCDIC\s0 Platforms" | |
1382 | .IX Subsection "EBCDIC Platforms" | |
1383 | Recent versions of Perl have been ported to platforms such as \s-1OS/400\s0 on | |
1384 | \&\s-1AS/400\s0 minicomputers as well as \s-1OS/390\s0, \s-1VM/ESA\s0, and \s-1BS2000\s0 for S/390 | |
1385 | Mainframes. Such computers use \s-1EBCDIC\s0 character sets internally (usually | |
1386 | Character Code Set \s-1ID\s0 0037 for \s-1OS/400\s0 and either 1047 or POSIX-BC for S/390 | |
1387 | systems). On the mainframe perl currently works under the \*(L"Unix system | |
1388 | services for \s-1OS/390\s0\*(R" (formerly known as OpenEdition), \s-1VM/ESA\s0 OpenEdition, or | |
1389 | the \s-1BS200\s0 POSIX-BC system (\s-1BS2000\s0 is supported in perl 5.6 and greater). | |
1390 | See perlos390 for details. Note that for \s-1OS/400\s0 there is also a port of | |
1391 | Perl 5.8.1/5.9.0 or later to the \s-1PASE\s0 which is ASCII-based (as opposed to | |
1392 | \&\s-1ILE\s0 which is EBCDIC\-based), see perlos400. | |
1393 | .PP | |
1394 | As of R2.5 of \s-1USS\s0 for \s-1OS/390\s0 and Version 2.3 of \s-1VM/ESA\s0 these Unix | |
1395 | sub-systems do not support the \f(CW\*(C`#!\*(C'\fR shebang trick for script invocation. | |
1396 | Hence, on \s-1OS/390\s0 and \s-1VM/ESA\s0 perl scripts can be executed with a header | |
1397 | similar to the following simple script: | |
1398 | .PP | |
1399 | .Vb 4 | |
1400 | \& : # use perl | |
1401 | \& eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' | |
1402 | \& if 0; | |
1403 | \& #!/usr/local/bin/perl # just a comment really | |
1404 | .Ve | |
1405 | .PP | |
1406 | .Vb 1 | |
1407 | \& print "Hello from perl!\en"; | |
1408 | .Ve | |
1409 | .PP | |
1410 | \&\s-1OS/390\s0 will support the \f(CW\*(C`#!\*(C'\fR shebang trick in release 2.8 and beyond. | |
1411 | Calls to \f(CW\*(C`system\*(C'\fR and backticks can use \s-1POSIX\s0 shell syntax on all | |
1412 | S/390 systems. | |
1413 | .PP | |
1414 | On the \s-1AS/400\s0, if \s-1PERL5\s0 is in your library list, you may need | |
1415 | to wrap your perl scripts in a \s-1CL\s0 procedure to invoke them like so: | |
1416 | .PP | |
1417 | .Vb 3 | |
1418 | \& BEGIN | |
1419 | \& CALL PGM(PERL5/PERL) PARM('/QOpenSys/hello.pl') | |
1420 | \& ENDPGM | |
1421 | .Ve | |
1422 | .PP | |
1423 | This will invoke the perl script \fIhello.pl\fR in the root of the | |
1424 | QOpenSys file system. On the \s-1AS/400\s0 calls to \f(CW\*(C`system\*(C'\fR or backticks | |
1425 | must use \s-1CL\s0 syntax. | |
1426 | .PP | |
1427 | On these platforms, bear in mind that the \s-1EBCDIC\s0 character set may have | |
1428 | an effect on what happens with some perl functions (such as \f(CW\*(C`chr\*(C'\fR, | |
1429 | \&\f(CW\*(C`pack\*(C'\fR, \f(CW\*(C`print\*(C'\fR, \f(CW\*(C`printf\*(C'\fR, \f(CW\*(C`ord\*(C'\fR, \f(CW\*(C`sort\*(C'\fR, \f(CW\*(C`sprintf\*(C'\fR, \f(CW\*(C`unpack\*(C'\fR), as | |
1430 | well as bit-fiddling with \s-1ASCII\s0 constants using operators like \f(CW\*(C`^\*(C'\fR, \f(CW\*(C`&\*(C'\fR | |
1431 | and \f(CW\*(C`|\*(C'\fR, not to mention dealing with socket interfaces to \s-1ASCII\s0 computers | |
1432 | (see \*(L"Newlines\*(R"). | |
1433 | .PP | |
1434 | Fortunately, most web servers for the mainframe will correctly | |
1435 | translate the \f(CW\*(C`\en\*(C'\fR in the following statement to its \s-1ASCII\s0 equivalent | |
1436 | (\f(CW\*(C`\er\*(C'\fR is the same under both Unix and \s-1OS/390\s0 & \s-1VM/ESA\s0): | |
1437 | .PP | |
1438 | .Vb 1 | |
1439 | \& print "Content-type: text/html\er\en\er\en"; | |
1440 | .Ve | |
1441 | .PP | |
1442 | The values of \f(CW$^O\fR on some of these platforms includes: | |
1443 | .PP | |
1444 | .Vb 6 | |
1445 | \& uname $^O $Config{'archname'} | |
1446 | \& -------------------------------------------- | |
1447 | \& OS/390 os390 os390 | |
1448 | \& OS400 os400 os400 | |
1449 | \& POSIX-BC posix-bc BS2000-posix-bc | |
1450 | \& VM/ESA vmesa vmesa | |
1451 | .Ve | |
1452 | .PP | |
1453 | Some simple tricks for determining if you are running on an \s-1EBCDIC\s0 | |
1454 | platform could include any of the following (perhaps all): | |
1455 | .PP | |
1456 | .Vb 1 | |
1457 | \& if ("\et" eq "\e05") { print "EBCDIC may be spoken here!\en"; } | |
1458 | .Ve | |
1459 | .PP | |
1460 | .Vb 1 | |
1461 | \& if (ord('A') == 193) { print "EBCDIC may be spoken here!\en"; } | |
1462 | .Ve | |
1463 | .PP | |
1464 | .Vb 1 | |
1465 | \& if (chr(169) eq 'z') { print "EBCDIC may be spoken here!\en"; } | |
1466 | .Ve | |
1467 | .PP | |
1468 | One thing you may not want to rely on is the \s-1EBCDIC\s0 encoding | |
1469 | of punctuation characters since these may differ from code page to code | |
1470 | page (and once your module or script is rumoured to work with \s-1EBCDIC\s0, | |
1471 | folks will want it to work with all \s-1EBCDIC\s0 character sets). | |
1472 | .PP | |
1473 | Also see: | |
1474 | .IP "\(bu" 4 | |
1475 | perlos390, \fI\s-1README\s0.os390\fR, \fIperlbs2000\fR, \fI\s-1README\s0.vmesa\fR, | |
1476 | perlebcdic. | |
1477 | .IP "\(bu" 4 | |
1478 | The perl\-mvs@perl.org list is for discussion of porting issues as well as | |
1479 | general usage issues for all \s-1EBCDIC\s0 Perls. Send a message body of | |
1480 | \&\*(L"subscribe perl\-mvs\*(R" to majordomo@perl.org. | |
1481 | .IP "\(bu" 4 | |
1482 | \&\s-1AS/400\s0 Perl information at | |
1483 | http://as400.rochester.ibm.com/ | |
1484 | as well as on \s-1CPAN\s0 in the \fIports/\fR directory. | |
1485 | .Sh "Acorn \s-1RISC\s0 \s-1OS\s0" | |
1486 | .IX Subsection "Acorn RISC OS" | |
1487 | Because Acorns use \s-1ASCII\s0 with newlines (\f(CW\*(C`\en\*(C'\fR) in text files as \f(CW\*(C`\e012\*(C'\fR like | |
1488 | Unix, and because Unix filename emulation is turned on by default, | |
1489 | most simple scripts will probably work \*(L"out of the box\*(R". The native | |
1490 | filesystem is modular, and individual filesystems are free to be | |
1491 | case-sensitive or insensitive, and are usually case\-preserving. Some | |
1492 | native filesystems have name length limits, which file and directory | |
1493 | names are silently truncated to fit. Scripts should be aware that the | |
1494 | standard filesystem currently has a name length limit of \fB10\fR | |
1495 | characters, with up to 77 items in a directory, but other filesystems | |
1496 | may not impose such limitations. | |
1497 | .PP | |
1498 | Native filenames are of the form | |
1499 | .PP | |
1500 | .Vb 1 | |
1501 | \& Filesystem#Special_Field::DiskName.$.Directory.Directory.File | |
1502 | .Ve | |
1503 | .PP | |
1504 | where | |
1505 | .PP | |
1506 | .Vb 8 | |
1507 | \& Special_Field is not usually present, but may contain . and $ . | |
1508 | \& Filesystem =~ m|[A-Za-z0-9_]| | |
1509 | \& DsicName =~ m|[A-Za-z0-9_/]| | |
1510 | \& $ represents the root directory | |
1511 | \& . is the path separator | |
1512 | \& @ is the current directory (per filesystem but machine global) | |
1513 | \& ^ is the parent directory | |
1514 | \& Directory and File =~ m|[^\e0- "\e.\e$\e%\e&:\e@\e\e^\e|\e177]+| | |
1515 | .Ve | |
1516 | .PP | |
1517 | The default filename translation is roughly \f(CW\*(C`tr|/.|./|;\*(C'\fR | |
1518 | .PP | |
1519 | Note that \f(CW\*(C`"ADFS::HardDisk.$.File" ne 'ADFS::HardDisk.$.File'\*(C'\fR and that | |
1520 | the second stage of \f(CW\*(C`$\*(C'\fR interpolation in regular expressions will fall | |
1521 | foul of the \f(CW$.\fR if scripts are not careful. | |
1522 | .PP | |
1523 | Logical paths specified by system variables containing comma-separated | |
1524 | search lists are also allowed; hence \f(CW\*(C`System:Modules\*(C'\fR is a valid | |
1525 | filename, and the filesystem will prefix \f(CW\*(C`Modules\*(C'\fR with each section of | |
1526 | \&\f(CW\*(C`System$Path\*(C'\fR until a name is made that points to an object on disk. | |
1527 | Writing to a new file \f(CW\*(C`System:Modules\*(C'\fR would be allowed only if | |
1528 | \&\f(CW\*(C`System$Path\*(C'\fR contains a single item list. The filesystem will also | |
1529 | expand system variables in filenames if enclosed in angle brackets, so | |
1530 | \&\f(CW\*(C`<System$Dir>.Modules\*(C'\fR would look for the file | |
1531 | \&\f(CW\*(C`$ENV{'System$Dir'}\ .\ 'Modules'\*(C'\fR. The obvious implication of this is | |
1532 | that \fBfully qualified filenames can start with \f(CB\*(C`<>\*(C'\fB\fR and should | |
1533 | be protected when \f(CW\*(C`open\*(C'\fR is used for input. | |
1534 | .PP | |
1535 | Because \f(CW\*(C`.\*(C'\fR was in use as a directory separator and filenames could not | |
1536 | be assumed to be unique after 10 characters, Acorn implemented the C | |
1537 | compiler to strip the trailing \f(CW\*(C`.c\*(C'\fR \f(CW\*(C`.h\*(C'\fR \f(CW\*(C`.s\*(C'\fR and \f(CW\*(C`.o\*(C'\fR suffix from | |
1538 | filenames specified in source code and store the respective files in | |
1539 | subdirectories named after the suffix. Hence files are translated: | |
1540 | .PP | |
1541 | .Vb 6 | |
1542 | \& foo.h h.foo | |
1543 | \& C:foo.h C:h.foo (logical path variable) | |
1544 | \& sys/os.h sys.h.os (C compiler groks Unix-speak) | |
1545 | \& 10charname.c c.10charname | |
1546 | \& 10charname.o o.10charname | |
1547 | \& 11charname_.c c.11charname (assuming filesystem truncates at 10) | |
1548 | .Ve | |
1549 | .PP | |
1550 | The Unix emulation library's translation of filenames to native assumes | |
1551 | that this sort of translation is required, and it allows a user-defined list | |
1552 | of known suffixes that it will transpose in this fashion. This may | |
1553 | seem transparent, but consider that with these rules \f(CW\*(C`foo/bar/baz.h\*(C'\fR | |
1554 | and \f(CW\*(C`foo/bar/h/baz\*(C'\fR both map to \f(CW\*(C`foo.bar.h.baz\*(C'\fR, and that \f(CW\*(C`readdir\*(C'\fR and | |
1555 | \&\f(CW\*(C`glob\*(C'\fR cannot and do not attempt to emulate the reverse mapping. Other | |
1556 | \&\f(CW\*(C`.\*(C'\fR's in filenames are translated to \f(CW\*(C`/\*(C'\fR. | |
1557 | .PP | |
1558 | As implied above, the environment accessed through \f(CW%ENV\fR is global, and | |
1559 | the convention is that program specific environment variables are of the | |
1560 | form \f(CW\*(C`Program$Name\*(C'\fR. Each filesystem maintains a current directory, | |
1561 | and the current filesystem's current directory is the \fBglobal\fR current | |
1562 | directory. Consequently, sociable programs don't change the current | |
1563 | directory but rely on full pathnames, and programs (and Makefiles) cannot | |
1564 | assume that they can spawn a child process which can change the current | |
1565 | directory without affecting its parent (and everyone else for that | |
1566 | matter). | |
1567 | .PP | |
1568 | Because native operating system filehandles are global and are currently | |
1569 | allocated down from 255, with 0 being a reserved value, the Unix emulation | |
1570 | library emulates Unix filehandles. Consequently, you can't rely on | |
1571 | passing \f(CW\*(C`STDIN\*(C'\fR, \f(CW\*(C`STDOUT\*(C'\fR, or \f(CW\*(C`STDERR\*(C'\fR to your children. | |
1572 | .PP | |
1573 | The desire of users to express filenames of the form | |
1574 | \&\f(CW\*(C`<Foo$Dir>.Bar\*(C'\fR on the command line unquoted causes problems, | |
1575 | too: \f(CW``\fR command output capture has to perform a guessing game. It | |
1576 | assumes that a string \f(CW\*(C`<[^<>]+\e$[^<>]>\*(C'\fR is a | |
1577 | reference to an environment variable, whereas anything else involving | |
1578 | \&\f(CW\*(C`<\*(C'\fR or \f(CW\*(C`>\*(C'\fR is redirection, and generally manages to be 99% | |
1579 | right. Of course, the problem remains that scripts cannot rely on any | |
1580 | Unix tools being available, or that any tools found have Unix-like command | |
1581 | line arguments. | |
1582 | .PP | |
1583 | Extensions and \s-1XS\s0 are, in theory, buildable by anyone using free | |
1584 | tools. In practice, many don't, as users of the Acorn platform are | |
1585 | used to binary distributions. MakeMaker does run, but no available | |
1586 | make currently copes with MakeMaker's makefiles; even if and when | |
1587 | this should be fixed, the lack of a Unix-like shell will cause | |
1588 | problems with makefile rules, especially lines of the form \f(CW\*(C`cd | |
1589 | sdbm && make all\*(C'\fR, and anything using quoting. | |
1590 | .PP | |
1591 | "\s-1RISC\s0\ \s-1OS\s0" is the proper name for the operating system, but the value | |
1592 | in \f(CW$^O\fR is \*(L"riscos\*(R" (because we don't like shouting). | |
1593 | .Sh "Other perls" | |
1594 | .IX Subsection "Other perls" | |
1595 | Perl has been ported to many platforms that do not fit into any of | |
1596 | the categories listed above. Some, such as AmigaOS, Atari MiNT, | |
1597 | BeOS, \s-1HP\s0 MPE/iX, \s-1QNX\s0, Plan 9, and \s-1VOS\s0, have been well-integrated | |
1598 | into the standard Perl source code kit. You may need to see the | |
1599 | \&\fIports/\fR directory on \s-1CPAN\s0 for information, and possibly binaries, | |
1600 | for the likes of: aos, Atari \s-1ST\s0, lynxos, riscos, Novell Netware, | |
1601 | Tandem Guardian, \fIetc.\fR (Yes, we know that some of these OSes may | |
1602 | fall under the Unix category, but we are not a standards body.) | |
1603 | .PP | |
1604 | Some approximate operating system names and their \f(CW$^O\fR values | |
1605 | in the \*(L"\s-1OTHER\s0\*(R" category include: | |
1606 | .PP | |
1607 | .Vb 5 | |
1608 | \& OS $^O $Config{'archname'} | |
1609 | \& ------------------------------------------ | |
1610 | \& Amiga DOS amigaos m68k-amigos | |
1611 | \& BeOS beos | |
1612 | \& MPE/iX mpeix PA-RISC1.1 | |
1613 | .Ve | |
1614 | .PP | |
1615 | See also: | |
1616 | .IP "\(bu" 4 | |
1617 | Amiga, \fI\s-1README\s0.amiga\fR (installed as perlamiga). | |
1618 | .IP "\(bu" 4 | |
1619 | Atari, \fI\s-1README\s0.mint\fR and Guido Flohr's web page | |
1620 | http://stud.uni\-sb.de/~gufl0000/ | |
1621 | .IP "\(bu" 4 | |
1622 | Be \s-1OS\s0, \fI\s-1README\s0.beos\fR | |
1623 | .IP "\(bu" 4 | |
1624 | \&\s-1HP\s0 300 MPE/iX, \fI\s-1README\s0.mpeix\fR and Mark Bixby's web page | |
1625 | http://www.bixby.org/mark/perlix.html | |
1626 | .IP "\(bu" 4 | |
1627 | A free perl5\-based \s-1PERL\s0.NLM for Novell Netware is available in | |
1628 | precompiled binary and source code form from http://www.novell.com/ | |
1629 | as well as from \s-1CPAN\s0. | |
1630 | .IP "\(bu" 4 | |
1631 | Plan\ 9, \fI\s-1README\s0.plan9\fR | |
1632 | .SH "FUNCTION IMPLEMENTATIONS" | |
1633 | .IX Header "FUNCTION IMPLEMENTATIONS" | |
1634 | Listed below are functions that are either completely unimplemented | |
1635 | or else have been implemented differently on various platforms. | |
1636 | Following each description will be, in parentheses, a list of | |
1637 | platforms that the description applies to. | |
1638 | .PP | |
1639 | The list may well be incomplete, or even wrong in some places. When | |
1640 | in doubt, consult the platform-specific \s-1README\s0 files in the Perl | |
1641 | source distribution, and any other documentation resources accompanying | |
1642 | a given port. | |
1643 | .PP | |
1644 | Be aware, moreover, that even among Unix-ish systems there are variations. | |
1645 | .PP | |
1646 | For many functions, you can also query \f(CW%Config\fR, exported by | |
1647 | default from the Config module. For example, to check whether the | |
1648 | platform has the \f(CW\*(C`lstat\*(C'\fR call, check \f(CW$Config{d_lstat}\fR. See | |
1649 | Config for a full description of available variables. | |
1650 | .Sh "Alphabetical Listing of Perl Functions" | |
1651 | .IX Subsection "Alphabetical Listing of Perl Functions" | |
1652 | .IP "\-X" 8 | |
1653 | .IX Item "-X" | |
1654 | \&\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, and \f(CW\*(C`\-x\*(C'\fR have a limited meaning only; directories | |
1655 | and applications are executable, and there are no uid/gid | |
1656 | considerations. \f(CW\*(C`\-o\*(C'\fR is not supported. (Mac\ \s-1OS\s0) | |
1657 | .Sp | |
1658 | \&\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, \f(CW\*(C`\-x\*(C'\fR, and \f(CW\*(C`\-o\*(C'\fR tell whether the file is accessible, | |
1659 | which may not reflect UIC-based file protections. (\s-1VMS\s0) | |
1660 | .Sp | |
1661 | \&\f(CW\*(C`\-s\*(C'\fR returns the size of the data fork, not the total size of data fork | |
1662 | plus resource fork. (Mac\ \s-1OS\s0). | |
1663 | .Sp | |
1664 | \&\f(CW\*(C`\-s\*(C'\fR by name on an open file will return the space reserved on disk, | |
1665 | rather than the current extent. \f(CW\*(C`\-s\*(C'\fR on an open filehandle returns the | |
1666 | current size. (\s-1RISC\s0\ \s-1OS\s0) | |
1667 | .Sp | |
1668 | \&\f(CW\*(C`\-R\*(C'\fR, \f(CW\*(C`\-W\*(C'\fR, \f(CW\*(C`\-X\*(C'\fR, \f(CW\*(C`\-O\*(C'\fR are indistinguishable from \f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-w\*(C'\fR, | |
1669 | \&\f(CW\*(C`\-x\*(C'\fR, \f(CW\*(C`\-o\*(C'\fR. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1670 | .Sp | |
1671 | \&\f(CW\*(C`\-b\*(C'\fR, \f(CW\*(C`\-c\*(C'\fR, \f(CW\*(C`\-k\*(C'\fR, \f(CW\*(C`\-g\*(C'\fR, \f(CW\*(C`\-p\*(C'\fR, \f(CW\*(C`\-u\*(C'\fR, \f(CW\*(C`\-A\*(C'\fR are not implemented. | |
1672 | (Mac\ \s-1OS\s0) | |
1673 | .Sp | |
1674 | \&\f(CW\*(C`\-g\*(C'\fR, \f(CW\*(C`\-k\*(C'\fR, \f(CW\*(C`\-l\*(C'\fR, \f(CW\*(C`\-p\*(C'\fR, \f(CW\*(C`\-u\*(C'\fR, \f(CW\*(C`\-A\*(C'\fR are not particularly meaningful. | |
1675 | (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1676 | .Sp | |
1677 | \&\f(CW\*(C`\-d\*(C'\fR is true if passed a device spec without an explicit directory. | |
1678 | (\s-1VMS\s0) | |
1679 | .Sp | |
1680 | \&\f(CW\*(C`\-T\*(C'\fR and \f(CW\*(C`\-B\*(C'\fR are implemented, but might misclassify Mac text files | |
1681 | with foreign characters; this is the case will all platforms, but may | |
1682 | affect Mac\ \s-1OS\s0 often. (Mac\ \s-1OS\s0) | |
1683 | .Sp | |
1684 | \&\f(CW\*(C`\-x\*(C'\fR (or \f(CW\*(C`\-X\*(C'\fR) determine if a file ends in one of the executable | |
1685 | suffixes. \f(CW\*(C`\-S\*(C'\fR is meaningless. (Win32) | |
1686 | .Sp | |
1687 | \&\f(CW\*(C`\-x\*(C'\fR (or \f(CW\*(C`\-X\*(C'\fR) determine if a file has an executable file type. | |
1688 | (\s-1RISC\s0\ \s-1OS\s0) | |
1689 | .IP "atan2 Y,X" 8 | |
1690 | .IX Item "atan2 Y,X" | |
1691 | Due to issues with various CPUs, math libraries, compilers, and standards, | |
1692 | results for \f(CW\*(C`atan2()\*(C'\fR may vary depending on any combination of the above. | |
1693 | Perl attempts to conform to the Open Group/IEEE standards for the results | |
1694 | returned from \f(CW\*(C`atan2()\*(C'\fR, but cannot force the issue if the system Perl is | |
1695 | run on does not allow it. (Tru64, HP-UX 10.20) | |
1696 | .Sp | |
1697 | The current version of the standards for \f(CW\*(C`atan2()\*(C'\fR is available at | |
1698 | <http://www.opengroup.org/onlinepubs/009695399/functions/atan2.html>. | |
1699 | .IP "atan2" 8 | |
1700 | .IX Item "atan2" | |
1701 | Due to issues with various CPUs, math libraries, compilers, and standards, | |
1702 | results for \f(CW\*(C`atan2()\*(C'\fR may vary depending on any combination of the above. | |
1703 | Perl attempts to conform to the Open Group/IEEE standards for the results | |
1704 | returned from \f(CW\*(C`atan2()\*(C'\fR, but cannot force the issue if the system Perl is | |
1705 | run on does not allow it. (Tru64, HP-UX 10.20) | |
1706 | .Sp | |
1707 | The current version of the standards for \f(CW\*(C`atan2()\*(C'\fR is available at | |
1708 | <http://www.opengroup.org/onlinepubs/009695399/functions/atan2.html>. | |
1709 | .IP "binmode" 8 | |
1710 | .IX Item "binmode" | |
1711 | Meaningless. (Mac\ \s-1OS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1712 | .Sp | |
1713 | Reopens file and restores pointer; if function fails, underlying | |
1714 | filehandle may be closed, or pointer may be in a different position. | |
1715 | (\s-1VMS\s0) | |
1716 | .Sp | |
1717 | The value returned by \f(CW\*(C`tell\*(C'\fR may be affected after the call, and | |
1718 | the filehandle may be flushed. (Win32) | |
1719 | .IP "chmod" 8 | |
1720 | .IX Item "chmod" | |
1721 | Only limited meaning. Disabling/enabling write permission is mapped to | |
1722 | locking/unlocking the file. (Mac\ \s-1OS\s0) | |
1723 | .Sp | |
1724 | Only good for changing \*(L"owner\*(R" read-write access, \*(L"group\*(R", and \*(L"other\*(R" | |
1725 | bits are meaningless. (Win32) | |
1726 | .Sp | |
1727 | Only good for changing \*(L"owner\*(R" and \*(L"other\*(R" read-write access. (\s-1RISC\s0\ \s-1OS\s0) | |
1728 | .Sp | |
1729 | Access permissions are mapped onto \s-1VOS\s0 access-control list changes. (\s-1VOS\s0) | |
1730 | .Sp | |
1731 | The actual permissions set depend on the value of the \f(CW\*(C`CYGWIN\*(C'\fR | |
1732 | in the \s-1SYSTEM\s0 environment settings. (Cygwin) | |
1733 | .IP "chown" 8 | |
1734 | .IX Item "chown" | |
1735 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
1736 | .Sp | |
1737 | Does nothing, but won't fail. (Win32) | |
1738 | .IP "chroot" 8 | |
1739 | .IX Item "chroot" | |
1740 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0) | |
1741 | .IP "crypt" 8 | |
1742 | .IX Item "crypt" | |
1743 | May not be available if library or source was not provided when building | |
1744 | perl. (Win32) | |
1745 | .Sp | |
1746 | Not implemented. (\s-1VOS\s0) | |
1747 | .IP "dbmclose" 8 | |
1748 | .IX Item "dbmclose" | |
1749 | Not implemented. (\s-1VMS\s0, Plan\ 9, \s-1VOS\s0) | |
1750 | .IP "dbmopen" 8 | |
1751 | .IX Item "dbmopen" | |
1752 | Not implemented. (\s-1VMS\s0, Plan\ 9, \s-1VOS\s0) | |
1753 | .IP "dump" 8 | |
1754 | .IX Item "dump" | |
1755 | Not useful. (Mac\ \s-1OS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1756 | .Sp | |
1757 | Not implemented. (Win32) | |
1758 | .Sp | |
1759 | Invokes \s-1VMS\s0 debugger. (\s-1VMS\s0) | |
1760 | .IP "exec" 8 | |
1761 | .IX Item "exec" | |
1762 | Not implemented. (Mac\ \s-1OS\s0) | |
1763 | .Sp | |
1764 | Implemented via Spawn. (\s-1VM/ESA\s0) | |
1765 | .Sp | |
1766 | Does not automatically flush output handles on some platforms. | |
1767 | (SunOS, Solaris, \s-1HP\-UX\s0) | |
1768 | .IP "exit" 8 | |
1769 | .IX Item "exit" | |
1770 | Emulates \s-1UNIX\s0 \fIexit()\fR (which considers \f(CW\*(C`exit 1\*(C'\fR to indicate an error) by | |
1771 | mapping the \f(CW1\fR to \s-1SS$_ABORT\s0 (\f(CW44\fR). This behavior may be overridden | |
1772 | with the pragma \f(CW\*(C`use vmsish 'exit'\*(C'\fR. As with the \s-1CRTL\s0's \fIexit()\fR | |
1773 | function, \f(CW\*(C`exit 0\*(C'\fR is also mapped to an exit status of \s-1SS$_NORMAL\s0 | |
1774 | (\f(CW1\fR); this mapping cannot be overridden. Any other argument to \fIexit()\fR | |
1775 | is used directly as Perl's exit status. (\s-1VMS\s0) | |
1776 | .IP "fcntl" 8 | |
1777 | .IX Item "fcntl" | |
1778 | Not implemented. (Win32, \s-1VMS\s0) | |
1779 | .IP "flock" 8 | |
1780 | .IX Item "flock" | |
1781 | Not implemented (Mac\ \s-1OS\s0, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0). | |
1782 | .Sp | |
1783 | Available only on Windows \s-1NT\s0 (not on Windows 95). (Win32) | |
1784 | .IP "fork" 8 | |
1785 | .IX Item "fork" | |
1786 | Not implemented. (Mac\ \s-1OS\s0, AmigaOS, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0, \s-1VMS\s0) | |
1787 | .Sp | |
1788 | Emulated using multiple interpreters. See perlfork. (Win32) | |
1789 | .Sp | |
1790 | Does not automatically flush output handles on some platforms. | |
1791 | (SunOS, Solaris, \s-1HP\-UX\s0) | |
1792 | .IP "getlogin" 8 | |
1793 | .IX Item "getlogin" | |
1794 | Not implemented. (Mac\ \s-1OS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1795 | .IP "getpgrp" 8 | |
1796 | .IX Item "getpgrp" | |
1797 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
1798 | .IP "getppid" 8 | |
1799 | .IX Item "getppid" | |
1800 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1RISC\s0\ \s-1OS\s0) | |
1801 | .IP "getpriority" 8 | |
1802 | .IX Item "getpriority" | |
1803 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0) | |
1804 | .IP "getpwnam" 8 | |
1805 | .IX Item "getpwnam" | |
1806 | Not implemented. (Mac\ \s-1OS\s0, Win32) | |
1807 | .Sp | |
1808 | Not useful. (\s-1RISC\s0\ \s-1OS\s0) | |
1809 | .IP "getgrnam" 8 | |
1810 | .IX Item "getgrnam" | |
1811 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1812 | .IP "getnetbyname" 8 | |
1813 | .IX Item "getnetbyname" | |
1814 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9) | |
1815 | .IP "getpwuid" 8 | |
1816 | .IX Item "getpwuid" | |
1817 | Not implemented. (Mac\ \s-1OS\s0, Win32) | |
1818 | .Sp | |
1819 | Not useful. (\s-1RISC\s0\ \s-1OS\s0) | |
1820 | .IP "getgrgid" 8 | |
1821 | .IX Item "getgrgid" | |
1822 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1823 | .IP "getnetbyaddr" 8 | |
1824 | .IX Item "getnetbyaddr" | |
1825 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9) | |
1826 | .IP "getprotobynumber" 8 | |
1827 | .IX Item "getprotobynumber" | |
1828 | Not implemented. (Mac\ \s-1OS\s0) | |
1829 | .IP "getservbyport" 8 | |
1830 | .IX Item "getservbyport" | |
1831 | Not implemented. (Mac\ \s-1OS\s0) | |
1832 | .IP "getpwent" 8 | |
1833 | .IX Item "getpwent" | |
1834 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VM/ESA\s0) | |
1835 | .IP "getgrent" 8 | |
1836 | .IX Item "getgrent" | |
1837 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1VM/ESA\s0) | |
1838 | .IP "gethostbyname" 8 | |
1839 | .IX Item "gethostbyname" | |
1840 | \&\f(CW\*(C`gethostbyname('localhost')\*(C'\fR does not work everywhere: you may have | |
1841 | to use \f(CW\*(C`gethostbyname('127.0.0.1')\*(C'\fR. (Mac\ \s-1OS\s0, Irix\ 5) | |
1842 | .IP "gethostent" 8 | |
1843 | .IX Item "gethostent" | |
1844 | Not implemented. (Mac\ \s-1OS\s0, Win32) | |
1845 | .IP "getnetent" 8 | |
1846 | .IX Item "getnetent" | |
1847 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9) | |
1848 | .IP "getprotoent" 8 | |
1849 | .IX Item "getprotoent" | |
1850 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9) | |
1851 | .IP "getservent" 8 | |
1852 | .IX Item "getservent" | |
1853 | Not implemented. (Win32, Plan\ 9) | |
1854 | .IP "sethostent" 8 | |
1855 | .IX Item "sethostent" | |
1856 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0) | |
1857 | .IP "setnetent" 8 | |
1858 | .IX Item "setnetent" | |
1859 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0) | |
1860 | .IP "setprotoent" 8 | |
1861 | .IX Item "setprotoent" | |
1862 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0) | |
1863 | .IP "setservent" 8 | |
1864 | .IX Item "setservent" | |
1865 | Not implemented. (Plan\ 9, Win32, \s-1RISC\s0\ \s-1OS\s0) | |
1866 | .IP "endpwent" 8 | |
1867 | .IX Item "endpwent" | |
1868 | Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1VM/ESA\s0, Win32) | |
1869 | .IP "endgrent" 8 | |
1870 | .IX Item "endgrent" | |
1871 | Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1RISC\s0\ \s-1OS\s0, \s-1VM/ESA\s0, \s-1VMS\s0, Win32) | |
1872 | .IP "endhostent" 8 | |
1873 | .IX Item "endhostent" | |
1874 | Not implemented. (Mac\ \s-1OS\s0, Win32) | |
1875 | .IP "endnetent" 8 | |
1876 | .IX Item "endnetent" | |
1877 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9) | |
1878 | .IP "endprotoent" 8 | |
1879 | .IX Item "endprotoent" | |
1880 | Not implemented. (Mac\ \s-1OS\s0, Win32, Plan\ 9) | |
1881 | .IP "endservent" 8 | |
1882 | .IX Item "endservent" | |
1883 | Not implemented. (Plan\ 9, Win32) | |
1884 | .IP "getsockopt \s-1SOCKET\s0,LEVEL,OPTNAME" 8 | |
1885 | .IX Item "getsockopt SOCKET,LEVEL,OPTNAME" | |
1886 | Not implemented. (Plan\ 9) | |
1887 | .IP "glob" 8 | |
1888 | .IX Item "glob" | |
1889 | This operator is implemented via the File::Glob extension on most | |
1890 | platforms. See File::Glob for portability information. | |
1891 | .IP "gmtime" 8 | |
1892 | .IX Item "gmtime" | |
1893 | Same portability caveats as localtime. | |
1894 | .IP "ioctl \s-1FILEHANDLE\s0,FUNCTION,SCALAR" 8 | |
1895 | .IX Item "ioctl FILEHANDLE,FUNCTION,SCALAR" | |
1896 | Not implemented. (\s-1VMS\s0) | |
1897 | .Sp | |
1898 | Available only for socket handles, and it does what the \fIioctlsocket()\fR call | |
1899 | in the Winsock \s-1API\s0 does. (Win32) | |
1900 | .Sp | |
1901 | Available only for socket handles. (\s-1RISC\s0\ \s-1OS\s0) | |
1902 | .IP "kill" 8 | |
1903 | .IX Item "kill" | |
1904 | \&\f(CW\*(C`kill(0, LIST)\*(C'\fR is implemented for the sake of taint checking; | |
1905 | use with other signals is unimplemented. (Mac\ \s-1OS\s0) | |
1906 | .Sp | |
1907 | Not implemented, hence not useful for taint checking. (\s-1RISC\s0\ \s-1OS\s0) | |
1908 | .Sp | |
1909 | \&\f(CW\*(C`kill()\*(C'\fR doesn't have the semantics of \f(CW\*(C`raise()\*(C'\fR, i.e. it doesn't send | |
1910 | a signal to the identified process like it does on Unix platforms. | |
1911 | Instead \f(CW\*(C`kill($sig, $pid)\*(C'\fR terminates the process identified by \f(CW$pid\fR, | |
1912 | and makes it exit immediately with exit status \f(CW$sig\fR. As in Unix, if | |
1913 | \&\f(CW$sig\fR is 0 and the specified process exists, it returns true without | |
1914 | actually terminating it. (Win32) | |
1915 | .IP "link" 8 | |
1916 | .IX Item "link" | |
1917 | Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1918 | .Sp | |
1919 | Link count not updated because hard links are not quite that hard | |
1920 | (They are sort of half-way between hard and soft links). (AmigaOS) | |
1921 | .Sp | |
1922 | Hard links are implemented on Win32 (Windows \s-1NT\s0 and Windows 2000) | |
1923 | under \s-1NTFS\s0 only. | |
1924 | .IP "localtime" 8 | |
1925 | .IX Item "localtime" | |
1926 | Because Perl currently relies on the native standard C \fIlocaltime()\fR | |
1927 | function, it is only safe to use times between 0 and (2**31)\-1. Times | |
1928 | outside this range may result in unexpected behavior depending on your | |
1929 | operating system's implementation of \fIlocaltime()\fR. | |
1930 | .IP "lstat" 8 | |
1931 | .IX Item "lstat" | |
1932 | Not implemented. (\s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1933 | .Sp | |
1934 | Return values (especially for device and inode) may be bogus. (Win32) | |
1935 | .IP "msgctl" 8 | |
1936 | .IX Item "msgctl" | |
1937 | .PD 0 | |
1938 | .IP "msgget" 8 | |
1939 | .IX Item "msgget" | |
1940 | .IP "msgsnd" 8 | |
1941 | .IX Item "msgsnd" | |
1942 | .IP "msgrcv" 8 | |
1943 | .IX Item "msgrcv" | |
1944 | .PD | |
1945 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, Plan\ 9, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
1946 | .IP "open" 8 | |
1947 | .IX Item "open" | |
1948 | The \f(CW\*(C`|\*(C'\fR variants are supported only if ToolServer is installed. | |
1949 | (Mac\ \s-1OS\s0) | |
1950 | .Sp | |
1951 | open to \f(CW\*(C`|\-\*(C'\fR and \f(CW\*(C`\-|\*(C'\fR are unsupported. (Mac\ \s-1OS\s0, Win32, \s-1RISC\s0\ \s-1OS\s0) | |
1952 | .Sp | |
1953 | Opening a process does not automatically flush output handles on some | |
1954 | platforms. (SunOS, Solaris, \s-1HP\-UX\s0) | |
1955 | .IP "pipe" 8 | |
1956 | .IX Item "pipe" | |
1957 | Very limited functionality. (MiNT) | |
1958 | .IP "readlink" 8 | |
1959 | .IX Item "readlink" | |
1960 | Not implemented. (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
1961 | .IP "rename" 8 | |
1962 | .IX Item "rename" | |
1963 | Can't move directories between directories on different logical volumes. (Win32) | |
1964 | .IP "select" 8 | |
1965 | .IX Item "select" | |
1966 | Only implemented on sockets. (Win32, \s-1VMS\s0) | |
1967 | .Sp | |
1968 | Only reliable on sockets. (\s-1RISC\s0\ \s-1OS\s0) | |
1969 | .Sp | |
1970 | Note that the \f(CW\*(C`select FILEHANDLE\*(C'\fR form is generally portable. | |
1971 | .IP "semctl" 8 | |
1972 | .IX Item "semctl" | |
1973 | .PD 0 | |
1974 | .IP "semget" 8 | |
1975 | .IX Item "semget" | |
1976 | .IP "semop" 8 | |
1977 | .IX Item "semop" | |
1978 | .PD | |
1979 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
1980 | .IP "setgrent" 8 | |
1981 | .IX Item "setgrent" | |
1982 | Not implemented. (Mac\ \s-1OS\s0, MPE/iX, \s-1VMS\s0, Win32, \s-1RISC\s0\ \s-1OS\s0) | |
1983 | .IP "setpgrp" 8 | |
1984 | .IX Item "setpgrp" | |
1985 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
1986 | .IP "setpriority" 8 | |
1987 | .IX Item "setpriority" | |
1988 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
1989 | .IP "setpwent" 8 | |
1990 | .IX Item "setpwent" | |
1991 | Not implemented. (Mac\ \s-1OS\s0, MPE/iX, Win32, \s-1RISC\s0\ \s-1OS\s0) | |
1992 | .IP "setsockopt" 8 | |
1993 | .IX Item "setsockopt" | |
1994 | Not implemented. (Plan\ 9) | |
1995 | .IP "shmctl" 8 | |
1996 | .IX Item "shmctl" | |
1997 | .PD 0 | |
1998 | .IP "shmget" 8 | |
1999 | .IX Item "shmget" | |
2000 | .IP "shmread" 8 | |
2001 | .IX Item "shmread" | |
2002 | .IP "shmwrite" 8 | |
2003 | .IX Item "shmwrite" | |
2004 | .PD | |
2005 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0) | |
2006 | .IP "sockatmark" 8 | |
2007 | .IX Item "sockatmark" | |
2008 | A relatively recent addition to socket functions, may not | |
2009 | be implemented even in \s-1UNIX\s0 platforms. | |
2010 | .IP "socketpair" 8 | |
2011 | .IX Item "socketpair" | |
2012 | Not implemented. (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0) | |
2013 | .IP "stat" 8 | |
2014 | .IX Item "stat" | |
2015 | Platforms that do not have rdev, blksize, or blocks will return these | |
2016 | as '', so numeric comparison or manipulation of these fields may cause | |
2017 | \&'not numeric' warnings. | |
2018 | .Sp | |
2019 | mtime and atime are the same thing, and ctime is creation time instead of | |
2020 | inode change time. (Mac\ \s-1OS\s0). | |
2021 | .Sp | |
2022 | ctime not supported on \s-1UFS\s0 (Mac\ \s-1OS\s0\ X). | |
2023 | .Sp | |
2024 | ctime is creation time instead of inode change time (Win32). | |
2025 | .Sp | |
2026 | device and inode are not meaningful. (Win32) | |
2027 | .Sp | |
2028 | device and inode are not necessarily reliable. (\s-1VMS\s0) | |
2029 | .Sp | |
2030 | mtime, atime and ctime all return the last modification time. Device and | |
2031 | inode are not necessarily reliable. (\s-1RISC\s0\ \s-1OS\s0) | |
2032 | .Sp | |
2033 | dev, rdev, blksize, and blocks are not available. inode is not | |
2034 | meaningful and will differ between stat calls on the same file. (os2) | |
2035 | .Sp | |
2036 | some versions of cygwin when doing a stat(\*(L"foo\*(R") and if not finding it | |
2037 | may then attempt to stat(\*(L"foo.exe\*(R") (Cygwin) | |
2038 | .IP "symlink" 8 | |
2039 | .IX Item "symlink" | |
2040 | Not implemented. (Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
2041 | .IP "syscall" 8 | |
2042 | .IX Item "syscall" | |
2043 | Not implemented. (Mac\ \s-1OS\s0, Win32, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0, \s-1VOS\s0, \s-1VM/ESA\s0) | |
2044 | .IP "sysopen" 8 | |
2045 | .IX Item "sysopen" | |
2046 | The traditional \*(L"0\*(R", \*(L"1\*(R", and \*(L"2\*(R" MODEs are implemented with different | |
2047 | numeric values on some systems. The flags exported by \f(CW\*(C`Fcntl\*(C'\fR | |
2048 | (O_RDONLY, O_WRONLY, O_RDWR) should work everywhere though. (Mac\ \s-1OS\s0, \s-1OS/390\s0, \s-1VM/ESA\s0) | |
2049 | .IP "system" 8 | |
2050 | .IX Item "system" | |
2051 | In general, do not assume the \s-1UNIX/POSIX\s0 semantics that you can shift | |
2052 | \&\f(CW$?\fR right by eight to get the exit value, or that \f(CW\*(C`$? & 127\*(C'\fR | |
2053 | would give you the number of the signal that terminated the program, | |
2054 | or that \f(CW\*(C`$? & 128\*(C'\fR would test true if the program was terminated by a | |
2055 | coredump. Instead, use the \s-1POSIX\s0 W*() interfaces: for example, use | |
2056 | \&\s-1WIFEXITED\s0($?) and \s-1WEXITVALUE\s0($?) to test for a normal exit and the exit | |
2057 | value, \s-1WIFSIGNALED\s0($?) and \s-1WTERMSIG\s0($?) for a signal exit and the | |
2058 | signal. Core dumping is not a portable concept, so there's no portable | |
2059 | way to test for that. | |
2060 | .Sp | |
2061 | Only implemented if ToolServer is installed. (Mac\ \s-1OS\s0) | |
2062 | .Sp | |
2063 | As an optimization, may not call the command shell specified in | |
2064 | \&\f(CW$ENV{PERL5SHELL}\fR. \f(CW\*(C`system(1, @args)\*(C'\fR spawns an external | |
2065 | process and immediately returns its process designator, without | |
2066 | waiting for it to terminate. Return value may be used subsequently | |
2067 | in \f(CW\*(C`wait\*(C'\fR or \f(CW\*(C`waitpid\*(C'\fR. Failure to \fIspawn()\fR a subprocess is indicated | |
2068 | by setting $? to \*(L"255 << 8\*(R". \f(CW$?\fR is set in a way compatible with | |
2069 | Unix (i.e. the exitstatus of the subprocess is obtained by \*(L"$? >> 8\*(R", | |
2070 | as described in the documentation). (Win32) | |
2071 | .Sp | |
2072 | There is no shell to process metacharacters, and the native standard is | |
2073 | to pass a command line terminated by \*(L"\en\*(R" \*(L"\er\*(R" or \*(L"\e0\*(R" to the spawned | |
2074 | program. Redirection such as \f(CW\*(C`> foo\*(C'\fR is performed (if at all) by | |
2075 | the run time library of the spawned program. \f(CW\*(C`system\*(C'\fR \fIlist\fR will call | |
2076 | the Unix emulation library's \f(CW\*(C`exec\*(C'\fR emulation, which attempts to provide | |
2077 | emulation of the stdin, stdout, stderr in force in the parent, providing | |
2078 | the child program uses a compatible version of the emulation library. | |
2079 | \&\fIscalar\fR will call the native command line direct and no such emulation | |
2080 | of a child Unix program will exists. Mileage \fBwill\fR vary. (\s-1RISC\s0\ \s-1OS\s0) | |
2081 | .Sp | |
2082 | Far from being \s-1POSIX\s0 compliant. Because there may be no underlying | |
2083 | /bin/sh tries to work around the problem by forking and execing the | |
2084 | first token in its argument string. Handles basic redirection | |
2085 | (\*(L"<\*(R" or \*(L">\*(R") on its own behalf. (MiNT) | |
2086 | .Sp | |
2087 | Does not automatically flush output handles on some platforms. | |
2088 | (SunOS, Solaris, \s-1HP\-UX\s0) | |
2089 | .Sp | |
2090 | The return value is POSIX-like (shifted up by 8 bits), which only allows | |
2091 | room for a made-up value derived from the severity bits of the native | |
2092 | 32\-bit condition code (unless overridden by \f(CW\*(C`use vmsish 'status'\*(C'\fR). | |
2093 | For more details see \*(L"$?\*(R" in perlvms. (\s-1VMS\s0) | |
2094 | .IP "times" 8 | |
2095 | .IX Item "times" | |
2096 | Only the first entry returned is nonzero. (Mac\ \s-1OS\s0) | |
2097 | .Sp | |
2098 | \&\*(L"cumulative\*(R" times will be bogus. On anything other than Windows \s-1NT\s0 | |
2099 | or Windows 2000, \*(L"system\*(R" time will be bogus, and \*(L"user\*(R" time is | |
2100 | actually the time returned by the \fIclock()\fR function in the C runtime | |
2101 | library. (Win32) | |
2102 | .Sp | |
2103 | Not useful. (\s-1RISC\s0\ \s-1OS\s0) | |
2104 | .IP "truncate" 8 | |
2105 | .IX Item "truncate" | |
2106 | Not implemented. (Older versions of \s-1VMS\s0) | |
2107 | .Sp | |
2108 | Truncation to zero-length only. (\s-1VOS\s0) | |
2109 | .Sp | |
2110 | If a \s-1FILEHANDLE\s0 is supplied, it must be writable and opened in append | |
2111 | mode (i.e., use \f(CW\*(C`open(FH, '>>filename')\*(C'\fR | |
2112 | or \f(CW\*(C`sysopen(FH,...,O_APPEND|O_RDWR)\*(C'\fR. If a filename is supplied, it | |
2113 | should not be held open elsewhere. (Win32) | |
2114 | .IP "umask" 8 | |
2115 | .IX Item "umask" | |
2116 | Returns undef where unavailable, as of version 5.005. | |
2117 | .Sp | |
2118 | \&\f(CW\*(C`umask\*(C'\fR works but the correct permissions are set only when the file | |
2119 | is finally closed. (AmigaOS) | |
2120 | .IP "utime" 8 | |
2121 | .IX Item "utime" | |
2122 | Only the modification time is updated. (BeOS, Mac\ \s-1OS\s0, \s-1VMS\s0, \s-1RISC\s0\ \s-1OS\s0) | |
2123 | .Sp | |
2124 | May not behave as expected. Behavior depends on the C runtime | |
2125 | library's implementation of \fIutime()\fR, and the filesystem being | |
2126 | used. The \s-1FAT\s0 filesystem typically does not support an \*(L"access | |
2127 | time\*(R" field, and it may limit timestamps to a granularity of | |
2128 | two seconds. (Win32) | |
2129 | .IP "wait" 8 | |
2130 | .IX Item "wait" | |
2131 | .PD 0 | |
2132 | .IP "waitpid" 8 | |
2133 | .IX Item "waitpid" | |
2134 | .PD | |
2135 | Not implemented. (Mac\ \s-1OS\s0, \s-1VOS\s0) | |
2136 | .Sp | |
2137 | Can only be applied to process handles returned for processes spawned | |
2138 | using \f(CW\*(C`system(1, ...)\*(C'\fR or pseudo processes created with \f(CW\*(C`fork()\*(C'\fR. (Win32) | |
2139 | .Sp | |
2140 | Not useful. (\s-1RISC\s0\ \s-1OS\s0) | |
2141 | .SH "Supported Platforms" | |
2142 | .IX Header "Supported Platforms" | |
2143 | As of September 2003 (the Perl release 5.8.1), the following platforms | |
2144 | are able to build Perl from the standard source code distribution | |
2145 | available at http://www.cpan.org/src/index.html | |
2146 | .PP | |
2147 | .Vb 42 | |
2148 | \& AIX | |
2149 | \& BeOS | |
2150 | \& BSD/OS (BSDi) | |
2151 | \& Cygwin | |
2152 | \& DG/UX | |
2153 | \& DOS DJGPP 1) | |
2154 | \& DYNIX/ptx | |
2155 | \& EPOC R5 | |
2156 | \& FreeBSD | |
2157 | \& HI-UXMPP (Hitachi) (5.8.0 worked but we didn't know it) | |
2158 | \& HP-UX | |
2159 | \& IRIX | |
2160 | \& Linux | |
2161 | \& LynxOS | |
2162 | \& Mac OS Classic | |
2163 | \& Mac OS X (Darwin) | |
2164 | \& MPE/iX | |
2165 | \& NetBSD | |
2166 | \& NetWare | |
2167 | \& NonStop-UX | |
2168 | \& ReliantUNIX (formerly SINIX) | |
2169 | \& OpenBSD | |
2170 | \& OpenVMS (formerly VMS) | |
2171 | \& Open UNIX (Unixware) (since Perl 5.8.1/5.9.0) | |
2172 | \& OS/2 | |
2173 | \& OS/400 (using the PASE) (since Perl 5.8.1/5.9.0) | |
2174 | \& PowerUX | |
2175 | \& POSIX-BC (formerly BS2000) | |
2176 | \& QNX | |
2177 | \& Solaris | |
2178 | \& SunOS 4 | |
2179 | \& SUPER-UX (NEC) | |
2180 | \& SVR4 | |
2181 | \& Tru64 UNIX (formerly DEC OSF/1, Digital UNIX) | |
2182 | \& UNICOS | |
2183 | \& UNICOS/mk | |
2184 | \& UTS | |
2185 | \& VOS | |
2186 | \& Win95/98/ME/2K/XP 2) | |
2187 | \& WinCE | |
2188 | \& z/OS (formerly OS/390) | |
2189 | \& VM/ESA | |
2190 | .Ve | |
2191 | .PP | |
2192 | .Vb 2 | |
2193 | \& 1) in DOS mode either the DOS or OS/2 ports can be used | |
2194 | \& 2) compilers: Borland, MinGW (GCC), VC6 | |
2195 | .Ve | |
2196 | .PP | |
2197 | The following platforms worked with the previous releases (5.6 and | |
2198 | 5.7), but we did not manage either to fix or to test these in time | |
2199 | for the 5.8.1 release. There is a very good chance that many of these | |
2200 | will work fine with the 5.8.1. | |
2201 | .PP | |
2202 | .Vb 7 | |
2203 | \& DomainOS | |
2204 | \& Hurd | |
2205 | \& MachTen | |
2206 | \& PowerMAX | |
2207 | \& SCO SV | |
2208 | \& Unixware | |
2209 | \& Windows 3.1 | |
2210 | .Ve | |
2211 | .PP | |
2212 | Known to be broken for 5.8.0 and 5.8.1 (but 5.6.1 and 5.7.2 can be used): | |
2213 | .PP | |
2214 | .Vb 1 | |
2215 | \& AmigaOS | |
2216 | .Ve | |
2217 | .PP | |
2218 | The following platforms have been known to build Perl from source in | |
2219 | the past (5.005_03 and earlier), but we haven't been able to verify | |
2220 | their status for the current release, either because the | |
2221 | hardware/software platforms are rare or because we don't have an | |
2222 | active champion on these platforms\*(--or both. They used to work, | |
2223 | though, so go ahead and try compiling them, and let perlbug@perl.org | |
2224 | of any trouble. | |
2225 | .PP | |
2226 | .Vb 30 | |
2227 | \& 3b1 | |
2228 | \& A/UX | |
2229 | \& ConvexOS | |
2230 | \& CX/UX | |
2231 | \& DC/OSx | |
2232 | \& DDE SMES | |
2233 | \& DOS EMX | |
2234 | \& Dynix | |
2235 | \& EP/IX | |
2236 | \& ESIX | |
2237 | \& FPS | |
2238 | \& GENIX | |
2239 | \& Greenhills | |
2240 | \& ISC | |
2241 | \& MachTen 68k | |
2242 | \& MiNT | |
2243 | \& MPC | |
2244 | \& NEWS-OS | |
2245 | \& NextSTEP | |
2246 | \& OpenSTEP | |
2247 | \& Opus | |
2248 | \& Plan 9 | |
2249 | \& RISC/os | |
2250 | \& SCO ODT/OSR | |
2251 | \& Stellar | |
2252 | \& SVR2 | |
2253 | \& TI1500 | |
2254 | \& TitanOS | |
2255 | \& Ultrix | |
2256 | \& Unisys Dynix | |
2257 | .Ve | |
2258 | .PP | |
2259 | The following platforms have their own source code distributions and | |
2260 | binaries available via http://www.cpan.org/ports/ | |
2261 | .PP | |
2262 | .Vb 1 | |
2263 | \& Perl release | |
2264 | .Ve | |
2265 | .PP | |
2266 | .Vb 2 | |
2267 | \& OS/400 (ILE) 5.005_02 | |
2268 | \& Tandem Guardian 5.004 | |
2269 | .Ve | |
2270 | .PP | |
2271 | The following platforms have only binaries available via | |
2272 | http://www.cpan.org/ports/index.html : | |
2273 | .PP | |
2274 | .Vb 1 | |
2275 | \& Perl release | |
2276 | .Ve | |
2277 | .PP | |
2278 | .Vb 3 | |
2279 | \& Acorn RISCOS 5.005_02 | |
2280 | \& AOS 5.002 | |
2281 | \& LynxOS 5.004_02 | |
2282 | .Ve | |
2283 | .PP | |
2284 | Although we do suggest that you always build your own Perl from | |
2285 | the source code, both for maximal configurability and for security, | |
2286 | in case you are in a hurry you can check | |
2287 | http://www.cpan.org/ports/index.html for binary distributions. | |
2288 | .SH "SEE ALSO" | |
2289 | .IX Header "SEE ALSO" | |
2290 | perlaix, perlamiga, perlapollo, perlbeos, perlbs2000, | |
2291 | perlce, perlcygwin, perldgux, perldos, perlepoc, | |
2292 | perlebcdic, perlfreebsd, perlhurd, perlhpux, perlirix, | |
2293 | perlmachten, perlmacos, perlmacosx, perlmint, perlmpeix, | |
2294 | perlnetware, perlos2, perlos390, perlos400, | |
2295 | perlplan9, perlqnx, perlsolaris, perltru64, | |
2296 | perlunicode, perlvmesa, perlvms, perlvos, | |
2297 | perlwin32, and Win32. | |
2298 | .SH "AUTHORS / CONTRIBUTORS" | |
2299 | .IX Header "AUTHORS / CONTRIBUTORS" | |
2300 | Abigail <abigail@foad.org>, | |
2301 | Charles Bailey <bailey@newman.upenn.edu>, | |
2302 | Graham Barr <gbarr@pobox.com>, | |
2303 | Tom Christiansen <tchrist@perl.com>, | |
2304 | Nicholas Clark <nick@ccl4.org>, | |
2305 | Thomas Dorner <Thomas.Dorner@start.de>, | |
2306 | Andy Dougherty <doughera@lafayette.edu>, | |
2307 | Dominic Dunlop <domo@computer.org>, | |
2308 | Neale Ferguson <neale@vma.tabnsw.com.au>, | |
2309 | David J. Fiander <davidf@mks.com>, | |
2310 | Paul Green <Paul_Green@stratus.com>, | |
2311 | M.J.T. Guy <mjtg@cam.ac.uk>, | |
2312 | Jarkko Hietaniemi <jhi@iki.fi>, | |
2313 | Luther Huffman <lutherh@stratcom.com>, | |
2314 | Nick Ing-Simmons <nick@ing\-simmons.net>, | |
2315 | Andreas J. Ko\*:nig <a.koenig@mind.de>, | |
2316 | Markus Laker <mlaker@contax.co.uk>, | |
2317 | Andrew M. Langmead <aml@world.std.com>, | |
2318 | Larry Moore <ljmoore@freespace.net>, | |
2319 | Paul Moore <Paul.Moore@uk.origin\-it.com>, | |
2320 | Chris Nandor <pudge@pobox.com>, | |
2321 | Matthias Neeracher <neeracher@mac.com>, | |
2322 | Philip Newton <pne@cpan.org>, | |
2323 | Gary Ng <71564.1743@CompuServe.COM>, | |
2324 | Tom Phoenix <rootbeer@teleport.com>, | |
2325 | Andre\*' Pirard <A.Pirard@ulg.ac.be>, | |
2326 | Peter Prymmer <pvhp@forte.com>, | |
2327 | Hugo van der Sanden <hv@crypt0.demon.co.uk>, | |
2328 | Gurusamy Sarathy <gsar@activestate.com>, | |
2329 | Paul J. Schinder <schinder@pobox.com>, | |
2330 | Michael G Schwern <schwern@pobox.com>, | |
2331 | Dan Sugalski <dan@sidhe.org>, | |
2332 | Nathan Torkington <gnat@frii.com>. |