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