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