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