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.  [GH
17       #16822] <https://github.com/Perl/perl5/issues/16822>.
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 layers,
131           such as compression are completely ignored with or without the
132           ":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       [GH #14839] <https://github.com/Perl/perl5/issues/14839>.
139
140   my() in false conditional prohibited
141       Declarations such as "my $x if 0" are no longer permitted.
142
143       [GH #16702] <https://github.com/Perl/perl5/issues/16702>.
144
145   Fatalize $* and $#
146       These special variables, long deprecated, now throw exceptions when
147       used.
148
149       [GH #16718] <https://github.com/Perl/perl5/issues/16718>.
150
151   Fatalize unqualified use of dump()
152       The dump() function, long discouraged, may no longer be used unless it
153       is fully qualified, i.e., CORE::dump().
154
155       [GH #16719] <https://github.com/Perl/perl5/issues/16719>.
156
157   Remove File::Glob::glob()
158       The File::Glob::glob() function, long deprecated, has been removed and
159       now throws an exception which advises use of File::Glob::bsd_glob()
160       instead.
161
162       [GH #16721] <https://github.com/Perl/perl5/issues/16721>.
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.  [GH #16035]
168       <https://github.com/Perl/perl5/issues/16035>.
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.  [GH #16704]
180       <https://github.com/Perl/perl5/issues/16704>.
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 instructions
198           than before.  The performance of checking that a sequence of bytes
199           is valid UTF-8 is similarly improved, again by using a DFA.
200
201       •   Eliminate recursion from finalize_op().  [GH #11866]
202           <https://github.com/Perl/perl5/issues/11866>.
203
204       •   A handful of small optimizations related to character folding and
205           character classes in regular expressions.
206
207       •   Optimization of "IV" to "UV" conversions.  [GH #16761]
208           <https://github.com/Perl/perl5/issues/16761>.
209
210       •   Speed up of the integer stringification algorithm by processing two
211           digits at a time instead of one.  [GH #16769]
212           <https://github.com/Perl/perl5/issues/16769>.
213
214       •   Improvements based on LGTM analysis and recommendation.
215           (<https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree>).  [GH
216           #16765] <https://github.com/Perl/perl5/issues/16765>.  [GH #16773]
217           <https://github.com/Perl/perl5/issues/16773>.
218
219       •   Code optimizations in regcomp.c, regcomp.h, regexec.c.
220
221       •   Regular expression pattern matching of things like "qr/[^a]/" is
222           significantly sped up, where a is any ASCII character.  Other
223           classes can get this speed up, but which ones is complicated and
224           depends on the underlying bit patterns of those characters, so
225           differs between ASCII and EBCDIC platforms, but all case pairs,
226           like "qr/[Gg]/" are included, as is "[^01]".
227

Modules and Pragmata

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

Documentation

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

Diagnostics

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

Utility Changes

565   xsubpp
566       •   The generated prototype (with "PROTOTYPES: ENABLE") would include
567           "OUTLIST" parameters, but these aren't arguments to the perl
568           function.  This has been rectified.  [GH #16746]
569           <https://github.com/Perl/perl5/issues/16746>.
570

Configuration and Compilation

572       •   Normally the thread-safe locale functions are used only on threaded
573           builds.  It is now possible to force their use on unthreaded builds
574           on systems that have them available, by including the
575           "-Accflags='-DUSE_THREAD_SAFE_LOCALE'" option to Configure.
576
577       •   Improve detection of memrchr, strlcat, and strlcpy
578
579       •   Improve Configure detection of memmem().  [GH #16807]
580           <https://github.com/Perl/perl5/issues/16807>.
581
582       •   Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build
583           option.
584
585       •   Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.
586

Testing

588t/lib/croak/op [GH #15774]
589           <https://github.com/Perl/perl5/issues/15774>.
590
591           separate error for "push", etc. on hash/glob.
592
593t/op/svleak.t [GH #16749]
594           <https://github.com/Perl/perl5/issues/16749>.
595
596           Add test for "goto &sub" in overload leaking.
597
598       •   Split t/re/fold_grind.t into multiple test files.
599
600       •   Fix intermittent tests which failed due to race conditions which
601           surface during parallel testing.  [GH #16795]
602           <https://github.com/Perl/perl5/issues/16795>.
603
604       •   Thoroughly test paragraph mode, using a new test file,
605           t/io/paragraph_mode.t.  [GH #16787]
606           <https://github.com/Perl/perl5/issues/16787>.
607
608       •   Some tests in t/io/eintr.t caused the process to hang on pre-16
609           Darwin. These tests are skipped for those version of Darwin.
610

Platform Support

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

Internal Changes

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

Selected Bug Fixes

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

Acknowledgements

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

Reporting Bugs

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

Give Thanks

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

SEE ALSO

978       The Changes file for an explanation of how to view exhaustive details
979       on what changed.
980
981       The INSTALL file for how to build Perl.
982
983       The README file for general stuff.
984
985       The Artistic and Copying files for copyright information.
986
987
988
989perl v5.38.2                      2023-11-30                  PERL5300DELTA(1)
Impressum