5 perl5240delta - what is new for perl v5.24.0
9 This document describes the differences between the 5.22.0 release and the
12 =head1 Core Enhancements
14 =head2 Postfix dereferencing is no longer experimental
16 Using the C<postderef> and C<postderef_qq> features no longer emits a
17 warning. Existing code that disables the C<experimental::postderef> warning
18 category that they previously used will continue to work. The C<postderef>
19 feature has no effect; all Perl code can use postfix dereferencing,
20 regardless of what feature declarations are in scope. The C<5.24> feature
21 bundle now includes the C<postderef_qq> feature.
23 =head2 Unicode 8.0 is now supported
25 For details on what is in this release, see
26 L<http://www.unicode.org/versions/Unicode8.0.0/>.
28 =head2 perl will now croak when closing an in-place output file fails
30 Until now, failure to close the output file for an in-place edit was not
31 detected, meaning that the input file could be clobbered without the edit being
32 successfully completed. Now, when the output file cannot be closed
33 successfully, an exception is raised.
35 =head2 New C<\b{lb}> boundary in regular expressions
37 C<lb> stands for Line Break. It is a Unicode property
38 that determines where a line of text is suitable to break (typically so
39 that it can be output without overflowing the available horizontal
40 space). This capability has long been furnished by the
41 L<Unicode::LineBreak> module, but now a light-weight, non-customizable
42 version that is suitable for many purposes is in core Perl.
44 =head2 C<qr/(?[ ])/> now works in UTF-8 locales
46 L<Extended Bracketed Character Classes|perlrecharclass/Extended Bracketed Character Classes>
47 now will successfully compile when S<C<use locale>> is in effect. The compiled
48 pattern will use standard Unicode rules. If the runtime locale is not a
49 UTF-8 one, a warning is raised and standard Unicode rules are used
50 anyway. No tainting is done since the outcome does not actually depend
53 =head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined
55 Negative shifts are reverse shifts: left shift becomes right shift,
56 and right shift becomes left shift.
58 Shifting by the number of bits in a native integer (or more) is zero,
59 except when the "overshift" is right shifting a negative value under
60 C<use integer>, in which case the result is -1 (arithmetic shift).
62 Until now negative shifting and overshifting have been undefined
63 because they have relied on whatever the C implementation happens
64 to do. For example, for the overshift a common C behavior is
67 1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior.
69 # And the same for <<, while Perl now produces 0 for both.
71 Now these behaviors are well-defined under Perl, regardless of what
72 the underlying C implementation does. Note, however, that you are still
73 constrained by the native integer width: you need to know how far left you
74 can go. You can use for example:
77 my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3.
79 If you need a more bits on the left shift, you can use for example
80 the C<bigint> pragma, or the C<Bit::Vector> module from CPAN.
82 =head2 printf and sprintf now allow reordered precision arguments
84 That is, C<< sprintf '|%.*2$d|', 2, 3 >> now returns C<|002|>. This extends
85 the existing reordering mechanism (which allows reordering for arguments
86 that are used as format fields, widths, and vector separators).
88 =head2 More fields provided to C<sigaction> callback with C<SA_SIGINFO>
90 When passing the C<SA_SIGINFO> flag to L<sigaction|POSIX/sigaction>, the
91 C<errno>, C<status>, C<uid>, C<pid>, C<addr> and C<band> fields are now
92 included in the hash passed to the handler, if supported by the
95 =head2 Hashbang redirection to Perl 6
97 Previously perl would redirect to another interpreter if it found a
98 hashbang path unless the path contains "perl" (see L<perlrun>). To improve
99 compatibility with Perl 6 this behavior has been extended to also redirect
100 if "perl" is followed by "6".
104 =head2 Set proper umask before calling C<mkstemp(3)>
106 In 5.22 perl started setting umask to 0600 before calling C<mkstemp(3)>
107 and restoring it afterwards. This wrongfully tells C<open(2)> to strip
108 the owner read and write bits from the given mode before applying it,
109 rather than the intended negation of leaving only those bits in place.
111 Systems that use mode 0666 in C<mkstemp(3)> (like old versions of
112 glibc) create a file with permissions 0066, leaving world read and
113 write permissions regardless of current umask.
115 This has been fixed by using umask 0177 instead. [perl #127322]
117 =head2 Fix out of boundary access in Win32 path handling
119 This is CVE-2015-8608. For more information see
120 L<[GH #15067]|https://github.com/Perl/perl5/issues/15067>
122 =head2 Fix loss of taint in canonpath
124 This is CVE-2015-8607. For more information see
125 L<[GH #15084]|https://github.com/Perl/perl5/issues/15084>
127 =head2 Avoid accessing uninitialized memory in win32 C<crypt()>
129 Added validation that will detect both a short salt and invalid characters
131 L<[GH #15091]|https://github.com/Perl/perl5/issues/15091>
133 =head2 Remove duplicate environment variables from C<environ>
135 Previously, if an environment variable appeared more than once in
136 C<environ[]>, C<%ENV> would contain the last entry for that name,
137 while a typical C<getenv()> would return the first entry. We now
138 make sure C<%ENV> contains the same as what C<getenv> returns.
140 Second, we remove duplicates from C<environ[]>, so if a setting
141 with that name is set in C<%ENV>, we won't pass an unsafe value
146 =head1 Incompatible Changes
148 =head2 The C<autoderef> feature has been removed
150 The experimental C<autoderef> feature (which allowed calling C<push>,
151 C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on
152 a scalar argument) has been deemed unsuccessful. It has now been removed;
153 trying to use the feature (or to disable the C<experimental::autoderef>
154 warning it previously triggered) now yields an exception.
156 =head2 Lexical $_ has been removed
158 C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion
159 with no obvious solution. In Perl 5.18.0, it was made experimental on the
160 theory that it would either be removed or redesigned in a less confusing (but
161 backward-incompatible) way. Over the following years, no alternatives were
162 proposed. The feature has now been removed and will fail to compile.
164 =head2 C<qr/\b{wb}/> is now tailored to Perl expectations
166 This is now more suited to be a drop-in replacement for plain C<\b>, but
167 giving better results for parsing natural language. Previously it
168 strictly followed the current Unicode rules which calls for it to match
169 between each white space character. Now it doesn't generally match
170 within spans of white space, behaving like C<\b> does. See
171 L<perlrebackslash/\b{wb}>
173 =head2 Regular expression compilation errors
175 Some regular expression patterns that had runtime errors now
176 don't compile at all.
178 Almost all Unicode properties using the C<\p{}> and C<\P{}> regular
179 expression pattern constructs are now checked for validity at pattern
180 compilation time, and invalid ones will cause the program to not
181 compile. In earlier releases, this check was often deferred until run
182 time. Whenever an error check is moved from run- to compile time,
183 erroneous code is caught 100% of the time, whereas before it would only
184 get caught if and when the offending portion actually gets executed,
185 which for unreachable code might be never.
187 =head2 C<qr/\N{}/> now disallowed under C<use re "strict">
189 An empty C<\N{}> makes no sense, but for backwards compatibility is
190 accepted as doing nothing, though a deprecation warning is raised by
191 default. But now this is a fatal error under the experimental feature
194 =head2 Nested declarations are now disallowed
196 A C<my>, C<our>, or C<state> declaration is no longer allowed inside
197 of another C<my>, C<our>, or C<state> declaration.
199 For example, these are now fatal:
204 L<[GH #14799]|https://github.com/Perl/perl5/issues/14799>
206 L<[GH #13548]|https://github.com/Perl/perl5/issues/13548>
208 =head2 The C</\C/> character class has been removed.
210 This regular expression character class was deprecated in v5.20.0 and has
211 produced a deprecation warning since v5.22.0. It is now a compile-time
212 error. If you need to examine the individual bytes that make up a
213 UTF8-encoded character, then use C<utf8::encode()> on the string (or a
216 =head2 C<chdir('')> no longer chdirs home
218 Using C<chdir('')> or C<chdir(undef)> to chdir home has been deprecated since
219 perl v5.8, and will now fail. Use C<chdir()> instead.
221 =head2 ASCII characters in variable names must now be all visible
223 It was legal until now on ASCII platforms for variable names to contain
224 non-graphical ASCII control characters (ordinals 0 through 31, and 127,
225 which are the C0 controls and C<DELETE>). This usage has been
226 deprecated since v5.20, and as of now causes a syntax error. The
227 variables these names referred to are special, reserved by Perl for
228 whatever use it may choose, now, or in the future. Each such variable
229 has an alternative way of spelling it. Instead of the single
230 non-graphic control character, a two character sequence beginning with a
231 caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>. Details are at
232 L<perlvar>. It remains legal, though unwise and deprecated (raising a
233 deprecation warning), to use certain non-graphic non-ASCII characters in
234 variables names when not under S<C<use utf8>>. No code should do this,
235 as all such variables are reserved by Perl, and Perl doesn't currently
236 define any of them (but could at any time, without notice).
238 =head2 An off by one issue in C<$Carp::MaxArgNums> has been fixed
240 C<$Carp::MaxArgNums> is supposed to be the number of arguments to display.
241 Prior to this version, it was instead showing C<$Carp::MaxArgNums> + 1 arguments,
242 contrary to the documentation.
244 =head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>.
246 The experimental Extended Bracketed Character Classes can contain regular
247 bracketed character classes within them. These differ from regular ones in
248 that white space is generally ignored, unless escaped by preceding it with a
249 backslash. The white space that is ignored is now limited to just tab C<\t>
250 and SPACE characters. Previously, it was any white space. See
251 L<perlrecharclass/Extended Bracketed Character Classes>.
255 =head2 Using code points above the platform's C<IV_MAX> is now deprecated
257 Unicode defines code points in the range C<0..0x10FFFF>. Some standards
258 at one time defined them up to 2**31 - 1, but Perl has allowed them to
259 be as high as anything that will fit in a word on the platform being
260 used. However, use of those above the platform's C<IV_MAX> is broken in
261 some constructs, notably C<tr///>, regular expression patterns involving
262 quantifiers, and in some arithmetic and comparison operations, such as
263 being the upper limit of a loop. Now the use of such code points raises
264 a deprecation warning, unless that warning category is turned off.
265 C<IV_MAX> is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on
268 =head2 Doing bitwise operations on strings containing code points above
271 The string bitwise operators treat their operands as strings of bytes,
272 and values beyond 0xFF are nonsensical in this context. To operate on
273 encoded bytes, first encode the strings. To operate on code points'
274 numeric values, use C<split> and C<map ord>. In the future, this
275 warning will be replaced by an exception.
277 =head2 C<sysread()>, C<syswrite()>, C<recv()> and C<send()> are deprecated on
280 The C<sysread()>, C<recv()>, C<syswrite()> and C<send()> operators
281 are deprecated on handles that have the C<:utf8> layer, either
282 explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
284 Both C<sysread()> and C<recv()> currently use only the C<:utf8> flag for the
285 stream, ignoring the actual layers. Since C<sysread()> and C<recv()> do no
286 UTF-8 validation they can end up creating invalidly encoded scalars.
288 Similarly, C<syswrite()> and C<send()> use only the C<:utf8> flag, otherwise
289 ignoring any layers. If the flag is set, both write the value UTF-8
290 encoded, even if the layer is some different encoding, such as the
293 Ideally, all of these operators would completely ignore the C<:utf8>
294 state, working only with bytes, but this would result in silently
295 breaking existing code. To avoid this a future version of perl will
296 throw an exception when any of C<sysread()>, C<recv()>, C<syswrite()> or C<send()>
297 are called on handle with the C<:utf8> layer.
299 =head1 Performance Enhancements
305 The overhead of scope entry and exit has been considerably reduced, so
306 for example subroutine calls, loops and basic blocks are all faster now.
307 This empty function call now takes about a third less time to execute:
313 Many languages, such as Chinese, are caseless. Perl now knows about
314 most common ones, and skips much of the work when
315 a program tries to change case in them (like C<ucfirst()>) or match
316 caselessly (C<qr//i>). This will speed up a program, such as a web
317 server, that can operate on multiple languages, while it is operating on a
322 C</fixed-substr/> has been made much faster.
324 On platforms with a libc C<memchr()> implementation which makes good use of
325 underlying hardware support, patterns which include fixed substrings will now
326 often be much faster; for example with glibc on a recent x86_64 CPU, this:
328 $s = "a" x 1000 . "wxyz";
329 $s =~ /wxyz/ for 1..30000
331 is now about 7 times faster. On systems with slow C<memchr()>, e.g. 32-bit ARM
332 Raspberry Pi, there will be a small or little speedup. Conversely, some
333 pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3
334 times slower on the rPi, 1.5x slower on x86_64.
338 Faster addition, subtraction and multiplication.
340 Since 5.8.0, arithmetic became slower due to the need to support
341 64-bit integers. To deal with 64-bit integers, a lot more corner
342 cases need to be checked, which adds time. We now detect common
343 cases where there is no need to check for those corner cases,
344 and special-case them.
348 Preincrement, predecrement, postincrement, and postdecrement have been
349 made faster by internally splitting the functions which handled multiple
350 cases into different functions.
354 Creating Perl debugger data structures (see L<perldebguts/"Debugger Internals">)
355 for XSUBs and const subs has been removed. This removed one glob/scalar combo
356 for 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.
358 Loading XS modules created more glob/scalar combos. These things were
359 being created regardless of whether the perl debugger was being used,
360 and despite the fact that it can't debug C code anyway
364 On Win32, C<stat>ing or C<-X>ing a path, if the file or directory does not
365 exist, is now 3.5x faster than before.
369 Single arguments in list assign are now slightly faster:
376 Less peak memory is now used when compiling regular expression patterns.
380 =head1 Modules and Pragmata
382 =head2 Updated Modules and Pragmata
388 L<arybase> has been upgraded from version 0.10 to 0.11.
392 L<Attribute::Handlers> has been upgraded from version 0.97 to 0.99.
396 L<autodie> has been upgraded from version 2.26 to 2.29.
400 L<autouse> has been upgraded from version 1.08 to 1.11.
404 L<B> has been upgraded from version 1.58 to 1.62.
408 L<B::Deparse> has been upgraded from version 1.35 to 1.37.
412 L<base> has been upgraded from version 2.22 to 2.23.
416 L<Benchmark> has been upgraded from version 1.2 to 1.22.
420 L<bignum> has been upgraded from version 0.39 to 0.42.
424 L<bytes> has been upgraded from version 1.04 to 1.05.
428 L<Carp> has been upgraded from version 1.36 to 1.40.
432 L<Compress::Raw::Bzip2> has been upgraded from version 2.068 to 2.069.
436 L<Compress::Raw::Zlib> has been upgraded from version 2.068 to 2.069.
440 L<Config::Perl::V> has been upgraded from version 0.24 to 0.25.
444 L<CPAN::Meta> has been upgraded from version 2.150001 to 2.150005.
448 L<CPAN::Meta::Requirements> has been upgraded from version 2.132 to 2.140.
452 L<CPAN::Meta::YAML> has been upgraded from version 0.012 to 0.018.
456 L<Data::Dumper> has been upgraded from version 2.158 to 2.160.
460 L<Devel::Peek> has been upgraded from version 1.22 to 1.23.
464 L<Devel::PPPort> has been upgraded from version 3.31 to 3.32.
468 L<Dumpvalue> has been upgraded from version 1.17 to 1.18.
472 L<DynaLoader> has been upgraded from version 1.32 to 1.38.
476 L<Encode> has been upgraded from version 2.72 to 2.80.
480 L<encoding> has been upgraded from version 2.14 to 2.17.
484 L<encoding::warnings> has been upgraded from version 0.11 to 0.12.
488 L<English> has been upgraded from version 1.09 to 1.10.
492 L<Errno> has been upgraded from version 1.23 to 1.25.
496 L<experimental> has been upgraded from version 0.013 to 0.016.
500 L<ExtUtils::CBuilder> has been upgraded from version 0.280221 to 0.280225.
504 L<ExtUtils::Embed> has been upgraded from version 1.32 to 1.33.
508 L<ExtUtils::MakeMaker> has been upgraded from version 7.04_01 to 7.10_01.
512 L<ExtUtils::ParseXS> has been upgraded from version 3.28 to 3.31.
516 L<ExtUtils::Typemaps> has been upgraded from version 3.28 to 3.31.
520 L<feature> has been upgraded from version 1.40 to 1.42.
524 L<fields> has been upgraded from version 2.17 to 2.23.
528 L<File::Find> has been upgraded from version 1.29 to 1.34.
532 L<File::Glob> has been upgraded from version 1.24 to 1.26.
536 L<File::Path> has been upgraded from version 2.09 to 2.12_01.
540 L<File::Spec> has been upgraded from version 3.56 to 3.63.
544 L<Filter::Util::Call> has been upgraded from version 1.54 to 1.55.
548 L<Getopt::Long> has been upgraded from version 2.45 to 2.48.
552 L<Hash::Util> has been upgraded from version 0.18 to 0.19.
556 L<Hash::Util::FieldHash> has been upgraded from version 1.15 to 1.19.
560 L<HTTP::Tiny> has been upgraded from version 0.054 to 0.056.
564 L<I18N::Langinfo> has been upgraded from version 0.12 to 0.13.
568 L<if> has been upgraded from version 0.0604 to 0.0606.
572 L<IO> has been upgraded from version 1.35 to 1.36.
576 IO-Compress has been upgraded from version 2.068 to 2.069.
580 L<IPC::Open3> has been upgraded from version 1.18 to 1.20.
584 L<IPC::SysV> has been upgraded from version 2.04 to 2.06_01.
588 L<List::Util> has been upgraded from version 1.41 to 1.42_02.
592 L<locale> has been upgraded from version 1.06 to 1.08.
596 L<Locale::Codes> has been upgraded from version 3.34 to 3.37.
600 L<Math::BigInt> has been upgraded from version 1.9997 to 1.999715.
604 L<Math::BigInt::FastCalc> has been upgraded from version 0.31 to 0.40.
608 L<Math::BigRat> has been upgraded from version 0.2608 to 0.260802.
612 L<Module::CoreList> has been upgraded from version 5.20150520 to 5.20160320.
616 L<Module::Metadata> has been upgraded from version 1.000026 to 1.000031.
620 L<mro> has been upgraded from version 1.17 to 1.18.
624 L<ODBM_File> has been upgraded from version 1.12 to 1.14.
628 L<Opcode> has been upgraded from version 1.32 to 1.34.
632 L<parent> has been upgraded from version 0.232 to 0.234.
636 L<Parse::CPAN::Meta> has been upgraded from version 1.4414 to 1.4417.
640 L<Perl::OSType> has been upgraded from version 1.008 to 1.009.
644 L<perlfaq> has been upgraded from version 5.021009 to 5.021010.
648 L<PerlIO::encoding> has been upgraded from version 0.21 to 0.24.
652 L<PerlIO::mmap> has been upgraded from version 0.014 to 0.016.
656 L<PerlIO::scalar> has been upgraded from version 0.22 to 0.24.
660 L<PerlIO::via> has been upgraded from version 0.15 to 0.16.
664 L<Pod::Functions> has been upgraded from version 1.09 to 1.10.
668 L<Pod::Perldoc> has been upgraded from version 3.25 to 3.25_02.
672 L<Pod::Simple> has been upgraded from version 3.29 to 3.32.
676 L<Pod::Usage> has been upgraded from version 1.64 to 1.68.
680 L<POSIX> has been upgraded from version 1.53 to 1.65.
684 L<Scalar::Util> has been upgraded from version 1.41 to 1.42_02.
688 L<SDBM_File> has been upgraded from version 1.13 to 1.14.
692 L<SelfLoader> has been upgraded from version 1.22 to 1.23.
696 L<Socket> has been upgraded from version 2.018 to 2.020_03.
700 L<Storable> has been upgraded from version 2.53 to 2.56.
704 L<strict> has been upgraded from version 1.09 to 1.11.
708 L<Term::ANSIColor> has been upgraded from version 4.03 to 4.04.
712 L<Term::Cap> has been upgraded from version 1.15 to 1.17.
716 L<Test> has been upgraded from version 1.26 to 1.28.
720 L<Test::Harness> has been upgraded from version 3.35 to 3.36.
724 L<Thread::Queue> has been upgraded from version 3.05 to 3.08.
728 L<threads> has been upgraded from version 2.01 to 2.06.
732 L<threads::shared> has been upgraded from version 1.48 to 1.50.
736 L<Tie::File> has been upgraded from version 1.01 to 1.02.
740 L<Tie::Scalar> has been upgraded from version 1.03 to 1.04.
744 L<Time::HiRes> has been upgraded from version 1.9726 to 1.9732.
748 L<Time::Piece> has been upgraded from version 1.29 to 1.31.
752 L<Unicode::Collate> has been upgraded from version 1.12 to 1.14.
756 L<Unicode::Normalize> has been upgraded from version 1.18 to 1.25.
760 L<Unicode::UCD> has been upgraded from version 0.61 to 0.64.
764 L<UNIVERSAL> has been upgraded from version 1.12 to 1.13.
768 L<utf8> has been upgraded from version 1.17 to 1.19.
772 L<version> has been upgraded from version 0.9909 to 0.9916.
776 L<warnings> has been upgraded from version 1.32 to 1.36.
780 L<Win32> has been upgraded from version 0.51 to 0.52.
784 L<Win32API::File> has been upgraded from version 0.1202 to 0.1203.
788 L<XS::Typemap> has been upgraded from version 0.13 to 0.14.
792 L<XSLoader> has been upgraded from version 0.20 to 0.21.
798 =head2 Changes to Existing Documentation
806 The process of using undocumented globals has been documented, namely, that one
807 should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>
808 first to get the go-ahead for documenting and using an undocumented function or
819 A number of cleanups have been made to perlcall, including:
825 use C<EXTEND(SP, n)> and C<PUSHs()> instead of C<XPUSHs()> where applicable
826 and update prose to match
830 add POPu, POPul and POPpbytex to the "complete list of POP macros"
831 and clarify the documentation for some of the existing entries, and
832 a note about side-effects
836 add API documentation for POPu and POPul
840 use ERRSV more efficiently
844 approaches to thread-safety storage of SVs.
856 The documentation of C<hex> has been revised to clarify valid inputs.
860 Better explain meaning of negative PIDs in C<waitpid>.
861 L<[GH #15108]|https://github.com/Perl/perl5/issues/15108>
865 General cleanup: there's more consistency now (in POD usage, grammar, code
866 examples), better practices in code examples (use of C<my>, removal of bareword
867 filehandles, dropped usage of C<&> when calling subroutines, ...), etc.
877 A new section has been added, L<perlguts/"Dynamic Scope and the Context
878 Stack">, which explains how the perl context stack works.
888 A stronger caution about using locales in threaded applications is
889 given. Locales are not thread-safe, and you can get wrong results or
890 even segfaults if you use them there.
900 We now recommend contacting the module-authors list or PAUSE in seeking
901 guidance on the naming of modules.
911 The documentation of C<qx//> now describes how C<$?> is affected.
921 This note has been added to perlpolicy:
923 While civility is required, kindness is encouraged; if you have any
924 doubt about whether you are being civil, simply ask yourself, "Am I
925 being kind?" and aspire to that.
935 Fix some examples to be L<strict> clean.
939 =head3 L<perlrebackslash>
945 Clarify that in languages like Japanese and Thai, dictionary lookup
946 is required to determine word boundaries.
956 Updated to note that anonymous subroutines can have signatures.
966 Fixed a broken example where C<=> was used instead of
967 C<==> in conditional in do/while example.
977 The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified.
981 =head3 L<perlunicode>
987 Discourage use of 'In' as a prefix signifying the Unicode Block property.
997 The documentation of C<$@> was reworded to clarify that it is not just for
998 syntax errors in C<eval>.
999 L<[GH #14572]|https://github.com/Perl/perl5/issues/14572>
1003 The specific true value of C<$!{E...}> is now documented, noting that it is
1004 subject to change and not guaranteed.
1008 Use of C<$OLD_PERL_VERSION> is now discouraged.
1018 The documentation of C<PROTOTYPES> has been corrected; they are I<disabled>
1019 by default, not I<enabled>.
1025 The following additions or changes have been made to diagnostic output,
1026 including warnings and fatal error messages. For the complete list of
1027 diagnostic messages, see L<perldiag>.
1029 =head2 New Diagnostics
1037 L<%s must not be a named sequence in transliteration operator|perldiag/"%s must not be a named sequence in transliteration operator">
1041 L<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/">
1045 L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s"">
1049 L<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/">
1053 L<Empty \%c in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
1054 |perldiag/"Empty \%c in regex; marked by <-- HERE in mE<sol>%sE<sol>">
1058 L<Illegal user-defined property name|perldiag/"Illegal user-defined property name">
1062 L<Invalid number '%s' for -C option.|perldiag/"Invalid number '%s' for -C option.">
1066 L<<< 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>" >>>
1070 L<<< Sequence (?PE<lt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
1071 |perldiag/"Sequence (?PE<lt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>>
1075 L<Sequence (?PE<gt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
1076 |perldiag/"Sequence (?PE<gt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>">
1086 L<Assuming NOT a POSIX class since %s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|
1087 perldiag/Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in mE<sol>%sE<sol>>
1091 L<%s() is deprecated on :utf8 handles|perldiag/"%s() is deprecated on :utf8 handles">
1095 =head2 Changes to Existing Diagnostics
1101 Accessing the C<IO> part of a glob as C<FILEHANDLE> instead of C<IO> is no
1102 longer deprecated. It is discouraged to encourage uniformity (so that, for
1103 example, one can grep more easily) but it will not be removed.
1104 L<[GH #15105]|https://github.com/Perl/perl5/issues/15105>
1108 The diagnostic C<< Hexadecimal float: internal error >> has been changed to
1109 C<< Hexadecimal float: internal error (%s) >> to include more information.
1113 L<Can't modify non-lvalue subroutine call of &%s|perldiag/"Can't modify non-lvalue subroutine call of &%s">
1115 This error now reports the name of the non-lvalue subroutine you attempted to
1120 When running out of memory during an attempt the increase the stack
1121 size, previously, perl would die using the cryptic message
1122 C<< panic: av_extend_guts() negative count (-9223372036854775681) >>.
1123 This has been fixed to show the prettier message:
1124 L<< Out of memory during stack extend|perldiag/"Out of memory during %s extend" >>
1128 =head1 Configuration and Compilation
1134 C<Configure> now acts as if the C<-O> option is always passed, allowing command
1135 line options to override saved configuration. This should eliminate confusion
1136 when command line options are ignored for no obvious reason. C<-O> is now
1137 permitted, but ignored.
1141 Bison 3.0 is now supported.
1145 F<Configure> no longer probes for F<libnm> by default. Originally
1146 this was the "New Math" library, but the name has been re-used by the
1147 GNOME NetworkManager.
1148 L<[GH #15115]|https://github.com/Perl/perl5/issues/15115>
1152 Added F<Configure> probes for C<newlocale>, C<freelocale>, and C<uselocale>.
1156 C<< PPPort.so/PPPort.dll >> no longer get installed, as they are
1157 not used by C<< PPPort.pm >>, only by its test files.
1161 It is now possible to specify which compilation date to show on
1162 C<< perl -V >> output, by setting the macro C<< PERL_BUILD_DATE >>.
1166 Using the C<NO_HASH_SEED> define in combination with the default hash algorithm
1167 C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling
1168 the interpreter, since Perl 5.17.10. This has been fixed.
1172 F<Configure> should handle spaces in paths a little better.
1176 No longer generate EBCDIC POSIX-BC tables. We don't believe anyone is
1177 using Perl and POSIX-BC at this time, and by not generating these tables
1178 it saves time during development, and makes the resulting tar ball smaller.
1182 The GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
1186 You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
1190 The Win32 miniperl now has a real C<getcwd> which increases build performance
1191 resulting in C<getcwd()> being 605x faster in Win32 miniperl.
1195 Configure now takes C<-Dusequadmath> into account when calculating the
1196 C<alignbytes> configuration variable. Previously the mis-calculated
1197 C<alignbytes> could cause alignment errors on debugging builds. [perl
1208 A new test (F<t/op/aassign.t>) has been added to test the list assignment operator
1213 Parallel building has been added to the dmake C<makefile.mk> makefile. All
1214 Win32 compilers are supported.
1218 =head1 Platform Support
1220 =head2 Platform-Specific Notes
1230 The AmigaOS port has been reintegrated into the main tree, based off of
1241 Tests are more robust against unusual cygdrive prefixes.
1242 L<[GH #15076]|https://github.com/Perl/perl5/issues/15076>
1250 =item UTF-EBCDIC extended
1252 UTF-EBCDIC is like UTF-8, but for EBCDIC platforms. It now has been
1253 extended so that it can represent code points up to 2 ** 64 - 1 on
1254 platforms with 64-bit words. This brings it into parity with UTF-8.
1255 This enhancement requires an incompatible change to the representation
1256 of code points in the range 2 ** 30 to 2 ** 31 -1 (the latter was the
1257 previous maximum representable code point). This means that a file that
1258 contains one of these code points, written out with previous versions of
1259 perl cannot be read in, without conversion, by a perl containing this
1260 change. We do not believe any such files are in existence, but if you
1261 do have one, submit a ticket at L<perlbug@perl.org|mailto:perlbug@perl.org>,
1262 and we will write a conversion script for you.
1264 =item EBCDIC C<cmp()> and C<sort()> fixed for UTF-EBCDIC strings
1266 Comparing two strings that were both encoded in UTF-8 (or more
1267 precisely, UTF-EBCDIC) did not work properly until now. Since C<sort()>
1268 uses C<cmp()>, this fixes that as well.
1270 =item EBCDIC C<tr///> and C<y///> fixed for C<\N{}>, and C<S<use utf8>> ranges
1272 Perl v5.22 introduced the concept of portable ranges to regular
1273 expression patterns. A portable range matches the same set of
1274 characters no matter what platform is being run on. This concept is now
1275 extended to C<tr///>. See
1276 C<L<trE<sol>E<sol>E<sol>|perlop/trE<sol>SEARCHLISTE<sol>REPLACEMENTLISTE<sol>cdsr>>.
1278 There were also some problems with these operations under S<C<use
1279 utf8>>, which are now fixed
1289 Use the C<fdclose()> function from FreeBSD if it is available.
1290 L<[GH #15082]|https://github.com/Perl/perl5/issues/15082>
1300 Under some circumstances IRIX stdio C<fgetc()> and C<fread()> set the errno to
1301 C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno
1302 is now cleared in such cases.
1303 L<[GH #14557]|https://github.com/Perl/perl5/issues/14557>
1307 Problems when multiplying long doubles by infinity have been fixed.
1308 L<[GH #14993]|https://github.com/Perl/perl5/issues/14993>
1318 Until now OS X builds of perl have specified a link target of 10.3 (Panther,
1319 2003) but have not specified a compiler target. From now on, builds of perl on
1320 OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X
1321 version and specify that as the explicit build target in both compiler and
1322 linker flags, thus preserving binary compatibility for extensions built later
1323 regardless of changes in OS X, SDK, or compiler and linker versions. To
1324 override the default value used in the build and preserved in the flags,
1325 specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building
1326 perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or
1327 earlier there is no change to the behavior present when those systems were
1328 current; the link target is still OS X 10.3 and there is no explicit compiler
1333 Builds with both -DDEBUGGING and threading enabled would fail with a
1334 "panic: free from wrong pool" error when built or tested from Terminal
1335 on OS X. This was caused by perl's internal management of the
1336 environment conflicting with an atfork handler using the libc
1337 C<setenv()> function to update the environment.
1339 Perl now uses C<setenv()>/C<unsetenv()> to update the environment on OS X.
1340 L<[GH #14955]|https://github.com/Perl/perl5/issues/14955>
1350 All Solaris variants now build a shared libperl
1352 Solaris and variants like OpenIndiana now always build with the shared
1353 Perl library (Configure -Duseshrplib). This was required for the
1354 OpenIndiana builds, but this has also been the setting for Oracle/Sun
1355 Perl builds for several years.
1365 Workaround where Tru64 balks when prototypes are listed as
1366 C<< PERL_STATIC_INLINE >>, but where the test is build with
1367 C<< -DPERL_NO_INLINE_FUNCTIONS >>.
1377 On VMS, the math function prototypes in C<math.h> are now visible under C++.
1378 Now building the POSIX extension with C++ will no longer crash.
1382 VMS has had C<setenv>/C<unsetenv> since v7.0 (released in 1996),
1383 C<Perl_vmssetenv> now always uses C<setenv>/C<unsetenv>.
1387 Perl now implements its own C<killpg> by scanning for processes in the
1388 specified process group, which may not mean exactly the same thing as a Unix
1389 process group, but allows us to send a signal to a parent (or master) process
1390 and all of its sub-processes. At the perl level, this means we can now send a
1391 negative pid like so:
1393 kill SIGKILL, -$pid;
1395 to signal all processes in the same group as C<$pid>.
1399 For those C<%ENV> elements based on the CRTL environ array, we've always
1400 preserved case when setting them but did look-ups only after upcasing the
1401 key first, which made lower- or mixed-case entries go missing. This problem
1402 has been corrected by making C<%ENV> elements derived from the environ array
1403 case-sensitive on look-up as well as case-preserving on store.
1407 Environment look-ups for C<PERL5LIB> and C<PERLLIB> previously only
1408 considered logical names, but now consider all sources of C<%ENV> as
1409 determined by C<PERL_ENV_TABLES> and as documented in L<perlvms/%ENV>.
1413 The minimum supported version of VMS is now v7.3-2, released in 2003. As a
1414 side effect of this change, VAX is no longer supported as the terminal
1415 release of OpenVMS VAX was v7.3 in 2001.
1425 A new build option C<USE_NO_REGISTRY> has been added to the makefiles. This
1426 option is off by default, meaning the default is to do Windows registry
1427 lookups. This option stops Perl from looking inside the registry for anything.
1428 For what values are looked up in the registry see L<perlwin32>. Internally, in
1429 C, the name of this option is C<WIN32_NO_REGISTRY>.
1433 The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and
1434 C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV>
1435 vars starting with C<PERL> has changed. Previously, the 2 keys were checked
1436 for entries at all times through the perl process's life time even if
1438 exist. For performance reasons, now, if the root key (i.e.
1439 C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does
1440 not exist at process start time, it will not be checked again for C<%ENV>
1441 override entries for the remainder of the perl process's life. This more
1442 closely matches Unix behavior in that the environment is copied or inherited
1443 on startup and changing the variable in the parent process or another process
1444 or editing F<.bashrc> will not change the environmental variable in other
1445 existing, running, processes.
1449 One glob fetch was removed for each C<-X> or C<stat> call whether done from
1450 Perl code or internally from Perl's C code. The glob being looked up was
1451 C<${^WIN32_SLOPPY_STAT}> which is a special variable. This makes C<-X> and
1452 C<stat> slightly faster.
1456 During miniperl's process startup, during the build process, 4 to 8 IO calls
1457 related to the process starting F<.pl> and the F<buildcustomize.pl> file were
1458 removed from the code opening and executing the first 1 or 2 F<.pl> files.
1462 Builds using Microsoft Visual C++ 2003 and earlier no longer produce
1463 an "INTERNAL COMPILER ERROR" message. [perl #126045]
1467 Visual C++ 2013 builds will now execute on XP and higher. Previously they would
1468 only execute on Vista and higher.
1472 You can now build perl with GNU Make and GCC. [perl #123440]
1476 C<truncate($filename, $size)> now works for files over 4GB in size.
1481 Parallel building has been added to the dmake C<makefile.mk> makefile. All
1482 Win32 compilers are supported.
1486 Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would
1487 result in an invalid C<$Config{archname}> for the resulting perl.
1492 Errors set by Winsock functions are now put directly into C<$^E>, and the
1493 relevant C<WSAE*> error codes are now exported from the L<Errno> and L<POSIX>
1494 modules for testing this against.
1496 The previous behavior of putting the errors (converted to POSIX-style C<E*>
1497 error codes since Perl 5.20.0) into C<$!> was buggy due to the non-equivalence
1498 of like-named Winsock and POSIX error constants, a relationship between which
1499 has unfortunately been established in one way or another since Perl 5.8.0.
1501 The new behavior provides a much more robust solution for checking Winsock
1502 errors in portable software without accidentally matching POSIX tests that were
1503 intended for other OSes and may have different meanings for Winsock.
1505 The old behavior is currently retained, warts and all, for backwards
1506 compatibility, but users are encouraged to change any code that tests C<$!>
1507 against C<E*> constants for Winsock errors to instead test C<$^E> against
1508 C<WSAE*> constants. After a suitable deprecation period, the old behavior may
1509 be removed, leaving C<$!> unchanged after Winsock function calls, to avoid any
1510 possible confusion over which error variable to check.
1518 =item floating point
1520 The floating point format of ppc64el (Debian naming for little-endian
1521 PowerPC) is now detected correctly.
1527 =head1 Internal Changes
1533 The implementation of perl's context stack system, and its internal API,
1534 have been heavily reworked. Note that no significant changes have been
1535 made to any external APIs, but XS code which relies on such internal
1536 details may need to be fixed. The main changes are:
1542 The C<PUSHBLOCK()>, C<POPSUB()> etc. macros have been replaced with static
1543 inline functions such as C<cx_pushblock()>, C<cx_popsub()> etc. These use
1544 function args rather than implicitly relying on local vars such as
1545 C<gimme> and C<newsp> being available. Also their functionality has
1546 changed: in particular, C<cx_popblock()> no longer decrements
1547 C<cxstack_ix>. The ordering of the steps in the C<pp_leave*> functions
1548 involving C<cx_popblock()>, C<cx_popsub()> etc. has changed. See the new
1549 documentation, L<perlguts/"Dynamic Scope and the Context Stack">, for
1550 details on how to use them.
1554 Various macros, which now consistently have a CX_ prefix, have been added:
1556 CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
1560 CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
1564 C<cx_pushblock()> now saves C<PL_savestack_ix> and C<PL_tmps_floor>, so
1565 C<pp_enter*> and C<pp_leave*> no longer do
1567 ENTER; SAVETMPS; ....; LEAVE
1571 C<cx_popblock()> now also restores C<PL_curpm>.
1575 In C<dounwind()> for every context type, the current savestack frame is
1576 now processed before each context is popped; formerly this was only done
1577 for sub-like context frames. This action has been removed from
1578 C<cx_popsub()> and placed into its own macro, C<CX_LEAVE_SCOPE(cx)>, which
1579 must be called before C<cx_popsub()> etc.
1581 C<dounwind()> now also does a C<cx_popblock()> on the last popped frame
1582 (formerly it only did the C<cx_popsub()> etc. actions on each frame).
1586 The temps stack is now freed on scope exit; previously, temps created
1587 during the last statement of a block wouldn't be freed until the next
1588 C<nextstate> following the block (apart from an existing hack that did
1589 this for recursive subs in scalar context); and in something like
1590 C<f(g())>, the temps created by the last statement in C<g()> would
1591 formerly not be freed until the statement following the return from
1596 Most values that were saved on the savestack on scope entry are now
1597 saved in suitable new fields in the context struct, and saved and
1598 restored directly by C<cx_pushfoo()> and C<cx_popfoo()>, which is much
1603 Various context struct fields have been added, removed or modified.
1607 The handling of C<@_> in C<cx_pushsub()> and C<cx_popsub()> has been
1608 considerably tidied up, including removing the C<argarray> field from the
1609 context struct, and extracting out some common (but rarely used) code into
1610 a separate function, C<clear_defarray()>. Also, useful subsets of
1611 C<cx_popsub()> which had been unrolled in places like C<pp_goto> have been
1612 gathered into the new functions C<cx_popsub_args()> and
1613 C<cx_popsub_common()>.
1617 C<pp_leavesub> and C<pp_leavesublv> now use the same function as the rest
1618 of the C<pp_leave*>'s to process return args.
1622 C<CXp_FOR_PAD> and C<CXp_FOR_GV> flags have been added, and
1623 C<CXt_LOOP_FOR> has been split into C<CXt_LOOP_LIST>, C<CXt_LOOP_ARY>.
1627 Some variables formerly declared by C<dMULTICALL> (but not documented) have
1634 The obscure C<PL_timesbuf> variable, effectively a vestige of Perl 1, has
1635 been removed. It was documented as deprecated in Perl 5.20, with a statement
1636 that it would be removed early in the 5.21.x series; that has now finally
1638 L<[GH #13632]|https://github.com/Perl/perl5/issues/13632>
1642 An unwarranted assertion in C<Perl_newATTRSUB_x()> has been removed. If
1644 definition with a prototype has been seen, then any subsequent stub (or
1645 definition) of the same subroutine with an attribute was causing an assertion
1646 failure because of a null pointer.
1647 L<[GH #15081]|https://github.com/Perl/perl5/issues/15081>
1651 C<::> has been replaced by C<__> in C<ExtUtils::ParseXS>, like it's done for
1652 parameters/return values. This is more consistent, and simplifies writing XS
1653 code wrapping C++ classes into a nested Perl namespace (it requires only
1654 a typedef for C<Foo__Bar> rather than two, one for C<Foo_Bar> and the other
1659 The C<to_utf8_case()> function is now deprecated. Instead use
1660 C<toUPPER_utf8>, C<toTITLE_utf8>, C<toLOWER_utf8>, and C<toFOLD_utf8>.
1661 (See L<http://nntp.perl.org/group/perl.perl5.porters/233287>.)
1665 Perl core code and the threads extension have been annotated so that,
1666 if Perl is configured to use threads, then during compile-time clang (3.6
1667 or later) will warn about suspicious uses of mutexes.
1668 See L<http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more
1673 The C<signbit()> emulation has been enhanced. This will help older
1674 and/or more exotic platforms or configurations.
1679 Most EBCDIC-specific code in the core has been unified with non-EBCDIC
1680 code, to avoid repetition and make maintenance easier.
1684 MSWin32 code for C<$^X> has been moved out of the F<win32> directory to
1685 F<caretx.c>, where other operating systems set that variable.
1689 C<< sv_ref() >> is now part of the API.
1693 L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>. It
1694 previously has always returned C<0> since Perl 5.000 stable but that was
1695 undocumented. Although C<sv_backoff> is marked as public API, XS code is not
1696 expected to be impacted since the proper API call would be through public API
1697 C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public
1698 C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a
1699 meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>.
1703 The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues
1704 with integer truncation and wrapping. In particular, some casts formerly used
1705 within the macros have been removed. This means for example that passing an
1706 unsigned C<nitems> argument is likely to raise a compiler warning now
1707 (it's always been documented to require a signed value; formerly int,
1712 C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed.
1716 C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed.
1720 =head1 Selected Bug Fixes
1726 It now works properly to specify a user-defined property, such as
1728 qr/\p{mypkg1::IsMyProperty}/i
1730 with C</i> caseless matching, an explicit package name, and
1731 I<IsMyProperty> not defined at the time of the pattern compilation.
1735 Perl's C<memcpy()>, C<memmove()>, C<memset()> and C<memcmp()> fallbacks are now
1736 more compatible with the originals. [perl #127619]
1740 Fixed the issue where a C<< s///r >>) with B<< -DPERL_NO_COW >> attempts
1741 to modify the source SV, resulting in the program dying. [perl #127635]
1745 Fixed an EBCDIC-platform-only case where a pattern could fail to match. This
1746 occurred when matching characters from the set of C1 controls when the
1747 target matched string was in UTF-8.
1751 Narrow the filename check in F<strict.pm> and F<warnings.pm>. Previously,
1752 it assumed that if the filename (without the F<.pmc?> extension) differed
1753 from the package name, if was a misspelled use statement (i.e. C<use Strict>
1754 instead of C<use strict>). We now check whether there's really a
1755 miscapitalization happening, and not some other issue.
1759 Turn an assertion into a more user friendly failure when parsing
1760 regexes. [perl #127599]
1764 Correctly raise an error when trying to compile patterns with
1765 unterminated character classes while there are trailing backslashes.
1770 Line numbers larger than 2**31-1 but less than 2**32 are no longer
1771 returned by C<caller()> as negative numbers. [perl #126991]
1775 C<< unless ( I<assignment> ) >> now properly warns when syntax
1776 warnings are enabled. [perl #127122]
1780 Setting an C<ISA> glob to an array reference now properly adds
1781 C<isaelem> magic to any existing elements. Previously modifying such
1782 an element would not update the ISA cache, so method calls would call
1783 the wrong function. Perl would also crash if the C<ISA> glob was
1784 destroyed, since new code added in 5.23.7 would try to release the
1785 C<isaelem> magic from the elements. [perl #127351]
1789 If a here-doc was found while parsing another operator, the parser had
1790 already read end of file, and the here-doc was not terminated, perl
1791 could produce an assertion or a segmentation fault. This now reliably
1792 complains about the unterminated here-doc. [perl #125540]
1796 C<untie()> would sometimes return the last value returned by the C<UNTIE()>
1797 handler as well as its normal value, messing up the stack. [perl
1802 Fixed an operator precedence problem when C< castflags & 2> is true.
1807 Caching of DESTROY methods could result in a non-pointer or a
1808 non-STASH stored in the C<SvSTASH()> slot of a stash, breaking the B
1809 C<STASH()> method. The DESTROY method is now cached in the MRO metadata
1810 for the stash. [perl #126410]
1814 The AUTOLOAD method is now called when searching for a DESTROY method,
1815 and correctly sets C<$AUTOLOAD> too. [perl #124387] [perl #127494]
1819 Avoid parsing beyond the end of the buffer when processing a C<#line>
1820 directive with no filename. [perl #127334]
1824 Perl now raises a warning when a regular expression pattern looks like
1825 it was supposed to contain a POSIX class, like C<qr/[[:alpha:]]/>, but
1826 there was some slight defect in its specification which causes it to
1827 instead be treated as a regular bracketed character class. An example
1828 would be missing the second colon in the above like this:
1829 C<qr/[[:alpha]]/>. This compiles to match a sequence of two characters.
1830 The second is C<"]">, and the first is any of: C<"[">, C<":">, C<"a">,
1831 C<"h">, C<"l">, or C<"p">. This is unlikely to be the intended
1832 meaning, and now a warning is raised. No warning is raised unless the
1833 specification is very close to one of the 14 legal POSIX classes. (See
1834 L<perlrecharclass/POSIX Character Classes>.)
1839 Certain regex patterns involving a complemented POSIX class in an
1840 inverted bracketed character class, and matching something else
1841 optionally would improperly fail to match. An example of one that could
1842 fail is C<qr/_?[^\Wbar]\x{100}/>. This has been fixed.
1847 Perl 5.22 added support to the C99 hexadecimal floating point notation,
1848 but sometimes misparses hex floats. This has been fixed.
1853 A regression that allowed undeclared barewords in hash keys to work despite
1854 strictures has been fixed.
1855 L<[GH #15099]|https://github.com/Perl/perl5/issues/15099>
1859 Calls to the placeholder C<&PL_sv_yes> used internally when an C<import()>
1860 or C<unimport()> method isn't found now correctly handle scalar context.
1861 L<[GH #14902]|https://github.com/Perl/perl5/issues/14902>
1865 Report more context when we see an array where we expect to see an
1866 operator and avoid an assertion failure.
1867 L<[GH #14472]|https://github.com/Perl/perl5/issues/14472>
1871 Modifying an array that was previously a package C<@ISA> no longer
1872 causes assertion failures or crashes.
1873 L<[GH #14492]|https://github.com/Perl/perl5/issues/14492>
1877 Retain binary compatibility across plain and DEBUGGING perl builds.
1878 L<[GH #15122]|https://github.com/Perl/perl5/issues/15122>
1882 Avoid leaking memory when setting C<$ENV{foo}> on darwin.
1883 L<[GH #14955]|https://github.com/Perl/perl5/issues/14955>
1887 C</...\G/> no longer crashes on utf8 strings. When C<\G> is a fixed number
1888 of characters from the start of the regex, perl needs to count back that
1889 many characters from the current C<pos()> position and start matching from
1890 there. However, it was counting back bytes rather than characters, which
1891 could lead to panics on utf8 strings.
1895 In some cases operators that return integers would return negative
1896 integers as large positive integers.
1897 L<[GH #15049]|https://github.com/Perl/perl5/issues/15049>
1901 The C<pipe()> operator would assert for DEBUGGING builds instead of
1902 producing the correct error message. The condition asserted on is
1903 detected and reported on correctly without the assertions, so the
1904 assertions were removed.
1905 L<[GH #15015]|https://github.com/Perl/perl5/issues/15015>
1909 In some cases, failing to parse a here-doc would attempt to use freed
1910 memory. This was caused by a pointer not being restored correctly.
1911 L<[GH #15009]|https://github.com/Perl/perl5/issues/15009>
1915 C<< @x = sort { *a = 0; $a <=> $b } 0 .. 1 >> no longer frees the GP
1916 for *a before restoring its SV slot.
1917 L<[GH #14595]|https://github.com/Perl/perl5/issues/14595>
1921 Multiple problems with the new hexadecimal floating point printf
1922 format C<%a> were fixed:
1923 L<[GH #15032]|https://github.com/Perl/perl5/issues/15032>,
1924 L<[GH #15033]|https://github.com/Perl/perl5/issues/15033>,
1925 L<[GH #15074]|https://github.com/Perl/perl5/issues/15074>
1929 Calling C<mg_set()> in C<leave_scope()> no longer leaks.
1933 A regression from Perl v5.20 was fixed in which debugging output of regular
1934 expression compilation was wrong. (The pattern was correctly compiled, but
1935 what got displayed for it was wrong.)
1939 C<\b{sb}> works much better. In Perl v5.22.0, this new construct didn't
1940 seem to give the expected results, yet passed all the tests in the
1941 extensive suite furnished by Unicode. It turns out that it was because
1942 these were short input strings, and the failures had to do with longer
1947 Certain syntax errors in
1948 L<perlrecharclass/Extended Bracketed Character Classes> caused panics
1949 instead of the proper error message. This has now been fixed. [perl
1954 Perl 5.20 added a message when a quantifier in a regular
1955 expression was useless, but then caused the parser to skip it;
1956 this caused the surplus quantifier to be silently ignored, instead
1957 of throwing an error. This is now fixed. [perl #126253]
1961 The switch to building non-XS modules last in win32/makefile.mk (introduced
1962 by design as part of the changes to enable parallel building) caused the
1963 build of POSIX to break due to problems with the version module. This
1968 Improved parsing of hex float constants.
1972 Fixed an issue with C<< pack >> where C<< pack "H" >> (and C<< pack "h" >>)
1973 could read past the source when given a non-utf8 source, and a utf8 target.
1978 Fixed several cases where perl would abort due to a segmentation fault,
1979 or a C-level assert. [perl #126615], [perl #126602], [perl #126193].
1983 There were places in regular expression patterns where comments (C<(?#...)>)
1984 weren't allowed, but should have been. This is now fixed.
1985 L<[GH #12755]|https://github.com/Perl/perl5/issues/12755>
1989 Some regressions from Perl 5.20 have been fixed, in which some syntax errors in
1990 L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs
1991 within regular expression patterns could cause a segfault instead of a proper
1993 L<[GH #14933]|https://github.com/Perl/perl5/issues/14933>
1994 L<[GH #14996]|https://github.com/Perl/perl5/issues/14996>
1998 Another problem with
1999 L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes>
2000 constructs has been fixed wherein things like C<\c]> could cause panics.
2001 L<[GH #14934]|https://github.com/Perl/perl5/issues/14934>
2005 Some problems with attempting to extend the perl stack to around 2G or 4G
2006 entries have been fixed. This was particularly an issue on 32-bit perls built
2007 to use 64-bit integers, and was easily noticeable with the list repetition
2010 @a = (1) x $big_number
2012 Formerly perl may have crashed, depending on the exact value of C<$big_number>;
2013 now it will typically raise an exception.
2014 L<[GH #14880]|https://github.com/Perl/perl5/issues/14880>
2018 In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if
2019 the condition is C<(?!)> then perl failed the match outright instead of
2020 matching the no-pattern. This has been fixed.
2021 L<[GH #14947]|https://github.com/Perl/perl5/issues/14947>
2025 The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional
2026 argument and set C<REGERROR>/C<REGMARK> appropriately as well.
2027 L<[GH #14937]|https://github.com/Perl/perl5/issues/14937>
2031 Several bugs, including a segmentation fault, have been fixed with the boundary
2032 checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>,
2033 C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>. All the C<\B{}> ones now match an empty
2034 string; none of the C<\b{}> ones do.
2035 L<[GH #14976]|https://github.com/Perl/perl5/issues/14976>
2039 Duplicating a closed file handle for write no longer creates a
2040 filename of the form F<GLOB(0xXXXXXXXX)>. [perl #125115]
2044 Warning fatality is now ignored when rewinding the stack. This
2045 prevents infinite recursion when the now fatal error also causes
2046 rewinding of the stack. [perl #123398]
2050 In perl v5.22.0, the logic changed when parsing a numeric parameter to the -C
2051 option, such that the successfully parsed number was not saved as the option
2052 value if it parsed to the end of the argument. [perl #125381]
2056 The PadlistNAMES macro is an lvalue again.
2060 Zero -DPERL_TRACE_OPS memory for sub-threads.
2062 C<perl_clone_using()> was missing Zero init of PL_op_exec_cnt[]. This
2063 caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly
2064 large op-counts at destruct. These counts would print %x as "ABABABAB",
2065 clearly a mem-poison value.
2069 A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *>
2070 or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These
2071 particular typemap entries are thought to be extremely rarely used by XS
2072 modules. [perl #124181]
2076 C<alarm()> and C<sleep()> will now warn if the argument is a negative number
2077 and return undef. Previously they would pass the negative value to the
2078 underlying C function which may have set up a timer with a surprising value.
2082 Perl can again be compiled with any Unicode version. This used to
2083 (mostly) work, but was lost in v5.18 through v5.20. The property
2084 C<Name_Alias> did not exist prior to Unicode 5.0. L<Unicode::UCD>
2085 incorrectly said it did. This has been fixed.
2089 Very large code-points (beyond Unicode) in regular expressions no
2090 longer cause a buffer overflow in some cases when converted to UTF-8.
2091 L<[GH #14858]|https://github.com/Perl/perl5/issues/14858>
2095 The integer overflow check for the range operator (...) in list
2096 context now correctly handles the case where the size of the range is
2097 larger than the address space. This could happen on 32-bits with
2099 L<[GH #14843]|https://github.com/Perl/perl5/issues/14843>
2103 A crash with C<< %::=(); J->${\"::"} >> has been fixed.
2104 L<[GH #14790]|https://github.com/Perl/perl5/issues/14790>
2108 C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
2113 Regular expression possessive quantifier v5.20 regression now fixed.
2114 C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically
2115 to C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>. Since v5.20, this didn't
2116 work if I<min> and I<max> were equal. [perl #125825]
2120 C<< BEGIN <> >> no longer segfaults and properly produces an error
2121 message. [perl #125341]
2125 In C<tr///> an illegal backwards range like C<tr/\x{101}-\x{100}//> was
2126 not always detected, giving incorrect results. This is now fixed.
2130 =head1 Acknowledgements
2132 Perl 5.24.0 represents approximately 11 months of development since Perl 5.24.0
2133 and contains approximately 360,000 lines of changes across 1,800 files from 75
2136 Excluding auto-generated files, documentation and release tools, there were
2137 approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h files.
2139 Perl continues to flourish into its third decade thanks to a vibrant community
2140 of users and developers. The following people are known to have contributed the
2141 improvements that became Perl 5.24.0:
2143 Aaron Crane, Aaron Priven, Abigail, Achim Gratz, Alexander D'Archangel, Alex
2144 Vandiver, Andreas König, Andy Broad, Andy Dougherty, Aristotle Pagaltzis,
2145 Chase Whitener, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn
2146 Ilmari Mannsåker, Dan Collins, Daniel Dragan, David Golden, David Mitchell,
2147 Doug Bell, Dr.Ruud, Ed Avis, Ed J, Father Chrysostomos, Herbert Breunung,
2148 H.Merijn Brand, Hugo van der Sanden, Ivan Pozdeev, James E Keenan, Jan Dubois,
2149 Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, John Peacock, John SJ Anderson,
2150 Karen Etheridge, Karl Williamson, kmx, Leon Timmermans, Ludovic E. R.
2151 Tolhurst-Cleaver, Lukas Mai, Martijn Lievaart, Matthew Horsfall, Mattia Barbon,
2152 Max Maischein, Mohammed El-Afifi, Nicholas Clark, Nicolas R., Niko Tyni, Peter
2153 John Acklam, Peter Martini, Peter Rabbitson, Pip Cet, Rafael Garcia-Suarez,
2154 Reini Urban, Ricardo Signes, Sawyer X, Shlomi Fish, Sisyphus, Stanislaw Pusep,
2155 Steffen Müller, Stevan Little, Steve Hay, Sullivan Beck, Thomas Sibley, Todd
2156 Rinaldo, Tom Hukins, Tony Cook, Unicode Consortium, Victor Adam, Vincent Pit,
2157 Vladimir Timofeev, Yves Orton, Zachary Storer, Zefram.
2159 The list above is almost certainly incomplete as it is automatically generated
2160 from version control history. In particular, it does not include the names of
2161 the (very much appreciated) contributors who reported issues to the Perl bug
2164 Many of the changes included in this version originated in the CPAN modules
2165 included in Perl's core. We're grateful to the entire CPAN community for
2166 helping Perl to flourish.
2168 For a more complete list of all of Perl's historical contributors, please see
2169 the F<AUTHORS> file in the Perl source distribution.
2171 =head1 Reporting Bugs
2173 If you find what you think is a bug, you might check the articles recently
2174 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
2175 https://rt.perl.org/ . There may also be information at
2176 http://www.perl.org/ , the Perl Home Page.
2178 If you believe you have an unreported bug, please run the L<perlbug> program
2179 included with your release. Be sure to trim your bug down to a tiny but
2180 sufficient test case. Your bug report, along with the output of C<perl -V>,
2181 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
2183 If the bug you are reporting has security implications which make it
2184 inappropriate to send to a publicly archived mailing list, then see
2185 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
2186 for details of how to report the issue.
2190 The F<Changes> file for an explanation of how to view exhaustive details on
2193 The F<INSTALL> file for how to build Perl.
2195 The F<README> file for general stuff.
2197 The F<Artistic> and F<Copying> files for copyright information.