This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: quadmath
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
39c4a6cf 5perldelta - what is new for perl v5.21.4
c68523cb 6
238894db 7=head1 DESCRIPTION
c68523cb 8
39c4a6cf 9This document describes differences between the 5.21.3 release and the 5.21.4
238894db 10release.
c68523cb 11
39c4a6cf
PM
12If you are upgrading from an earlier release such as 5.21.2, first read
13L<perl5213delta>, which describes differences between 5.21.2 and 5.21.3.
7065301c 14
39c4a6cf 15=head1 Core Enhancements
f88f10f5 16
5b319db8
JH
17=head2 Infinity and NaN (not-a-number) handling improved
18
5cfa0642
SH
19Floating point values are able to hold the special values infinity (also
20-infinity), and NaN (not-a-number). Now we more robustly recognize and
21propagate the value in computations, and on output normalize them to C<Inf> and
22C<NaN>.
5b319db8 23
019bf663 24See also the L<POSIX> enhancements.
5b319db8 25
13900f93 26=head1 Incompatible Changes
8bdb3f93 27
2b03450b
FC
28=head2 Changes to the C<*> prototype
29
5cfa0642
SH
30The C<*> character in a subroutine's prototype used to allow barewords to take
31precedence over most, but not all subroutines. It was never consistent and
32exhibited buggy behaviour.
2b03450b 33
5cfa0642
SH
34Now it has been changed, so subroutines always take precedence over barewords,
35which brings it into conformity with similarly prototyped built-in functions:
2b03450b
FC
36
37 sub splat($) { ... }
38 sub foo { ... }
39 splat(foo); # now always splat(foo())
40 splat(bar); # still splat('bar') as before
41 close(foo); # close(foo())
42 close(bar); # close('bar')
43
39c4a6cf 44=head1 Performance Enhancements
ff433f2d 45
39c4a6cf 46=over 4
7d19f6a1 47
7d19f6a1
PM
48=item *
49
5cfa0642
SH
50Subroutines with an empty prototype and bodies containing just C<undef> are now
51eligible for inlining.
8f5ad91b 52L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728>
55e8b286 53
07600c14
FC
54=item *
55
56Subroutines in packages no longer need to carry typeglobs around with them.
57Declaring a subroutine will now put a simple sub reference in the stash if
5cfa0642
SH
58possible, saving memory. The typeglobs still notionally exist, so accessing
59them will cause the subroutine reference to be upgraded to a typeglob. This
60optimization does not currently apply to XSUBs or exported subroutines, and
61method calls will undo it, since they cache things in typeglobs.
8f5ad91b 62L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
07600c14 63
39c4a6cf 64=back
55e8b286 65
39c4a6cf 66=head1 Modules and Pragmata
d99849ae 67
39c4a6cf 68=head2 New Modules and Pragmata
ff433f2d 69
39c4a6cf 70=over 4
ff433f2d
PM
71
72=item *
73
5cfa0642
SH
74L<B::Op_private> provides detailed information about the flags used in the
75C<op_private> field of perl opcodes.
0bb39c26 76
39c4a6cf 77=back
0bb39c26 78
39c4a6cf 79=head2 Updated Modules and Pragmata
9c97a342 80
39c4a6cf 81=over 4
d99849ae
PM
82
83=item *
84
c37b2ad0
SH
85L<Archive::Tar> has been upgraded from version 2.00 to 2.02.
86
87Tests can now be run in parallel.
88
89=item *
90
8435afd1
SH
91L<Attribute::Handlers> has been upgraded from version 0.96 to 0.97.
92
5cfa0642
SH
93Internal changes to account for the fact that subroutines in packages no longer
94need to carry typeglobs around with them (see under L</Performance
95Enhancements>).
96
8435afd1
SH
97=item *
98
99L<attributes> has been upgraded from version 0.22 to 0.23.
100
5cfa0642
SH
101The usage of C<memEQs> in the XS has been corrected.
102L<[perl #122701]|https://rt.perl.org/Ticket/Display.html?id=122701>
103
8435afd1
SH
104=item *
105
07600c14
FC
106L<B> has been upgraded from version 1.50 to 1.51.
107
108It provides a new C<B::safename> function, based on the existing
109C<< B::GV->SAFENAME >>, that converts "\cOPEN" to "^OPEN".
6ab3666b 110
233a4069
JK
111=item *
112
d0ab07ee
JK
113L<B::Concise> has been upgraded from version 0.992 to 0.993.
114
5cfa0642
SH
115Internal changes to account for the fact that the defines and labels for the
116flags in the C<op_private> field of OPs are now auto-generated (see under
117L</Internal Changes>).
118
608e531f
SH
119=item *
120
65452717
FC
121L<B::Deparse> has been upgraded from version 1.27 to 1.28.
122
8435afd1
SH
123It now deparses C<our(I<LIST>)> and typed lexical (C<my Dog $spot>) correctly.
124
125=item *
126
127L<bignum> has been upgraded from version 0.37 to 0.38.
128
5cfa0642
SH
129An C<eval BLOCK> rather than an C<eval EXPR> is now used to see if we can find
130Math::BigInt::Lite.
131
8435afd1
SH
132=item *
133
134L<constant> has been upgraded from version 1.31 to 1.32.
135
136It now accepts fully-qualified constant names, allowing constants to be defined
137in packages other than the caller.
65452717
FC
138
139=item *
140
608e531f 141L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128.
74d5bfab 142
5cfa0642
SH
143Works around limitations in version::vpp detecting v-string magic and adds
144support for forthcoming L<ExtUtils::MakeMaker> bootstrap F<version.pm> for
145Perls older than 5.10.0.
146
74d5bfab 147=item *
5c31a0ca
SH
148
149L<Data::Dumper> has been upgraded from version 2.152 to 2.154.
150
5cfa0642
SH
151Fixes CVE-2014-4330 by adding a configuration variable/option to limit
152recursion when dumping deep data structures.
153
5c31a0ca 154=item *
74d5bfab 155
8435afd1
SH
156L<experimental> has been upgraded from version 0.008 to 0.010.
157
5cfa0642
SH
158Hardcodes features for Perls older than 5.15.7.
159
8435afd1
SH
160=item *
161
162L<ExtUtils::CBuilder> has been upgraded from version 0.280217 to 0.280219.
5cfa0642
SH
163
164Fixes a regression on Android.
8f5ad91b 165L<[perl #122675]|https://rt.perl.org/Ticket/Display.html?id=122675>
74d5bfab 166
d0ab07ee
JK
167=item *
168
8435afd1 169L<ExtUtils::Install> has been upgraded from version 1.68 to 2.04.
39091b75 170
5cfa0642
SH
171No changes to installed files other than version bumps.
172
39091b75
JK
173=item *
174
8435afd1 175L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.68.
5cfa0642
SH
176
177Fixes a bug with C<maniread()>'s handling of quoted filenames and improves
178C<manifind()> to follow symlinks.
8f5ad91b 179L<[perl #122415]|https://rt.perl.org/Ticket/Display.html?id=122415>
ecd53122
JK
180
181=item *
182
9eace98c
JK
183L<File::Find> has been upgraded from version 1.27 to 1.28.
184
185C<find()> and C<finddepth()> will now warn if passed inappropriate or
186misspelled options.
187
188=item *
189
190L<Getopt::Std> has been upgraded from version 1.10 to 1.11.
191
5cfa0642
SH
192Corrects a typo in the documentation.
193
9eace98c
JK
194=item *
195
8435afd1 196L<HTTP::Tiny> has been upgraded from version 0.047 to 0.049.
d0ab07ee 197
5cfa0642
SH
198C<keep_alive> is now fork-safe and thread-safe.
199
d0ab07ee
JK
200=item *
201
8435afd1 202L<IO> has been upgraded from version 1.33 to 1.34.
d0ab07ee 203
5cfa0642
SH
204The XS implementation has been fixed for the sake of older Perls.
205
d0ab07ee
JK
206=item *
207
8435afd1
SH
208L<IO::Socket::IP> has been upgraded from version 0.31 to 0.32.
209
5cfa0642
SH
210Implements Timeout for C<connect()>.
211L<[cpan #92075]|https://rt.cpan.org/Ticket/Display.html?id=92075>
212
8435afd1 213=item *
d0ab07ee 214
8435afd1 215L<Locale::Codes> has been upgraded from version 3.31 to 3.32.
316ab8c6 216
5cfa0642
SH
217New codes have been added.
218
316ab8c6
SH
219=item *
220
221L<Math::BigInt> has been upgraded from version 1.9996 to 1.9997.
8435afd1 222
5cfa0642
SH
223The documentation now gives test examples using L<Test::More> rather than
224L<Test>.
225
8435afd1
SH
226=item *
227
228L<Module::CoreList> has been upgraded from version 5.021003 to 5.20140915.
229
5cfa0642
SH
230Updated to cover the latest releases of Perl.
231
8435afd1
SH
232=item *
233
234L<overload> has been upgraded from version 1.22 to 1.23.
235
5cfa0642
SH
236A redundant C<ref $sub> check has been removed.
237
8435afd1
SH
238=item *
239
240PathTools has been upgraded from version 3.49 to 3.50.
5b319db8 241
5cfa0642
SH
242A warning from the B<gcc> compiler is now avoided when building the XS.
243
d0ab07ee
JK
244=item *
245
246L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24.
247
5cfa0642
SH
248Filehandles opened for reading or writing now have C<:encoding(UTF-8)> set.
249L<[cpan #98019]|https://rt.cpan.org/Ticket/Display.html?id=98019>
250
d0ab07ee
JK
251=item *
252
8435afd1
SH
253L<POSIX> has been upgraded from version 1.42 to 1.43.
254
5cfa0642
SH
255The C99 math functions and constants (for example acosh, isinf, isnan, round,
256trunc; M_E, M_SQRT2, M_PI) have been added.
46274848
SH
257
258=item *
259
8435afd1 260Scalar-List-Utils has been upgraded from version 1.39 to 1.41.
d0ab07ee 261
5cfa0642
SH
262A new module, L<Sub::Util>, has been added, containing functions related to
263CODE refs, including C<subname> (inspired by Sub::Identity) and C<set_subname>
264(copied and renamed from Sub::Name).
265
266The use of C<GetMagic> in C<List::Util::reduce()> has also been fixed.
267L<[cpan #63211]|https://rt.cpan.org/Ticket/Display.html?id=63211>
268
8435afd1
SH
269=item *
270
271L<Term::ReadLine> has been upgraded from version 1.14 to 1.15.
272
5cfa0642
SH
273Faster checks are now made first in some if-statements.
274
8435afd1
SH
275=item *
276
277L<Test::Harness> has been upgraded from version 3.32 to 3.33.
278
5cfa0642
SH
279Various documentation fixes.
280
8435afd1
SH
281=item *
282
283L<Test::Simple> has been upgraded from version 1.001003 to 1.001006.
bfc60ea2 284
5cfa0642
SH
285Various documentation fixes.
286
d0ab07ee
JK
287=item *
288
289L<threads> has been upgraded from version 1.95 to 1.96.
290
5cfa0642
SH
291No changes to installed files other than version bumps.
292
8435afd1
SH
293=item *
294
295L<Time::Piece> has been upgraded from version 1.27 to 1.29.
296
5cfa0642
SH
297When pretty printing negative Time::Seconds, the "minus" is no longer lost.
298
8435afd1
SH
299=item *
300
301L<version> has been upgraded from version 0.9908 to 0.9909.
302
5cfa0642
SH
303Numerous changes. See the F<Changes> file in the CPAN distribution for
304details.
305
39c4a6cf 306=back
9c97a342 307
5cfa0642
SH
308=head1 Documentation
309
310=head2 Changes to Existing Documentation
311
312=head3 L<perlfunc>
d99849ae 313
39c4a6cf 314=over 4
d99849ae 315
ff433f2d
PM
316=item *
317
5cfa0642
SH
318Calling C<delete> or C<exists> on array values is now described as "strongly
319discouraged" rather than "deprecated".
ff433f2d 320
13900f93 321=back
aac7f82f 322
5cfa0642 323=head3 L<perlpolicy>
aac7f82f 324
5cfa0642 325=over 4
6d9b7c7c 326
5cfa0642 327=item *
2a395b86 328
5cfa0642
SH
329The conditions for marking an experimental feature as non-experimental are now
330set out.
2a395b86 331
5cfa0642 332=back
2a395b86 333
5cfa0642 334=head3 L<perlrecharclass>
2a395b86 335
5cfa0642
SH
336=over 4
337
338=item *
2a395b86 339
5cfa0642
SH
340The documentation of Bracketed Character Classes has been expanded to cover the
341improvements in C<qr/[\N{named sequence}]/> (see under L</Selected Bug Fixes>).
342
343=back
39c4a6cf 344
8435afd1 345=head3 L<perlsyn>
2a395b86
PM
346
347=over 4
348
349=item *
350
5cfa0642 351An ambiguity in the documentation of the Ellipsis statement has been corrected.
8f5ad91b 352L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661>
8435afd1
SH
353
354=back
355
356=head3 L<perlxs>
357
358=over 4
2a395b86 359
12d22d1f
JK
360=item *
361
8435afd1 362Added a discussion of locale issues in XS code.
12d22d1f 363
2a395b86
PM
364=back
365
39c4a6cf 366=head1 Diagnostics
2a395b86 367
39c4a6cf
PM
368The following additions or changes have been made to diagnostic output,
369including warnings and fatal error messages. For the complete list of
370diagnostic messages, see L<perldiag>.
2a395b86 371
39c4a6cf 372=head2 New Diagnostics
0f4a583b 373
5cfa0642 374=head3 New Warnings
2a395b86
PM
375
376=over 4
377
378=item *
379
5cfa0642 380L<Character in 'C' format overflow in pack|perldiag/"Character in 'C' format overflow in pack">
2a395b86 381
5cfa0642
SH
382(W pack) You tried converting an infinity or not-a-number to an unsigned
383character, which makes no sense. Perl behaved as if you tried to pack 0xFF.
2a395b86 384
5cfa0642 385=item *
2a395b86 386
5cfa0642
SH
387L<Character in 'c' format overflow in pack|perldiag/"Character in 'c' format overflow in pack">
388
389(W pack) You tried converting an infinity or not-a-number to a signed
390character, which makes no sense. Perl behaved as if you tried to pack 0xFF.
2a395b86
PM
391
392=item *
393
5cfa0642
SH
394L<Invalid number (%f) in chr|perldiag/"Invalid number (%f) in chr">
395
396(W utf8) You passed an invalid number (like an infinity or not-a-number) to
397C<chr>. Those are not valid character numbers, so it returned the Unicode
398replacement character (U+FFFD).
2a395b86
PM
399
400=back
6d9b7c7c 401
39c4a6cf
PM
402=head2 Changes to Existing Diagnostics
403
13900f93 404=over 4
7f55cec0
SH
405
406=item *
407
5cfa0642 408L<Global symbol "%s" requires explicit package name|perldiag/"Global symbol "%s" requires explicit package name (did you forget to declare "my %s"?)">
623141a1 409
5cfa0642
SH
410This message has had '(did you forget to declare "my %s"?)' appended to it, to
411make it more helpful to new Perl programmers.
4c9184fd 412L<[perl #121638]|https://rt.perl.org/Ticket/Display.html?id=121638>
aac7f82f 413
363d3025
FC
414=item *
415
5cfa0642 416L<\N{} in character class restricted to one character in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"\N{} in inverted character class or as a range end-point is restricted to one character in regex; marked by S<<-- HERE> in m/%s/">
334464b3 417
5cfa0642
SH
418This message has had 'character class' changed to 'inverted character class or
419as a range end-point is' to reflect improvements in C<qr/[\N{named sequence}]/>
420(see under L</Selected Bug Fixes>).
334464b3
FC
421
422=item *
423
5cfa0642 424L<panic: frexp|perldiag/"panic: frexp: %f">
363d3025 425
5cfa0642
SH
426This message has had ': %f' appended to it, to show what the offending floating
427point number is.
ef5a9509 428
363d3025
FC
429=back
430
5cfa0642 431=head2 Diagnostic Removals
4594cf53 432
13900f93 433=over 4
96dcbc37
DD
434
435=item *
436
5cfa0642 437"Constant is not a FOO reference"
13900f93 438
5cfa0642
SH
439Compile-time checking of constant dereferencing (e.g., C<< my_constant->() >>)
440has been removed, since it was not taking overloading into account.
441L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456>
442L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607>
58f25ac1
MH
443
444=item *
445
5cfa0642
SH
446"Ambiguous use of -foo resolved as -&foo()"
447
448There is actually no ambiguity here, and this impedes the use of negated
449constants; e.g., C<-Inf>.
a5873648 450
39c4a6cf 451=back
a5873648 452
55ba8847
JH
453=head1 Configuration and Compilation
454
455For long doubles (to get more precision and range for floating point
456numbers) one can now use the GCC quadmath library which implements
457the quadruple precision floating point numbers in x86 and ia64 platforms.
458See INSTALL for details.
459
39c4a6cf 460=head1 Testing
a5873648 461
39c4a6cf 462=over 4
a5873648
PM
463
464=item *
465
5cfa0642
SH
466A new test script, F<op/infnan.t>, has been added to test if Inf and NaN are
467working correctly. See L</Infinity and NaN (not-a-number) handling improved>.
b3211734 468
5cfa0642 469=item *
6e97d65d 470
5cfa0642
SH
471A new test script, F<re/rt122747.t>, has been added to test that the fix for
472L<perl #122747|https://rt.perl.org/Ticket/Display.html?id=122747> is working.
7d0ccdba 473
7065301c
RS
474=back
475
476=head1 Internal Changes
477
39c4a6cf 478=over 4
c1284011 479
6d67525d
FC
480=item *
481
5cfa0642 482C<save_re_context> no longer does anything and has been moved to F<mathoms.c>.
1c43698b 483
07600c14
FC
484=item *
485
5cfa0642
SH
486C<cv_name> is a new API function that can be passed a CV or GV. It returns an
487SV containing the name of the subroutine for use in diagnostics.
8f5ad91b
SH
488L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735>
489L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
07600c14
FC
490
491=item *
492
493C<cv_set_call_checker_flags> is a new API function that works like
5cfa0642
SH
494C<cv_set_call_checker>, except that it allows the caller to specify whether the
495call checker requires a full GV for reporting the subroutine's name, or whether
496it could be passed a CV instead. Whatever value is passed will be acceptable
497to C<cv_name>. C<cv_set_call_checker> guarantees there will be a GV, but it
498may have to create one on the fly, which is inefficient.
8f5ad91b 499L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735>
07600c14
FC
500
501=item *
502
5cfa0642
SH
503C<CvGV> (which is not part of the API) is now a more complex macro, which may
504call a function and reify a GV. For those cases where is has been used as a
505boolean, C<CvHASGV> has been added, which will return true for CVs that
506notionally have GVs, but without reifying the GV. C<CvGV> also returns a GV
507now for lexical subs.
8f5ad91b 508L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
07600c14 509
8435afd1
SH
510=item *
511
5cfa0642
SH
512Added L<perlapi/sync_locale>. Changing the program's locale should be avoided
513by XS code. Nevertheless, certain non-Perl libraries called from XS, such as
514C<Gtk> do so. When this happens, Perl needs to be told that the locale has
515changed. Use this function to do so, before returning to Perl.
8435afd1 516
d72cd2eb
DM
517=item *
518
5cfa0642
SH
519The defines and labels for the flags in the C<op_private> field of OPs are now
520auto-generated from data in F<regen/op_private>. The noticeable effect of this
521is that some of the flag output of C<Concise> might differ slightly, and the
522flag output of C<perl -Dx> may differ considerably (they both use the same set
523of labels now). Also in debugging builds, there is a new assert in
524C<op_free()> that checks that the op doesn't have any unrecognized flags set in
525C<op_private>.
d72cd2eb 526
6d9b7c7c 527=back
c1284011 528
6d9b7c7c 529=head1 Selected Bug Fixes
375f5f06 530
0346c3a9 531=over 4
375f5f06 532
2884baee
MH
533=item *
534
5cfa0642
SH
535Constant dereferencing now works correctly for typeglob constants. Previously
536the glob was stringified and its name looked up. Now the glob itself is used.
8f5ad91b 537L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456>
6f1a844b 538
549ea8d4
FC
539=item *
540
541When parsing a funny character ($ @ % &) followed by braces, the parser no
5cfa0642
SH
542longer tries to guess whether it is a block or a hash constructor (causing a
543syntax error when it guesses the latter), since it can only be a block.
549ea8d4 544
be0006e0
FC
545=item *
546
5cfa0642
SH
547C<undef $reference> now frees the referent immediately, instead of hanging on
548to it until the next statement.
8f5ad91b 549L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556>
be0006e0 550
1699f5c2
FC
551=item *
552
553Various cases where the name of a sub is used (autoload, overloading, error
554messages) used to crash for lexical subs, but have been fixed.
555
7e8b2071
FC
556=item *
557
558Bareword lookup now tries to avoid vivifying packages if it turns out the
559bareword is not going to be a subroutine name.
560
f9acf899
FC
561=item *
562
5cfa0642
SH
563Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer deletes
564any subroutine named C<__ANON__> in the current package. Not only was
565C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug goes
566back to Perl 5.8.0.
f9acf899 567
fd26b6f0
FC
568=item *
569
5cfa0642
SH
570Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out constants
571of the same name declared by C<use constant>. This bug was introduced in Perl
5725.10.0.
fd26b6f0 573
499333dc
KW
574=item *
575
5cfa0642
SH
576Under some conditions a warning raised in compilation of regular expression
577patterns could be displayed multiple times. This is now fixed.
499333dc 578
8f0cd35a
KW
579=item *
580
5cfa0642
SH
581C<qr/[\N{named sequence}]/> now works properly in many instances. Some names
582known to C<\N{...}> refer to a sequence of multiple characters, instead of the
583usual single character. Bracketed character classes generally only match
584single characters, but now special handling has been added so that they can
585match named sequences, but not if the class is inverted or the sequence is
586specified as the beginning or end of a range. In these cases, the only
587behavior change from before is a slight rewording of the fatal error message
588given when this class is part of a C<?[...])> construct. When the C<[...]>
589stands alone, the same non-fatal warning as before is raised, and only the
590first character in the sequence is used, again just as before.
8f0cd35a 591
aa292ef2
FC
592=item *
593
594Tainted constants evaluated at compile time no longer cause unrelated
8f5ad91b
SH
595statements to become tainted.
596L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669>
aa292ef2 597
739e9bee
FC
598=item *
599
5cfa0642
SH
600C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0", was
601not giving the handle the right reference count, so a double free could happen.
739e9bee 602
b23b2fdb
FC
603=item *
604
5cfa0642
SH
605When deciding that a bareword was a method name, the parser would get confused
606if an "our" sub with the same name existed, and look up the method in the
607package of the "our" sub, instead of the package of the invocant.
b23b2fdb 608
7d15b1a8
FC
609=item *
610
5cfa0642
SH
611The parser no longer gets confused by C<\U=> within a double-quoted string. It
612used to produce a syntax error, but now compiles it correctly.
8f5ad91b 613L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368>
7d15b1a8 614
bbca64cf
KW
615=item *
616
5cfa0642
SH
617It has always been the intention for the C<-B> and C<-T> file test operators to
618treat UTF-8 encoded files as text. (L<perlfunc|perlfunc/-X FILEHANDLE> has
619been updated to say this.) Previously, it was possible for some files to be
620considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The
621operators now work on EBCDIC platforms as well.
bbca64cf 622
0064f8cc
KW
623=item *
624
5cfa0642
SH
625Under some conditions warning messages raised during regular expression pattern
626compilation were being output more than once. This has now been fixed.
0064f8cc 627
6ff8f256
KW
628=item *
629
5cfa0642
SH
630A regression has been fixed that was introduced in Perl 5.20.0 (fixed in Perl
6315.20.1 as well as here) in which a UTF-8 encoded regular expression pattern
632that contains a single ASCII lowercase letter does not match its uppercase
633counterpart.
8f5ad91b 634L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655>
6ff8f256 635
80cc3290
FC
636=item *
637
5cfa0642
SH
638Constant folding could incorrectly suppress warnings if lexical warnings (C<use
639warnings> or C<no warnings>) were not in effect and C<$^W> were false at
640compile time and true at run time.
80cc3290 641
13dd5671
FC
642=item *
643
644Loading UTF8 tables during a regular expression match could cause assertion
645failures under debugging builds if the previous match used the very same
8f5ad91b
SH
646regular expression.
647L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747>
13dd5671 648
bdab7676
FC
649=item *
650
651Thread cloning used to work incorrectly for lexical subs, possibly causing
652crashes or double frees on exit.
653
3a085d00
FC
654=item *
655
5cfa0642
SH
656Since Perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining an
657anonymous subroutine could corrupt things internally, resulting in
658L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data. This has been
659fixed.
3a085d00 660
caa66803
FC
661=item *
662
5cfa0642
SH
663C<(caller $n)[3]> now reports names of lexical subs, instead of treating them
664as "(unknown)".
caa66803 665
91766151
FC
666=item *
667
668C<sort subname LIST> now supports lexical subs for the comparison routine.
669
dd593f1d
FC
670=item *
671
5cfa0642
SH
672Aliasing (e.g., via C<*x = *y>) could confuse list assignments that mention the
673two names for the same variable on either side, causing wrong values to be
674assigned.
4c9184fd 675L<[perl #15667]|https://rt.perl.org/Ticket/Display.html?id=15667>
dd593f1d 676
fb3b7425
FC
677=item *
678
5cfa0642
SH
679Long here-doc terminators could cause a bad read on short lines of input. This
680has been fixed. It is doubtful that any crash could have occurred. This bug
681goes back to when here-docs were introduced in Perl 3.000 twenty-five years
682ago.
fb3b7425 683
b245455d
SH
684=item *
685
686An optimization in C<split> to treat C<split/^/> like C<split/^/m> had the
687unfortunate side-effect of also treating C<split/\A/> like C<split/^/m>, which
688it should not. This has been fixed. (Note, however, that C<split/^x/> does
689not behave like C<split/^x/m>, which is also considered to be a bug and will be
690fixed in a future version.)
691L<[perl #122761]|https://rt.perl.org/Ticket/Display.html?id=122761>
692
26dd5fd6
PM
693=item *
694
5cfa0642
SH
695The little-known C<my Class $var> syntax (see L<fields> and L<attributes>)
696could get confused in the scope of C<use utf8> if C<Class> were a constant
697whose value contained Latin-1 characters.
ff433f2d 698
39c4a6cf
PM
699=back
700
39c4a6cf 701=head1 Acknowledgements
ff433f2d 702
39c4a6cf 703XXX Generate this with:
e831f11a 704
39c4a6cf 705 perl Porting/acknowledgements.pl v5.21.3..HEAD
f5b73711 706
44691e6f
AB
707=head1 Reporting Bugs
708
e08634c5
SH
709If you find what you think is a bug, you might check the articles recently
710posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 711https://rt.perl.org/ . There may also be information at
7ef8b31d 712http://www.perl.org/ , the Perl Home Page.
44691e6f 713
e08634c5
SH
714If you believe you have an unreported bug, please run the L<perlbug> program
715included with your release. Be sure to trim your bug down to a tiny but
716sufficient test case. Your bug report, along with the output of C<perl -V>,
717will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
718
719If the bug you are reporting has security implications, which make it
e08634c5
SH
720inappropriate to send to a publicly archived mailing list, then please send it
721to perl5-security-report@perl.org. This points to a closed subscription
722unarchived mailing list, which includes all the core committers, who will be
723able to help assess the impact of issues, figure out a resolution, and help
f9001595 724co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
725platforms on which Perl is supported. Please only use this address for
726security issues in the Perl core, not for modules independently distributed on
727CPAN.
44691e6f
AB
728
729=head1 SEE ALSO
730
e08634c5
SH
731The F<Changes> file for an explanation of how to view exhaustive details on
732what changed.
44691e6f
AB
733
734The F<INSTALL> file for how to build Perl.
735
736The F<README> file for general stuff.
737
738The F<Artistic> and F<Copying> files for copyright information.
739
740=cut