This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta update
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 [ this is a template for a new perldelta file. Any text flagged as
6 XXX needs to be processed before release. ]
7
8 perldelta - what is new for perl v5.17.2
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.17.1 release and
13 the 5.17.2 release.
14
15 If you are upgrading from an earlier release such as 5.17.0, first read
16 L<perl5171delta>, which describes differences between 5.17.0 and
17 5.17.1.
18
19 =head1 Notice
20
21 XXX Any important notices here
22
23 =head1 Core Enhancements
24
25 XXX New core language features go here. Summarise user-visible core language
26 enhancements. Particularly prominent performance optimisations could go
27 here, but most should go in the L</Performance Enhancements> section.
28
29 [ List each enhancement as a =head2 entry ]
30
31 =head2 C<kill> with negative signal names
32
33 C<kill> has always allowed a negative signal number, which kills the
34 process group instead of a single process.  It has also allowed signal
35 names.  But it did not behave consistently, because negative signal names
36 were treated as 0.  Now negative signals names like C<-INT> are supported
37 and treated the same way as -2 [perl #112990].
38
39 =head1 Security
40
41 XXX Any security-related notices go here.  In particular, any security
42 vulnerabilities closed should be noted here rather than in the
43 L</Selected Bug Fixes> section.
44
45 [ List each security issue as a =head2 entry ]
46
47 =head1 Incompatible Changes
48
49 XXX For a release on a stable branch, this section aspires to be:
50
51     There are no changes intentionally incompatible with 5.XXX.XXX
52     If any exist, they are bugs, and we request that you submit a
53     report.  See L</Reporting Bugs> below.
54
55 [ List each incompatible change as a =head2 entry ]
56
57 =head1 Deprecations
58
59 XXX Any deprecated features, syntax, modules etc. should be listed here.
60 In particular, deprecated modules should be listed here even if they are
61 listed as an updated module in the L</Modules and Pragmata> section.
62
63 [ List each deprecation as a =head2 entry ]
64
65 =head1 Performance Enhancements
66
67 XXX Changes which enhance performance without changing behaviour go here. There
68 may well be none in a stable release.
69
70 [ List each enhancement as a =item entry ]
71
72 =over 4
73
74 =item *
75
76 XXX
77
78 =back
79
80 =head1 Modules and Pragmata
81
82 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
83 go here.  If Module::CoreList is updated, generate an initial draft of the
84 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
85 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
86 below.  A paragraph summary for important changes should then be added by hand.
87 In an ideal world, dual-life modules would have a F<Changes> file that could be
88 cribbed.
89
90 [ Within each section, list entries as a =item entry ]
91
92 =head2 New Modules and Pragmata
93
94 =over 4
95
96 =item *
97
98 XXX
99
100 =back
101
102 =head2 Updated Modules and Pragmata
103
104 =over 4
105
106 =item *
107
108 L<File::stat> has been upgraded from version 1.06 to 1.07.
109
110 Previously C<File::stat>'s overloaded C<-x> and C<-X> operators did not give
111 the correct results for directories or executable files when running as
112 root. They had been treating executable permissions for root just like for
113 any other user, performing group membership tests I<etc> for files not owned
114 by root. They now follow the correct Unix behaviour - for a directory they
115 are always true, and for a file if any of the three execute permission bits
116 are set then they report that root can execute the file. Perl's builtin
117 C<-x> and C<-X> operators have always been correct.
118
119 =item *
120
121 L<Tie::StdHandle> has been upgraded from version 4.2 to 4.3.
122
123 C<READ> now respects the offset argument to C<read> [perl #112826].
124
125 =item *
126
127 L<IO> has been upgraded from version 1.25_07 to 1.25_08.
128
129 L<IO::Socket> tries harder to cache or otherwise fetch socket
130 information.
131
132 =item *
133
134 L<Storable> has been upgraded from version 2.36 to 2.37.
135
136 Restricted hashes were not always thawed correctly [perl #73972].
137
138 Storable would croak when freezing a blessed REF object with a
139 C<STORABLE_freeze()> method [perl #113880].
140
141 =back
142
143 =head2 Removed Modules and Pragmata
144
145 =over 4
146
147 =item *
148
149 XXX
150
151 =back
152
153 =head1 Documentation
154
155 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
156 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
157
158 =head2 New Documentation
159
160 XXX Changes which create B<new> files in F<pod/> go here.
161
162 =head3 L<XXX>
163
164 XXX Description of the purpose of the new file here
165
166 =head2 Changes to Existing Documentation
167
168 XXX Changes which significantly change existing files in F<pod/> go here.
169 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
170 section.
171
172 =head3 L<perlfunc>
173
174 =over 4
175
176 =item *
177
178 Clarified documentation of C<our>.
179
180 =back
181
182 =head1 Diagnostics
183
184 The following additions or changes have been made to diagnostic output,
185 including warnings and fatal error messages.  For the complete list of
186 diagnostic messages, see L<perldiag>.
187
188 XXX New or changed warnings emitted by the core's C<C> code go here. Also
189 include any changes in L<perldiag> that reconcile it to the C<C> code.
190
191 [ Within each section, list entries as a =item entry that links to perldiag,
192   e.g.
193
194   =item *
195
196   L<Invalid version object|perldiag/"Invalid version object">
197 ]
198
199 =head2 New Diagnostics
200
201 XXX Newly added diagnostic messages go here
202
203 =head3 New Errors
204
205 =over 4
206
207 =item *
208
209 L<Group name must start with a non-digit word character in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Group name must start with a non-digit word character in regex; marked by <-- HERE in m/%s/">
210
211 This error has been added for C<(?&0)>, which is invalid.  It used to
212 produce an incomprehensible error message [perl #101666].
213
214 =back
215
216 =head3 New Warnings
217
218 =over 4
219
220 =item *
221
222 C<chr()> now warns when passed a negative value [perl #83048].
223
224 =item *
225
226 C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
227 value will be truncated rather than overflowing) [perl #40605].
228
229 =item *
230
231 Running perl with the C<-i> flag now warns if no input files are provided on
232 the command line [perl #113410].
233
234 =back
235
236 =head2 Changes to Existing Diagnostics
237
238 XXX Changes (i.e. rewording) of diagnostic messages go here
239
240 =over 4
241
242 =item *
243
244 The 'Can't use "my %s" in sort comparison' error has been downgraded to a
245 warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
246 for state variables).  In addition, the heuristics for guessing whether
247 lexical $a or $b has been misused have been improved to generate fewer
248 false positives.  Lexical $a and $b are no longer disallowed if they are
249 outside the sort block.  Also, a named unary or list operator inside the
250 sort block no longer causes the $a or $b to be ignored [perl #86136].
251
252 =back
253
254 =head1 Utility Changes
255
256 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
257 here. Most of these are built within the directories F<utils> and F<x2p>.
258
259 [ List utility changes as a =head3 entry for each utility and =item
260 entries for each change
261 Use L<XXX> with program names to get proper documentation linking. ]
262
263 =head3 L<XXX>
264
265 =over 4
266
267 =item *
268
269 XXX
270
271 =back
272
273 =head1 Configuration and Compilation
274
275 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
276 go here.  Any other changes to the Perl build process should be listed here.
277 However, any platform-specific changes should be listed in the
278 L</Platform Support> section, instead.
279
280 [ List changes as a =item entry ].
281
282 =over 4
283
284 =item *
285
286 Building perl with some Windows compilers used to fail due to a problem
287 with miniperl's C<glob> operator (which uses the C<perlglob> program)
288 deleting the PATH environment variable [perl #113798].
289
290 =back
291
292 =head1 Testing
293
294 XXX Any significant changes to the testing of a freshly built perl should be
295 listed here.  Changes which create B<new> files in F<t/> go here as do any
296 large changes to the testing harness (e.g. when parallel testing was added).
297 Changes to existing files in F<t/> aren't worth summarising, although the bugs
298 that they represent may be covered elsewhere.
299
300 [ List each test improvement as a =item entry ]
301
302 =over 4
303
304 =item *
305
306 XXX
307
308 =back
309
310 =head1 Platform Support
311
312 XXX Any changes to platform support should be listed in the sections below.
313
314 [ Within the sections, list each platform as a =item entry with specific
315 changes as paragraphs below it. ]
316
317 =head2 New Platforms
318
319 XXX List any platforms that this version of perl compiles on, that previous
320 versions did not. These will either be enabled by new files in the F<hints/>
321 directories, or new subdirectories and F<README> files at the top level of the
322 source tree.
323
324 =over 4
325
326 =item XXX
327
328
329 =back
330
331 =head2 Discontinued Platforms
332
333 XXX List any platforms that this version of perl no longer compiles on.
334
335 =over 4
336
337 =item XXX-some-platform
338
339 XXX
340
341 =back
342
343 =head2 Platform-Specific Notes
344
345 XXX List any changes for specific platforms. This could include configuration
346 and compilation changes or changes in portability/compatibility.  However,
347 changes within modules for platforms should generally be listed in the
348 L</Modules and Pragmata> section.
349
350 =over 4
351
352 =item VMS
353
354 Quotes are now removed from the command verb (but not the parameters) for commands
355 spawned via C<system>, backticks, or a piped C<open>.  Previously, quotes on the verb 
356 were passed through to DCL, which would fail to recognize the command.  Also, if the
357 verb is actually a path to an image or command procedure on an ODS-5 volume, quoting it
358 now allows the path to contain spaces.
359
360 =item AIX
361
362 Configure now always adds -qlanglvl=extc99 to the CC flags on AIX when
363 using xlC.  This will make it easier to compile a number of XS-based modules
364 that assume C99 [perl #113778].
365
366 =back
367
368 =head1 Internal Changes
369
370 XXX Changes which affect the interface available to C<XS> code go here.
371 Other significant internal changes for future core maintainers should
372 be noted as well.
373
374 [ List each change as a =item entry ]
375
376 =over 4
377
378 =item *
379
380 OP allocation for CVs now uses a slab allocator.  This simplifies
381 memory management for OPs allocated to a CV, so cleaning up after a
382 compilation error is simpler and safer [perl #111462][perl #112312].
383
384 =item *
385
386 PERL_DEBUG_READONLY_OPS has been rewritten to work with the new slab
387 allocator, allowing it to catch more violations that befor.
388
389 =item *
390
391 The old slab allocator for ops, which was only enabled for PERL_IMPLICIT_SYS and PERL_DEBUG_READONLY_OPS, has been retired.
392
393 =back
394
395 =head1 Selected Bug Fixes
396
397 XXX Important bug fixes in the core language are summarised here.
398 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
399 L</Modules and Pragmata>.
400
401 [ List each fix as a =item entry ]
402
403 =over 4
404
405 =item *
406
407 A regression introduced in v5.14.0 has been fixed, in which some calls
408 to the C<re> module would clobber C<$_> [perl #113750].
409
410 =item *
411
412 C<do FILE> now always either sets or clears C<$@>, even when the file can't be
413 read. This ensures that testing C<$@> first (as recommended by the
414 documentation) always returns the correct result.
415
416 =item *
417
418 The array iterator used for the C<each @array> construct is now correctly
419 reset when C<@array> is cleared (RT #75596). This happens for example when the
420 array is globally assigned to, as in C<@array = (...)>, but not when its
421 B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
422 will now reset the iterator.
423
424 This mirrors the behaviour of the hash iterator when the hash is cleared.
425
426 =item *
427
428 C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
429 correct results, regardless of whether that package referred to by C<$class>
430 exists [perl #47113].
431
432 =item *
433
434 Arriving signals no longer clear C<$@> [perl #45173].
435
436 =item *
437
438 Allow C<my ()> declarations with an empty variable list [perl #113554].
439
440 =item *
441
442 During parsing, subs declared after errors no longer leave stubs
443 [perl #113712].
444
445 =item *
446
447 Closures containing no string evals no longer hang on to their containing
448 subroutines, allowing variables closed over by outer subroutines to be
449 freed when the outer sub is freed, even if the inner sub still exists
450 [perl #89544].
451
452 =item *
453
454 Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
455 stopped working properly in 5.16.0.  It was causing the new handle to
456 reference a different scalar variable.  This has been fixed [perl #113764].
457
458 =item *
459
460 C<qr//> expressions no longer crash with custom regular expression engines
461 that do not set C<offs> at regular expression compilation time
462 [perl #112962].
463
464 =item *
465
466 C<delete local> no longer crashes with certain magical arrays and hashes
467 [perl #112966].
468
469 =item *
470
471 C<local> on elements of certain magical arrays and hashes used not to
472 arrange to have the element deleted on scope exit, even if the element did
473 not exist before C<local>.
474
475 =item *
476
477 C<scalar(write)> no longer returns multiple items [perl #73690].
478
479 =item *
480
481 String to floating point conversions no longer misparse certain strings under
482 C<use locale> [perl #109318].
483
484 =item *
485
486 C<@INC> filters that die no longer leak memory [perl #92252].
487
488 =item *
489
490 The implementations of overloaded operations are now called in the correct
491 context. This allows, among other things, being able to properly override
492 C<< <> >> [perl #47119].
493
494 =item *
495
496 Specifying only the C<fallback> key when calling C<use overload> now behaves
497 properly [perl #113010].
498
499 =item *
500
501 C<< sub foo { my $a = 0; while ($a) { ... } } >> and
502 C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
503
504 =item *
505
506 Fixed the debugger C<l> and C<M> commands, and other debugger
507 functionality which was broken in 5.17.0 [perl #113918].
508
509 =item *
510
511 String negation now behaves the same under C<use integer;> as it does
512 without [perl #113012].
513
514 =item *
515
516 C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
517 regardless of the internal representation.  -1 used to wrap if the argument
518 was tied or a string internally.
519
520 =item *
521
522 Using a C<format> after its enclosing sub was freed could crash as of
523 perl 5.12.0, if the format referenced lexical variables from the outer sub.
524
525 =item *
526
527 Using a C<format> after its enclosing sub was undefined could crash as of
528 perl 5.10.0, if the format referenced lexical variables from the outer sub.
529
530 =item *
531
532 Using a C<format> defined inside a closures, which format references
533 lexical variables from outside, never really worked unless the C<write>
534 call was directly inside the closure.  In 5.10.0 it even started crashing.
535 Now the copy of that closure nearest the top of the call stack is used to
536 find those variables.
537
538 =item *
539
540 Formats that close over variables in special blocks no longer crash if a
541 stub exists with the same name as the special block before the special
542 block is compiled.
543
544 =item *
545
546 The parser no longer gets confused, treating C<eval foo ()> as a syntax
547 error if preceded by C<print;> [perl #16249].
548
549 =item *
550
551 The return value of C<syscall> is no longer truncated on 64-bit platforms
552 [perl #113980].
553
554 =item *
555
556 Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
557 FOO handle [perl #78064].
558
559 =item *
560
561 C<do subname> now calls the named subroutine and uses the file name it
562 returns, instead of opening a file named "subname".
563
564 =item *
565
566 Subroutines looked up by rv2cv check hooks (registered by XS modules) are
567 now taken into consideration when determining whether C<foo bar> should be
568 the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
569
570 =item *
571
572 C<CORE::foo::bar> is no longer treated specially, allowing global overrides
573 to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
574
575 =item *
576
577 Calling an undefined sub whose typeglob has been undefined now produces the
578 customary "Undefined subroutine called" error, instead of "Not a CODE
579 reference".
580
581 =back
582
583 =head1 Known Problems
584
585 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
586 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
587 platform specific bugs also go here.
588
589 [ List each fix as a =item entry ]
590
591 =over 4
592
593 =item *
594
595 XXX
596
597 =back
598
599 =head1 Obituary
600
601 XXX If any significant core contributor has died, we've added a short obituary
602 here.
603
604 =head1 Acknowledgements
605
606 XXX Generate this with:
607
608   perl Porting/acknowledgements.pl v5.17.1..HEAD
609
610 =head1 Reporting Bugs
611
612 If you find what you think is a bug, you might check the articles
613 recently posted to the comp.lang.perl.misc newsgroup and the perl
614 bug database at http://rt.perl.org/perlbug/ .  There may also be
615 information at http://www.perl.org/ , the Perl Home Page.
616
617 If you believe you have an unreported bug, please run the L<perlbug>
618 program included with your release.  Be sure to trim your bug down
619 to a tiny but sufficient test case.  Your bug report, along with the
620 output of C<perl -V>, will be sent off to perlbug@perl.org to be
621 analysed by the Perl porting team.
622
623 If the bug you are reporting has security implications, which make it
624 inappropriate to send to a publicly archived mailing list, then please send
625 it to perl5-security-report@perl.org. This points to a closed subscription
626 unarchived mailing list, which includes
627 all the core committers, who will be able
628 to help assess the impact of issues, figure out a resolution, and help
629 co-ordinate the release of patches to mitigate or fix the problem across all
630 platforms on which Perl is supported. Please only use this address for
631 security issues in the Perl core, not for modules independently
632 distributed on CPAN.
633
634 =head1 SEE ALSO
635
636 The F<Changes> file for an explanation of how to view exhaustive details
637 on what changed.
638
639 The F<INSTALL> file for how to build Perl.
640
641 The F<README> file for general stuff.
642
643 The F<Artistic> and F<Copying> files for copyright information.
644
645 =cut