Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
916c45d9 | 5 | perldelta - what is new for perl v5.17.4 |
e128ab2c | 6 | |
4eabcf70 | 7 | =head1 DESCRIPTION |
6db9054f | 8 | |
916c45d9 | 9 | This document describes differences between the 5.17.3 release and the 5.17.4 |
e08634c5 | 10 | release. |
6db9054f | 11 | |
916c45d9 SH |
12 | If you are upgrading from an earlier release such as 5.17.2, first read |
13 | L<perl5173delta>, which describes differences between 5.17.2 and 5.17.3. | |
9c5f5e7a | 14 | |
916c45d9 | 15 | =head1 Core Enhancements |
9c5f5e7a | 16 | |
83d881f0 KW |
17 | =head2 Latest Unicode 6.2 beta is included |
18 | ||
19 | This is supposed to be the final data for 6.2, unless glitches are | |
20 | found. The earlier experimental 6.2 beta data has been reverted, and | |
21 | this used instead. Not all the changes that were proposed for 6.2 and | |
22 | that were in the earlier beta versions are actually going into 6.2. In | |
23 | particular, there are no changes from 6.1 in the General_Category of any | |
24 | characters. 6.2 does revise the C<\X> handling for the REGIONAL | |
25 | INDICATOR characters that were added in Unicode 6.0. Perl now for the | |
26 | first time fully handles this revision. | |
27 | ||
5faa50e9 FR |
28 | =head2 New DTrace probes |
29 | ||
30 | The following new DTrace probes have been added: | |
31 | ||
32 | =over 4 | |
33 | ||
34 | =item C<op-entry> | |
35 | ||
36 | =item C<loading-file> | |
37 | ||
38 | =item C<loaded-file> | |
39 | ||
40 | =back | |
41 | ||
b932b266 FC |
42 | =head2 C<${^LAST_FH}> |
43 | ||
44 | This new variable provides access to the filehandle that was last read. | |
45 | This is the handle used by C<$.> and by C<tell> and C<eof> without | |
46 | arguments. | |
47 | ||
4db91b87 FC |
48 | =head2 Looser here-doc parsing |
49 | ||
50 | Here-doc terminators no longer require a terminating newline character when | |
51 | they occur at the end of a file. This was already the case at the end of a | |
52 | string eval [perl #65838]. | |
53 | ||
54 | =head2 New mechanism for experimental features | |
55 | ||
56 | Newly-added experimental features will now require this incantation: | |
57 | ||
58 | no warnings "experimental:feature_name"; | |
59 | use feature "feature_name"; # would warn without the prev line | |
60 | ||
61 | There is a new warnings category, called "experimental", containing | |
62 | warnings that the L<feature> pragma emits when enabling experimental | |
63 | features. | |
64 | ||
65 | Newly-added experimental features will also be given special warning IDs, | |
66 | which consist of "experimental:" followed by the name of the feature. (The | |
67 | plan is to extend this mechanism eventually to all warnings, to allow them | |
68 | to be enabled or disabled individually, and not just by category.) | |
69 | ||
70 | By saying | |
71 | ||
72 | no warnings "experimental:feature_name"; | |
73 | ||
74 | you are taking responsibility for any breakage that future changes to, or | |
75 | removal of, the feature may cause. | |
76 | ||
77 | =head2 Lexical subroutines | |
78 | ||
79 | This new feature is still considered experimental. To enable it, use the | |
80 | mechanism described above: | |
81 | ||
82 | use 5.018; | |
83 | no warnings "experimental:lexical_subs"; | |
84 | use feature "lexical_subs"; | |
85 | ||
86 | You can now declare subroutines with C<state sub foo>, C<my sub foo>, and | |
87 | C<our sub foo>. (C<state sub> requires that the "state" feature be | |
88 | enabled, unless you write it as C<CORE::state sub foo>.) | |
89 | ||
90 | C<state sub> creates a subroutine visible within the lexical scope in which | |
91 | it is declared. The subroutine is shared between calls to the outer sub. | |
92 | ||
93 | C<my sub> declares a lexical subroutine that is created each time the | |
94 | enclosing block is entered. C<state sub> is generally slightly faster than | |
95 | C<my sub>. | |
96 | ||
97 | C<our sub> declares a lexical alias to the package subroutine of the same | |
98 | name. | |
99 | ||
100 | See L<perlsub/Lexical Subroutines>. | |
101 | ||
916c45d9 | 102 | =head1 Incompatible Changes |
9c5f5e7a | 103 | |
4db91b87 FC |
104 | =head2 Here-doc parsing |
105 | ||
106 | The body of a here-document inside a quote-like operator now always begins | |
107 | on the line after the "<<foo" marker. Previously, it was documented to | |
108 | begin on the line following the containing quote-like operator, but that | |
109 | was only sometimes the case [perl #114040]. | |
110 | ||
111 | =head2 Stricter parsing of substitution replacement | |
112 | ||
113 | It is no longer possible to abuse the way the parser parses C<s///e> like | |
114 | this: | |
115 | ||
116 | %_=(_,"Just another "); | |
117 | $_="Perl hacker,\n"; | |
118 | s//_}->{_/e;print | |
119 | ||
120 | =head2 Interaction of lexical and default warnings | |
121 | ||
122 | Turning on any lexical warnings used first to disable all default warnings | |
123 | if lexical warnings were not already enabled: | |
124 | ||
125 | $*; # deprecation warning | |
126 | use warnings "void"; | |
127 | $#; # void warning; no deprecation warning | |
128 | ||
129 | Now, the debugging, deprecated, glob, inplace and malloc warnings | |
130 | categories are left on when turning on lexical warnings (unless they are | |
131 | turned off by C<no warnings>, of course). | |
132 | ||
133 | This may cause deprecation warnings to occur in code that used to be free | |
134 | of warnings. | |
135 | ||
136 | Those are the only categories consisting only of default warnings. Default | |
137 | warnings in other categories are still disabled by C<use warnings | |
138 | "category">, as we do not yet have the infrastructure for controlling | |
139 | individual warnings. | |
140 | ||
141 | =head2 C<state sub> and C<our sub> | |
142 | ||
143 | Due to an accident of history, C<state sub> and C<our sub> were equivalent | |
144 | to a plain C<sub>, so one could even create an anonymous sub with | |
145 | C<our sub { ... }>. These are now disallowed outside of the "lexical_subs" | |
146 | feature. Under the "lexical_subs" feature they have new meanings described | |
147 | in L<perlsub/Lexical Subroutines>. | |
148 | ||
45f11e9c FC |
149 | =head2 C<gv_fetchmeth_*> and SUPER |
150 | ||
151 | The various C<gv_fetchmeth_*> XS functions used to treat a package whose | |
152 | named ended with ::SUPER specially. A method lookup on the Foo::SUPER | |
153 | package would be treated as a SUPER method lookup on the Foo package. This | |
154 | is no longer the case. To do a SUPER lookup, pass the Foo stash and the | |
155 | GV_SUPER flag. | |
156 | ||
916c45d9 | 157 | =head1 Performance Enhancements |
9c5f5e7a | 158 | |
916c45d9 | 159 | =over 4 |
338a1057 SH |
160 | |
161 | =item * | |
162 | ||
a3d51778 KW |
163 | Speed up in regular expression matching against Unicode properties. The |
164 | largest gain is for C<\X>, the Unicode "extended grapheme cluster". The | |
165 | gain for it is about 35% - 40%. Bracketed character classes, e.g., | |
166 | C<[0-9\x{100}]> containing code points above 255 are also now faster. | |
0ace302a | 167 | |
5faa50e9 FR |
168 | =item * |
169 | ||
170 | On platforms supporting it, several former macros are now implemented as static | |
171 | inline functions. This should speed things up slightly on non-GCC platforms. | |
172 | ||
173 | =item * | |
174 | ||
175 | Apply the optimisation of hashes in boolean context, such as in C<if> or C<and>, | |
176 | to constructs in non-void context. | |
177 | ||
178 | =item * | |
179 | ||
180 | Extend the optimisation of hashes in boolean context to C<scalar(%hash)>, | |
4db91b87 | 181 | C<%hash ? ... : ...>, and C<sub { %hash || ... }>. |
5faa50e9 FR |
182 | |
183 | =item * | |
184 | ||
185 | When making a copy of the string being matched against (so that $1, $& et al | |
186 | continue to show the correct value even if the original string is subsequently | |
187 | modified), only copy that substring of the original string needed for the | |
188 | capture variables, rather than copying the whole string. | |
189 | ||
190 | This is a big win for code like | |
191 | ||
192 | $&; | |
193 | $_ = 'x' x 1_000_000; | |
194 | 1 while /(.)/; | |
195 | ||
196 | Also, when pessimizing if the code contains C<$`>, C<$&> or C<$'>, record the | |
197 | presence of each variable separately, so that the determination of the substring | |
198 | range is based on each variable separately. So performance-wise, | |
199 | ||
200 | $&; /x/ | |
201 | ||
202 | is now roughly equivalent to | |
203 | ||
204 | /(x)/ | |
205 | ||
206 | whereas previously it was like | |
207 | ||
208 | /^(.*)(x)(.*)$/ | |
209 | ||
210 | and | |
211 | ||
212 | $&; $'; /x/ | |
213 | ||
214 | is now roughly equivalent to | |
215 | ||
216 | /(x)(.*)$/ | |
217 | ||
218 | etc. | |
219 | ||
916c45d9 | 220 | =back |
0ace302a | 221 | |
916c45d9 | 222 | =head1 Modules and Pragmata |
9c5f5e7a | 223 | |
916c45d9 | 224 | =head2 Updated Modules and Pragmata |
4cc02608 | 225 | |
916c45d9 | 226 | =over 4 |
e7b92d54 SH |
227 | |
228 | =item * | |
229 | ||
5faa50e9 FR |
230 | L<Archive::Tar> has been upgraded from version 1.88 to 1.90. This adds |
231 | documentation fixes. | |
232 | ||
233 | =item * | |
234 | ||
235 | L<B> has been upgraded from version 1.37 to 1.38. This makes the module work | |
236 | with the new pad API. | |
237 | ||
238 | =item * | |
239 | ||
240 | L<B::Concise> has been upgraded from version 0.92 to 0.93. This adds support | |
241 | for the new C<OpMAYBE_TRUEBOOL> and C<OPpTRUEBOOL> flags. | |
242 | ||
243 | =item * | |
244 | ||
245 | L<B::Deparse> has been upgraded from version 1.16 to 1.17. This suppresses | |
246 | trailing semicolons in formats. | |
247 | ||
248 | =item * | |
249 | ||
1ea91bbe FR |
250 | L<CPANPLUS> has been upgraded from version 0.9130 to 0.9131. This resolves |
251 | issues with the SQLite source engine. | |
252 | ||
253 | =item * | |
254 | ||
2a527d37 SH |
255 | L<DB_File> has been upgraded from version 1.826 to 1.827. The main Perl module |
256 | no longer uses the C<"@_"> construct. | |
257 | ||
258 | =item * | |
259 | ||
5faa50e9 FR |
260 | L<Devel::Peek> has been upgraded from version 1.09 to 1.10. This fixes |
261 | compilation with C++ compilers and makes the module work with the new pad API. | |
262 | ||
263 | =item * | |
264 | ||
265 | L<DynaLoader> has been upgraded from version 1.15 to 1.16. This fixes warnings | |
266 | about using C<CODE> sections without an C<OUTPUT> section. | |
267 | ||
268 | =item * | |
269 | ||
270 | L<ExtUtils::ParseXS> has been upgraded from version 3.17 to 3.18. This avoids a | |
4db91b87 | 271 | bogus warning for initialised XSUB non-parameters [perl #112776]. |
5faa50e9 FR |
272 | |
273 | =item * | |
274 | ||
846de5c9 SH |
275 | L<File::Copy> has been upgraded from version 2.23 to 2.24. C<copy()> no longer |
276 | zeros files when copying into the same directory, and also now fails (as it has | |
277 | long been documented to do) when attempting to copy a file over itself. | |
278 | ||
279 | =item * | |
280 | ||
5faa50e9 FR |
281 | L<File::Find> has been upgraded from version 1.21 to 1.22. This fixes |
282 | inconsistent unixy path handling on VMS. | |
283 | ||
284 | =item * | |
285 | ||
5f877a7f SH |
286 | L<IPC::Open3> has been upgraded from version 1.12 to 1.13. The C<open3()> |
287 | function no longer uses C<POSIX::close()> to close file descriptors since that | |
288 | breaks the ref-counting of file descriptors done by PerlIO in cases where the | |
289 | file descriptors are shared by PerlIO streams, leading to attempts to close the | |
290 | file descriptors a second time when any such PerlIO streams are closed later on. | |
291 | ||
292 | =item * | |
293 | ||
2a527d37 SH |
294 | L<Locale::Codes> has been upgraded from version 3.22 to 3.23. It includes some |
295 | new codes. | |
296 | ||
297 | =item * | |
298 | ||
5faa50e9 FR |
299 | L<Module::CoreList> has been upgraded from version 2.71 to 2.73. This restores |
300 | compatibility with older versions of perl and cleans up the corelist data for | |
301 | various modules. | |
302 | ||
303 | =item * | |
304 | ||
305 | L<Opcode> has been upgraded from version 1.23 to 1.24 to reflect the removal of | |
4db91b87 FC |
306 | the boolkeys opcode and the addition of the clonecv, introcv and padcv |
307 | opcodes. | |
5faa50e9 FR |
308 | |
309 | =item * | |
310 | ||
aff163d9 SH |
311 | L<Socket> has been upgraded from version 2.004 to 2.006. |
312 | C<unpack_sockaddr_in()> and C<unpack_sockaddr_in6()> now return just the IP | |
313 | address in scalar context, and C<inet_ntop()> now guards against incorrect | |
314 | length scalars being passed in. | |
9c5f5e7a | 315 | |
5faa50e9 FR |
316 | =item * |
317 | ||
0da95061 | 318 | L<Storable> has been upgraded from version 2.38 to 2.39. This contains various |
eebee32b FR |
319 | bugfixes, including compatibility fixes for older versions of Perl and vstring |
320 | handling. | |
321 | ||
322 | =item * | |
323 | ||
1ea91bbe FR |
324 | L<Sys::Syslog> has been upgraded from version 0.31 to 0.32. This includes |
325 | several documentation and bug fixes. | |
326 | ||
327 | =item * | |
328 | ||
5faa50e9 FR |
329 | L<threads::shared> has been upgraded from version 1.40 to 1.41. This adds the |
330 | option to warn about or ignore attempts to clone structures that can't be | |
331 | cloned, as opposed to just unconditionally dying in that case. | |
332 | ||
333 | =item * | |
334 | ||
1ea91bbe FR |
335 | L<version> has been upgraded from version 0.99 to 0.9901. |
336 | ||
337 | =item * | |
338 | ||
5faa50e9 FR |
339 | L<XSLoader> has been upgraded from version 0.15 to 0.16. |
340 | ||
916c45d9 | 341 | =back |
9c5f5e7a | 342 | |
4eabcf70 | 343 | =head1 Diagnostics |
05c8f9ed | 344 | |
4eabcf70 TC |
345 | The following additions or changes have been made to diagnostic output, |
346 | including warnings and fatal error messages. For the complete list of | |
347 | diagnostic messages, see L<perldiag>. | |
ceb0881c | 348 | |
4eabcf70 | 349 | =head2 New Diagnostics |
42d72fc5 | 350 | |
4eabcf70 | 351 | =head3 New Warnings |
90519d0f | 352 | |
4eabcf70 | 353 | =over 4 |
90519d0f FC |
354 | |
355 | =item * | |
356 | ||
4db91b87 FC |
357 | L<Experimental "%s" subs not enabled|perldiag/"Experimental "%s" subs not enabled"> |
358 | ||
359 | (F) To use lexical subs, you must first enable them: | |
360 | ||
361 | no warnings 'experimental:lexical_subs'; | |
362 | use feature 'lexical_subs'; | |
363 | my sub foo { ... } | |
364 | ||
365 | =item * | |
366 | ||
367 | L<Subroutine "&%s" is not available|perldiag/"Subroutine "&%s" is not available"> | |
368 | ||
369 | (W closure) During compilation, an inner named subroutine or eval is | |
370 | attempting to capture an outer lexical subroutine that is not currently | |
371 | available. This can happen for one of two reasons. First, the lexical | |
372 | subroutine may be declared in an outer anonymous subroutine that has not | |
373 | yet been created. (Remember that named subs are created at compile time, | |
374 | while anonymous subs are created at run-time.) For example, | |
375 | ||
376 | sub { my sub a {...} sub f { \&a } } | |
377 | ||
378 | At the time that f is created, it can't capture the current the "a" sub, | |
379 | since the anonymous subroutine hasn't been created yet. Conversely, the | |
380 | following won't give a warning since the anonymous subroutine has by now | |
381 | been created and is live: | |
382 | ||
383 | sub { my sub a {...} eval 'sub f { \&a }' }->(); | |
384 | ||
385 | The second situation is caused by an eval accessing a variable that has | |
386 | gone out of scope, for example, | |
387 | ||
388 | sub f { | |
389 | my sub a {...} | |
390 | sub { eval '\&a' } | |
391 | } | |
392 | f()->(); | |
393 | ||
394 | Here, when the '\&a' in the eval is being compiled, f() is not currently | |
395 | being executed, so its &a is not available for capture. | |
396 | ||
397 | =item * | |
398 | ||
399 | L<"%s" subroutine &%s masks earlier declaration in same %s|perldiag/"%s" subroutine &%s masks earlier declaration in same %s> | |
400 | ||
401 | (W misc) A "my" or "state" subroutine has been redeclared in the | |
402 | current scope or statement, effectively eliminating all access to | |
403 | the previous instance. This is almost always a typographical error. | |
404 | Note that the earlier subroutine will still exist until the end of | |
405 | the scope or until all closure references to it are destroyed. | |
406 | ||
407 | =item * | |
408 | ||
409 | L<The %s feature is experimental|perldiag/"The %s feature is experimental"> | |
410 | ||
411 | (S experimental) This warning is emitted if you enable an experimental | |
412 | feature via C<use feature>. Simply suppress the warning if you want | |
413 | to use the feature, but know that in doing so you are taking the risk | |
414 | of using an experimental feature which may change or be removed in a | |
415 | future Perl version: | |
416 | ||
417 | no warnings "experimental:lexical_subs"; | |
418 | use feature "lexical_subs"; | |
90519d0f | 419 | |
1ea91bbe FR |
420 | =item * |
421 | ||
422 | L<sleep(%u) too large|perldiag/"sleep(%u) too large"> | |
423 | ||
424 | (W overflow) You called C<sleep> with a number that was larger than it can | |
425 | reliably handle and C<sleep> probably slept for less time than requested. | |
426 | ||
61174fb5 | 427 | =back |
422287bf | 428 | |
916c45d9 | 429 | =head2 Changes to Existing Diagnostics |
c95d4104 | 430 | |
4eabcf70 | 431 | =over 4 |
7ab2ea42 | 432 | |
916c45d9 | 433 | =item * |
7ab2ea42 | 434 | |
4db91b87 FC |
435 | L<vector argument not supported with alpha versions|perldiag/vector argument not supported with alpha versions> |
436 | ||
437 | This warning was not suppressable, even with C<no warnings>. Now it is | |
438 | suppressible, and has been moved from the "internal" category to the | |
439 | "printf" category. | |
90519d0f | 440 | |
1ea91bbe FR |
441 | =item * |
442 | ||
443 | C<< Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/ >> | |
444 | ||
445 | This fatal error has been turned into a warning that reads: | |
446 | ||
447 | L<< Quantifier {n,m} with n > m can't match in regex | perldiag/Quantifier {n,m} with n > m can't match in regex >> | |
448 | ||
449 | (W regexp) Minima should be less than or equal to maxima. If you really want | |
450 | your regexp to match something 0 times, just put {0}. | |
451 | ||
4eabcf70 | 452 | =back |
90519d0f | 453 | |
916c45d9 | 454 | =head1 Configuration and Compilation |
d7f7c515 | 455 | |
916c45d9 | 456 | =over 4 |
afc04f16 | 457 | |
b4cf37f5 FC |
458 | =item * |
459 | ||
5faa50e9 FR |
460 | F<Configure> will now correctly detect C<isblank()> when compiling with a C++ |
461 | compiler. | |
b4cf37f5 | 462 | |
916c45d9 | 463 | =back |
b4cf37f5 | 464 | |
916c45d9 | 465 | =head1 Platform Support |
9da700a7 | 466 | |
916c45d9 | 467 | =head2 Discontinued Platforms |
610c7be4 | 468 | |
916c45d9 | 469 | =over 4 |
c58f5a32 | 470 | |
043fec90 | 471 | =item VM/ESA |
c58f5a32 | 472 | |
043fec90 NC |
473 | Support for VM/ESA has been removed. The port was tested on 2.3.0, which |
474 | IBM ended service on in March 2002. 2.4.0 ended service in June 2003, and | |
475 | was superseded by Z/VM. The current version of Z/VM is V6.2.0, and scheduled | |
476 | for end of service on 2015/04/30. | |
a21a3918 | 477 | |
916c45d9 | 478 | =back |
a21a3918 | 479 | |
916c45d9 | 480 | =head2 Platform-Specific Notes |
a21a3918 | 481 | |
916c45d9 | 482 | =over 4 |
60ca243a | 483 | |
5faa50e9 | 484 | =item Win32 |
60ca243a | 485 | |
3eebda9a SH |
486 | Fixed a problem where perl could crash while cleaning up threads (including the |
487 | main thread) in threaded debugging builds on Win32 and possibly other platforms | |
488 | [perl #114496]. | |
5faa50e9 | 489 | |
9afd6203 SH |
490 | A rare race condition that would lead to L<sleep|perlfunc/sleep> taking more |
491 | time than requested, and possibly even hanging, has been fixed [perl #33096]. | |
001e9f89 | 492 | |
5faa50e9 FR |
493 | =item Solaris |
494 | ||
495 | In Configure, avoid running sed commands with flags not supported on Solaris. | |
496 | ||
497 | =item Darwin | |
498 | ||
499 | Stop hardcoding an alignment on 8 byte boundaries to fix builds using | |
500 | -Dusemorebits. | |
3771623e | 501 | |
eebee32b FR |
502 | =item VMS |
503 | ||
504 | Fix linking on builds configured with -Dusemymalloc=y. | |
505 | ||
916c45d9 | 506 | =back |
d91f1bc9 | 507 | |
916c45d9 | 508 | =head1 Internal Changes |
d91f1bc9 | 509 | |
916c45d9 | 510 | =over 4 |
b4d67305 | 511 | |
3c774534 SH |
512 | =item * |
513 | ||
5faa50e9 FR |
514 | The APIs for accessing lexical pads have changed considerably. |
515 | ||
516 | C<PADLIST>s are now longer C<AV>s, but their own type instead. C<PADLIST>s now | |
517 | contain a C<PAD> and a C<PADNAMELIST> of C<PADNAME>s, rather than C<AV>s for the | |
518 | pad and the list of pad names. C<PAD>s, C<PADNAMELIST>s, and C<PADNAME>s are to | |
0da95061 | 519 | be accessed as such through the newly added pad API instead of the plain C<AV> |
5faa50e9 | 520 | and C<SV> APIs. See L<perlapi> for details. |
d91f1bc9 | 521 | |
050862bb DM |
522 | =item * |
523 | ||
524 | In the regex API, the numbered capture callbacks are passed an index | |
525 | indicating what match variable is being accessed. There are special | |
526 | index values for the C<$`, $&, $&> variables. Previously the same three | |
527 | values were used to retrieve C<${^PREMATCH}, ${^MATCH}, ${^POSTMATCH}> | |
528 | too, but these have now been assigned three separate values. See | |
529 | L<perlreapi/Numbered capture callbacks>. | |
530 | ||
531 | =item * | |
532 | ||
533 | C<PL_sawampersand> was previously a boolean indicating that any of | |
534 | C<$`, $&, $&> had been seen; it now contains three one-bit flags | |
535 | indicating the presence of each of the variables individually. | |
536 | ||
916c45d9 | 537 | =back |
d91f1bc9 | 538 | |
916c45d9 | 539 | =head1 Selected Bug Fixes |
d91f1bc9 | 540 | |
916c45d9 | 541 | =over 4 |
d91f1bc9 SH |
542 | |
543 | =item * | |
544 | ||
4db91b87 FC |
545 | The error "Can't localize through a reference" had disappeared in 5.16.0 |
546 | when C<local %$ref> appeared on the last line of an lvalue subroutine. | |
547 | This error disappeared for C<\local %$ref> in perl 5.8.1. It has now | |
548 | been restored. | |
549 | ||
550 | =item * | |
551 | ||
552 | The parsing of here-docs has been improved significantly, fixing several | |
553 | parsing bugs and crashes and one memory leak, and correcting wrong | |
554 | subsequent line numbers under certain conditions. | |
555 | ||
556 | =item * | |
557 | ||
558 | Inside an eval, the error message for an unterminated here-doc no longer | |
559 | has a newline in the middle of it [perl #70836]. | |
560 | ||
561 | =item * | |
562 | ||
563 | A substitution inside a substitution pattern (C<s/${s|||}//>) no longer | |
564 | confuses the parser. | |
565 | ||
566 | =item * | |
567 | ||
568 | It may be an odd place to allow comments, but C<s//"" # hello/e> has | |
569 | always worked, I<unless> there happens to be a null character before the | |
570 | first #. Now it works even in the presence of nulls. | |
571 | ||
572 | =item * | |
573 | ||
574 | An invalid range in C<tr///> or C<y///> no longer results in a memory leak. | |
575 | ||
576 | =item * | |
577 | ||
578 | String eval no longer treats a semicolon-delimited quote-like operator at | |
579 | the very end (C<eval 'q;;'>) as a syntax error. | |
580 | ||
581 | =item * | |
582 | ||
583 | C<< warn {$_ => 1} + 1 >> is no longer a syntax error. The parser used to | |
584 | get confused with certain list operators followed by an anonymous hash and | |
585 | then an infix operator that shares its form with a unary operator. | |
5faa50e9 FR |
586 | |
587 | =item * | |
588 | ||
4db91b87 FC |
589 | C<(caller $n)[6]> (which gives the text of the eval) used to return the |
590 | actual parser buffer. Modifying it could result in crashes. Now it always | |
591 | returns a copy. The string returned no longer has "\n;" tacked on to the | |
592 | end. The returned text also includes here-doc bodies, which used to be | |
593 | omitted. | |
5faa50e9 FR |
594 | |
595 | =item * | |
596 | ||
597 | Reset the utf8 position cache when accessing magical variables to avoid the | |
0da95061 | 598 | string buffer and the utf8 position cache getting out of sync |
4db91b87 | 599 | [perl #114410]. |
5faa50e9 FR |
600 | |
601 | =item * | |
602 | ||
603 | Various cases of get magic being called twice for magical utf8 strings have been | |
604 | fixed. | |
605 | ||
606 | =item * | |
607 | ||
608 | This code (when not in the presence of C<$&> etc) | |
609 | ||
610 | $_ = 'x' x 1_000_000; | |
611 | 1 while /(.)/; | |
612 | ||
613 | used to skip the buffer copy for performance reasons, but suffered from C<$1> | |
614 | etc changing if the original string changed. That's now been fixed. | |
615 | ||
616 | =item * | |
617 | ||
618 | Perl doesn't use PerlIO anymore to report out of memory messages, as PerlIO | |
619 | might attempt to allocate more memory. | |
d91f1bc9 | 620 | |
31c15ce5 KW |
621 | =item * |
622 | ||
623 | In a regular expression, if something is quantified with C<{n,m}> | |
624 | where C<S<n E<gt> m>>, it can't possibly match. Previously this was a fatal error, | |
625 | but now is merely a warning (and that something won't match). [perl #82954]. | |
626 | ||
4db91b87 FC |
627 | =item * |
628 | ||
629 | It used to be possible for formats defined in subroutines that have | |
0da95061 | 630 | subsequently been undefined and redefined to close over variables in the |
4db91b87 FC |
631 | wrong pad (the newly-defined enclosing sub), resulting in crashes or |
632 | "Bizarre copy" errors. | |
633 | ||
634 | =item * | |
635 | ||
636 | Redefinition of XSUBs at run time could produce warnings with the wrong | |
637 | line number. | |
638 | ||
639 | =item * | |
640 | ||
641 | The %vd sprintf format does not support version objects for alpha versions. | |
642 | It used to output the format itself (%vd) when passed an alpha version, and | |
643 | also emit an "Invalid conversion in printf" warning. It no longer does, | |
644 | but produces the empty string in the output. It also no longer leaks | |
645 | memory in this case. | |
646 | ||
647 | =item * | |
648 | ||
649 | A bug fix in an earlier 5.17.x release caused C<no a a 3> (a syntax error) | |
650 | to result in a bad read or assertion failure, because an op was being freed | |
651 | twice. | |
652 | ||
653 | =item * | |
654 | ||
655 | C<< $obj->SUPER::method >> calls in the main package could fail if the | |
656 | SUPER package had already been accessed by other means. | |
657 | ||
658 | =item * | |
659 | ||
660 | Stash aliasing (C<*foo:: = *bar::>) no longer causes SUPER calls to ignore | |
661 | changes to methods or @ISA or use the wrong package. | |
662 | ||
45f11e9c FC |
663 | =item * |
664 | ||
665 | Method calls on packages whose names end in ::SUPER are no longer treated | |
666 | as SUPER method calls, resulting in failure to find the method. | |
667 | Furthermore, defining subroutines in such packages no longer causes them to | |
668 | be found by SUPER method calls on the containing package [perl #114924]. | |
669 | ||
916c45d9 | 670 | =back |
d91f1bc9 | 671 | |
916c45d9 | 672 | =head1 Known Problems |
d91f1bc9 | 673 | |
916c45d9 | 674 | =over 4 |
216d99a6 FC |
675 | |
676 | =item * | |
677 | ||
8f9354bc | 678 | Changes in the lexical pad API break some CPAN modules. |
5faa50e9 FR |
679 | |
680 | To avoid having to patch those modules again later if we change pads from AVs | |
681 | into their own types, APIs for accessing the contents of pads have been added. | |
216d99a6 | 682 | |
4eabcf70 | 683 | =back |
90519d0f | 684 | |
916c45d9 | 685 | =head1 Acknowledgements |
05bee12a | 686 | |
8f9354bc FR |
687 | Perl 5.17.4 represents approximately 4 weeks of development since Perl 5.17.3 |
688 | and contains approximately 82,000 lines of changes across 360 files from 37 | |
689 | authors. | |
690 | ||
691 | Perl continues to flourish into its third decade thanks to a vibrant community | |
692 | of users and developers. The following people are known to have contributed the | |
693 | improvements that became Perl 5.17.4: | |
694 | ||
695 | Abhijit Menon-Sen, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs' | |
696 | Williams, Colin Kuskie, Craig A. Berry, Daniel Dragan, David Golden, David | |
697 | Leadbeater, David Mitchell, David Nicol, Dominic Hargreaves, Father | |
698 | Chrysostomos, Florian Ragwitz, H.Merijn Brand, James E Keenan, Jerry D. Hedden, | |
699 | Jesse Luehrs, John Peacock, Karen Etheridge, Karl Williamson, Leon Timmermans, | |
700 | Michael G Schwern, Nicholas Clark, Peter Martini, Rafael Garcia-Suarez, Ricardo | |
701 | Signes, Shawn M Moore, Shlomi Fish, Steffen Müller, Steve Hay, Sullivan Beck, | |
702 | Sébastien Aperghis-Tramoni, Tony Cook, Vincent Pit, Yves Orton. | |
703 | ||
704 | The list above is almost certainly incomplete as it is automatically generated | |
705 | from version control history. In particular, it does not include the names of | |
706 | the (very much appreciated) contributors who reported issues to the Perl bug | |
707 | tracker. | |
708 | ||
709 | Many of the changes included in this version originated in the CPAN modules | |
710 | included in Perl's core. We're grateful to the entire CPAN community for | |
711 | helping Perl to flourish. | |
712 | ||
713 | For a more complete list of all of Perl's historical contributors, please see | |
714 | the F<AUTHORS> file in the Perl source distribution. | |
29cf780c | 715 | |
44691e6f AB |
716 | =head1 Reporting Bugs |
717 | ||
e08634c5 SH |
718 | If you find what you think is a bug, you might check the articles recently |
719 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
720 | http://rt.perl.org/perlbug/ . There may also be information at | |
721 | http://www.perl.org/ , the Perl Home Page. | |
44691e6f | 722 | |
e08634c5 SH |
723 | If you believe you have an unreported bug, please run the L<perlbug> program |
724 | included with your release. Be sure to trim your bug down to a tiny but | |
725 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
726 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
44691e6f AB |
727 | |
728 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
729 | inappropriate to send to a publicly archived mailing list, then please send it |
730 | to perl5-security-report@perl.org. This points to a closed subscription | |
731 | unarchived mailing list, which includes all the core committers, who will be | |
732 | able to help assess the impact of issues, figure out a resolution, and help | |
f9001595 | 733 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
734 | platforms on which Perl is supported. Please only use this address for |
735 | security issues in the Perl core, not for modules independently distributed on | |
736 | CPAN. | |
44691e6f AB |
737 | |
738 | =head1 SEE ALSO | |
739 | ||
e08634c5 SH |
740 | The F<Changes> file for an explanation of how to view exhaustive details on |
741 | what changed. | |
44691e6f AB |
742 | |
743 | The F<INSTALL> file for how to build Perl. | |
744 | ||
745 | The F<README> file for general stuff. | |
746 | ||
747 | The F<Artistic> and F<Copying> files for copyright information. | |
748 | ||
749 | =cut |