This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updated perldelta for some older changes that hadn't been included yet
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
541cb22c 3=for comment
c15f899f 4This has been completed up to 1881532246, except for
d6b99bf4 5b0f2e9e nwclark Fix two bugs related to pod files outside of pod/ (important enough?)
d6b99bf4 69b9f19d craigb Another vms bug
541cb22c 7
44691e6f
AB
8=head1 NAME
9
0aaeb177
SH
10[ this is a template for a new perldelta file. Any text flagged as
11XXX needs to be processed before release. ]
760696b8 12
0aaeb177 13perldelta - what is new for perl v5.15.6
062678b2 14
0aaeb177 15=head1 DESCRIPTION
ad32999b 16
0aaeb177
SH
17This document describes differences between the 5.15.5 release and
18the 5.15.6 release.
ad32999b 19
0aaeb177
SH
20If you are upgrading from an earlier release such as 5.15.4, first read
21L<perl5155delta>, which describes differences between 5.15.4 and
225.15.5.
ad32999b 23
0aaeb177 24=head1 Notice
ad32999b 25
0aaeb177 26XXX Any important notices here
ad32999b 27
0aaeb177 28=head1 Core Enhancements
a3f52e2e 29
0aaeb177
SH
30XXX New core language features go here. Summarise user-visible core language
31enhancements. Particularly prominent performance optimisations could go
32here, but most should go in the L</Performance Enhancements> section.
a3f52e2e 33
0aaeb177 34[ List each enhancement as a =head2 entry ]
6d110ad0 35
61f966e7
FC
36=head2 C<__SUB__>
37
38The new C<__SUB__> token, available under the "current_sub" feature (see
39L<feature>) or C<use v5.15>, returns a reference to the current subroutine,
40making it easier to write recursive closures.
41
d1fb015b
FC
42=head2 New option for the debugger's B<t> command
43
44The B<t> command in the debugger, which toggles tracing mode, now accepts a
45numerical argument that determines how many levels of subroutine calls to
46trace.
47
7e7629fa
FC
48=head2 Return value of C<tied>
49
50The value returned by C<tied> on a tied variable is now the actual scalar
51that holds the object to which the variable is tied. This allows ties to
52be weakened with C<Scalar::Util::weaken(tied $tied_variable)>.
53
e3c71926 54=head1 Security
6d110ad0 55
0aaeb177
SH
56XXX Any security-related notices go here. In particular, any security
57vulnerabilities closed should be noted here rather than in the
58L</Selected Bug Fixes> section.
6d110ad0 59
6d91e957
KW
60=head2 C<is_utf8_char()>
61
62The XS-callable function C<is_utf8_char()> when presented with malformed
63UTF-8 input can read up to 12 bytes beyond the end of the string. This
64cannot be fixed without changing its API. It is not called from CPAN.
65The documentation for it now describes how to use it safely.
66
67=head2 Other C<is_utf8_foo()> functions, as well as C<utf8_to_foo()>, etc.
68
69Most of the other XS-callable functions that take UTF-8 encoded input
70implicitly assume that the UTF-8 is valid (not malformed) in regards to
71buffer length. Do not do things such as change a character's case or
72see if it is alphanumeric without first being sure that it is valid
73UTF-8. This can be safely done for a whole string by using one of the
74functions C<is_utf8_string()>, C<is_utf8_string_loc()>, and
75C<is_utf8_string_loclen()>.
6d110ad0 76
e3c71926 77=head1 Incompatible Changes
6d110ad0 78
0aaeb177 79XXX For a release on a stable branch, this section aspires to be:
ad32999b 80
0aaeb177
SH
81 There are no changes intentionally incompatible with 5.XXX.XXX
82 If any exist, they are bugs and reports are welcome.
ad32999b 83
0aaeb177 84[ List each incompatible change as a =head2 entry ]
ad32999b 85
66008486
FC
86=head2 C<substr> lvalue revamp
87
88When C<substr> is called in lvalue or potential lvalue context with two or
89three arguments, a special lvalue scalar is returned that modifies the
90original string (the first argument) when assigned to.
91
92Previously, the offsets (the second and third arguments) passed to
93C<substr> would be converted immediately to match the string, negative
94offsets being translated to positive and offsets beyond the end of the
95string being truncated.
96
97Now, the offsets are recorded without modification in the special lvalue
98scalar that is returned, and the original string is not even looked at by
99C<substr> itself, but only when the returned lvalue is read or modified.
100
101These changes result in several incompatible changes and bug fixes:
102
103=over
104
105=item *
106
107If the original string changes length after the call to C<substr> but
108before assignment to its return value, negative offsets will remember
109their position from the end of the string, affecting code like this:
110
111 my $string = "string";
112 my $lvalue = \substr $string, -4, 2;
113 print $lvalue, "\n"; # prints "ri"
114 $string = "bailing twine";
115 print $lvalue, "\n"; # prints "wi"; used to print "il"
116
117The same thing happens with an omitted third argument. The returned lvalue
118will always extend to the end of the string, even if the string becomes
119longer.
120
121=item *
122
123Tied (and otherwise magical) variables are no longer exempt from the
124"Attempt ot use reference as lvalue in substr" warning.
125
126=item *
127
128That warning now occurs when the returned lvalue is assigned to, not when
129C<substr> itself is called. This only makes a difference if the return
130value of C<substr> is referenced and assigned to later.
131
132=item *
133
134The order in which "uninitialized" warnings occur for arguments to
135C<substr> has changed.
136
137=item *
138
139Passing 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
140when the value passed is assigned to.
141
7e7629fa
FC
142The same thing happens with the "substr outside of string" error. If the
143lvalue is only read, not written to, it is now just a warning, as with
144rvalue C<substr>.
66008486
FC
145
146=item *
147
148C<substr> assignments no longer call FETCH twice if the first argument is a
149tied variable, but just once.
150
151=back
152
153It was impossible to fix all the bugs without an incompatible change, and
154the behaviour of negative offsets was never specified, so the change was
155deemed acceptable.
156
d6b99bf4
FC
157=head2 Return value of C<eval>
158
159C<eval> returns C<undef> in scalar context or an empty list in list context
160when there is a run-time error. For syntax errors (when C<eval> is passed
161a string), in list context it used to return a list containing a single
162undefined element. Now it returns an empty list in list context for all
163errors [perl #80630].
164
541cb22c
FC
165=head2 XS API tweak
166
167The C<newCONSTSUB_flags> C-level function, added in 5.15.4, now has a
168C<len> parameter.
169
e3c71926 170=head1 Deprecations
6d110ad0 171
0aaeb177
SH
172XXX Any deprecated features, syntax, modules etc. should be listed here.
173In particular, deprecated modules should be listed here even if they are
174listed as an updated module in the L</Modules and Pragmata> section.
ae92a9ae 175
0aaeb177 176[ List each deprecation as a =head2 entry ]
ae92a9ae 177
e3c71926 178=head1 Performance Enhancements
6d110ad0 179
0aaeb177
SH
180XXX Changes which enhance performance without changing behaviour go here. There
181may well be none in a stable release.
182
183[ List each enhancement as a =item entry ]
184
e3c71926 185=over 4
6d110ad0
FC
186
187=item *
188
679b54e7
FC
189Perl 5.12.0 sped up the destruction of objects whose classes define empty
190C<DESTROY> methods (to prevent autoloading), simply by not calling such
191empty methods. This release takes this optimisation a step further, by not
192calling any C<DESTROY> method that begins with an C<return> statement.
193This can be useful for destructors that are only used for debugging:
194
195 use constant DEBUG => 1;
196 sub DESTROY { return unless DEBUG; ... }
197
198Constant-folding will reduce the first statement to C<return;> if DEBUG is
199set to 0, triggering this optimisation.
6d110ad0 200
d1fb015b
FC
201=item *
202
203Assign to a variable that holds a typeglob or copy-on-write scalar is now
204much faster. Previously the typeglob would be stringified or the
205copy-on-write scalar would be copied before being clobbered.
206
7e7629fa
FC
207=item *
208
209Assignment to a substring in void context is now more than twice its
210previous speed. Instead of creating and returning a special lvalue scalar
211that is then assigned to, C<substr> modifies the original string itself.
212
e3c71926 213=back
6d110ad0 214
e3c71926 215=head1 Modules and Pragmata
6d110ad0 216
0aaeb177
SH
217XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
218go here. If Module::CoreList is updated, generate an initial draft of the
219following sections using F<Porting/corelist-perldelta.pl>, which prints stub
220entries to STDOUT. Results can be pasted in place of the '=head2' entries
221below. A paragraph summary for important changes should then be added by hand.
222In an ideal world, dual-life modules would have a F<Changes> file that could be
223cribbed.
224
225[ Within each section, list entries as a =item entry ]
226
e3c71926 227=head2 New Modules and Pragmata
6d110ad0 228
e3c71926 229=over 4
6d110ad0
FC
230
231=item *
232
0aaeb177 233XXX
6d110ad0
FC
234
235=back
236
e3c71926 237=head2 Updated Modules and Pragmata
6d110ad0 238
e3c71926 239=over 4
6d110ad0
FC
240
241=item *
242
f8c9502f
CBW
243L<Archive::Tar> has been upgraded from version 1.80 to version 1.82.
244
245Adjustments to handle files >8gb (>0777777777777 octal) and a feature to
246return the MD5SUM of files in the archive.
a3f52e2e 247
87b9431e
CBW
248=item *
249
74c26f06
CBW
250L<AutoLoader> has been upgraded from version 5.71 to version 5.72.
251
252=item *
253
8cea0f87
CBW
254L<B::Debug> has been upgraded from version 1.16 to version 1.17.
255
256=item *
257
be4a9ab3 258L<B::Deparse> has been upgraded from version 1.09 to version 1.10.
679b54e7 259
c15f899f
DR
260C<sort(foo(bar))> is now deparsed correctly. (C<sort foo(bar)>, how it used
261to deparse, makes foo the sort routine, rather than a regular function
262call.)
679b54e7
FC
263
264=item *
265
9505dd85 266L<Compress::Raw::Zlib> has been upgraded from version 2.042 to version 2.045.
87b9431e 267
7e700369
CBW
268=item *
269
6475ddc2 270L<Compress::Raw::Bzip2> has been upgraded from version 2.042 to version 2.045.
7e700369 271
dc7edc5c
CBW
272=item *
273
1d8dd5fc
CBW
274L<CPAN::Meta::YAML> has been upgraded from version 0.004 to version 0.005.
275
276=item *
277
9e87a279
CBW
278L<CPANPLUS> has been upgraded from version 0.9112 to version 0.9113.
279
280=item *
281
be4a9ab3 282L<Data::Dumper> has been upgraded from version 2.134 to version 2.135.
61f966e7
FC
283
284The XS implementation has been updated to account for the Unicode symbol
285changes in Perl 5.15.4. It also knows how to output typeglobs with nulls
286in their names.
287
288=item *
289
e39652ea
CBW
290L<Digest::SHA> has been upgraded from version 5.63 to version 5.70.
291
292Added BITS mode to addfile method and shasum which makes partial-byte inputs
293now possible via files/STDIN and allows shasum to check all 8074 NIST Msg vectors,
294where previously special programming was required to do this.
295
296=item *
297
ac616993
CBW
298L<ExtUtils::ParseXS> has been upgraded from version 3.05 to version 3.07.
299
300=item *
301
090349ce 302L<IO::Compress::Base> has been upgraded from version 2.042 to version 2.045.
08ad9465
CBW
303
304Added zipdetails utility.
dc7edc5c 305
7788a270
CBW
306=item *
307
4345d05b
CBW
308L<Locale::Codes> has been upgraded from version 3.18 to version 3.20.
309
310The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now support retired codes.
311All codesets may be specified by a constant or by their name now. Previously,
312they were specified only by a constant.
313The alias_code function exists for backward compatibility. It has been replaced by rename_country_code.
314The alias_code function will be removed sometime after September, 2013.
315All work is now done in the central module (Locale::Codes). Previously, some was still done in the
316wrapper modules (Locale::Codes::*) but that is gone now.
317Added Language Family codes (langfam) as defined in ISO 639-5.
318
319=item *
320
b42ff875
CBW
321L<Module::Loaded> has been uprgaded from version 0.06 to version 0.08.
322
323=item *
324
a71d67b1
CBW
325L<Pod::LaTeX> has been upgraded from version 0.59 to version 0.60.
326
327Added another LaTeX escape: --- => -{}-{}-
328
329Pod::LaTeX doesn't handle -- in PODs specially, passing it directly to
330LaTeX, which then proceeds to replace it with a single -. This patch
331replaces ----- with -{}-{}-{}-{}-
332
333=item *
334
be4a9ab3 335L<POSIX> has been upgraded from version 1.26 to version 1.27.
7e7629fa
FC
336
337It no longer produces a "Constant subroutine TCSANOW redefined" warning on
338Windows.
339
340XXX When did it start producing that warning? Was it post-5.15.5? Even if
341it was not, adding a note will help whoever compiles perl5160delta.
342
343=item *
344
c2654555
CBW
345L<Socket> has been upgraded from version 1.94_02 to version 1.96.
346
347=item *
348
85ca3be7
CBW
349L<threads> has been upgraded from version 1.85 to version 1.86.
350
351=item *
352
65ae8d99 353L<Unicode::Collate> has been upgraded from version 0.85 to version 0.87.
7788a270
CBW
354
355Tailored compatibility ideographs as well as unified ideographs for
356the locales: ja, ko, zh__big5han, zh__gb2312han, zh__pinyin, zh__stroke.
357
65ae8d99
CBW
358Now Locale/*.pl files are searched in @INC.
359
a3e88ad7
JP
360=item *
361
be4a9ab3 362L<UNIVERSAL> has been upgraded from version 1.10 to version 1.11.
a3e88ad7
JP
363
364Documentation change clarifies return values from UNIVERSAL::VERSION.
365
0aaeb177 366=back
6138a722 367
0aaeb177 368=head2 Removed Modules and Pragmata
6138a722 369
0aaeb177 370=over 4
be539103 371
a47fb3fe
CBW
372=item *
373
c15f899f 374XXX
a3f52e2e 375
0aaeb177 376=back
a3f52e2e 377
0aaeb177 378=head1 Documentation
a3f52e2e 379
0aaeb177
SH
380XXX Changes to files in F<pod/> go here. Consider grouping entries by
381file and be sure to link to the appropriate page, e.g. L<perlfunc>.
a3f52e2e 382
0aaeb177 383=head2 New Documentation
ad32999b 384
0aaeb177 385XXX Changes which create B<new> files in F<pod/> go here.
ad32999b 386
0aaeb177 387=head3 L<XXX>
ad32999b 388
0aaeb177 389XXX Description of the purpose of the new file here
6138a722 390
0aaeb177 391=head2 Changes to Existing Documentation
6138a722 392
0aaeb177
SH
393XXX Changes which significantly change existing files in F<pod/> go here.
394However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
395section.
a47fb3fe 396
7687d286 397=head3 L<perlsec/Laundering and Detecting Tainted Data>
a47fb3fe 398
0aaeb177 399=over 4
7ef25837 400
6d110ad0
FC
401=item *
402
7687d286
KW
403The example function for checking for taintedness contained a subtle
404error. C<$@> needs to be localized to prevent its changing this
405global's value outside the function. The preferred method to check for
406this, though, remains to use L<Scalar::Util/tainted>.
6d110ad0
FC
407
408=back
409
e3c71926
FR
410=head1 Diagnostics
411
412The following additions or changes have been made to diagnostic output,
413including warnings and fatal error messages. For the complete list of
414diagnostic messages, see L<perldiag>.
6d110ad0 415
0aaeb177
SH
416XXX New or changed warnings emitted by the core's C<C> code go here. Also
417include any changes in L<perldiag> that reconcile it to the C<C> code.
6138a722 418
0aaeb177
SH
419[ Within each section, list entries as a =item entry that links to perldiag,
420 e.g.
6138a722 421
0aaeb177 422 =item *
6138a722 423
0aaeb177
SH
424 L<Invalid version object|perldiag/"Invalid version object">
425]
6138a722 426
0aaeb177 427=head2 New Diagnostics
828d6195 428
0aaeb177 429XXX Newly added diagnostic messages go here
83307084 430
0aaeb177 431=head3 New Errors
d39de893 432
3432e5a1 433=over 4
39afdc5a
CBW
434
435=item *
436
0aaeb177 437XXX L<message|perldiag/"message">
6138a722 438
e3c71926 439=back
7b8e5ef0 440
0aaeb177 441=head3 New Warnings
91710846 442
e3c71926 443=over 4
91710846
DG
444
445=item *
446
0aaeb177 447XXX L<message|perldiag/"message">
f81e39ef 448
e3c71926 449=back
a2fa999d 450
0aaeb177
SH
451=head2 Changes to Existing Diagnostics
452
453XXX Changes (i.e. rewording) of diagnostic messages go here
bd65daab 454
e3c71926 455=over 4
bd65daab 456
3f2cb5bf
SM
457=item *
458
18fbfe8d
FC
459Redefinition warnings for constant subroutines used to be mandatory, even
460occurring under C<no warnings>. Now they respect the L<warnings> pragma.
b420b12a 461
61f966e7
FC
462=item *
463
464The "Attempt to free non-existent shared string" has had the spelling of
465"non-existent" corrected to "nonexistent". It was already listed with the
466correct spelling in L<perldiag>.
467
66008486
FC
468=item *
469
470The 'Use of "foo" without parentheses is ambiguous' warning has been
471extended to apply also to user-defined subroutines with a (;$) prototype,
472and not just to built-in functions.
473
3432e5a1 474=back
b420b12a 475
0aaeb177 476=head1 Utility Changes
9cfd094e 477
0aaeb177
SH
478XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
479here. Most of these are built within the directories F<utils> and F<x2p>.
95f7e41f 480
0aaeb177
SH
481[ List utility changes as a =head3 entry for each utility and =item
482entries for each change
483Use L<XXX> with program names to get proper documentation linking. ]
95f7e41f 484
08ad9465 485=head3 L<zipdetails>
d6cf2367 486
e3c71926 487=over 4
b53e16ae
FC
488
489=item *
490
08ad9465
CBW
491L<zipdetails> displays information about the internal record structure of the zip file.
492It is not concerned with displaying any details of the compressed data stored in the zip file.
b53e16ae 493
3432e5a1 494=back
60092ce4 495
0aaeb177
SH
496=head1 Configuration and Compilation
497
498XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
499go here. Any other changes to the Perl build process should be listed here.
500However, any platform-specific changes should be listed in the
501L</Platform Support> section, instead.
502
503[ List changes as a =item entry ].
309aab3a 504
e3c71926 505=over 4
b53e16ae
FC
506
507=item *
508
60f0ee9d
NC
509F<pod/roffitall> is now build by F<pod/buildtoc>, instead of being shipped
510with the distribution. Its list of manpages is now generated (and therefore
511current). See also RT #103202 for an unresolved related issue.
a3f52e2e 512
61f966e7
FC
513=item *
514
515Perl 5.15.5 had a bug in its installation script, which did not install
516F<unicore/Name.pm>. This has been corrected [perl #104226].
517
518XXX Is that Perl version correct? Is the file path correct?
519
c15f899f
DR
520=item *
521
522The -Dusesitecustomize and -Duserelocatableinc options now work together
523properly.
524
0aaeb177 525=back
a3f52e2e 526
0aaeb177 527=head1 Testing
a3f52e2e 528
0aaeb177
SH
529XXX Any significant changes to the testing of a freshly built perl should be
530listed here. Changes which create B<new> files in F<t/> go here as do any
531large changes to the testing harness (e.g. when parallel testing was added).
532Changes to existing files in F<t/> aren't worth summarising, although the bugs
533that they represent may be covered elsewhere.
a3f52e2e 534
0aaeb177 535[ List each test improvement as a =item entry ]
a3f52e2e 536
0aaeb177 537=over 4
a3f52e2e
FC
538
539=item *
540
d1fb015b
FC
541The F<substr.t> and F<substr_thr.t> scripts for testing C<substr> have been
542moved under F<t/op/>, where they were originally. They had been moved
543under F<t/re/> along with the substitution tests when that directory was
544created.
a3f52e2e 545
0aaeb177 546=back
a3f52e2e 547
0aaeb177 548=head1 Platform Support
a3f52e2e 549
0aaeb177 550XXX Any changes to platform support should be listed in the sections below.
a3f52e2e 551
0aaeb177
SH
552[ Within the sections, list each platform as a =item entry with specific
553changes as paragraphs below it. ]
a3f52e2e 554
0aaeb177 555=head2 New Platforms
a3f52e2e 556
0aaeb177
SH
557XXX List any platforms that this version of perl compiles on, that previous
558versions did not. These will either be enabled by new files in the F<hints/>
559directories, or new subdirectories and F<README> files at the top level of the
560source tree.
a3f52e2e 561
0aaeb177 562=over 4
a3f52e2e 563
0aaeb177 564=item XXX-some-platform
a3f52e2e 565
0aaeb177 566XXX
a3f52e2e 567
0aaeb177 568=back
a3f52e2e 569
0aaeb177 570=head2 Discontinued Platforms
ca955add 571
0aaeb177 572XXX List any platforms that this version of perl no longer compiles on.
bbdd8bad 573
0aaeb177 574=over 4
bbdd8bad 575
0aaeb177 576=item XXX-some-platform
ad32999b 577
0aaeb177 578XXX
ad32999b 579
0aaeb177 580=back
ad32999b 581
0aaeb177 582=head2 Platform-Specific Notes
ad32999b 583
0aaeb177
SH
584XXX List any changes for specific platforms. This could include configuration
585and compilation changes or changes in portability/compatibility. However,
586changes within modules for platforms should generally be listed in the
587L</Modules and Pragmata> section.
ad32999b 588
c15f899f
DR
589=head3 VMS
590
0aaeb177 591=over 4
ad32999b 592
c15f899f 593=item *
ad32999b 594
c15f899f 595Fixed a bug that caused a link error on older versions of VMS.
ad32999b 596
c15f899f
DR
597=item *
598
599Perl no longer supports pre-7.0 VMS or pre-6.0 DEC C.
ad32999b 600
0aaeb177 601=head1 Internal Changes
ad32999b 602
0aaeb177
SH
603XXX Changes which affect the interface available to C<XS> code go here.
604Other significant internal changes for future core maintainers should
605be noted as well.
ad32999b 606
0aaeb177 607[ List each change as a =item entry ]
ad32999b 608
0aaeb177 609=over 4
ad32999b 610
3973654e
FC
611=item *
612
0aaeb177 613XXX
3973654e 614
0aaeb177 615=back
cca38fda 616
0aaeb177 617=head1 Selected Bug Fixes
9c7c1651 618
0aaeb177
SH
619XXX Important bug fixes in the core language are summarised here.
620Bug fixes in files in F<ext/> and F<lib/> are best summarised in
621L</Modules and Pragmata>.
9c7c1651 622
0aaeb177 623[ List each fix as a =item entry ]
fce59cd4 624
0aaeb177 625=over 4
fce59cd4 626
b9e83cd1
FC
627=item *
628
7402016d
AB
629RT #78266: The regex engine has been leaking memory when accessing
630named captures that weren't matched as part of a regex ever since 5.10
631when they were introduced, e.g. this would consume over a hundred MB
632of memory:
633
e46b6a32
FC
634 for (1..10_000_000) {
635 if ("foo" =~ /(foo|(?<capture>bar))?/) {
636 my $capture = $+{capture}
637 }
638 }
639 system "ps -o rss $$"'
7402016d
AB
640
641=item *
642
541cb22c
FC
643A constant subroutine assigned to a glob whose name contains a null will no
644longer cause extra globs to pop into existence when the constant is
645referenced under its new name.
b9e83cd1 646
679b54e7
FC
647=item *
648
649C<sort> was not treating C<sub {}> and C<sub {()}> as equivalent when such
650a sub was provided as the comparison routine. It used to croak on
651C<sub {()}>.
652
653=item *
654
655Subroutines from the C<autouse> namespace are once more exempt from
656redefinition warnings. This used to work in 5.005, but was broken in 5.6
657for most subroutines. For subs created via XS that redefine subroutines
658from the C<autouse> package, this stopped working in 5.10.
659
660=item *
661
662New XSUBs now produce redefinition warnings if they overwrite existing
663subs, as they did in 5.8.x. (The C<autouse> logic was reversed in 5.10-14.
664Only subroutines from the C<autouse> namespace would warn when clobbered.)
665
666=item *
667
668Redefinition warnings triggered by the creation of XSUBs now respect
669Unicode glob names, instead of using the internal representation. This was
670missed in 5.15.4, partly because this warning was so hard to trigger. (See
671the previous item.)
672
673=item *
674
675C<newCONSTSUB> used to use compile-time warning hints, instead of run-time
676hints. The following code should never produce a redefinition warning, but
677it used to, if C<newCONSTSUB> redefine and existing subroutine:
678
679 use warnings;
680 BEGIN {
681 no warnings;
682 some_XS_function_that_calls_new_CONSTSUB();
683 }
684
61f966e7
FC
685=item *
686
687Redefinition warnings for constant subroutines are on by default (what are
688known as severe warnings in L<perldiag>). This was only the case when it
689was a glob assignment or declaration of a Perl subroutine that caused the
690warning. If the creation of XSUBs triggered the warning, it was not a
691default warning. This has been corrected.
692
693=item *
694
695The internal check to see whether a redefinition warning should occur used
696to emit "uninitialized" warnings in cases like this:
697
698 use warnings "uninitialized";
699 use constant {u=>undef,v=>undef};
700 sub foo(){u} sub foo(){v}
701
702=item *
703
704A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized"
705warnings to report the wrong variable if the operator in question has
706two operands and one is C<%{...}> or C<@{...}>. This has been fixed
707[perl #103766].
708
709=item *
710
711C<< version->new("version") >> and C<printf "%vd", "version"> no longer
712crash [perl #102586].
713
d1fb015b
FC
714=item *
715
716C<$tied =~ y/a/b/>, C<chop $tied> and C<chomp $tied> now call FETCH just
717once when $tied holds a reference.
718
719=item *
720
721Four-argument C<select> now always calls FETCH on tied arguments. It used
722to skip the call if the tied argument happened to hold C<undef> or a
723typeglob.
724
725=item *
726
727Four-argument C<select> no longer produces its "Non-string passed as
728bitmask" warning on tied or tainted variables that are strings.
729
730=item *
731
732C<sysread> now always calls FETCH on the buffer passed to it if it is tied.
733It used to skip the call if the tied variable happened to hold a typeglob.
734
735=item *
736
737C<< $tied .= <> >> now calls FETCH once on C<$tied>. It used to call it
738multiple times if the last value assigned to or returned from the tied
739variable was anything other than a string or typeglob.
740
66008486
FC
741=item *
742
743The C<evalbytes> keyword added in 5.15.5 was respecting C<use utf8>
744declarations from the outer scope, when it should have been ignoring them.
745
7e7629fa
FC
746=item *
747
748C<goto &func> no longers crashes, but produces an error message, when the
749unwinding of the current subroutine's scope fires a destructor that
750undefines the subroutine being "goneto" [perl #99850].
751
73512201
DG
752=item *
753
754Arithmetic assignment (C<$left += $right>) involving overloaded objects that
755rely on the 'nomethod' override no longer segfault when the left operand is not
756overloaded.
757
a1f0e6ed
FC
758=item *
759
760Assigning C<__PACKAGE__> or any other shared hash key scalar to a stash
761element no longer causes a double free. Regardless of this change, the
762results of such assignments are still undefined.
763
764=item *
765
766Creating a C<UNIVERSAL::AUTOLOAD> sub no longer stops C<%+>, C<%-> and
767C<%!> from working some of the time [perl #105024].
768
ad790500
FC
769=item *
770
771Assigning C<__PACKAGE__> or another shared hash key string to a variable no
772longer stops that variable from being tied if it happens to be a PVMG or
773PVLV internally.
774
6d91e957
KW
775=item *
776
777When presented with malformed UTF-8 input, the XS-callable functions
778C<is_utf8_string()>, C<is_utf8_string_loc()>, and
779C<is_utf8_string_loclen()> could read beyond the end of the input
780string by up to 12 bytes. This no longer happens. [perl #32080].
781However, currently, C<is_utf8_char()> still has this defect,
782see L</is_utf8_char()> above.
783
d6b99bf4
FC
784=item *
785
786Doing a substitution on a tied variable returning a copy-on-write scalar
787used to cause an assertion failure or an "Attempt to free nonexistent
788shared string" warning.
789
790=item *
791
792A change in perl 5.15.4 caused C<caller()> to produce malloc errors and a
793crash with Perl's own malloc, and possibly with other malloc
794implementations, too [perl #104034].
795
796=item *
797
798A bug fix in 5.15.5 could sometimes result in assertion failures under
799debugging builds of perl for certain syntax errors in C<eval>, such as
800C<eval(q|""!=!~//|);>
801
0aaeb177 802=back
bf19b80e 803
0aaeb177 804=head1 Known Problems
bf19b80e 805
0aaeb177
SH
806XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
807tests that had to be C<TODO>ed for the release would be noted here, unless
808they were specific to a particular platform (see below).
65b66aa9 809
0aaeb177
SH
810This is a list of some significant unfixed bugs, which are regressions
811from either 5.XXX.XXX or 5.XXX.XXX.
65b66aa9 812
0aaeb177 813[ List each fix as a =item entry ]
b53e16ae 814
0aaeb177 815=over 4
b53e16ae 816
7c864bb3
VP
817=item *
818
0aaeb177 819XXX
7c864bb3 820
63ac71b9 821=back
bbc28bfc 822
0aaeb177 823=head1 Obituary
8fe05716 824
0aaeb177
SH
825XXX If any significant core contributor has died, we've added a short obituary
826here.
8fe05716 827
0aaeb177 828=head1 Acknowledgements
8fe05716 829
0aaeb177 830XXX Generate this with:
8fe05716 831
0aaeb177 832 perl Porting/acknowledgements.pl v5.15.5..HEAD
29cf780c 833
44691e6f
AB
834=head1 Reporting Bugs
835
836If you find what you think is a bug, you might check the articles
34dc2ec0 837recently posted to the comp.lang.perl.misc newsgroup and the perl
44691e6f
AB
838bug database at http://rt.perl.org/perlbug/ . There may also be
839information at http://www.perl.org/ , the Perl Home Page.
840
841If you believe you have an unreported bug, please run the L<perlbug>
842program included with your release. Be sure to trim your bug down
843to a tiny but sufficient test case. Your bug report, along with the
844output of C<perl -V>, will be sent off to perlbug@perl.org to be
845analysed by the Perl porting team.
846
847If the bug you are reporting has security implications, which make it
848inappropriate to send to a publicly archived mailing list, then please send
34dc2ec0 849it to perl5-security-report@perl.org. This points to a closed subscription
b4707b2a
FC
850unarchived mailing list, which includes
851all the core committers, who will be able
44691e6f
AB
852to help assess the impact of issues, figure out a resolution, and help
853co-ordinate the release of patches to mitigate or fix the problem across all
34dc2ec0
DM
854platforms on which Perl is supported. Please only use this address for
855security issues in the Perl core, not for modules independently
44691e6f
AB
856distributed on CPAN.
857
858=head1 SEE ALSO
859
860The F<Changes> file for an explanation of how to view exhaustive details
861on what changed.
862
863The F<INSTALL> file for how to build Perl.
864
865The F<README> file for general stuff.
866
867The F<Artistic> and F<Copying> files for copyright information.
868
869=cut