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