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 "PERL581DELTA 1" | |
132 | .TH PERL581DELTA 1 "2006-01-07" "perl v5.8.8" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | perl581delta \- what is new for perl v5.8.1 | |
135 | .SH "DESCRIPTION" | |
136 | .IX Header "DESCRIPTION" | |
137 | This document describes differences between the 5.8.0 release and | |
138 | the 5.8.1 release. | |
139 | .PP | |
140 | If you are upgrading from an earlier release such as 5.6.1, first read | |
141 | the perl58delta, which describes differences between 5.6.0 and | |
142 | 5.8.0. | |
143 | .PP | |
144 | In case you are wondering about 5.6.1, it was bug-fix-wise rather | |
145 | identical to the development release 5.7.1. Confused? This timeline | |
146 | hopefully helps a bit: it lists the new major releases, their maintenance | |
147 | releases, and the development releases. | |
148 | .PP | |
149 | .Vb 1 | |
150 | \& New Maintenance Development | |
151 | .Ve | |
152 | .PP | |
153 | .Vb 8 | |
154 | \& 5.6.0 2000-Mar-22 | |
155 | \& 5.7.0 2000-Sep-02 | |
156 | \& 5.6.1 2001-Apr-08 | |
157 | \& 5.7.1 2001-Apr-09 | |
158 | \& 5.7.2 2001-Jul-13 | |
159 | \& 5.7.3 2002-Mar-05 | |
160 | \& 5.8.0 2002-Jul-18 | |
161 | \& 5.8.1 2003-Sep-25 | |
162 | .Ve | |
163 | .SH "Incompatible Changes" | |
164 | .IX Header "Incompatible Changes" | |
165 | .Sh "Hash Randomisation" | |
166 | .IX Subsection "Hash Randomisation" | |
167 | Mainly due to security reasons, the \*(L"random ordering\*(R" of hashes | |
168 | has been made even more random. Previously while the order of hash | |
169 | elements from \fIkeys()\fR, \fIvalues()\fR, and \fIeach()\fR was essentially random, | |
170 | it was still repeatable. Now, however, the order varies between | |
171 | different runs of Perl. | |
172 | .PP | |
173 | \&\fBPerl has never guaranteed any ordering of the hash keys\fR, and the | |
174 | ordering has already changed several times during the lifetime of | |
175 | Perl 5. Also, the ordering of hash keys has always been, and | |
176 | continues to be, affected by the insertion order. | |
177 | .PP | |
178 | The added randomness may affect applications. | |
179 | .PP | |
180 | One possible scenario is when output of an application has included | |
181 | hash data. For example, if you have used the Data::Dumper module to | |
182 | dump data into different files, and then compared the files to see | |
183 | whether the data has changed, now you will have false positives since | |
184 | the order in which hashes are dumped will vary. In general the cure | |
185 | is to sort the keys (or the values); in particular for Data::Dumper to | |
186 | use the \f(CW\*(C`Sortkeys\*(C'\fR option. If some particular order is really | |
187 | important, use tied hashes: for example the Tie::IxHash module | |
188 | which by default preserves the order in which the hash elements | |
189 | were added. | |
190 | .PP | |
191 | More subtle problem is reliance on the order of \*(L"global destruction\*(R". | |
192 | That is what happens at the end of execution: Perl destroys all data | |
193 | structures, including user data. If your destructors (the \s-1DESTROY\s0 | |
194 | subroutines) have assumed any particular ordering to the global | |
195 | destruction, there might be problems ahead. For example, in a | |
196 | destructor of one object you cannot assume that objects of any other | |
197 | class are still available, unless you hold a reference to them. | |
198 | If the environment variable \s-1PERL_DESTRUCT_LEVEL\s0 is set to a non-zero | |
199 | value, or if Perl is exiting a spawned thread, it will also destruct | |
200 | the ordinary references and the symbol tables that are no longer in use. | |
201 | You can't call a class method or an ordinary function on a class that | |
202 | has been collected that way. | |
203 | .PP | |
204 | The hash randomisation is certain to reveal hidden assumptions about | |
205 | some particular ordering of hash elements, and outright bugs: it | |
206 | revealed a few bugs in the Perl core and core modules. | |
207 | .PP | |
208 | To disable the hash randomisation in runtime, set the environment | |
209 | variable \s-1PERL_HASH_SEED\s0 to 0 (zero) before running Perl (for more | |
210 | information see \*(L"\s-1PERL_HASH_SEED\s0\*(R" in perlrun), or to disable the feature | |
211 | completely in compile time, compile with \f(CW\*(C`\-DNO_HASH_SEED\*(C'\fR (see \fI\s-1INSTALL\s0\fR). | |
212 | .PP | |
213 | See \*(L"Algorithmic Complexity Attacks\*(R" in perlsec for the original | |
214 | rationale behind this change. | |
215 | .Sh "\s-1UTF\-8\s0 On Filehandles No Longer Activated By Locale" | |
216 | .IX Subsection "UTF-8 On Filehandles No Longer Activated By Locale" | |
217 | In Perl 5.8.0 all filehandles, including the standard filehandles, | |
218 | were implicitly set to be in Unicode \s-1UTF\-8\s0 if the locale settings | |
219 | indicated the use of \s-1UTF\-8\s0. This feature caused too many problems, | |
220 | so the feature was turned off and redesigned: see \*(L"Core Enhancements\*(R". | |
221 | .ie n .Sh "Single-number v\-strings are no longer v\-strings before ""=>""" | |
222 | .el .Sh "Single-number v\-strings are no longer v\-strings before ``=>''" | |
223 | .IX Subsection "Single-number v-strings are no longer v-strings before =>" | |
224 | The version strings or v\-strings (see \*(L"Version Strings\*(R" in perldata) | |
225 | feature introduced in Perl 5.6.0 has been a source of some confusion\*(-- | |
226 | especially when the user did not want to use it, but Perl thought it | |
227 | knew better. Especially troublesome has been the feature that before | |
228 | a \*(L"=>\*(R" a version string (a \*(L"v\*(R" followed by digits) has been interpreted | |
229 | as a v\-string instead of a string literal. In other words: | |
230 | .PP | |
231 | .Vb 1 | |
232 | \& %h = ( v65 => 42 ); | |
233 | .Ve | |
234 | .PP | |
235 | has meant since Perl 5.6.0 | |
236 | .PP | |
237 | .Vb 1 | |
238 | \& %h = ( 'A' => 42 ); | |
239 | .Ve | |
240 | .PP | |
241 | (at least in platforms of \s-1ASCII\s0 progeny) Perl 5.8.1 restores the | |
242 | more natural interpretation | |
243 | .PP | |
244 | .Vb 1 | |
245 | \& %h = ( 'v65' => 42 ); | |
246 | .Ve | |
247 | .PP | |
248 | The multi-number v\-strings like v65.66 and 65.66.67 still continue to | |
249 | be v\-strings in Perl 5.8. | |
250 | .Sh "(Win32) The \-C Switch Has Been Repurposed" | |
251 | .IX Subsection "(Win32) The -C Switch Has Been Repurposed" | |
252 | The \-C switch has changed in an incompatible way. The old semantics | |
253 | of this switch only made sense in Win32 and only in the \*(L"use utf8\*(R" | |
254 | universe in 5.6.x releases, and do not make sense for the Unicode | |
255 | implementation in 5.8.0. Since this switch could not have been used | |
256 | by anyone, it has been repurposed. The behavior that this switch | |
257 | enabled in 5.6.x releases may be supported in a transparent, | |
258 | data-dependent fashion in a future release. | |
259 | .PP | |
260 | For the new life of this switch, see \*(L"\s-1UTF\-8\s0 no longer default under \s-1UTF\-8\s0 locales\*(R", and \*(L"\-C\*(R" in perlrun. | |
261 | .Sh "(Win32) The /d Switch Of cmd.exe" | |
262 | .IX Subsection "(Win32) The /d Switch Of cmd.exe" | |
263 | Perl 5.8.1 uses the /d switch when running the cmd.exe shell | |
264 | internally for \fIsystem()\fR, backticks, and when opening pipes to external | |
265 | programs. The extra switch disables the execution of AutoRun commands | |
266 | from the registry, which is generally considered undesirable when | |
267 | running external programs. If you wish to retain compatibility with | |
268 | the older behavior, set \s-1PERL5SHELL\s0 in your environment to \f(CW\*(C`cmd /x/c\*(C'\fR. | |
269 | .SH "Core Enhancements" | |
270 | .IX Header "Core Enhancements" | |
271 | .Sh "\s-1UTF\-8\s0 no longer default under \s-1UTF\-8\s0 locales" | |
272 | .IX Subsection "UTF-8 no longer default under UTF-8 locales" | |
273 | In Perl 5.8.0 many Unicode features were introduced. One of them | |
274 | was found to be of more nuisance than benefit: the automagic | |
275 | (and silent) \*(L"UTF\-8\-ification\*(R" of filehandles, including the | |
276 | standard filehandles, if the user's locale settings indicated | |
277 | use of \s-1UTF\-8\s0. | |
278 | .PP | |
279 | For example, if you had \f(CW\*(C`en_US.UTF\-8\*(C'\fR as your locale, your \s-1STDIN\s0 and | |
280 | \&\s-1STDOUT\s0 were automatically \*(L"\s-1UTF\-8\s0\*(R", in other words an implicit | |
281 | binmode(..., \*(L":utf8\*(R") was made. This meant that trying to print, say, | |
282 | \&\fIchr\fR\|(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what | |
283 | you had in mind unless you were aware of this feature of Perl 5.8.0. | |
284 | The problem is that the vast majority of people weren't: for example | |
285 | in RedHat releases 8 and 9 the \fBdefault\fR locale setting is \s-1UTF\-8\s0, so | |
286 | all RedHat users got \s-1UTF\-8\s0 filehandles, whether they wanted it or not. | |
287 | The pain was intensified by the Unicode implementation of Perl 5.8.0 | |
288 | (still) having nasty bugs, especially related to the use of s/// and | |
289 | tr///. (Bugs that have been fixed in 5.8.1) | |
290 | .PP | |
291 | Therefore a decision was made to backtrack the feature and change it | |
292 | from implicit silent default to explicit conscious option. The new | |
293 | Perl command line option \f(CW\*(C`\-C\*(C'\fR and its counterpart environment | |
294 | variable \s-1PERL_UNICODE\s0 can now be used to control how Perl and Unicode | |
295 | interact at interfaces like I/O and for example the command line | |
296 | arguments. See \*(L"\-C\*(R" in perlrun and \*(L"\s-1PERL_UNICODE\s0\*(R" in perlrun for more | |
297 | information. | |
298 | .Sh "Unsafe signals again available" | |
299 | .IX Subsection "Unsafe signals again available" | |
300 | In Perl 5.8.0 the so-called \*(L"safe signals\*(R" were introduced. This | |
301 | means that Perl no longer handles signals immediately but instead | |
302 | \&\*(L"between opcodes\*(R", when it is safe to do so. The earlier immediate | |
303 | handling easily could corrupt the internal state of Perl, resulting | |
304 | in mysterious crashes. | |
305 | .PP | |
306 | However, the new safer model has its problems too. Because now an | |
307 | opcode, a basic unit of Perl execution, is never interrupted but | |
308 | instead let to run to completion, certain operations that can take a | |
309 | long time now really do take a long time. For example, certain | |
310 | network operations have their own blocking and timeout mechanisms, and | |
311 | being able to interrupt them immediately would be nice. | |
312 | .PP | |
313 | Therefore perl 5.8.1 introduces a \*(L"backdoor\*(R" to restore the pre\-5.8.0 | |
314 | (pre\-5.7.3, really) signal behaviour. Just set the environment variable | |
315 | \&\s-1PERL_SIGNALS\s0 to \f(CW\*(C`unsafe\*(C'\fR, and the old immediate (and unsafe) | |
316 | signal handling behaviour returns. See \*(L"\s-1PERL_SIGNALS\s0\*(R" in perlrun | |
317 | and \*(L"Deferred Signals (Safe Signals)\*(R" in perlipc. | |
318 | .PP | |
319 | In completely unrelated news, you can now use safe signals with | |
320 | POSIX::SigAction. See \*(L"POSIX::SigAction\*(R" in \s-1POSIX\s0. | |
321 | .Sh "Tied Arrays with Negative Array Indices" | |
322 | .IX Subsection "Tied Arrays with Negative Array Indices" | |
323 | Formerly, the indices passed to \f(CW\*(C`FETCH\*(C'\fR, \f(CW\*(C`STORE\*(C'\fR, \f(CW\*(C`EXISTS\*(C'\fR, and | |
324 | \&\f(CW\*(C`DELETE\*(C'\fR methods in tied array class were always non\-negative. If | |
325 | the actual argument was negative, Perl would call \s-1FETCHSIZE\s0 implicitly | |
326 | and add the result to the index before passing the result to the tied | |
327 | array method. This behaviour is now optional. If the tied array class | |
328 | contains a package variable named \f(CW$NEGATIVE_INDICES\fR which is set to | |
329 | a true value, negative values will be passed to \f(CW\*(C`FETCH\*(C'\fR, \f(CW\*(C`STORE\*(C'\fR, | |
330 | \&\f(CW\*(C`EXISTS\*(C'\fR, and \f(CW\*(C`DELETE\*(C'\fR unchanged. | |
331 | .Sh "local ${$x}" | |
332 | .IX Subsection "local ${$x}" | |
333 | The syntaxes | |
334 | .PP | |
335 | .Vb 3 | |
336 | \& local ${$x} | |
337 | \& local @{$x} | |
338 | \& local %{$x} | |
339 | .Ve | |
340 | .PP | |
341 | now do localise variables, given that the \f(CW$x\fR is a valid variable name. | |
342 | .Sh "Unicode Character Database 4.0.0" | |
343 | .IX Subsection "Unicode Character Database 4.0.0" | |
344 | The copy of the Unicode Character Database included in Perl 5.8 has | |
345 | been updated to 4.0.0 from 3.2.0. This means for example that the | |
346 | Unicode character properties are as in Unicode 4.0.0. | |
347 | .Sh "Deprecation Warnings" | |
348 | .IX Subsection "Deprecation Warnings" | |
349 | There is one new feature deprecation. Perl 5.8.0 forgot to add | |
350 | some deprecation warnings, these warnings have now been added. | |
351 | Finally, a reminder of an impending feature removal. | |
352 | .PP | |
353 | \fI(Reminder) Pseudo-hashes are deprecated (really)\fR | |
354 | .IX Subsection "(Reminder) Pseudo-hashes are deprecated (really)" | |
355 | .PP | |
356 | Pseudo-hashes were deprecated in Perl 5.8.0 and will be removed in | |
357 | Perl 5.10.0, see perl58delta for details. Each attempt to access | |
358 | pseudo-hashes will trigger the warning \f(CW\*(C`Pseudo\-hashes are deprecated\*(C'\fR. | |
359 | If you really want to continue using pseudo-hashes but not to see the | |
360 | deprecation warnings, use: | |
361 | .PP | |
362 | .Vb 1 | |
363 | \& no warnings 'deprecated'; | |
364 | .Ve | |
365 | .PP | |
366 | Or you can continue to use the fields pragma, but please don't | |
367 | expect the data structures to be pseudohashes any more. | |
368 | .PP | |
369 | \fI(Reminder) 5.005\-style threads are deprecated (really)\fR | |
370 | .IX Subsection "(Reminder) 5.005-style threads are deprecated (really)" | |
371 | .PP | |
372 | 5.005\-style threads (activated by \f(CW\*(C`use Thread;\*(C'\fR) were deprecated in | |
373 | Perl 5.8.0 and will be removed after Perl 5.8, see perl58delta for | |
374 | details. Each 5.005\-style thread creation will trigger the warning | |
375 | \&\f(CW\*(C`5.005 threads are deprecated\*(C'\fR. If you really want to continue | |
376 | using the 5.005 threads but not to see the deprecation warnings, use: | |
377 | .PP | |
378 | .Vb 1 | |
379 | \& no warnings 'deprecated'; | |
380 | .Ve | |
381 | .PP | |
382 | \fI(Reminder) The $* variable is deprecated (really)\fR | |
383 | .IX Subsection "(Reminder) The $* variable is deprecated (really)" | |
384 | .PP | |
385 | The \f(CW$*\fR variable controlling multi-line matching has been deprecated | |
386 | and will be removed after 5.8. The variable has been deprecated for a | |
387 | long time, and a deprecation warning \f(CW\*(C`Use of $* is deprecated\*(C'\fR is given, | |
388 | now the variable will just finally be removed. The functionality has | |
389 | been supplanted by the \f(CW\*(C`/s\*(C'\fR and \f(CW\*(C`/m\*(C'\fR modifiers on pattern matching. | |
390 | If you really want to continue using the \f(CW$*\fR\-variable but not to see | |
391 | the deprecation warnings, use: | |
392 | .PP | |
393 | .Vb 1 | |
394 | \& no warnings 'deprecated'; | |
395 | .Ve | |
396 | .Sh "Miscellaneous Enhancements" | |
397 | .IX Subsection "Miscellaneous Enhancements" | |
398 | \&\f(CW\*(C`map\*(C'\fR in void context is no longer expensive. \f(CW\*(C`map\*(C'\fR is now context | |
399 | aware, and will not construct a list if called in void context. | |
400 | .PP | |
401 | If a socket gets closed by the server while printing to it, the client | |
402 | now gets a \s-1SIGPIPE\s0. While this new feature was not planned, it fell | |
403 | naturally out of PerlIO changes, and is to be considered an accidental | |
404 | feature. | |
405 | .PP | |
406 | PerlIO::get_layers(\s-1FH\s0) returns the names of the PerlIO layers | |
407 | active on a filehandle. | |
408 | .PP | |
409 | PerlIO::via layers can now have an optional \s-1UTF8\s0 method to | |
410 | indicate whether the layer wants to \*(L"auto\-:utf8\*(R" the stream. | |
411 | .PP | |
412 | \&\fIutf8::is_utf8()\fR has been added as a quick way to test whether | |
413 | a scalar is encoded internally in \s-1UTF\-8\s0 (Unicode). | |
414 | .SH "Modules and Pragmata" | |
415 | .IX Header "Modules and Pragmata" | |
416 | .Sh "Updated Modules And Pragmata" | |
417 | .IX Subsection "Updated Modules And Pragmata" | |
418 | The following modules and pragmata have been updated since Perl 5.8.0: | |
419 | .IP "base" 4 | |
420 | .IX Item "base" | |
421 | .PD 0 | |
422 | .IP "B::Bytecode" 4 | |
423 | .IX Item "B::Bytecode" | |
424 | .PD | |
425 | In much better shape than it used to be. Still far from perfect, but | |
426 | maybe worth a try. | |
427 | .IP "B::Concise" 4 | |
428 | .IX Item "B::Concise" | |
429 | .PD 0 | |
430 | .IP "B::Deparse" 4 | |
431 | .IX Item "B::Deparse" | |
432 | .IP "Benchmark" 4 | |
433 | .IX Item "Benchmark" | |
434 | .PD | |
435 | An optional feature, \f(CW\*(C`:hireswallclock\*(C'\fR, now allows for high | |
436 | resolution wall clock times (uses Time::HiRes). | |
437 | .IP "ByteLoader" 4 | |
438 | .IX Item "ByteLoader" | |
439 | See B::Bytecode. | |
440 | .IP "bytes" 4 | |
441 | .IX Item "bytes" | |
442 | Now has bytes::substr. | |
443 | .IP "\s-1CGI\s0" 4 | |
444 | .IX Item "CGI" | |
445 | .PD 0 | |
446 | .IP "charnames" 4 | |
447 | .IX Item "charnames" | |
448 | .PD | |
449 | One can now have custom character name aliases. | |
450 | .IP "\s-1CPAN\s0" 4 | |
451 | .IX Item "CPAN" | |
452 | There is now a simple command line frontend to the \s-1CPAN\s0.pm | |
453 | module called \fIcpan\fR. | |
454 | .IP "Data::Dumper" 4 | |
455 | .IX Item "Data::Dumper" | |
456 | A new option, Pair, allows choosing the separator between hash keys | |
457 | and values. | |
458 | .IP "DB_File" 4 | |
459 | .IX Item "DB_File" | |
460 | .PD 0 | |
461 | .IP "Devel::PPPort" 4 | |
462 | .IX Item "Devel::PPPort" | |
463 | .IP "Digest::MD5" 4 | |
464 | .IX Item "Digest::MD5" | |
465 | .IP "Encode" 4 | |
466 | .IX Item "Encode" | |
467 | .PD | |
468 | Significant updates on the encoding pragma functionality | |
469 | (tr/// and the \s-1DATA\s0 filehandle, formats). | |
470 | .Sp | |
471 | If a filehandle has been marked as to have an encoding, unmappable | |
472 | characters are detected already during input, not later (when the | |
473 | corrupted data is being used). | |
474 | .Sp | |
475 | The \s-1ISO\s0 8859\-6 conversion table has been corrected (the 0x30..0x39 | |
476 | erroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The | |
477 | \&\s-1GSM\s0 03.38 conversion did not handle escape sequences correctly. The | |
478 | \&\s-1UTF\-7\s0 encoding has been added (making Encode feature-complete with | |
479 | Unicode::String). | |
480 | .IP "fields" 4 | |
481 | .IX Item "fields" | |
482 | .PD 0 | |
483 | .IP "libnet" 4 | |
484 | .IX Item "libnet" | |
485 | .IP "Math::BigInt" 4 | |
486 | .IX Item "Math::BigInt" | |
487 | .PD | |
488 | A lot of bugs have been fixed since v1.60, the version included in Perl | |
489 | v5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to | |
490 | fail for some large values, and the fixes to the handling of bad inputs. | |
491 | .Sp | |
492 | Some new features were added, e.g. the \fIbroot()\fR method, you can now pass | |
493 | parameters to \fIconfig()\fR to change some settings at runtime, and it is now | |
494 | possible to trap the creation of NaN and infinity. | |
495 | .Sp | |
496 | As usual, some optimizations took place and made the math overall a tad | |
497 | faster. In some cases, quite a lot faster, actually. Especially alternative | |
498 | libraries like Math::BigInt::GMP benefit from this. In addition, a lot of the | |
499 | quite clunky routines like \fIfsqrt()\fR and \fIflog()\fR are now much much faster. | |
500 | .IP "MIME::Base64" 4 | |
501 | .IX Item "MIME::Base64" | |
502 | .PD 0 | |
503 | .IP "\s-1NEXT\s0" 4 | |
504 | .IX Item "NEXT" | |
505 | .PD | |
506 | Diamond inheritance now works. | |
507 | .IP "Net::Ping" 4 | |
508 | .IX Item "Net::Ping" | |
509 | .PD 0 | |
510 | .IP "PerlIO::scalar" 4 | |
511 | .IX Item "PerlIO::scalar" | |
512 | .PD | |
513 | Reading from non-string scalars (like the special variables, see | |
514 | perlvar) now works. | |
515 | .IP "podlators" 4 | |
516 | .IX Item "podlators" | |
517 | .PD 0 | |
518 | .IP "Pod::LaTeX" 4 | |
519 | .IX Item "Pod::LaTeX" | |
520 | .IP "PodParsers" 4 | |
521 | .IX Item "PodParsers" | |
522 | .IP "Pod::Perldoc" 4 | |
523 | .IX Item "Pod::Perldoc" | |
524 | .PD | |
525 | Complete rewrite. As a side\-effect, no longer refuses to startup when | |
526 | run by root. | |
527 | .IP "Scalar::Util" 4 | |
528 | .IX Item "Scalar::Util" | |
529 | New utilities: refaddr, isvstring, looks_like_number, set_prototype. | |
530 | .IP "Storable" 4 | |
531 | .IX Item "Storable" | |
532 | Can now store code references (via B::Deparse, so not foolproof). | |
533 | .IP "strict" 4 | |
534 | .IX Item "strict" | |
535 | Earlier versions of the strict pragma did not check the parameters | |
536 | implicitly passed to its \*(L"import\*(R" (use) and \*(L"unimport\*(R" (no) routine. | |
537 | This caused the false idiom such as: | |
538 | .Sp | |
539 | .Vb 2 | |
540 | \& use strict qw(@ISA); | |
541 | \& @ISA = qw(Foo); | |
542 | .Ve | |
543 | .Sp | |
544 | This however (probably) raised the false expectation that the strict | |
545 | refs, vars and subs were being enforced (and that \f(CW@ISA\fR was somehow | |
546 | \&\*(L"declared\*(R"). But the strict refs, vars, and subs are \fBnot\fR enforced | |
547 | when using this false idiom. | |
548 | .Sp | |
549 | Starting from Perl 5.8.1, the above \fBwill\fR cause an error to be | |
550 | raised. This may cause programs which used to execute seemingly | |
551 | correctly without warnings and errors to fail when run under 5.8.1. | |
552 | This happens because | |
553 | .Sp | |
554 | .Vb 1 | |
555 | \& use strict qw(@ISA); | |
556 | .Ve | |
557 | .Sp | |
558 | will now fail with the error: | |
559 | .Sp | |
560 | .Vb 1 | |
561 | \& Unknown 'strict' tag(s) '@ISA' | |
562 | .Ve | |
563 | .Sp | |
564 | The remedy to this problem is to replace this code with the correct idiom: | |
565 | .Sp | |
566 | .Vb 3 | |
567 | \& use strict; | |
568 | \& use vars qw(@ISA); | |
569 | \& @ISA = qw(Foo); | |
570 | .Ve | |
571 | .IP "Term::ANSIcolor" 4 | |
572 | .IX Item "Term::ANSIcolor" | |
573 | .PD 0 | |
574 | .IP "Test::Harness" 4 | |
575 | .IX Item "Test::Harness" | |
576 | .PD | |
577 | Now much more picky about extra or missing output from test scripts. | |
578 | .IP "Test::More" 4 | |
579 | .IX Item "Test::More" | |
580 | .PD 0 | |
581 | .IP "Test::Simple" 4 | |
582 | .IX Item "Test::Simple" | |
583 | .IP "Text::Balanced" 4 | |
584 | .IX Item "Text::Balanced" | |
585 | .IP "Time::HiRes" 4 | |
586 | .IX Item "Time::HiRes" | |
587 | .PD | |
588 | Use of \fInanosleep()\fR, if available, allows mixing subsecond sleeps with | |
589 | alarms. | |
590 | .IP "threads" 4 | |
591 | .IX Item "threads" | |
592 | Several fixes, for example for \fIjoin()\fR problems and memory | |
593 | leaks. In some platforms (like Linux) that use glibc the minimum memory | |
594 | footprint of one ithread has been reduced by several hundred kilobytes. | |
595 | .IP "threads::shared" 4 | |
596 | .IX Item "threads::shared" | |
597 | Many memory leaks have been fixed. | |
598 | .IP "Unicode::Collate" 4 | |
599 | .IX Item "Unicode::Collate" | |
600 | .PD 0 | |
601 | .IP "Unicode::Normalize" 4 | |
602 | .IX Item "Unicode::Normalize" | |
603 | .IP "Win32::GetFolderPath" 4 | |
604 | .IX Item "Win32::GetFolderPath" | |
605 | .IP "Win32::GetOSVersion" 4 | |
606 | .IX Item "Win32::GetOSVersion" | |
607 | .PD | |
608 | Now returns extra information. | |
609 | .SH "Utility Changes" | |
610 | .IX Header "Utility Changes" | |
611 | The \f(CW\*(C`h2xs\*(C'\fR utility now produces a more modern layout: | |
612 | \&\fIFoo\-Bar/lib/Foo/Bar.pm\fR instead of \fIFoo/Bar/Bar.pm\fR. | |
613 | Also, the boilerplate test is now called \fIt/Foo\-Bar.t\fR | |
614 | instead of \fIt/1.t\fR. | |
615 | .PP | |
616 | The Perl debugger (\fIlib/perl5db.pl\fR) has now been extensively | |
617 | documented and bugs found while documenting have been fixed. | |
618 | .PP | |
619 | \&\f(CW\*(C`perldoc\*(C'\fR has been rewritten from scratch to be more robust and | |
620 | featureful. | |
621 | .PP | |
622 | \&\f(CW\*(C`perlcc \-B\*(C'\fR works now at least somewhat better, while \f(CW\*(C`perlcc \-c\*(C'\fR | |
623 | is rather more broken. (The Perl compiler suite as a whole continues | |
624 | to be experimental.) | |
625 | .SH "New Documentation" | |
626 | .IX Header "New Documentation" | |
627 | perl573delta has been added to list the differences between the | |
628 | (now quite obsolete) development releases 5.7.2 and 5.7.3. | |
629 | .PP | |
630 | perl58delta has been added: it is the perldelta of 5.8.0, detailing | |
631 | the differences between 5.6.0 and 5.8.0. | |
632 | .PP | |
633 | perlartistic has been added: it is the Artistic License in pod format, | |
634 | making it easier for modules to refer to it. | |
635 | .PP | |
636 | perlcheat has been added: it is a Perl cheat sheet. | |
637 | .PP | |
638 | perlgpl has been added: it is the \s-1GNU\s0 General Public License in pod | |
639 | format, making it easier for modules to refer to it. | |
640 | .PP | |
641 | perlmacosx has been added to tell about the installation and use | |
642 | of Perl in Mac \s-1OS\s0 X. | |
643 | .PP | |
644 | perlos400 has been added to tell about the installation and use | |
645 | of Perl in \s-1OS/400\s0 \s-1PASE\s0. | |
646 | .PP | |
647 | perlreref has been added: it is a regular expressions quick reference. | |
648 | .SH "Installation and Configuration Improvements" | |
649 | .IX Header "Installation and Configuration Improvements" | |
650 | The \s-1UNIX\s0 standard Perl location, \fI/usr/bin/perl\fR, is no longer | |
651 | overwritten by default if it exists. This change was very prudent | |
652 | because so many \s-1UNIX\s0 vendors already provide a \fI/usr/bin/perl\fR, | |
653 | but simultaneously many system utilities may depend on that | |
654 | exact version of Perl, so better not to overwrite it. | |
655 | .PP | |
656 | One can now specify installation directories for site and vendor man | |
657 | and \s-1HTML\s0 pages, and site and vendor scripts. See \fI\s-1INSTALL\s0\fR. | |
658 | .PP | |
659 | One can now specify a destination directory for Perl installation | |
660 | by specifying the \s-1DESTDIR\s0 variable for \f(CW\*(C`make install\*(C'\fR. (This feature | |
661 | is slightly different from the previous \f(CW\*(C`Configure \-Dinstallprefix=...\*(C'\fR.) | |
662 | See \fI\s-1INSTALL\s0\fR. | |
663 | .PP | |
664 | gcc versions 3.x introduced a new warning that caused a lot of noise | |
665 | during Perl compilation: \f(CW\*(C`gcc \-Ialreadyknowndirectory (warning: | |
666 | changing search order)\*(C'\fR. This warning has now been avoided by | |
667 | Configure weeding out such directories before the compilation. | |
668 | .PP | |
669 | One can now build subsets of Perl core modules by using the | |
670 | Configure flags \f(CW\*(C`\-Dnoextensions=...\*(C'\fR and \f(CW\*(C`\-Donlyextensions=...\*(C'\fR, | |
671 | see \fI\s-1INSTALL\s0\fR. | |
672 | .Sh "Platform-specific enhancements" | |
673 | .IX Subsection "Platform-specific enhancements" | |
674 | In Cygwin Perl can now be built with threads (\f(CW\*(C`Configure \-Duseithreads\*(C'\fR). | |
675 | This works with both Cygwin 1.3.22 and Cygwin 1.5.3. | |
676 | .PP | |
677 | In newer FreeBSD releases Perl 5.8.0 compilation failed because of | |
678 | trying to use \fImalloc.h\fR, which in FreeBSD is just a dummy file, and | |
679 | a fatal error to even try to use. Now \fImalloc.h\fR is not used. | |
680 | .PP | |
681 | Perl is now known to build also in Hitachi \s-1HI\-UXMPP\s0. | |
682 | .PP | |
683 | Perl is now known to build again in LynxOS. | |
684 | .PP | |
685 | Mac \s-1OS\s0 X now installs with Perl version number embedded in | |
686 | installation directory names for easier upgrading of user-compiled | |
687 | Perl, and the installation directories in general are more standard. | |
688 | In other words, the default installation no longer breaks the | |
689 | Apple-provided Perl. On the other hand, with \f(CW\*(C`Configure \-Dprefix=/usr\*(C'\fR | |
690 | you can now really replace the Apple-supplied Perl (\fBplease be careful\fR). | |
691 | .PP | |
692 | Mac \s-1OS\s0 X now builds Perl statically by default. This change was done | |
693 | mainly for faster startup times. The Apple-provided Perl is still | |
694 | dynamically linked and shared, and you can enable the sharedness for | |
695 | your own Perl builds by \f(CW\*(C`Configure \-Duseshrplib\*(C'\fR. | |
696 | .PP | |
697 | Perl has been ported to \s-1IBM\s0's \s-1OS/400\s0 \s-1PASE\s0 environment. The best way | |
698 | to build a Perl for \s-1PASE\s0 is to use an \s-1AIX\s0 host as a cross-compilation | |
699 | environment. See \s-1README\s0.os400. | |
700 | .PP | |
701 | Yet another cross-compilation option has been added: now Perl builds | |
702 | on OpenZaurus, an Linux distribution based on Mandrake + Embedix for | |
703 | the Sharp Zaurus \s-1PDA\s0. See the Cross/README file. | |
704 | .PP | |
705 | Tru64 when using gcc 3 drops the optimisation for \fItoke.c\fR to \f(CW\*(C`\-O2\*(C'\fR | |
706 | because of gigantic memory use with the default \f(CW\*(C`\-O3\*(C'\fR. | |
707 | .PP | |
708 | Tru64 can now build Perl with the newer Berkeley DBs. | |
709 | .PP | |
710 | Building Perl on WinCE has been much enhanced, see \fI\s-1README\s0.ce\fR | |
711 | and \fI\s-1README\s0.perlce\fR. | |
712 | .SH "Selected Bug Fixes" | |
713 | .IX Header "Selected Bug Fixes" | |
714 | .Sh "Closures, eval and lexicals" | |
715 | .IX Subsection "Closures, eval and lexicals" | |
716 | There have been many fixes in the area of anonymous subs, lexicals and | |
717 | closures. Although this means that Perl is now more \*(L"correct\*(R", it is | |
718 | possible that some existing code will break that happens to rely on | |
719 | the faulty behaviour. In practice this is unlikely unless your code | |
720 | contains a very complex nesting of anonymous subs, evals and lexicals. | |
721 | .Sh "Generic fixes" | |
722 | .IX Subsection "Generic fixes" | |
723 | If an input filehandle is marked \f(CW\*(C`:utf8\*(C'\fR and Perl sees illegal \s-1UTF\-8\s0 | |
724 | coming in when doing \f(CW\*(C`<FH>\*(C'\fR, if warnings are enabled a warning is | |
725 | immediately given \- instead of being silent about it and Perl being | |
726 | unhappy about the broken data later. (The \f(CW\*(C`:encoding(utf8)\*(C'\fR layer | |
727 | also works the same way.) | |
728 | .PP | |
729 | binmode(\s-1SOCKET\s0, \*(L":utf8\*(R") only worked on the input side, not on the | |
730 | output side of the socket. Now it works both ways. | |
731 | .PP | |
732 | For threaded Perls certain system database functions like \fIgetpwent()\fR | |
733 | and \fIgetgrent()\fR now grow their result buffer dynamically, instead of | |
734 | failing. This means that at sites with lots of users and groups the | |
735 | functions no longer fail by returning only partial results. | |
736 | .PP | |
737 | Perl 5.8.0 had accidentally broken the capability for users | |
738 | to define their own uppercase<\->lowercase Unicode mappings | |
739 | (as advertised by the Camel). This feature has been fixed and | |
740 | is also documented better. | |
741 | .PP | |
742 | In 5.8.0 this | |
743 | .PP | |
744 | .Vb 1 | |
745 | \& $some_unicode .= <FH>; | |
746 | .Ve | |
747 | .PP | |
748 | didn't work correctly but instead corrupted the data. This has now | |
749 | been fixed. | |
750 | .PP | |
751 | Tied methods like \s-1FETCH\s0 etc. may now safely access tied values, i.e. | |
752 | resulting in a recursive call to \s-1FETCH\s0 etc. Remember to break the | |
753 | recursion, though. | |
754 | .PP | |
755 | At startup Perl blocks the \s-1SIGFPE\s0 signal away since there isn't much | |
756 | Perl can do about it. Previously this blocking was in effect also for | |
757 | programs executed from within Perl. Now Perl restores the original | |
758 | \&\s-1SIGFPE\s0 handling routine, whatever it was, before running external | |
759 | programs. | |
760 | .PP | |
761 | Linenumbers in Perl scripts may now be greater than 65536, or 2**16. | |
762 | (Perl scripts have always been able to be larger than that, it's just | |
763 | that the linenumber for reported errors and warnings have \*(L"wrapped | |
764 | around\*(R".) While scripts that large usually indicate a need to rethink | |
765 | your code a bit, such Perl scripts do exist, for example as results | |
766 | from generated code. Now linenumbers can go all the way to | |
767 | 4294967296, or 2**32. | |
768 | .Sh "Platform-specific fixes" | |
769 | .IX Subsection "Platform-specific fixes" | |
770 | Linux | |
771 | .IP "\(bu" 4 | |
772 | Setting \f(CW$0\fR works again (with certain limitations that | |
773 | Perl cannot do much about: see \*(L"$0\*(R" in perlvar) | |
774 | .PP | |
775 | HP-UX | |
776 | .IP "\(bu" 4 | |
777 | Setting \f(CW$0\fR now works. | |
778 | .PP | |
779 | \&\s-1VMS\s0 | |
780 | .IP "\(bu" 4 | |
781 | Configuration now tests for the presence of \f(CW\*(C`poll()\*(C'\fR, and IO::Poll | |
782 | now uses the vendor-supplied function if detected. | |
783 | .IP "\(bu" 4 | |
784 | A rare access violation at Perl start-up could occur if the Perl image was | |
785 | installed with privileges or if there was an identifier with the | |
786 | subsystem attribute set in the process's rightslist. Either of these | |
787 | circumstances triggered tainting code that contained a pointer bug. | |
788 | The faulty pointer arithmetic has been fixed. | |
789 | .IP "\(bu" 4 | |
790 | The length limit on values (not keys) in the \f(CW%ENV\fR hash has been raised | |
791 | from 255 bytes to 32640 bytes (except when the \s-1PERL_ENV_TABLES\s0 setting | |
792 | overrides the default use of logical names for \f(CW%ENV\fR). If it is | |
793 | necessary to access these long values from outside Perl, be aware that | |
794 | they are implemented using search list logical names that store the | |
795 | value in pieces, each 255\-byte piece (up to 128 of them) being an | |
796 | element in the search list. When doing a lookup in \f(CW%ENV\fR from within | |
797 | Perl, the elements are combined into a single value. The existing | |
798 | VMS-specific ability to access individual elements of a search list | |
799 | logical name via the \f(CW$ENV\fR{'foo;N'} syntax (where N is the search list | |
800 | index) is unimpaired. | |
801 | .IP "\(bu" 4 | |
802 | The piping implementation now uses local rather than global \s-1DCL\s0 | |
803 | symbols for inter-process communication. | |
804 | .IP "\(bu" 4 | |
805 | File::Find could become confused when navigating to a relative | |
806 | directory whose name collided with a logical name. This problem has | |
807 | been corrected by adding directory syntax to relative path names, thus | |
808 | preventing logical name translation. | |
809 | .PP | |
810 | Win32 | |
811 | .IP "\(bu" 4 | |
812 | A memory leak in the \fIfork()\fR emulation has been fixed. | |
813 | .IP "\(bu" 4 | |
814 | The return value of the \fIioctl()\fR built-in function was accidentally | |
815 | broken in 5.8.0. This has been corrected. | |
816 | .IP "\(bu" 4 | |
817 | The internal message loop executed by perl during blocking operations | |
818 | sometimes interfered with messages that were external to Perl. | |
819 | This often resulted in blocking operations terminating prematurely or | |
820 | returning incorrect results, when Perl was executing under environments | |
821 | that could generate Windows messages. This has been corrected. | |
822 | .IP "\(bu" 4 | |
823 | Pipes and sockets are now automatically in binary mode. | |
824 | .IP "\(bu" 4 | |
825 | The four-argument form of \fIselect()\fR did not preserve $! (errno) properly | |
826 | when there were errors in the underlying call. This is now fixed. | |
827 | .IP "\(bu" 4 | |
828 | The \*(L"\s-1CR\s0 \s-1CR\s0 \s-1LF\s0\*(R" problem of has been fixed, binmode(\s-1FH\s0, \*(L":crlf\*(R") | |
829 | is now effectively a no\-op. | |
830 | .SH "New or Changed Diagnostics" | |
831 | .IX Header "New or Changed Diagnostics" | |
832 | All the warnings related to \fIpack()\fR and \fIunpack()\fR were made more | |
833 | informative and consistent. | |
834 | .ie n .Sh "Changed ""A thread exited while %d threads were running""" | |
835 | .el .Sh "Changed ``A thread exited while \f(CW%d\fP threads were running''" | |
836 | .IX Subsection "Changed A thread exited while %d threads were running" | |
837 | The old version | |
838 | .PP | |
839 | .Vb 1 | |
840 | \& A thread exited while %d other threads were still running | |
841 | .Ve | |
842 | .PP | |
843 | was misleading because the \*(L"other\*(R" included also the thread giving | |
844 | the warning. | |
845 | .ie n .Sh "Removed ""Attempt to clear a restricted hash""" | |
846 | .el .Sh "Removed ``Attempt to clear a restricted hash''" | |
847 | .IX Subsection "Removed Attempt to clear a restricted hash" | |
848 | It is not illegal to clear a restricted hash, so the warning | |
849 | was removed. | |
850 | .ie n .Sh "New ""Illegal declaration of anonymous subroutine""" | |
851 | .el .Sh "New ``Illegal declaration of anonymous subroutine''" | |
852 | .IX Subsection "New Illegal declaration of anonymous subroutine" | |
853 | You must specify the block of code for \f(CW\*(C`sub\*(C'\fR. | |
854 | .ie n .Sh "Changed ""Invalid range ""%s"" in transliteration operator""" | |
855 | .el .Sh "Changed ``Invalid range ''%s`` in transliteration operator''" | |
856 | .IX Subsection "Changed Invalid range %s in transliteration operator" | |
857 | The old version | |
858 | .PP | |
859 | .Vb 1 | |
860 | \& Invalid [] range "%s" in transliteration operator | |
861 | .Ve | |
862 | .PP | |
863 | was simply wrong because there are no \*(L"[] ranges\*(R" in tr///. | |
864 | .ie n .Sh "New ""Missing control char name in \ec""" | |
865 | .el .Sh "New ``Missing control char name in \ec''" | |
866 | .IX Subsection "New Missing control char name in c" | |
867 | Self\-explanatory. | |
868 | .ie n .Sh "New ""Newline in left-justified string for %s""" | |
869 | .el .Sh "New ``Newline in left-justified string for \f(CW%s\fP''" | |
870 | .IX Subsection "New Newline in left-justified string for %s" | |
871 | The padding spaces would appear after the newline, which is | |
872 | probably not what you had in mind. | |
873 | .ie n .Sh "New ""Possible precedence problem on bitwise %c operator""" | |
874 | .el .Sh "New ``Possible precedence problem on bitwise \f(CW%c\fP operator''" | |
875 | .IX Subsection "New Possible precedence problem on bitwise %c operator" | |
876 | If you think this | |
877 | .PP | |
878 | .Vb 1 | |
879 | \& $x & $y == 0 | |
880 | .Ve | |
881 | .PP | |
882 | tests whether the bitwise \s-1AND\s0 of \f(CW$x\fR and \f(CW$y\fR is zero, | |
883 | you will like this warning. | |
884 | .ie n .Sh "New ""Pseudo\-hashes are deprecated""" | |
885 | .el .Sh "New ``Pseudo\-hashes are deprecated''" | |
886 | .IX Subsection "New Pseudo-hashes are deprecated" | |
887 | This warning should have been already in 5.8.0, since they are. | |
888 | .ie n .Sh "New ""\fIread()\fP on %s\fP filehandle \f(CW%s""" | |
889 | .el .Sh "New ``\fIread()\fP on \f(CW%s\fP filehandle \f(CW%s\fP''" | |
890 | .IX Subsection "New read() on %s filehandle %s" | |
891 | You cannot \fIread()\fR (or \fIsysread()\fR) from a closed or unopened filehandle. | |
892 | .ie n .Sh "New ""5.005 threads are deprecated""" | |
893 | .el .Sh "New ``5.005 threads are deprecated''" | |
894 | .IX Subsection "New 5.005 threads are deprecated" | |
895 | This warning should have been already in 5.8.0, since they are. | |
896 | .ie n .Sh "New ""Tied variable freed while still in use""" | |
897 | .el .Sh "New ``Tied variable freed while still in use''" | |
898 | .IX Subsection "New Tied variable freed while still in use" | |
899 | Something pulled the plug on a live tied variable, Perl plays | |
900 | safe by bailing out. | |
901 | .ie n .Sh "New ""To%s: illegal mapping '%s'""" | |
902 | .el .Sh "New ``To%s: illegal mapping '%s'''" | |
903 | .IX Subsection "New To%s: illegal mapping '%s'" | |
904 | An illegal user-defined Unicode casemapping was specified. | |
905 | .ie n .Sh "New ""Use of freed value in iteration""" | |
906 | .el .Sh "New ``Use of freed value in iteration''" | |
907 | .IX Subsection "New Use of freed value in iteration" | |
908 | Something modified the values being iterated over. This is not good. | |
909 | .SH "Changed Internals" | |
910 | .IX Header "Changed Internals" | |
911 | These news matter to you only if you either write \s-1XS\s0 code or like to | |
912 | know about or hack Perl internals (using Devel::Peek or any of the | |
913 | \&\f(CW\*(C`B::\*(C'\fR modules counts), or like to run Perl with the \f(CW\*(C`\-D\*(C'\fR option. | |
914 | .PP | |
915 | The embedding examples of perlembed have been reviewed to be | |
916 | uptodate and consistent: for example, the correct use of | |
917 | \&\s-1\fIPERL_SYS_INIT3\s0()\fR and \s-1\fIPERL_SYS_TERM\s0()\fR. | |
918 | .PP | |
919 | Extensive reworking of the pad code (the code responsible | |
920 | for lexical variables) has been conducted by Dave Mitchell. | |
921 | .PP | |
922 | Extensive work on the v\-strings by John Peacock. | |
923 | .PP | |
924 | \&\s-1UTF\-8\s0 length and position cache: to speed up the handling of Unicode | |
925 | (\s-1UTF\-8\s0) scalars, a cache was introduced. Potential problems exist if | |
926 | an extension bypasses the official APIs and directly modifies the \s-1PV\s0 | |
927 | of an \s-1SV:\s0 the \s-1UTF\-8\s0 cache does not get cleared as it should. | |
928 | .PP | |
929 | APIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv, | |
930 | sv_setsv, are again available. | |
931 | .PP | |
932 | Certain Perl core C APIs like cxinc and regatom are no longer | |
933 | available at all to code outside the Perl core of the Perl core | |
934 | extensions. This is intentional. They never should have been | |
935 | available with the shorter names, and if you application depends on | |
936 | them, you should (be ashamed and) contact perl5\-porters to discuss | |
937 | what are the proper APIs. | |
938 | .PP | |
939 | Certain Perl core C APIs like \f(CW\*(C`Perl_list\*(C'\fR are no longer available | |
940 | without their \f(CW\*(C`Perl_\*(C'\fR prefix. If your \s-1XS\s0 module stops working | |
941 | because some functions cannot be found, in many cases a simple fix is | |
942 | to add the \f(CW\*(C`Perl_\*(C'\fR prefix to the function and the thread context | |
943 | \&\f(CW\*(C`aTHX_\*(C'\fR as the first argument of the function call. This is also how | |
944 | it should always have been done: letting the Perl_\-less forms to leak | |
945 | from the core was an accident. For cleaner embedding you can also | |
946 | force this for all APIs by defining at compile time the cpp define | |
947 | \&\s-1PERL_NO_SHORT_NAMES\s0. | |
948 | .PP | |
949 | \&\fIPerl_save_bool()\fR has been added. | |
950 | .PP | |
951 | Regexp objects (those created with \f(CW\*(C`qr\*(C'\fR) now have S\-magic rather than | |
952 | R\-magic. This fixed regexps of the form /...(??{...;$x})/ to no | |
953 | longer ignore changes made to \f(CW$x\fR. The S\-magic avoids dropping | |
954 | the caching optimization and making (??{...}) constructs obscenely | |
955 | slow (and consequently useless). See also \*(L"Magic Variables\*(R" in perlguts. | |
956 | Regexp::Copy was affected by this change. | |
957 | .PP | |
958 | The Perl internal debugging macros \s-1\fIDEBUG\s0()\fR and \s-1\fIDEB\s0()\fR have been renamed | |
959 | to \s-1\fIPERL_DEBUG\s0()\fR and \s-1\fIPERL_DEB\s0()\fR to avoid namespace conflicts. | |
960 | .PP | |
961 | \&\f(CW\*(C`\-DL\*(C'\fR removed (the leaktest had been broken and unsupported for years, | |
962 | use alternative debugging mallocs or tools like valgrind and Purify). | |
963 | .PP | |
964 | Verbose modifier \f(CW\*(C`v\*(C'\fR added for \f(CW\*(C`\-DXv\*(C'\fR and \f(CW\*(C`\-Dsv\*(C'\fR, see perlrun. | |
965 | .SH "New Tests" | |
966 | .IX Header "New Tests" | |
967 | In Perl 5.8.0 there were about 69000 separate tests in about 700 test files, | |
968 | in Perl 5.8.1 there are about 77000 separate tests in about 780 test files. | |
969 | The exact numbers depend on the Perl configuration and on the operating | |
970 | system platform. | |
971 | .SH "Known Problems" | |
972 | .IX Header "Known Problems" | |
973 | The hash randomisation mentioned in \*(L"Incompatible Changes\*(R" is definitely | |
974 | problematic: it will wake dormant bugs and shake out bad assumptions. | |
975 | .PP | |
976 | If you want to use mod_perl 2.x with Perl 5.8.1, you will need | |
977 | mod_perl\-1.99_10 or higher. Earlier versions of mod_perl 2.x | |
978 | do not work with the randomised hashes. (mod_perl 1.x works fine.) | |
979 | You will also need Apache::Test 1.04 or higher. | |
980 | .PP | |
981 | Many of the rarer platforms that worked 100% or pretty close to it | |
982 | with perl 5.8.0 have been left a little bit untended since their | |
983 | maintainers have been otherwise busy lately, and therefore there will | |
984 | be more failures on those platforms. Such platforms include Mac \s-1OS\s0 | |
985 | Classic, \s-1IBM\s0 z/OS (and other \s-1EBCDIC\s0 platforms), and NetWare. The most | |
986 | common Perl platforms (Unix and Unix\-like, Microsoft platforms, and | |
987 | \&\s-1VMS\s0) have large enough testing and expert population that they are | |
988 | doing well. | |
989 | .Sh "Tied hashes in scalar context" | |
990 | .IX Subsection "Tied hashes in scalar context" | |
991 | Tied hashes do not currently return anything useful in scalar context, | |
992 | for example when used as boolean tests: | |
993 | .PP | |
994 | .Vb 1 | |
995 | \& if (%tied_hash) { ... } | |
996 | .Ve | |
997 | .PP | |
998 | The current nonsensical behaviour is always to return false, | |
999 | regardless of whether the hash is empty or has elements. | |
1000 | .PP | |
1001 | The root cause is that there is no interface for the implementors of | |
1002 | tied hashes to implement the behaviour of a hash in scalar context. | |
1003 | .Sh "Net::Ping 450_service and 510_ping_udp failures" | |
1004 | .IX Subsection "Net::Ping 450_service and 510_ping_udp failures" | |
1005 | The subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the | |
1006 | subtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have | |
1007 | an unusual networking setup. For example in the latter case the | |
1008 | test is trying to send a \s-1UDP\s0 ping to the \s-1IP\s0 address 127.0.0.1. | |
1009 | .Sh "B::C" | |
1010 | .IX Subsection "B::C" | |
1011 | The C\-generating compiler backend B::C (the frontend being | |
1012 | \&\f(CW\*(C`perlcc \-c\*(C'\fR) is even more broken than it used to be because of | |
1013 | the extensive lexical variable changes. (The good news is that | |
1014 | B::Bytecode and ByteLoader are better than they used to be.) | |
1015 | .SH "Platform Specific Problems" | |
1016 | .IX Header "Platform Specific Problems" | |
1017 | .Sh "\s-1EBCDIC\s0 Platforms" | |
1018 | .IX Subsection "EBCDIC Platforms" | |
1019 | \&\s-1IBM\s0 z/OS and other \s-1EBCDIC\s0 platforms continue to be problematic | |
1020 | regarding Unicode support. Many Unicode tests are skipped when | |
1021 | they really should be fixed. | |
1022 | .Sh "Cygwin 1.5 problems" | |
1023 | .IX Subsection "Cygwin 1.5 problems" | |
1024 | In Cygwin 1.5 the \fIio/tell\fR and \fIop/sysio\fR tests have failures for | |
1025 | some yet unknown reason. In 1.5.5 the threads tests stress_cv, | |
1026 | stress_re, and stress_string are failing unless the environment | |
1027 | variable \s-1PERLIO\s0 is set to \*(L"perlio\*(R" (which makes also the io/tell | |
1028 | failure go away). | |
1029 | .PP | |
1030 | Perl 5.8.1 does build and work well with Cygwin 1.3: with (uname \-a) | |
1031 | \&\f(CW\*(C`CYGWIN_NT\-5.0 ... 1.3.22(0.78/3/2) 2003\-03\-18 09:20 i686 ...\*(C'\fR | |
1032 | a 100% \*(L"make test\*(R" was achieved with \f(CW\*(C`Configure \-des \-Duseithreads\*(C'\fR. | |
1033 | .Sh "\s-1HP\-UX:\s0 \s-1HP\s0 cc warnings about sendfile and sendpath" | |
1034 | .IX Subsection "HP-UX: HP cc warnings about sendfile and sendpath" | |
1035 | With certain \s-1HP\s0 C compiler releases (e.g. B.11.11.02) you will | |
1036 | get many warnings like this (lines wrapped for easier reading): | |
1037 | .PP | |
1038 | .Vb 6 | |
1039 | \& cc: "/usr/include/sys/socket.h", line 504: warning 562: | |
1040 | \& Redeclaration of "sendfile" with a different storage class specifier: | |
1041 | \& "sendfile" will have internal linkage. | |
1042 | \& cc: "/usr/include/sys/socket.h", line 505: warning 562: | |
1043 | \& Redeclaration of "sendpath" with a different storage class specifier: | |
1044 | \& "sendpath" will have internal linkage. | |
1045 | .Ve | |
1046 | .PP | |
1047 | The warnings show up both during the build of Perl and during certain | |
1048 | lib/ExtUtils tests that invoke the C compiler. The warning, however, | |
1049 | is not serious and can be ignored. | |
1050 | .Sh "\s-1IRIX:\s0 t/uni/tr_7jis.t falsely failing" | |
1051 | .IX Subsection "IRIX: t/uni/tr_7jis.t falsely failing" | |
1052 | The test t/uni/tr_7jis.t is known to report failure under 'make test' | |
1053 | or the test harness with certain releases of \s-1IRIX\s0 (at least \s-1IRIX\s0 6.5 | |
1054 | and MIPSpro Compilers Version 7.3.1.1m), but if run manually the test | |
1055 | fully passes. | |
1056 | .Sh "Mac \s-1OS\s0 X: no usemymalloc" | |
1057 | .IX Subsection "Mac OS X: no usemymalloc" | |
1058 | The Perl malloc (\f(CW\*(C`\-Dusemymalloc\*(C'\fR) does not work at all in Mac \s-1OS\s0 X. | |
1059 | This is not that serious, though, since the native malloc works just | |
1060 | fine. | |
1061 | .Sh "Tru64: No threaded builds with \s-1GNU\s0 cc (gcc)" | |
1062 | .IX Subsection "Tru64: No threaded builds with GNU cc (gcc)" | |
1063 | In the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used | |
1064 | to compile a threaded Perl (\-Duseithreads) because the system | |
1065 | \&\f(CW\*(C`<pthread.h>\*(C'\fR file doesn't know about gcc. | |
1066 | .Sh "Win32: sysopen, sysread, syswrite" | |
1067 | .IX Subsection "Win32: sysopen, sysread, syswrite" | |
1068 | As of the 5.8.0 release, \fIsysopen()\fR/\fIsysread()\fR/\fIsyswrite()\fR do not behave | |
1069 | like they used to in 5.6.1 and earlier with respect to \*(L"text\*(R" mode. | |
1070 | These built-ins now always operate in \*(L"binary\*(R" mode (even if \fIsysopen()\fR | |
1071 | was passed the O_TEXT flag, or if \fIbinmode()\fR was used on the file | |
1072 | handle). Note that this issue should only make a difference for disk | |
1073 | files, as sockets and pipes have always been in \*(L"binary\*(R" mode in the | |
1074 | Windows port. As this behavior is currently considered a bug, | |
1075 | compatible behavior may be re-introduced in a future release. Until | |
1076 | then, the use of \fIsysopen()\fR, \fIsysread()\fR and \fIsyswrite()\fR is not supported | |
1077 | for \*(L"text\*(R" mode operations. | |
1078 | .SH "Future Directions" | |
1079 | .IX Header "Future Directions" | |
1080 | The following things \fBmight\fR happen in future. The first publicly | |
1081 | available releases having these characteristics will be the developer | |
1082 | releases Perl 5.9.x, culminating in the Perl 5.10.0 release. These | |
1083 | are our best guesses at the moment: we reserve the right to rethink. | |
1084 | .IP "\(bu" 4 | |
1085 | PerlIO will become The Default. Currently (in Perl 5.8.x) the stdio | |
1086 | library is still used if Perl thinks it can use certain tricks to | |
1087 | make stdio go \fBreally\fR fast. For future releases our goal is to | |
1088 | make PerlIO go even faster. | |
1089 | .IP "\(bu" 4 | |
1090 | A new feature called \fIassertions\fR will be available. This means that | |
1091 | one can have code called assertions sprinkled in the code: usually | |
1092 | they are optimised away, but they can be enabled with the \f(CW\*(C`\-A\*(C'\fR option. | |
1093 | .IP "\(bu" 4 | |
1094 | A new operator \f(CW\*(C`//\*(C'\fR (defined\-or) will be available. This means that | |
1095 | one will be able to say | |
1096 | .Sp | |
1097 | .Vb 1 | |
1098 | \& $a // $b | |
1099 | .Ve | |
1100 | .Sp | |
1101 | instead of | |
1102 | .Sp | |
1103 | .Vb 1 | |
1104 | \& defined $a ? $a : $b | |
1105 | .Ve | |
1106 | .Sp | |
1107 | and | |
1108 | .Sp | |
1109 | .Vb 1 | |
1110 | \& $c //= $d; | |
1111 | .Ve | |
1112 | .Sp | |
1113 | instead of | |
1114 | .Sp | |
1115 | .Vb 1 | |
1116 | \& $c = $d unless defined $c; | |
1117 | .Ve | |
1118 | .Sp | |
1119 | The operator will have the same precedence and associativity as \f(CW\*(C`||\*(C'\fR. | |
1120 | A source code patch against the Perl 5.8.1 sources will be available | |
1121 | in \s-1CPAN\s0 as \fIauthors/id/H/HM/HMBRAND/dor\-5.8.1.diff\fR. | |
1122 | .IP "\(bu" 4 | |
1123 | \&\f(CW\*(C`unpack()\*(C'\fR will default to unpacking the \f(CW$_\fR. | |
1124 | .IP "\(bu" 4 | |
1125 | Various Copy-On-Write techniques will be investigated in hopes | |
1126 | of speeding up Perl. | |
1127 | .IP "\(bu" 4 | |
1128 | \&\s-1CPANPLUS\s0, Inline, and Module::Build will become core modules. | |
1129 | .IP "\(bu" 4 | |
1130 | The ability to write true lexically scoped pragmas will be introduced. | |
1131 | .IP "\(bu" 4 | |
1132 | Work will continue on the bytecompiler and byteloader. | |
1133 | .IP "\(bu" 4 | |
1134 | v\-strings as they currently exist are scheduled to be deprecated. The | |
1135 | v\-less form (1.2.3) will become a \*(L"version object\*(R" when used with \f(CW\*(C`use\*(C'\fR, | |
1136 | \&\f(CW\*(C`require\*(C'\fR, and \f(CW$VERSION\fR. $^V will also be a \*(L"version object\*(R" so the | |
1137 | printf(\*(L"%vd\*(R",...) construct will no longer be needed. The v\-ful version | |
1138 | (v1.2.3) will become obsolete. The equivalence of strings and v\-strings (e.g. | |
1139 | that currently 5.8.0 is equal to \*(L"\e5\e8\e0\*(R") will go away. \fBThere may be no | |
1140 | deprecation warning for v\-strings\fR, though: it is quite hard to detect when | |
1141 | v\-strings are being used safely, and when they are not. | |
1142 | .IP "\(bu" 4 | |
1143 | 5.005 Threads Will Be Removed | |
1144 | .IP "\(bu" 4 | |
1145 | The \f(CW$*\fR Variable Will Be Removed | |
1146 | (it was deprecated a long time ago) | |
1147 | .IP "\(bu" 4 | |
1148 | Pseudohashes Will Be Removed | |
1149 | .SH "Reporting Bugs" | |
1150 | .IX Header "Reporting Bugs" | |
1151 | If you find what you think is a bug, you might check the articles | |
1152 | recently posted to the comp.lang.perl.misc newsgroup and the perl | |
1153 | bug database at http://bugs.perl.org/ . There may also be | |
1154 | information at http://www.perl.com/ , the Perl Home Page. | |
1155 | .PP | |
1156 | If you believe you have an unreported bug, please run the \fBperlbug\fR | |
1157 | program included with your release. Be sure to trim your bug down | |
1158 | to a tiny but sufficient test case. Your bug report, along with the | |
1159 | output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to perlbug@perl.org to be | |
1160 | analysed by the Perl porting team. You can browse and search | |
1161 | the Perl 5 bugs at http://bugs.perl.org/ | |
1162 | .SH "SEE ALSO" | |
1163 | .IX Header "SEE ALSO" | |
1164 | The \fIChanges\fR file for exhaustive details on what changed. | |
1165 | .PP | |
1166 | The \fI\s-1INSTALL\s0\fR file for how to build Perl. | |
1167 | .PP | |
1168 | The \fI\s-1README\s0\fR file for general stuff. | |
1169 | .PP | |
1170 | The \fIArtistic\fR and \fICopying\fR files for copyright information. |