This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add new release to perlhist
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
7065301c 5perldelta - what is new for perl v5.21.1
c68523cb 6
238894db 7=head1 DESCRIPTION
c68523cb 8
7065301c 9This document describes differences between the 5.21.0 release and the 5.21.1
238894db 10release.
c68523cb 11
7065301c
RS
12If you are upgrading from an earlier release such as 5.20.0, first read
13L<perl5210delta>, which describes differences between 5.20.0 and 5.21.0.
14
15=head1 Notice
16
081463c3
MH
17This release removes a number of previously deprecated constructs, many
18that have been around for a long time. Please see L</"Incompatible Changes">
19for more information.
7065301c
RS
20
21=head1 Core Enhancements
22
09edd811
KW
23=head2 Unicode 7.0 is now supported
24
25For details on what is in this release, see
26L<http://www.unicode.org/versions/Unicode7.0.0/>.
27
7e957246
MH
28=head2 Experimental C Backtrace API
29
30Starting from Perl 5.21.1, on some platforms Perl supports retrieving
31the C level backtrace (similar to what symbolic debuggers like gdb do).
32
33The backtrace returns the stack trace of the C call frames,
34with the symbol names (function names), the object names (like "perl"),
35and if it can, also the source code locations (file:line).
36
37The supported platforms are Linux and OS X (some *BSD might work at
38least partly, but they have not yet been tested).
39
40The feature needs to be enabled with C<Configure -Dusecbacktrace>.
41
42Also included is a C API to retrieve backtraces.
43
44See L<perlhacktips/"C backtrace"> for more information.
45
8373491a
KW
46=head2 C<qr/foo/x> now ignores any Unicode pattern white space
47
48The C</x> regular expression modifier allows the pattern to contain
49white space and comments, both of which are ignored, for improved
50readability. Until now, not all the white space characters that Unicode
51designates for this purpose were handled. The additional ones now
52recognized are
53U+0085 NEXT LINE,
54U+200E LEFT-TO-RIGHT MARK,
55U+200F RIGHT-TO-LEFT MARK,
56U+2028 LINE SEPARATOR,
57and
58U+2029 PARAGRAPH SEPARATOR.
59
d6ded950
KW
60=head2 S<C<use locale>> can restrict which locale categories are affected
61
62It is now possible to pass a parameter to S<C<use locale>> to specify
63a subset of locale categories to be locale-aware, with the remaining
64ones unaffected. See L<perllocale/The "use locale" pragma> for details.
65
7065301c
RS
66=head1 Incompatible Changes
67
98b7895c
MH
68=head2 C<\N{}> with a sequence of multiple spaces is now a fatal error.
69
70This has been deprecated since v5.18.
71
7357bd17
KW
72=head2 In double-quotish C<\cI<X>>, I<X> must now be a printable ASCII character
73
74In prior releases, failure to do this raised a deprecation warning.
7065301c 75
cd209d9d
KW
76=head2 Splitting the tokens C<(?> and C<(*> in regular expressions is
77now a fatal compilation error.
78
79These had been deprecated since v5.18.
80
8373491a
KW
81=head2 5 additional characters are treated as white space under C</x> in
82regex patterns (unless escaped)
83
84The use of these characters with C</x> outside bracketed character
2fc36bac
MH
85classes and when not preceded by a backslash has raised a deprecation
86warning since v5.18. Now they will be ignored. See L</"qr/foo/x">
8373491a
KW
87for the list of the five characters.
88
89=head2 Comment lines within S<C<(?[ ])>> now are ended only by a C<\n>
90
91S<C<(?[ ])>> is an experimental feature, introduced in v5.18. It operates
92as if C</x> is always enabled. But there was a difference, comment
93lines (following a C<#> character) were terminated by anything matching
94C<\R> which includes all vertical whitespace, such as form feeds. For
95consistency, this is now changed to match what terminates comment lines
96outside S<C<(?[ ])>>, namely a C<\n> (even if escaped), which is the
97same as what terminates a heredoc string and formats.
98
b5adc3e5
DIM
99=head2 Omitting % and @ on hash and array names is no longer permitted
100
101Really old Perl let you omit the @ on array names and the % on hash
102names in some spots. This has issued a deprecation warning since Perl
1035.0, and is no longer permitted.
104
2c6ee1a7
KW
105=head2 C<"$!"> text is now in English outside C<"use locale"> scope
106
107Previously, the text, unlike almost everything else, always came out
108based on the current underlying locale of the program. (Also affected
109on some systems is C<"$^E>".) For programs that are unprepared to
110handle locale, this can cause garbage text to be displayed. It's better
111to display text that is translatable via some tool than garbage text
112which is much harder to figure out.
113
5320b60d
KW
114=head2 C<"$!"> text will be returned in UTF-8 when appropriate
115
116The stringification of C<$!> and C<$^E> will have the UTF-8 flag set
117when the text is actually non-ASCII UTF-8. This will enable programs
118that are set up to be locale-aware to properly output messages in the
119user's native language. Code that needs to continue the 5.20 and
120earlier behavior can do the stringification within the scopes of both
121'use bytes' and 'use locale ":messages". No other Perl operations will
122be affected by locale; only C<$!> and C<$^E> stringification. The
123'bytes' pragma causes the UTF-8 flag to not be set, just as in previous
124Perl releases. This resolves [perl #112208].
125
c3383756
DIM
126=head2 Support for C<?PATTERN?> without explicit operator has been removed
127
128Starting regular expressions matching only once directly with the
129question mark delimiter is now a syntax error, so that the question mark
130can be available for use in new operators. Write C<m?PATTERN?> instead,
131explicitly using the C<m> operator: the question mark delimiter still
132invokes match-once behaviour.
133
36304e49
KW
134=head2 C<defined(@array)> and C<defined(%hash)> are now fatal errors
135
136These have been deprecated since v5.6.1 and have raised deprecation
137warnings since v5.16.
138
139=head2 Using a hash or an array as a reference are now fatal errors.
140
141For example, C<%foo-E<gt>{"bar"}> now causes a fatal compilation
142error. These have been deprecated since before v5.8, and have raised
143deprecation warnings since then.
144
7065301c
RS
145=head1 Deprecations
146
df758df2
KW
147=head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now
148deprecated
149
150This non-graphic character is essentially indistinguishable from a
151regular space, and so should not be allowed. See
152L<charnames/CUSTOM ALIASES>.
153
412f55bb
KW
154=head2 A literal C<"{"> should now be escaped in a pattern
155
156If you want a literal left curly bracket (also called a left brace) in a
157regular expression pattern, you should now escape it by either
158preceding it with a backslash (C<"\{">) or enclosing it within square
159brackets C<"[{]">, or by using C<\Q>; otherwise a deprecation warning
160will be raised. This was first announced as forthcoming in the v5.16
161release; it will allow future extensions to the language to happen.
162
7065301c
RS
163=head1 Performance Enhancements
164
7065301c
RS
165=over 4
166
167=item *
168
8a16341a
MH
169Many internal functions have been refactored to improve performance and reduce
170their memory footprints.
d133a3dd
MH
171
172L<[perl #121436]|https://rt.perl.org/Ticket/Display.html?id=121436>
8a16341a
MH
173L<[perl #121906]|https://rt.perl.org/Ticket/Display.html?id=121906>
174L<[perl #121969]|https://rt.perl.org/Ticket/Display.html?id=121969>
7065301c 175
6bb82be0
MH
176=item *
177
178C<-T> and C<-B> filetests will return sooner when an empty file is detected.
179
180L<perl #121489|https://rt.perl.org/Ticket/Display.html?id=121489>
181
7065301c
RS
182=back
183
7ef8b31d 184=head1 Modules and Pragmata
f6f3144e 185
2fc36bac 186=head2 Updated Modules and Pragmata
7065301c 187
2fc36bac 188=over 4
7065301c 189
2fc36bac 190=item *
24a38d90 191
2fc36bac
MH
192The libnet collection of modules has been upgraded from version 1.25 to 1.27.
193
194There are only whitespace changes to the installed files.
24a38d90
RS
195
196=item *
197
2fc36bac
MH
198A mismatch between the documentation and the code in utf8::downgrade()
199was fixed in favour of the documentation. The optional second argument
200is now correctly treated as a perl boolean (true/false semantics) and
201not as an integer.
7065301c 202
2fc36bac 203=item *
7065301c 204
2fc36bac 205The Locale-Codes collection of modules has been upgraded from version 3.30 to 3.31.
7065301c 206
2fc36bac
MH
207Fixed a bug in the scripts used to extract data from spreadsheets that
208prevented the SHP currency code from being found.
209L<[cpan #94229]|https://rt.cpan.org/Ticket/Display.html?id=94229>
210
211=item *
212
213L<Archive::Tar> has been upgraded from version 1.96 to 2.00.
214
215=item *
216
217L<autodie> has been upgraded from version 2.23 to 2.25.
218
219=item *
220
221L<B> has been upgraded from version 1.48 to 1.49.
222
223=item *
224
225L<B::Deparse> has been upgraded from version 1.26 to 1.27.
24a38d90
RS
226
227=item *
228
2fc36bac 229L<Benchmark> has been upgraded from version 1.18 to 1.19.
04c0d500
MH
230
231=item *
232
56cdf413
TC
233L<Carp> has been upgraded from version 1.3301 to 1.34.
234
235Carp::Heavy now ignores version mismatches with Carp if Carp is newer
236than 1.12, since Carp::Heavy's guts were merged into Carp at that
237point.
238L<[perl #121574]|https://rt.perl.org/Ticket/Display.html?id=121574>
239
240=item *
241
2fc36bac
MH
242L<charnames> has been upgraded from version 1.40 to 1.41.
243
244=item *
245
246L<CPAN::Meta> has been upgraded from version 2.140640 to 2.141520.
247
248=item *
249
f9dc9a54
TC
250L<Data::Dumper> has been upgraded from version 2.151 to 2.152.
251
252Changes to resolve Coverity issues.
253
254XS dumps incorrectly stored the name of code references stored in a
255GLOB.
256L<[perl #122070]|https://rt.perl.org/Ticket/Display.html?id=122070>
257
258=item *
259
2fc36bac
MH
260L<Devel::Peek> has been upgraded from version 1.16 to 1.17.
261
262=item *
263
264L<Devel::PPPort> has been upgraded from version 3.21 to 3.24.
265
266=item *
267
268L<Digest::SHA> has been upgraded from version 5.88 to 5.92.
269
270=item *
271
272L<DynaLoader> has been upgraded from version 1.25 to 1.26.
273
274=item *
275
276L<Encode> has been upgraded from version 2.60 to 2.62.
28e02325
SH
277
278B<piconv> now has better error handling when the encoding name is nonexistent,
279and a build breakage when upgrading L<Encode> in perl-5.8.2 and earlier has
280been fixed.
281
282=item *
283
2fc36bac
MH
284L<Errno> has been upgraded from version 1.20_03 to 1.20_04.
285
286=item *
287
288L<Exporter> has been upgraded from version 5.70 to 5.71.
289
290=item *
291
292L<ExtUtils::Install> has been upgraded from version 1.67 to 1.68.
293
294=item *
295
296L<ExtUtils::Miniperl> has been upgraded from version 1.01 to 1.02.
297
298=item *
299
300L<ExtUtils::ParseXS> has been upgraded from version 3.24 to 3.25.
301
302=item *
303
304L<ExtUtils::Typemaps> has been upgraded from version 3.24 to 3.25.
305
306=item *
307
308L<File::Spec> has been upgraded from version 3.47 to 3.48.
309
310=item *
311
cb526893
TC
312L<Hash::Util> has been upgraded from version 0.16 to 0.17.
313
314Minor bug fixes and documentation fixes to Hash::Util::hash_stats()
315
316=item *
317
2fc36bac 318L<IO> has been upgraded from version 1.31 to 1.32.
5abafd4c 319
2fc36bac
MH
320=item *
321
322L<List::Util> has been upgraded from version 1.38 to 1.39.
5abafd4c
SH
323
324=item *
325
2fc36bac 326L<locale> has been upgraded from version 1.03 to 1.04.
7a945bf5 327
2fc36bac
MH
328=item *
329
330L<Locale::Codes> has been upgraded from version 3.30 to 3.31.
7a945bf5
SH
331
332=item *
333
2fc36bac 334L<Math::BigInt> has been upgraded from version 1.9993 to 1.9995.
4ed8f5ed
TC
335
336Synchronize POD changes from the CPAN release.
337
ee15bb65
TC
338C<< Math::BigFloat->blog(x) >> would sometimes return blog(2*x) when
339the accuracy was greater than 70 digits.
340
341The result of C<< Math::BigFloat->bdiv() >> in list context now
342satisfies C<< x = quotient * divisor + remainder >>.
343
4ed8f5ed
TC
344=item *
345
2fc36bac 346L<Math::BigRat> has been upgraded from version 0.2606 to 0.2608.
234105dd
TC
347
348Synchronize POD changes from the CPAN release.
349
350=item *
351
2fc36bac
MH
352L<Module::CoreList> has been upgraded from version 5.021001 to 5.021001_01.
353
354=item *
355
356L<Module::Metadata> has been upgraded from version 1.000019 to 1.000024.
b9beed70
SH
357
358Support installations on older perls with an L<ExtUtils::MakeMaker> earlier
359than 6.63_03
360
361=item *
362
2fc36bac
MH
363L<NDBM_File> has been upgraded from version 1.12 to 1.13.
364
365=item *
366
f9dc9a54
TC
367L<OS2::Process> has been upgraded from version 1.09 to 1.10.
368
369=item *
370
c13fd1a2
TC
371L<perl5db.pl> has been upgraded from version 1.44 to 1.45.
372
373fork() in the debugger under C<tmux> will now create a new window for
891822fa
TC
374the forked process. L<[perl
375#121333]|https://rt.perl.org/Ticket/Display.html?id=121333>
376
377The debugger now saves the current working directory on startup and
2fc36bac 378restores it when you restart your program with C<R> or C<rerun>. L<[perl
891822fa 379#121509]|https://rt.perl.org/Ticket/Display.html?id=121509>
24a38d90 380
cb526893
TC
381=item *
382
f9dc9a54
TC
383L<PerlIO::encoding> has been upgraded from version 0.18 to 0.19.
384
385No changes in behaviour.
386
387=item *
388
2fc36bac 389L<PerlIO::mmap> has been upgraded from version 0.011 to 0.013.
f9dc9a54
TC
390
391No changes in behaviour.
392
393=item *
394
395L<PerlIO::scalar> has been upgraded from version 0.18 to 0.19.
396
397No changes in behaviour.
398
399=item *
400
2fc36bac
MH
401L<PerlIO::via> has been upgraded from version 0.14 to 0.15.
402
403=item *
404
405L<Pod::Html> has been upgraded from version 1.21 to 1.22.
406
407=item *
408
409L<POSIX> has been upgraded from version 1.38_03 to 1.40.
410
411=item *
412
413L<Scalar::Util> has been upgraded from version 1.38 to 1.39.
414
415=item *
416
417L<SelfLoader> has been upgraded from version 1.21 to 1.22.
418
419=item *
420
421L<Socket> has been upgraded from version 2.013 to 2.014.
422
423=item *
424
425L<Storable> has been upgraded from version 2.49 to 2.51.
426
427=item *
428
429L<Term::ANSIColor> has been upgraded from version 4.02 to 4.03.
430
431=item *
432
433L<Test::Harness> has been upgraded from version 3.30 to 3.32.
434
435=item *
436
437L<Test::Simple> has been upgraded from version 1.001002 to 1.001003.
438
439=item *
440
441L<threads> has been upgraded from version 1.93 to 1.94.
442
443=item *
444
445L<Tie::File> has been upgraded from version 1.00 to 1.01.
446
447=item *
448
f8187d97
SH
449L<Unicode::Collate> has been upgraded from version 1.04 to 1.07.
450
451Version 0.67's improved discontiguous contractions is invalidated by default
452and is supported as a parameter 'long_contraction'.
453
95f3e8d2
SH
454=item *
455
456L<Unicode::Normalize> has been upgraded from version 1.17 to 1.18.
457
458The XSUB implementation has been removed in favour of pure Perl.
459
3eaa3d14
YO
460=item *
461
2fc36bac 462L<Unicode::UCD> has been upgraded from version 0.57 to 0.58.
24a38d90 463
2fc36bac 464=item *
24a38d90 465
2fc36bac 466L<utf8> has been upgraded from version 1.13 to 1.14.
24a38d90
RS
467
468=item *
469
2fc36bac 470L<warnings> has been upgraded from version 1.23 to 1.24.
7065301c
RS
471
472=back
473
474=head1 Documentation
475
7065301c
RS
476=head2 Changes to Existing Documentation
477
9c0f2733 478=head3 L<perlfunc>
7065301c
RS
479
480=over 4
481
482=item *
483
9c0f2733
MH
484C<-l> now notes that it will return false if symlinks aren't supported by the
485file system.
486
487L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
7065301c 488
902c1f75
MH
489=item *
490
491Note that C<exec LIST> and C<system LIST> may fall back to the shell on
492Win32. Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object
493syntax will reliably avoid using the shell.
494
495This has also been noted in L<perlport>.
496
497L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046>
498
7065301c
RS
499=back
500
58f25ac1
MH
501=head3 L<perlapi>
502
503=over 4
504
505=item *
506
2402c6dd
MH
507Note that C<SvSetSV> doesn't do set magic.
508
509=item *
510
58f25ac1
MH
511C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
512C<malloc>.
513
514L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869>
515
4c6609d3
MH
516=item *
517
518Clarify where C<NUL> may be embedded or is required to terminate a string.
519
5bafdaa4
MH
520=item *
521
522Previously missing documentation due to formatting errors are now included.
523
524=item *
525
526Entries are now organized into groups rather than by file where they are found.
527
528=item *
529
530Alphabetical sorting of entries is now handled by the POD generator to make
531entries easier to find when scanning.
532
58f25ac1
MH
533=back
534
12042f24
MH
535=head3 L<perlhacktips>
536
537=over 4
538
539=item *
540
541Updated documentation for the C<test.valgrind> C<make> target.
542
543L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
544
545=back
546
2705070b
MH
547=head3 L<perlre>
548
549=over 4
550
551=item *
552
553The C</x> modifier has been clarified to note that comments cannot be continued
554onto the next line by escaping them.
555
556=back
557
b10906fb
MH
558=head3 L<Unicode::UCD>
559
560=over 4
561
562=item *
563
564The documentation includes many clarifications and fixes.
565
566=back
567
7065301c
RS
568=head1 Diagnostics
569
570The following additions or changes have been made to diagnostic output,
571including warnings and fatal error messages. For the complete list of
572diagnostic messages, see L<perldiag>.
573
7065301c
RS
574=head2 New Diagnostics
575
7065301c
RS
576=head3 New Errors
577
578=over 4
24a38d90
RS
579
580=item *
581
28462159
MH
582L<In '(?...)', the '(' and '?' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/">
583
584(F) The two-character sequence C<"(?"> in
585this context in a regular expression pattern should be an
586indivisible token, with nothing intervening between the C<"(">
587and the C<"?">, but you separated them.
588
589=item *
590
591L<In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/">
592
593(F) The two-character sequence C<"(*"> in
594this context in a regular expression pattern should be an
595indivisible token, with nothing intervening between the C<"(">
596and the C<"*">, but you separated them.
597
598=item *
599
600L<charnames alias definitions may not contain a sequence of multiple spaces|perldiag/"charnames alias definitions may not contain a sequence of multiple spaces">
601
602(F) You defined a character name which had multiple space
603 characters in a row. Change them to single spaces. Usually these
604 names are defined in the C<:alias> import argument to C<use charnames>, but
605 they could be defined by a translator installed into C<$^H{charnames}>.
606 See L<charnames/CUSTOM ALIASES>.
607
608=item *
609
610L<charnames alias definitions may not contain trailing white-space|perldiag/"charnames alias definitions may not contain trailing white-space">
611
612(F) You defined a character name which ended in a space
613character. Remove the trailing space(s). Usually these names are
614defined in the C<:alias> import argument to C<use charnames>, but they
615could be defined by a translator installed into C<$^H{charnames}>.
616See L<charnames/CUSTOM ALIASES>.
617
618=item *
619
620L<Can't use a hash as a reference|perldiag/"Can't use a hash as a reference">
621
622(F) You tried to use a hash as a reference, as in
2fc36bac 623C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl E<lt>= 5.6.1
28462159
MH
624used to allow this syntax, but shouldn't have.
625
626=item *
627
628L<Can't use an array as a reference|perldiag/"Can't use an array as a reference">
629
630(F) You tried to use an array as a reference, as in
2fc36bac 631C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl E<lt>= 5.6.1 used to
28462159
MH
632allow this syntax, but shouldn't have.
633
634=item *
635
636L<Can't use 'defined(@array)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(@array)' (Maybe you should just omit the defined()?)">
637
638(F) defined() is not useful on arrays because it
639checks for an undefined I<scalar> value. If you want to see if the
640array is empty, just use C<if (@array) { # not empty }> for example.
641
642=item *
643
644L<Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)">
645
646(F) C<defined()> is not usually right on hashes.
647
648Although C<defined %hash> is false on a plain not-yet-used hash, it
649becomes true in several non-obvious circumstances, including iterators,
650weak references, stash names, even remaining true after C<undef %hash>.
651These things make C<defined %hash> fairly useless in practice, so it now
652generates a fatal error.
653
654If a check for non-empty is what you wanted then just put it in boolean
655context (see L<perldata/Scalar values>):
656
657 if (%hash) {
658 # not empty
659 }
660
661If you had C<defined %Foo::Bar::QUUX> to check whether such a package
662variable exists then that's never really been reliable, and isn't
663a good way to enquire about the features of a package, or whether
664it's loaded, etc.
665
666=item *
667
668L<Illegal suidscript|perldiag/"Illegal suidscript">
669
670(F) The script run under suidperl was somehow illegal.
7065301c
RS
671
672=back
673
674=head3 New Warnings
675
676=over 4
24a38d90
RS
677
678=item *
679
28462159
MH
680L<Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/">
681
682(D deprecated, regexp) You used a literal C<"{"> character in a regular
683expression pattern. You should change to use C<"\{"> instead, because a future
684version of Perl (tentatively v5.26) will consider this to be a syntax error. If
685the pattern delimiters are also braces, any matching right brace
686(C<"}">) should also be escaped to avoid confusing the parser, for
687example,
688
689 qr{abc\{def\}ghi}
690
691=item *
692
693L<NO-BREAK SPACE in a charnames alias definition is deprecated|perldiag/"NO-BREAK SPACE in a charnames alias definition is deprecated">
694
695(D deprecated) You defined a character name which contained a no-break
696space character. Change it to a regular space. Usually these names are
697defined in the C<:alias> import argument to C<use charnames>, but they
698could be defined by a translator installed into C<$^H{charnames}>. See
699L<charnames/CUSTOM ALIASES>.
700
701=item *
702
703L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">
704
705(S experimental::win32_perlio) The C<:win32> PerlIO layer is
706experimental. If you want to take the risk of using this layer,
707simply disable this warning:
708
709 no warnings "experimental::win32_perlio";
710
711=item *
712
713L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing">
714
715(W numeric) You tried to execute the
716L<C<x>|perlop/Multiplicative Operators> repetition operator fewer than 0
717times, which doesn't make sense.
718
719=item *
720
721L<localtime(%f) failed|perldiag/"localtime(%f) failed">
722
723(W overflow) You called C<localtime> with a number that it could not handle:
724too large, too small, or NaN. The returned value is C<undef>.
725
726=item *
727
728L<gmtime(%f) failed|perldiag/"gmtime(%f) failed">
729
730(W overflow) You called C<gmtime> with a number that it could not handle:
731too large, too small, or NaN. The returned value is C<undef>.
732
733=item *
734
097675bf
TC
735L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">:
736
737(S experimental::win32_perlio) The C<:win32> PerlIO layer is
738experimental. If you want to take the risk of using this layer,
739simply disable this warning:
740
741 no warnings "experimental::win32_perlio";
24a38d90 742
28462159 743=item *
b3211734 744
2fc36bac 745L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing">
b3211734
KW
746
747(W numeric) This warns when the repeat count of the
748L<C<x>|perlop/Multiplicative Operators> repetition operator is
749negative.
750
751This warning may be changed or removed if it turn out that it was
752unwise to have added it.
753
238894db 754=back
24a38d90 755
7065301c 756=head2 Changes to Existing Diagnostics
24a38d90 757
7065301c
RS
758=over 4
759
760=item *
761
b08d439a
MH
762L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/">
763
764Information about Unicode behaviour has been added.
765
766=item *
767
747b6130
MH
768<> should be quotes
769
770This warning has been changed to
771L<< <> at require-statement should be quotes|perldiag/"<> at require-statement should be quotes" >>
772to make the issue more identifiable.
773
774=item *
775
723edb96
TC
776L<Unsuccessful %s on filename containing newline|perldiag/"Unsuccessful %s on filename containing newline">
777
778This warning is now only produced when the newline is at the end of
779the filename.
7065301c
RS
780
781=back
782
783=head1 Utility Changes
784
eb561242 785=head2 F<x2p/>
7065301c
RS
786
787=over 4
788
789=item *
24a38d90 790
eb561242
MH
791The F<x2p/> directory has been removed from the Perl core.
792
793This removes find2perl, s2p and a2p. They have all been released to CPAN as
794separate distributions (App::find2perl, App::s2p, App::a2p).
7065301c
RS
795
796=back
797
798=head1 Configuration and Compilation
799
7065301c
RS
800=over 4
801
802=item *
803
12042f24
MH
804C<make test.valgrind> now supports parallel testing.
805
806For example:
807
808 TEST_JOBS=9 make test.valgrind
809
810See L<perlhacktips/valgrind> for more information.
811
812L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
7065301c 813
b2e61987
KW
814=item *
815
816The MAD (Misc Attribute Decoration) build option has been removed
817
818This was an unmaintained attempt at preserving
819the Perl parse tree more faithfully so that automatic conversion of
820Perl 5 to Perl 6 would have been easier.
821
822This build-time configuration option had been unmaintained for years,
823and had probably seriously diverged on both Perl 5 and Perl 6 sides.
824
7065301c
RS
825=back
826
7065301c
RS
827=head1 Platform Support
828
7065301c
RS
829=head2 Discontinued Platforms
830
7065301c
RS
831=over 4
832
f05550c0 833=item NeXTSTEP/OPENSTEP
7065301c 834
f05550c0
BF
835NeXTSTEP was proprietary OS bundled with NeXT's workstations in the early
836to mid 90's; OPENSTEP was an API specification that provided a NeXTSTEP-like
837environment on a non-NeXTSTEP system. Both are now long dead, so support
838for building Perl on them has been removed.
7065301c
RS
839
840=back
841
842=head2 Platform-Specific Notes
843
7065301c
RS
844=over 4
845
7d0ccdba
MH
846=item OpenBSD
847
848On OpenBSD, Perl will now default to using the system C<malloc> due to the
849security features it provides. Perl's own malloc wrapper has been in use
850since v5.14 due to performance reasons, but the OpenBSD project believes
851the tradeoff is worth it and would prefer that users who need the speed
852specifically ask for it.
853
854L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>.
855
7065301c
RS
856=back
857
858=head1 Internal Changes
859
7065301c
RS
860=over 4
861
862=item *
863
8dab3ba5 864The deprecated variable C<PL_sv_objcount> has been removed.
7065301c 865
4c28b29c
KW
866=item *
867
868Perl now tries to keep the locale category C<LC_NUMERIC> set to "C"
869except around operations that need it to be set to the program's
870underlying locale. This protects the many XS modules that cannot cope
871with the decimal radix character not being a dot. Prior to this
872release, Perl initialized this category to "C", but a call to
873C<POSIX::setlocale()> would change it. Now such a call will change the
874underlying locale of the C<LC_NUMERIC> category for the program, but the
875locale exposed to XS code will remain "C". There is an API under
876development for those relatively few modules that need to use the
877underlying locale. This API will be nailed down during the course of
878developing v5.21. Send email to L<mailto:perl5-porters@perl.org> for
879guidance.
880
c9fcb674
KW
881=item *
882
883A new macro L<C<isUTF8_CHAR>|perlapi/isUTF8_CHAR> has been written which
884efficiently determines if the string given by its parameters begins
885with a well-formed UTF-8 encoded character.
886
7065301c
RS
887=back
888
889=head1 Selected Bug Fixes
890
7065301c
RS
891=over 4
892
893=item *
894
30536d4a
TC
895index() and rindex() no longer crash when used on strings over 2GB in
896size.
897L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>.
7065301c 898
0c2c57a8
DD
899=item *
900
901A small previously intentional memory leak in PERL_SYS_INIT/PERL_SYS_INIT3 on
902Win32 builds was fixed. This might affect embedders who repeatedly create and
903destroy perl engines within the same process.
904
a835cd47
KW
905=item *
906
907C<POSIX::localeconv()> now returns the data for the program's underlying
908locale even when called from outside the scope of S<C<use locale>>.
909
03ceeedf
KW
910=item *
911
912C<POSIX::localeconv()> now works properly on platforms which don't have
913C<LC_NUMERIC> and/or C<LC_MONETARY>, or for which Perl has been compiled
914to disregard either or both of these locale categories. In such
915circumstances, there are now no entries for the corresponding values in
916the hash returned by C<localeconv()>.
917
c1284011
KW
918=item *
919
920C<POSIX::localeconv()> now marks appropriately the values it returns as
921UTF-8 or not. Previously they were always returned as a bytes, even if
922they were supposed to be encoded as UTF-8.
923
375f5f06
KW
924=item *
925
926On Microsoft Windows, within the scope of C<S<use locale>>, the following
927POSIX character classes gave results for many locales that did not
928conform to the POSIX standard:
929C<[[:alnum:]]>,
930C<[[:alpha:]]>,
931C<[[:blank:]]>,
932C<[[:digit:]]>,
933C<[[:graph:]]>,
934C<[[:lower:]]>,
935C<[[:print:]]>,
936C<[[:punct:]]>,
937C<[[:upper:]]>,
938C<[[:word:]]>,
939and
940C<[[:xdigit:]]>.
941These are because the underlying Microsoft implementation does not
942follow the standard. Perl now takes special precautions to correct for
943this.
944
2884baee
MH
945=item *
946
947Many issues have been detected by L<Coverity|http://www.coverity.com/> and
948fixed.
949
5af51eb4
BF
950=item *
951
952system() and friends should now work properly on more Android builds.
953
954Due to an oversight, the value specified through -Dtargetsh to Configure
955would end up being ignored by some of the build process. This caused perls
956cross-compiled for Android to end up with defective versions of system(),
957exec() and backticks: the commands would end up looking for C</bin/sh>
958instead of C</system/bin/sh>, and so would fail for the vast majority
959of devices, leaving C<$!> as C<ENOENT>.
960
412f55bb
KW
961=item *
962
963C<qr(...\(...\)...)>,
964C<qr[...\[...\]...]>,
965and
966C<qr{...\{...\}...}>
967now work. Previously it was impossible to escape these three
968left-characters with a backslash within a regular expression pattern
969where otherwise they would be considered metacharacters, and the pattern
970opening delimiter was the character, and the closing delimiter was its
971mirror character.
972
7065301c
RS
973=back
974
7065301c 975=head1 Acknowledgements
24a38d90 976
bae620e0
MH
977Perl 5.21.1 represents approximately 3 weeks of development since Perl 5.21.0
978and contains approximately 240,000 lines of changes across 680 files from 37
979authors.
980
981Excluding auto-generated files, documentation and release tools, there were
982approximately 150,000 lines of changes to 420 .pm, .t, .c and .h files.
983
984Perl continues to flourish into its third decade thanks to a vibrant community
985of users and developers. The following people are known to have contributed the
986improvements that became Perl 5.21.1:
987
988Alex Solovey, Andrew Fresh, Andy Dougherty, Brian Fraser, Chris 'BinGOs'
989Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, Darin
990McBride, David Mitchell, Doug Bell, H.Merijn Brand, James E Keenan, Jarkko
991Hietaniemi, kafka, Karen Etheridge, Karl Williamson, Leon Timmermans, Matthew
992Horsfall, Michael Bunk, Nicholas Clark, Niels Thykier, Norman Koch, Peter John
993Acklam, Pierre Bogossian, Reini Urban, Ricardo Signes, Rob Hoelz, Shlomi Fish,
994Smylers, Steffen Müller, Steve Hay, Sullivan Beck, Thomas Sibley, Todd
995Rinaldo, Tony Cook, Yves Orton.
996
997The list above is almost certainly incomplete as it is automatically generated
998from version control history. In particular, it does not include the names of
999the (very much appreciated) contributors who reported issues to the Perl bug
1000tracker.
1001
1002Many of the changes included in this version originated in the CPAN modules
1003included in Perl's core. We're grateful to the entire CPAN community for
1004helping Perl to flourish.
1005
1006For a more complete list of all of Perl's historical contributors, please see
1007the F<AUTHORS> file in the Perl source distribution.
f5b73711 1008
44691e6f
AB
1009=head1 Reporting Bugs
1010
e08634c5
SH
1011If you find what you think is a bug, you might check the articles recently
1012posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 1013https://rt.perl.org/ . There may also be information at
7ef8b31d 1014http://www.perl.org/ , the Perl Home Page.
44691e6f 1015
e08634c5
SH
1016If you believe you have an unreported bug, please run the L<perlbug> program
1017included with your release. Be sure to trim your bug down to a tiny but
1018sufficient test case. Your bug report, along with the output of C<perl -V>,
1019will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
1020
1021If the bug you are reporting has security implications, which make it
e08634c5
SH
1022inappropriate to send to a publicly archived mailing list, then please send it
1023to perl5-security-report@perl.org. This points to a closed subscription
1024unarchived mailing list, which includes all the core committers, who will be
1025able to help assess the impact of issues, figure out a resolution, and help
f9001595 1026co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
1027platforms on which Perl is supported. Please only use this address for
1028security issues in the Perl core, not for modules independently distributed on
1029CPAN.
44691e6f
AB
1030
1031=head1 SEE ALSO
1032
e08634c5
SH
1033The F<Changes> file for an explanation of how to view exhaustive details on
1034what changed.
44691e6f
AB
1035
1036The F<INSTALL> file for how to build Perl.
1037
1038The F<README> file for general stuff.
1039
1040The F<Artistic> and F<Copying> files for copyright information.
1041
1042=cut