1PERL5300DELTA(1)       Perl Programmers Reference Guide       PERL5300DELTA(1)
2
3
4

NAME

6       perl5300delta - what is new for perl v5.30.0
7

DESCRIPTION

9       This document describes differences between the 5.28.0 release and the
10       5.30.0 release.
11
12       If you are upgrading from an earlier release such as 5.26.0, first read
13       perl5280delta, which describes differences between 5.26.0 and 5.28.0.
14

Notice

16       sv_utf8_(downgrade|decode) are no longer marked as experimental.  [perl
17       #133788] <https://rt.perl.org/Ticket/Display.html?id=133788>.
18

Core Enhancements

20   Limited variable length lookbehind in regular expression pattern matching
21       is now experimentally supported
22       Using a lookbehind assertion (like "(?<=foo?)" or "(?<!ba{1,9}r)"
23       previously would generate an error and refuse to compile.  Now it
24       compiles (if the maximum lookbehind is at most 255 characters), but
25       raises a warning in the new "experimental::vlb" warnings category.
26       This is to caution you that the precise behavior is subject to change
27       based on feedback from use in the field.
28
29       See "(?<=pattern)" in perlre and "(?<!pattern)" in perlre.
30
31   The upper limit "n" specifiable in a regular expression quantifier of the
32       form "{m,n}" has been doubled to 65534
33       The meaning of an unbounded upper quantifier "{m,}" remains unchanged.
34       It matches 2**31 - 1 times on most platforms, and more on ones where a
35       C language short variable is more than 4 bytes long.
36
37   Unicode 12.1 is supported
38       Because of a change in Unicode release cycles, Perl jumps from Unicode
39       10.0 in Perl 5.28 to Unicode 12.1 in Perl 5.30.
40
41       For details on the Unicode changes, see
42       <https://www.unicode.org/versions/Unicode11.0.0/> for 11.0;
43       <https://www.unicode.org/versions/Unicode12.0.0/> for 12.0; and
44       <https://www.unicode.org/versions/Unicode12.1.0/> for 12.1.  (Unicode
45       12.1 differs from 12.0 only in the addition of a single character, that
46       for the new Japanese era name.)
47
48       The Word_Break property, as in past Perl releases, remains tailored to
49       behave more in line with expectations of Perl users.  This means that
50       sequential runs of horizontal white space characters are not broken
51       apart, but kept as a single run.  Unicode 11 changed from past versions
52       to be more in line with Perl, but it left several white space
53       characters as causing breaks: TAB, NO BREAK SPACE, and FIGURE SPACE
54       (U+2007).  We have decided to continue to use the previous Perl
55       tailoring with regards to these.
56
57   Wildcards in Unicode property value specifications are now partially
58       supported
59       You can now do something like this in a regular expression pattern
60
61        qr! \p{nv= /(?x) \A [0-5] \z / }!
62
63       which matches all Unicode code points whose numeric value is between 0
64       and 5 inclusive.  So, it could match the Thai or Bengali digits whose
65       numeric values are 0, 1, 2, 3, 4, or 5.
66
67       This marks another step in implementing the regular expression features
68       the Unicode Consortium suggests.
69
70       Most properties are supported, with the remainder planned for 5.32.
71       Details are in "Wildcards in Property Values" in perlunicode.
72
73   qr'\N{name}' is now supported
74       Previously it was an error to evaluate a named character "\N{...}"
75       within a single quoted regular expression pattern (whose evaluation is
76       deferred from the normal place).  This restriction is now removed.
77
78   Turkic UTF-8 locales are now seamlessly supported
79       Turkic languages have different casing rules than other languages for
80       the characters "i" and "I".  The uppercase of "i" is LATIN CAPITAL
81       LETTER I WITH DOT ABOVE (U+0130); and the lowercase of "I" is LATIN
82       SMALL LETTER DOTLESS I (U+0131).  Unicode furnishes alternate casing
83       rules for use with Turkic languages.  Previously, Perl ignored these,
84       but now, it uses them when it detects that it is operating under a
85       Turkic UTF-8 locale.
86
87   It is now possible to compile perl to always use thread-safe locale
88       operations.
89       Previously, these calls were only used when the perl was compiled to be
90       multi-threaded.  To always enable them, add
91
92        -Accflags='-DUSE_THREAD_SAFE_LOCALE'
93
94       to your Configure flags.
95
96   Eliminate opASSIGN macro usage from core
97       This macro is still defined but no longer used in core
98
99   "-Drv" now means something on "-DDEBUGGING" builds
100       Now, adding the verbose flag ("-Dv") to the "-Dr" flag turns on all
101       possible regular expression debugging.
102

Incompatible Changes

104   Assigning non-zero to $[ is fatal
105       Setting $[ to a non-zero value has been deprecated since Perl 5.12 and
106       now throws a fatal error.  See "Assigning non-zero to $[ is fatal" in
107       perldeprecation.
108
109   Delimiters must now be graphemes
110       See "Use of unassigned code point or non-standalone grapheme for a
111       delimiter." in perldeprecation
112
113   Some formerly deprecated uses of an unescaped left brace "{" in regular
114       expression patterns are now illegal
115       But to avoid breaking code unnecessarily, most instances that issued a
116       deprecation warning, remain legal and now have a non-deprecation
117       warning raised.  See "Unescaped left braces in regular expressions" in
118       perldeprecation.
119
120   Previously deprecated sysread()/syswrite() on :utf8 handles is now fatal
121       Calling sysread(), syswrite(), send() or recv() on a ":utf8" handle,
122       whether applied explicitly or implicitly, is now fatal.  This was
123       deprecated in perl 5.24.
124
125       There were two problems with calling these functions on ":utf8"
126       handles:
127
128       •   All four functions only paid attention to the ":utf8" flag.  Other
129           layers were completely ignored, so a handle with
130           ":encoding(UTF-16LE)" layer would be treated as UTF-8.  Other
131           layers, such as compression are completely ignored with or without
132           the ":utf8" flag.
133
134sysread() and recv() would read from the handle, skipping any
135           validation by the layers, and do no validation of their own.  This
136           could lead to invalidly encoded perl scalars.
137
138       [perl #125760] <https://rt.perl.org/Ticket/Display.html?id=125760>.
139
140   my() in false conditional prohibited
141       Declarations such as "my $x if 0" are no longer permitted.
142
143       [perl #133543] <https://rt.perl.org/Ticket/Display.html?id=133543>.
144
145   Fatalize $* and $#
146       These special variables, long deprecated, now throw exceptions when
147       used.
148
149       [perl #133583] <https://rt.perl.org/Ticket/Display.html?id=133583>.
150
151   Fatalize unqualified use of dump()
152       The "dump()" function, long discouraged, may no longer be used unless
153       it is fully qualified, i.e., "CORE::dump()".
154
155       [perl #133584] <https://rt.perl.org/Ticket/Display.html?id=133584>.
156
157   Remove File::Glob::glob()
158       The "File::Glob::glob()" function, long deprecated, has been removed
159       and now throws an exception which advises use of
160       "File::Glob::bsd_glob()" instead.
161
162       [perl #133586] <https://rt.perl.org/Ticket/Display.html?id=133586>.
163
164   "pack()" no longer can return malformed UTF-8
165       It croaks if it would otherwise return a UTF-8 string that contains
166       malformed UTF-8.  This protects against potential security threats.
167       This is considered a bug fix as well.  [perl #131642]
168       <https://rt.perl.org/Ticket/Display.html?id=131642>.
169
170   Any set of digits in the Common script are legal in a script run of another
171       script
172       There are several sets of digits in the Common script.  "[0-9]" is the
173       most familiar.  But there are also "[\x{FF10}-\x{FF19}]" (FULLWIDTH
174       DIGIT ZERO - FULLWIDTH DIGIT NINE), and several sets for use in
175       mathematical notation, such as the MATHEMATICAL DOUBLE-STRUCK DIGITs.
176       Any of these sets should be able to appear in script runs of, say,
177       Greek.  But the design of 5.30 overlooked all but the ASCII digits
178       "[0-9]", so the design was flawed.  This has been fixed, so is both a
179       bug fix and an incompatibility.  [perl #133547]
180       <https://rt.perl.org/Ticket/Display.html?id=133547>.
181
182       All digits in a run still have to come from the same set of ten digits.
183
184   JSON::PP enables allow_nonref by default
185       As JSON::XS 4.0 changed its policy and enabled allow_nonref by default,
186       JSON::PP also enabled allow_nonref by default.
187

Deprecations

189   In XS code, use of various macros dealing with UTF-8.
190       This deprecation was scheduled to become fatal in 5.30, but has been
191       delayed to 5.32 due to problems that showed up with some CPAN modules.
192       For details of what's affected, see perldeprecation.
193

Performance Enhancements

195       •   Translating from UTF-8 into the code point it represents now is
196           done via a deterministic finite automaton, speeding it up.  As a
197           typical example, "ord("\x7fff")" now requires 12% fewer
198           instructions than before.  The performance of checking that a
199           sequence of bytes is valid UTF-8 is similarly improved, again by
200           using a DFA.
201
202       •   Eliminate recursion from finalize_op().  [perl #108276]
203           <https://rt.perl.org/Ticket/Display.html?id=108276>.
204
205       •   A handful of small optimizations related to character folding and
206           character classes in regular expressions.
207
208       •   Optimization of "IV" to "UV" conversions.  [perl #133677]
209           <https://rt.perl.org/Ticket/Display.html?id=133677>.
210
211       •   Speed up of the integer stringification algorithm by processing two
212           digits at a time instead of one.  [perl #133691]
213           <https://rt.perl.org/Ticket/Display.html?id=133691>.
214
215       •   Improvements based on LGTM analysis and recommendation.
216           (<https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree>).
217           [perl #133686] <https://rt.perl.org/Ticket/Display.html?id=133686>.
218           [perl #133699] <https://rt.perl.org/Ticket/Display.html?id=133699>.
219
220       •   Code optimizations in regcomp.c, regcomp.h, regexec.c.
221
222       •   Regular expression pattern matching of things like "qr/[^a]/" is
223           significantly sped up, where a is any ASCII character.  Other
224           classes can get this speed up, but which ones is complicated and
225           depends on the underlying bit patterns of those characters, so
226           differs between ASCII and EBCDIC platforms, but all case pairs,
227           like "qr/[Gg]/" are included, as is "[^01]".
228

Modules and Pragmata

230   Updated Modules and Pragmata
231       •   Archive::Tar has been upgraded from version 2.30 to 2.32.
232
233       •   B has been upgraded from version 1.74 to 1.76.
234
235       •   B::Concise has been upgraded from version 1.003 to 1.004.
236
237       •   B::Deparse has been upgraded from version 1.48 to 1.49.
238
239       •   bignum has been upgraded from version 0.49 to 0.51.
240
241       •   bytes has been upgraded from version 1.06 to 1.07.
242
243       •   Carp has been upgraded from version 1.38 to 1.50
244
245       •   Compress::Raw::Bzip2 has been upgraded from version 2.074 to 2.084.
246
247       •   Compress::Raw::Zlib has been upgraded from version 2.076 to 2.084.
248
249       •   Config::Extensions has been upgraded from version 0.02 to 0.03.
250
251       •   Config::Perl::V. has been upgraded from version 0.29 to 0.32. This
252           was due to a new configuration variable that has influence on
253           binary compatibility: "USE_THREAD_SAFE_LOCALE".
254
255       •   CPAN has been upgraded from version 2.20 to 2.22.
256
257       •   Data::Dumper has been upgraded from version 2.170 to 2.174
258
259           Data::Dumper now avoids leaking when "croak"ing.
260
261       •   DB_File has been upgraded from version 1.840 to 1.843.
262
263       •   deprecate has been upgraded from version 0.03 to 0.04.
264
265       •   Devel::Peek has been upgraded from version 1.27 to 1.28.
266
267       •   Devel::PPPort has been upgraded from version 3.40 to 3.52.
268
269       •   Digest::SHA has been upgraded from version 6.01 to 6.02.
270
271       •   Encode has been upgraded from version 2.97 to 3.01.
272
273       •   Errno has been upgraded from version 1.29 to 1.30.
274
275       •   experimental has been upgraded from version 0.019 to 0.020.
276
277       •   ExtUtils::CBuilder has been upgraded from version 0.280230 to
278           0.280231.
279
280       •   ExtUtils::Manifest has been upgraded from version 1.70 to 1.72.
281
282       •   ExtUtils::Miniperl has been upgraded from version 1.08 to 1.09.
283
284       •   ExtUtils::ParseXS has been upgraded from version 3.39 to 3.40.
285           "OUTLIST" parameters are no longer incorrectly included in the
286           automatically generated function prototype.  [perl #133654]
287           <https://rt.perl.org/Ticket/Display.html?id=133654>.
288
289       •   feature has been upgraded from version 1.52 to 1.54.
290
291       •   File::Copy has been upgraded from version 2.33 to 2.34.
292
293       •   File::Find has been upgraded from version 1.34 to 1.36.
294
295           $File::Find::dont_use_nlink now defaults to 1 on all platforms.
296           [perl #133673] <https://rt.perl.org/Ticket/Display.html?id=133673>.
297
298           Variables $Is_Win32 and $Is_VMS are being initialized.
299
300       •   File::Glob has been upgraded from version 1.31 to 1.32.
301
302       •   File::Path has been upgraded from version 2.15 to 2.16.
303
304       •   File::Spec has been upgraded from version 3.74 to 3.78.
305
306           Silence Cwd warning on Android builds if "targetsh" is not defined.
307
308       •   File::Temp has been upgraded from version 0.2304 to 0.2309.
309
310       •   Filter::Util::Call has been upgraded from version 1.58 to 1.59.
311
312       •   GDBM_File has been upgraded from version 1.17 to 1.18.
313
314       •   HTTP::Tiny has been upgraded from version 0.070 to 0.076.
315
316       •   I18N::Langinfo has been upgraded from version 0.17 to 0.18.
317
318       •   IO has been upgraded from version 1.39 to 1.40.
319
320       •   IO-Compress has been upgraded from version 2.074 to 2.084.
321
322           Adds support for "IO::Uncompress::Zstd" and
323           "IO::Uncompress::UnLzip".
324
325           The "BinModeIn" and "BinModeOut" options are now no-ops.  ALL files
326           will be read/written in binmode.
327
328       •   IPC::Cmd has been upgraded from version 1.00 to 1.02.
329
330       •   JSON::PP has been upgraded from version 2.97001 to 4.02.
331
332           JSON::PP as JSON::XS 4.0 enables "allow_nonref" by default.
333
334       •   lib has been upgraded from version 0.64 to 0.65.
335
336       •   Locale::Codes has been upgraded from version 3.56 to 3.57.
337
338       •   Math::BigInt has been upgraded from version 1.999811 to 1.999816.
339
340           "bnok()" now supports the full Kronenburg extension.  [cpan #95628]
341           <https://rt.cpan.org/Ticket/Display.html?id=95628>.
342
343       •   Math::BigInt::FastCalc has been upgraded from version 0.5006 to
344           0.5008.
345
346       •   Math::BigRat has been upgraded from version 0.2613 to 0.2614.
347
348       •   Module::CoreList has been upgraded from version 5.20180622 to
349           5.20190520.
350
351           Changes to B::Op_private and Config
352
353       •   Module::Load has been upgraded from version 0.32 to 0.34.
354
355       •   Module::Metadata has been upgraded from version 1.000033 to
356           1.000036.
357
358           Properly clean up temporary directories after testing.
359
360       •   NDBM_File has been upgraded from version 1.14 to 1.15.
361
362       •   Net::Ping has been upgraded from version 2.62 to 2.71.
363
364       •   ODBM_File has been upgraded from version 1.15 to 1.16.
365
366       •   PathTools has been upgraded from version 3.74 to 3.78.
367
368       •   parent has been upgraded from version 0.236 to 0.237.
369
370       •   perl5db.pl has been upgraded from version 1.54 to 1.55.
371
372           Debugging threaded code no longer deadlocks in "DB::sub" nor
373           "DB::lsub".
374
375       •   perlfaq has been upgraded from version 5.021011 to 5.20190126.
376
377       •   PerlIO::encoding has been upgraded from version 0.26 to 0.27.
378
379           Warnings enabled by setting the "WARN_ON_ERR" flag in
380           $PerlIO::encoding::fallback are now only produced if warnings are
381           enabled with "use warnings "utf8";" or setting $^W.
382
383       •   PerlIO::scalar has been upgraded from version 0.29 to 0.30.
384
385       •   podlators has been upgraded from version 4.10 to 4.11.
386
387       •   POSIX has been upgraded from version 1.84 to 1.88.
388
389       •   re has been upgraded from version 0.36 to 0.37.
390
391       •   SDBM_File has been upgraded from version 1.14 to 1.15.
392
393       •   sigtrap has been upgraded from version 1.08 to 1.09.
394
395       •   Storable has been upgraded from version 3.08 to 3.15.
396
397           Storable no longer probes for recursion limits at build time.
398           [perl #133708] <https://rt.perl.org/Ticket/Display.html?id=133708>
399           and others.
400
401           Metasploit exploit code was included to test for CVE-2015-1992
402           detection, this caused anti-virus detections on at least one AV
403           suite.  The exploit code has been removed and replaced with a
404           simple functional test.  [perl #133706]
405           <https://rt.perl.org/Ticket/Display.html?id=133706>
406
407       •   Test::Simple has been upgraded from version 1.302133 to 1.302162.
408
409       •   Thread::Queue has been upgraded from version 3.12 to 3.13.
410
411       •   threads::shared has been upgraded from version 1.58 to 1.60.
412
413           Added support for extra tracing of locking, this requires a
414           "-DDEBUGGING" and extra compilation flags.
415
416       •   Time::HiRes has been upgraded from version 1.9759 to 1.9760.
417
418       •   Time::Local has been upgraded from version 1.25 to 1.28.
419
420       •   Time::Piece has been upgraded from version 1.3204 to 1.33.
421
422       •   Unicode::Collate has been upgraded from version 1.25 to 1.27.
423
424       •   Unicode::UCD has been upgraded from version 0.70 to 0.72.
425
426       •   User::grent has been upgraded from version 1.02 to 1.03.
427
428       •   utf8 has been upgraded from version 1.21 to 1.22.
429
430       •   vars has been upgraded from version 1.04 to 1.05.
431
432           "vars.pm" no longer disables non-vars strict when checking if
433           strict vars is enabled.  [perl #130674]
434           <https://rt.perl.org/Ticket/Display.html?id=130674>.
435
436       •   version has been upgraded from version 0.9923 to 0.9924.
437
438       •   warnings has been upgraded from version 1.42 to 1.44.
439
440       •   XS::APItest has been upgraded from version 0.98 to 1.00.
441
442       •   XS::Typemap has been upgraded from version 0.16 to 0.17.
443
444   Removed Modules and Pragmata
445       The following modules will be removed from the core distribution in a
446       future release, and will at that time need to be installed from CPAN.
447       Distributions on CPAN which require these modules will need to list
448       them as prerequisites.
449
450       The core versions of these modules will now issue "deprecated"-category
451       warnings to alert you to this fact.  To silence these deprecation
452       warnings, install the modules in question from CPAN.
453
454       Note that these are (with rare exceptions) fine modules that you are
455       encouraged to continue to use.  Their disinclusion from core primarily
456       hinges on their necessity to bootstrapping a fully functional, CPAN-
457       capable Perl installation, not usually on concerns over their design.
458
459       •   B::Debug is no longer distributed with the core distribution.  It
460           continues to be available on CPAN as "B::Debug
461           <https://metacpan.org/pod/B::Debug>".
462
463       •   Locale::Codes has been removed at the request of its author.  It
464           continues to be available on CPAN as "Locale::Codes
465           <https://metacpan.org/pod/Locale::Codes>" [perl #133458]
466           <https://rt.perl.org/Ticket/Display.html?id=133458>.
467

Documentation

469   Changes to Existing Documentation
470       We have attempted to update the documentation to reflect the changes
471       listed in this document.  If you find any we have missed, send email to
472       perlbug@perl.org <mailto:perlbug@perl.org>.
473
474       perlapi
475
476       •   "AvFILL()" was wrongly listed as deprecated.  This has been
477           corrected.  [perl #133278]
478           <https://rt.perl.org/Ticket/Display.html?id=133278>
479
480       perlop
481
482       •   We no longer have null (empty line) here doc terminators, so perlop
483           should not refer to them.
484
485       •   The behaviour of "tr" when the delimiter is an apostrophe has been
486           clarified.  In particular, hyphens aren't special, and "\x{}" isn't
487           interpolated.  [perl #130679]
488           <https://rt.perl.org/Ticket/Display.html?id=130679>
489
490       perlreapi, perlvar
491
492       •   Improve docs for lastparen, lastcloseparen.
493
494       perlfunc
495
496       •   The entry for "-X" in perlfunc has been clarified to indicate that
497           symbolic links are followed for most tests.
498
499       •   Clarification of behaviour of "reset EXPR".
500
501       •   Try to clarify that "ref(qr/xx/)" returns "Regexp" rather than
502           "REGEXP" and why.  [perl #133751]
503           <https://rt.perl.org/Ticket/Display.html?id=133751>.
504
505       perlreref
506
507       •   Clarification of the syntax of /(?(cond)yes)/.
508
509       perllocale
510
511       •   There are actually two slightly different types of UTF-8 locales:
512           one for Turkic languages and one for everything else. Starting in
513           Perl v5.30, Perl seamlessly handles both types.
514
515       perlrecharclass
516
517       •   Added a note for the ::xdigit:: character class.
518
519       perlvar
520
521       •   More specific documentation of paragraph mode.  [perl #133722]
522           <https://rt.perl.org/Ticket/Display.html?id=133722>.
523

Diagnostics

525       The following additions or changes have been made to diagnostic output,
526       including warnings and fatal error messages.  For the complete list of
527       diagnostic messages, see perldiag.
528
529   Changes to Existing Diagnostics
530       •   As noted under "Incompatible Changes" above, the deprecation
531           warning "Unescaped left brace in regex is deprecated here (and will
532           be fatal in Perl 5.30), passed through in regex; marked by <-- HERE
533           in m/%s/" has been changed to the non-deprecation warning
534           "Unescaped left brace in regex is passed through in regex; marked
535           by <-- HERE in m/%s/".
536
537       •   Specifying "\o{}" without anything between the braces now yields
538           the fatal error message "Empty \o{}".  Previously it was  "Number
539           with no digits".  This means the same wording is used for this kind
540           of error as with similar constructs such as "\p{}".
541
542       •   Within the scope of the experimental feature "use re 'strict'",
543           specifying "\x{}" without anything between the braces now yields
544           the fatal error message "Empty \x{}".  Previously it was  "Number
545           with no digits".  This means the same wording is used for this kind
546           of error as with similar constructs such as "\p{}".  It is legal,
547           though not wise to have an empty "\x" outside of "re 'strict'"; it
548           silently generates a NUL character.
549
550       •   Type of arg %d to %s must be %s (not %s)
551
552           Attempts to push, pop, etc on a hash or glob now produce this
553           message rather than complaining that they no longer work on
554           scalars.  [perl #130367]
555           <https://rt.perl.org/Ticket/Display.html?id=130367>.
556
557       •   Prototype not terminated
558
559           The file and line number is now reported for this error.  [perl
560           #133524] <https://rt.perl.org/Ticket/Display.html?id=133524>
561
562       •   Under "-Dr" (or "use re 'Debug'") the compiled regex engine program
563           is displayed. It used to use two different spellings for infinity,
564           "INFINITY", and "INFTY". It now uses the latter exclusively, as
565           that spelling has been around the longest.
566

Utility Changes

568   xsubpp
569       •   The generated prototype (with "PROTOTYPES: ENABLE") would include
570           "OUTLIST" parameters, but these aren't arguments to the perl
571           function.  This has been rectified.  [perl #133654]
572           <https://rt.perl.org/Ticket/Display.html?id=133654>.
573

Configuration and Compilation

575       •   Normally the thread-safe locale functions are used only on threaded
576           builds.  It is now possible to force their use on unthreaded builds
577           on systems that have them available, by including the
578           "-Accflags='-DUSE_THREAD_SAFE_LOCALE'" option to Configure.
579
580       •   Improve detection of memrchr, strlcat, and strlcpy
581
582       •   Improve Configure detection of memmem().  [perl #133760]
583           <https://rt.perl.org/Ticket/Display.html?id=133760>.
584
585       •   Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build
586           option.
587
588       •   Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.
589

Testing

591t/lib/croak/op [perl #130367]
592           <https://rt.perl.org/Ticket/Display.html?id=130367>.
593
594           separate error for "push", etc. on hash/glob.
595
596t/op/svleak.t [perl #133660]
597           <https://rt.perl.org/Ticket/Display.html?id=133660>.
598
599           Add test for "goto &sub" in overload leaking.
600
601       •   Split t/re/fold_grind.t into multiple test files.
602
603       •   Fix intermittent tests which failed due to race conditions which
604           surface during parallel testing.  [perl #133740]
605           <https://rt.perl.org/Ticket/Display.html?id=133740>.
606
607       •   Thoroughly test paragraph mode, using a new test file,
608           t/io/paragraph_mode.t.  [perl #133722]
609           <https://rt.perl.org/Ticket/Display.html?id=133722>.
610
611       •   Some tests in t/io/eintr.t caused the process to hang on pre-16
612           Darwin. These tests are skipped for those version of Darwin.
613

Platform Support

615   Platform-Specific Notes
616       HP-UX 11.11
617           An obscure problem in "pack()" when compiling with HP C-ANSI-C has
618           been fixed by disabling optimizations in pp_pack.c.
619
620       Mac OS X
621           Perl's build and testing process on Mac OS X for "-Duseshrplib"
622           builds is now compatible with Mac OS X System Integrity Protection
623           (SIP).
624
625           SIP prevents binaries in /bin (and a few other places) being passed
626           the "DYLD_LIBRARY_PATH" environment variable.  For our purposes
627           this prevents "DYLD_LIBRARY_PATH" from being passed to the shell,
628           which prevents that variable being passed to the testing or build
629           process, so running "perl" couldn't find libperl.dylib.
630
631           To work around that, the initial build of the perl executable
632           expects to find libperl.dylib in the build directory, and the
633           library path is then adjusted during installation to point to the
634           installed library.
635
636           [perl #126706] <https://rt.perl.org/Ticket/Display.html?id=126706>.
637
638       Minix3
639           Some support for Minix3 has been re-added.
640
641       Cygwin
642           Cygwin doesn't make "cuserid" visible.
643
644       Win32 Mingw
645           C99 math functions are now available.
646
647       Windows
648           •   The "USE_CPLUSPLUS" build option which has long been available
649               in win32/Makefile (for nmake) and win32/makefile.mk (for dmake)
650               is now also available in win32/GNUmakefile (for gmake).
651
652           •   The nmake makefile no longer defaults to Visual C++ 6.0 (a very
653               old version which is unlikely to be widely used today).  As a
654               result, it is now a requirement to specify the "CCTYPE" since
655               there is no obvious choice of which modern version to default
656               to instead.  Failure to specify "CCTYPE" will result in an
657               error being output and the build will stop.
658
659               (The dmake and gmake makefiles will automatically detect which
660               compiler is being used, so do not require "CCTYPE" to be set.
661               This feature has not yet been added to the nmake makefile.)
662
663           •   "sleep()" with warnings enabled for a "USE_IMP_SYS" build no
664               longer warns about the sleep timeout being too large.  [perl
665               #133376] <https://rt.perl.org/Ticket/Display.html?id=133376>.
666
667           •   Support for compiling perl on Windows using Microsoft Visual
668               Studio 2019 (containing Visual C++ 14.2) has been added.
669
670socket() now sets $! if the protocol, address family and socket
671               type combination is not found.  [perl #133853]
672               <https://rt.perl.org/Ticket/Display.html?id=133853>.
673
674           •   The Windows Server 2003 SP1 Platform SDK build, with its early
675               x64 compiler and tools, was accidentally broken in Perl 5.27.9.
676               This has now been fixed.
677

Internal Changes

679       •   The sizing pass has been eliminated from the regular expression
680           compiler.  An extra pass may instead be needed in some cases to
681           count the number of parenthetical capture groups.
682
683       •   A new function ""my_strtod"" in perlapi or its synonym, Strtod(),
684           is now available with the same signature as the libc strtod().  It
685           provides strotod() equivalent behavior on all platforms, using the
686           best available precision, depending on platform capabilities and
687           Configure options, while handling locale-related issues, such as if
688           the radix character should be a dot or comma.
689
690       •   Added "newSVsv_nomg()" to copy a SV without processing get magic on
691           the source.  [perl #132964]
692           <https://rt.perl.org/Ticket/Display.html?id=132964>.
693
694       •   It is now forbidden to malloc more than "PTRDIFF_T_MAX" bytes.
695           Much code (including C optimizers) assumes that all data structures
696           will not be larger than this, so this catches such attempts before
697           overflow happens.
698
699       •   Two new regnodes have been introduced "EXACT_ONLY8", and
700           "EXACTFU_ONLY8". They're equivalent to "EXACT" and "EXACTFU",
701           except that they contain a code point which requires UTF-8 to
702           represent/match. Hence, if the target string isn't UTF-8, we know
703           it can't possibly match, without needing to try.
704
705       •   "print_bytes_for_locale()" is now defined if "DEBUGGING", Prior, it
706           didn't get defined unless "LC_COLLATE" was defined on the platform.
707

Selected Bug Fixes

709       •   Compilation under "-DPERL_MEM_LOG" and "-DNO_LOCALE" have been
710           fixed.
711
712       •   Perl 5.28 introduced an "index()" optimization when comparing to -1
713           (or indirectly, e.g. >= 0).  When this optimization was triggered
714           inside a "when" clause it caused a warning ("Argument %s isn't
715           numeric in smart match").  This has now been fixed.  [perl #133368]
716           <https://rt.perl.org/Ticket/Display.html?id=133368>
717
718       •   The new in-place editing code no longer leaks directory handles.
719           [perl #133314] <https://rt.perl.org/Ticket/Display.html?id=133314>.
720
721       •   Warnings produced from constant folding operations on overloaded
722           values no longer produce spurious "Use of uninitialized value"
723           warnings.  [perl #132683]
724           <https://rt.perl.org/Ticket/Display.html?id=132683>.
725
726       •   Fix for "mutator not seen in (lex = ...) .= ..."  [perl #133441]
727           <https://rt.perl.org/Ticket/Display.html?id=133441>.
728
729       •   "pack "u", "invalid uuencoding"" now properly NUL terminates the
730           zero-length SV produced.  [perl #132655]
731           <https://rt.perl.org/Ticket/Display.html?id=132655>.
732
733       •   Improve the debugging output for calloc() calls with "-Dm".  [perl
734           #133439] <https://rt.perl.org/Ticket/Display.html?id=133439>.
735
736       •   Regexp script runs were failing to permit ASCII digits in some
737           cases.  [perl #133547]
738           <https://rt.perl.org/Ticket/Display.html?id=133547>.
739
740       •   On Unix-like systems supporting a platform-specific technique for
741           determining $^X, Perl failed to fall back to the generic technique
742           when the platform-specific one fails (for example, a Linux system
743           with /proc not mounted).  This was a regression in Perl 5.28.0.
744           [perl #133573] <https://rt.perl.org/Ticket/Display.html?id=133573>.
745
746       •   SDBM_File is now more robust with corrupt database files.  The
747           improvements do not make SDBM files suitable as an interchange
748           format.  [perl #132147]
749           <https://rt.perl.org/Ticket/Display.html?id=132147>.
750
751       •   "binmode($fh);" or "binmode($fh, ':raw');" now properly removes the
752           ":utf8" flag from the default ":crlf" I/O layer on Win32.  [perl
753           #133604] <https://rt.perl.org/Ticket/Display.html?id=133604>.
754
755       •   The experimental reference aliasing feature was misinterpreting
756           array and hash slice assignment as being localised, e.g.
757
758               \(@a[3,5,7]) = \(....);
759
760           was being interpreted as:
761
762               local \(@a[3,5,7]) = \(....);
763
764           [perl #133538] <https://rt.perl.org/Ticket/Display.html?id=133538>.
765
766       •   "sort SUBNAME" within an "eval EXPR" when "EXPR" was UTF-8 upgraded
767           could panic if the "SUBNAME" was non-ASCII.  [perl #134061]
768           <https://rt.perl.org/Ticket/Display.html?id=134061>.
769
770       •   Correctly handle realloc() modifying "errno" on success so that the
771           modification isn't visible to the perl user, since realloc() is
772           called implicitly by the interpreter.  This modification is
773           permitted by the C standard, but has only been observed on FreeBSD
774           13.0-CURRENT.  [perl #133958]
775           <https://rt.perl.org/Ticket/Display.html?id=133958>.
776
777       •   Perl now exposes POSIX "getcwd" as "Internals::getcwd()" if
778           available.  This is intended for use by "Cwd.pm" during
779           bootstrapping and may be removed or changed without notice.  This
780           fixes some bootstrapping issues while building perl in a directory
781           where some ancestor directory isn't readable.  [perl #133951]
782           <https://rt.perl.org/Ticket/Display.html?id=133951>.
783
784       •   "pack()" no longer can return malformed UTF-8.  It croaks if it
785           would otherwise return a UTF-8 string that contains malformed
786           UTF-8.  This protects against potential security threats.  [perl
787           #131642] <https://rt.perl.org/Ticket/Display.html?id=131642>.
788
789       •   See "Any set of digits in the Common script are legal in a script
790           run of another script".
791
792       •   Regular expression matching no longer leaves stale UTF-8 length
793           magic when updating $^R. This could result in "length($^R)"
794           returning an incorrect value.
795
796       •   Reduce recursion on ops [perl #108276]
797           <https://rt.perl.org/Ticket/Display.html?id=108276>.
798
799           This can prevent stack overflow when processing extremely deep op
800           trees.
801
802       •   Avoid leak in multiconcat with overloading.  [perl #133789]
803           <https://rt.perl.org/Ticket/Display.html?id=133789>.
804
805       •   The handling of user-defined "\p{}" properties (see "User-Defined
806           Character Properties" in perlunicode) has been rewritten to be in C
807           (instead of Perl).  This speeds things up, but in the process
808           several inconsistencies and bug fixes are made.
809
810           1.  A few error messages have minor wording changes.  This is
811               essentially because the new way is integrated into the regex
812               error handling mechanism that marks the position in the input
813               at which the error occurred.  That was not possible previously.
814               The messages now also contain additional back-trace-like
815               information in case the error occurs deep in nested calls.
816
817           2.  A user-defined property is implemented as a perl subroutine
818               with certain highly constrained naming conventions.  It was
819               documented previously that the sub would be in the current
820               package if the package was unspecified.  This turned out not to
821               be true in all cases, but now it is.
822
823           3.  All recursive calls are treated as infinite recursion.
824               Previously they would cause the interpreter to panic.  Now,
825               they cause the regex pattern to fail to compile.
826
827           4.  Similarly, any other error likely would lead to a panic; now to
828               just the pattern failing to compile.
829
830           5.  The old mechanism did not detect illegal ranges in the
831               definition of the property.  Now, the range max must not be
832               smaller than the range min.  Otherwise, the pattern fails to
833               compile.
834
835           6.  The intention was to have each sub called only once during the
836               lifetime of the program, so that a property's definition is
837               immutable.  This was relaxed so that it could be called once
838               for all /i compilations, and potentially a second time for
839               non-/i (the sub is passed a parameter indicating which).
840               However, in practice there were instances when this was broken,
841               and multiple calls were possible.  Those have been fixed.  Now
842               (besides the /i,non-/i cases) the only way a sub can be called
843               multiple times is if some component of it has not been defined
844               yet.  For example, suppose we have sub IsA() whose definition
845               is known at compile time, and it in turn calls isB() whose
846               definition is not yet known.  isA() will be called each time a
847               pattern it appears in is compiled.  If isA() also calls isC()
848               and that definition is known, isC() will be called just once.
849
850           7.  There were some races and very long hangs should one thread be
851               compiling the same property as another simultaneously.  These
852               have now been fixed.
853
854       •   Fixed a failure to match properly.
855
856           An EXACTFish regnode has a finite length it can hold for the string
857           being matched.  If that length is exceeded, a second node is used
858           for the next segment of the string, for as many regnodes as are
859           needed.  Care has to be taken where to break the string, in order
860           to deal multi-character folds in Unicode correctly. If we want to
861           break a string at a place which could potentially be in the middle
862           of a multi-character fold, we back off one (or more) characters,
863           leaving a shorter EXACTFish regnode. This backing off mechanism
864           contained an off-by-one error.  [perl #133756]
865           <https://rt.perl.org/Ticket/Display.html?id=133756>.
866
867       •   A bare "eof" call with no previous file handle now returns true.
868           [perl #133721] <https://rt.perl.org/Ticket/Display.html?id=133721>
869
870       •   Failing to compile a format now aborts compilation.  Like other
871           errors in sub-parses this could leave the parser in a strange
872           state, possibly crashing perl if compilation continued.  [perl
873           #132158] <https://rt.perl.org/Ticket/Display.html?id=132158>
874
875       •   If an in-place edit is still in progress during global destruction
876           and the process exit code (as stored in $?) is zero, perl will now
877           treat the in-place edit as successful, replacing the input file
878           with any output produced.
879
880           This allows code like:
881
882             perl -i -ne 'print "Foo"; last'
883
884           to replace the input file, while code like:
885
886             perl -i -ne 'print "Foo"; die'
887
888           will not.  Partly resolves [perl #133659]
889           <https://rt.perl.org/Ticket/Display.html?id=133659>.
890
891       •   A regression in 5.28 caused the following code to fail
892
893            close(STDIN); open(CHILD, "|wc -l")'
894
895           because the child's stdin would be closed on exec. This has now
896           been fixed.
897
898       •   Fixed an issue where compiling a regexp containing both compile-
899           time and run-time code blocks could lead to trying to compile
900           something which is invalid syntax.
901
902       •   Fixed build failures with "-DNO_LOCALE_NUMERIC" and
903           "-DNO_LOCALE_COLLATE".  [perl #133696]
904           <https://rt.perl.org/Ticket/Display.html?id=133696>.
905
906       •   Prevent the tests in ext/B/t/strict.t from being skipped.  [perl
907           #133713] <https://rt.perl.org/Ticket/Display.html?id=133713>.
908
909       •   "/di" nodes ending or beginning in s are now "EXACTF". We do not
910           want two "EXACTFU" to be joined together during optimization, and
911           to form a "ss", "sS", "Ss" or "SS" sequence; they are the only
912           multi-character sequences which may match differently under "/ui"
913           and "/di".
914

Acknowledgements

916       Perl 5.30.0 represents approximately 11 months of development since
917       Perl 5.28.0 and contains approximately 620,000 lines of changes across
918       1,300 files from 58 authors.
919
920       Excluding auto-generated files, documentation and release tools, there
921       were approximately 510,000 lines of changes to 750 .pm, .t, .c and .h
922       files.
923
924       Perl continues to flourish into its fourth decade thanks to a vibrant
925       community of users and developers. The following people are known to
926       have contributed the improvements that became Perl 5.30.0:
927
928       Aaron Crane, Abigail, Alberto Simo~es, Alexandr Savca, Andreas Koenig,
929       Andy Dougherty, Aristotle Pagaltzis, Brian Greenfield, Chad Granum,
930       Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsaaker, Dan
931       Book, Dan Dedrick, Daniel Dragan, Dan Kogai, David Cantrell, David
932       Mitchell, Dominic Hargreaves, E. Choroba, Ed J, Eugen Konkov, Francois
933       Perrad, Graham Knop, Hauke D, H.Merijn Brand, Hugo van der Sanden,
934       Jakub Wilk, James Clarke, James E Keenan, Jerry D. Hedden, Jim Cromie,
935       John SJ Anderson, Karen Etheridge, Karl Williamson, Leon Timmermans,
936       Matthias Bethke, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Petr
937       PisaX, Phil Pearl (Lobbes), Richard Leach, Ryan Voots, Sawyer X, Shlomi
938       Fish, Sisyphus, Slaven Rezic, Steve Hay, Sullivan Beck, Tina Mueller,
939       Tomasz Konojacki, Tom Wyant, Tony Cook, Unicode Consortium, Yves Orton,
940       Zak B. Elep.
941
942       The list above is almost certainly incomplete as it is automatically
943       generated from version control history. In particular, it does not
944       include the names of most of the (very much appreciated) contributors
945       who reported issues to the Perl bug tracker. Noteworthy in this release
946       were the large number of bug fixes made possible by Sergey Aleynikov's
947       high quality perlbug reports for issues he discovered by fuzzing with
948       AFL.
949
950       Many of the changes included in this version originated in the CPAN
951       modules included in Perl's core. We're grateful to the entire CPAN
952       community for helping Perl to flourish.
953
954       For a more complete list of all of Perl's historical contributors,
955       please see the AUTHORS file in the Perl source distribution.
956

Reporting Bugs

958       If you find what you think is a bug, you might check the perl bug
959       database at <https://rt.perl.org/>.  There may also be information at
960       <http://www.perl.org/>, the Perl Home Page.
961
962       If you believe you have an unreported bug, please run the perlbug
963       program included with your release.  Be sure to trim your bug down to a
964       tiny but sufficient test case.  Your bug report, along with the output
965       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
966       the Perl porting team.
967
968       If the bug you are reporting has security implications which make it
969       inappropriate to send to a publicly archived mailing list, then see
970       "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of
971       how to report the issue.
972

Give Thanks

974       If you wish to thank the Perl 5 Porters for the work we had done in
975       Perl 5, you can do so by running the "perlthanks" program:
976
977           perlthanks
978
979       This will send an email to the Perl 5 Porters list with your show of
980       thanks.
981

SEE ALSO

983       The Changes file for an explanation of how to view exhaustive details
984       on what changed.
985
986       The INSTALL file for how to build Perl.
987
988       The README file for general stuff.
989
990       The Artistic and Copying files for copyright information.
991
992
993
994perl v5.32.1                      2021-05-31                  PERL5300DELTA(1)
Impressum