Commit | Line | Data |
---|---|---|
c0924907 AB |
1 | =encoding utf8 |
2 | ||
01358b4a JV |
3 | =head1 NAME |
4 | ||
5 | perl5120delta - what is new for perl v5.12.0 | |
6 | ||
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes differences between the 5.10.0 release and | |
10 | the 5.12.0 release. | |
11 | ||
72d4e865 | 12 | Many of the bug fixes in 5.12.0 are already included in the 5.10.1 |
b16f1257 | 13 | maintenance release. |
72d4e865 JV |
14 | |
15 | You can see the list of those changes in the 5.10.1 release notes (L<perl5101delta>). | |
16 | ||
17 | ||
b6381718 | 18 | =head1 Core Enhancements |
72d4e865 JV |
19 | |
20 | =head2 New C<package NAME VERSION> syntax | |
21 | ||
22 | This new syntax allows a module author to set the $VERSION of a namespace | |
23 | when the namespace is declared with 'package'. It eliminates the need | |
24 | for C<our $VERSION = ...> and similar constructs. E.g. | |
25 | ||
26 | package Foo::Bar 1.23; | |
27 | # $Foo::Bar::VERSION == 1.23 | |
28 | ||
29 | There are several advantages to this: | |
30 | ||
b16f1257 | 31 | =over |
72d4e865 JV |
32 | |
33 | =item * | |
34 | ||
35 | C<$VERSION> is parsed in exactly the same way as C<use NAME VERSION> | |
36 | ||
37 | =item * | |
38 | ||
39 | C<$VERSION> is set at compile time | |
40 | ||
41 | =item * | |
42 | ||
43 | C<$VERSION> is a version object that provides proper overloading of | |
4655b0a1 | 44 | comparison operators so comparing C<$VERSION> to decimal (1.23) or |
72d4e865 JV |
45 | dotted-decimal (v1.2.3) version numbers works correctly. |
46 | ||
47 | =item * | |
48 | ||
49 | Eliminates C<$VERSION = ...> and C<eval $VERSION> clutter | |
50 | ||
51 | =item * | |
52 | ||
53 | As it requires VERSION to be a numeric literal or v-string | |
54 | literal, it can be statically parsed by toolchain modules | |
55 | without C<eval> the way MM-E<gt>parse_version does for C<$VERSION = ...> | |
56 | ||
e014eb68 | 57 | =back |
72d4e865 JV |
58 | |
59 | It does not break old code with only C<package NAME>, but code that uses | |
60 | C<package NAME VERSION> will need to be restricted to perl 5.12.0 or newer | |
61 | This is analogous to the change to C<open> from two-args to three-args. | |
62 | Users requiring the latest Perl will benefit, and perhaps after several | |
63 | years, it will become a standard practice. | |
64 | ||
72d4e865 JV |
65 | |
66 | However, C<package NAME VERSION> requires a new, 'strict' version | |
67 | number format. See L<"Version number formats"> for details. | |
68 | ||
69 | ||
70 | =head2 The C<...> operator | |
71 | ||
72 | A new operator, C<...>, nicknamed the Yada Yada operator, has been added. | |
73 | It is intended to mark placeholder code that is not yet implemented. | |
79849ba8 | 74 | See L<perlop/"Yada Yada Operator">. |
72d4e865 JV |
75 | |
76 | =head2 Implicit strictures | |
77 | ||
78 | Using the C<use VERSION> syntax with a version number greater or equal | |
79 | to 5.11.0 will lexically enable strictures just like C<use strict> | |
80 | would do (in addition to enabling features.) The following: | |
81 | ||
82 | use 5.12.0; | |
83 | ||
84 | means: | |
85 | ||
86 | use strict; | |
87 | use feature ':5.12'; | |
01358b4a | 88 | |
b6381718 | 89 | =head2 Unicode improvements |
01358b4a | 90 | |
b6381718 JV |
91 | Perl 5.12 comes with Unicode 5.2, the latest version available to |
92 | us at the time of release. This version of Unicode was released in | |
93 | October 2009. See L<http://www.unicode.org/versions/Unicode5.2.0> for | |
94 | further details about what's changed in this version of the standard. | |
95 | See L<perlunicode> for instructions on installing and using other versions | |
96 | of Unicode. | |
97 | ||
98 | Additionally, Perl's developers have significantly improved Perl's Unicode | |
99 | implementation. For full details, see L</Unicode overhaul> below. | |
100 | ||
101 | =head2 Y2038 compliance | |
102 | ||
103 | Perl's core time-related functions are now Y2038 compliant. (It may not mean much to you, but your kids will love it!) | |
3ab3a109 JV |
104 | |
105 | =head2 qr overloading | |
106 | ||
107 | It is now possible to overload the C<qr//> operator, that is, | |
108 | conversion to regexp, like it was already possible to overload | |
109 | conversion to boolean, string or number of objects. It is invoked when | |
c66407fa | 110 | an object appears on the right hand side of the C<=~> operator or when |
3ab3a109 JV |
111 | it is interpolated into a regexp. See L<overload>. |
112 | ||
113 | =head2 Pluggable keywords | |
114 | ||
115 | Extension modules can now cleanly hook into the Perl parser to define | |
116 | new kinds of keyword-headed expression and compound statement. The | |
117 | syntax following the keyword is defined entirely by the extension. This | |
118 | allow a completely non-Perl sublanguage to be parsed inline, with the | |
b16f1257 | 119 | correct ops cleanly generated. |
3ab3a109 JV |
120 | |
121 | See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core | |
122 | source distribution also includes a new module | |
123 | L<XS::APItest::KeywordRPN>, which implements reverse Polish notation | |
124 | arithmetic via pluggable keywords. This module is mainly used for test | |
125 | purposes, and is not normally installed, but also serves as an example | |
126 | of how to use the new mechanism. | |
127 | ||
72d4e865 JV |
128 | Perl's developers consider this feature to be experimental. We may remove |
129 | it or change it in a backwards-incompatible way in Perl 5.14. | |
130 | ||
3ab3a109 JV |
131 | =head2 APIs for more internals |
132 | ||
133 | The lowest layers of the lexer and parts of the pad system now have C | |
134 | APIs available to XS extensions. These are necessary to support proper | |
135 | use of pluggable keywords, but have other uses too. The new APIs are | |
136 | experimental, and only cover a small proportion of what would be | |
137 | necessary to take full advantage of the core's facilities in these | |
138 | areas. It is intended that the Perl 5.13 development cycle will see the | |
139 | addition of a full range of clean, supported interfaces. | |
140 | ||
72d4e865 JV |
141 | Perl's developers consider this feature to be experimental. We may remove |
142 | it or change it in a backwards-incompatible way in Perl 5.14. | |
143 | ||
3ab3a109 JV |
144 | =head2 Overridable function lookup |
145 | ||
146 | Where an extension module hooks the creation of rv2cv ops to modify the | |
147 | subroutine lookup process, this now works correctly for bareword | |
148 | subroutine calls. This means that prototypes on subroutines referenced | |
149 | this way will be processed correctly. (Previously bareword subroutine | |
150 | names were initially looked up, for parsing purposes, by an unhookable | |
151 | mechanism, so extensions could only properly influence subroutine names | |
152 | that appeared with an C<&> sigil.) | |
153 | ||
3ab3a109 JV |
154 | =head2 A proper interface for pluggable Method Resolution Orders |
155 | ||
72d4e865 JV |
156 | As of Perl 5.12.0 there is a new interface for plugging and using method |
157 | resolution orders other than the default linear depth first search. | |
3ab3a109 JV |
158 | The C3 method resolution order added in 5.10.0 has been re-implemented as |
159 | a plugin, without changing its Perl-space interface. See L<perlmroapi> for | |
160 | more information. | |
161 | ||
b3b85878 | 162 | |
5e75e599 | 163 | |
72d4e865 | 164 | =head2 C<\N> experimental regex escape |
3ab3a109 | 165 | |
72d4e865 JV |
166 | Perl now supports C<\N>, a new regex escape which you can think of as |
167 | the inverse of C<\n>. It will match any character that is not a newline, | |
168 | independently from the presence or absence of the single line match | |
169 | modifier C</s>. It is not usable within a character class. C<\N{3}> | |
170 | means to match 3 non-newlines; C<\N{5,}> means to match at least 5. | |
171 | C<\N{NAME}> still means the character or sequence named C<NAME>, but | |
172 | C<NAME> no longer can be things like C<3>, or C<5,>. | |
173 | ||
174 | This will break a L<custom charnames translator|charnames/CUSTOM | |
175 | TRANSLATORS> which allows numbers for character names, as C<\N{3}> will | |
176 | now mean to match 3 non-newline characters, and not the character whose | |
177 | name is C<3>. (No name defined by the Unicode standard is a number, | |
178 | so only custom translators might be affected.) | |
179 | ||
180 | Perl's developers are somewhat concerned about possible user confusion | |
181 | with the existing C<\N{...}> construct which matches characters by their | |
182 | Unicode name. Consequently, this feature is experimental. We may remove | |
183 | it or change it in a backwards-incompatible way in Perl 5.14. | |
3ab3a109 JV |
184 | |
185 | =head2 DTrace support | |
186 | ||
72d4e865 | 187 | Perl now has some support for DTrace. See "DTrace support" in F<INSTALL>. |
3ab3a109 JV |
188 | |
189 | =head2 Support for C<configure_requires> in CPAN module metadata | |
190 | ||
191 | Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires> keyword | |
192 | in the F<META.yml> metadata file included in most recent CPAN distributions. | |
193 | This allows distribution authors to specify configuration prerequisites that | |
194 | must be installed before running F<Makefile.PL> or F<Build.PL>. | |
195 | ||
196 | See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for more | |
197 | on how to specify C<configure_requires> when creating a distribution for CPAN. | |
198 | ||
199 | =head2 C<each> is now more flexible | |
200 | ||
201 | The C<each> function can now operate on arrays. | |
202 | ||
8a4f3f14 VP |
203 | =head2 C<when> as a statement modifier |
204 | ||
205 | C<when> is now allowed to be used as a statement modifier. | |
206 | ||
3ab3a109 JV |
207 | =head2 C<$,> flexibility |
208 | ||
209 | The variable C<$,> may now be tied. | |
210 | ||
61f382b0 | 211 | =head2 // in when clauses |
3ab3a109 JV |
212 | |
213 | // now behaves like || in when clauses | |
214 | ||
215 | =head2 Enabling warnings from your shell environment | |
216 | ||
217 | You can now set C<-W> from the C<PERL5OPT> environment variable | |
218 | ||
219 | =head2 C<delete local> | |
220 | ||
221 | C<delete local> now allows you to locally delete a hash entry. | |
222 | ||
223 | =head2 New support for Abstract namespace sockets | |
224 | ||
225 | Abstract namespace sockets are Linux-specific socket type that live in | |
226 | AF_UNIX family, slightly abusing it to be able to use arbitrary | |
227 | character arrays as addresses: They start with nul byte and are not | |
228 | terminated by nul byte, but with the length passed to the socket() | |
229 | system call. | |
230 | ||
72d4e865 | 231 | =head2 32-bit limit on substr arguments removed |
3ab3a109 | 232 | |
72d4e865 JV |
233 | The 32-bit limit on C<substr> arguments has now been removed. The full range |
234 | of the system's signed and unsigned integers is now available for the C<pos> | |
235 | and C<len> arguments. | |
3ab3a109 | 236 | |
b6381718 | 237 | =head1 Potentially Incompatible Changes |
3ab3a109 | 238 | |
72d4e865 | 239 | =head2 Deprecations warn by default |
3ab3a109 | 240 | |
72d4e865 JV |
241 | Perl now defaults to issuing a warning if a deprecated language feature |
242 | is used. | |
252eec4f | 243 | |
72d4e865 JV |
244 | To disable this feature in a given lexical scope, you should use C<no |
245 | warnings 'deprecated';> For information about which language features | |
246 | are deprecated and explanations of various deprecation warnings, please | |
b6381718 JV |
247 | see L<perldiag.pod>. See L</Deprecations> below for the list of features |
248 | and modules Perl's developers have deprecated as part of this release. | |
3ab3a109 JV |
249 | |
250 | =head2 Version number formats | |
251 | ||
252 | Acceptable version number formats have been formalized into "strict" and | |
72d4e865 | 253 | "lax" rules. C<package NAME VERSION> takes a strict version number. |
fab55263 | 254 | C<UNIVERSAL::VERSION> and the L<version> object constructors take lax |
72d4e865 JV |
255 | version numbers. Providing an invalid version will result in a fatal |
256 | error. The version argument in C<use NAME VERSION> is first parsed as a | |
fab55263 DG |
257 | numeric literal or v-string and then passed to C<UNIVERSAL::VERSION> |
258 | (and must then pass the "lax" format test). | |
259 | ||
72d4e865 | 260 | These formats are documented fully in the L<version> module. To a first |
fab55263 DG |
261 | approximation, a "strict" version number is a positive decimal number |
262 | (integer or decimal-fraction) without exponentiation or else a | |
263 | dotted-decimal v-string with a leading 'v' character and at least three | |
72d4e865 JV |
264 | components. A "lax" version number allows v-strings with fewer than |
265 | three components or without a leading 'v'. Under "lax" rules, both | |
fab55263 DG |
266 | decimal and dotted-decimal versions may have a trailing "alpha" |
267 | component separated by an underscore character after a fractional or | |
268 | dotted-decimal component. | |
3ab3a109 JV |
269 | |
270 | The L<version> module adds C<version::is_strict> and C<version::is_lax> | |
271 | functions to check a scalar against these rules. | |
272 | ||
c66407fa | 273 | =head2 @INC reorganization |
3ab3a109 | 274 | |
b6381718 JV |
275 | In C<@INC>, C<ARCHLIB> and C<PRIVLIB> now occur after after the current |
276 | version's C<site_perl> and C<vendor_perl>. Modules installed into | |
277 | C<site_perl> and C<vendor_perl> will now be loaded in preference to | |
278 | those installed in C<ARCHLIB> and C<PRIVLIB>. | |
3ab3a109 JV |
279 | |
280 | =head2 Switch statement changes | |
281 | ||
b6381718 JV |
282 | The C<given>/C<when> switch statement handles complex statements better |
283 | than Perl 5.10.0 did (These enhancements are also available in | |
284 | 5.10.1 and subsequent 5.10 releases.) There are two new cases where | |
c66407fa RS |
285 | C<when> now interprets its argument as a boolean, instead of an |
286 | expression to be used in a smart match: | |
3ab3a109 | 287 | |
b6381718 JV |
288 | =over |
289 | ||
290 | =item flip-flop operators | |
3ab3a109 JV |
291 | |
292 | The C<..> and C<...> flip-flop operators are now evaluated in boolean | |
293 | context, following their usual semantics; see L<perlop/"Range Operators">. | |
294 | ||
295 | Note that, as in perl 5.10.0, C<when (1..10)> will not work to test | |
296 | whether a given value is an integer between 1 and 10; you should use | |
297 | C<when ([1..10])> instead (note the array reference). | |
298 | ||
299 | However, contrary to 5.10.0, evaluating the flip-flop operators in boolean | |
300 | context ensures it can now be useful in a C<when()>, notably for | |
301 | implementing bistable conditions, like in: | |
302 | ||
303 | when (/^=begin/ .. /^=end/) { | |
304 | # do something | |
305 | } | |
306 | ||
b6381718 | 307 | =item defined-or operator |
3ab3a109 JV |
308 | |
309 | A compound expression involving the defined-or operator, as in | |
310 | C<when (expr1 // expr2)>, will be treated as boolean if the first | |
311 | expression is boolean. (This just extends the existing rule that applies | |
312 | to the regular or operator, as in C<when (expr1 || expr2)>.) | |
313 | ||
b6381718 JV |
314 | =back |
315 | ||
3ab3a109 JV |
316 | =head2 Smart match changes |
317 | ||
b6381718 JV |
318 | Since Perl 5.10.0, Perl's developers have made a number of changes to |
319 | the smart match operator. These, of course, also alter the behaviour | |
3ab3a109 | 320 | of the switch statements where smart matching is implicitly used. |
c66407fa | 321 | These changes were also made for the 5.10.1 release, and will remain in |
3ab3a109 JV |
322 | subsequent 5.10 releases. |
323 | ||
3ab3a109 JV |
324 | =head3 Changes to type-based dispatch |
325 | ||
326 | The smart match operator C<~~> is no longer commutative. The behaviour of | |
327 | a smart match now depends primarily on the type of its right hand | |
328 | argument. Moreover, its semantics have been adjusted for greater | |
329 | consistency or usefulness in several cases. While the general backwards | |
330 | compatibility is maintained, several changes must be noted: | |
331 | ||
332 | =over 4 | |
333 | ||
334 | =item * | |
335 | ||
336 | Code references with an empty prototype are no longer treated specially. | |
337 | They are passed an argument like the other code references (even if they | |
338 | choose to ignore it). | |
339 | ||
340 | =item * | |
341 | ||
342 | C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine | |
343 | returns a true value for each key of the hash (or element of the | |
344 | array), instead of passing the whole hash or array as a reference to | |
345 | the subroutine. | |
346 | ||
347 | =item * | |
348 | ||
349 | Due to the commutativity breakage, code references are no longer | |
350 | treated specially when appearing on the left of the C<~~> operator, | |
351 | but like any vulgar scalar. | |
352 | ||
353 | =item * | |
354 | ||
355 | C<undef ~~ %hash> is always false (since C<undef> can't be a key in a | |
356 | hash). No implicit conversion to C<""> is done (as was the case in perl | |
357 | 5.10.0). | |
358 | ||
359 | =item * | |
360 | ||
361 | C<$scalar ~~ @array> now always distributes the smart match across the | |
362 | elements of the array. It's true if one element in @array verifies | |
363 | C<$scalar ~~ $element>. This is a generalization of the old behaviour | |
364 | that tested whether the array contained the scalar. | |
365 | ||
366 | =back | |
367 | ||
368 | The full dispatch table for the smart match operator is given in | |
369 | L<perlsyn/"Smart matching in detail">. | |
370 | ||
371 | =head3 Smart match and overloading | |
372 | ||
373 | According to the rule of dispatch based on the rightmost argument type, | |
374 | when an object overloading C<~~> appears on the right side of the | |
375 | operator, the overload routine will always be called (with a 3rd argument | |
376 | set to a true value, see L<overload>.) However, when the object will | |
377 | appear on the left, the overload routine will be called only when the | |
c66407fa RS |
378 | rightmost argument is a simple scalar. This way, distributivity of smart |
379 | match across arrays is not broken, as well as the other behaviours with | |
380 | complex types (coderefs, hashes, regexes). Thus, writers of overloading | |
381 | routines for smart match mostly need to worry only with comparing | |
382 | against a scalar, and possibly with stringification overloading; the | |
383 | other common cases will be automatically handled consistently. | |
3ab3a109 JV |
384 | |
385 | C<~~> will now refuse to work on objects that do not overload it (in order | |
386 | to avoid relying on the object's underlying structure). (However, if the | |
387 | object overloads the stringification or the numification operators, and | |
388 | if overload fallback is active, it will be used instead, as usual.) | |
389 | ||
b6381718 | 390 | =head2 Other potentially incompatible changes |
3ab3a109 JV |
391 | |
392 | =over 4 | |
393 | ||
394 | =item * | |
395 | ||
b16f1257 JV |
396 | The definitions of a number of Unicode properties have changed to match |
397 | those of the current Unicode standard. These are listed above under | |
b6381718 | 398 | L</Unicode overhaul>. This change may break code that expects the old definitions. |
3ab3a109 JV |
399 | |
400 | =item * | |
401 | ||
b6381718 | 402 | The boolkeys op has moved to the group of hash ops. This breaks binary |
b21d8e53 | 403 | compatibility. |
c66407fa RS |
404 | |
405 | =item * | |
406 | ||
72d4e865 | 407 | Filehandles are now always blessed into C<IO::File>. |
c66407fa RS |
408 | |
409 | The previous behaviour was to bless Filehandles into L<FileHandle> | |
410 | (an empty proxy class) if it was loaded into memory and otherwise | |
411 | to bless them into C<IO::Handle>. | |
412 | ||
413 | =item * | |
414 | ||
415 | The semantics of C<use feature :5.10*> have changed slightly. | |
416 | See L<"Modules and Pragmata"> for more information. | |
3ab3a109 JV |
417 | |
418 | =item * | |
419 | ||
b6381718 JV |
420 | Perl's developers now use git, rather than Perforce. This should be |
421 | a purely internal change only relevant to people actively working on | |
422 | the core. However, you may see minor difference in perl as a consequence | |
423 | of the change. For example in some of details of the output of C<perl | |
424 | -V>. See L<perlrepository> for more information. | |
3ab3a109 JV |
425 | |
426 | =item * | |
427 | ||
428 | As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental | |
429 | C<Test::Harness::Straps> module has been removed. | |
b6381718 | 430 | See L</"Modules and Pragmata"> for more details. |
3ab3a109 JV |
431 | |
432 | =item * | |
433 | ||
434 | As part of the C<ExtUtils::MakeMaker> upgrade, the | |
435 | C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules | |
436 | have been removed from this distribution. | |
437 | ||
438 | =item * | |
439 | ||
440 | C<Module::CoreList> no longer contains the C<%:patchlevel> hash. | |
441 | ||
3ab3a109 JV |
442 | |
443 | =item * | |
444 | ||
445 | C<length undef> now returns undef. | |
446 | ||
447 | =item * | |
448 | ||
449 | Unsupported private C API functions are now declared "static" to prevent | |
450 | leakage to Perl's public API. | |
451 | ||
452 | =item * | |
453 | ||
454 | To support the bootstrapping process, F<miniperl> no longer builds with | |
455 | UTF-8 support in the regexp engine. | |
456 | ||
457 | This allows a build to complete with PERL_UNICODE set and a UTF-8 locale. | |
458 | Without this there's a bootstrapping problem, as miniperl can't load the UTF-8 | |
459 | components of the regexp engine, because they're not yet built. | |
460 | ||
461 | =item * | |
462 | ||
c66407fa RS |
463 | F<miniperl>'s @INC is now restricted to just C<-I...>, the split of |
464 | C<$ENV{PERL5LIB}>, and "C<.>" | |
3ab3a109 JV |
465 | |
466 | =item * | |
467 | ||
468 | A space or a newline is now required after a C<"#line XXX"> directive. | |
469 | ||
470 | =item * | |
471 | ||
472 | Tied filehandles now have an additional method EOF which provides the EOF type | |
473 | ||
474 | =item * | |
475 | ||
c66407fa RS |
476 | To better match all other flow control statements, C<foreach> may no |
477 | longer be used as an attribute. | |
3ab3a109 JV |
478 | |
479 | =back | |
480 | ||
b6381718 | 481 | |
3ab3a109 JV |
482 | =head1 Deprecations |
483 | ||
484 | From time to time, Perl's developers find it necessary to deprecate | |
485 | features or modules we've previously shipped as part of the core | |
486 | distribution. We are well aware of the pain and frustration that a | |
487 | backwards-incompatible change to Perl can cause for developers building | |
488 | or maintaining software in Perl. You can be sure that when we deprecate | |
489 | a functionality or syntax, it isn't a choice we make lightly. Sometimes, | |
490 | we choose to deprecate functionality or syntax because it was found to | |
491 | be poorly designed or implemented. Sometimes, this is because they're | |
492 | holding back other features or causing performance problems. Sometimes, | |
493 | the reasons are more complex. Wherever possible, we try to keep deprecated | |
494 | functionality available to developers in its previous form for at least | |
72d4e865 | 495 | one major release. So long as a deprecated feature isn't actively |
3ab3a109 JV |
496 | disrupting our ability to maintain and extend Perl, we'll try to leave |
497 | it in place as long as possible. | |
498 | ||
b6381718 | 499 | The following items are now deprecated: |
3ab3a109 | 500 | |
b6381718 JV |
501 | =over |
502 | ||
503 | =item suidperl | |
504 | ||
505 | C<suidperl> is no longer part of Perl. It used to provide a mechanism to | |
506 | emulate setuid permission bits on systems that don't support it properly. | |
3ab3a109 | 507 | |
b6381718 JV |
508 | |
509 | =item Use of C<:=> to mean an empty attribute list | |
3ab3a109 JV |
510 | |
511 | An accident of Perl's parser meant that these constructions were all | |
512 | equivalent: | |
513 | ||
514 | my $pi := 4; | |
515 | my $pi : = 4; | |
516 | my $pi : = 4; | |
517 | ||
518 | with the C<:> being treated as the start of an attribute list, which | |
519 | ends before the C<=>. As whitespace is not significant here, all are | |
520 | parsed as an empty attribute list, hence all the above are equivalent | |
521 | to, and better written as | |
522 | ||
523 | my $pi = 4; | |
524 | ||
525 | because no attribute processing is done for an empty list. | |
526 | ||
527 | As is, this meant that C<:=> cannot be used as a new token, without | |
528 | silently changing the meaning of existing code. Hence that particular | |
529 | form is now deprecated, and will become a syntax error. If it is | |
530 | absolutely necessary to have empty attribute lists (for example, | |
531 | because of a code generator) then avoid the warning by adding a space | |
532 | before the C<=>. | |
533 | ||
c66407fa | 534 | =item C<< UNIVERSAL->import() >> |
3ab3a109 | 535 | |
72d4e865 | 536 | The method C<< UNIVERSAL->import() >> is now deprecated. Attempting to |
3ab3a109 | 537 | pass import arguments to a C<use UNIVERSAL> statement will result in a |
c66407fa | 538 | deprecation warning. |
3ab3a109 | 539 | |
b6381718 JV |
540 | |
541 | =item Use of "goto" to jump into a construct | |
3ab3a109 | 542 | |
c66407fa RS |
543 | Using C<goto> to jump from an outer scope into an inner scope is now |
544 | deprecated. This rare use case was causing problems in the | |
545 | implementation of scopes. | |
3ab3a109 | 546 | |
b6381718 | 547 | =item Custom character names in \N{name} that don't look like names |
8c66a230 | 548 | |
72d4e865 | 549 | In C<\N{I<name>}>, I<name> can be just about anything. The standard Unicode |
8c66a230 | 550 | names have a very limited domain, but a custom name translator could create |
72d4e865 | 551 | names that are, for example, made up entirely of punctuation symbols. It is |
8c66a230 KW |
552 | now deprecated to make names that don't begin with an alphabetic character, and |
553 | aren't alphanumeric or contain other than a very few other characters, | |
72d4e865 | 554 | namely spaces, dashes, parentheses and colons. Because of the added meaning of |
8c66a230 | 555 | C<\N> (See L</C<\N> experimental regex escape>), names that look like curly |
72d4e865 | 556 | brace -enclosed quantifiers won't work. For example, C<\N{3,4}> now means to |
8c66a230 KW |
557 | match 3 to 4 non-newlines; before a custom name C<3,4> could have been created. |
558 | ||
3ab3a109 JV |
559 | =item Deprecated Modules |
560 | ||
561 | The following modules will be removed from the core distribution in a future | |
562 | release, and should be installed from CPAN instead. Distributions on CPAN | |
563 | which require these should add them to their prerequisites. The core versions | |
564 | of these modules warnings will issue a deprecation warning. | |
565 | ||
8df7d2a3 JV |
566 | If you ship a packaged version of Perl, either alone or as part of a larger |
567 | system, then you should carefully consider the reprecussions of core module | |
72d4e865 | 568 | deprecations. You may want to consider shipping your default build of |
8df7d2a3 JV |
569 | Perl with packages for some or all deprecated modules which install into |
570 | C<vendor> or C<site> perl library directories. This will inhibit the | |
571 | deprecation warnings. | |
572 | ||
573 | Alternatively, you may want to consider patching F<lib/deprecate.pm> | |
574 | to provide deprecation warnings specific to your packaging system or | |
b951c6bd NC |
575 | distribution of Perl, consistent with how your packaging system or |
576 | distribution manages a staged transition from a release where the | |
577 | installation of a single package provides the given functionality, to a later | |
578 | release where the system administrator needs to know to install multiple | |
579 | packages to get that same functionality. | |
8df7d2a3 | 580 | |
3ab3a109 JV |
581 | =over |
582 | ||
c66407fa RS |
583 | =item L<Class::ISA> |
584 | ||
585 | =item L<Pod::Plainer> | |
586 | ||
587 | =item L<Shell> | |
3ab3a109 | 588 | |
c66407fa | 589 | =item L<Switch> |
3ab3a109 | 590 | |
b6381718 JV |
591 | Switch is buggy and should be avoided. You may find Perl's new |
592 | C<given>/C<when> feature a suitable replacement. See L<perlsyn/"Switch | |
593 | statements"> for more information. | |
3ab3a109 JV |
594 | |
595 | =back | |
596 | ||
3ab3a109 JV |
597 | =item Assignment to $[ |
598 | ||
b6381718 | 599 | =item Use of the attribute :locked on subroutines |
3ab3a109 | 600 | |
b6381718 | 601 | =item Use of "locked" with the attributes pragma |
3ab3a109 | 602 | |
b6381718 | 603 | =item Use of "unique" with the attributes pragma |
3ab3a109 | 604 | |
b6381718 | 605 | =item Perl_pmflag |
3ab3a109 | 606 | |
b6381718 JV |
607 | C<Perl_pmflag> is no longer part of Perl's public API. Calling it now |
608 | generates a deprecation warning, and it will be removed in a future | |
609 | release. Although listed as part of the API, it was never documented, | |
610 | and only ever used in F<toke.c>, and prior to 5.10, F<regcomp.c>. In | |
611 | core, it has been replaced by a static function. | |
3ab3a109 | 612 | |
b6381718 | 613 | =item Numerous Perl 4-era libraries |
3ab3a109 JV |
614 | |
615 | F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>, | |
616 | F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>, | |
617 | F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>, | |
618 | F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>, | |
619 | F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>, | |
620 | F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and | |
621 | F<timelocal.pl> are all now deprecated. Using them will incur a warning. | |
622 | ||
b6381718 | 623 | |
3ab3a109 JV |
624 | =back |
625 | ||
b6381718 | 626 | =head1 Unicode overhaul |
3ab3a109 | 627 | |
b6381718 JV |
628 | Perl's developers have made a concerted effort to update Perl to be in |
629 | sync with the latest Unicode standard. Changes for this include: | |
3ab3a109 | 630 | |
b6381718 JV |
631 | Perl can now handle every Unicode character property. New documentation, |
632 | L<perluniprops>, lists all available non-Unihan character properties. By | |
633 | default, perl does not expose Unihan, deprecated or Unicode-internal | |
634 | properties. See below for more details on these; there is also a section | |
635 | in the pod listing them, and explaining why they are not exposed. | |
3ab3a109 | 636 | |
b6381718 JV |
637 | Perl now fully supports the Unicode compound-style of using C<=> and C<:> |
638 | in writing regular expressions: C<\p{property=value}> and | |
639 | C<\p{property:value}> (both of which mean the same thing). | |
3ab3a109 | 640 | |
b6381718 JV |
641 | Perl now fully supports the Unicode loose matching rules for text |
642 | between the braces in C<\p{...}> constructs. In addition, Perl allows | |
643 | underscores between digits of numbers. | |
3ab3a109 | 644 | |
b6381718 | 645 | Perl now accepts all the Unicode-defined synonyms for properties and property values. |
3ab3a109 | 646 | |
b6381718 JV |
647 | C<qr/\X/>, which matches a Unicode logical character, has been expanded to work |
648 | better with various Asian languages. It now is defined as an I<extended | |
649 | grapheme cluster>. (See L<http://www.unicode.org/reports/tr29/>). | |
650 | Anything matched previously and that made sense will continue to be | |
651 | accepted. Additionally: | |
3ab3a109 | 652 | |
b6381718 | 653 | =over |
3ab3a109 | 654 | |
b6381718 JV |
655 | =item * |
656 | ||
657 | C<\X> will not break apart a C<S<CR LF>> sequence. | |
3ab3a109 JV |
658 | |
659 | =item * | |
660 | ||
b6381718 JV |
661 | C<\X> will now match a sequence which includes the C<ZWJ> and C<ZWNJ> characters. |
662 | ||
663 | =item * | |
3ab3a109 | 664 | |
b6381718 JV |
665 | C<\X> will now always match at least one character, including an initial mark. |
666 | Marks generally come after a base character, but it is possible in Unicode to | |
667 | have them in isolation, and C<\X> will now handle that case, for example at the | |
668 | beginning of a line, or after a C<ZWSP>. And this is the part where C<\X> | |
669 | doesn't match the things that it used to that don't make sense. Formerly, for | |
670 | example, you could have the nonsensical case of an accented LF. | |
3ab3a109 JV |
671 | |
672 | =item * | |
673 | ||
b6381718 JV |
674 | C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai and Lao |
675 | exception cases. | |
3ab3a109 | 676 | |
b6381718 | 677 | =back |
3ab3a109 | 678 | |
a56dbb5e JV |
679 | Otherwise, this change should be transparent for the non-affected |
680 | languages. | |
3ab3a109 | 681 | |
b6381718 | 682 | C<\p{...}> matches using the Canonical_Combining_Class property were |
a56dbb5e JV |
683 | completely broken in previous releases of Perl. They should now work |
684 | correctly. | |
685 | ||
686 | Before Perl 5.12, the Unicode C<Decomposition_Type=Compat> property | |
687 | and a Perl extension had the same name, which led to neither matching | |
688 | all the correct values (with more than 100 mistakes in one, and several | |
689 | thousand in the other). The Perl extension has now been renamed to be | |
690 | C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the | |
691 | same meaning as was previously intended, namely the union of all the | |
692 | non-canonical Decomposition types, with Unicode C<Compat> being just | |
693 | one of those. | |
3ab3a109 | 694 | |
b6381718 | 695 | C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables. |
3ab3a109 | 696 | |
a56dbb5e JV |
697 | C<\p{Uppercase}> and C<\p{Lowercase}> now work as the Unicode standard |
698 | says they should. This means they each match a few more characters than | |
699 | they used to. | |
3ab3a109 | 700 | |
a56dbb5e JV |
701 | C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This |
702 | means it no longer will match Private Use (gc=co), Surrogates (gc=cs), | |
703 | nor Format (gc=cf) code points. The Format code points represent the | |
704 | biggest possible problem. All but 36 of them are either officially | |
705 | deprecated or strongly discouraged from being used. Of those 36, likely | |
706 | the most widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, | |
707 | WJ, and similar characters, plus bidirectional controls. | |
3ab3a109 | 708 | |
a56dbb5e JV |
709 | C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. Before |
710 | 5.12, Perl's definition definition included a number of things that aren't | |
711 | really alpha (all marks) while omitting many that were. The definitions | |
712 | of C<\p{Alnum}> and C<\p{Word}> depend on Alpha's definition and have | |
713 | changed accordingly. | |
3ab3a109 | 714 | |
a56dbb5e JV |
715 | C<\p{Word}> no longer incorrectly matches non-word characters such |
716 | as fractions. | |
3ab3a109 | 717 | |
a56dbb5e JV |
718 | C<\p{Print}> no longer matches the line control characters: Tab, LF, |
719 | CR, FF, VT, and NEL. This brings it in line with standards and the | |
720 | documentation. | |
3ab3a109 | 721 | |
b6381718 JV |
722 | C<\p{XDigit}> now matches the same characters as C<\p{Hex_Digit}>. This |
723 | means that in addition to the characters it currently matches, | |
724 | C<[A-Fa-f0-9]>, it will also match the 22 fullwidth equivalents, for | |
725 | example U+FF10: FULLWIDTH DIGIT ZERO. | |
3ab3a109 | 726 | |
b6381718 JV |
727 | The Numeric type property has been extended to include the Unihan |
728 | characters. | |
3ab3a109 | 729 | |
b6381718 JV |
730 | There is a new Perl extension, the 'Present_In', or simply 'In', |
731 | property. This is an extension of the Unicode Age property, but | |
732 | C<\p{In=5.0}> matches any code point whose usage has been determined | |
733 | I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points | |
734 | added in I<precisely> version 5.0. | |
3ab3a109 | 735 | |
b6381718 | 736 | A number of properties now have the correct values for unassigned |
a56dbb5e JV |
737 | code points. The affected properties are Bidi_Class, East_Asian_Width, |
738 | Joining_Type, Decomposition_Type, Hangul_Syllable_Type, Numeric_Type, | |
739 | and Line_Break. | |
3ab3a109 | 740 | |
b6381718 JV |
741 | The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties |
742 | are now up to date with current Unicode definitions. | |
3ab3a109 | 743 | |
a56dbb5e JV |
744 | Earlier versions of Perl erroneously exposed certain properties that |
745 | are supposed to be Unicode internal-only. Use of these in regular | |
746 | expressions will now generate, if enabled, a deprecation warning message. | |
b6381718 JV |
747 | The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point, |
748 | Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase, | |
749 | Other_Math, and Other_Uppercase. | |
3ab3a109 | 750 | |
b6381718 JV |
751 | It is now possible to change which Unicode properties Perl understands |
752 | on a per-installation basis. As mentioned above, certain properties | |
753 | are turned off by default. These include all the Unihan properties | |
754 | (which should be accessible via the CPAN module Unicode::Unihan) and any | |
755 | deprecated or Unicode internal-only property that Perl has never exposed. | |
3ab3a109 | 756 | |
b6381718 | 757 | The generated files in the C<lib/unicore/To> directory are now more |
a56dbb5e JV |
758 | clearly marked as being stable, directly usable by applications. New hash |
759 | entries in them give the format of the normal entries, which allows for | |
760 | easier machine parsing. Perl can generate files in this directory for | |
761 | any property, though most are suppressed. You can find instructions | |
762 | for changing which are written in L<perluniprops>. | |
3ab3a109 | 763 | |
3ab3a109 | 764 | |
3ab3a109 | 765 | |
b6381718 | 766 | =head1 Modules and Pragmata |
3ab3a109 | 767 | |
a56dbb5e | 768 | =head2 New Modules and Pragmata |
3ab3a109 | 769 | |
b6381718 | 770 | =over 4 |
3ab3a109 | 771 | |
a56dbb5e | 772 | =item C<autodie> |
3ab3a109 | 773 | |
b6381718 JV |
774 | C<autodie> is a new lexically-scoped alternative for the C<Fatal> module. |
775 | The bundled version is 2.06_01. Note that in this release, using a string | |
776 | eval when C<autodie> is in effect can cause the autodie behaviour to leak | |
777 | into the surrounding scope. See L<autodie/"BUGS"> for more details. | |
778 | ||
a56dbb5e | 779 | Version 2.06_01 has been added to the Perl core. |
3ab3a109 | 780 | |
a56dbb5e | 781 | =item C<Compress::Raw::Bzip2> |
3ab3a109 | 782 | |
a56dbb5e JV |
783 | Version 2.024 has been added to the Perl core. |
784 | ||
785 | =item C<overloading> | |
3ab3a109 | 786 | |
b6381718 | 787 | C<overloading> allows you to lexically disable or enable overloading |
79849ba8 | 788 | for some or all operations. |
3ab3a109 | 789 | |
a56dbb5e JV |
790 | Version 0.001 has been added to the Perl core. |
791 | ||
792 | =item C<parent> | |
b6381718 JV |
793 | |
794 | C<parent> establishes an ISA relationship with base classes at compile | |
795 | time. It provides the key feature of C<base> without further unwanted | |
796 | behaviors. | |
3ab3a109 | 797 | |
a56dbb5e JV |
798 | Version 0.223 has been added to the Perl core. |
799 | ||
800 | =item C<Parse::CPAN::Meta> | |
3ab3a109 | 801 | |
a56dbb5e JV |
802 | Version 1.40 has been added to the Perl core. |
803 | ||
804 | =item C<VMS::DCLsym> | |
805 | ||
806 | Version 1.03 has been added to the Perl core. | |
807 | ||
808 | =item C<VMS::Stdio> | |
809 | ||
810 | Version 2.4 has been added to the Perl core. | |
811 | ||
812 | =item C<XS::APItest::KeywordRPN> | |
813 | ||
814 | Version 0.003 has been added to the Perl core. | |
3ab3a109 | 815 | |
b6381718 | 816 | =back |
3ab3a109 | 817 | |
a56dbb5e | 818 | =head2 Updated Pragmata |
3ab3a109 | 819 | |
b6381718 | 820 | =over 4 |
3ab3a109 | 821 | |
a56dbb5e JV |
822 | =item C<base> |
823 | ||
824 | Upgraded from version 2.13 to 2.15. | |
825 | ||
826 | =item C<bignum> | |
827 | ||
828 | Upgraded from version 0.22 to 0.23. | |
829 | ||
830 | =item C<charnames> | |
b6381718 JV |
831 | |
832 | C<charnames> now contains the Unicode F<NameAliases.txt> database file. | |
833 | This has the effect of adding some extra C<\N> character names that | |
834 | formerly wouldn't have been recognised; for example, C<"\N{LATIN CAPITAL | |
835 | LETTER GHA}">. | |
3ab3a109 | 836 | |
a56dbb5e JV |
837 | Upgraded from version 1.06 to 1.07. |
838 | ||
839 | =item C<constant> | |
840 | ||
841 | Upgraded from version 1.13 to 1.20. | |
842 | ||
843 | =item C<diagnostics> | |
844 | ||
845 | C<diagnostics> now supports %.0f formatting internally. | |
846 | ||
847 | C<diagnostics> no longer suppresses C<Use of uninitialized value in range | |
848 | (or flip)> warnings. [perl #71204] | |
849 | ||
850 | Upgraded from version 1.17 to 1.19. | |
851 | ||
852 | =item C<feature> | |
3ab3a109 | 853 | |
b6381718 JV |
854 | In C<feature>, the meaning of the C<:5.10> and C<:5.10.X> feature bundles has |
855 | changed slightly. The last component, if any (i.e. C<X>) is simply ignored. | |
856 | This is predicated on the assumption that new features will not, in | |
857 | general, be added to maintenance releases. So C<:5.10> and C<:5.10.X> | |
858 | have identical effect. This is a change to the behaviour documented for | |
859 | 5.10.0. | |
3ab3a109 | 860 | |
b6381718 | 861 | C<feature> now includes the C<unicode_strings> feature: |
3ab3a109 JV |
862 | |
863 | use feature "unicode_strings"; | |
864 | ||
865 | This pragma turns on Unicode semantics for the case-changing operations | |
c66407fa RS |
866 | (C<uc>, C<lc>, C<ucfirst>, C<lcfirst>) on strings that don't have the |
867 | internal UTF-8 flag set, but that contain single-byte characters between | |
868 | 128 and 255. | |
3ab3a109 | 869 | |
b7569deb | 870 | Upgraded from version 1.11 to 1.16. |
a56dbb5e JV |
871 | |
872 | =item C<less> | |
873 | ||
874 | C<less> now includes the C<stash_name> method to allow subclasses of | |
875 | C<less> to pick where in %^H to store their stash. | |
876 | ||
877 | Upgraded from version 0.02 to 0.03. | |
878 | ||
879 | =item C<lib> | |
880 | ||
881 | Upgraded from version 0.5565 to 0.62. | |
882 | ||
883 | =item C<mro> | |
3ab3a109 | 884 | |
b6381718 JV |
885 | C<mro> is now implemented as an XS extension. The documented interface has not |
886 | changed. Code relying on the implementation detail that some C<mro::> | |
887 | methods happened to be available at all times gets to "keep both pieces". | |
3ab3a109 | 888 | |
a56dbb5e | 889 | Upgraded from version 1.00 to 1.02. |
3ab3a109 | 890 | |
a56dbb5e | 891 | =item C<overload> |
3ab3a109 | 892 | |
b6381718 | 893 | C<overload> now allow overloading of 'qr'. |
3ab3a109 | 894 | |
a56dbb5e | 895 | Upgraded from version 1.06 to 1.10. |
3ab3a109 | 896 | |
a56dbb5e | 897 | =item C<threads> |
3ab3a109 | 898 | |
a56dbb5e | 899 | Upgraded from version 1.67 to 1.75. |
3ab3a109 | 900 | |
a56dbb5e JV |
901 | =item C<threads::shared> |
902 | ||
903 | Upgraded from version 1.14 to 1.32. | |
904 | ||
905 | =item C<version> | |
3ab3a109 | 906 | |
b6381718 JV |
907 | C<version> now has support for L</Version number formats> as described earlier |
908 | in this document and in its own documentation. | |
3ab3a109 | 909 | |
a56dbb5e JV |
910 | Upgraded from version 0.74 to 0.82. |
911 | ||
912 | =item C<warnings> | |
913 | ||
914 | C<warnings> has a new C<warnings::fatal_enabled()> function. It also | |
915 | includes a new C<illegalproto> warning category. See also L</New or | |
916 | Changed Diagnostics> for this change. | |
3ab3a109 | 917 | |
a56dbb5e | 918 | Upgraded from version 1.06 to 1.09. |
3ab3a109 JV |
919 | |
920 | =back | |
921 | ||
a56dbb5e JV |
922 | =head2 Updated Modules |
923 | ||
924 | =over 4 | |
925 | ||
926 | =item C<Archive::Extract> | |
927 | ||
928 | Upgraded from version 0.24 to 0.38. | |
929 | ||
930 | =item C<Archive::Tar> | |
931 | ||
932 | Upgraded from version 1.38 to 1.54. | |
933 | ||
934 | =item C<Attribute::Handlers> | |
935 | ||
936 | Upgraded from version 0.79 to 0.87. | |
937 | ||
938 | =item C<AutoLoader> | |
939 | ||
940 | Upgraded from version 5.63 to 5.70. | |
941 | ||
942 | =item C<B::Concise> | |
943 | ||
944 | Upgraded from version 0.74 to 0.78. | |
945 | ||
946 | =item C<B::Debug> | |
947 | ||
948 | Upgraded from version 1.05 to 1.12. | |
949 | ||
950 | =item C<B::Deparse> | |
951 | ||
952 | Upgraded from version 0.83 to 0.94. | |
953 | ||
954 | =item C<B::Lint> | |
955 | ||
956 | Upgraded from version 1.09 to 1.11_01. | |
957 | ||
958 | =item C<CGI> | |
959 | ||
960 | Upgraded from version 3.29 to 3.48. | |
961 | ||
962 | =item C<Class::ISA> | |
963 | ||
964 | Upgraded from version 0.33 to 0.36. | |
965 | ||
966 | NOTE: C<Class::ISA> is deprecated and may be removed from a future version of Perl. | |
967 | ||
968 | =item C<Compress::Raw::Zlib> | |
969 | ||
970 | Upgraded from version 2.008 to 2.024. | |
971 | ||
972 | =item C<CPAN> | |
973 | ||
974 | Upgraded from version 1.9205 to 1.94_56. | |
975 | ||
976 | =item C<CPANPLUS> | |
977 | ||
978 | Upgraded from version 0.84 to 0.90. | |
979 | ||
980 | =item C<CPANPLUS::Dist::Build> | |
981 | ||
982 | Upgraded from version 0.06_02 to 0.46. | |
983 | ||
984 | =item C<Data::Dumper> | |
985 | ||
986 | Upgraded from version 2.121_14 to 2.125. | |
987 | ||
988 | =item C<DB_File> | |
989 | ||
990 | Upgraded from version 1.816_1 to 1.820. | |
991 | ||
992 | =item C<Devel::PPPort> | |
993 | ||
994 | Upgraded from version 3.13 to 3.19. | |
995 | ||
996 | =item C<Digest> | |
997 | ||
998 | Upgraded from version 1.15 to 1.16. | |
999 | ||
1000 | =item C<Digest::MD5> | |
1001 | ||
1002 | Upgraded from version 2.36_01 to 2.39. | |
1003 | ||
1004 | =item C<Digest::SHA> | |
1005 | ||
1006 | Upgraded from version 5.45 to 5.47. | |
1007 | ||
1008 | =item C<Encode> | |
1009 | ||
1010 | Upgraded from version 2.23 to 2.39. | |
1011 | ||
1012 | =item C<Exporter> | |
1013 | ||
1014 | Upgraded from version 5.62 to 5.64_01. | |
1015 | ||
1016 | =item C<ExtUtils::CBuilder> | |
1017 | ||
1018 | Upgraded from version 0.21 to 0.27. | |
1019 | ||
1020 | =item C<ExtUtils::Command> | |
1021 | ||
1022 | Upgraded from version 1.13 to 1.16. | |
1023 | ||
1024 | =item C<ExtUtils::Constant> | |
1025 | ||
1026 | Upgraded from version 0.2 to 0.22. | |
1027 | ||
1028 | =item C<ExtUtils::Install> | |
1029 | ||
1030 | Upgraded from version 1.44 to 1.55. | |
1031 | ||
1032 | =item C<ExtUtils::MakeMaker> | |
1033 | ||
1034 | Upgraded from version 6.42 to 6.56. | |
1035 | ||
1036 | =item C<ExtUtils::Manifest> | |
1037 | ||
1038 | Upgraded from version 1.51_01 to 1.57. | |
1039 | ||
1040 | =item C<ExtUtils::ParseXS> | |
1041 | ||
1042 | Upgraded from version 2.18_02 to 2.21. | |
1043 | ||
1044 | =item C<File::Fetch> | |
1045 | ||
1046 | Upgraded from version 0.14 to 0.24. | |
1047 | ||
1048 | =item C<File::Path> | |
1049 | ||
1050 | Upgraded from version 2.04 to 2.08_01. | |
1051 | ||
1052 | =item C<File::Temp> | |
1053 | ||
1054 | Upgraded from version 0.18 to 0.22. | |
1055 | ||
1056 | =item C<Filter::Simple> | |
1057 | ||
1058 | Upgraded from version 0.82 to 0.84. | |
1059 | ||
1060 | =item C<Filter::Util::Call> | |
1061 | ||
1062 | Upgraded from version 1.07 to 1.08. | |
1063 | ||
1064 | =item C<Getopt::Long> | |
1065 | ||
1066 | Upgraded from version 2.37 to 2.38. | |
1067 | ||
1068 | =item C<IO> | |
1069 | ||
1070 | Upgraded from version 1.23_01 to 1.25_02. | |
1071 | ||
1072 | =item C<IO::Zlib> | |
1073 | ||
1074 | Upgraded from version 1.07 to 1.10. | |
1075 | ||
1076 | =item C<IPC::Cmd> | |
1077 | ||
1078 | Upgraded from version 0.40_1 to 0.54. | |
1079 | ||
1080 | =item C<IPC::SysV> | |
1081 | ||
1082 | Upgraded from version 1.05 to 2.01. | |
1083 | ||
1084 | =item C<Locale::Maketext> | |
1085 | ||
1086 | Upgraded from version 1.12 to 1.14. | |
1087 | ||
1088 | =item C<Locale::Maketext::Simple> | |
1089 | ||
1090 | Upgraded from version 0.18 to 0.21. | |
1091 | ||
1092 | =item C<Log::Message> | |
1093 | ||
1094 | Upgraded from version 0.01 to 0.02. | |
1095 | ||
1096 | =item C<Log::Message::Simple> | |
1097 | ||
1098 | Upgraded from version 0.04 to 0.06. | |
1099 | ||
1100 | =item C<Math::BigInt> | |
1101 | ||
1102 | Upgraded from version 1.88 to 1.89_01. | |
1103 | ||
1104 | =item C<Math::BigInt::FastCalc> | |
1105 | ||
1106 | Upgraded from version 0.16 to 0.19. | |
1107 | ||
1108 | =item C<Math::BigRat> | |
1109 | ||
1110 | Upgraded from version 0.21 to 0.24. | |
1111 | ||
1112 | =item C<Math::Complex> | |
1113 | ||
1114 | Upgraded from version 1.37 to 1.56. | |
1115 | ||
1116 | =item C<Memoize> | |
1117 | ||
1118 | Upgraded from version 1.01_02 to 1.01_03. | |
1119 | ||
1120 | =item C<MIME::Base64> | |
1121 | ||
1122 | Upgraded from version 3.07_01 to 3.08. | |
1123 | ||
1124 | =item C<Module::Build> | |
1125 | ||
1126 | Upgraded from version 0.2808_01 to 0.3603. | |
1127 | ||
1128 | =item C<Module::CoreList> | |
1129 | ||
4cabf874 | 1130 | Upgraded from version 2.12 to 2.27. |
a56dbb5e JV |
1131 | |
1132 | =item C<Module::Load> | |
1133 | ||
1134 | Upgraded from version 0.12 to 0.16. | |
1135 | ||
1136 | =item C<Module::Load::Conditional> | |
1137 | ||
1138 | Upgraded from version 0.22 to 0.34. | |
1139 | ||
1140 | =item C<Module::Loaded> | |
1141 | ||
1142 | Upgraded from version 0.01 to 0.06. | |
1143 | ||
1144 | =item C<Module::Pluggable> | |
1145 | ||
1146 | Upgraded from version 3.6 to 3.9. | |
1147 | ||
1148 | =item C<Net::Ping> | |
1149 | ||
1150 | Upgraded from version 2.33 to 2.36. | |
1151 | ||
1152 | =item C<NEXT> | |
1153 | ||
1154 | Upgraded from version 0.60_01 to 0.64. | |
1155 | ||
1156 | =item C<Object::Accessor> | |
1157 | ||
1158 | Upgraded from version 0.32 to 0.36. | |
1159 | ||
1160 | =item C<Package::Constants> | |
1161 | ||
1162 | Upgraded from version 0.01 to 0.02. | |
1163 | ||
1164 | =item C<PerlIO> | |
1165 | ||
1166 | Upgraded from version 1.04 to 1.06. | |
1167 | ||
1168 | =item C<Pod::Parser> | |
1169 | ||
1170 | Upgraded from version 1.35 to 1.37. | |
1171 | ||
1172 | =item C<Pod::Perldoc> | |
1173 | ||
1174 | Upgraded from version 3.14_02 to 3.15_02. | |
1175 | ||
1176 | =item C<Pod::Plainer> | |
1177 | ||
1178 | Upgraded from version 0.01 to 1.02. | |
1179 | ||
1180 | NOTE: C<Pod::Plainer> is deprecated and may be removed from a future version of Perl. | |
1181 | ||
1182 | =item C<Pod::Simple> | |
1183 | ||
1184 | Upgraded from version 3.05 to 3.13. | |
1185 | ||
1186 | =item C<Safe> | |
1187 | ||
1188 | Upgraded from version 2.12 to 2.22. | |
1189 | ||
1190 | =item C<SelfLoader> | |
1191 | ||
1192 | Upgraded from version 1.11 to 1.17. | |
1193 | ||
1194 | =item C<Storable> | |
1195 | ||
1196 | Upgraded from version 2.18 to 2.22. | |
1197 | ||
1198 | =item C<Switch> | |
1199 | ||
1200 | Upgraded from version 2.13 to 2.16. | |
1201 | ||
1202 | NOTE: C<Switch> is deprecated and may be removed from a future version of Perl. | |
1203 | ||
1204 | =item C<Sys::Syslog> | |
1205 | ||
1206 | Upgraded from version 0.22 to 0.27. | |
1207 | ||
1208 | =item C<Term::ANSIColor> | |
1209 | ||
1210 | Upgraded from version 1.12 to 2.02. | |
1211 | ||
1212 | =item C<Term::UI> | |
1213 | ||
1214 | Upgraded from version 0.18 to 0.20. | |
1215 | ||
1216 | =item C<Test> | |
1217 | ||
1218 | Upgraded from version 1.25 to 1.25_02. | |
1219 | ||
1220 | =item C<Test::Harness> | |
1221 | ||
1222 | Upgraded from version 2.64 to 3.17. | |
1223 | ||
1224 | =item C<Test::Simple> | |
1225 | ||
1226 | Upgraded from version 0.72 to 0.94. | |
1227 | ||
1228 | =item C<Text::Balanced> | |
1229 | ||
1230 | Upgraded from version 2.0.0 to 2.02. | |
1231 | ||
1232 | =item C<Text::ParseWords> | |
1233 | ||
1234 | Upgraded from version 3.26 to 3.27. | |
1235 | ||
1236 | =item C<Text::Soundex> | |
1237 | ||
1238 | Upgraded from version 3.03 to 3.03_01. | |
1239 | ||
1240 | =item C<Thread::Queue> | |
1241 | ||
1242 | Upgraded from version 2.00 to 2.11. | |
1243 | ||
1244 | =item C<Thread::Semaphore> | |
1245 | ||
1246 | Upgraded from version 2.01 to 2.09. | |
1247 | ||
1248 | =item C<Tie::RefHash> | |
1249 | ||
1250 | Upgraded from version 1.37 to 1.38. | |
1251 | ||
1252 | =item C<Time::HiRes> | |
1253 | ||
1254 | Upgraded from version 1.9711 to 1.9719. | |
1255 | ||
1256 | =item C<Time::Local> | |
1257 | ||
1258 | Upgraded from version 1.18 to 1.1901_01. | |
1259 | ||
1260 | =item C<Time::Piece> | |
1261 | ||
1262 | Upgraded from version 1.12 to 1.15. | |
1263 | ||
1264 | =item C<Unicode::Collate> | |
1265 | ||
1266 | Upgraded from version 0.52 to 0.52_01. | |
1267 | ||
1268 | =item C<Unicode::Normalize> | |
1269 | ||
1270 | Upgraded from version 1.02 to 1.03. | |
1271 | ||
1272 | =item C<Win32> | |
1273 | ||
1274 | Upgraded from version 0.34 to 0.39. | |
1275 | ||
1276 | =item C<Win32API::File> | |
1277 | ||
1278 | Upgraded from version 0.1001_01 to 0.1101. | |
1279 | ||
1280 | =item C<XSLoader> | |
1281 | ||
1282 | Upgraded from version 0.08 to 0.10. | |
1283 | ||
1284 | =back | |
3ab3a109 | 1285 | |
b6381718 | 1286 | =head2 Removed Modules and Pragmata |
3ab3a109 JV |
1287 | |
1288 | =over 4 | |
1289 | ||
a56dbb5e | 1290 | =item C<attrs> |
3ab3a109 | 1291 | |
a56dbb5e | 1292 | Removed from the Perl core. Prior version was 1.02. |
3ab3a109 | 1293 | |
a56dbb5e | 1294 | =item C<CPAN::API::HOWTO> |
3ab3a109 | 1295 | |
a56dbb5e JV |
1296 | Removed from the Perl core. Prior version was 'undef'. |
1297 | ||
1298 | =item C<CPAN::DeferedCode> | |
1299 | ||
1300 | Removed from the Perl core. Prior version was 5.50. | |
1301 | ||
1302 | =item C<CPANPLUS::inc> | |
1303 | ||
1304 | Removed from the Perl core. Prior version was 'undef'. | |
1305 | ||
1306 | =item C<DCLsym> | |
1307 | ||
1308 | Removed from the Perl core. Prior version was 1.03. | |
1309 | ||
1310 | =item C<ExtUtils::MakeMaker::bytes> | |
1311 | ||
1312 | Removed from the Perl core. Prior version was 6.42. | |
1313 | ||
1314 | =item C<ExtUtils::MakeMaker::vmsish> | |
1315 | ||
1316 | Removed from the Perl core. Prior version was 6.42. | |
3ab3a109 | 1317 | |
a56dbb5e JV |
1318 | =item C<Stdio> |
1319 | ||
1320 | Removed from the Perl core. Prior version was 2.3. | |
1321 | ||
1322 | =item C<Test::Harness::Assert> | |
1323 | ||
1324 | Removed from the Perl core. Prior version was 0.02. | |
1325 | ||
1326 | =item C<Test::Harness::Iterator> | |
1327 | ||
1328 | Removed from the Perl core. Prior version was 0.02. | |
1329 | ||
1330 | =item C<Test::Harness::Point> | |
1331 | ||
1332 | Removed from the Perl core. Prior version was 0.01. | |
1333 | ||
1334 | =item C<Test::Harness::Results> | |
1335 | ||
1336 | Removed from the Perl core. Prior version was 0.01. | |
1337 | ||
1338 | =item C<Test::Harness::Straps> | |
1339 | ||
1340 | Removed from the Perl core. Prior version was 0.26_01. | |
1341 | ||
1342 | =item C<Test::Harness::Util> | |
1343 | ||
1344 | Removed from the Perl core. Prior version was 0.01. | |
1345 | ||
1346 | =item C<XSSymSet> | |
1347 | ||
1348 | Removed from the Perl core. Prior version was 1.1. | |
3ab3a109 JV |
1349 | |
1350 | =back | |
1351 | ||
b6381718 JV |
1352 | =head2 Deprecated Modules and Pragmata |
1353 | ||
1354 | See L</Deprecated Modules> above. | |
1355 | ||
a56dbb5e | 1356 | |
3ab3a109 JV |
1357 | =head1 Documentation |
1358 | ||
1359 | =head2 New Documentation | |
1360 | ||
1361 | =over 4 | |
1362 | ||
1363 | =item * | |
1364 | ||
b6381718 | 1365 | L<perlhaiku> contains instructions on how to build perl for the Haiku platform. |
3ab3a109 JV |
1366 | |
1367 | =item * | |
1368 | ||
b6381718 | 1369 | L<perlmroapi> describes the new interface for pluggable Method Resolution Orders. |
3ab3a109 JV |
1370 | |
1371 | =item * | |
1372 | ||
b6381718 | 1373 | L<perlperf>, by Richard Foley, provides an introduction to the use of |
3ab3a109 JV |
1374 | performance and optimization techniques which can be used with particular |
1375 | reference to perl programs. | |
1376 | ||
1377 | =item * | |
1378 | ||
b6381718 | 1379 | L<perlrepository> describes how to access the perl source using the I<git> version |
3ab3a109 JV |
1380 | control system. |
1381 | ||
1382 | =item * | |
1383 | ||
1384 | L<perlpolicy> extends the "Social contract about contributed modules" into | |
1385 | the beginnings of a document on Perl porting policies. | |
1386 | ||
1387 | =back | |
1388 | ||
1389 | =head2 Changes to Existing Documentation | |
1390 | ||
b6381718 | 1391 | |
72d4e865 JV |
1392 | =over |
1393 | ||
1394 | ||
1395 | =item * | |
1396 | ||
3ab3a109 JV |
1397 | The various large F<Changes*> files (which listed every change made to perl |
1398 | over the last 18 years) have been removed, and replaced by a small file, | |
1399 | also called F<Changes>, which just explains how that same information may | |
1400 | be extracted from the git version control system. | |
1401 | ||
72d4e865 JV |
1402 | =item * |
1403 | ||
b6381718 | 1404 | F<Porting/patching.pod> has been deleted, as it mainly described |
3ab3a109 JV |
1405 | interacting with the old Perforce-based repository, which is now obsolete. |
1406 | Information still relevant has been moved to L<perlrepository>. | |
1407 | ||
3ab3a109 | 1408 | |
72d4e865 JV |
1409 | =item * |
1410 | ||
1411 | The syntax C<unless (EXPR) BLOCK else BLOCK> is now documented as valid, as | |
1412 | is the syntax C<unless (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK>, | |
1413 | although actually using the latter may not be the best idea for the | |
1414 | readability of your source code. | |
1415 | ||
3ab3a109 JV |
1416 | |
1417 | =item * | |
1418 | ||
1419 | Documented -X overloading. | |
1420 | ||
1421 | =item * | |
1422 | ||
1423 | Documented that C<when()> treats specially most of the filetest operators | |
1424 | ||
1425 | =item * | |
1426 | ||
b6381718 | 1427 | Documented C<when> as a syntax modifier. |
3ab3a109 JV |
1428 | |
1429 | =item * | |
1430 | ||
c66407fa | 1431 | Eliminated "Old Perl threads tutorial", which described 5005 threads. |
3ab3a109 JV |
1432 | |
1433 | F<pod/perlthrtut.pod> is the same material reworked for ithreads. | |
1434 | ||
1435 | =item * | |
1436 | ||
1437 | Correct previous documentation: v-strings are not deprecated | |
1438 | ||
72d4e865 | 1439 | With version objects, we need them to use MODULE VERSION syntax. This |
c66407fa | 1440 | patch removes the deprecation notice. |
3ab3a109 JV |
1441 | |
1442 | =item * | |
1443 | ||
b6381718 JV |
1444 | Security contact information is now part of L<perlsec>. |
1445 | ||
1446 | =item * | |
3ab3a109 JV |
1447 | |
1448 | A significant fraction of the core documentation has been updated to clarify | |
1449 | the behavior of Perl's Unicode handling. | |
1450 | ||
1451 | Much of the remaining core documentation has been reviewed and edited | |
1452 | for clarity, consistent use of language, and to fix the spelling of Tom | |
1453 | Christiansen's name. | |
1454 | ||
b6381718 JV |
1455 | =item * |
1456 | ||
3ab3a109 | 1457 | The Pod specification (L<perlpodspec>) has been updated to bring the |
c66407fa | 1458 | specification in line with modern usage already supported by most Pod |
72d4e865 JV |
1459 | systems. A parameter string may now follow the format name in a |
1460 | "begin/end" region. Links to URIs with a text description are now | |
1461 | allowed. The usage of C<LE<lt>"section"E<gt>> has been marked as | |
c66407fa | 1462 | deprecated. |
3ab3a109 | 1463 | |
b6381718 JV |
1464 | =item * |
1465 | ||
3ab3a109 | 1466 | L<if.pm|if> has been documented in L<perlfunc/use> as a means to get |
c66407fa RS |
1467 | conditional loading of modules despite the implicit BEGIN block around |
1468 | C<use>. | |
3ab3a109 JV |
1469 | |
1470 | =item * | |
1471 | ||
c66407fa | 1472 | The documentation for C<$1> in perlvar.pod has been clarified. |
3ab3a109 | 1473 | |
a620a577 KW |
1474 | =item * |
1475 | ||
1476 | C<\N{U+I<wide hex char>}> is now documented. | |
1477 | ||
3ab3a109 JV |
1478 | =back |
1479 | ||
b6381718 | 1480 | =head1 Selected Performance Enhancements |
3ab3a109 JV |
1481 | |
1482 | =over 4 | |
1483 | ||
1484 | =item * | |
1485 | ||
1486 | A new internal cache means that C<isa()> will often be faster. | |
1487 | ||
1488 | =item * | |
1489 | ||
1490 | The implementation of C<C3> Method Resolution Order has been optimised - | |
1491 | linearisation for classes with single inheritance is 40% faster. Performance | |
1492 | for multiple inheritance is unchanged. | |
1493 | ||
1494 | =item * | |
1495 | ||
1496 | Under C<use locale>, the locale-relevant information is now cached on | |
1497 | read-only values, such as the list returned by C<keys %hash>. This makes | |
1498 | operations such as C<sort keys %hash> in the scope of C<use locale> much | |
1499 | faster. | |
1500 | ||
1501 | =item * | |
1502 | ||
1503 | Empty C<DESTROY> methods are no longer called. | |
1504 | ||
1505 | =item * | |
1506 | ||
b6381718 | 1507 | C<Perl_sv_utf8_upgrade()> is now faster. |
3ab3a109 JV |
1508 | |
1509 | =item * | |
1510 | ||
b6381718 | 1511 | C<keys> on empty hash is now faster. |
3ab3a109 JV |
1512 | |
1513 | =item * | |
1514 | ||
b6381718 | 1515 | C<if (%foo)> has been optimized to be faster than C<if (keys %foo)>. |
3ab3a109 JV |
1516 | |
1517 | =item * | |
1518 | ||
8a4f3f14 VP |
1519 | The string repetition operator (C<$str x $num>) is now several times faster |
1520 | when C<$str> has length one or C<$num> is large. | |
1521 | ||
1522 | =item * | |
1523 | ||
3ab3a109 JV |
1524 | Reversing an array to itself (as in C<@a = reverse @a>) in void context |
1525 | now happens in-place and is several orders of magnitude faster than it | |
1526 | used to be. It will also preserve non-existent elements whenever | |
1527 | possible, i.e. for non magical arrays or tied arrays with C<EXISTS> and | |
1528 | C<DELETE> methods. | |
1529 | ||
1530 | =back | |
1531 | ||
1532 | =head1 Installation and Configuration Improvements | |
1533 | ||
72d4e865 JV |
1534 | =over 4 |
1535 | ||
1536 | =item * | |
1537 | ||
1538 | L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all | |
1539 | generated at build time, rather than being shipped as part of the release. | |
1540 | ||
1541 | =item * | |
3ab3a109 JV |
1542 | |
1543 | If C<vendorlib> and C<vendorarch> are the same, then they are only added to | |
1544 | C<@INC> once. | |
1545 | ||
72d4e865 JV |
1546 | =item * |
1547 | ||
3ab3a109 JV |
1548 | C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if |
1549 | perl is built with C<-Dusedevel>. | |
1550 | ||
72d4e865 JV |
1551 | =item * |
1552 | ||
3ab3a109 JV |
1553 | F<Configure> will enable use of C<-fstack-protector>, to provide protection |
1554 | against stack-smashing attacks, if the compiler supports it. | |
1555 | ||
72d4e865 JV |
1556 | =item * |
1557 | ||
3ab3a109 | 1558 | F<Configure> will now determine the correct prototypes for re-entrant |
c66407fa | 1559 | functions and for C<gconvert> if you are using a C++ compiler rather |
3ab3a109 JV |
1560 | than a C compiler. |
1561 | ||
72d4e865 JV |
1562 | =item * |
1563 | ||
3ab3a109 JV |
1564 | On Unix, if you build from a tree containing a git repository, the |
1565 | configuration process will note the commit hash you have checked out, for | |
1566 | display in the output of C<perl -v> and C<perl -V>. Unpushed local commits | |
1567 | are automatically added to the list of local patches displayed by | |
1568 | C<perl -V>. | |
1569 | ||
72d4e865 JV |
1570 | =item * |
1571 | ||
b6381718 | 1572 | Perl now supports SystemTap's C<dtrace> compatibility layer and an |
72d4e865 JV |
1573 | issue with linking C<miniperl> has been fixed in the process. |
1574 | ||
1575 | =item * | |
1576 | ||
b6381718 JV |
1577 | perldoc now uses C<less -R> instead of C<less> for improved behaviour |
1578 | in the face of C<groff>'s new usage of ANSI escape codes. | |
72d4e865 JV |
1579 | |
1580 | =item * | |
1581 | ||
72d4e865 | 1582 | |
b6381718 JV |
1583 | C<perl -V> now reports use of the compile-time options C<USE_PERL_ATOF> and |
1584 | C<USE_ATTRIBUTES_FOR_PERLIO>. | |
72d4e865 | 1585 | |
b6381718 | 1586 | =item * |
3ab3a109 JV |
1587 | |
1588 | As part of the flattening of F<ext>, all extensions on all platforms are | |
1589 | built by F<make_ext.pl>. This replaces the Unix-specific | |
1590 | F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific | |
1591 | F<win32/buildext.pl>. | |
1592 | ||
b6381718 | 1593 | =back |
3ab3a109 | 1594 | |
b6381718 JV |
1595 | =head1 Internal Changes |
1596 | ||
1597 | Each release of Perl sees numerous internal changes which shouldn't | |
1598 | affect day to day usage but may still be notable for developers working | |
1599 | with Perl's source code. | |
1600 | ||
1601 | =over | |
3ab3a109 JV |
1602 | |
1603 | =item * | |
1604 | ||
b6381718 JV |
1605 | The J.R.R. Tolkien quotes at the head of C source file have been checked and |
1606 | proper citations added, thanks to a patch from Tom Christiansen. | |
3ab3a109 JV |
1607 | |
1608 | =item * | |
1609 | ||
b6381718 JV |
1610 | The internal structure of the dual-life modules traditionally found in |
1611 | the F<lib/> and F<ext/> directories y in the perl source has changed | |
1612 | significantly. Where possible, dual-lifed modules have been extracted | |
1613 | from F<lib/> and F<ext/>. | |
1614 | ||
1615 | Dual-lifed modules maintained by Perl's developers as part of the Perl | |
1616 | core now live in F<dist/>. Dual-lifed modules maintained primarily on | |
1617 | CPAN now live in F<cpan/>. When reporting a bug in a module located | |
1618 | under F<cpan/>, please send your bug report directly to the module's | |
1619 | bug tracker or author, rather than Perl's bug tracker. | |
3ab3a109 JV |
1620 | |
1621 | =item * | |
1622 | ||
b6381718 JV |
1623 | C<\N{...}> now compiles better, always forces UTF-8 internal representation |
1624 | ||
1625 | Perl's developers have fixed several problems with the recognition of C<\N{...}> | |
1626 | constructs. As part of this, perl will store any scalar or regex containing | |
1627 | C<\N{I<name>}> or C<\N{U+I<wide hex char>}> in its definition in | |
1628 | UTF-8 format. (This was true previously for all occurences of C<\N{I<name>}> | |
1629 | that did not use a custom translator, but now it's always true.) | |
3ab3a109 JV |
1630 | |
1631 | =item * | |
1632 | ||
b6381718 | 1633 | Perl_magic_setmglob now knows about globs, fixing RT #71254. |
3ab3a109 JV |
1634 | |
1635 | =item * | |
1636 | ||
b6381718 | 1637 | C<SVt_RV> no longer exists. RVs are now stored in IVs. |
3ab3a109 JV |
1638 | |
1639 | =item * | |
1640 | ||
b6381718 | 1641 | REGEXPs are now first class. |
3ab3a109 JV |
1642 | |
1643 | =item * | |
1644 | ||
1645 | C<Perl_vcroak()> now accepts a null first argument. In addition, a full audit | |
1646 | was made of the "not NULL" compiler annotations, and those for several | |
1647 | other internal functions were corrected. | |
1648 | ||
1649 | =item * | |
1650 | ||
1651 | New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO> | |
1652 | have been added to formalise the temporary saving of the C<errno> | |
1653 | variable. | |
1654 | ||
1655 | =item * | |
1656 | ||
1657 | The function C<Perl_sv_insert_flags> has been added to augment | |
1658 | C<Perl_sv_insert>. | |
1659 | ||
1660 | =item * | |
1661 | ||
1662 | The function C<Perl_newSV_type(type)> has been added, equivalent to | |
1663 | C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>. | |
1664 | ||
1665 | =item * | |
1666 | ||
1667 | The function C<Perl_newSVpvn_flags()> has been added, equivalent to | |
1668 | C<Perl_newSVpvn()> and then performing the action relevant to the flag. | |
1669 | ||
1670 | Two flag bits are currently supported. | |
1671 | ||
1672 | =over 4 | |
1673 | ||
1674 | =item * | |
1675 | ||
b6381718 | 1676 | C<SVf_UTF8> will call C<SvUTF8_on()> for you. (Note that this does not convert an |
3ab3a109 JV |
1677 | sequence of ISO 8859-1 characters to UTF-8). A wrapper, C<newSVpvn_utf8()> |
1678 | is available for this. | |
1679 | ||
1680 | =item * | |
1681 | ||
b6381718 | 1682 | C<SVs_TEMP> now calls C<Perl_sv_2mortal()> on the new SV. |
3ab3a109 JV |
1683 | |
1684 | =back | |
1685 | ||
1686 | There is also a wrapper that takes constant strings, C<newSVpvs_flags()>. | |
1687 | ||
1688 | =item * | |
1689 | ||
1690 | The function C<Perl_croak_xs_usage> has been added as a wrapper to | |
1691 | C<Perl_croak>. | |
1692 | ||
1693 | =item * | |
1694 | ||
b6381718 | 1695 | Perl now exports the functions C<PerlIO_find_layer> and C<PerlIO_list_alloc>. |
3ab3a109 JV |
1696 | |
1697 | =item * | |
1698 | ||
1699 | C<PL_na> has been exterminated from the core code, replaced by local STRLEN | |
1700 | temporaries, or C<*_nolen()> calls. Either approach is faster than C<PL_na>, | |
17270880 | 1701 | which is a pointer dereference into the interpreter structure under ithreads, |
3ab3a109 JV |
1702 | and a global variable otherwise. |
1703 | ||
1704 | =item * | |
1705 | ||
1706 | C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()> on | |
1707 | the scalar. It now updates the linked list to remove each piece of magic | |
1708 | as it is freed. | |
1709 | ||
1710 | =item * | |
1711 | ||
1712 | Under ithreads, the regex in C<PL_reg_curpm> is now reference counted. This | |
1713 | eliminates a lot of hackish workarounds to cope with it not being reference | |
1714 | counted. | |
1715 | ||
1716 | =item * | |
1717 | ||
1718 | C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>. | |
1719 | This has been fixed. | |
1720 | ||
1721 | =item * | |
1722 | ||
1723 | The I<public> IV and NV flags are now not set if the string value has | |
1724 | trailing "garbage". This behaviour is consistent with not setting the | |
1725 | public IV or NV flags if the value is out of range for the type. | |
1726 | ||
1727 | =item * | |
1728 | ||
3ab3a109 JV |
1729 | Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have been |
1730 | replaced by C<NULL> in the core code, and non-dual-life modules, as C<NULL> | |
1731 | is clearer to those unfamiliar with the core code. | |
1732 | ||
1733 | =item * | |
1734 | ||
1735 | A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will | |
1736 | not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>, | |
1737 | C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without | |
1738 | casting away C<const>. This allows proper compile-time auditing of | |
1739 | C<const> correctness in the core, and helped picked up some errors (now | |
1740 | fixed). | |
1741 | ||
1742 | =item * | |
1743 | ||
1744 | Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the | |
1745 | stack and mortalizing them. | |
1746 | ||
1747 | =item * | |
1748 | ||
1749 | Use of the private structure C<mro_meta> has changed slightly. Nothing | |
1750 | outside the core should be accessing this directly anyway. | |
1751 | ||
b6381718 JV |
1752 | =item * |
1753 | ||
1754 | A new tool, F<Porting/expand-macro.pl> has been added, that allows you | |
1755 | to view how a C preprocessor macro would be expanded when compiled. | |
1756 | This is handy when trying to decode the macro hell that is the perl | |
1757 | guts. | |
1758 | ||
1759 | =back | |
1760 | ||
1761 | =head1 Testing | |
1762 | ||
1763 | =head2 Testing improvements | |
1764 | ||
1765 | =over 4 | |
1766 | ||
1767 | =item Parallel tests | |
1768 | ||
1769 | The core distribution can now run its regression tests in parallel on | |
1770 | Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in | |
1771 | your environment to the number of tests to run in parallel, and run | |
1772 | C<make test_harness>. On a Bourne-like shell, this can be done as | |
1773 | ||
1774 | TEST_JOBS=3 make test_harness # Run 3 tests in parallel | |
3ab3a109 | 1775 | |
b6381718 JV |
1776 | An environment variable is used, rather than parallel make itself, because |
1777 | L<TAP::Harness> needs to be able to schedule individual non-conflicting test | |
1778 | scripts itself, and there is no standard interface to C<make> utilities to | |
1779 | interact with their job schedulers. | |
3ab3a109 | 1780 | |
b6381718 JV |
1781 | Note that currently some test scripts may fail when run in parallel (most |
1782 | notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts | |
1783 | again sequentially and see if the failures go away. | |
3ab3a109 | 1784 | |
b6381718 | 1785 | =item Test harness flexibility |
3ab3a109 | 1786 | |
b6381718 JV |
1787 | It's now possible to override C<PERL5OPT> and friends in F<t/TEST> |
1788 | ||
1789 | =item Test watchdog | |
3ab3a109 | 1790 | |
3ab3a109 JV |
1791 | Several tests that have the potential to hang forever if they fail now |
1792 | incorporate a "watchdog" functionality that will kill them after a timeout, | |
1793 | which helps ensure that C<make test> and C<make test_harness> run to | |
79849ba8 | 1794 | completion automatically. |
3ab3a109 | 1795 | |
b6381718 JV |
1796 | |
1797 | =back | |
1798 | ||
1799 | =head2 New Tests | |
1800 | ||
1801 | Perl's developers have added a number of new tests to the core. | |
1802 | In addition to the items listed below, many modules updated from CPAN | |
1803 | incorporate new tests. | |
3ab3a109 JV |
1804 | |
1805 | =over 4 | |
1806 | ||
1807 | =item * | |
1808 | ||
1809 | Significant cleanups to core tests to ensure that language and | |
1810 | interpreter features are not used before they're tested. | |
1811 | ||
1812 | =item * | |
1813 | ||
c66407fa RS |
1814 | C<make test_porting> now runs a number of important pre-commit checks |
1815 | which might be of use to anyone working on the Perl core. | |
3ab3a109 JV |
1816 | |
1817 | =item * | |
1818 | ||
1819 | F<t/porting/podcheck.t> automatically checks the well-formedness of | |
1820 | POD found in all .pl, .pm and .pod files in the F<MANIFEST>, other than in | |
1821 | dual-lifed modules which are primarily maintained outside the Perl core. | |
1822 | ||
1823 | =item * | |
1824 | ||
1825 | F<t/porting/manifest.t> now tests that all files listed in MANIFEST are present. | |
1826 | ||
1827 | =item * | |
1828 | ||
b6381718 | 1829 | F<t/op/while_readdir.t> tests that a bare readdir in while loop sets $_. |
3ab3a109 JV |
1830 | |
1831 | =item * | |
1832 | ||
b6381718 | 1833 | F<t/comp/retainedlines.t> checks that the debugger can retain source lines from C<eval>. |
3ab3a109 JV |
1834 | |
1835 | =item * | |
1836 | ||
b6381718 | 1837 | F<t/io/perlio_fail.t> checks that bad layers fail. |
3ab3a109 JV |
1838 | |
1839 | =item * | |
1840 | ||
b6381718 | 1841 | F<t/io/perlio_leaks.t> checks that PerlIO layers are not leaking. |
3ab3a109 JV |
1842 | |
1843 | =item * | |
1844 | ||
b6381718 | 1845 | F<t/io/perlio_open.t> checks that certain special forms of open work. |
3ab3a109 JV |
1846 | |
1847 | =item * | |
1848 | ||
b6381718 | 1849 | F<t/io/perlio.t> includes general PerlIO tests. |
3ab3a109 JV |
1850 | |
1851 | =item * | |
1852 | ||
b6381718 | 1853 | F<t/io/pvbm.t> checks that there is no unexpected interaction between the internal types |
3ab3a109 JV |
1854 | C<PVBM> and C<PVGV>. |
1855 | ||
1856 | =item * | |
1857 | ||
b6381718 | 1858 | F<t/mro/package_aliases.t> checks that mro works properly in the presence of aliased packages. |
3ab3a109 JV |
1859 | |
1860 | =item * | |
1861 | ||
b6381718 | 1862 | F<t/op/dbm.t> tests C<dbmopen> and C<dbmclose>. |
3ab3a109 JV |
1863 | |
1864 | =item * | |
1865 | ||
b6381718 | 1866 | F<t/op/index_thr.t> tests the interaction of C<index> and threads. |
3ab3a109 JV |
1867 | |
1868 | =item * | |
1869 | ||
b6381718 | 1870 | F<t/op/pat_thr.t> tests the interaction of esoteric patterns and threads. |
3ab3a109 JV |
1871 | |
1872 | =item * | |
1873 | ||
b6381718 | 1874 | F<t/op/qr_gc.t> tests that C<qr> doesn't leak. |
3ab3a109 JV |
1875 | |
1876 | =item * | |
1877 | ||
b6381718 | 1878 | F<t/op/reg_email_thr.t> tests the interaction of regex recursion and threads. |
3ab3a109 JV |
1879 | |
1880 | =item * | |
1881 | ||
b6381718 | 1882 | F<t/op/regexp_qr_embed_thr.t> tests the interaction of patterns with embedded C<qr//> and threads. |
3ab3a109 JV |
1883 | |
1884 | =item * | |
1885 | ||
b6381718 | 1886 | F<t/op/regexp_unicode_prop.t> tests Unicode properties in regular expressions. |
3ab3a109 JV |
1887 | |
1888 | =item * | |
1889 | ||
b6381718 | 1890 | F<t/op/regexp_unicode_prop_thr.t> tests the interaction of Unicode properties and threads. |
3ab3a109 JV |
1891 | |
1892 | =item * | |
1893 | ||
b6381718 | 1894 | F<t/op/reg_nc_tie.t> tests the tied methods of C<Tie::Hash::NamedCapture>. |
3ab3a109 JV |
1895 | |
1896 | =item * | |
1897 | ||
b6381718 | 1898 | F<t/op/reg_posixcc.t> checks that POSIX character classes behave consistently. |
3ab3a109 JV |
1899 | |
1900 | =item * | |
1901 | ||
0c359e6f | 1902 | F<t/op/re.t> checks that exportable C<re> functions in F<universal.c> work. |
3ab3a109 JV |
1903 | |
1904 | =item * | |
1905 | ||
b6381718 | 1906 | F<t/op/setpgrpstack.t> checks that C<setpgrp> works. |
3ab3a109 JV |
1907 | |
1908 | =item * | |
1909 | ||
b6381718 | 1910 | F<t/op/substr_thr.t> tests the interaction of C<substr> and threads. |
3ab3a109 JV |
1911 | |
1912 | =item * | |
1913 | ||
b6381718 | 1914 | F<t/op/upgrade.t> checks that upgrading and assigning scalars works. |
3ab3a109 JV |
1915 | |
1916 | =item * | |
1917 | ||
b6381718 | 1918 | F<t/uni/lex_utf8.t> checks that Unicode in the lexer works. |
3ab3a109 JV |
1919 | |
1920 | =item * | |
1921 | ||
b6381718 | 1922 | F<t/uni/tie.t> checks that Unicode and C<tie> work. |
3ab3a109 JV |
1923 | |
1924 | =item * | |
1925 | ||
b6381718 | 1926 | F<t/comp/final_line_num.t> tests whether line numbers are correct at EOF |
3ab3a109 JV |
1927 | |
1928 | =item * | |
1929 | ||
b6381718 | 1930 | F<t/comp/form_scope.t> tests format scoping. |
3ab3a109 JV |
1931 | |
1932 | =item * | |
1933 | ||
b6381718 | 1934 | F<t/comp/line_debug.t> tests whether C<< @{"_<$file"} >> works. |
3ab3a109 JV |
1935 | |
1936 | =item * | |
1937 | ||
b6381718 | 1938 | F<t/op/filetest_t.t> tests if -t file test works. |
3ab3a109 JV |
1939 | |
1940 | =item * | |
1941 | ||
b6381718 | 1942 | F<t/op/qr.t> tests C<qr>. |
3ab3a109 JV |
1943 | |
1944 | =item * | |
1945 | ||
b6381718 | 1946 | F<t/op/utf8cache.t> tests malfunctions of the utf8 cache. |
3ab3a109 JV |
1947 | |
1948 | =item * | |
1949 | ||
b6381718 | 1950 | F<t/re/uniprops.t> test unicodes C<\p{}> regex constructs. |
3ab3a109 | 1951 | |
b16f1257 JV |
1952 | =item * |
1953 | ||
b6381718 JV |
1954 | F<t/op/filehandle.t> tests some suitably portable filetest operators |
1955 | to check that they work as expected, particularly in the light of some | |
1956 | internal changes made in how filehandles are blessed. | |
72d4e865 | 1957 | |
b16f1257 JV |
1958 | =item * |
1959 | ||
b6381718 JV |
1960 | F<t/op/time_loop.t> tests that unix times greater than C<2**63>, which |
1961 | can now be handed to C<gmtime> and C<localtime>, do not cause an internal | |
1962 | overflow or an excessively long loop. | |
72d4e865 | 1963 | |
3ab3a109 JV |
1964 | =back |
1965 | ||
3ab3a109 | 1966 | |
b6381718 | 1967 | =head1 New or Changed Diagnostics |
72d4e865 | 1968 | |
b6381718 | 1969 | =head2 New Diagnostics |
72d4e865 | 1970 | |
b6381718 | 1971 | =over |
72d4e865 | 1972 | |
b6381718 | 1973 | =item * |
72d4e865 | 1974 | |
b6381718 JV |
1975 | SV allocation tracing has been added to the diagnostics enabled by C<-Dm>. |
1976 | The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if | |
1977 | that was enabled when the F<perl> binary was compiled. | |
72d4e865 | 1978 | |
b6381718 | 1979 | =item * |
3ab3a109 | 1980 | |
b6381718 JV |
1981 | Smartmatch resolution tracing has been added as a new diagnostic. Use C<-DM> to |
1982 | enable it. | |
3ab3a109 | 1983 | |
b6381718 | 1984 | =item * |
3ab3a109 | 1985 | |
b6381718 JV |
1986 | A new debugging flag C<-DB> now dumps subroutine definitions, leaving |
1987 | C<-Dx> for its original purpose of dumping syntax trees. | |
3ab3a109 | 1988 | |
b6381718 | 1989 | =item * |
3ab3a109 | 1990 | |
b6381718 JV |
1991 | Perl 5.12 provides a number of new diagnostic messages to help you write |
1992 | better code. See L<perldiag> for details of these new messages. | |
3ab3a109 JV |
1993 | |
1994 | =over 4 | |
1995 | ||
1996 | =item * | |
1997 | ||
1998 | C<Bad plugin affecting keyword '%s'> | |
1999 | ||
2000 | =item * | |
2001 | ||
2002 | C<gmtime(%.0f) too large> | |
2003 | ||
2004 | =item * | |
2005 | ||
2006 | C<Lexing code attempted to stuff non-Latin-1 character into Latin-1 input> | |
2007 | ||
2008 | =item * | |
2009 | ||
2010 | C<Lexing code internal error (%s)> | |
2011 | ||
2012 | =item * | |
2013 | ||
2014 | C<localtime(%.0f) too large> | |
2015 | ||
2016 | =item * | |
2017 | ||
2018 | C<Overloaded dereference did not return a reference> | |
2019 | ||
2020 | =item * | |
2021 | ||
2022 | C<Overloaded qr did not return a REGEXP> | |
2023 | ||
2024 | =item * | |
2025 | ||
2026 | C<Perl_pmflag() is deprecated, and will be removed from the XS API> | |
2027 | ||
2028 | =item * | |
2029 | ||
b6381718 | 2030 | C<lvalue attribute ignored after the subroutine has been defined> |
3ab3a109 JV |
2031 | |
2032 | This new warning is issued when one attempts to mark a subroutine as | |
2033 | lvalue after it has been defined. | |
2034 | ||
2035 | =item * | |
2036 | ||
b6381718 JV |
2037 | Perl now warns you if C<++> or C<--> are unable to change the value because it's |
2038 | beyond the limit of representation. | |
3ab3a109 JV |
2039 | |
2040 | This uses a new warnings category: "imprecision". | |
2041 | ||
2042 | =item * | |
c66407fa RS |
2043 | |
2044 | C<lc>, C<uc>, C<lcfirst>, and C<ucfirst> warn when passed undef. | |
3ab3a109 JV |
2045 | |
2046 | =item * | |
2047 | ||
b6381718 | 2048 | C<Show constant in "Useless use of a constant in void context"> |
3ab3a109 JV |
2049 | |
2050 | =item * | |
2051 | ||
b6381718 | 2052 | C<Prototype after '%s'> |
3ab3a109 JV |
2053 | |
2054 | =item * | |
2055 | ||
b6381718 JV |
2056 | C<panic: sv_chop %s> |
2057 | ||
2058 | This new fatal error occurs when the C routine C<Perl_sv_chop()> was | |
2059 | passed a position that is not within the scalar's string buffer. This | |
2060 | could be caused by buggy XS code, and at this point recovery is not | |
2061 | possible. | |
2062 | ||
3ab3a109 JV |
2063 | |
2064 | =item * | |
2065 | ||
b6381718 JV |
2066 | The fatal error C<Malformed UTF-8 returned by \N> is now produced if the |
2067 | C<charnames> handler returns malformed UTF-8. | |
3ab3a109 JV |
2068 | |
2069 | =item * | |
2070 | ||
b6381718 | 2071 | If an unresolved named character or sequence was encountered when compiling a |
7acb582f | 2072 | regex pattern then the fatal error C<\N{NAME} must be resolved by the lexer> |
b6381718 | 2073 | is now produced. This can happen, for example, when using a single-quotish |
7acb582f | 2074 | context like C<$re = '\N{SPACE}'; /$re/;>. See L<perldiag> for more examples of |
b6381718 | 2075 | how the lexer can get bypassed. |
3ab3a109 JV |
2076 | |
2077 | =item * | |
2078 | ||
7acb582f | 2079 | C<Invalid hexadecimal number in \N{U+...}> is a new fatal error triggered when |
b6381718 JV |
2080 | the character constant represented by C<...> is not a valid hexadecimal |
2081 | number. | |
3ab3a109 JV |
2082 | |
2083 | =item * | |
2084 | ||
b6381718 JV |
2085 | The new meaning of C<\N> as C<[^\n]> is not valid in a bracketed character |
2086 | class, just like C<.> in a character class loses its special meaning, and will | |
7acb582f | 2087 | cause the fatal error C<\N in a character class must be a named character: \N{...}>. |
b6381718 JV |
2088 | |
2089 | =item * | |
3ab3a109 | 2090 | |
b6381718 JV |
2091 | The rules on what is legal for the C<...> in C<\N{...}> have been tightened |
2092 | up so that unless the C<...> begins with an alphabetic character and continues | |
2093 | with a combination of alphanumerics, dashes, spaces, parentheses or colons | |
7acb582f | 2094 | then the warning C<Deprecated character(s) in \N{...} starting at '%s'> is |
b6381718 | 2095 | now issued. |
3ab3a109 JV |
2096 | |
2097 | =item * | |
2098 | ||
b6381718 JV |
2099 | The warning C<Using just the first characters returned by \N{}> will be |
2100 | issued if the C<charnames> handler returns a sequence of characters which | |
2101 | exceeds the limit of the number of characters that can be used. The message | |
2102 | will indicate which characters were used and which were discarded. | |
3ab3a109 | 2103 | |
b6381718 | 2104 | =back |
3ab3a109 | 2105 | |
b6381718 | 2106 | =back |
3ab3a109 | 2107 | |
b6381718 | 2108 | =head2 Changed Diagnostics |
3ab3a109 | 2109 | |
b6381718 | 2110 | A number of existing diagnostic messages have been improved or corrected: |
3ab3a109 | 2111 | |
b6381718 | 2112 | =over |
3ab3a109 JV |
2113 | |
2114 | =item * | |
2115 | ||
b6381718 JV |
2116 | A new warning category C<illegalproto> allows finer-grained control of |
2117 | warnings around function prototypes. | |
3ab3a109 | 2118 | |
b6381718 | 2119 | The two warnings: |
3ab3a109 | 2120 | |
b6381718 | 2121 | =over |
3ab3a109 | 2122 | |
b6381718 JV |
2123 | =item C<Illegal character in prototype for %s : %s> |
2124 | ||
2125 | =item C<Prototype after '%c' for %s : %s> | |
2126 | ||
2127 | =back | |
2128 | ||
2129 | have been moved from the C<syntax> top-level warnings category into a new | |
2130 | first-level category, C<illegalproto>. These two warnings are currently the | |
2131 | only ones emitted during parsing of an invalid/illegal prototype, so one | |
2132 | can now do | |
2133 | ||
2134 | no warnings 'illegalproto'; | |
2135 | ||
2136 | to suppress only those, but not other syntax-related warnings. Warnings where | |
2137 | prototypes are changed, ignored, or not met are still in the C<prototype> | |
79849ba8 | 2138 | category as before. |
3ab3a109 JV |
2139 | |
2140 | =item * | |
2141 | ||
3ab3a109 JV |
2142 | C<Deep recursion on subroutine "%s"> |
2143 | ||
2144 | It is now possible to change the depth threshold for this warning from the | |
2145 | default of 100, by recompiling the F<perl> binary, setting the C | |
2146 | pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value. | |
2147 | ||
2148 | =item * | |
2149 | ||
b6381718 JV |
2150 | C<Illegal character in prototype> warning is now more precise |
2151 | when reporting illegal characters after _ | |
3ab3a109 JV |
2152 | |
2153 | =item * | |
2154 | ||
b6381718 | 2155 | mro merging error messages are now very similar to those produced by L<Algorithm::C3>. |
3ab3a109 JV |
2156 | |
2157 | =item * | |
2158 | ||
b6381718 JV |
2159 | Amelioration of the error message "Unrecognized character %s in column %d" |
2160 | ||
2161 | Changes the error message to "Unrecognized character %s; marked by E<lt>-- | |
2162 | HERE after %sE<lt>-- HERE near column %d". This should make it a little | |
2163 | simpler to spot and correct the suspicious character. | |
3ab3a109 JV |
2164 | |
2165 | =item * | |
2166 | ||
b6381718 JV |
2167 | Perl now explicitly points to C<$.> when it causes an uninitialized warning for |
2168 | ranges in scalar context. | |
3ab3a109 JV |
2169 | |
2170 | =item * | |
2171 | ||
b6381718 | 2172 | C<split> now warns when called in void context. |
3ab3a109 JV |
2173 | |
2174 | =item * | |
2175 | ||
b6381718 JV |
2176 | C<printf>-style functions called with too few arguments will now issue the |
2177 | warning C<"Missing argument in %s"> [perl #71000] | |
3ab3a109 JV |
2178 | |
2179 | =item * | |
2180 | ||
b6381718 JV |
2181 | Perl now properly returns a syntax error instead of segfaulting |
2182 | if C<each>, C<keys>, or C<values> is used without an argument. | |
3ab3a109 JV |
2183 | |
2184 | =item * | |
2185 | ||
b6381718 JV |
2186 | C<tell()> now fails properly if called without an argument and when no |
2187 | previous file was read. | |
3ab3a109 | 2188 | |
b6381718 JV |
2189 | C<tell()> now returns C<-1>, and sets errno to C<EBADF>, thus restoring |
2190 | the 5.8.x behaviour. | |
3ab3a109 JV |
2191 | |
2192 | =item * | |
2193 | ||
b6381718 JV |
2194 | C<overload> no longer implicitly unsets fallback on repeated 'use |
2195 | overload' lines. | |
3ab3a109 | 2196 | |
72d4e865 JV |
2197 | =item * |
2198 | ||
b6381718 | 2199 | POSIX::strftime() can now handle Unicode characters in the format string. |
72d4e865 JV |
2200 | |
2201 | =item * | |
2202 | ||
b6381718 JV |
2203 | The C<syntax> category was removed from 5 warnings that should only be in |
2204 | C<deprecated>. | |
72d4e865 JV |
2205 | |
2206 | =item * | |
2207 | ||
b6381718 JV |
2208 | Three fatal C<pack>/C<unpack> error messages have been normalized to |
2209 | C<panic: %s> | |
72d4e865 JV |
2210 | |
2211 | =item * | |
2212 | ||
b6381718 JV |
2213 | C<Unicode character is illegal> has been rephrased to be more accurate |
2214 | ||
2215 | It now reads C<Unicode non-character is illegal in interchange> and the | |
2216 | perldiag documentation has been expanded a bit. | |
72d4e865 JV |
2217 | |
2218 | =item * | |
2219 | ||
2220 | Currently, all but the first of the several characters that the C<charnames> | |
2221 | handler may return are discarded when used in a regular expression pattern | |
2222 | bracketed character class. If this happens then the warning C<Using just the | |
2223 | first character returned by \N{} in character class> will be issued. | |
2224 | ||
2225 | =item * | |
2226 | ||
7acb582f | 2227 | The warning C<Missing right brace on \N{} or unescaped left brace after \N. |
72d4e865 JV |
2228 | Assuming the latter> will be issued if Perl encounters a C<\N{> but doesn't |
2229 | find a matching C<}>. In this case Perl doesn't know if it was mistakenly | |
2230 | omitted, or if "match non-newline" followed by "match a C<{>" was desired. | |
2231 | It assumes the latter because that is actually a valid interpretation as | |
2232 | written, unlike the other case. If you meant the former, you need to add the | |
2233 | matching right brace. If you did mean the latter, you can silence this | |
2234 | warning by writing instead C<\N\{>. | |
2235 | ||
2236 | =item * | |
2237 | ||
2238 | C<gmtime> and C<localtime> called with numbers smaller than they can reliably | |
2239 | handle will now issue the warnings C<gmtime(%.0f) too small> and | |
2240 | C<localtime(%.0f) too small>. | |
2241 | ||
2242 | =back | |
3ab3a109 | 2243 | |
b6381718 | 2244 | The following diagnostic messages have been removed: |
c66407fa RS |
2245 | |
2246 | =over 4 | |
2247 | ||
2248 | =item * | |
2249 | ||
2250 | C<Runaway format> | |
2251 | ||
2252 | =item * | |
2253 | ||
2254 | C<Can't locate package %s for the parents of %s> | |
2255 | ||
b6381718 | 2256 | In general this warning it only got produced in |
c66407fa RS |
2257 | conjunction with other warnings, and removing it allowed an ISA lookup |
2258 | optimisation to be added. | |
2259 | ||
2260 | =item * | |
2261 | ||
2262 | C<v-string in use/require is non-portable> | |
2263 | ||
2264 | =back | |
2265 | ||
3ab3a109 JV |
2266 | =head1 Utility Changes |
2267 | ||
2268 | =over 4 | |
2269 | ||
2270 | =item * | |
2271 | ||
b6381718 | 2272 | F<h2ph> now looks in C<include-fixed> too, which is a recent addition to gcc's |
3ab3a109 JV |
2273 | search path. |
2274 | ||
2275 | =item * | |
2276 | ||
79849ba8 JV |
2277 | F<h2xs> no longer incorrectly treats enum values like macros. |
2278 | It also now handles C++ style comments (C<//>) properly in enums. | |
3ab3a109 JV |
2279 | |
2280 | =item * | |
2281 | ||
d13f8571 JD |
2282 | F<perl5db.pl> now supports C<LVALUE> subroutines. Additionally, the |
2283 | debugger now correctly handles proxy constant subroutines, and | |
2284 | subroutine stubs. | |
3ab3a109 JV |
2285 | |
2286 | =item * | |
2287 | ||
b6381718 JV |
2288 | F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out |
2289 | upstream bug tracker URLs. If a user identifies a particular module | |
4655b0a1 | 2290 | as the topic of their bug report and we're able to divine the URL for |
b6381718 JV |
2291 | its upstream bug tracker, perlbug now provide a message to the user |
2292 | explaining that the core copies the CPAN version directly, and provide | |
2293 | the URL for reporting the bug directly to the upstream author. | |
3ab3a109 | 2294 | |
b6381718 | 2295 | F<perlbug> no longer reports "Message sent" when it hasn't actually sent the message |
3ab3a109 JV |
2296 | |
2297 | =item * | |
2298 | ||
b6381718 JV |
2299 | F<perlthanks> is a new utility for sending non-bug-reports to the |
2300 | authors and maintainers of Perl. Getting nothing but bug reports can | |
2301 | become a bit demoralising. If Perl 5.12 works well for you, please try | |
2302 | out F<perlthanks>. It will make the developers smile. | |
3ab3a109 JV |
2303 | |
2304 | =item * | |
2305 | ||
b6381718 | 2306 | Perl's developers have fixed bugs in F<a2p> having to do with the |
e014eb68 JV |
2307 | C<match()> operator in list context. Additionally, F<a2p> no longer |
2308 | generates code that uses the C<$[> variable. | |
3ab3a109 JV |
2309 | |
2310 | =back | |
2311 | ||
2312 | =head1 Selected Bug Fixes | |
2313 | ||
2314 | =over 4 | |
2315 | ||
2316 | =item * | |
2317 | ||
b6381718 JV |
2318 | U+0FFFF is now a legal character in regular expressions. |
2319 | ||
2320 | =item * | |
2321 | ||
2322 | pp_qr now always returns a new regexp SV. Resolves RT #69852. | |
3ab3a109 JV |
2323 | |
2324 | Instead of returning a(nother) reference to the (pre-compiled) regexp in the | |
2325 | optree, use reg_temp_copy() to create a copy of it, and return a reference to | |
2326 | that. This resolves issues about Regexp::DESTROY not being called in a timely | |
2327 | fashion (the original bug tracked by RT #69852), as well as bugs related to | |
2328 | blessing regexps, and of assigning to regexps, as described in correspondence | |
2329 | added to the ticket. | |
2330 | ||
2331 | It transpires that we also need to undo the SvPVX() sharing when ithreads | |
2332 | cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned | |
2333 | copy of the mother_re. This change might fix bugs with regexps and threads in | |
2334 | certain other situations, but as yet neither tests nor bug reports have | |
2335 | indicated any problems, so it might not actually be an edge case that it's | |
2336 | possible to reach. | |
2337 | ||
2338 | =item * | |
2339 | ||
3ab3a109 JV |
2340 | Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed. |
2341 | ||
2342 | =item * | |
2343 | ||
2344 | Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option. | |
2345 | ||
2346 | =item * | |
2347 | ||
c66407fa | 2348 | C<-t> should only return TRUE for file handles connected to a TTY |
3ab3a109 | 2349 | |
c66407fa RS |
2350 | The Microsoft C version of C<isatty()> returns TRUE for all |
2351 | character mode devices, including the F</dev/null>-style "nul" | |
3ab3a109 JV |
2352 | device and printers like "lpt1". |
2353 | ||
2354 | =item * | |
2355 | ||
2356 | Fixed a regression caused by commit fafafbaf which caused a panic during | |
2357 | parameter passing [perl #70171] | |
2358 | ||
2359 | =item * | |
2360 | ||
2361 | On systems which in-place edits without backup files, -i'*' now works as | |
2362 | the documentation says it does [perl #70802] | |
2363 | ||
2364 | =item * | |
2365 | ||
2366 | Saving and restoring magic flags no longer loses readonly flag. | |
2367 | ||
2368 | =item * | |
2369 | ||
2370 | The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer | |
2371 | causes abrupt and total failure. | |
2372 | ||
2373 | =item * | |
2374 | ||
2375 | Regular expressions compiled with C<qr{}> literals properly set C<$'> when | |
2376 | matching again. | |
2377 | ||
2378 | =item * | |
2379 | ||
2380 | Using named subroutines with C<sort> should no longer lead to bus errors [perl | |
2381 | #71076] | |
2382 | ||
2383 | =item * | |
2384 | ||
2385 | Numerous bugfixes catch small issues caused by the recently-added Lexer API. | |
2386 | ||
2387 | =item * | |
2388 | ||
2389 | Smart match against C<@_> sometimes gave false negatives. [perl #71078] | |
2390 | ||
2391 | =item * | |
2392 | ||
c66407fa RS |
2393 | C<$@> may now be assigned a read-only value (without error or busting |
2394 | the stack). | |
3ab3a109 JV |
2395 | |
2396 | =item * | |
2397 | ||
2398 | C<sort> called recursively from within an active comparison subroutine no | |
2399 | longer causes a bus error if run multiple times. [perl #71076] | |
2400 | ||
2401 | =item * | |
2402 | ||
c66407fa | 2403 | Tie::Hash::NamedCapture::* will not abort if passed bad input (RT #71828) |
3ab3a109 JV |
2404 | |
2405 | =item * | |
2406 | ||
2407 | @_ and $_ no longer leak under threads (RT #34342 and #41138, also | |
2408 | #70602, #70974) | |
2409 | ||
2410 | =item * | |
2411 | ||
2412 | C<-I> on shebang line now adds directories in front of @INC | |
2413 | as documented, and as does C<-I> when specified on the command-line. | |
2414 | ||
2415 | =item * | |
2416 | ||
2417 | C<kill> is now fatal when called on non-numeric process identifiers. | |
c66407fa RS |
2418 | Previously, an C<undef> process identifier would be interpreted as a |
2419 | request to kill process 0, which would terminate the current process | |
72d4e865 | 2420 | group on POSIX systems. Since process identifiers are always integers, |
c66407fa | 2421 | killing a non-numeric process is now fatal. |
3ab3a109 JV |
2422 | |
2423 | =item * | |
2424 | ||
2425 | 5.10.0 inadvertently disabled an optimisation, which caused a measurable | |
2426 | performance drop in list assignment, such as is often used to assign | |
2427 | function parameters from C<@_>. The optimisation has been re-instated, and | |
72d4e865 | 2428 | the performance regression fixed. (This fix is also present in 5.10.1) |
3ab3a109 JV |
2429 | |
2430 | =item * | |
2431 | ||
2432 | Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038]. | |
2433 | ||
2434 | =item * | |
2435 | ||
2436 | Some potential coredumps in PerlIO fixed [RT #57322,54828]. | |
2437 | ||
2438 | =item * | |
2439 | ||
2440 | The debugger now works with lvalue subroutines. | |
2441 | ||
2442 | =item * | |
2443 | ||
2444 | The debugger's C<m> command was broken on modules that defined constants | |
2445 | [RT #61222]. | |
2446 | ||
2447 | =item * | |
2448 | ||
2449 | C<crypt> and string complement could return tainted values for untainted | |
2450 | arguments [RT #59998]. | |
2451 | ||
2452 | =item * | |
2453 | ||
2454 | The C<-i>I<.suffix> command-line switch now recreates the file using | |
2455 | restricted permissions, before changing its mode to match the original | |
2456 | file. This eliminates a potential race condition [RT #60904]. | |
2457 | ||
2458 | =item * | |
2459 | ||
2460 | On some Unix systems, the value in C<$?> would not have the top bit set | |
2461 | (C<$? & 128>) even if the child core dumped. | |
2462 | ||
2463 | =item * | |
2464 | ||
2465 | Under some circumstances, C<$^R> could incorrectly become undefined | |
2466 | [RT #57042]. | |
2467 | ||
2468 | =item * | |
2469 | ||
2470 | In the XS API, various hash functions, when passed a pre-computed hash where | |
2471 | the key is UTF-8, might result in an incorrect lookup. | |
2472 | ||
2473 | =item * | |
2474 | ||
2475 | XS code including F<XSUB.h> before F<perl.h> gave a compile-time error | |
2476 | [RT #57176]. | |
2477 | ||
2478 | =item * | |
2479 | ||
2480 | C<< $object-E<gt>isa('Foo') >> would report false if the package C<Foo> didn't | |
2481 | exist, even if the object's C<@ISA> contained C<Foo>. | |
2482 | ||
2483 | =item * | |
2484 | ||
2485 | Various bugs in the new-to 5.10.0 mro code, triggered by manipulating | |
2486 | C<@ISA>, have been found and fixed. | |
2487 | ||
2488 | =item * | |
2489 | ||
2490 | Bitwise operations on references could crash the interpreter, e.g. | |
2491 | C<$x=\$y; $x |= "foo"> [RT #54956]. | |
2492 | ||
2493 | =item * | |
2494 | ||
2495 | Patterns including alternation might be sensitive to the internal UTF-8 | |
2496 | representation, e.g. | |
2497 | ||
2498 | my $byte = chr(192); | |
2499 | my $utf8 = chr(192); utf8::upgrade($utf8); | |
2500 | $utf8 =~ /$byte|X}/i; # failed in 5.10.0 | |
2501 | ||
2502 | =item * | |
2503 | ||
2504 | Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in | |
2505 | effect), double-quoted literal strings could be corrupted where a C<\xNN>, | |
2506 | C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value | |
2507 | greater than 255 [RT #59908]. | |
2508 | ||
2509 | =item * | |
2510 | ||
2511 | C<B::Deparse> failed to correctly deparse various constructs: | |
2512 | C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488], | |
2513 | C<sub foo(_)> [RT #62484]. | |
2514 | ||
2515 | =item * | |
2516 | ||
2517 | Using C<setpgrp> with no arguments could corrupt the perl stack. | |
2518 | ||
2519 | =item * | |
2520 | ||
2521 | The block form of C<eval> is now specifically trappable by C<Safe> and | |
72d4e865 | 2522 | C<ops>. Previously it was erroneously treated like string C<eval>. |
3ab3a109 JV |
2523 | |
2524 | =item * | |
2525 | ||
2526 | In 5.10.0, the two characters C<[~> were sometimes parsed as the smart | |
2527 | match operator (C<~~>) [RT #63854]. | |
2528 | ||
2529 | =item * | |
2530 | ||
2531 | In 5.10.0, the C<*> quantifier in patterns was sometimes treated as | |
2532 | C<{0,32767}> [RT #60034, #60464]. For example, this match would fail: | |
2533 | ||
2534 | ("ab" x 32768) =~ /^(ab)*$/ | |
2535 | ||
2536 | =item * | |
2537 | ||
2538 | C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924]. | |
2539 | ||
2540 | =item * | |
2541 | ||
2542 | Using C<next> or C<last> to exit a C<given> block no longer produces a | |
2543 | spurious warning like the following: | |
2544 | ||
2545 | Exiting given via last at foo.pl line 123 | |
2546 | ||
2547 | =item * | |
2548 | ||
3ab3a109 JV |
2549 | Assigning a format to a glob could corrupt the format; e.g.: |
2550 | ||
2551 | *bar=*foo{FORMAT}; # foo format now bad | |
2552 | ||
2553 | =item * | |
2554 | ||
2555 | Attempting to coerce a typeglob to a string or number could cause an | |
2556 | assertion failure. The correct error message is now generated, | |
2557 | C<Can't coerce GLOB to I<$type>>. | |
2558 | ||
2559 | =item * | |
2560 | ||
2561 | Under C<use filetest 'access'>, C<-x> was using the wrong access mode. This | |
2562 | has been fixed [RT #49003]. | |
2563 | ||
2564 | =item * | |
2565 | ||
2566 | C<length> on a tied scalar that returned a Unicode value would not be | |
2567 | correct the first time. This has been fixed. | |
2568 | ||
2569 | =item * | |
2570 | ||
2571 | Using an array C<tie> inside in array C<tie> could SEGV. This has been | |
2572 | fixed. [RT #51636] | |
2573 | ||
2574 | =item * | |
2575 | ||
2576 | A race condition inside C<PerlIOStdio_close()> has been identified and | |
2577 | fixed. This used to cause various threading issues, including SEGVs. | |
2578 | ||
2579 | =item * | |
2580 | ||
2581 | In C<unpack>, the use of C<()> groups in scalar context was internally | |
2582 | placing a list on the interpreter's stack, which manifested in various | |
72d4e865 | 2583 | ways, including SEGVs. This is now fixed [RT #50256]. |
3ab3a109 JV |
2584 | |
2585 | =item * | |
2586 | ||
2587 | Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>. | |
2588 | These have all been fixed. | |
2589 | ||
2590 | =item * | |
2591 | ||
2592 | A 5.10.0 optimisation to clear the temporary stack within the implicit | |
2593 | loop of C<s///ge> has been reverted, as it turned out to be the cause of | |
2594 | obscure bugs in seemingly unrelated parts of the interpreter [commit | |
2595 | ef0d4e17921ee3de]. | |
2596 | ||
2597 | =item * | |
2598 | ||
2599 | The line numbers for warnings inside C<elsif> are now correct. | |
2600 | ||
2601 | =item * | |
2602 | ||
2603 | The C<..> operator now works correctly with ranges whose ends are at or | |
2604 | close to the values of the smallest and largest integers. | |
2605 | ||
2606 | =item * | |
2607 | ||
2608 | C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms. | |
2609 | This has been fixed [RT #54828]. | |
2610 | ||
2611 | =item * | |
2612 | ||
2613 | An off-by-one error meant that C<index $str, ...> was effectively being | |
2614 | executed as C<index "$str\0", ...>. This has been fixed [RT #53746]. | |
2615 | ||
2616 | =item * | |
2617 | ||
2618 | Various leaks associated with named captures in regexes have been fixed | |
2619 | [RT #57024]. | |
2620 | ||
2621 | =item * | |
2622 | ||
2623 | A weak reference to a hash would leak. This was affecting C<DBI> | |
2624 | [RT #56908]. | |
2625 | ||
2626 | =item * | |
2627 | ||
2628 | Using (?|) in a regex could cause a segfault [RT #59734]. | |
2629 | ||
2630 | =item * | |
2631 | ||
2632 | Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520]. | |
2633 | ||
2634 | =item * | |
2635 | ||
2636 | Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an | |
2637 | unaligned 64-bit access on the SPARC architecture [RT #60574]. | |
2638 | ||
2639 | =item * | |
2640 | ||
2641 | In the 5.10.0 release, C<inc_version_list> would incorrectly list | |
2642 | C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order | |
2643 | [RT #67628]. | |
2644 | ||
2645 | =item * | |
2646 | ||
2647 | In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value | |
2648 | [RT #52552]. | |
2649 | ||
2650 | =item * | |
2651 | ||
2652 | In 5.10.0, C<printf> and C<sprintf> could produce the fatal error | |
2653 | C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings | |
2654 | [RT #62666]. | |
2655 | ||
2656 | =item * | |
2657 | ||
2658 | In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be | |
2659 | missed (method cache issue) [RT #60220,60232]. | |
2660 | ||
2661 | =item * | |
2662 | ||
2663 | In the 5.10.0 release, a combination of C<use feature> and C<//ee> could | |
2664 | cause a memory leak [RT #63110]. | |
2665 | ||
2666 | =item * | |
2667 | ||
2668 | C<-C> on the shebang (C<#!>) line is once more permitted if it is also | |
2669 | specified on the command line. C<-C> on the shebang line used to be a | |
2670 | silent no-op I<if> it was not also on the command line, so perl 5.10.0 | |
2671 | disallowed it, which broke some scripts. Now perl checks whether it is | |
2672 | also on the command line and only dies if it is not [RT #67880]. | |
2673 | ||
2674 | =item * | |
2675 | ||
2676 | In 5.10.0, certain types of re-entrant regular expression could crash, | |
2677 | or cause the following assertion failure [RT #60508]: | |
2678 | ||
2679 | Assertion rx->sublen >= (s - rx->subbeg) + i failed | |
2680 | ||
2681 | =item * | |
2682 | ||
7acb582f | 2683 | Perl now includes previously missing files from the Unicode Character Database. |
3ab3a109 JV |
2684 | |
2685 | =item * | |
2686 | ||
b6381718 | 2687 | Perl now honors C<TMPDIR> when opening an anonymous temporary file. |
3ab3a109 JV |
2688 | |
2689 | =back | |
2690 | ||
b6381718 | 2691 | |
3ab3a109 JV |
2692 | =head1 Platform Specific Changes |
2693 | ||
b6381718 JV |
2694 | Perl is incredibly portable. In general, if a platform has a C compiler, |
2695 | someone has ported Perl to it (or will soon). We're happy to announce | |
2696 | that Perl 5.12 includes support for several new platforms. At the same | |
2697 | time, it's time to bid farewell to some (very) old friends. | |
2698 | ||
3ab3a109 JV |
2699 | =head2 New Platforms |
2700 | ||
2701 | =over | |
2702 | ||
2703 | =item Haiku | |
2704 | ||
b6381718 | 2705 | Perl's developers have merged patches from Haiku's maintainers. Perl should now |
3ab3a109 JV |
2706 | build on Haiku. |
2707 | ||
2708 | =item MirOS BSD | |
2709 | ||
2710 | Perl should now build on MirOS BSD. | |
2711 | ||
3ab3a109 JV |
2712 | =back |
2713 | ||
2714 | =head2 Discontinued Platforms | |
2715 | ||
2716 | =over | |
2717 | ||
3b72faae | 2718 | =item Domain/OS |
3ab3a109 | 2719 | |
3ab3a109 JV |
2720 | =item MiNT |
2721 | ||
8ead3603 JD |
2722 | =item Tenon MachTen |
2723 | ||
3ab3a109 JV |
2724 | =back |
2725 | ||
2726 | =head2 Updated Platforms | |
2727 | ||
2728 | =over 4 | |
2729 | ||
8ead3603 JD |
2730 | =item AIX |
2731 | ||
2732 | =over 4 | |
2733 | ||
2734 | =item * | |
2735 | ||
2736 | Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from F<libbsd>. | |
2737 | ||
2738 | =item * | |
2739 | ||
7b8c44fa RT |
2740 | Removed F<libgdbm> for AIX 5L and 6.1 if F<libgdbm> < 1.8.3-5 is installed. |
2741 | The F<libgdbm> is delivered as an optional package with the AIX Toolbox. | |
2742 | Unfortunately the versions below 1.8.3-5 are broken. | |
8ead3603 JD |
2743 | |
2744 | =item * | |
2745 | ||
2746 | Hints changes mean that AIX 4.2 should work again. | |
2747 | ||
2748 | =back | |
2749 | ||
2750 | =item Cygwin | |
2751 | ||
2752 | =over 4 | |
2753 | ||
2754 | =item * | |
2755 | ||
2756 | Perl now supports IPv6 on Cygwin 1.7 and newer. | |
2757 | ||
2758 | =item * | |
2759 | ||
2760 | On Cygwin we now strip the last number from the DLL. This has been the | |
2761 | behaviour in the cygwin.com build for years. The hints files have been | |
2762 | updated. | |
2763 | ||
2764 | =back | |
2765 | ||
3ab3a109 JV |
2766 | =item Darwin (Mac OS X) |
2767 | ||
2768 | =over 4 | |
2769 | ||
2770 | =item * | |
2771 | ||
2772 | Skip testing the be_BY.CP1131 locale on Darwin 10 (Mac OS X 10.6), | |
2773 | as it's still buggy. | |
2774 | ||
2775 | =item * | |
2776 | ||
2777 | Correct infelicities in the regexp used to identify buggy locales | |
2778 | on Darwin 8 and 9 (Mac OS X 10.4 and 10.5, respectively). | |
2779 | ||
2780 | =back | |
2781 | ||
2782 | =item DragonFly BSD | |
2783 | ||
2784 | =over 4 | |
2785 | ||
2786 | =item * | |
2787 | ||
2788 | Fix thread library selection [perl #69686] | |
2789 | ||
2790 | =back | |
2791 | ||
8ead3603 | 2792 | =item FreeBSD |
3ab3a109 JV |
2793 | |
2794 | =over 4 | |
2795 | ||
2796 | =item * | |
2797 | ||
8ead3603 JD |
2798 | The hints files now identify the correct threading libraries on FreeBSD 7 |
2799 | and later. | |
3ab3a109 | 2800 | |
8ead3603 | 2801 | =back |
3ab3a109 | 2802 | |
8ead3603 | 2803 | =item Irix |
3ab3a109 | 2804 | |
8ead3603 | 2805 | =over 4 |
3ab3a109 JV |
2806 | |
2807 | =item * | |
2808 | ||
8ead3603 JD |
2809 | We now work around a bizarre preprocessor bug in the Irix 6.5 compiler: |
2810 | C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't. | |
3ab3a109 JV |
2811 | |
2812 | =back | |
2813 | ||
8ead3603 | 2814 | =item NetBSD |
3ab3a109 JV |
2815 | |
2816 | =over 4 | |
2817 | ||
2818 | =item * | |
2819 | ||
8ead3603 | 2820 | Hints now supports versions 5.*. |
3ab3a109 JV |
2821 | |
2822 | =back | |
2823 | ||
2824 | =item OpenVMS | |
2825 | ||
2826 | =over 4 | |
2827 | ||
2828 | =item * | |
2829 | ||
b6381718 | 2830 | C<-UDEBUGGING> is now the default on VMS. |
3ab3a109 | 2831 | |
72d4e865 | 2832 | Like it has been everywhere else for ages and ages. Also make |
3ab3a109 JV |
2833 | command-line selection of -UDEBUGGING and -DDEBUGGING work in |
2834 | configure.com; before the only way to turn it off was by saying | |
2835 | no in answer to the interactive question. | |
2836 | ||
2837 | =item * | |
2838 | ||
2839 | The default pipe buffer size on VMS has been updated to 8192 on 64-bit | |
2840 | systems. | |
2841 | ||
2842 | =item * | |
2843 | ||
2844 | Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail | |
2845 | if C<$/> was set to a numeric reference (to indicate record-style reads). | |
2846 | This is now fixed. | |
2847 | ||
2848 | =item * | |
2849 | ||
2850 | VMS now supports C<getgrgid>. | |
2851 | ||
2852 | =item * | |
2853 | ||
2854 | Many improvements and cleanups have been made to the VMS file name handling | |
2855 | and conversion code. | |
2856 | ||
2857 | =item * | |
2858 | ||
2859 | Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit | |
2860 | status in a VMS condition value for better interaction with GNV's bash | |
72d4e865 | 2861 | shell and other utilities that depend on POSIX exit values. See |
3ab3a109 JV |
2862 | L<perlvms/"$?"> for details. |
2863 | ||
2864 | =item * | |
2865 | ||
2866 | C<File::Copy> now detects Unix compatibility mode on VMS. | |
2867 | ||
2868 | =back | |
2869 | ||
8ead3603 | 2870 | =item Stratus VOS |
3ab3a109 | 2871 | |
8ead3603 | 2872 | =over 4 |
3ab3a109 | 2873 | |
8ead3603 | 2874 | =item * |
3ab3a109 | 2875 | |
8ead3603 | 2876 | Various changes from Stratus have been merged in. |
3ab3a109 | 2877 | |
8ead3603 | 2878 | =back |
3ab3a109 | 2879 | |
8ead3603 | 2880 | =item Symbian |
3ab3a109 | 2881 | |
8ead3603 | 2882 | =over 4 |
3ab3a109 | 2883 | |
8ead3603 | 2884 | =item * |
3ab3a109 | 2885 | |
8ead3603 | 2886 | There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK. |
3ab3a109 | 2887 | |
8ead3603 | 2888 | =back |
3ab3a109 | 2889 | |
d13f8571 | 2890 | =item Windows |
3ab3a109 | 2891 | |
8ead3603 | 2892 | =over 4 |
3ab3a109 | 2893 | |
8ead3603 | 2894 | =item * |
3ab3a109 | 2895 | |
d13f8571 JD |
2896 | Perl 5.12 supports Windows 2000 and later. The supporting code for |
2897 | legacy versions of Windows is still included, but will be removed | |
2898 | during the next development cycle. | |
3ab3a109 | 2899 | |
8ead3603 | 2900 | =item * |
3ab3a109 | 2901 | |
d13f8571 | 2902 | Initial support for building Perl with MinGW-w64 is now available. |
3ab3a109 | 2903 | |
8ead3603 JD |
2904 | =item * |
2905 | ||
d13f8571 | 2906 | F<perl.exe> now includes a manifest resource to specify the C<trustInfo> |
8ead3603 | 2907 | settings for Windows Vista and later. Without this setting Windows |
d13f8571 | 2908 | would treat F<perl.exe> as a legacy application and apply various |
8ead3603 JD |
2909 | heuristics like redirecting access to protected file system areas |
2910 | (like the "Program Files" folder) to the users "VirtualStore" | |
2911 | instead of generating a proper "permission denied" error. | |
2912 | ||
d13f8571 JD |
2913 | The manifest resource also requests the Microsoft Common-Controls |
2914 | version 6.0 (themed controls introduced in Windows XP). Check out the | |
2915 | Win32::VisualStyles module on CPAN to switch back to old style | |
2916 | unthemed controls for legacy applications. | |
2917 | ||
2918 | =item * | |
2919 | ||
2920 | The C<-t> filetest operator now only returns true if the filehandle | |
2921 | is connected to a console window. In previous versions of Perl it | |
2922 | would return true for all character mode devices, including F<NUL> | |
2923 | and F<LPT1>. | |
2924 | ||
2925 | =item * | |
2926 | ||
2927 | The C<-p> filetest operator now works correctly, and the | |
2928 | Fcntl::S_IFIFO constant is defined when Perl is compiled with | |
2929 | Microsoft Visual C. In previous Perl versions C<-p> always | |
2930 | returned a false value, and the Fcntl::S_IFIFO constant | |
2931 | was not defined. | |
2932 | ||
2933 | This bug is specific to Microsoft Visual C and never affected | |
2934 | Perl binaries built with MinGW. | |
2935 | ||
2936 | =item * | |
2937 | ||
2938 | The socket error codes are now more widely supported: The POSIX | |
2939 | module will define the symbolic names, like POSIX::EWOULDBLOCK, | |
2940 | and stringification of socket error codes in $! works as well | |
2941 | now; | |
2942 | ||
2943 | C:\>perl -MPOSIX -E "$!=POSIX::EWOULDBLOCK; say $!" | |
2944 | A non-blocking socket operation could not be completed immediately. | |
2945 | ||
2946 | =item * | |
2947 | ||
2948 | flock() will now set sensible error codes in $!. Previous Perl versions | |
2949 | copied the value of $^E into $!, which caused much confusion. | |
2950 | ||
2951 | =item * | |
2952 | ||
2953 | select() now supports all empty C<fd_set>s more correctly. | |
8ead3603 | 2954 | |
d13f8571 JD |
2955 | =item * |
2956 | ||
2957 | C<'.\foo'> and C<'..\foo'> were treated differently than | |
2958 | C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492]. | |
8ead3603 JD |
2959 | |
2960 | =item * | |
2961 | ||
2962 | Improved message window handling means that C<alarm> and C<kill> messages | |
2963 | will no longer be dropped under race conditions. | |
2964 | ||
d13f8571 JD |
2965 | =item * |
2966 | ||
2967 | Various bits of Perl's build infrastructure are no longer converted to | |
2968 | win32 line endings at release time. If this hurts you, please report the | |
2969 | problem with the L<perlbug> program included with perl. | |
2970 | ||
8ead3603 | 2971 | =back |
3ab3a109 JV |
2972 | |
2973 | =back | |
2974 | ||
b6381718 | 2975 | |
3ab3a109 JV |
2976 | =head1 Known Problems |
2977 | ||
2978 | This is a list of some significant unfixed bugs, which are regressions | |
72d4e865 | 2979 | from either 5.10.x or 5.8.x. |
3ab3a109 JV |
2980 | |
2981 | =over 4 | |
2982 | ||
2983 | =item * | |
2984 | ||
2985 | C<List::Util::first> misbehaves in the presence of a lexical C<$_> | |
2986 | (typically introduced by C<my $_> or implicitly by C<given>). The variable | |
2987 | which gets set for each iteration is the package variable C<$_>, not the | |
2988 | lexical C<$_> [RT #67694]. | |
2989 | ||
2990 | A similar issue may occur in other modules that provide functions which | |
2991 | take a block as their first argument, like | |
2992 | ||
2993 | foo { ... $_ ...} list | |
2994 | ||
2995 | =item * | |
2996 | ||
3ab3a109 JV |
2997 | Some regexes may run much more slowly when run in a child thread compared |
2998 | with the thread the pattern was compiled into [RT #55600]. | |
2999 | ||
3000 | =item * | |
3001 | ||
3d3a8206 KW |
3002 | Things like C<"\N{LATIN SMALL LIGATURE FF}" =~ /\N{LATIN SMALL LETTER F}+/> |
3003 | will appear to hang as they get into a very long running loop [RT #72998]. | |
3004 | ||
3005 | =item * | |
3006 | ||
d13f8571 JD |
3007 | Several porters have reported mysterious crashes when Perl's entire |
3008 | test suite is run after a build on certain Windows 2000 systems. When | |
3009 | run by hand, the individual tests reportedly work fine. | |
3ab3a109 | 3010 | |
b6381718 JV |
3011 | =back |
3012 | ||
3013 | =head1 Errata | |
3014 | ||
3015 | =over | |
3016 | ||
3ab3a109 JV |
3017 | =item * |
3018 | ||
b6381718 JV |
3019 | This one is actually a change introduced in 5.10.0, but it was missed |
3020 | from that release's perldelta, so it is mentioned here instead. | |
3021 | ||
3022 | A bugfix related to the handling of the C</m> modifier and C<qr> resulted | |
3023 | in a change of behaviour between 5.8.x and 5.10.0: | |
3ab3a109 | 3024 | |
b6381718 JV |
3025 | # matches in 5.8.x, doesn't match in 5.10.0 |
3026 | $re = qr/^bar/; "foo\nbar" =~ /$re/m; | |
3ab3a109 | 3027 | |
3ab3a109 JV |
3028 | =back |
3029 | ||
3030 | =head1 Acknowledgements | |
3031 | ||
3032 | Perl 5.12.0 represents approximately two years of development since | |
aac88411 | 3033 | Perl 5.10.0 and contains over 750,000 lines of changes across over |
ee75e258 | 3034 | 3,000 files from over 200 authors and committers. |
aac88411 | 3035 | |
d13f8571 JD |
3036 | Perl continues to flourish into its third decade thanks to a vibrant |
3037 | community of users and developers. The following people are known to | |
3038 | have contributed the improvements that became Perl 5.12.0: | |
aac88411 JV |
3039 | |
3040 | Aaron Crane, Abe Timmerman, Abhijit Menon-Sen, Abigail, Adam Russell, | |
3041 | Adriano Ferreira, Ævar Arnfjörð Bjarmason, Alan Grover, Alexandr | |
3042 | Ciornii, Alex Davies, Alex Vandiver, Andreas Koenig, Andrew Rodland, | |
3043 | andrew@sundale.net, Andy Armstrong, Andy Dougherty, Jose AUGUSTE-ETIENNE, | |
3044 | Benjamin Smith, Ben Morrow, bharanee rathna, Bo Borgerson, Bo Lindbergh, | |
3045 | Brad Gilbert, Bram, Brendan O'Dea, brian d foy, Charles Bailey, | |
3046 | Chip Salzenberg, Chris 'BinGOs' Williams, Christoph Lamprecht, Chris | |
3047 | Williams, chromatic, Claes Jakobsson, Craig A. Berry, Dan Dascalescu, | |
3048 | Daniel Frederick Crisman, Daniel M. Quinlan, Dan Jacobson, Dan Kogai, | |
3049 | Dave Mitchell, Dave Rolsky, David Cantrell, David Dick, David Golden, | |
3050 | David Mitchell, David M. Syzdek, David Nicol, David Wheeler, Dennis | |
3051 | Kaarsemaker, Dintelmann, Peter, Dominic Dunlop, Dr.Ruud, Duke Leto, | |
3052 | Enrico Sorcinelli, Eric Brine, Father Chrysostomos, Florian Ragwitz, | |
3053 | Frank Wiegand, Gabor Szabo, Gene Sullivan, Geoffrey T. Dairiki, George | |
3054 | Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham Barr, Green, Paul, | |
3055 | Hans Dieter Pearcey, Harmen, H. Merijn Brand, Hugo van der Sanden, | |
3056 | Ian Goodacre, Igor Sutton, Ingo Weinhold, James Bence, James Mastros, | |
3057 | Jan Dubois, Jari Aalto, Jarkko Hietaniemi, Jay Hannah, Jerry Hedden, | |
3058 | Jesse Vincent, Jim Cromie, Jody Belka, John E. Malmberg, John Malmberg, | |
3059 | John Peacock, John Peacock via RT, John P. Linderman, John Wright, | |
3060 | Josh ben Jore, Jos I. Boumans, Karl Williamson, Kenichi Ishigaki, Ken | |
3061 | Williams, Kevin Brintnall, Kevin Ryde, Kurt Starsinic, Leon Brocard, | |
3062 | Lubomir Rintel, Luke Ross, Marcel Grünauer, Marcus Holland-Moritz, Mark | |
3063 | Jason Dominus, Marko Asplund, Martin Hasch, Mashrab Kuvatov, Matt Kraai, | |
3064 | Matt S Trout, Max Maischein, Michael Breen, Michael Cartmell, Michael | |
3065 | G Schwern, Michael Witten, Mike Giroux, Milosz Tanski, Moritz Lenz, | |
3066 | Nicholas Clark, Nick Cleaton, Niko Tyni, Offer Kaye, Osvaldo Villalon, | |
3067 | Paul Fenwick, Paul Gaborit, Paul Green, Paul Johnson, Paul Marquess, | |
3068 | Philip Hazel, Philippe Bruhat, Rafael Garcia-Suarez, Rainer Tammer, | |
3069 | Rajesh Mandalemula, Reini Urban, Renée Bäcker, Ricardo Signes, | |
3070 | Ricardo SIGNES, Richard Foley, Rich Rauenzahn, Rick Delaney, Risto | |
3071 | Kankkunen, Robert May, Roberto C. Sanchez, Robin Barker, SADAHIRO | |
3072 | Tomoyuki, Salvador Ortiz Garcia, Sam Vilain, Scott Lanning, Sébastien | |
3073 | Aperghis-Tramoni, Sérgio Durigan Júnior, Shlomi Fish, Simon 'corecode' | |
3074 | Schubert, Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steffen | |
3075 | Ullrich, Stepan Kasal, Steve Hay, Steven Schubiger, Steve Peters, Tels, | |
3076 | The Doctor, Tim Bunce, Tim Jenness, Todd Rinaldo, Tom Christiansen, | |
3077 | Tom Hukins, Tom Wyant, Tony Cook, Torsten Schoenfeld, Tye McQueen, | |
3078 | Vadim Konovalov, Vincent Pit, Hio YAMASHINA, Yasuhiro Matsumoto, | |
3079 | Yitzchak Scott-Thoennes, Yuval Kogman, Yves Orton, Zefram, Zsban Ambrus | |
3080 | ||
3081 | This is woefully incomplete as it's automatically generated from version | |
3082 | control history. In particular, it doesn't include the names of the | |
3083 | (very much appreciated) contributors who reported issues in previous | |
3084 | versions of Perl that helped make Perl 5.12.0 better. For a more complete | |
3085 | list of all of Perl's historical contributors, please see the C<AUTHORS> | |
3086 | file in the Perl 5.12.0 distribution. | |
3ab3a109 JV |
3087 | |
3088 | Many of the changes included in this version originated in the CPAN | |
3089 | modules included in Perl's core. We're grateful to the entire CPAN | |
3090 | community for helping Perl to flourish. | |
3091 | ||
3092 | =head1 Reporting Bugs | |
3093 | ||
3094 | If you find what you think is a bug, you might check the articles | |
3095 | recently posted to the comp.lang.perl.misc newsgroup and the perl | |
72d4e865 | 3096 | bug database at L<http://rt.perl.org/perlbug/>. There may also be |
3ab3a109 JV |
3097 | information at L<http://www.perl.org/>, the Perl Home Page. |
3098 | ||
3099 | If you believe you have an unreported bug, please run the B<perlbug> | |
72d4e865 JV |
3100 | program included with your release. Be sure to trim your bug down |
3101 | to a tiny but sufficient test case. Your bug report, along with the | |
3ab3a109 JV |
3102 | output of C<perl -V>, will be sent off to perlbug@perl.org to be |
3103 | analyzed by the Perl porting team. | |
3104 | ||
3105 | If the bug you are reporting has security implications, which make it | |
3106 | inappropriate to send to a publicly archived mailing list, then please send | |
3107 | it to perl5-security-report@perl.org. This points to a closed subscription | |
3108 | unarchived mailing list, which includes all the core committers, who be able | |
3109 | to help assess the impact of issues, figure out a resolution, and help | |
3110 | co-ordinate the release of patches to mitigate or fix the problem across all | |
3111 | platforms on which Perl is supported. Please only use this address for | |
3112 | security issues in the Perl core, not for modules independently | |
3113 | distributed on CPAN. | |
3114 | ||
3115 | =head1 SEE ALSO | |
3116 | ||
3117 | The F<Changes> file for an explanation of how to view exhaustive details | |
3118 | on what changed. | |
3119 | ||
3120 | The F<INSTALL> file for how to build Perl. | |
3121 | ||
3122 | The F<README> file for general stuff. | |
3123 | ||
3124 | The F<Artistic> and F<Copying> files for copyright information. | |
3125 | ||
3126 | =cut |