Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
b26bd9b0 | 5 | perldelta - what is new for perl v5.23.4 |
eabfc7bc | 6 | |
2cfe9b50 | 7 | =head1 DESCRIPTION |
eabfc7bc | 8 | |
b26bd9b0 | 9 | This document describes differences between the 5.23.3 release and the 5.23.4 |
2cfe9b50 | 10 | release. |
eabfc7bc | 11 | |
b26bd9b0 PM |
12 | If you are upgrading from an earlier release such as 5.23.2, first read |
13 | L<perl5233delta>, which describes differences between 5.23.2 and 5.23.3. | |
a43707ab | 14 | |
b26bd9b0 | 15 | =head1 Incompatible Changes |
a43707ab | 16 | |
9ff1a054 RS |
17 | =head2 Lexical $_ has been removed |
18 | ||
a6d3278e SH |
19 | C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion |
20 | with no obvious solution. In Perl 5.18.0, it was made experimental on the | |
9ff1a054 RS |
21 | theory that it would either be removed or redesigned in a less confusing (but |
22 | backward-incompatible) way. Over the following years, no alternatives were | |
23 | proposed. The feature has now been removed and will fail to compile. | |
0ba9d88c | 24 | |
d6b89212 KW |
25 | =head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>. |
26 | ||
a6d3278e SH |
27 | The experimental Extended Bracketed Character Classes can contain regular |
28 | bracketed character classes within them. These differ from regular ones in | |
29 | that white space is generally ignored, unless escaped by preceding it with a | |
30 | backslash. The white space that is ignored is now limited to just tab C<\t> | |
31 | and SPACE characters. Previously, it was any white space. See | |
d6b89212 KW |
32 | L<perlrecharclass/Extended Bracketed Character Classes>. |
33 | ||
b26bd9b0 | 34 | =head1 Performance Enhancements |
fc4c3cec | 35 | |
b26bd9b0 | 36 | =over 4 |
a43707ab | 37 | |
0dafb1ce | 38 | =item * |
5ea25977 | 39 | |
f83db990 SH |
40 | C</fixed-substr/> has been made much faster. |
41 | ||
42 | On platforms with a libc memchr() implementation which makes good use of | |
43 | underlying hardware support, patterns which include fixed substrings will now | |
44 | often be much faster; for example with glibc on on a recent x86_64 CPU, this: | |
45 | ||
46 | $s = "a" x 1000 . "wxyz"; | |
47 | $s =~ /wxyz/ for 1..30000 | |
48 | ||
49 | is now about 7 times faster. On systems with slow memchr(), e.g. 32-bit ARM | |
50 | Raspberry Pi, there will be a small or little speedup. Conversely, some | |
51 | pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3 | |
52 | times slower on the rPi, 1.5x slower on x86_64. | |
fc4c3cec | 53 | |
b26bd9b0 | 54 | =back |
fc4c3cec | 55 | |
b26bd9b0 | 56 | =head1 Modules and Pragmata |
eabfc7bc | 57 | |
b26bd9b0 | 58 | =head2 Updated Modules and Pragmata |
5ea25977 | 59 | |
b26bd9b0 | 60 | =over 4 |
80e86009 | 61 | |
0dafb1ce | 62 | =item * |
80e86009 | 63 | |
f83db990 SH |
64 | L<B> has been upgraded from version 1.59 to 1.60. |
65 | ||
66 | =item * | |
67 | ||
68 | L<bignum> has been upgraded from version 0.40 to 0.41. | |
69 | ||
70 | =item * | |
71 | ||
72 | L<Compress::Raw::Bzip2> has been upgraded from version 2.068 to 2.069. | |
73 | ||
74 | =item * | |
75 | ||
76 | L<Compress::Raw::Zlib> has been upgraded from version 2.068_01 to 2.069. | |
77 | ||
78 | =item * | |
79 | ||
80 | L<Devel::PPPort> has been upgraded from version 3.31 to 3.32. | |
81 | ||
82 | =item * | |
83 | ||
84 | L<DynaLoader> has been upgraded from version 1.34 to 1.35. | |
85 | ||
86 | =item * | |
87 | ||
88 | L<Encode> has been upgraded from version 2.77 to 2.78. | |
89 | ||
90 | =item * | |
91 | ||
92 | L<experimental> has been upgraded from version 0.014 to 0.016. | |
93 | ||
94 | =item * | |
95 | ||
96 | L<ExtUtils::CBuilder> has been upgraded from version 0.280223 to 0.280224. | |
97 | ||
98 | =item * | |
99 | ||
100 | L<File::Path> has been upgraded from version 2.11 to 2.12. | |
101 | ||
102 | =item * | |
103 | ||
104 | L<if> has been upgraded from version 0.0605 to 0.0606. | |
105 | ||
106 | =item * | |
107 | ||
108 | L<IO> has been upgraded from version 1.35 to 1.36. | |
109 | ||
110 | For an IO::Poll object C<$poll> with no file handles yet in it, | |
111 | C<$poll->poll(10)> now sleeps for up to 10 seconds anyway instead of returning | |
112 | 0 immediately. | |
113 | L<[cpan #25049]|https://rt.cpan.org/Ticket/Display.html?id=25049> | |
114 | ||
115 | =item * | |
116 | ||
117 | L<IO-Compress> has been upgraded from version 2.068 to 2.069. | |
118 | ||
119 | =item * | |
120 | ||
121 | L<Math::BigInt> has been upgraded from version 1.999701 to 1.999704. | |
122 | ||
123 | =item * | |
124 | ||
125 | L<Math::BigInt::FastCalc> has been upgraded from version 0.31 to 0.34. | |
126 | ||
127 | =item * | |
128 | ||
129 | L<Module::CoreList> has been upgraded from version 5.20150920 to 5.20151020. | |
130 | ||
131 | =item * | |
132 | ||
133 | L<Module::Metadata> has been upgraded from version 1.000027 to 1.000029. | |
134 | ||
135 | =item * | |
136 | ||
137 | L<Perl::OSType> has been upgraded from version 1.008 to 1.009. | |
138 | ||
139 | =item * | |
140 | ||
141 | L<PerlIO::encoding> has been upgraded from version 0.21 to 0.22. | |
142 | ||
143 | PerlIO::encoding objects are now properly duplicated. | |
144 | L<[perl #31923]|https://rt.perl.org/Ticket/Display.html?id=31923> | |
145 | ||
146 | =item * | |
147 | ||
148 | L<POSIX> has been upgraded from version 1.57 to 1.58. | |
149 | ||
150 | If C<POSIX::strerror> was passed C<$!> as its argument then it accidentally | |
151 | cleared C<$!>. This has been fixed. | |
152 | L<[perl #126229]|https://rt.perl.org/Ticket/Display.html?id=126229> | |
153 | ||
154 | =item * | |
155 | ||
156 | L<Socket> has been upgraded from version 2.020_01 to 2.020_02. | |
157 | ||
158 | Various fixes have been applied to inet_pton for the benefit of MS VC++ builds | |
159 | on Windows. In particular, this restores the build with MS VC++ 6.0. | |
160 | ||
161 | =item * | |
162 | ||
163 | L<Unicode::Normalize> has been upgraded from version 1.19 to 1.21. | |
164 | ||
165 | =item * | |
166 | ||
167 | L<warnings> has been upgraded from version 1.33 to 1.35. | |
168 | ||
169 | The C<warnings::enabled> example now actually uses C<warnings::enabled>. | |
170 | L<[perl #126051]|https://rt.perl.org/Ticket/Display.html?id=126051> | |
5ea25977 | 171 | |
b26bd9b0 | 172 | =back |
5ea25977 | 173 | |
b26bd9b0 | 174 | =head1 Documentation |
0dd5b0dc | 175 | |
b26bd9b0 | 176 | =head2 Changes to Existing Documentation |
cf73ceda | 177 | |
f83db990 SH |
178 | =head3 L<perlapi> |
179 | ||
180 | =over 4 | |
181 | ||
182 | =item * | |
183 | ||
184 | The process of using undocumented globals has been documented, namely, that one | |
185 | should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org> | |
186 | first to get the go-ahead for documenting and using an undocumented function or | |
187 | global variable. | |
188 | ||
189 | =back | |
190 | ||
191 | =head3 L<perlsub> | |
192 | ||
193 | =over 4 | |
194 | ||
195 | =item * | |
196 | ||
197 | Updated to note that anonymous subroutines can have signatures. | |
198 | ||
199 | =back | |
200 | ||
201 | =head3 L<perltie> | |
b26bd9b0 PM |
202 | |
203 | =over 4 | |
eabfc7bc | 204 | |
0dafb1ce | 205 | =item * |
eabfc7bc | 206 | |
f83db990 SH |
207 | The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified. |
208 | ||
209 | =back | |
210 | ||
211 | =head3 L<perlvar> | |
212 | ||
213 | =over 4 | |
214 | ||
215 | =item * | |
216 | ||
217 | The specific true value of C<$!{E...}> is now documented, noting that it is | |
218 | subject to change and not guaranteed. | |
5ea25977 | 219 | |
b26bd9b0 | 220 | =back |
5ea25977 | 221 | |
b26bd9b0 | 222 | =head1 Diagnostics |
5ea25977 | 223 | |
b26bd9b0 PM |
224 | The following additions or changes have been made to diagnostic output, |
225 | including warnings and fatal error messages. For the complete list of | |
226 | diagnostic messages, see L<perldiag>. | |
5ea25977 | 227 | |
b26bd9b0 | 228 | =head2 New Diagnostics |
a43707ab | 229 | |
b26bd9b0 | 230 | =head3 New Errors |
0dafb1ce | 231 | |
b26bd9b0 | 232 | =over 4 |
5ea25977 MH |
233 | |
234 | =item * | |
235 | ||
163a633c | 236 | L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/"> |
dc013420 | 237 | |
4003ea29 KW |
238 | =item * |
239 | ||
240 | L<perldiag/"Illegal user-defined property name"> | |
241 | ||
cf73ceda | 242 | =back |
dc013420 | 243 | |
b26bd9b0 | 244 | =head2 Changes to Existing Diagnostics |
0dafb1ce | 245 | |
0dafb1ce | 246 | =over 4 |
a43707ab | 247 | |
0dafb1ce PM |
248 | =item * |
249 | ||
a0c8eb51 TC |
250 | L<"Can't modify non-lvalue subroutine call of &%s"|perldiag/"Can't modify non-lvalue subroutine call of &%s"> |
251 | ||
a6d3278e SH |
252 | This error now reports the name of the non-lvalue subroutine you attempted to |
253 | use as an lvalue. | |
f282dc56 | 254 | |
b26bd9b0 | 255 | =back |
f282dc56 | 256 | |
33c85a9f | 257 | =head1 Configuration and Compilation |
b26bd9b0 PM |
258 | |
259 | =over 4 | |
cf73ceda | 260 | |
0dafb1ce | 261 | =item * |
cf73ceda | 262 | |
c2d4ebc6 DD |
263 | Using the C<NO_HASH_SEED> define in combination with the default hash algorithm |
264 | C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling | |
a6d3278e | 265 | the interpreter, since Perl 5.17.10. This has been fixed. |
cf73ceda | 266 | |
f282dc56 MH |
267 | =item * |
268 | ||
f83db990 SH |
269 | If you had F<Configure> hints for C<d_procselfexe> or C<procselfexe>, they were |
270 | probably broken by the AmigaOS changes in Perl 5.23.3. This has been now | |
271 | fixed. | |
272 | L<[perl #126152]|https://rt.perl.org/Ticket/Display.html?id=126152> | |
cf73ceda MH |
273 | |
274 | =back | |
275 | ||
b26bd9b0 | 276 | =head1 Platform Support |
0b8e4842 | 277 | |
0dafb1ce | 278 | =head2 Platform-Specific Notes |
b7b593d8 | 279 | |
fc4c3cec | 280 | =over 4 |
4b951711 | 281 | |
f83db990 | 282 | =item IRIX |
4b951711 | 283 | |
f83db990 SH |
284 | =over |
285 | ||
286 | =item * | |
287 | ||
288 | Under some circumstances IRIX stdio fgetc() and fread() set the errno to | |
289 | C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno | |
290 | is now cleared in such cases. | |
291 | L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977> | |
292 | ||
293 | =item * | |
294 | ||
295 | Problems when multiplying long doubles by infinity have been fixed. | |
296 | L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396> | |
297 | ||
298 | =back | |
299 | ||
300 | =item MacOS X | |
301 | ||
302 | =over | |
303 | ||
304 | =item * | |
305 | ||
306 | Until now OS X builds of perl have specified a link target of 10.3 (Panther, | |
307 | 2003) but have not specified a compiler target. From now on, builds of perl on | |
308 | OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X | |
309 | version and specify that as the explicit build target in both compiler and | |
310 | linker flags, thus preserving binary compatibility for extensions built later | |
311 | regardless of changes in OS X, SDK, or compiler and linker versions. To | |
312 | override the default value used in the build and preserved in the flags, | |
313 | specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building | |
314 | perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or | |
315 | earlier there is no change to the behavior present when those systems were | |
316 | current; the link target is still OS X 10.3 and there is no explicit compiler | |
317 | target. | |
318 | ||
319 | =back | |
320 | ||
321 | =item VMS | |
322 | ||
323 | =over | |
324 | ||
325 | =item * | |
326 | ||
327 | Perl now implements its own C<killpg> by scanning for processes in the | |
328 | specified process group, which may not mean exactly the same thing as a Unix | |
329 | process group, but allows us to send a signal to a parent (or master) process | |
330 | and all of its sub-processes. At the perl level, this means we can now send a | |
331 | negative pid like so: | |
332 | ||
333 | kill SIGKILL, -$pid; | |
334 | ||
335 | to signal all processes in the same group as C<$pid>. | |
336 | ||
337 | =back | |
cf73ceda | 338 | |
0517ed38 DD |
339 | =item Win32 |
340 | ||
341 | =over | |
342 | ||
343 | =item * | |
344 | ||
6937817d | 345 | A new build option C<USE_NO_REGISTRY> has been added to the makefiles. This |
a6d3278e SH |
346 | option is off by default, meaning the default is to do Windows registry |
347 | lookups. This option stops Perl from looking inside the registry for anything. | |
348 | For what values are looked up in the registry see L<perlwin32>. Internally, in | |
349 | C, the name of this option is C<WIN32_NO_REGISTRY>. | |
6937817d DD |
350 | |
351 | =item * | |
352 | ||
0517ed38 | 353 | The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and |
a6d3278e SH |
354 | C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV> |
355 | vars starting with C<PERL> has changed. Previously, the 2 keys were checked | |
356 | for entries at all times through Perl processes life time even if they did not | |
357 | exist. For performance reasons, now, if the root key (i.e. | |
0517ed38 DD |
358 | C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does |
359 | not exist at process start time, it will not be checked again for C<%ENV> | |
360 | override entries for the remainder of the Perl processes life. This more | |
a6d3278e SH |
361 | closely matches Unix behaviour in that the environment is copied or inherited |
362 | on startup and changing the variable in the parent process or another process | |
363 | or editing <.bashrc> will not change the environmental variable in other | |
364 | existing, running, processes. | |
0517ed38 | 365 | |
8ca2a5d6 DD |
366 | =item * |
367 | ||
368 | One glob fetch was removed for each C<-X> or C<stat> call whether done from | |
a6d3278e SH |
369 | Perl code or internally from Perl's C code. The glob being looked up was |
370 | C<${^WIN32_SLOPPY_STAT}> which is a special variable. This makes C<-X> and | |
8ca2a5d6 DD |
371 | C<stat> slightly faster. |
372 | ||
373 | =item * | |
374 | ||
a6d3278e SH |
375 | During miniperl's process startup, during the build process, 4 to 8 IO calls |
376 | related to the process starting F<.pl> and the F<buildcustomize.pl> file were | |
377 | removed from the code opening and executing the first 1 or 2 F<.pl> files. | |
8ca2a5d6 | 378 | |
0517ed38 DD |
379 | =back |
380 | ||
b26bd9b0 | 381 | =back |
f4240379 | 382 | |
b26bd9b0 | 383 | =head1 Internal Changes |
f4240379 | 384 | |
b26bd9b0 | 385 | =over 4 |
d89ea360 DD |
386 | |
387 | =item * | |
388 | ||
a6d3278e SH |
389 | L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>. It |
390 | previously has always returned C<0> since Perl 5.000 stable but that was | |
fa7a1e49 DD |
391 | undocumented. Although C<sv_backoff> is marked as public API, XS code is not |
392 | expected to be impacted since the proper API call would be through public API | |
393 | C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public | |
394 | C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a | |
395 | meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>. | |
d89ea360 | 396 | |
0efe3111 DM |
397 | =item * |
398 | ||
a6d3278e SH |
399 | The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues |
400 | with integer truncation and wrapping. In particular, some casts formerly used | |
401 | within the macros have been removed. This means for example that passing an | |
402 | unsigned nitems arg is likely to raise a compiler warning now (it's always been | |
403 | documented to require a signed value; formerly int, lately SSize_t). | |
0efe3111 | 404 | |
d89ea360 DD |
405 | =back |
406 | ||
b26bd9b0 | 407 | =head1 Selected Bug Fixes |
eabfc7bc | 408 | |
fc4c3cec | 409 | =over 4 |
eabfc7bc | 410 | |
73d6481e | 411 | =item * |
eabfc7bc | 412 | |
a6d3278e SH |
413 | There were places in regular expression patterns where comments (C<(?#...)>) |
414 | weren't allowed, but should have been. This is now fixed. | |
415 | L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639> | |
cf73ceda | 416 | |
5a55ed33 KW |
417 | =item * |
418 | ||
a6d3278e SH |
419 | A regression from perl Perl 5.20 has been fixed, in which some syntax errors in |
420 | L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs | |
421 | within regular expression patterns could cause a segfault instead of a proper | |
422 | error message. | |
423 | L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180> | |
5a55ed33 | 424 | |
0efe3111 DM |
425 | =item * |
426 | ||
427 | Some problems with attempting to extend the perl stack to around 2G or 4G | |
a6d3278e SH |
428 | entries have been fixed. This was particularly an issue on 32-bit perls built |
429 | to use 64-bit integers, and was easily noticeable with the list repetition | |
430 | operator, e.g. | |
0efe3111 DM |
431 | |
432 | @a = (1) x $big_number | |
433 | ||
a6d3278e SH |
434 | Formerly perl may have crashed, depending on the exact value of C<$big_number>; |
435 | now it will typically raise an exception. | |
436 | L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937> | |
0efe3111 | 437 | |
f83db990 SH |
438 | =item * |
439 | ||
440 | In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if | |
441 | the condition is C<(?!)> then perl failed the match outright instead of | |
442 | matching the no-pattern. This has been fixed. | |
443 | L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222> | |
444 | ||
445 | =item * | |
446 | ||
447 | The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional | |
448 | argument and set C<REGERROR/REGMARK> appropriately as well. | |
449 | L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186> | |
450 | ||
b26bd9b0 | 451 | =back |
9a7bb2f7 | 452 | |
b26bd9b0 | 453 | =head1 Errata From Previous Releases |
5ea25977 | 454 | |
b26bd9b0 | 455 | =over 4 |
5a74572e | 456 | |
b26bd9b0 | 457 | =item * |
5a74572e | 458 | |
a6d3278e SH |
459 | (This was actually done in Perl 5.23.2, but the perldelta entry got missed.) |
460 | The way that C<OP_AASSIGN> handles assignment with potentially common values | |
461 | (e.g. C<($a,$b) = ($b, $a)> has changed. In particular the C<OPpASSIGN_COMMON> | |
462 | flag has been replaced with three more specific flags: | |
463 | ||
464 | OPpASSIGN_COMMON_AGG | |
465 | OPpASSIGN_COMMON_RC1 | |
466 | OPpASSIGN_COMMON_SCALAR | |
467 | ||
468 | and the runtime now sometimes does a mark and sweep using the C<SVf_BREAK> to | |
469 | detect common elements. | |
5a74572e | 470 | |
b26bd9b0 | 471 | =back |
5a74572e | 472 | |
b26bd9b0 | 473 | =head1 Acknowledgements |
5a74572e | 474 | |
b26bd9b0 | 475 | XXX Generate this with: |
5a74572e | 476 | |
b26bd9b0 | 477 | perl Porting/acknowledgements.pl v5.23.3..HEAD |
f5b73711 | 478 | |
44691e6f AB |
479 | =head1 Reporting Bugs |
480 | ||
e08634c5 SH |
481 | If you find what you think is a bug, you might check the articles recently |
482 | posted to the comp.lang.perl.misc newsgroup and the perl bug database at | |
fc4c3cec RS |
483 | L<https://rt.perl.org/> . There may also be information at |
484 | L<http://www.perl.org/> , the Perl Home Page. | |
44691e6f | 485 | |
e08634c5 SH |
486 | If you believe you have an unreported bug, please run the L<perlbug> program |
487 | included with your release. Be sure to trim your bug down to a tiny but | |
488 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
489 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
44691e6f AB |
490 | |
491 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
492 | inappropriate to send to a publicly archived mailing list, then please send it |
493 | to perl5-security-report@perl.org. This points to a closed subscription | |
494 | unarchived mailing list, which includes all the core committers, who will be | |
495 | able to help assess the impact of issues, figure out a resolution, and help | |
f9001595 | 496 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
497 | platforms on which Perl is supported. Please only use this address for |
498 | security issues in the Perl core, not for modules independently distributed on | |
499 | CPAN. | |
44691e6f AB |
500 | |
501 | =head1 SEE ALSO | |
502 | ||
e08634c5 SH |
503 | The F<Changes> file for an explanation of how to view exhaustive details on |
504 | what changed. | |
44691e6f AB |
505 | |
506 | The F<INSTALL> file for how to build Perl. | |
507 | ||
508 | The F<README> file for general stuff. | |
509 | ||
510 | The F<Artistic> and F<Copying> files for copyright information. | |
511 | ||
512 | =cut |