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