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