This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
bump version to v5.25.0
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
f3ed8cbf 5perldelta - what is new for perl v5.24.0
eabfc7bc 6
2cfe9b50 7=head1 DESCRIPTION
eabfc7bc 8
f3ed8cbf
RS
9This document describes the differences between the 5.22.0 release and the
105.24.0 release.
11
12=head1 Core Enhancements
eabfc7bc 13
f3ed8cbf 14=head2 Postfix dereferencing is no longer experimental
78a6ddfb 15
f3ed8cbf
RS
16Using the C<postderef> and C<postderef_qq> features no longer emits a
17warning. Existing code that disables the C<experimental::postderef> warning
18category that they previously used will continue to work. The C<postderef>
19feature has no effect; all Perl code can use postfix dereferencing,
20regardless of what feature declarations are in scope. The C<5.24> feature
21bundle now includes the C<postderef_qq> feature.
78a6ddfb 22
f3ed8cbf 23=head2 Unicode 8.0 is now supported
394609a5 24
f3ed8cbf
RS
25For details on what is in this release, see
26L<http://www.unicode.org/versions/Unicode8.0.0/>.
27
28=head2 perl will now croak when closing an in-place output file fails
29
30Until now, failure to close the output file for an in-place edit was not
31detected, meaning that the input file could be clobbered without the edit being
32successfully completed. Now, when the output file cannot be closed
33successfully, an exception is raised.
34
35=head2 New C<\b{lb}> boundary in regular expressions
36
37C<lb> stands for Line Break. It is a Unicode property
38that determines where a line of text is suitable to break (typically so
39that it can be output without overflowing the available horizontal
40space). This capability has long been furnished by the
41L<Unicode::LineBreak> module, but now a light-weight, non-customizable
42version that is suitable for many purposes is in core Perl.
43
44=head2 C<qr/(?[ ])/> now works in UTF-8 locales
45
46L<Extended Bracketed Character Classes|perlrecharclass/Extended Bracketed Character Classes>
47now will successfully compile when S<C<use locale>> is in effect. The compiled
48pattern will use standard Unicode rules. If the runtime locale is not a
49UTF-8 one, a warning is raised and standard Unicode rules are used
50anyway. No tainting is done since the outcome does not actually depend
51on the locale.
52
53=head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined
54
55Negative shifts are reverse shifts: left shift becomes right shift,
56and right shift becomes left shift.
57
58Shifting by the number of bits in a native integer (or more) is zero,
59except when the "overshift" is right shifting a negative value under
60C<use integer>, in which case the result is -1 (arithmetic shift).
61
62Until now negative shifting and overshifting have been undefined
63because they have relied on whatever the C implementation happens
64to do. For example, for the overshift a common C behavior is
65"modulo shift":
66
67 1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior.
68
69 # And the same for <<, while Perl now produces 0 for both.
cdfe2e65 70
f3ed8cbf 71Now these behaviors are well-defined under Perl, regardless of what
76975f24
KW
72the underlying C implementation does. Note, however, that you are still
73constrained by the native integer width: you need to know how far left you
f3ed8cbf 74can go. You can use for example:
a8c28920 75
f3ed8cbf
RS
76 use Config;
77 my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3.
78
79If you need a more bits on the left shift, you can use for example
80the C<bigint> pragma, or the C<Bit::Vector> module from CPAN.
81
82=head2 printf and sprintf now allow reordered precision arguments
83
319b236e 84That is, C<< sprintf '|%.*2$d|', 2, 3 >> now returns C<|002|>. This extends
f3ed8cbf
RS
85the existing reordering mechanism (which allows reordering for arguments
86that are used as format fields, widths, and vector separators).
87
88=head2 More fields provided to C<sigaction> callback with C<SA_SIGINFO>
89
90When passing the C<SA_SIGINFO> flag to L<sigaction|POSIX/sigaction>, the
91C<errno>, C<status>, C<uid>, C<pid>, C<addr> and C<band> fields are now
92included in the hash passed to the handler, if supported by the
93platform.
a8c28920 94
4368ade6
LT
95=head2 Hashbang redirection to Perl 6
96
97Previously perl would redirect to another interpreter if it found a
98hashbang path unless the path contains "perl" (see L<perlrun>). To improve
99compatability with Perl 6 this behavior has been extended to also redirect
100if "perl" is followed by "6".
101
6fee6573 102=head1 Security
07450df7 103
f3ed8cbf
RS
104=head2 Set proper umask before calling C<mkstemp(3)>
105
106In 5.22 perl started setting umask to 0600 before calling C<mkstemp(3)>
e40834e7 107and restoring it afterwards. This wrongfully tells C<open(2)> to strip
f3ed8cbf
RS
108the owner read and write bits from the given mode before applying it,
109rather than the intended negation of leaving only those bits in place.
110
111Systems that use mode 0666 in C<mkstemp(3)> (like old versions of
112glibc) create a file with permissions 0066, leaving world read and
113write permissions regardless of current umask.
114
115This has been fixed by using umask 0177 instead. [perl #127322]
116
8183f687 117=head2 Fix out of boundary access in Win32 path handling
f3ed8cbf
RS
118
119This is CVE-2015-8608. For more information see
120L<[perl #126755]|https://rt.perl.org/Ticket/Display.html?id=126755>
121
8183f687 122=head2 Fix loss of taint in canonpath
f3ed8cbf
RS
123
124This is CVE-2015-8607. For more information see
125L<[perl #126862]|https://rt.perl.org/Ticket/Display.html?id=126862>
126
127=head2 Avoid accessing uninitialized memory in win32 C<crypt()>
128
129Added validation that will detect both a short salt and invalid characters
130in the salt.
131L<[perl #126922]|https://rt.perl.org/Ticket/Display.html?id=126922>
132
133=head2 Remove duplicate environment variables from C<environ>
134
135Previously, if an environment variable appeared more than once in
136C<environ[]>, C<%ENV> would contain the last entry for that name,
137while a typical C<getenv()> would return the first entry. We now
138make sure C<%ENV> contains the same as what C<getenv> returns.
a7e63acd 139
f3ed8cbf 140Second, we remove duplicates from C<environ[]>, so if a setting
76975f24 141with that name is set in C<%ENV>, we won't pass an unsafe value
f3ed8cbf
RS
142to a child process.
143
144[CVE-2016-2381]
d7a7ed74 145
78a6ddfb 146=head1 Incompatible Changes
d7a7ed74 147
f3ed8cbf 148=head2 The C<autoderef> feature has been removed
34e79b75 149
f3ed8cbf
RS
150The experimental C<autoderef> feature (which allowed calling C<push>,
151C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on
152a scalar argument) has been deemed unsuccessful. It has now been removed;
153trying to use the feature (or to disable the C<experimental::autoderef>
154warning it previously triggered) now yields an exception.
fc9da770 155
f3ed8cbf 156=head2 Lexical $_ has been removed
df539208 157
f3ed8cbf
RS
158C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion
159with no obvious solution. In Perl 5.18.0, it was made experimental on the
160theory that it would either be removed or redesigned in a less confusing (but
161backward-incompatible) way. Over the following years, no alternatives were
162proposed. The feature has now been removed and will fail to compile.
df539208 163
f3ed8cbf 164=head2 C<qr/\b{wb}/> is now tailored to Perl expectations
d8d26cac 165
f3ed8cbf
RS
166This is now more suited to be a drop-in replacement for plain C<\b>, but
167giving better results for parsing natural language. Previously it
168strictly followed the current Unicode rules which calls for it to match
169between each white space character. Now it doesn't generally match
170within spans of white space, behaving like C<\b> does. See
171L<perlrebackslash/\b{wb}>
df539208 172
f3ed8cbf 173=head2 Regular expression compilation errors
df539208 174
f3ed8cbf
RS
175Some regular expression patterns that had runtime errors now
176don't compile at all.
df539208 177
f3ed8cbf
RS
178Almost all Unicode properties using the C<\p{}> and C<\P{}> regular
179expression pattern constructs are now checked for validity at pattern
180compilation time, and invalid ones will cause the program to not
181compile. In earlier releases, this check was often deferred until run
182time. Whenever an error check is moved from run- to compile time,
183erroneous code is caught 100% of the time, whereas before it would only
184get caught if and when the offending portion actually gets executed,
185which for unreachable code might be never.
fc9da770 186
f3ed8cbf 187=head2 C<qr/\N{}/> now disallowed under C<use re "strict">
df539208 188
f3ed8cbf 189An empty C<\N{}> makes no sense, but for backwards compatibility is
1e922e44
KW
190accepted as doing nothing, though a deprecation warning is raised by
191default. But now this is a fatal error under the experimental feature
192L<re/'strict' mode>.
df539208 193
f3ed8cbf 194=head2 Nested declarations are now disallowed
df539208 195
f3ed8cbf
RS
196A C<my>, C<our>, or C<state> declaration is no longer allowed inside
197of another C<my>, C<our>, or C<state> declaration.
fc9da770 198
f3ed8cbf 199For example, these are now fatal:
fc9da770 200
f3ed8cbf
RS
201 my ($x, my($y));
202 our (my $x);
df539208 203
f3ed8cbf 204L<[perl #125587]|https://rt.perl.org/Ticket/Display.html?id=125587>
df539208 205
f3ed8cbf
RS
206L<[perl #121058]|https://rt.perl.org/Ticket/Display.html?id=121058>
207
208=head2 The C</\C/> character class has been removed.
209
210This regular expression character class was deprecated in v5.20.0 and has
211produced a deprecation warning since v5.22.0. It is now a compile-time
212error. If you need to examine the individual bytes that make up a
213UTF8-encoded character, then use C<utf8::encode()> on the string (or a
214copy) first.
215
216=head2 C<chdir('')> no longer chdirs home
217
218Using C<chdir('')> or C<chdir(undef)> to chdir home has been deprecated since
219perl v5.8, and will now fail. Use C<chdir()> instead.
220
221=head2 ASCII characters in variable names must now be all visible
222
223It was legal until now on ASCII platforms for variable names to contain
224non-graphical ASCII control characters (ordinals 0 through 31, and 127,
225which are the C0 controls and C<DELETE>). This usage has been
226deprecated since v5.20, and as of now causes a syntax error. The
227variables these names referred to are special, reserved by Perl for
228whatever use it may choose, now, or in the future. Each such variable
229has an alternative way of spelling it. Instead of the single
230non-graphic control character, a two character sequence beginning with a
231caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>. Details are at
232L<perlvar>. It remains legal, though unwise and deprecated (raising a
233deprecation warning), to use certain non-graphic non-ASCII characters in
234variables names when not under S<C<use utf8>>. No code should do this,
235as all such variables are reserved by Perl, and Perl doesn't currently
236define any of them (but could at any time, without notice).
237
238=head2 An off by one issue in C<$Carp::MaxArgNums> has been fixed
239
240C<$Carp::MaxArgNums> is supposed to be the number of arguments to display.
241Prior to this version, it was instead showing C<$Carp::MaxArgNums> + 1 arguments,
242contrary to the documentation.
243
244=head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>.
245
246The experimental Extended Bracketed Character Classes can contain regular
247bracketed character classes within them. These differ from regular ones in
248that white space is generally ignored, unless escaped by preceding it with a
249backslash. The white space that is ignored is now limited to just tab C<\t>
250and SPACE characters. Previously, it was any white space. See
251L<perlrecharclass/Extended Bracketed Character Classes>.
252
253=head1 Deprecations
df539208 254
f3ed8cbf
RS
255=head2 Using code points above the platform's C<IV_MAX> is now deprecated
256
257Unicode defines code points in the range C<0..0x10FFFF>. Some standards
258at one time defined them up to 2**31 - 1, but Perl has allowed them to
259be as high as anything that will fit in a word on the platform being
260used. However, use of those above the platform's C<IV_MAX> is broken in
261some constructs, notably C<tr///>, regular expression patterns involving
262quantifiers, and in some arithmetic and comparison operations, such as
263being the upper limit of a loop. Now the use of such code points raises
264a deprecation warning, unless that warning category is turned off.
265C<IV_MAX> is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on
26664-bit ones.
267
268=head2 Doing bitwise operations on strings containing code points above
2690xFF is deprecated
270
271The string bitwise operators treat their operands as strings of bytes,
272and values beyond 0xFF are nonsensical in this context. To operate on
273encoded bytes, first encode the strings. To operate on code points'
274numeric values, use C<split> and C<map ord>. In the future, this
275warning will be replaced by an exception.
276
e40834e7 277=head2 C<sysread()>, C<syswrite()>, C<recv()> and C<send()> are deprecated on
f3ed8cbf
RS
278:utf8 handles
279
e40834e7 280The C<sysread()>, C<recv()>, C<syswrite()> and C<send()> operators
f3ed8cbf
RS
281are deprecated on handles that have the C<:utf8> layer, either
282explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
283
e40834e7
KW
284Both C<sysread()> and C<recv()> currently use only the C<:utf8> flag for the
285stream, ignoring the actual layers. Since C<sysread()> and C<recv()> do no
f3ed8cbf
RS
286UTF-8 validation they can end up creating invalidly encoded scalars.
287
e40834e7 288Similarly, C<syswrite()> and C<send()> use only the C<:utf8> flag, otherwise
f3ed8cbf
RS
289ignoring any layers. If the flag is set, both write the value UTF-8
290encoded, even if the layer is some different encoding, such as the
291example above.
292
293Ideally, all of these operators would completely ignore the C<:utf8>
294state, working only with bytes, but this would result in silently
295breaking existing code. To avoid this a future version of perl will
e40834e7 296throw an exception when any of C<sysread()>, C<recv()>, C<syswrite()> or C<send()>
f3ed8cbf 297are called on handle with the C<:utf8> layer.
df539208 298
f3ed8cbf 299=head1 Performance Enhancements
0d4476e9 300
78a6ddfb 301=over 4
0d4476e9
A
302
303=item *
304
f3ed8cbf
RS
305The overhead of scope entry and exit has been considerably reduced, so
306for example subroutine calls, loops and basic blocks are all faster now.
307This empty function call now takes about a third less time to execute:
0d4476e9 308
f3ed8cbf 309 sub f{} f();
0d4476e9 310
f3ed8cbf
RS
311=item *
312
313Many languages, such as Chinese, are caseless. Perl now knows about
28d629a3 314most common ones, and skips much of the work when
f3ed8cbf
RS
315a program tries to change case in them (like C<ucfirst()>) or match
316caselessly (C<qr//i>). This will speed up a program, such as a web
28d629a3 317server, that can operate on multiple languages, while it is operating on a
f3ed8cbf 318caseless one.
df539208 319
f3ed8cbf 320=item *
df539208 321
f3ed8cbf 322C</fixed-substr/> has been made much faster.
0d4476e9 323
e40834e7 324On platforms with a libc C<memchr()> implementation which makes good use of
f3ed8cbf
RS
325underlying hardware support, patterns which include fixed substrings will now
326often be much faster; for example with glibc on a recent x86_64 CPU, this:
0d4476e9 327
f3ed8cbf
RS
328 $s = "a" x 1000 . "wxyz";
329 $s =~ /wxyz/ for 1..30000
330
e40834e7 331is now about 7 times faster. On systems with slow C<memchr()>, e.g. 32-bit ARM
f3ed8cbf
RS
332Raspberry Pi, there will be a small or little speedup. Conversely, some
333pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3
334times slower on the rPi, 1.5x slower on x86_64.
335
336=item *
337
338Faster addition, subtraction and multiplication.
339
340Since 5.8.0, arithmetic became slower due to the need to support
34164-bit integers. To deal with 64-bit integers, a lot more corner
342cases need to be checked, which adds time. We now detect common
343cases where there is no need to check for those corner cases,
344and special-case them.
345
346=item *
347
348Preincrement, predecrement, postincrement, and postdecrement have been
349made faster by internally splitting the functions which handled multiple
350cases into different functions.
0d4476e9
A
351
352=item *
353
f3ed8cbf
RS
354Creating Perl debugger data structures (see L<perldebguts/"Debugger Internals">)
355for XSUBs and const subs has been removed. This removed one glob/scalar combo
356for each unique C<.c> file that XSUBs and const subs came from. On startup
357(C<perl -e"0">) about half a dozen glob/scalar debugger combos were created.
76975f24
KW
358Loading XS modules created more glob/scalar combos. These things were
359being created regardless of whether the perl debugger was being used,
360and despite the fact that it can't debug C code anyway
f3ed8cbf
RS
361
362=item *
363
364On Win32, C<stat>ing or C<-X>ing a path, if the file or directory does not
365exist, is now 3.5x faster than before.
366
367=item *
368
369Single arguments in list assign are now slightly faster:
370
371 ($x) = (...);
372 (...) = ($x);
373
374=item *
375
376Less peak memory is now used when compiling regular expression patterns.
28192377 377
78a6ddfb 378=back
28192377 379
f3ed8cbf
RS
380=head1 Modules and Pragmata
381
78a6ddfb 382=head2 Updated Modules and Pragmata
df539208 383
d7d0a5d8
RS
384=over
385
386=item *
387
388L<arybase> has been upgraded from version 0.10 to 0.11.
389
390=item *
391
392L<Attribute::Handlers> has been upgraded from version 0.97 to 0.99.
393
394=item *
395
396L<autodie> has been upgraded from version 2.26 to 2.29.
397
398=item *
399
400L<autouse> has been upgraded from version 1.08 to 1.11.
401
402=item *
403
404L<B> has been upgraded from version 1.58 to 1.62.
405
406=item *
407
408L<B::Deparse> has been upgraded from version 1.35 to 1.37.
409
410=item *
411
412L<base> has been upgraded from version 2.22 to 2.23.
413
414=item *
415
416L<Benchmark> has been upgraded from version 1.2 to 1.22.
417
418=item *
419
420L<bignum> has been upgraded from version 0.39 to 0.42.
421
422=item *
423
424L<bytes> has been upgraded from version 1.04 to 1.05.
425
426=item *
427
428L<Carp> has been upgraded from version 1.36 to 1.40.
429
430=item *
431
432L<Compress::Raw::Bzip2> has been upgraded from version 2.068 to 2.069.
433
434=item *
435
436L<Compress::Raw::Zlib> has been upgraded from version 2.068 to 2.069.
437
438=item *
439
440L<Config::Perl::V> has been upgraded from version 0.24 to 0.25.
441
442=item *
443
444L<CPAN::Meta> has been upgraded from version 2.150001 to 2.150005.
445
446=item *
447
448L<CPAN::Meta::Requirements> has been upgraded from version 2.132 to 2.140.
449
450=item *
451
452L<CPAN::Meta::YAML> has been upgraded from version 0.012 to 0.018.
453
454=item *
455
456L<Data::Dumper> has been upgraded from version 2.158 to 2.160.
457
458=item *
459
460L<Devel::Peek> has been upgraded from version 1.22 to 1.23.
461
462=item *
463
464L<Devel::PPPort> has been upgraded from version 3.31 to 3.32.
465
466=item *
467
468L<Dumpvalue> has been upgraded from version 1.17 to 1.18.
469
470=item *
471
472L<DynaLoader> has been upgraded from version 1.32 to 1.38.
473
474=item *
475
476L<Encode> has been upgraded from version 2.72 to 2.80.
477
478=item *
479
480L<encoding> has been upgraded from version 2.14 to 2.17.
481
482=item *
483
484L<encoding::warnings> has been upgraded from version 0.11 to 0.12.
485
486=item *
487
488L<English> has been upgraded from version 1.09 to 1.10.
489
490=item *
491
492L<Errno> has been upgraded from version 1.23 to 1.25.
493
494=item *
495
496L<experimental> has been upgraded from version 0.013 to 0.016.
497
498=item *
499
500L<ExtUtils::CBuilder> has been upgraded from version 0.280221 to 0.280225.
501
502=item *
503
504L<ExtUtils::Embed> has been upgraded from version 1.32 to 1.33.
505
506=item *
507
508L<ExtUtils::MakeMaker> has been upgraded from version 7.04_01 to 7.10_01.
509
510=item *
511
512L<ExtUtils::ParseXS> has been upgraded from version 3.28 to 3.31.
513
514=item *
515
516L<ExtUtils::Typemaps> has been upgraded from version 3.28 to 3.31.
517
518=item *
519
520L<feature> has been upgraded from version 1.40 to 1.42.
521
522=item *
523
524L<fields> has been upgraded from version 2.17 to 2.23.
525
526=item *
527
e7fffa3b
RS
528L<File::Copy> has been upgraded from version 2.30 to 2.31.
529
530=item *
531
d7d0a5d8
RS
532L<File::Find> has been upgraded from version 1.29 to 1.34.
533
534=item *
535
536L<File::Glob> has been upgraded from version 1.24 to 1.26.
537
538=item *
539
540L<File::Path> has been upgraded from version 2.09 to 2.12_01.
541
542=item *
543
544L<File::Spec> has been upgraded from version 3.56 to 3.63.
545
546=item *
547
548L<Filter::Util::Call> has been upgraded from version 1.54 to 1.55.
549
550=item *
551
552L<Getopt::Long> has been upgraded from version 2.45 to 2.48.
553
554=item *
555
556L<Hash::Util> has been upgraded from version 0.18 to 0.19.
557
558=item *
559
560L<Hash::Util::FieldHash> has been upgraded from version 1.15 to 1.19.
561
562=item *
563
564L<HTTP::Tiny> has been upgraded from version 0.054 to 0.056.
565
566=item *
567
568L<I18N::Langinfo> has been upgraded from version 0.12 to 0.13.
569
570=item *
571
572L<if> has been upgraded from version 0.0604 to 0.0606.
573
574=item *
575
576L<IO> has been upgraded from version 1.35 to 1.36.
577
578=item *
579
19849675 580IO-Compress has been upgraded from version 2.068 to 2.069.
d7d0a5d8
RS
581
582=item *
583
584L<IPC::Open3> has been upgraded from version 1.18 to 1.20.
585
586=item *
587
588L<IPC::SysV> has been upgraded from version 2.04 to 2.06_01.
589
590=item *
591
592L<List::Util> has been upgraded from version 1.41 to 1.42_02.
593
594=item *
595
596L<locale> has been upgraded from version 1.06 to 1.08.
597
598=item *
599
600L<Locale::Codes> has been upgraded from version 3.34 to 3.37.
601
602=item *
603
604L<Math::BigInt> has been upgraded from version 1.9997 to 1.999715.
605
606=item *
607
608L<Math::BigInt::FastCalc> has been upgraded from version 0.31 to 0.40.
609
610=item *
611
612L<Math::BigRat> has been upgraded from version 0.2608 to 0.260802.
613
614=item *
615
e7fffa3b 616L<Module::CoreList> has been upgraded from version 5.20150520 to 5.20160506.
d7d0a5d8
RS
617
618=item *
619
620L<Module::Metadata> has been upgraded from version 1.000026 to 1.000031.
621
622=item *
623
624L<mro> has been upgraded from version 1.17 to 1.18.
625
626=item *
627
628L<ODBM_File> has been upgraded from version 1.12 to 1.14.
629
630=item *
631
632L<Opcode> has been upgraded from version 1.32 to 1.34.
633
634=item *
635
636L<parent> has been upgraded from version 0.232 to 0.234.
637
638=item *
639
640L<Parse::CPAN::Meta> has been upgraded from version 1.4414 to 1.4417.
641
642=item *
643
644L<Perl::OSType> has been upgraded from version 1.008 to 1.009.
645
646=item *
647
648L<perlfaq> has been upgraded from version 5.021009 to 5.021010.
649
650=item *
651
652L<PerlIO::encoding> has been upgraded from version 0.21 to 0.24.
653
654=item *
655
656L<PerlIO::mmap> has been upgraded from version 0.014 to 0.016.
657
658=item *
659
660L<PerlIO::scalar> has been upgraded from version 0.22 to 0.24.
661
662=item *
663
664L<PerlIO::via> has been upgraded from version 0.15 to 0.16.
665
666=item *
667
e7fffa3b
RS
668podlators has been upgraded from version 2.28 to 4.07.
669
670=item *
671
d7d0a5d8
RS
672L<Pod::Functions> has been upgraded from version 1.09 to 1.10.
673
674=item *
675
676L<Pod::Perldoc> has been upgraded from version 3.25 to 3.25_02.
677
678=item *
679
680L<Pod::Simple> has been upgraded from version 3.29 to 3.32.
681
682=item *
683
684L<Pod::Usage> has been upgraded from version 1.64 to 1.68.
685
686=item *
687
688L<POSIX> has been upgraded from version 1.53 to 1.65.
689
690=item *
691
692L<Scalar::Util> has been upgraded from version 1.41 to 1.42_02.
693
694=item *
695
696L<SDBM_File> has been upgraded from version 1.13 to 1.14.
697
698=item *
699
700L<SelfLoader> has been upgraded from version 1.22 to 1.23.
701
702=item *
703
704L<Socket> has been upgraded from version 2.018 to 2.020_03.
705
706=item *
707
708L<Storable> has been upgraded from version 2.53 to 2.56.
709
710=item *
711
712L<strict> has been upgraded from version 1.09 to 1.11.
713
714=item *
715
716L<Term::ANSIColor> has been upgraded from version 4.03 to 4.04.
717
718=item *
719
720L<Term::Cap> has been upgraded from version 1.15 to 1.17.
721
722=item *
723
724L<Test> has been upgraded from version 1.26 to 1.28.
725
726=item *
727
728L<Test::Harness> has been upgraded from version 3.35 to 3.36.
729
730=item *
731
e7fffa3b 732L<Thread::Queue> has been upgraded from version 3.05 to 3.09.
d7d0a5d8
RS
733
734=item *
735
e7fffa3b 736L<threads> has been upgraded from version 2.01 to 2.07.
d7d0a5d8
RS
737
738=item *
739
e7fffa3b 740L<threads::shared> has been upgraded from version 1.48 to 1.51.
d7d0a5d8
RS
741
742=item *
743
744L<Tie::File> has been upgraded from version 1.01 to 1.02.
745
746=item *
747
748L<Tie::Scalar> has been upgraded from version 1.03 to 1.04.
749
750=item *
751
e7fffa3b 752L<Time::HiRes> has been upgraded from version 1.9726 to 1.9733.
d7d0a5d8
RS
753
754=item *
755
756L<Time::Piece> has been upgraded from version 1.29 to 1.31.
757
758=item *
759
760L<Unicode::Collate> has been upgraded from version 1.12 to 1.14.
761
762=item *
763
764L<Unicode::Normalize> has been upgraded from version 1.18 to 1.25.
765
766=item *
767
768L<Unicode::UCD> has been upgraded from version 0.61 to 0.64.
769
770=item *
771
772L<UNIVERSAL> has been upgraded from version 1.12 to 1.13.
773
774=item *
775
776L<utf8> has been upgraded from version 1.17 to 1.19.
777
778=item *
779
780L<version> has been upgraded from version 0.9909 to 0.9916.
781
782=item *
783
784L<warnings> has been upgraded from version 1.32 to 1.36.
785
786=item *
787
788L<Win32> has been upgraded from version 0.51 to 0.52.
789
790=item *
791
792L<Win32API::File> has been upgraded from version 0.1202 to 0.1203.
793
794=item *
795
796L<XS::Typemap> has been upgraded from version 0.13 to 0.14.
797
798=item *
799
800L<XSLoader> has been upgraded from version 0.20 to 0.21.
801
802=back
f3ed8cbf
RS
803
804=head1 Documentation
805
806=head2 Changes to Existing Documentation
807
808=head3 L<perlapi>
809
78a6ddfb 810=over 4
331b9876 811
0d4476e9
A
812=item *
813
f3ed8cbf
RS
814The process of using undocumented globals has been documented, namely, that one
815should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>
816first to get the go-ahead for documenting and using an undocumented function or
817global variable.
0d4476e9 818
78a6ddfb 819=back
0d4476e9 820
f3ed8cbf 821=head3 L<perlcall>
0d4476e9 822
78a6ddfb 823=over 4
0d4476e9
A
824
825=item *
826
f3ed8cbf 827A number of cleanups have been made to perlcall, including:
0d4476e9 828
f3ed8cbf 829=over 4
0d4476e9 830
f3ed8cbf
RS
831=item *
832
e40834e7 833use C<EXTEND(SP, n)> and C<PUSHs()> instead of C<XPUSHs()> where applicable
f3ed8cbf
RS
834and update prose to match
835
836=item *
0d4476e9 837
f3ed8cbf
RS
838add POPu, POPul and POPpbytex to the "complete list of POP macros"
839and clarify the documentation for some of the existing entries, and
840a note about side-effects
0d4476e9 841
f3ed8cbf 842=item *
0d4476e9 843
f3ed8cbf 844add API documentation for POPu and POPul
0d4476e9 845
f3ed8cbf 846=item *
0d4476e9 847
f3ed8cbf 848use ERRSV more efficiently
0d4476e9 849
f3ed8cbf
RS
850=item *
851
852approaches to thread-safety storage of SVs.
853
854=back
0d4476e9 855
f3ed8cbf 856=back
fc9da770 857
f3ed8cbf 858=head3 L<perlfunc>
fc9da770 859
78a6ddfb 860=over 4
0d4476e9
A
861
862=item *
863
f3ed8cbf
RS
864The documentation of C<hex> has been revised to clarify valid inputs.
865
866=item *
867
868Better explain meaning of negative PIDs in C<waitpid>.
869L<[perl #127080]|https://rt.perl.org/Ticket/Display.html?id=127080>
870
871=item *
872
873General cleanup: there's more consistency now (in POD usage, grammar, code
874examples), better practices in code examples (use of C<my>, removal of bareword
875filehandles, dropped usage of C<&> when calling subroutines, ...), etc.
0d4476e9 876
78a6ddfb 877=back
0d4476e9 878
f3ed8cbf 879=head3 L<perlguts>
0d4476e9 880
f3ed8cbf 881=over 4
0d4476e9 882
f3ed8cbf 883=item *
0d4476e9 884
f3ed8cbf
RS
885A new section has been added, L<perlguts/"Dynamic Scope and the Context
886Stack">, which explains how the perl context stack works.
0d4476e9 887
f3ed8cbf 888=back
0d4476e9 889
d15c85f6
KW
890=head3 L<perllocale>
891
892=over 4
893
8183f687
MH
894=item *
895
d15c85f6
KW
896A stronger caution about using locales in threaded applications is
897given. Locales are not thread-safe, and you can get wrong results or
898even segfaults if you use them there.
899
900=back
901
f3ed8cbf 902=head3 L<perlmodlib>
78a6ddfb
A
903
904=over 4
fc9da770
S
905
906=item *
907
f3ed8cbf
RS
908We now recommend contacting the module-authors list or PAUSE in seeking
909guidance on the naming of modules.
331b9876 910
af8a293f 911=back
a7e63acd 912
f3ed8cbf 913=head3 L<perlop>
fd12b912 914
054383b6 915=over 4
fd12b912
DG
916
917=item *
918
f3ed8cbf 919The documentation of C<qx//> now describes how C<$?> is affected.
206e921d 920
af8a293f 921=back
206e921d 922
f3ed8cbf 923=head3 L<perlpolicy>
d9d208b8 924
d7745c5b
DM
925=over 4
926
927=item *
928
f3ed8cbf
RS
929This note has been added to perlpolicy:
930
57a49117
KW
931 While civility is required, kindness is encouraged; if you have any
932 doubt about whether you are being civil, simply ask yourself, "Am I
933 being kind?" and aspire to that.
4511cd77 934
78a6ddfb 935=back
d7745c5b 936
f3ed8cbf
RS
937=head3 L<perlreftut>
938
939=over 4
940
941=item *
d7745c5b 942
f3ed8cbf 943Fix some examples to be L<strict> clean.
d7745c5b 944
f3ed8cbf 945=back
d7745c5b 946
f3ed8cbf 947=head3 L<perlrebackslash>
d7745c5b 948
78a6ddfb 949=over 4
d7745c5b 950
7d12a739 951=item *
d7745c5b 952
f3ed8cbf
RS
953Clarify that in languages like Japanese and Thai, dictionary lookup
954is required to determine word boundaries.
d7745c5b 955
6fee6573 956=back
d7745c5b 957
f3ed8cbf
RS
958=head3 L<perlsub>
959
960=over 4
d7745c5b 961
f3ed8cbf
RS
962=item *
963
964Updated to note that anonymous subroutines can have signatures.
965
966=back
d7745c5b 967
f3ed8cbf 968=head3 L<perlsyn>
d7745c5b 969
78a6ddfb 970=over 4
756bd853
SH
971
972=item *
973
f3ed8cbf
RS
974Fixed a broken example where C<=> was used instead of
975C<==> in conditional in do/while example.
d7745c5b 976
78a6ddfb 977=back
756bd853 978
f3ed8cbf
RS
979=head3 L<perltie>
980
981=over 4
982
983=item *
984
985The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified.
756bd853 986
f3ed8cbf 987=back
756bd853 988
f3ed8cbf 989=head3 L<perlunicode>
756bd853 990
78a6ddfb 991=over 4
756bd853 992
78a6ddfb
A
993=item *
994
76975f24 995Discourage use of 'In' as a prefix signifying the Unicode Block property.
756bd853 996
d7745c5b
DM
997=back
998
f3ed8cbf 999=head3 L<perlvar>
42d92f4a 1000
f3ed8cbf 1001=over 4
19b46ab5 1002
f3ed8cbf 1003=item *
23b4d8d6 1004
f3ed8cbf
RS
1005The documentation of C<$@> was reworded to clarify that it is not just for
1006syntax errors in C<eval>.
1007L<[perl #124034]|https://rt.perl.org/Ticket/Display.html?id=124034>
710d3eb3 1008
f3ed8cbf 1009=item *
710d3eb3 1010
f3ed8cbf
RS
1011The specific true value of C<$!{E...}> is now documented, noting that it is
1012subject to change and not guaranteed.
23b4d8d6 1013
f3ed8cbf 1014=item *
2aade621 1015
f3ed8cbf 1016Use of C<$OLD_PERL_VERSION> is now discouraged.
2aade621 1017
78a6ddfb 1018=back
7febee86 1019
f3ed8cbf 1020=head3 L<perlxs>
7febee86 1021
78a6ddfb 1022=over 4
7febee86 1023
f3ed8cbf 1024=item *
002a7765 1025
f3ed8cbf
RS
1026The documentation of C<PROTOTYPES> has been corrected; they are I<disabled>
1027by default, not I<enabled>.
84279daf 1028
78a6ddfb 1029=back
84279daf 1030
f3ed8cbf
RS
1031=head1 Diagnostics
1032
1033The following additions or changes have been made to diagnostic output,
1034including warnings and fatal error messages. For the complete list of
1035diagnostic messages, see L<perldiag>.
1036
1037=head2 New Diagnostics
84279daf 1038
f3ed8cbf 1039=head3 New Errors
7d12a739 1040
78a6ddfb 1041=over 4
84279daf 1042
f3ed8cbf 1043=item *
54e70d91 1044
f3ed8cbf 1045L<%s must not be a named sequence in transliteration operator|perldiag/"%s must not be a named sequence in transliteration operator">
46d34d0e 1046
f3ed8cbf 1047=item *
ac33c516 1048
f3ed8cbf 1049L<Can't find Unicode property definition "%s" in regex;|perldiag/"Can't find Unicode property definition "%s" in regex; marked by <-- HERE in m/%s/">
7d12a739 1050
f3ed8cbf 1051=item *
7d12a739 1052
f3ed8cbf
RS
1053L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s"">
1054
9857cc20
S
1055=item *
1056
f3ed8cbf 1057L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/">
7d12a739 1058
f3ed8cbf 1059=item *
7d12a739 1060
f3ed8cbf
RS
1061L<Empty \%c in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
1062|perldiag/"Empty \%c in regex; marked by <-- HERE in mE<sol>%sE<sol>">
1063
1064=item *
1065
1066L<Illegal user-defined property name|perldiag/"Illegal user-defined property name">
1067
1068=item *
1069
1070L<Invalid number '%s' for -C option.|perldiag/"Invalid number '%s' for -C option.">
1071
f3ed8cbf
RS
1072=item *
1073
1074L<<< Sequence (?... not terminated in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Sequence (?... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>>
1075
1076=item *
1077
1078L<<< Sequence (?PE<lt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
1079|perldiag/"Sequence (?PE<lt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>>
1080
1081=item *
1082
1083L<Sequence (?PE<gt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
1084|perldiag/"Sequence (?PE<gt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>">
3c84cb84 1085
f3ed8cbf 1086=back
0057cacf 1087
f3ed8cbf 1088=head3 New Warnings
7d12a739 1089
78a6ddfb 1090=over 4
7d12a739
A
1091
1092=item *
1093
f3ed8cbf
RS
1094L<Assuming NOT a POSIX class since %s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|
1095perldiag/Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in mE<sol>%sE<sol>>
1096
1097=item *
1098
1099L<%s() is deprecated on :utf8 handles|perldiag/"%s() is deprecated on :utf8 handles">
1100
78a6ddfb 1101=back
7d12a739 1102
f3ed8cbf
RS
1103=head2 Changes to Existing Diagnostics
1104
1105=over 4
1106
1107=item *
1108
1109Accessing the C<IO> part of a glob as C<FILEHANDLE> instead of C<IO> is no
1110longer deprecated. It is discouraged to encourage uniformity (so that, for
1111example, one can grep more easily) but it will not be removed.
1112L<[perl #127060]|https://rt.perl.org/Ticket/Display.html?id=127060>
1113
1114=item *
1115
1116The diagnostic C<< Hexadecimal float: internal error >> has been changed to
1117C<< Hexadecimal float: internal error (%s) >> to include more information.
1118
1119=item *
1120
1121L<Can't modify non-lvalue subroutine call of &%s|perldiag/"Can't modify non-lvalue subroutine call of &%s">
1122
1123This error now reports the name of the non-lvalue subroutine you attempted to
1124use as an lvalue.
7d12a739 1125
f3ed8cbf
RS
1126=item *
1127
1128When running out of memory during an attempt the increase the stack
1129size, previously, perl would die using the cryptic message
1130C<< panic: av_extend_guts() negative count (-9223372036854775681) >>.
1131This has been fixed to show the prettier message:
1132L<< Out of memory during stack extend|perldiag/"Out of memory during %s extend" >>
1133
1134=back
7d12a739 1135
f3ed8cbf 1136=head1 Configuration and Compilation
7d12a739 1137
78a6ddfb 1138=over 4
7d12a739 1139
78a6ddfb 1140=item *
7d12a739 1141
f3ed8cbf
RS
1142C<Configure> now acts as if the C<-O> option is always passed, allowing command
1143line options to override saved configuration. This should eliminate confusion
1144when command line options are ignored for no obvious reason. C<-O> is now
1145permitted, but ignored.
1146
1147=item *
1148
1149Bison 3.0 is now supported.
1150
1151=item *
1152
1153F<Configure> no longer probes for F<libnm> by default. Originally
1154this was the "New Math" library, but the name has been re-used by the
1155GNOME NetworkManager.
1156L<[perl #127131]|https://rt.perl.org/Ticket/Display.html?id=127131>
1157
1158=item *
1159
1160Added F<Configure> probes for C<newlocale>, C<freelocale>, and C<uselocale>.
1161
1162=item *
1163
1164C<< PPPort.so/PPPort.dll >> no longer get installed, as they are
1165not used by C<< PPPort.pm >>, only by its test files.
1166
1167=item *
1168
1169It is now possible to specify which compilation date to show on
1170C<< perl -V >> output, by setting the macro C<< PERL_BUILD_DATE >>.
1171
1172=item *
1173
1174Using the C<NO_HASH_SEED> define in combination with the default hash algorithm
1175C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling
1176the interpreter, since Perl 5.17.10. This has been fixed.
1177
1178=item *
1179
1180F<Configure> should handle spaces in paths a little better.
1181
1182=item *
1183
1184No longer generate EBCDIC POSIX-BC tables. We don't believe anyone is
1185using Perl and POSIX-BC at this time, and by not generating these tables
1186it saves time during development, and makes the resulting tar ball smaller.
1187
1188=item *
1189
1190The GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
1191
1192=item *
1193
1194You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
1195
1196=item *
1197
1198The Win32 miniperl now has a real C<getcwd> which increases build performance
1199resulting in C<getcwd()> being 605x faster in Win32 miniperl.
7d12a739 1200
9a10913b
TC
1201=item *
1202
1203Configure now takes C<-Dusequadmath> into account when calculating the
1204C<alignbytes> configuration variable. Previously the mis-calculated
1205C<alignbytes> could cause alignment errors on debugging builds. [perl
1206#127894]
1207
7d12a739 1208=back
5a74572e 1209
f3ed8cbf 1210=head1 Testing
e1ad135d 1211
78a6ddfb 1212=over 4
3ec37fe3 1213
78a6ddfb 1214=item *
3ec37fe3 1215
f3ed8cbf
RS
1216A new test (F<t/op/aassign.t>) has been added to test the list assignment operator
1217C<OP_AASSIGN>.
1218
1219=item *
1220
1221Parallel building has been added to the dmake C<makefile.mk> makefile. All
1222Win32 compilers are supported.
3ec37fe3 1223
78a6ddfb 1224=back
3ec37fe3 1225
f3ed8cbf
RS
1226=head1 Platform Support
1227
1228=head2 Platform-Specific Notes
1229
1230=over 4
78a6ddfb 1231
f3ed8cbf 1232=item AmigaOS
78a6ddfb 1233
8183f687
MH
1234=over 4
1235
1236=item *
1237
f3ed8cbf
RS
1238The AmigaOS port has been reintegrated into the main tree, based off of
1239Perl 5.22.1.
1240
8183f687
MH
1241=back
1242
f3ed8cbf
RS
1243=item Cygwin
1244
8183f687
MH
1245=over 4
1246
1247=item *
1248
f3ed8cbf
RS
1249Tests are more robust against unusual cygdrive prefixes.
1250L<[perl #126834]|https://rt.perl.org/Ticket/Display.html?id=126834>
1251
8183f687
MH
1252=back
1253
f3ed8cbf
RS
1254=item EBCDIC
1255
1256=over 4
1257
1258=item UTF-EBCDIC extended
1259
1260UTF-EBCDIC is like UTF-8, but for EBCDIC platforms. It now has been
1261extended so that it can represent code points up to 2 ** 64 - 1 on
1262platforms with 64-bit words. This brings it into parity with UTF-8.
1263This enhancement requires an incompatible change to the representation
1264of code points in the range 2 ** 30 to 2 ** 31 -1 (the latter was the
1265previous maximum representable code point). This means that a file that
1266contains one of these code points, written out with previous versions of
1267perl cannot be read in, without conversion, by a perl containing this
1268change. We do not believe any such files are in existence, but if you
1269do have one, submit a ticket at L<perlbug@perl.org|mailto:perlbug@perl.org>,
1270and we will write a conversion script for you.
1271
1272=item EBCDIC C<cmp()> and C<sort()> fixed for UTF-EBCDIC strings
3ec37fe3 1273
f3ed8cbf
RS
1274Comparing two strings that were both encoded in UTF-8 (or more
1275precisely, UTF-EBCDIC) did not work properly until now. Since C<sort()>
1276uses C<cmp()>, this fixes that as well.
1277
1278=item EBCDIC C<tr///> and C<y///> fixed for C<\N{}>, and C<S<use utf8>> ranges
1279
1280Perl v5.22 introduced the concept of portable ranges to regular
1281expression patterns. A portable range matches the same set of
1282characters no matter what platform is being run on. This concept is now
1283extended to C<tr///>. See
1284C<L<trE<sol>E<sol>E<sol>|perlop/trE<sol>SEARCHLISTE<sol>REPLACEMENTLISTE<sol>cdsr>>.
1285
1286There were also some problems with these operations under S<C<use
1287utf8>>, which are now fixed
1288
1289=back
1290
1291=item FreeBSD
1292
8183f687 1293=over 4
f3ed8cbf
RS
1294
1295=item *
1296
1297Use the C<fdclose()> function from FreeBSD if it is available.
1298L<[perl #126847]|https://rt.perl.org/Ticket/Display.html?id=126847>
1299
1300=back
1301
1302=item IRIX
1303
8183f687 1304=over 4
f3ed8cbf
RS
1305
1306=item *
1307
e40834e7 1308Under some circumstances IRIX stdio C<fgetc()> and C<fread()> set the errno to
f3ed8cbf
RS
1309C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno
1310is now cleared in such cases.
1311L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977>
1312
1313=item *
1314
1315Problems when multiplying long doubles by infinity have been fixed.
1316L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396>
1317
1318=back
1319
1320=item MacOS X
1321
8183f687 1322=over 4
f3ed8cbf
RS
1323
1324=item *
1325
1326Until now OS X builds of perl have specified a link target of 10.3 (Panther,
13272003) but have not specified a compiler target. From now on, builds of perl on
1328OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X
1329version and specify that as the explicit build target in both compiler and
1330linker flags, thus preserving binary compatibility for extensions built later
1331regardless of changes in OS X, SDK, or compiler and linker versions. To
1332override the default value used in the build and preserved in the flags,
1333specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building
1334perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or
1335earlier there is no change to the behavior present when those systems were
1336current; the link target is still OS X 10.3 and there is no explicit compiler
1337target.
1338
1339=item *
1340
1341Builds with both -DDEBUGGING and threading enabled would fail with a
1342"panic: free from wrong pool" error when built or tested from Terminal
1343on OS X. This was caused by perl's internal management of the
1344environment conflicting with an atfork handler using the libc
e40834e7 1345C<setenv()> function to update the environment.
f3ed8cbf 1346
e40834e7 1347Perl now uses C<setenv()>/C<unsetenv()> to update the environment on OS X.
f3ed8cbf
RS
1348L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
1349
1350=back
1351
1352=item Solaris
1353
8183f687
MH
1354=over 4
1355
1356=item *
1357
76975f24 1358All Solaris variants now build a shared libperl
f3ed8cbf
RS
1359
1360Solaris and variants like OpenIndiana now always build with the shared
1361Perl library (Configure -Duseshrplib). This was required for the
1362OpenIndiana builds, but this has also been the setting for Oracle/Sun
1363Perl builds for several years.
1364
8183f687
MH
1365=back
1366
f3ed8cbf
RS
1367=item Tru64
1368
8183f687
MH
1369=over 4
1370
1371=item *
1372
f3ed8cbf
RS
1373Workaround where Tru64 balks when prototypes are listed as
1374C<< PERL_STATIC_INLINE >>, but where the test is build with
1375C<< -DPERL_NO_INLINE_FUNCTIONS >>.
1376
8183f687
MH
1377=back
1378
f3ed8cbf
RS
1379=item VMS
1380
8183f687 1381=over 4
f3ed8cbf
RS
1382
1383=item *
1384
1385On VMS, the math function prototypes in C<math.h> are now visible under C++.
1386Now building the POSIX extension with C++ will no longer crash.
1387
1388=item *
1389
57a49117
KW
1390VMS has had C<setenv>/C<unsetenv> since v7.0 (released in 1996),
1391C<Perl_vmssetenv> now always uses C<setenv>/C<unsetenv>.
f3ed8cbf
RS
1392
1393=item *
1394
1395Perl now implements its own C<killpg> by scanning for processes in the
1396specified process group, which may not mean exactly the same thing as a Unix
1397process group, but allows us to send a signal to a parent (or master) process
1398and all of its sub-processes. At the perl level, this means we can now send a
1399negative pid like so:
1400
1401 kill SIGKILL, -$pid;
1402
1403to signal all processes in the same group as C<$pid>.
1404
1405=item *
1406
1407For those C<%ENV> elements based on the CRTL environ array, we've always
1408preserved case when setting them but did look-ups only after upcasing the
1409key first, which made lower- or mixed-case entries go missing. This problem
1410has been corrected by making C<%ENV> elements derived from the environ array
1411case-sensitive on look-up as well as case-preserving on store.
1412
1413=item *
1414
1415Environment look-ups for C<PERL5LIB> and C<PERLLIB> previously only
1416considered logical names, but now consider all sources of C<%ENV> as
1417determined by C<PERL_ENV_TABLES> and as documented in L<perlvms/%ENV>.
1418
1419=item *
1420
1421The minimum supported version of VMS is now v7.3-2, released in 2003. As a
1422side effect of this change, VAX is no longer supported as the terminal
1423release of OpenVMS VAX was v7.3 in 2001.
1424
1425=back
1426
1427=item Win32
1428
8183f687 1429=over 4
f3ed8cbf
RS
1430
1431=item *
1432
1433A new build option C<USE_NO_REGISTRY> has been added to the makefiles. This
1434option is off by default, meaning the default is to do Windows registry
1435lookups. This option stops Perl from looking inside the registry for anything.
1436For what values are looked up in the registry see L<perlwin32>. Internally, in
1437C, the name of this option is C<WIN32_NO_REGISTRY>.
1438
1439=item *
1440
1441The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and
1442C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV>
1443vars starting with C<PERL> has changed. Previously, the 2 keys were checked
76975f24
KW
1444for entries at all times through the perl process's life time even if
1445they did not
f3ed8cbf
RS
1446exist. For performance reasons, now, if the root key (i.e.
1447C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does
1448not exist at process start time, it will not be checked again for C<%ENV>
76975f24 1449override entries for the remainder of the perl process's life. This more
8183f687 1450closely matches Unix behavior in that the environment is copied or inherited
f3ed8cbf
RS
1451on startup and changing the variable in the parent process or another process
1452or editing F<.bashrc> will not change the environmental variable in other
1453existing, running, processes.
1454
1455=item *
1456
1457One glob fetch was removed for each C<-X> or C<stat> call whether done from
1458Perl code or internally from Perl's C code. The glob being looked up was
1459C<${^WIN32_SLOPPY_STAT}> which is a special variable. This makes C<-X> and
1460C<stat> slightly faster.
1461
1462=item *
1463
1464During miniperl's process startup, during the build process, 4 to 8 IO calls
1465related to the process starting F<.pl> and the F<buildcustomize.pl> file were
1466removed from the code opening and executing the first 1 or 2 F<.pl> files.
1467
1468=item *
1469
1470Builds using Microsoft Visual C++ 2003 and earlier no longer produce
1471an "INTERNAL COMPILER ERROR" message. [perl #126045]
1472
1473=item *
1474
1475Visual C++ 2013 builds will now execute on XP and higher. Previously they would
1476only execute on Vista and higher.
1477
1478=item *
1479
1480You can now build perl with GNU Make and GCC. [perl #123440]
1481
1482=item *
1483
1484C<truncate($filename, $size)> now works for files over 4GB in size.
1485[perl #125347]
1486
1487=item *
1488
1489Parallel building has been added to the dmake C<makefile.mk> makefile. All
1490Win32 compilers are supported.
1491
1492=item *
1493
1494Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would
1495result in an invalid C<$Config{archname}> for the resulting perl.
1496[perl #127584]
1497
1498=item *
1499
1500Errors set by Winsock functions are now put directly into C<$^E>, and the
1501relevant C<WSAE*> error codes are now exported from the L<Errno> and L<POSIX>
1502modules for testing this against.
1503
8183f687 1504The previous behavior of putting the errors (converted to POSIX-style C<E*>
f3ed8cbf
RS
1505error codes since Perl 5.20.0) into C<$!> was buggy due to the non-equivalence
1506of like-named Winsock and POSIX error constants, a relationship between which
1507has unfortunately been established in one way or another since Perl 5.8.0.
1508
8183f687 1509The new behavior provides a much more robust solution for checking Winsock
f3ed8cbf
RS
1510errors in portable software without accidentally matching POSIX tests that were
1511intended for other OSes and may have different meanings for Winsock.
1512
8183f687 1513The old behavior is currently retained, warts and all, for backwards
f3ed8cbf
RS
1514compatibility, but users are encouraged to change any code that tests C<$!>
1515against C<E*> constants for Winsock errors to instead test C<$^E> against
8183f687 1516C<WSAE*> constants. After a suitable deprecation period, the old behavior may
f3ed8cbf
RS
1517be removed, leaving C<$!> unchanged after Winsock function calls, to avoid any
1518possible confusion over which error variable to check.
1519
1520=back
1521
8183f687
MH
1522=item ppc64el
1523
1524=over 4
1525
1526=item floating point
f3ed8cbf
RS
1527
1528The floating point format of ppc64el (Debian naming for little-endian
1529PowerPC) is now detected correctly.
1530
1531=back
1532
8183f687
MH
1533=back
1534
f3ed8cbf
RS
1535=head1 Internal Changes
1536
1537=over 4
1538
1539=item *
1540
1541The implementation of perl's context stack system, and its internal API,
1542have been heavily reworked. Note that no significant changes have been
1543made to any external APIs, but XS code which relies on such internal
1544details may need to be fixed. The main changes are:
1545
1546=over 4
1547
1548=item *
1549
1550The C<PUSHBLOCK()>, C<POPSUB()> etc. macros have been replaced with static
1551inline functions such as C<cx_pushblock()>, C<cx_popsub()> etc. These use
1552function args rather than implicitly relying on local vars such as
1553C<gimme> and C<newsp> being available. Also their functionality has
1554changed: in particular, C<cx_popblock()> no longer decrements
1555C<cxstack_ix>. The ordering of the steps in the C<pp_leave*> functions
1556involving C<cx_popblock()>, C<cx_popsub()> etc. has changed. See the new
1557documentation, L<perlguts/"Dynamic Scope and the Context Stack">, for
1558details on how to use them.
1559
1560=item *
1561
1562Various macros, which now consistently have a CX_ prefix, have been added:
1563
1564 CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
1565
1566or renamed:
1567
1568 CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
1569
1570=item *
1571
1572C<cx_pushblock()> now saves C<PL_savestack_ix> and C<PL_tmps_floor>, so
1573C<pp_enter*> and C<pp_leave*> no longer do
1574
1575 ENTER; SAVETMPS; ....; LEAVE
1576
1577=item *
1578
1579C<cx_popblock()> now also restores C<PL_curpm>.
1580
1581=item *
1582
1583In C<dounwind()> for every context type, the current savestack frame is
1584now processed before each context is popped; formerly this was only done
1585for sub-like context frames. This action has been removed from
1586C<cx_popsub()> and placed into its own macro, C<CX_LEAVE_SCOPE(cx)>, which
1587must be called before C<cx_popsub()> etc.
1588
1589C<dounwind()> now also does a C<cx_popblock()> on the last popped frame
1590(formerly it only did the C<cx_popsub()> etc. actions on each frame).
1591
1592=item *
1593
1594The temps stack is now freed on scope exit; previously, temps created
1595during the last statement of a block wouldn't be freed until the next
1596C<nextstate> following the block (apart from an existing hack that did
1597this for recursive subs in scalar context); and in something like
1598C<f(g())>, the temps created by the last statement in C<g()> would
1599formerly not be freed until the statement following the return from
1600C<f()>.
1601
1602=item *
1603
1604Most values that were saved on the savestack on scope entry are now
1605saved in suitable new fields in the context struct, and saved and
1606restored directly by C<cx_pushfoo()> and C<cx_popfoo()>, which is much
1607faster.
1608
1609=item *
1610
1611Various context struct fields have been added, removed or modified.
1612
1613=item *
1614
1615The handling of C<@_> in C<cx_pushsub()> and C<cx_popsub()> has been
1616considerably tidied up, including removing the C<argarray> field from the
1617context struct, and extracting out some common (but rarely used) code into
1618a separate function, C<clear_defarray()>. Also, useful subsets of
1619C<cx_popsub()> which had been unrolled in places like C<pp_goto> have been
1620gathered into the new functions C<cx_popsub_args()> and
1621C<cx_popsub_common()>.
1622
1623=item *
1624
1625C<pp_leavesub> and C<pp_leavesublv> now use the same function as the rest
1626of the C<pp_leave*>'s to process return args.
1627
1628=item *
1629
1630C<CXp_FOR_PAD> and C<CXp_FOR_GV> flags have been added, and
1631C<CXt_LOOP_FOR> has been split into C<CXt_LOOP_LIST>, C<CXt_LOOP_ARY>.
1632
1633=item *
1634
1635Some variables formerly declared by C<dMULTICALL> (but not documented) have
1636been removed.
1637
1638=back
1639
1640=item *
1641
1642The obscure C<PL_timesbuf> variable, effectively a vestige of Perl 1, has
1643been removed. It was documented as deprecated in Perl 5.20, with a statement
1644that it would be removed early in the 5.21.x series; that has now finally
1645happened.
1646L<[perl #121351]|https://rt.perl.org/Ticket/Display.html?id=121351>
1647
1648=item *
1649
76975f24
KW
1650An unwarranted assertion in C<Perl_newATTRSUB_x()> has been removed. If
1651a stub subroutine
f3ed8cbf
RS
1652definition with a prototype has been seen, then any subsequent stub (or
1653definition) of the same subroutine with an attribute was causing an assertion
1654failure because of a null pointer.
1655L<[perl #126845]|https://rt.perl.org/Ticket/Display.html?id=126845>
1656
1657=item *
1658
76975f24 1659C<::> has been replaced by C<__> in C<ExtUtils::ParseXS>, like it's done for
f3ed8cbf
RS
1660parameters/return values. This is more consistent, and simplifies writing XS
1661code wrapping C++ classes into a nested Perl namespace (it requires only
1662a typedef for C<Foo__Bar> rather than two, one for C<Foo_Bar> and the other
1663for C<Foo::Bar>).
1664
1665=item *
1666
76975f24
KW
1667The C<to_utf8_case()> function is now deprecated. Instead use
1668C<toUPPER_utf8>, C<toTITLE_utf8>, C<toLOWER_utf8>, and C<toFOLD_utf8>.
1669(See L<http://nntp.perl.org/group/perl.perl5.porters/233287>.)
f3ed8cbf
RS
1670
1671=item *
1672
1673Perl core code and the threads extension have been annotated so that,
1674if Perl is configured to use threads, then during compile-time clang (3.6
1675or later) will warn about suspicious uses of mutexes.
1676See L<http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more
1677information.
1678
1679=item *
1680
1681The C<signbit()> emulation has been enhanced. This will help older
1682and/or more exotic platforms or configurations.
1683
f3ed8cbf
RS
1684
1685=item *
1686
76975f24
KW
1687Most EBCDIC-specific code in the core has been unified with non-EBCDIC
1688code, to avoid repetition and make maintenance easier.
f3ed8cbf
RS
1689
1690=item *
1691
1692MSWin32 code for C<$^X> has been moved out of the F<win32> directory to
1693F<caretx.c>, where other operating systems set that variable.
1694
1695=item *
1696
1697C<< sv_ref() >> is now part of the API.
1698
1699=item *
1700
1701L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>. It
1702previously has always returned C<0> since Perl 5.000 stable but that was
1703undocumented. Although C<sv_backoff> is marked as public API, XS code is not
1704expected to be impacted since the proper API call would be through public API
1705C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public
1706C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a
1707meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>.
1708
1709=item *
1710
1711The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues
1712with integer truncation and wrapping. In particular, some casts formerly used
1713within the macros have been removed. This means for example that passing an
e40834e7
KW
1714unsigned C<nitems> argument is likely to raise a compiler warning now
1715(it's always been documented to require a signed value; formerly int,
1716lately SSize_t).
f3ed8cbf
RS
1717
1718=item *
1719
1720C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed.
1721
1722=item *
1723
1724C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed.
1725
1726=back
1727
1728=head1 Selected Bug Fixes
1729
1730=over 4
1731
1732=item *
1733
1734It now works properly to specify a user-defined property, such as
1735
1736 qr/\p{mypkg1::IsMyProperty}/i
1737
1738with C</i> caseless matching, an explicit package name, and
1739I<IsMyProperty> not defined at the time of the pattern compilation.
1740
1741=item *
1742
e40834e7 1743Perl's C<memcpy()>, C<memmove()>, C<memset()> and C<memcmp()> fallbacks are now
f3ed8cbf
RS
1744more compatible with the originals. [perl #127619]
1745
1746=item *
1747
1748Fixed the issue where a C<< s///r >>) with B<< -DPERL_NO_COW >> attempts
1749to modify the source SV, resulting in the program dying. [perl #127635]
1750
1751=item *
1752
76975f24
KW
1753Fixed an EBCDIC-platform-only case where a pattern could fail to match. This
1754occurred when matching characters from the set of C1 controls when the
1755target matched string was in UTF-8.
f3ed8cbf
RS
1756
1757=item *
1758
f3ed8cbf
RS
1759Narrow the filename check in F<strict.pm> and F<warnings.pm>. Previously,
1760it assumed that if the filename (without the F<.pmc?> extension) differed
1761from the package name, if was a misspelled use statement (i.e. C<use Strict>
1762instead of C<use strict>). We now check whether there's really a
76975f24 1763miscapitalization happening, and not some other issue.
f3ed8cbf
RS
1764
1765=item *
1766
1767Turn an assertion into a more user friendly failure when parsing
1768regexes. [perl #127599]
1769
1770=item *
1771
1772Correctly raise an error when trying to compile patterns with
1773unterminated character classes while there are trailing backslashes.
1774[perl #126141].
1775
1776=item *
1777
1778Line numbers larger than 2**31-1 but less than 2**32 are no longer
e40834e7 1779returned by C<caller()> as negative numbers. [perl #126991]
f3ed8cbf
RS
1780
1781=item *
1782
1783C<< unless ( I<assignment> ) >> now properly warns when syntax
1784warnings are enabled. [perl #127122]
1785
1786=item *
1787
1788Setting an C<ISA> glob to an array reference now properly adds
1789C<isaelem> magic to any existing elements. Previously modifying such
1790an element would not update the ISA cache, so method calls would call
1791the wrong function. Perl would also crash if the C<ISA> glob was
1792destroyed, since new code added in 5.23.7 would try to release the
1793C<isaelem> magic from the elements. [perl #127351]
1794
1795=item *
1796
1797If a here-doc was found while parsing another operator, the parser had
1798already read end of file, and the here-doc was not terminated, perl
1799could produce an assertion or a segmentation fault. This now reliably
1800complains about the unterminated here-doc. [perl #125540]
1801
1802=item *
1803
e40834e7 1804C<untie()> would sometimes return the last value returned by the C<UNTIE()>
f3ed8cbf
RS
1805handler as well as it's normal value, messing up the stack. [perl
1806#126621]
1807
1808=item *
1809
1810Fixed an operator precedence problem when C< castflags & 2> is true.
1811[perl #127474]
1812
1813=item *
1814
1815Caching of DESTROY methods could result in a non-pointer or a
e40834e7
KW
1816non-STASH stored in the C<SvSTASH()> slot of a stash, breaking the B
1817C<STASH()> method. The DESTROY method is now cached in the MRO metadata
f3ed8cbf
RS
1818for the stash. [perl #126410]
1819
1820=item *
1821
1822The AUTOLOAD method is now called when searching for a DESTROY method,
1823and correctly sets C<$AUTOLOAD> too. [perl #124387] [perl #127494]
1824
1825=item *
1826
1827Avoid parsing beyond the end of the buffer when processing a C<#line>
1828directive with no filename. [perl #127334]
1829
1830=item *
1831
1832Perl now raises a warning when a regular expression pattern looks like
1833it was supposed to contain a POSIX class, like C<qr/[[:alpha:]]/>, but
1834there was some slight defect in its specification which causes it to
1835instead be treated as a regular bracketed character class. An example
1836would be missing the second colon in the above like this:
1837C<qr/[[:alpha]]/>. This compiles to match a sequence of two characters.
1838The second is C<"]">, and the first is any of: C<"[">, C<":">, C<"a">,
1839C<"h">, C<"l">, or C<"p">. This is unlikely to be the intended
1840meaning, and now a warning is raised. No warning is raised unless the
1841specification is very close to one of the 14 legal POSIX classes. (See
1842L<perlrecharclass/POSIX Character Classes>.)
1843[perl #8904]
1844
1845=item *
1846
1847Certain regex patterns involving a complemented POSIX class in an
1848inverted bracketed character class, and matching something else
1849optionally would improperly fail to match. An example of one that could
de1d2c78 1850fail is C<qr/_?[^\Wbar]\x{100}/>. This has been fixed.
f3ed8cbf
RS
1851[perl #127537]
1852
1853=item *
1854
1855Perl 5.22 added support to the C99 hexadecimal floating point notation,
1856but sometimes misparses hex floats. This has been fixed.
1857[perl #127183]
1858
1859=item *
1860
1861A regression that allowed undeclared barewords in hash keys to work despite
1862strictures has been fixed.
1863L<[perl #126981]|https://rt.perl.org/Ticket/Display.html?id=126981>
1864
1865=item *
1866
1867Calls to the placeholder C<&PL_sv_yes> used internally when an C<import()>
1868or C<unimport()> method isn't found now correctly handle scalar context.
1869L<[perl #126042]|https://rt.perl.org/Ticket/Display.html?id=126042>
1870
1871=item *
1872
1873Report more context when we see an array where we expect to see an
1874operator and avoid an assertion failure.
1875L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737>
1876
1877=item *
1878
1879Modifying an array that was previously a package C<@ISA> no longer
1880causes assertion failures or crashes.
1881L<[perl #123788]|https://rt.perl.org/Ticket/Display.html?id=123788>
1882
1883=item *
1884
1885Retain binary compatibility across plain and DEBUGGING perl builds.
1886L<[perl #127212]|https://rt.perl.org/Ticket/Display.html?id=127212>
1887
1888=item *
1889
1890Avoid leaking memory when setting C<$ENV{foo}> on darwin.
1891L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
1892
1893=item *
1894
1895C</...\G/> no longer crashes on utf8 strings. When C<\G> is a fixed number
1896of characters from the start of the regex, perl needs to count back that
1897many characters from the current C<pos()> position and start matching from
1898there. However, it was counting back bytes rather than characters, which
1899could lead to panics on utf8 strings.
1900
1901=item *
1902
1903In some cases operators that return integers would return negative
1904integers as large positive integers.
1905L<[perl #126635]|https://rt.perl.org/Ticket/Display.html?id=126635>
1906
1907=item *
1908
1909The C<pipe()> operator would assert for DEBUGGING builds instead of
1910producing the correct error message. The condition asserted on is
1911detected and reported on correctly without the assertions, so the
1912assertions were removed.
1913L<[perl #126480]|https://rt.perl.org/Ticket/Display.html?id=126480>
1914
1915=item *
1916
1917In some cases, failing to parse a here-doc would attempt to use freed
1918memory. This was caused by a pointer not being restored correctly.
1919L<[perl #126443]|https://rt.perl.org/Ticket/Display.html?id=126443>
1920
1921=item *
1922
1923C<< @x = sort { *a = 0; $a <=> $b } 0 .. 1 >> no longer frees the GP
1924for *a before restoring its SV slot.
1925L<[perl #124097]|https://rt.perl.org/Ticket/Display.html?id=124097>
1926
1927=item *
1928
1929Multiple problems with the new hexadecimal floating point printf
1930format C<%a> were fixed:
1931L<[perl #126582]|https://rt.perl.org/Ticket/Display.html?id=126582>,
1932L<[perl #126586]|https://rt.perl.org/Ticket/Display.html?id=126586>,
1933L<[perl #126822]|https://rt.perl.org/Ticket/Display.html?id=126822>
1934
1935=item *
1936
e40834e7 1937Calling C<mg_set()> in C<leave_scope()> no longer leaks.
f3ed8cbf
RS
1938
1939=item *
1940
1941A regression from Perl v5.20 was fixed in which debugging output of regular
1942expression compilation was wrong. (The pattern was correctly compiled, but
1943what got displayed for it was wrong.)
1944
1945=item *
1946
1947C<\b{sb}> works much better. In Perl v5.22.0, this new construct didn't
1948seem to give the expected results, yet passed all the tests in the
1949extensive suite furnished by Unicode. It turns out that it was because
1950these were short input strings, and the failures had to do with longer
1e922e44 1951inputs.
f3ed8cbf
RS
1952
1953=item *
1954
1955Certain syntax errors in
1956L<perlrecharclass/Extended Bracketed Character Classes> caused panics
1957instead of the proper error message. This has now been fixed. [perl
1958#126481]
1959
1960=item *
1961
76975f24 1962Perl 5.20 added a message when a quantifier in a regular
f3ed8cbf
RS
1963expression was useless, but then caused the parser to skip it;
1964this caused the surplus quantifier to be silently ignored, instead
1965of throwing an error. This is now fixed. [perl #126253]
1966
1967=item *
1968
1969The switch to building non-XS modules last in win32/makefile.mk (introduced
1970by design as part of the changes to enable parallel building) caused the
1971build of POSIX to break due to problems with the version module. This
1972is now fixed.
1973
1974=item *
1975
1976Improved parsing of hex float constants.
1977
1978=item *
1979
1980Fixed an issue with C<< pack >> where C<< pack "H" >> (and C<< pack "h" >>)
1981could read past the source when given a non-utf8 source, and a utf8 target.
1982[perl #126325]
1983
1984=item *
1985
1986Fixed several cases where perl would abort due to a segmentation fault,
1987or a C-level assert. [perl #126615], [perl #126602], [perl #126193].
1988
1989=item *
1990
1991There were places in regular expression patterns where comments (C<(?#...)>)
1992weren't allowed, but should have been. This is now fixed.
1993L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639>
1994
1995=item *
1996
1997Some regressions from Perl 5.20 have been fixed, in which some syntax errors in
1998L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs
1999within regular expression patterns could cause a segfault instead of a proper
2000error message.
2001L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180>
2002L<[perl #126404]|https://rt.perl.org/Ticket/Display.html?id=126404>
2003
2004=item *
2005
2006Another problem with
2007L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes>
2008constructs has been fixed wherein things like C<\c]> could cause panics.
2009L<[perl #126181]|https://rt.perl.org/Ticket/Display.html?id=126181>
2010
2011=item *
2012
2013Some problems with attempting to extend the perl stack to around 2G or 4G
2014entries have been fixed. This was particularly an issue on 32-bit perls built
2015to use 64-bit integers, and was easily noticeable with the list repetition
2016operator, e.g.
2017
2018 @a = (1) x $big_number
2019
2020Formerly perl may have crashed, depending on the exact value of C<$big_number>;
2021now it will typically raise an exception.
2022L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937>
2023
2024=item *
2025
2026In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if
2027the condition is C<(?!)> then perl failed the match outright instead of
2028matching the no-pattern. This has been fixed.
2029L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222>
2030
2031=item *
2032
2033The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional
2034argument and set C<REGERROR>/C<REGMARK> appropriately as well.
2035L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186>
2036
2037=item *
2038
76975f24 2039Several bugs, including a segmentation fault, have been fixed with the boundary
f3ed8cbf
RS
2040checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>,
2041C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>. All the C<\B{}> ones now match an empty
2042string; none of the C<\b{}> ones do.
2043L<[perl #126319]|https://rt.perl.org/Ticket/Display.html?id=126319>
2044
2045=item *
2046
2047Duplicating a closed file handle for write no longer creates a
2048filename of the form F<GLOB(0xXXXXXXXX)>. [perl #125115]
2049
2050=item *
2051
2052Warning fatality is now ignored when rewinding the stack. This
2053prevents infinite recursion when the now fatal error also causes
2054rewinding of the stack. [perl #123398]
2055
2056=item *
2057
2058In perl v5.22.0, the logic changed when parsing a numeric parameter to the -C
2059option, such that the successfully parsed number was not saved as the option
2060value if it parsed to the end of the argument. [perl #125381]
2061
2062=item *
2063
2064The PadlistNAMES macro is an lvalue again.
2065
2066=item *
2067
2068Zero -DPERL_TRACE_OPS memory for sub-threads.
2069
e40834e7 2070C<perl_clone_using()> was missing Zero init of PL_op_exec_cnt[]. This
f3ed8cbf
RS
2071caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly
2072large op-counts at destruct. These counts would print %x as "ABABABAB",
2073clearly a mem-poison value.
2074
2075=item *
2076
2077A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *>
2078or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These
2079particular typemap entries are thought to be extremely rarely used by XS
2080modules. [perl #124181]
2081
2082=item *
2083
2084C<alarm()> and C<sleep()> will now warn if the argument is a negative number
2085and return undef. Previously they would pass the negative value to the
2086underlying C function which may have set up a timer with a surprising value.
2087
2088=item *
2089
2090Perl can again be compiled with any Unicode version. This used to
2091(mostly) work, but was lost in v5.18 through v5.20. The property
2092C<Name_Alias> did not exist prior to Unicode 5.0. L<Unicode::UCD>
2093incorrectly said it did. This has been fixed.
2094
2095=item *
2096
2097Very large code-points (beyond Unicode) in regular expressions no
2098longer cause a buffer overflow in some cases when converted to UTF-8.
2099L<[perl #125826]|https://rt.perl.org/Ticket/Display.html?id=125826>
2100
2101=item *
2102
2103The integer overflow check for the range operator (...) in list
2104context now correctly handles the case where the size of the range is
2105larger than the address space. This could happen on 32-bits with
2106-Duse64bitint.
2107L<[perl #125781]|https://rt.perl.org/Ticket/Display.html?id=125781>
2108
2109=item *
2110
2111A crash with C<< %::=(); J->${\"::"} >> has been fixed.
2112L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541>
2113
2114=item *
2115
2116C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
2117[perl #125805]
2118
2119=item *
2120
2121Regular expression possessive quantifier v5.20 regression now fixed.
2122C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically
2123to C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>. Since v5.20, this didn't
2124work if I<min> and I<max> were equal. [perl #125825]
2125
2126=item *
2127
2128C<< BEGIN <> >> no longer segfaults and properly produces an error
2129message. [perl #125341]
2130
2131=item *
2132
2133In C<tr///> an illegal backwards range like C<tr/\x{101}-\x{100}//> was
2134not always detected, giving incorrect results. This is now fixed.
2135
2136=back
2137
fac0c351
RS
2138=head1 Known Problems
2139
2140=over 4
2141
2142=item *
2143
2144Some modules have been broken by the L<context stack rework|/Internal Changes>.
2145These modules were relying on non-guaranteed implementation details in perl.
2146Their maintainers have been informed, and should contact perl5-porters for
2147advice if needed. Below is a subset of these modules:
2148
2149=over 4
2150
2151=item L<Algorithm::Permute>
2152
2153=item L<Coro>
2154
2155L<Coro> and perl v5.22.0 were already incompatible due to a change in the perl,
2156and the reworking on the perl context stack creates a further incompatibility.
2157perl5-porters has L<discussed the issue on the mailing
2158list|http://www.nntp.perl.org/group/perl.perl5.porters/2016/05/msg236174.html>.
2159
656a5b9c
RS
2160=item L<Data::Alias>
2161
fac0c351
RS
2162=item L<RPerl>
2163
2164=item L<Scope::Upper>
2165
2166=item L<TryCatch>
2167
2168=back
2169
2170=item *
2171
2172The module L<lexical::underscore> no longer works on perl v5.24.0, because perl
2173no longer has a lexical C<$_>!
2174
2175=item *
2176
2177C<mod_perl> has been patched for compatibility for v5.22.0 and later but no
2178release has been made. The relevant patch (and other changes) can be found in
2179their source code repository, L<mirrored at
2180GitHub|https://github.com/apache/mod_perl/commit/82827132efd3c2e25cc413c85af61bb63375da6e>.
2181
2182=back
2183
f3ed8cbf 2184=head1 Acknowledgements
e1ad135d 2185
be2c0c65
RS
2186Perl 5.24.0 represents approximately 11 months of development since Perl 5.22.0
2187and contains approximately 360,000 lines of changes across 1,800 files from 77
2188authors.
2189
2190Excluding auto-generated files, documentation and release tools, there were
2191approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h files.
2192
2193Perl continues to flourish into its third decade thanks to a vibrant community
2194of users and developers. The following people are known to have contributed the
2195improvements that became Perl 5.24.0:
2196
2197Aaron Crane, Aaron Priven, Abigail, Achim Gratz, Alexander D'Archangel, Alex
2198Vandiver, Andreas König, Andy Broad, Andy Dougherty, Aristotle Pagaltzis,
2199Chase Whitener, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn
2200Ilmari Mannsåker, Dan Collins, Daniel Dragan, David Golden, David Mitchell,
2201Dominic Hargreaves, Doug Bell, Dr.Ruud, Ed Avis, Ed J, Father Chrysostomos,
2202Herbert Breunung, H.Merijn Brand, Hugo van der Sanden, Ivan Pozdeev, James E
2203Keenan, Jan Dubois, Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, John
2204Peacock, John SJ Anderson, Karen Etheridge, Karl Williamson, kmx, Leon
2205Timmermans, Ludovic E. R. Tolhurst-Cleaver, Lukas Mai, Martijn Lievaart,
2206Matthew Horsfall, Mattia Barbon, Max Maischein, Mohammed El-Afifi, Nicholas
2207Clark, Nicolas R., Niko Tyni, Peter John Acklam, Peter Martini, Peter
2208Rabbitson, Pip Cet, Rafael Garcia-Suarez, Reini Urban, Renee Baecker, Ricardo
2209Signes, Sawyer X, Shlomi Fish, Sisyphus, Stanislaw Pusep, Steffen Müller,
2210Stevan Little, Steve Hay, Sullivan Beck, Thomas Sibley, Todd Rinaldo, Tom
2211Hukins, Tony Cook, Unicode Consortium, Victor Adam, Vincent Pit, Vladimir
2212Timofeev, Yves Orton, Zachary Storer, Zefram.
2213
2214The list above is almost certainly incomplete as it is automatically generated
2215from version control history. In particular, it does not include the names of
2216the (very much appreciated) contributors who reported issues to the Perl bug
2217tracker.
2218
2219Many of the changes included in this version originated in the CPAN modules
2220included in Perl's core. We're grateful to the entire CPAN community for
2221helping Perl to flourish.
2222
2223For a more complete list of all of Perl's historical contributors, please see
2224the F<AUTHORS> file in the Perl source distribution.
f5b73711 2225
44691e6f
AB
2226=head1 Reporting Bugs
2227
e08634c5
SH
2228If you find what you think is a bug, you might check the articles recently
2229posted to the comp.lang.perl.misc newsgroup and the perl bug database at
f3ed8cbf
RS
2230https://rt.perl.org/ . There may also be information at
2231http://www.perl.org/ , the Perl Home Page.
44691e6f 2232
e08634c5
SH
2233If you believe you have an unreported bug, please run the L<perlbug> program
2234included with your release. Be sure to trim your bug down to a tiny but
2235sufficient test case. Your bug report, along with the output of C<perl -V>,
2236will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 2237
87c118b9
DM
2238If the bug you are reporting has security implications which make it
2239inappropriate to send to a publicly archived mailing list, then see
2240L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
2241for details of how to report the issue.
44691e6f
AB
2242
2243=head1 SEE ALSO
2244
e08634c5
SH
2245The F<Changes> file for an explanation of how to view exhaustive details on
2246what changed.
44691e6f
AB
2247
2248The F<INSTALL> file for how to build Perl.
2249
2250The F<README> file for general stuff.
2251
2252The F<Artistic> and F<Copying> files for copyright information.
2253
2254=cut