This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Begin to finalize perldelta for release
[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
85classes and when not preceeded by a backslash has raised a deprecation
86warning since v5.18. Now they will be ignored. See L</qrE<sol>fooE<sol>x>
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
7065301c
RS
186XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
187go here. If Module::CoreList is updated, generate an initial draft of the
188following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
189for important changes should then be added by hand. In an ideal world,
190dual-life modules would have a F<Changes> file that could be cribbed.
191
192[ Within each section, list entries as a =item entry ]
193
194=head2 New Modules and Pragmata
24a38d90
RS
195
196=over 4
197
198=item *
199
7065301c
RS
200XXX
201
202=back
203
204=head2 Updated Modules and Pragmata
205
206=over 4
24a38d90
RS
207
208=item *
209
56cdf413
TC
210L<Carp> has been upgraded from version 1.3301 to 1.34.
211
212Carp::Heavy now ignores version mismatches with Carp if Carp is newer
213than 1.12, since Carp::Heavy's guts were merged into Carp at that
214point.
215L<[perl #121574]|https://rt.perl.org/Ticket/Display.html?id=121574>
216
217=item *
218
f9dc9a54
TC
219L<Data::Dumper> has been upgraded from version 2.151 to 2.152.
220
221Changes to resolve Coverity issues.
222
223XS dumps incorrectly stored the name of code references stored in a
224GLOB.
225L<[perl #122070]|https://rt.perl.org/Ticket/Display.html?id=122070>
226
227=item *
228
28e02325
SH
229L<Encode> has been upgraded from version 2.60_01 to 2.62.
230
231B<piconv> now has better error handling when the encoding name is nonexistent,
232and a build breakage when upgrading L<Encode> in perl-5.8.2 and earlier has
233been fixed.
234
235=item *
236
cb526893
TC
237L<Hash::Util> has been upgraded from version 0.16 to 0.17.
238
239Minor bug fixes and documentation fixes to Hash::Util::hash_stats()
240
241=item *
242
5abafd4c
SH
243The libnet collection of modules has been upgraded from version 1.25 to 1.27.
244
245There are only whitespace changes to the installed files.
246
247=item *
248
7a945bf5
SH
249The Locale-Codes collection of modules has been upgraded from vesion 3.30 to 3.31.
250
251Fixed a bug in the scripts used to extract data from spreadsheets that
252prevented the SHP currency code from being found.
253L<[cpan #94229]|https://rt.cpan.org/Ticket/Display.html?id=94229>
254
255=item *
256
4ed8f5ed
TC
257L<Math::BigInt> has been upgraded from version 1.9993 to 1.9994.
258
259Synchronize POD changes from the CPAN release.
260
ee15bb65
TC
261C<< Math::BigFloat->blog(x) >> would sometimes return blog(2*x) when
262the accuracy was greater than 70 digits.
263
264The result of C<< Math::BigFloat->bdiv() >> in list context now
265satisfies C<< x = quotient * divisor + remainder >>.
266
4ed8f5ed
TC
267=item *
268
234105dd
TC
269L<Math::BigRat> has been upgraded from version 0.2606 to 0.2607.
270
271Synchronize POD changes from the CPAN release.
272
273=item *
274
f97d984b 275L<Module::Metadata> has been upgraded from version 1.000022 to 1.000024.
b9beed70
SH
276
277Support installations on older perls with an L<ExtUtils::MakeMaker> earlier
278than 6.63_03
279
280=item *
281
f9dc9a54
TC
282L<OS2::Process> has been upgraded from version 1.09 to 1.10.
283
284=item *
285
c13fd1a2
TC
286L<perl5db.pl> has been upgraded from version 1.44 to 1.45.
287
288fork() in the debugger under C<tmux> will now create a new window for
891822fa
TC
289the forked process. L<[perl
290#121333]|https://rt.perl.org/Ticket/Display.html?id=121333>
291
292The debugger now saves the current working directory on startup and
293restores it when you restart your program with C<R> or <rerun>. L<[perl
294#121509]|https://rt.perl.org/Ticket/Display.html?id=121509>
24a38d90 295
cb526893
TC
296=item *
297
f9dc9a54
TC
298L<PerlIO::encoding> has been upgraded from version 0.18 to 0.19.
299
300No changes in behaviour.
301
302=item *
303
304L<PerlIO::mmap> has been upgraded from version 0.012 to 0.013.
305
306No changes in behaviour.
307
308=item *
309
310L<PerlIO::scalar> has been upgraded from version 0.18 to 0.19.
311
312No changes in behaviour.
313
314=item *
315
f8187d97
SH
316L<Unicode::Collate> has been upgraded from version 1.04 to 1.07.
317
318Version 0.67's improved discontiguous contractions is invalidated by default
319and is supported as a parameter 'long_contraction'.
320
95f3e8d2
SH
321=item *
322
323L<Unicode::Normalize> has been upgraded from version 1.17 to 1.18.
324
325The XSUB implementation has been removed in favour of pure Perl.
326
3eaa3d14
YO
327=item *
328
cb526893
TC
329A mismatch between the documentation and the code in utf8::downgrade()
330was fixed in favour of the documentation. The optional second argument
331is now correctly treated as a perl boolean (true/false semantics) and
332not as an integer.
3eaa3d14 333
238894db 334=back
24a38d90 335
92fa985e 336=head2 Removed Modules and Pragmata
24a38d90 337
238894db 338=over 4
24a38d90
RS
339
340=item *
341
7065301c
RS
342XXX
343
344=back
345
346=head1 Documentation
347
7065301c
RS
348=head2 Changes to Existing Documentation
349
9c0f2733 350=head3 L<perlfunc>
7065301c
RS
351
352=over 4
353
354=item *
355
9c0f2733
MH
356C<-l> now notes that it will return false if symlinks aren't supported by the
357file system.
358
359L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
7065301c 360
902c1f75
MH
361=item *
362
363Note that C<exec LIST> and C<system LIST> may fall back to the shell on
364Win32. Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object
365syntax will reliably avoid using the shell.
366
367This has also been noted in L<perlport>.
368
369L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046>
370
7065301c
RS
371=back
372
58f25ac1
MH
373=head3 L<perlapi>
374
375=over 4
376
377=item *
378
2402c6dd
MH
379Note that C<SvSetSV> doesn't do set magic.
380
381=item *
382
58f25ac1
MH
383C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
384C<malloc>.
385
386L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869>
387
4c6609d3
MH
388=item *
389
390Clarify where C<NUL> may be embedded or is required to terminate a string.
391
5bafdaa4
MH
392=item *
393
394Previously missing documentation due to formatting errors are now included.
395
396=item *
397
398Entries are now organized into groups rather than by file where they are found.
399
400=item *
401
402Alphabetical sorting of entries is now handled by the POD generator to make
403entries easier to find when scanning.
404
58f25ac1
MH
405=back
406
12042f24
MH
407=head3 L<perlhacktips>
408
409=over 4
410
411=item *
412
413Updated documentation for the C<test.valgrind> C<make> target.
414
415L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
416
417=back
418
2705070b
MH
419=head3 L<perlre>
420
421=over 4
422
423=item *
424
425The C</x> modifier has been clarified to note that comments cannot be continued
426onto the next line by escaping them.
427
428=back
429
b10906fb
MH
430=head3 L<Unicode::UCD>
431
432=over 4
433
434=item *
435
436The documentation includes many clarifications and fixes.
437
438=back
439
7065301c
RS
440=head1 Diagnostics
441
442The following additions or changes have been made to diagnostic output,
443including warnings and fatal error messages. For the complete list of
444diagnostic messages, see L<perldiag>.
445
7065301c
RS
446=head2 New Diagnostics
447
7065301c
RS
448=head3 New Errors
449
450=over 4
24a38d90
RS
451
452=item *
453
28462159
MH
454L<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/">
455
456(F) The two-character sequence C<"(?"> in
457this context in a regular expression pattern should be an
458indivisible token, with nothing intervening between the C<"(">
459and the C<"?">, but you separated them.
460
461=item *
462
463L<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/">
464
465(F) The two-character sequence C<"(*"> in
466this context in a regular expression pattern should be an
467indivisible token, with nothing intervening between the C<"(">
468and the C<"*">, but you separated them.
469
470=item *
471
472L<charnames alias definitions may not contain a sequence of multiple spaces|perldiag/"charnames alias definitions may not contain a sequence of multiple spaces">
473
474(F) You defined a character name which had multiple space
475 characters in a row. Change them to single spaces. Usually these
476 names are defined in the C<:alias> import argument to C<use charnames>, but
477 they could be defined by a translator installed into C<$^H{charnames}>.
478 See L<charnames/CUSTOM ALIASES>.
479
480=item *
481
482L<charnames alias definitions may not contain trailing white-space|perldiag/"charnames alias definitions may not contain trailing white-space">
483
484(F) You defined a character name which ended in a space
485character. Remove the trailing space(s). Usually these names are
486defined in the C<:alias> import argument to C<use charnames>, but they
487could be defined by a translator installed into C<$^H{charnames}>.
488See L<charnames/CUSTOM ALIASES>.
489
490=item *
491
492L<Can't use a hash as a reference|perldiag/"Can't use a hash as a reference">
493
494(F) You tried to use a hash as a reference, as in
495C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl <= 5.6.1
496used to allow this syntax, but shouldn't have.
497
498=item *
499
500L<Can't use an array as a reference|perldiag/"Can't use an array as a reference">
501
502(F) You tried to use an array as a reference, as in
503C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl <= 5.6.1 used to
504allow this syntax, but shouldn't have.
505
506=item *
507
508L<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()?)">
509
510(F) defined() is not useful on arrays because it
511checks for an undefined I<scalar> value. If you want to see if the
512array is empty, just use C<if (@array) { # not empty }> for example.
513
514=item *
515
516L<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()?)">
517
518(F) C<defined()> is not usually right on hashes.
519
520Although C<defined %hash> is false on a plain not-yet-used hash, it
521becomes true in several non-obvious circumstances, including iterators,
522weak references, stash names, even remaining true after C<undef %hash>.
523These things make C<defined %hash> fairly useless in practice, so it now
524generates a fatal error.
525
526If a check for non-empty is what you wanted then just put it in boolean
527context (see L<perldata/Scalar values>):
528
529 if (%hash) {
530 # not empty
531 }
532
533If you had C<defined %Foo::Bar::QUUX> to check whether such a package
534variable exists then that's never really been reliable, and isn't
535a good way to enquire about the features of a package, or whether
536it's loaded, etc.
537
538=item *
539
540L<Illegal suidscript|perldiag/"Illegal suidscript">
541
542(F) The script run under suidperl was somehow illegal.
7065301c
RS
543
544=back
545
546=head3 New Warnings
547
548=over 4
24a38d90
RS
549
550=item *
551
28462159
MH
552L<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/">
553
554(D deprecated, regexp) You used a literal C<"{"> character in a regular
555expression pattern. You should change to use C<"\{"> instead, because a future
556version of Perl (tentatively v5.26) will consider this to be a syntax error. If
557the pattern delimiters are also braces, any matching right brace
558(C<"}">) should also be escaped to avoid confusing the parser, for
559example,
560
561 qr{abc\{def\}ghi}
562
563=item *
564
565L<NO-BREAK SPACE in a charnames alias definition is deprecated|perldiag/"NO-BREAK SPACE in a charnames alias definition is deprecated">
566
567(D deprecated) You defined a character name which contained a no-break
568space character. Change it to a regular space. Usually these names are
569defined in the C<:alias> import argument to C<use charnames>, but they
570could be defined by a translator installed into C<$^H{charnames}>. See
571L<charnames/CUSTOM ALIASES>.
572
573=item *
574
575L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">
576
577(S experimental::win32_perlio) The C<:win32> PerlIO layer is
578experimental. If you want to take the risk of using this layer,
579simply disable this warning:
580
581 no warnings "experimental::win32_perlio";
582
583=item *
584
585L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing">
586
587(W numeric) You tried to execute the
588L<C<x>|perlop/Multiplicative Operators> repetition operator fewer than 0
589times, which doesn't make sense.
590
591=item *
592
593L<localtime(%f) failed|perldiag/"localtime(%f) failed">
594
595(W overflow) You called C<localtime> with a number that it could not handle:
596too large, too small, or NaN. The returned value is C<undef>.
597
598=item *
599
600L<gmtime(%f) failed|perldiag/"gmtime(%f) failed">
601
602(W overflow) You called C<gmtime> with a number that it could not handle:
603too large, too small, or NaN. The returned value is C<undef>.
604
605=item *
606
097675bf
TC
607L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">:
608
609(S experimental::win32_perlio) The C<:win32> PerlIO layer is
610experimental. If you want to take the risk of using this layer,
611simply disable this warning:
612
613 no warnings "experimental::win32_perlio";
24a38d90 614
28462159 615=item *
b3211734
KW
616
617L<Negative repeat count does nothing|perldiag/Negative repeat count does nothing>
618
619(W numeric) This warns when the repeat count of the
620L<C<x>|perlop/Multiplicative Operators> repetition operator is
621negative.
622
623This warning may be changed or removed if it turn out that it was
624unwise to have added it.
625
238894db 626=back
24a38d90 627
7065301c 628=head2 Changes to Existing Diagnostics
24a38d90 629
7065301c
RS
630=over 4
631
632=item *
633
b08d439a
MH
634L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/">
635
636Information about Unicode behaviour has been added.
637
638=item *
639
747b6130
MH
640<> should be quotes
641
642This warning has been changed to
643L<< <> at require-statement should be quotes|perldiag/"<> at require-statement should be quotes" >>
644to make the issue more identifiable.
645
646=item *
647
723edb96
TC
648L<Unsuccessful %s on filename containing newline|perldiag/"Unsuccessful %s on filename containing newline">
649
650This warning is now only produced when the newline is at the end of
651the filename.
7065301c
RS
652
653=back
654
655=head1 Utility Changes
656
eb561242 657=head2 F<x2p/>
7065301c
RS
658
659=over 4
660
661=item *
24a38d90 662
eb561242
MH
663The F<x2p/> directory has been removed from the Perl core.
664
665This removes find2perl, s2p and a2p. They have all been released to CPAN as
666separate distributions (App::find2perl, App::s2p, App::a2p).
7065301c
RS
667
668=back
669
670=head1 Configuration and Compilation
671
7065301c
RS
672=over 4
673
674=item *
675
12042f24
MH
676C<make test.valgrind> now supports parallel testing.
677
678For example:
679
680 TEST_JOBS=9 make test.valgrind
681
682See L<perlhacktips/valgrind> for more information.
683
684L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
7065301c 685
b2e61987
KW
686=item *
687
688The MAD (Misc Attribute Decoration) build option has been removed
689
690This was an unmaintained attempt at preserving
691the Perl parse tree more faithfully so that automatic conversion of
692Perl 5 to Perl 6 would have been easier.
693
694This build-time configuration option had been unmaintained for years,
695and had probably seriously diverged on both Perl 5 and Perl 6 sides.
696
7065301c
RS
697=back
698
7065301c
RS
699=head1 Platform Support
700
7065301c
RS
701=head2 Discontinued Platforms
702
7065301c
RS
703=over 4
704
f05550c0 705=item NeXTSTEP/OPENSTEP
7065301c 706
f05550c0
BF
707NeXTSTEP was proprietary OS bundled with NeXT's workstations in the early
708to mid 90's; OPENSTEP was an API specification that provided a NeXTSTEP-like
709environment on a non-NeXTSTEP system. Both are now long dead, so support
710for building Perl on them has been removed.
7065301c
RS
711
712=back
713
714=head2 Platform-Specific Notes
715
7065301c
RS
716=over 4
717
7d0ccdba
MH
718=item OpenBSD
719
720On OpenBSD, Perl will now default to using the system C<malloc> due to the
721security features it provides. Perl's own malloc wrapper has been in use
722since v5.14 due to performance reasons, but the OpenBSD project believes
723the tradeoff is worth it and would prefer that users who need the speed
724specifically ask for it.
725
726L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>.
727
7065301c
RS
728=back
729
730=head1 Internal Changes
731
7065301c
RS
732=over 4
733
734=item *
735
8dab3ba5 736The deprecated variable C<PL_sv_objcount> has been removed.
7065301c 737
4c28b29c
KW
738=item *
739
740Perl now tries to keep the locale category C<LC_NUMERIC> set to "C"
741except around operations that need it to be set to the program's
742underlying locale. This protects the many XS modules that cannot cope
743with the decimal radix character not being a dot. Prior to this
744release, Perl initialized this category to "C", but a call to
745C<POSIX::setlocale()> would change it. Now such a call will change the
746underlying locale of the C<LC_NUMERIC> category for the program, but the
747locale exposed to XS code will remain "C". There is an API under
748development for those relatively few modules that need to use the
749underlying locale. This API will be nailed down during the course of
750developing v5.21. Send email to L<mailto:perl5-porters@perl.org> for
751guidance.
752
c9fcb674
KW
753=item *
754
755A new macro L<C<isUTF8_CHAR>|perlapi/isUTF8_CHAR> has been written which
756efficiently determines if the string given by its parameters begins
757with a well-formed UTF-8 encoded character.
758
7065301c
RS
759=back
760
761=head1 Selected Bug Fixes
762
7065301c
RS
763=over 4
764
765=item *
766
30536d4a
TC
767index() and rindex() no longer crash when used on strings over 2GB in
768size.
769L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>.
7065301c 770
0c2c57a8
DD
771=item *
772
773A small previously intentional memory leak in PERL_SYS_INIT/PERL_SYS_INIT3 on
774Win32 builds was fixed. This might affect embedders who repeatedly create and
775destroy perl engines within the same process.
776
a835cd47
KW
777=item *
778
779C<POSIX::localeconv()> now returns the data for the program's underlying
780locale even when called from outside the scope of S<C<use locale>>.
781
03ceeedf
KW
782=item *
783
784C<POSIX::localeconv()> now works properly on platforms which don't have
785C<LC_NUMERIC> and/or C<LC_MONETARY>, or for which Perl has been compiled
786to disregard either or both of these locale categories. In such
787circumstances, there are now no entries for the corresponding values in
788the hash returned by C<localeconv()>.
789
c1284011
KW
790=item *
791
792C<POSIX::localeconv()> now marks appropriately the values it returns as
793UTF-8 or not. Previously they were always returned as a bytes, even if
794they were supposed to be encoded as UTF-8.
795
375f5f06
KW
796=item *
797
798On Microsoft Windows, within the scope of C<S<use locale>>, the following
799POSIX character classes gave results for many locales that did not
800conform to the POSIX standard:
801C<[[:alnum:]]>,
802C<[[:alpha:]]>,
803C<[[:blank:]]>,
804C<[[:digit:]]>,
805C<[[:graph:]]>,
806C<[[:lower:]]>,
807C<[[:print:]]>,
808C<[[:punct:]]>,
809C<[[:upper:]]>,
810C<[[:word:]]>,
811and
812C<[[:xdigit:]]>.
813These are because the underlying Microsoft implementation does not
814follow the standard. Perl now takes special precautions to correct for
815this.
816
2884baee
MH
817=item *
818
819Many issues have been detected by L<Coverity|http://www.coverity.com/> and
820fixed.
821
5af51eb4
BF
822=item *
823
824system() and friends should now work properly on more Android builds.
825
826Due to an oversight, the value specified through -Dtargetsh to Configure
827would end up being ignored by some of the build process. This caused perls
828cross-compiled for Android to end up with defective versions of system(),
829exec() and backticks: the commands would end up looking for C</bin/sh>
830instead of C</system/bin/sh>, and so would fail for the vast majority
831of devices, leaving C<$!> as C<ENOENT>.
832
412f55bb
KW
833=item *
834
835C<qr(...\(...\)...)>,
836C<qr[...\[...\]...]>,
837and
838C<qr{...\{...\}...}>
839now work. Previously it was impossible to escape these three
840left-characters with a backslash within a regular expression pattern
841where otherwise they would be considered metacharacters, and the pattern
842opening delimiter was the character, and the closing delimiter was its
843mirror character.
844
7065301c
RS
845=back
846
7065301c 847=head1 Acknowledgements
24a38d90 848
7065301c 849XXX Generate this with:
52e02e68 850
7065301c 851 perl Porting/acknowledgements.pl v5.21.1..HEAD
f5b73711 852
44691e6f
AB
853=head1 Reporting Bugs
854
e08634c5
SH
855If you find what you think is a bug, you might check the articles recently
856posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 857https://rt.perl.org/ . There may also be information at
7ef8b31d 858http://www.perl.org/ , the Perl Home Page.
44691e6f 859
e08634c5
SH
860If you believe you have an unreported bug, please run the L<perlbug> program
861included with your release. Be sure to trim your bug down to a tiny but
862sufficient test case. Your bug report, along with the output of C<perl -V>,
863will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
864
865If the bug you are reporting has security implications, which make it
e08634c5
SH
866inappropriate to send to a publicly archived mailing list, then please send it
867to perl5-security-report@perl.org. This points to a closed subscription
868unarchived mailing list, which includes all the core committers, who will be
869able to help assess the impact of issues, figure out a resolution, and help
f9001595 870co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
871platforms on which Perl is supported. Please only use this address for
872security issues in the Perl core, not for modules independently distributed on
873CPAN.
44691e6f
AB
874
875=head1 SEE ALSO
876
e08634c5
SH
877The F<Changes> file for an explanation of how to view exhaustive details on
878what changed.
44691e6f
AB
879
880The F<INSTALL> file for how to build Perl.
881
882The F<README> file for general stuff.
883
884The F<Artistic> and F<Copying> files for copyright information.
885
886=cut