This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 41b1a11 :-)
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for comment
4 This has been completed up to 8d0b139, except for
5 b0f2e9e nwclark     Fix two bugs related to pod files outside of pod/ (important enough?)
6 43d9ecf jpeacock    Set all version object math ops to noop
7 f300909 smueller    EU::ParseXS: Silence warning (probably unnecessary)
8
9 =head1 NAME
10
11 [ this is a template for a new perldelta file. Any text flagged as
12 XXX needs to be processed before release. ]
13
14 perldelta - what is new for perl v5.15.6
15
16 =head1 DESCRIPTION
17
18 This document describes differences between the 5.15.5 release and
19 the 5.15.6 release.
20
21 If you are upgrading from an earlier release such as 5.15.4, first read
22 L<perl5155delta>, which describes differences between 5.15.4 and
23 5.15.5.
24
25 =head1 Notice
26
27 XXX Any important notices here
28
29 =head1 Core Enhancements
30
31 XXX New core language features go here. Summarise user-visible core language
32 enhancements. Particularly prominent performance optimisations could go
33 here, but most should go in the L</Performance Enhancements> section.
34
35 [ List each enhancement as a =head2 entry ]
36
37 =head2 C<__SUB__>
38
39 The new C<__SUB__> token, available under the "current_sub" feature (see
40 L<feature>) or C<use v5.15>, returns a reference to the current subroutine,
41 making it easier to write recursive closures.
42
43 =head2 New option for the debugger's B<t> command
44
45 The B<t> command in the debugger, which toggles tracing mode, now accepts a
46 numerical argument that determines how many levels of subroutine calls to
47 trace.
48
49 =head2 Return value of C<tied>
50
51 The value returned by C<tied> on a tied variable is now the actual scalar
52 that holds the object to which the variable is tied.  This allows ties to
53 be weakened with C<Scalar::Util::weaken(tied $tied_variable)>.
54
55 =head1 Security
56
57 XXX Any security-related notices go here.  In particular, any security
58 vulnerabilities closed should be noted here rather than in the
59 L</Selected Bug Fixes> section.
60
61 =head2 C<is_utf8_char()>
62
63 The XS-callable function C<is_utf8_char()> when presented with malformed
64 UTF-8 input can read up to 12 bytes beyond the end of the string.  This
65 cannot be fixed without changing its API.  It is not called from CPAN.
66 The documentation for it now describes how to use it safely.
67
68 =head2 Other C<is_utf8_foo()> functions, as well as C<utf8_to_foo()>, etc.
69
70 Most of the other XS-callable functions that take UTF-8 encoded input
71 implicitly assume that the UTF-8 is valid (not malformed) in regards to
72 buffer length.  Do not do things such as change a character's case or
73 see if it is alphanumeric without first being sure that it is valid
74 UTF-8.  This can be safely done for a whole string by using one of the
75 functions C<is_utf8_string()>, C<is_utf8_string_loc()>, and
76 C<is_utf8_string_loclen()>.
77
78 =head1 Incompatible Changes
79
80 XXX For a release on a stable branch, this section aspires to be:
81
82     There are no changes intentionally incompatible with 5.XXX.XXX
83     If any exist, they are bugs and reports are welcome.
84
85 [ List each incompatible change as a =head2 entry ]
86
87 =head2 C<use I<VERSION>>
88
89 As of this release, version declarations like C<use v5.16> now disable all
90 features before enabling the new feature bundle.  This means that the
91 following holds true:
92
93     use 5.016;
94     # 5.16 features enabled here
95     use 5.014;
96     # 5.16 features disabled here
97
98 C<use v5.12> and higher continue to enable strict, but explicit
99 C<use strict> and C<no strict> now override the version declaration, even
100 when they come first:
101
102     no strict;
103     use 5.012;
104     # no strict here
105
106 There is a new ":default" feature bundle, that represents the set of
107 features enabled before any version declaration or C<use feature> has been
108 seen.  Version declarations below 5.10 now enable the ":default" feature
109 set.  This does not actually change the behaviour of C<use v5.8>, because
110 features added to the ":default" set are those that were traditionally
111 enabled by default, before they could be turned off.
112
113 C<$[> is now disabled under C<use v5.16>.  It is part of the default
114 feature set and can be turned on or off explicitly
115 with C<use feature 'array_base'>.
116
117 =head2 C<UNIVERSAL::VERSION>
118
119 The change to C<UNIVERSAL::VERSION> in 5.15.2 has been reverted.  It now
120 returns a stringified version object once more.
121
122 =head2 C<substr> lvalue revamp
123
124 When C<substr> is called in lvalue or potential lvalue context with two or
125 three arguments, a special lvalue scalar is returned that modifies the
126 original string (the first argument) when assigned to.
127
128 Previously, the offsets (the second and third arguments) passed to
129 C<substr> would be converted immediately to match the string, negative
130 offsets being translated to positive and offsets beyond the end of the
131 string being truncated.
132
133 Now, the offsets are recorded without modification in the special lvalue
134 scalar that is returned, and the original string is not even looked at by
135 C<substr> itself, but only when the returned lvalue is read or modified.
136
137 These changes result in several incompatible changes and bug fixes:
138
139 =over
140
141 =item *
142
143 If the original string changes length after the call to C<substr> but
144 before assignment to its return value, negative offsets will remember
145 their position from the end of the string, affecting code like this:
146
147     my $string = "string";
148     my $lvalue = \substr $string, -4, 2;
149     print $lvalue, "\n"; # prints "ri"
150     $string = "bailing twine";
151     print $lvalue, "\n"; # prints "wi"; used to print "il"
152
153 The same thing happens with an omitted third argument.  The returned lvalue
154 will always extend to the end of the string, even if the string becomes
155 longer.
156
157 =item *
158
159 Tied (and otherwise magical) variables are no longer exempt from the
160 "Attempt ot use reference as lvalue in substr" warning.
161
162 =item *
163
164 That warning now occurs when the returned lvalue is assigned to, not when
165 C<substr> itself is called.  This only makes a difference if the return
166 value of C<substr> is referenced and assigned to later.
167
168 =item *
169
170 The order in which "uninitialized" warnings occur for arguments to
171 C<substr> has changed.
172
173 =item *
174
175 Passing a substring of a read-only value or a typeglob to a function (potential lvalue context) no longer causes an immediate "Can't coerce" or "Modification of a read-only value" error.  That error only occurs if and
176 when the value passed is assigned to.
177
178 The same thing happens with the "substr outside of string" error.  If the
179 lvalue is only read, not written to, it is now just a warning, as with
180 rvalue C<substr>.
181
182 =item *
183
184 C<substr> assignments no longer call FETCH twice if the first argument is a
185 tied variable, but just once.
186
187 =back
188
189 It was impossible to fix all the bugs without an incompatible change, and
190 the behaviour of negative offsets was never specified, so the change was
191 deemed acceptable.
192
193 =head2 Return value of C<eval>
194
195 C<eval> returns C<undef> in scalar context or an empty list in list context
196 when there is a run-time error.  For syntax errors (when C<eval> is passed
197 a string), in list context it used to return a list containing a single
198 undefined element.  Now it returns an empty list in list context for all
199 errors [perl #80630].
200
201 =head2 Anonymous handles
202
203 Automatically generated file handles are now named __ANONIO__ when the
204 variable name cannot be determined, rather than $__ANONIO__.
205
206 =head2 Last-accessed filehandle
207
208 Perl has an internal variable that stores the last filehandle to be
209 accessed.  It is used by C<$.> and by C<tell> and C<eof> without arguments.
210
211 It used to be possible to set it to a glob copy and then modify that glob
212 copy to be something other than a glob, and still have it as the
213 last-accessed filehandle after assigning a glob to it again:
214
215     my $foo = *STDOUT;  # $foo is a glob copy
216     <$foo>;             # $foo is now the last-accessed handle
217     $foo = 3;           # no longer a glob
218     $foo = *STDERR;     # still the last-accessed handle
219
220 Now the C<$foo = 3> assignment unset that internal variable, so there is no
221 last-accessed filehandle, just as if C<< <$foo> >> had never happened.
222
223 =head2 XS API tweak
224
225 The C<newCONSTSUB_flags> C-level function, added in 5.15.4, now has a
226 C<len> parameter.
227
228 =head1 Deprecations
229
230 XXX Any deprecated features, syntax, modules etc. should be listed here.
231 In particular, deprecated modules should be listed here even if they are
232 listed as an updated module in the L</Modules and Pragmata> section.
233
234 [ List each deprecation as a =head2 entry ]
235
236 =head1 Performance Enhancements
237
238 XXX Changes which enhance performance without changing behaviour go here. There
239 may well be none in a stable release.
240
241 [ List each enhancement as a =item entry ]
242
243 =over 4
244
245 =item *
246
247 Perl 5.12.0 sped up the destruction of objects whose classes define empty
248 C<DESTROY> methods (to prevent autoloading), simply by not calling such
249 empty methods.  This release takes this optimisation a step further, by not
250 calling any C<DESTROY> method that begins with a C<return> statement.
251 This can be useful for destructors that are only used for debugging:
252
253     use constant DEBUG => 1;
254     sub DESTROY { return unless DEBUG; ... }
255
256 Constant-folding will reduce the first statement to C<return;> if DEBUG is
257 set to 0, triggering this optimisation.
258
259 =item *
260
261 Assign to a variable that holds a typeglob or copy-on-write scalar is now
262 much faster.  Previously the typeglob would be stringified or the
263 copy-on-write scalar would be copied before being clobbered.
264
265 =item *
266
267 Assignment to C<substr> in void context is now more than twice its
268 previous speed.  Instead of creating and returning a special lvalue scalar
269 that is then assigned to, C<substr> modifies the original string itself.
270
271 =back
272
273 =head1 Modules and Pragmata
274
275 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
276 go here.  If Module::CoreList is updated, generate an initial draft of the
277 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
278 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
279 below.  A paragraph summary for important changes should then be added by hand.
280 In an ideal world, dual-life modules would have a F<Changes> file that could be
281 cribbed.
282
283 [ Within each section, list entries as a =item entry ]
284
285 =head2 New Modules and Pragmata
286
287 =over 4
288
289 =item *
290
291 XXX
292
293 =back
294
295 =head2 Updated Modules and Pragmata
296
297 =over 4
298
299 =item *
300
301 L<Archive::Tar> has been upgraded from version 1.80 to version 1.82.
302
303 Adjustments to handle files >8gb (>0777777777777 octal) and a feature to
304 return the MD5SUM of files in the archive.
305
306 =item *
307
308 L<AutoLoader> has been upgraded from version 5.71 to version 5.72.
309
310 =item *
311
312 L<B::Debug> has been upgraded from version 1.16 to version 1.17.
313
314 =item *
315
316 L<B::Deparse> has been upgraded from version 1.09 to version 1.10.
317
318 Various constructs that used to be deparsed incorrectly have been fixed:
319
320 =over
321
322 =item C<sort(foo(bar))>
323
324 C<sort foo(bar)>, how it used to deparse, makes foo the sort routine,
325 rather than a regular function call.
326
327 =item Keys and values in C<%^H>
328
329 Undefined values in the hint hash were being deparsed as empty strings.
330 Whenever the hint hash changed, all undefined values, even those
331 unmodified, were being printed.
332
333 Special characters, such as quotation marks, were not being escaped
334 properly.
335
336 Some values used to be omitted if, for instance, a key was the same as a
337 previous value and vice versa.
338
339 =item "method BLOCK" syntax
340
341 C<method { $expr }> used to be deparsed as something like
342 C<< do{ $expr }->method >>, but the latter puts the $expr in scalar
343 context, whereas the former puts in list context.
344
345 =item C<do +{}> and C<do({})>
346
347 These are both variants of do-file syntax, but were being deparsed as
348 do-blocks.
349
350 =item Keywords that do not follow the llafr
351
352 Keywords like C<return> and C<last> that do not follow the
353 looks-like-a-function rule are now deparsed correctly with parentheses in
354 the right place.
355
356 Similarly, C<not>, which I<does> follow the llafr, was being deparsed as
357 though it does not.
358
359 =item C<=~>
360
361 In various cases, B::Deparse started adding a spurious C<$_ =~> before the
362 right-hand side in Perl 5.14; e.g., C<< "" =~ <$a> >> would become
363 C<< "" =~ ($_ =~ <$a>) >>.
364
365 =item C<open local *FH>
366
367 C<open>, C<pipe> and other functions that autovivify handles used to omit
368 C<local *> from C<local *FH>.
369
370 =item Negated single-letter subroutine calls
371
372 Negated subroutine calls like C<- f()> and C<-(f())> were being deparsed
373 as file test operators.
374
375 =item C<&{&}>
376
377 C<&{&}> and C<& &>, which are calls to the subroutine named "&", believe it
378 or not, were being deparsed as C<&&>.
379
380 =item C<require $this + $that>
381
382 In Perl 5.14, C<require> followed by any binary operator started deparsing
383 as C<no>.
384
385 =back
386
387 =item *
388
389 L<Carp> has been upgraded from version 1.23 to version 1.24.
390
391 It now tacks the last-accessed filehandle and line number on to the end of
392 the error message, just like C<die> [perl #96672].
393
394 =item *
395
396 L<Compress::Raw::Zlib> has been upgraded from version 2.042 to version 2.045.
397
398 =item *
399
400 L<Compress::Raw::Bzip2> has been upgraded from version 2.042 to version 2.045.
401
402 =item *
403
404 L<CPAN::Meta::YAML> has been upgraded from version 0.004 to version 0.005.
405
406 =item *
407
408 L<CPANPLUS> has been upgraded from version 0.9112 to version 0.9113.
409
410 =item *
411
412 L<Data::Dumper> has been upgraded from version 2.134 to version 2.135.
413
414 The XS implementation has been updated to account for the Unicode symbol
415 changes in Perl 5.15.4.  It also knows how to output typeglobs with nulls
416 in their names.
417
418 =item *
419
420 L<diagnostics> has been upgraded from version 1.25 to version 1.26.
421
422 It now understands the "%X" format code, which some error messages started
423 using in Perl 5.14.0.
424
425 =item *
426
427 L<Digest::SHA> has been upgraded from version 5.63 to version 5.70.
428
429 Added BITS mode to addfile method and shasum which makes partial-byte inputs
430 now possible via files/STDIN and allows shasum to check all 8074 NIST Msg vectors,
431 where previously special programming was required to do this.
432
433 =item *
434
435 L<Exporter> has been upgraded from version 5.65 to version 5.66.
436
437 It no longer tries to localise C<$_> unnecessarily.
438
439 =item *
440
441 L<ExtUtils::ParseXS> has been upgraded from version 3.05 to version 3.07.
442
443 =item *
444
445 L<IO::Compress::Base> has been upgraded from version 2.042 to version 2.045.
446
447 Added zipdetails utility.
448
449 =item *
450
451 L<Locale::Codes> has been upgraded from version 3.18 to version 3.20.
452
453 The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now support retired codes.
454 All codesets may be specified by a constant or by their name now. Previously,
455 they were specified only by a constant.
456 The alias_code function exists for backward compatibility. It has been replaced by rename_country_code.
457 The alias_code function will be removed sometime after September, 2013.
458 All work is now done in the central module (Locale::Codes). Previously, some was still done in the
459 wrapper modules (Locale::Codes::*) but that is gone now.
460 Added Language Family codes (langfam) as defined in ISO 639-5.
461
462 =item *
463
464 L<Module::Loaded> has been uprgaded from version 0.06 to version 0.08.
465
466 =item *
467
468 L<Pod::LaTeX> has been upgraded from version 0.59 to version 0.60.
469
470 Added another LaTeX escape: --- => -{}-{}-
471
472 Pod::LaTeX doesn't handle -- in PODs specially, passing it directly to
473 LaTeX, which then proceeds to replace it with a single -. This patch
474 replaces ----- with -{}-{}-{}-{}-
475
476 =item *
477
478 L<POSIX> has been upgraded from version 1.26 to version 1.27.
479
480 It no longer produces a "Constant subroutine TCSANOW redefined" warning on
481 Windows.
482
483 XXX When did it start producing that warning?  Was it post-5.15.5?  Even if
484 it was not, adding a note will help whoever compiles perl5160delta.
485
486 =item *
487
488 L<Socket> has been upgraded from version 1.94_02 to version 1.97.
489
490 =item *
491
492 L<threads> has been upgraded from version 1.85 to version 1.86.
493
494 =item *
495
496 L<Unicode::Collate> has been upgraded from version 0.85 to version 0.87.
497
498 Tailored compatibility ideographs as well as unified ideographs for
499 the locales: ja, ko, zh__big5han, zh__gb2312han, zh__pinyin, zh__stroke.
500
501 Now Locale/*.pl files are searched in @INC.
502
503 =item *
504
505 L<UNIVERSAL> has been upgraded from version 1.10 to version 1.11.
506
507 Documentation change clarifies return values from UNIVERSAL::VERSION.
508
509 =back
510
511 =head2 Removed Modules and Pragmata
512
513 =over 4
514
515 =item *
516
517 Changing the case of a UTF-8 encoded string under C<use locale> now
518 gives better, but still imperfect, results.  Previously, such a string
519 would entirely lose locale semantics and silently be treated as Unicode.
520 Now, the code points that are less than 256 are treated with locale
521 rules, while those above 255 are, of course, treated as Unicode.  See
522 L<perlfunc/lc> for more details, including the deficiencies of this
523 scheme.
524
525 =back
526
527 =head1 Documentation
528
529 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
530 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
531
532 =head2 New Documentation
533
534 XXX Changes which create B<new> files in F<pod/> go here.
535
536 =head3 L<XXX>
537
538 XXX Description of the purpose of the new file here
539
540 =head2 Changes to Existing Documentation
541
542 XXX Changes which significantly change existing files in F<pod/> go here.
543 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
544 section.
545
546 =head3 L<perlsec/Laundering and Detecting Tainted Data>
547
548 =over 4
549
550 =item *
551
552 The example function for checking for taintedness contained a subtle
553 error.  C<$@> needs to be localized to prevent its changing this
554 global's value outside the function.  The preferred method to check for
555 this, though, remains to use L<Scalar::Util/tainted>.
556
557 =back
558
559 =head1 Diagnostics
560
561 The following additions or changes have been made to diagnostic output,
562 including warnings and fatal error messages.  For the complete list of
563 diagnostic messages, see L<perldiag>.
564
565 XXX New or changed warnings emitted by the core's C<C> code go here. Also
566 include any changes in L<perldiag> that reconcile it to the C<C> code.
567
568 [ Within each section, list entries as a =item entry that links to perldiag,
569   e.g.
570
571   =item *
572
573   L<Invalid version object|perldiag/"Invalid version object">
574 ]
575
576 =head2 New Diagnostics
577
578 XXX Newly added diagnostic messages go here
579
580 =head3 New Errors
581
582 =over 4
583
584 =item *
585
586 XXX L<message|perldiag/"message">
587
588 =back
589
590 =head3 New Warnings
591
592 =over 4
593
594 =item *
595
596 XXX L<message|perldiag/"message">
597
598 =back
599
600 =head2 Changes to Existing Diagnostics
601
602 XXX Changes (i.e. rewording) of diagnostic messages go here
603
604 =over 4
605
606 =item *
607
608 Redefinition warnings for constant subroutines used to be mandatory, even
609 occurring under C<no warnings>.  Now they respect the L<warnings> pragma.
610
611 =item *
612
613 The "Attempt to free non-existent shared string" has had the spelling of
614 "non-existent" corrected to "nonexistent".  It was already listed with the
615 correct spelling in L<perldiag>.
616
617 =item *
618
619 The 'Use of "foo" without parentheses is ambiguous' warning has been
620 extended to apply also to user-defined subroutines with a (;$) prototype,
621 and not just to built-in functions.
622
623 =item *
624
625 The error messages for using C<default> and C<when> outside of a
626 topicalizer have been standardised to match the messages for C<continue>
627 and loop controls.  They now read 'Can't "default" outside a topicalizer'
628 and 'Can't "when" outside a topicalizer'.  They both used to be 'Can't use
629 when() outside a topicalizer' [perl #91514].
630
631 =back
632
633 =head1 Utility Changes
634
635 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
636 here. Most of these are built within the directories F<utils> and F<x2p>.
637
638 [ List utility changes as a =head3 entry for each utility and =item
639 entries for each change
640 Use L<XXX> with program names to get proper documentation linking. ]
641
642 =head3 L<zipdetails>
643
644 =over 4
645
646 =item *
647
648 L<zipdetails> displays information about the internal record structure of the zip file.
649 It is not concerned with displaying any details of the compressed data stored in the zip file.
650
651 =back
652
653 =head1 Configuration and Compilation
654
655 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
656 go here.  Any other changes to the Perl build process should be listed here.
657 However, any platform-specific changes should be listed in the
658 L</Platform Support> section, instead.
659
660 [ List changes as a =item entry ].
661
662 =over 4
663
664 =item *
665
666 F<pod/roffitall> is now build by F<pod/buildtoc>, instead of being shipped
667 with the distribution. Its list of manpages is now generated (and therefore
668 current). See also RT #103202 for an unresolved related issue.
669
670 =item *
671
672 Perl 5.15.5 had a bug in its installation script, which did not install
673 F<unicore/Name.pm>.  This has been corrected [perl #104226].
674
675 XXX Is that Perl version correct?  Is the file path correct?
676
677 =item *
678
679 The -Dusesitecustomize and -Duserelocatableinc options now work together
680 properly.
681
682 =back
683
684 =head1 Testing
685
686 XXX Any significant changes to the testing of a freshly built perl should be
687 listed here.  Changes which create B<new> files in F<t/> go here as do any
688 large changes to the testing harness (e.g. when parallel testing was added).
689 Changes to existing files in F<t/> aren't worth summarising, although the bugs
690 that they represent may be covered elsewhere.
691
692 [ List each test improvement as a =item entry ]
693
694 =over 4
695
696 =item *
697
698 The F<substr.t> and F<substr_thr.t> scripts for testing C<substr> have been
699 moved under F<t/op/>, where they were originally.  They had been moved
700 under F<t/re/> along with the substitution tests when that directory was
701 created.
702
703 =back
704
705 =head1 Platform Support
706
707 XXX Any changes to platform support should be listed in the sections below.
708
709 [ Within the sections, list each platform as a =item entry with specific
710 changes as paragraphs below it. ]
711
712 =head2 New Platforms
713
714 XXX List any platforms that this version of perl compiles on, that previous
715 versions did not. These will either be enabled by new files in the F<hints/>
716 directories, or new subdirectories and F<README> files at the top level of the
717 source tree.
718
719 =over 4
720
721 =item XXX-some-platform
722
723 XXX
724
725 =back
726
727 =head2 Discontinued Platforms
728
729 XXX List any platforms that this version of perl no longer compiles on.
730
731 =over 4
732
733 =item XXX-some-platform
734
735 XXX
736
737 =back
738
739 =head2 Platform-Specific Notes
740
741 XXX List any changes for specific platforms. This could include configuration
742 and compilation changes or changes in portability/compatibility.  However,
743 changes within modules for platforms should generally be listed in the
744 L</Modules and Pragmata> section.
745
746 =head3 VMS
747
748 =over 4
749
750 =item *
751
752 A link-time error on VMS versions without C<symlink> support was
753 introduced in 5.15.1, but has now been corrected.
754
755 =item *
756
757 Explicit support for VMS versions prior to v7.0 and DEC C versions prior
758 to v6.0 has been removed.
759
760 =item *
761
762 Since Perl 5.10.1, the home-grown C<stat> wrapper has been unable to
763 distinguish between a directory name containing an underscore and an
764 otherwise-identical filename containing a dot in the same position
765 (e.g., t/test_pl as a directory and t/test.pl as a file). This problem
766 has been corrected.
767
768 =back
769
770 =head1 Internal Changes
771
772 XXX Changes which affect the interface available to C<XS> code go here.
773 Other significant internal changes for future core maintainers should
774 be noted as well.
775
776 [ List each change as a =item entry ]
777
778 =over 4
779
780 =item *
781
782 XXX
783
784 =back
785
786 =head1 Selected Bug Fixes
787
788 XXX Important bug fixes in the core language are summarised here.
789 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
790 L</Modules and Pragmata>.
791
792 [ List each fix as a =item entry ]
793
794 =over 4
795
796 =item *
797
798 RT #78266: The regex engine has been leaking memory when accessing
799 named captures that weren't matched as part of a regex ever since 5.10
800 when they were introduced, e.g. this would consume over a hundred MB
801 of memory:
802
803     for (1..10_000_000) {
804         if ("foo" =~ /(foo|(?<capture>bar))?/) {
805             my $capture = $+{capture}
806         }
807     }
808     system "ps -o rss $$"'
809
810 =item *
811
812 A constant subroutine assigned to a glob whose name contains a null will no
813 longer cause extra globs to pop into existence when the constant is
814 referenced under its new name.
815
816 =item *
817
818 C<sort> was not treating C<sub {}> and C<sub {()}> as equivalent when such
819 a sub was provided as the comparison routine.  It used to croak on
820 C<sub {()}>.
821
822 =item *
823
824 Subroutines from the C<autouse> namespace are once more exempt from
825 redefinition warnings.  This used to work in 5.005, but was broken in 5.6
826 for most subroutines.  For subs created via XS that redefine subroutines
827 from the C<autouse> package, this stopped working in 5.10.
828
829 =item *
830
831 New XSUBs now produce redefinition warnings if they overwrite existing
832 subs, as they did in 5.8.x.  (The C<autouse> logic was reversed in 5.10-14.
833 Only subroutines from the C<autouse> namespace would warn when clobbered.)
834
835 =item *
836
837 Redefinition warnings triggered by the creation of XSUBs now respect
838 Unicode glob names, instead of using the internal representation.  This was
839 missed in 5.15.4, partly because this warning was so hard to trigger.  (See
840 the previous item.)
841
842 =item *
843
844 C<newCONSTSUB> used to use compile-time warning hints, instead of run-time
845 hints.  The following code should never produce a redefinition warning, but
846 it used to, if C<newCONSTSUB> redefine and existing subroutine:
847
848     use warnings;
849     BEGIN {
850         no warnings;
851         some_XS_function_that_calls_new_CONSTSUB();
852     }
853
854 =item *
855
856 Redefinition warnings for constant subroutines are on by default (what are
857 known as severe warnings in L<perldiag>).  This was only the case when it
858 was a glob assignment or declaration of a Perl subroutine that caused the
859 warning.  If the creation of XSUBs triggered the warning, it was not a
860 default warning.  This has been corrected.
861
862 =item *
863
864 The internal check to see whether a redefinition warning should occur used
865 to emit "uninitialized" warnings in cases like this:
866
867     use warnings "uninitialized";
868     use constant {u=>undef,v=>undef};
869     sub foo(){u} sub foo(){v}
870
871 =item *
872
873 A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized"
874 warnings to report the wrong variable if the operator in question has
875 two operands and one is C<%{...}> or C<@{...}>.  This has been fixed
876 [perl #103766].
877
878 =item *
879
880 C<< version->new("version") >> and C<printf "%vd", "version"> no longer
881 crash [perl #102586].
882
883 =item *
884
885 C<$tied =~ y/a/b/>, C<chop $tied> and C<chomp $tied> now call FETCH just
886 once when $tied holds a reference.
887
888 =item *
889
890 Four-argument C<select> now always calls FETCH on tied arguments.  It used
891 to skip the call if the tied argument happened to hold C<undef> or a
892 typeglob.
893
894 =item *
895
896 Four-argument C<select> no longer produces its "Non-string passed as
897 bitmask" warning on tied or tainted variables that are strings.
898
899 =item *
900
901 C<sysread> now always calls FETCH on the buffer passed to it if it is tied.
902 It used to skip the call if the tied variable happened to hold a typeglob.
903
904 =item *
905
906 C<< $tied .= <> >> now calls FETCH once on C<$tied>.  It used to call it
907 multiple times if the last value assigned to or returned from the tied
908 variable was anything other than a string or typeglob.
909
910 =item *
911
912 The C<evalbytes> keyword added in 5.15.5 was respecting C<use utf8>
913 declarations from the outer scope, when it should have been ignoring them.
914
915 =item *
916
917 C<goto &func> no longers crashes, but produces an error message, when the
918 unwinding of the current subroutine's scope fires a destructor that
919 undefines the subroutine being "goneto" [perl #99850].
920
921 =item *
922
923 Arithmetic assignment (C<$left += $right>) involving overloaded objects that
924 rely on the 'nomethod' override no longer segfault when the left operand is not
925 overloaded.
926
927 =item *
928
929 Assigning C<__PACKAGE__> or any other shared hash key scalar to a stash
930 element no longer causes a double free.  Regardless of this change, the
931 results of such assignments are still undefined.
932
933 =item *
934
935 Creating a C<UNIVERSAL::AUTOLOAD> sub no longer stops C<%+>, C<%-> and
936 C<%!> from working some of the time [perl #105024].
937
938 =item *
939
940 Assigning C<__PACKAGE__> or another shared hash key string to a variable no
941 longer stops that variable from being tied if it happens to be a PVMG or
942 PVLV internally.
943
944 =item *
945
946 When presented with malformed UTF-8 input, the XS-callable functions
947 C<is_utf8_string()>, C<is_utf8_string_loc()>, and
948 C<is_utf8_string_loclen()> could read beyond the end of the input
949 string by up to 12 bytes.  This no longer happens.  [perl #32080].
950 However, currently, C<is_utf8_char()> still has this defect,
951 see L</is_utf8_char()> above.
952
953 =item *
954
955 Doing a substitution on a tied variable returning a copy-on-write scalar
956 used to cause an assertion failure or an "Attempt to free nonexistent
957 shared string" warning.
958
959 =item *
960
961 A change in perl 5.15.4 caused C<caller()> to produce malloc errors and a
962 crash with Perl's own malloc, and possibly with other malloc
963 implementations, too [perl #104034].
964
965 =item *
966
967 A bug fix in 5.15.5 could sometimes result in assertion failures under
968 debugging builds of perl for certain syntax errors in C<eval>, such as
969 C<eval(q|""!=!~//|);>
970
971 =item *
972
973 The "c [line num]" debugger command was broken by other debugger changes
974 release in 5.15.3.  This is now fixed.
975
976 =item *
977
978 Breakpoints were not properly restored after a debugger restart using the
979 "R" command.  This was broken in 5.15.3.  This is now fixed.
980
981 =item *
982
983 The debugger prompt did not display the current line in.  This was broken
984 in 5.15.3.  This is now fixed.
985
986 =item *
987
988 Class method calls still suffered from the Unicode bug with Latin-1 package
989 names.  This was missed in the Unicode package name cleanup in 5.15.4
990 [perl #105922].
991
992 =item *
993
994 The debugger no longer tries to do C<local $_> when dumping data
995 structures.
996
997 =item *
998
999 Calling C<readline($fh)> where $fh is a glob copy (e.g., after
1000 C<$fh = *STDOUT>), assigning something other than a glob to $fh, and then
1001 freeing $fh (e.g., by leaving the scope where it is defined) no longer
1002 causes the internal variable used by C<$.> (C<PL_last_in_gv>) to point to
1003 a freed scalar, that could be reused for some other glob, causing C<$.> to
1004 use some unrelated filehandle [perl #97988].
1005
1006 =item *
1007
1008 A regression in 5.14 caused these statements not to set the internal
1009 variable that holds the handle used by C<$.>:
1010
1011     my $fh = *STDOUT;
1012     tell $fh;
1013     eof  $fh;
1014     seek $fh, 0,0;
1015     tell     *$fh;
1016     eof      *$fh;
1017     seek     *$fh, 0,0;
1018     readline *$fh;
1019
1020 This is now fixed, but C<tell *{ *$fh }> still has the problem, and it is
1021 not clear how to fix it [perl #106536].
1022
1023 =item *
1024
1025 Version comparisons, such as those that happen implicitly with
1026 C<use v5.43>, no longer cause locale settings to change [perl #105784].
1027
1028 =back
1029
1030 =head1 Known Problems
1031
1032 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
1033 tests that had to be C<TODO>ed for the release would be noted here, unless
1034 they were specific to a particular platform (see below).
1035
1036 This is a list of some significant unfixed bugs, which are regressions
1037 from either 5.XXX.XXX or 5.XXX.XXX.
1038
1039 [ List each fix as a =item entry ]
1040
1041 =over 4
1042
1043 =item *
1044
1045 XXX
1046
1047 =back
1048
1049 =head1 Obituary
1050
1051 XXX If any significant core contributor has died, we've added a short obituary
1052 here.
1053
1054 =head1 Acknowledgements
1055
1056 XXX Generate this with:
1057
1058   perl Porting/acknowledgements.pl v5.15.5..HEAD
1059
1060 =head1 Reporting Bugs
1061
1062 If you find what you think is a bug, you might check the articles
1063 recently posted to the comp.lang.perl.misc newsgroup and the perl
1064 bug database at http://rt.perl.org/perlbug/ .  There may also be
1065 information at http://www.perl.org/ , the Perl Home Page.
1066
1067 If you believe you have an unreported bug, please run the L<perlbug>
1068 program included with your release.  Be sure to trim your bug down
1069 to a tiny but sufficient test case.  Your bug report, along with the
1070 output of C<perl -V>, will be sent off to perlbug@perl.org to be
1071 analysed by the Perl porting team.
1072
1073 If the bug you are reporting has security implications, which make it
1074 inappropriate to send to a publicly archived mailing list, then please send
1075 it to perl5-security-report@perl.org. This points to a closed subscription
1076 unarchived mailing list, which includes
1077 all the core committers, who will be able
1078 to help assess the impact of issues, figure out a resolution, and help
1079 co-ordinate the release of patches to mitigate or fix the problem across all
1080 platforms on which Perl is supported. Please only use this address for
1081 security issues in the Perl core, not for modules independently
1082 distributed on CPAN.
1083
1084 =head1 SEE ALSO
1085
1086 The F<Changes> file for an explanation of how to view exhaustive details
1087 on what changed.
1088
1089 The F<INSTALL> file for how to build Perl.
1090
1091 The F<README> file for general stuff.
1092
1093 The F<Artistic> and F<Copying> files for copyright information.
1094
1095 =cut