5 perl5300delta - what is new for perl v5.30.0
9 This document describes differences between the 5.28.0 release and the 5.30.0
12 If you are upgrading from an earlier release such as 5.26.0, first read
13 L<perl5280delta>, which describes differences between 5.26.0 and 5.28.0.
17 sv_utf8_(downgrade|decode) are no longer marked as experimental.
18 L<[GH #16822]|https://github.com/Perl/perl5/issues/16822>.
20 =head1 Core Enhancements
22 =head2 Limited variable length lookbehind in regular expression pattern matching is now experimentally supported
24 Using a lookbehind assertion (like C<(?<=foo?)> or C<(?<!ba{1,9}r)> previously
25 would generate an error and refuse to compile. Now it compiles (if the
26 maximum lookbehind is at most 255 characters), but raises a warning in
27 the new C<experimental::vlb> warnings category. This is to caution you
28 that the precise behavior is subject to change based on feedback from
31 See L<perlre/(?<=pattern)> and L<perlre/(?<!pattern)>.
33 =head2 The upper limit C<"n"> specifiable in a regular expression quantifier of the form C<"{m,n}"> has been doubled to 65534
35 The meaning of an unbounded upper quantifier C<"{m,}"> remains unchanged.
36 It matches 2**31 - 1 times on most platforms, and more on ones where a C
37 language short variable is more than 4 bytes long.
39 =head2 Unicode 12.1 is supported
41 Because of a change in Unicode release cycles, Perl jumps from Unicode
42 10.0 in Perl 5.28 to Unicode 12.1 in Perl 5.30.
44 For details on the Unicode changes, see
45 L<https://www.unicode.org/versions/Unicode11.0.0/> for 11.0;
46 L<https://www.unicode.org/versions/Unicode12.0.0/> for 12.0;
48 L<https://www.unicode.org/versions/Unicode12.1.0/> for 12.1.
49 (Unicode 12.1 differs from 12.0 only in the addition of a single
50 character, that for the new Japanese era name.)
52 The Word_Break property, as in past Perl releases, remains tailored to
53 behave more in line with expectations of Perl users. This means that
54 sequential runs of horizontal white space characters are not broken
55 apart, but kept as a single run. Unicode 11 changed from past versions
56 to be more in line with Perl, but it left several white space characters
57 as causing breaks: TAB, NO BREAK SPACE, and FIGURE SPACE (U+2007). We
58 have decided to continue to use the previous Perl tailoring with regards
61 =head2 Wildcards in Unicode property value specifications are now partially supported
63 You can now do something like this in a regular expression pattern
65 qr! \p{nv= /(?x) \A [0-5] \z / }!
67 which matches all Unicode code points whose numeric value is
68 between 0 and 5 inclusive. So, it could match the Thai or Bengali
69 digits whose numeric values are 0, 1, 2, 3, 4, or 5.
71 This marks another step in implementing the regular expression features
72 the Unicode Consortium suggests.
74 Most properties are supported, with the remainder planned for 5.32.
75 Details are in L<perlunicode/Wildcards in Property Values>.
77 =head2 qr'\N{name}' is now supported
79 Previously it was an error to evaluate a named character C<\N{...}>
80 within a single quoted regular expression pattern (whose evaluation is
81 deferred from the normal place). This restriction is now removed.
83 =head2 Turkic UTF-8 locales are now seamlessly supported
85 Turkic languages have different casing rules than other languages for
86 the characters C<"i"> and C<"I">. The uppercase of C<"i"> is LATIN
87 CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of C<"I"> is LATIN
88 SMALL LETTER DOTLESS I (U+0131). Unicode furnishes alternate casing
89 rules for use with Turkic languages. Previously, Perl ignored these,
90 but now, it uses them when it detects that it is operating under a
93 =head2 It is now possible to compile perl to always use thread-safe locale operations.
95 Previously, these calls were only used when the perl was compiled to be
96 multi-threaded. To always enable them, add
98 -Accflags='-DUSE_THREAD_SAFE_LOCALE'
100 to your F<Configure> flags.
102 =head2 Eliminate opASSIGN macro usage from core
104 This macro is still defined but no longer used in core
106 =head2 C<-Drv> now means something on C<-DDEBUGGING> builds
108 Now, adding the verbose flag (C<-Dv>) to the C<-Dr> flag turns on all
109 possible regular expression debugging.
111 =head1 Incompatible Changes
113 =head2 Assigning non-zero to C<$[> is fatal
115 Setting L<< C<$[>|perlvar/$[ >> to a non-zero value has been deprecated since
116 Perl 5.12 and now throws a fatal error.
117 See L<<< perldeprecation/Assigning non-zero to C<< $[ >> is fatal >>>.
119 =head2 Delimiters must now be graphemes
121 See L<perldeprecation/Use of unassigned code point or non-standalone grapheme
124 =head2 Some formerly deprecated uses of an unescaped left brace C<"{"> in
125 regular expression patterns are now illegal
127 But to avoid breaking code unnecessarily, most instances that issued a
128 deprecation warning, remain legal and now have a non-deprecation warning
129 raised. See L<perldeprecation/Unescaped left braces in regular expressions>.
131 =head2 Previously deprecated sysread()/syswrite() on :utf8 handles is now fatal
133 Calling sysread(), syswrite(), send() or recv() on a C<:utf8> handle,
134 whether applied explicitly or implicitly, is now fatal. This was
135 deprecated in perl 5.24.
137 There were two problems with calling these functions on C<:utf8>
144 All four functions only paid attention to the C<:utf8> flag. Other
145 layers were completely ignored, so a handle with
146 C<:encoding(UTF-16LE)> layer would be treated as UTF-8. Other layers,
147 such as compression are completely ignored with or without the
152 sysread() and recv() would read from the handle, skipping any
153 validation by the layers, and do no validation of their own. This
154 could lead to invalidly encoded perl scalars.
158 L<[GH #14839]|https://github.com/Perl/perl5/issues/14839>.
160 =head2 my() in false conditional prohibited
162 Declarations such as C<my $x if 0> are no longer permitted.
164 L<[GH #16702]|https://github.com/Perl/perl5/issues/16702>.
166 =head2 Fatalize $* and $#
168 These special variables, long deprecated, now throw exceptions when used.
170 L<[GH #16718]|https://github.com/Perl/perl5/issues/16718>.
172 =head2 Fatalize unqualified use of dump()
174 The C<dump()> function, long discouraged, may no longer be used unless it is
175 fully qualified, I<i.e.>, C<CORE::dump()>.
177 L<[GH #16719]|https://github.com/Perl/perl5/issues/16719>.
179 =head2 Remove File::Glob::glob()
181 The C<File::Glob::glob()> function, long deprecated, has been removed and now
182 throws an exception which advises use of C<File::Glob::bsd_glob()> instead.
184 L<[GH #16721]|https://github.com/Perl/perl5/issues/16721>.
186 =head2 C<pack()> no longer can return malformed UTF-8
188 It croaks if it would otherwise return a UTF-8 string that contains
189 malformed UTF-8. This protects against potential security threats. This
190 is considered a bug fix as well.
191 L<[GH #16035]|https://github.com/Perl/perl5/issues/16035>.
193 =head2 Any set of digits in the Common script are legal in a script run of another script
195 There are several sets of digits in the Common script. C<[0-9]> is the
196 most familiar. But there are also C<[\x{FF10}-\x{FF19}]> (FULLWIDTH
197 DIGIT ZERO - FULLWIDTH DIGIT NINE), and several sets for use in
198 mathematical notation, such as the MATHEMATICAL DOUBLE-STRUCK DIGITs.
199 Any of these sets should be able to appear in script runs of, say,
200 Greek. But the design of 5.30 overlooked all but the ASCII digits
201 C<[0-9]>, so the design was flawed. This has been fixed, so is both a
202 bug fix and an incompatibility.
203 L<[GH #16704]|https://github.com/Perl/perl5/issues/16704>.
205 All digits in a run still have to come from the same set of ten digits.
207 =head2 JSON::PP enables allow_nonref by default
209 As JSON::XS 4.0 changed its policy and enabled allow_nonref
210 by default, JSON::PP also enabled allow_nonref by default.
214 =head2 In XS code, use of various macros dealing with UTF-8.
216 This deprecation was scheduled to become fatal in 5.30, but has been
217 delayed to 5.32 due to problems that showed up with some CPAN modules.
218 For details of what's affected, see L<perldeprecation|
219 perldeprecation/In XS code, use of various macros dealing with UTF-8.>.
221 =head1 Performance Enhancements
227 Translating from UTF-8 into the code point it represents now is done via a
228 deterministic finite automaton, speeding it up. As a typical example,
229 C<ord("\x7fff")> now requires 12% fewer instructions than before. The
230 performance of checking that a sequence of bytes is valid UTF-8 is similarly
231 improved, again by using a DFA.
235 Eliminate recursion from finalize_op().
236 L<[GH #11866]|https://github.com/Perl/perl5/issues/11866>.
240 A handful of small optimizations related to character folding
241 and character classes in regular expressions.
245 Optimization of C<IV> to C<UV> conversions.
246 L<[GH #16761]|https://github.com/Perl/perl5/issues/16761>.
250 Speed up of the integer stringification algorithm by processing
251 two digits at a time instead of one.
252 L<[GH #16769]|https://github.com/Perl/perl5/issues/16769>.
256 Improvements based on LGTM analysis and recommendation.
257 (L<https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree>).
258 L<[GH #16765]|https://github.com/Perl/perl5/issues/16765>.
259 L<[GH #16773]|https://github.com/Perl/perl5/issues/16773>.
263 Code optimizations in F<regcomp.c>, F<regcomp.h>, F<regexec.c>.
267 Regular expression pattern matching of things like C<qr/[^I<a>]/> is
268 significantly sped up, where I<a> is any ASCII character. Other classes
269 can get this speed up, but which ones is complicated and depends on the
270 underlying bit patterns of those characters, so differs between ASCII
271 and EBCDIC platforms, but all case pairs, like C<qr/[Gg]/> are included,
276 =head1 Modules and Pragmata
278 =head2 Updated Modules and Pragmata
284 L<Archive::Tar> has been upgraded from version 2.30 to 2.32.
288 L<B> has been upgraded from version 1.74 to 1.76.
292 L<B::Concise> has been upgraded from version 1.003 to 1.004.
296 L<B::Deparse> has been upgraded from version 1.48 to 1.49.
300 L<bignum> has been upgraded from version 0.49 to 0.51.
304 L<bytes> has been upgraded from version 1.06 to 1.07.
308 L<Carp> has been upgraded from version 1.38 to 1.50
312 L<Compress::Raw::Bzip2> has been upgraded from version 2.074 to 2.084.
316 L<Compress::Raw::Zlib> has been upgraded from version 2.076 to 2.084.
320 L<Config::Extensions> has been upgraded from version 0.02 to 0.03.
324 L<Config::Perl::V>. has been upgraded from version 0.29 to 0.32. This was due
325 to a new configuration variable that has influence on binary compatibility:
326 C<USE_THREAD_SAFE_LOCALE>.
330 L<CPAN> has been upgraded from version 2.20 to 2.22.
334 L<Data::Dumper> has been upgraded from version 2.170 to 2.174
336 L<Data::Dumper> now avoids leaking when C<croak>ing.
340 L<DB_File> has been upgraded from version 1.840 to 1.843.
344 L<deprecate> has been upgraded from version 0.03 to 0.04.
348 L<Devel::Peek> has been upgraded from version 1.27 to 1.28.
352 L<Devel::PPPort> has been upgraded from version 3.40 to 3.52.
356 L<Digest::SHA> has been upgraded from version 6.01 to 6.02.
360 L<Encode> has been upgraded from version 2.97 to 3.01.
364 L<Errno> has been upgraded from version 1.29 to 1.30.
368 L<experimental> has been upgraded from version 0.019 to 0.020.
372 L<ExtUtils::CBuilder> has been upgraded from version 0.280230 to 0.280231.
376 L<ExtUtils::Manifest> has been upgraded from version 1.70 to 1.72.
380 L<ExtUtils::Miniperl> has been upgraded from version 1.08 to 1.09.
384 L<ExtUtils::ParseXS> has been upgraded from version 3.39 to 3.40.
385 C<OUTLIST> parameters are no longer incorrectly included in the
386 automatically generated function prototype.
387 L<[GH #16746]|https://github.com/Perl/perl5/issues/16746>.
391 L<feature> has been upgraded from version 1.52 to 1.54.
395 L<File::Copy> has been upgraded from version 2.33 to 2.34.
399 L<File::Find> has been upgraded from version 1.34 to 1.36.
401 C<$File::Find::dont_use_nlink> now defaults to 1 on all
403 L<[GH #16759]|https://github.com/Perl/perl5/issues/16759>.
405 Variables C<< $Is_Win32 >> and C<< $Is_VMS >> are being initialized.
409 L<File::Glob> has been upgraded from version 1.31 to 1.32.
413 L<File::Path> has been upgraded from version 2.15 to 2.16.
417 L<File::Spec> has been upgraded from version 3.74 to 3.78.
419 Silence L<Cwd> warning on Android builds if C<targetsh> is not defined.
423 L<File::Temp> has been upgraded from version 0.2304 to 0.2309.
427 L<Filter::Util::Call> has been upgraded from version 1.58 to 1.59.
431 L<GDBM_File> has been upgraded from version 1.17 to 1.18.
435 L<HTTP::Tiny> has been upgraded from version 0.070 to 0.076.
439 L<I18N::Langinfo> has been upgraded from version 0.17 to 0.18.
443 L<IO> has been upgraded from version 1.39 to 1.40.
447 IO-Compress has been upgraded from version 2.074 to 2.084.
449 Adds support for C<< IO::Uncompress::Zstd >> and
450 C<< IO::Uncompress::UnLzip >>.
452 The C<< BinModeIn >> and C<< BinModeOut >> options are now no-ops.
453 ALL files will be read/written in binmode.
457 L<IPC::Cmd> has been upgraded from version 1.00 to 1.02.
461 L<JSON::PP> has been upgraded from version 2.97001 to 4.02.
463 L<JSON::PP> as JSON::XS 4.0 enables C<allow_nonref> by default.
467 L<lib> has been upgraded from version 0.64 to 0.65.
471 L<Locale::Codes> has been upgraded from version 3.56 to 3.57.
475 L<Math::BigInt> has been upgraded from version 1.999811 to 1.999816.
477 C<< bnok() >> now supports the full Kronenburg extension.
478 L<[cpan #95628]|https://rt.cpan.org/Ticket/Display.html?id=95628>.
482 L<Math::BigInt::FastCalc> has been upgraded from version 0.5006 to 0.5008.
486 L<Math::BigRat> has been upgraded from version 0.2613 to 0.2614.
490 L<Module::CoreList> has been upgraded from version 5.20180622 to 5.20190520.
492 Changes to B::Op_private and Config
496 L<Module::Load> has been upgraded from version 0.32 to 0.34.
500 L<Module::Metadata> has been upgraded from version 1.000033 to 1.000036.
502 Properly clean up temporary directories after testing.
506 L<NDBM_File> has been upgraded from version 1.14 to 1.15.
510 L<Net::Ping> has been upgraded from version 2.62 to 2.71.
514 L<ODBM_File> has been upgraded from version 1.15 to 1.16.
518 PathTools has been upgraded from version 3.74 to 3.78.
522 L<parent> has been upgraded from version 0.236 to 0.237.
526 L<perl5db.pl> has been upgraded from version 1.54 to 1.55.
528 Debugging threaded code no longer deadlocks in C<DB::sub> nor
533 L<perlfaq> has been upgraded from version 5.021011 to 5.20190126.
537 L<PerlIO::encoding> has been upgraded from version 0.26 to 0.27.
539 Warnings enabled by setting the C<WARN_ON_ERR> flag in
540 C<$PerlIO::encoding::fallback> are now only produced if warnings are
541 enabled with C<use warnings "utf8";> or setting C<$^W>.
545 L<PerlIO::scalar> has been upgraded from version 0.29 to 0.30.
549 podlators has been upgraded from version 4.10 to 4.11.
553 L<POSIX> has been upgraded from version 1.84 to 1.88.
557 L<re> has been upgraded from version 0.36 to 0.37.
561 L<SDBM_File> has been upgraded from version 1.14 to 1.15.
565 L<sigtrap> has been upgraded from version 1.08 to 1.09.
569 L<Storable> has been upgraded from version 3.08 to 3.15.
571 Storable no longer probes for recursion limits at build time.
572 L<[GH #16780]|https://github.com/Perl/perl5/issues/16780>
575 Metasploit exploit code was included to test for CVE-2015-1592
576 detection, this caused anti-virus detections on at least one AV suite.
577 The exploit code has been removed and replaced with a simple
579 L<[GH #16778]|https://github.com/Perl/perl5/issues/16778>
583 L<Test::Simple> has been upgraded from version 1.302133 to 1.302162.
587 L<Thread::Queue> has been upgraded from version 3.12 to 3.13.
591 L<threads::shared> has been upgraded from version 1.58 to 1.60.
593 Added support for extra tracing of locking, this requires a
594 C<-DDEBUGGING> and extra compilation flags.
598 L<Time::HiRes> has been upgraded from version 1.9759 to 1.9760.
602 L<Time::Local> has been upgraded from version 1.25 to 1.28.
606 L<Time::Piece> has been upgraded from version 1.3204 to 1.33.
610 L<Unicode::Collate> has been upgraded from version 1.25 to 1.27.
614 L<Unicode::UCD> has been upgraded from version 0.70 to 0.72.
618 L<User::grent> has been upgraded from version 1.02 to 1.03.
622 L<utf8> has been upgraded from version 1.21 to 1.22.
626 L<vars> has been upgraded from version 1.04 to 1.05.
628 C<vars.pm> no longer disables non-vars strict when checking if strict
630 L<[GH #15851]|https://github.com/Perl/perl5/issues/15851>.
634 L<version> has been upgraded from version 0.9923 to 0.9924.
638 L<warnings> has been upgraded from version 1.42 to 1.44.
642 L<XS::APItest> has been upgraded from version 0.98 to 1.00.
646 L<XS::Typemap> has been upgraded from version 0.16 to 0.17.
650 =head2 Removed Modules and Pragmata
652 The following modules will be removed from the core distribution in a
653 future release, and will at that time need to be installed from CPAN.
654 Distributions on CPAN which require these modules will need to list them as
657 The core versions of these modules will now issue C<"deprecated">-category
658 warnings to alert you to this fact. To silence these deprecation warnings,
659 install the modules in question from CPAN.
661 Note that these are (with rare exceptions) fine modules that you are encouraged
662 to continue to use. Their disinclusion from core primarily hinges on their
663 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
664 not usually on concerns over their design.
670 B::Debug is no longer distributed with the core distribution. It
671 continues to be available on CPAN as
672 C<< L<B::Debug|https://metacpan.org/pod/B::Debug> >>.
676 Locale::Codes has been removed at the request of its author. It
677 continues to be available on CPAN as
678 C<< L<Locale::Codes|https://metacpan.org/pod/Locale::Codes> >>
679 L<[GH #16660]|https://github.com/Perl/perl5/issues/16660>.
685 =head2 Changes to Existing Documentation
687 We have attempted to update the documentation to reflect the changes
688 listed in this document. If you find any we have missed, send email
689 to L<perlbug@perl.org|mailto:perlbug@perl.org>.
697 C<AvFILL()> was wrongly listed as deprecated. This has been corrected.
698 L<[GH #16586]|https://github.com/Perl/perl5/issues/16586>
708 We no longer have null (empty line) here doc terminators, so
709 L<perlop> should not refer to them.
713 The behaviour of C<tr> when the delimiter is an apostrophe has been clarified.
714 In particular, hyphens aren't special, and C<\x{}> isn't interpolated.
715 L<[GH #15853]|https://github.com/Perl/perl5/issues/15853>
719 =head3 L<perlreapi>, L<perlvar>
725 Improve docs for lastparen, lastcloseparen.
735 The entry for L<perlfunc/-X> has been clarified to indicate that symbolic
736 links are followed for most tests.
740 Clarification of behaviour of C<reset EXPR>.
744 Try to clarify that C<< ref(qr/xx/) >> returns C<Regexp> rather than
746 L<[GH #16801]|https://github.com/Perl/perl5/issues/16801>.
756 Clarification of the syntax of /(?(cond)yes)/.
766 There are actually two slightly different types of UTF-8 locales: one for Turkic
767 languages and one for everything else. Starting in Perl v5.30, Perl seamlessly
772 =head3 L<perlrecharclass>
778 Added a note for the ::xdigit:: character class.
788 More specific documentation of paragraph mode.
789 L<[GH #16787]|https://github.com/Perl/perl5/issues/16787>.
795 The following additions or changes have been made to diagnostic output,
796 including warnings and fatal error messages. For the complete list of
797 diagnostic messages, see L<perldiag>.
799 =head2 Changes to Existing Diagnostics
805 As noted under L<Incompatible Changes> above, the deprecation warning
806 "Unescaped left brace in regex is deprecated here (and will be fatal in Perl
807 5.30), passed through in regex; marked by S<<-- HERE> in m/%s/" has been
808 changed to the non-deprecation warning "Unescaped left brace in regex is passed
809 through in regex; marked by S<<-- HERE> in m/%s/".
813 Specifying C<\o{}> without anything between the braces now yields the
814 fatal error message "Empty \o{}". Previously it was "Number with no
815 digits". This means the same wording is used for this kind of error as
816 with similar constructs such as C<\p{}>.
820 Within the scope of the experimental feature C<use re 'strict'>,
821 specifying C<\x{}> without anything between the braces now yields the
822 fatal error message "Empty \x{}". Previously it was "Number with no
823 digits". This means the same wording is used for this kind of error as
824 with similar constructs such as C<\p{}>. It is legal, though not wise
825 to have an empty C<\x> outside of C<re 'strict'>; it silently generates
830 L<Type of arg %d to %s must be %s (not %s)|perldiag/"Type of arg %d to %s must be %s (not %s)">
832 Attempts to push, pop, etc on a hash or glob now produce this message
833 rather than complaining that they no longer work on scalars.
834 L<[GH #15774]|https://github.com/Perl/perl5/issues/15774>.
838 L<Prototype not terminated|perldiag/"Prototype not terminated">
840 The file and line number is now reported for this error.
841 L<[GH #16697]|https://github.com/Perl/perl5/issues/16697>
845 Under C<< -Dr >> (or C<< use re 'Debug' >>) the compiled regex engine
846 program is displayed. It used to use two different spellings for I<<
848 C<< INFINITY >>, and C<< INFTY >>. It now uses the latter exclusively,
849 as that spelling has been around the longest.
853 =head1 Utility Changes
861 The generated prototype (with C<< PROTOTYPES: ENABLE >>) would include
862 C<< OUTLIST >> parameters, but these aren't arguments to the perl function.
863 This has been rectified.
864 L<[GH #16746]|https://github.com/Perl/perl5/issues/16746>.
868 =head1 Configuration and Compilation
874 Normally the thread-safe locale functions are used only on threaded
875 builds. It is now possible to force their use on unthreaded builds on
876 systems that have them available, by including the
877 C<-Accflags='-DUSE_THREAD_SAFE_LOCALE'> option to F<Configure>.
881 Improve detection of memrchr, strlcat, and strlcpy
885 Improve Configure detection of memmem().
886 L<[GH #16807]|https://github.com/Perl/perl5/issues/16807>.
890 Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build option.
894 Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.
905 L<[GH #15774]|https://github.com/Perl/perl5/issues/15774>.
907 separate error for C<push>, etc. on hash/glob.
912 L<[GH #16749]|https://github.com/Perl/perl5/issues/16749>.
914 Add test for C<goto &sub> in overload leaking.
918 Split F<t/re/fold_grind.t> into multiple test files.
922 Fix intermittent tests which failed due to race conditions which
923 surface during parallel testing.
924 L<[GH #16795]|https://github.com/Perl/perl5/issues/16795>.
928 Thoroughly test paragraph mode, using a new test file,
929 F<t/io/paragraph_mode.t>.
930 L<[GH #16787]|https://github.com/Perl/perl5/issues/16787>.
934 Some tests in F<< t/io/eintr.t >> caused the process to hang on
935 pre-16 Darwin. These tests are skipped for those version of Darwin.
939 =head1 Platform Support
941 =head2 Platform-Specific Notes
947 An obscure problem in C<pack()> when compiling with HP C-ANSI-C has been fixed
948 by disabling optimizations in F<pp_pack.c>.
952 Perl's build and testing process on Mac OS X for C<-Duseshrplib>
953 builds is now compatible with Mac OS X System Integrity Protection
956 SIP prevents binaries in F</bin> (and a few other places) being passed
957 the C<DYLD_LIBRARY_PATH> environment variable. For our purposes this
958 prevents C<DYLD_LIBRARY_PATH> from being passed to the shell, which
959 prevents that variable being passed to the testing or build process,
960 so running C<perl> couldn't find F<libperl.dylib>.
962 To work around that, the initial build of the F<perl> executable
963 expects to find F<libperl.dylib> in the build directory, and the
964 library path is then adjusted during installation to point to the
967 L<[GH #15057]|https://github.com/Perl/perl5/issues/15057>.
971 Some support for Minix3 has been re-added.
975 Cygwin doesn't make C<< cuserid >> visible.
979 C99 math functions are now available.
987 The C<USE_CPLUSPLUS> build option which has long been available in
988 F<win32/Makefile> (for B<nmake>) and F<win32/makefile.mk> (for B<dmake>) is now
989 also available in F<win32/GNUmakefile> (for B<gmake>).
993 The B<nmake> makefile no longer defaults to Visual C++ 6.0 (a very old version
994 which is unlikely to be widely used today). As a result, it is now a
995 requirement to specify the C<CCTYPE> since there is no obvious choice of which
996 modern version to default to instead. Failure to specify C<CCTYPE> will result
997 in an error being output and the build will stop.
999 (The B<dmake> and B<gmake> makefiles will automatically detect which compiler
1000 is being used, so do not require C<CCTYPE> to be set. This feature has not yet
1001 been added to the B<nmake> makefile.)
1005 C<sleep()> with warnings enabled for a C<USE_IMP_SYS> build no longer
1006 warns about the sleep timeout being too large.
1007 L<[GH #16631]|https://github.com/Perl/perl5/issues/16631>.
1011 Support for compiling perl on Windows using Microsoft Visual Studio 2019
1012 (containing Visual C++ 14.2) has been added.
1016 socket() now sets C<$!> if the protocol, address family and socket
1017 type combination is not found.
1018 L<[GH #16849]|https://github.com/Perl/perl5/issues/16849>.
1022 The Windows Server 2003 SP1 Platform SDK build, with its early x64 compiler and
1023 tools, was accidentally broken in Perl 5.27.9. This has now been fixed.
1029 =head1 Internal Changes
1035 The sizing pass has been eliminated from the regular expression
1036 compiler. An extra pass may instead be needed in some cases to count
1037 the number of parenthetical capture groups.
1041 A new function L<perlapi/C<my_strtod>> or its synonym, Strtod(), is
1042 now available with the same signature as the libc strtod(). It provides
1043 strotod() equivalent behavior on all platforms, using the best available
1044 precision, depending on platform capabilities and F<Configure> options,
1045 while handling locale-related issues, such as if the radix character
1046 should be a dot or comma.
1050 Added C<newSVsv_nomg()> to copy a SV without processing get magic on
1052 L<[GH #16461]|https://github.com/Perl/perl5/issues/16461>.
1056 It is now forbidden to malloc more than C<PTRDIFF_T_MAX> bytes. Much
1057 code (including C optimizers) assumes that all data structures will not
1058 be larger than this, so this catches such attempts before overflow
1063 Two new regnodes have been introduced C<< EXACT_ONLY8 >>, and
1064 C<< EXACTFU_ONLY8 >>. They're equivalent to C<< EXACT >> and C<< EXACTFU >>,
1065 except that they contain a code point which requires UTF-8 to
1066 represent/match. Hence, if the target string isn't UTF-8, we know
1067 it can't possibly match, without needing to try.
1071 C<< print_bytes_for_locale() >> is now defined if C<< DEBUGGING >>,
1072 Prior, it didn't get defined unless C<< LC_COLLATE >> was defined
1077 =head1 Selected Bug Fixes
1083 Compilation under C<-DPERL_MEM_LOG> and C<-DNO_LOCALE> have been fixed.
1087 Perl 5.28 introduced an C<index()> optimization when comparing to -1 (or
1088 indirectly, e.g. >= 0). When this optimization was triggered inside a C<when>
1089 clause it caused a warning ("Argument %s isn't numeric in smart match"). This
1091 L<[GH #16626]|https://github.com/Perl/perl5/issues/16626>
1095 The new in-place editing code no longer leaks directory handles.
1096 L<[GH #16602]|https://github.com/Perl/perl5/issues/16602>.
1100 Warnings produced from constant folding operations on overloaded
1101 values no longer produce spurious "Use of uninitialized value"
1103 L<[GH #16349]|https://github.com/Perl/perl5/issues/16349>.
1107 Fix for "mutator not seen in (lex = ...) .= ..."
1108 L<[GH #16655]|https://github.com/Perl/perl5/issues/16655>.
1112 C<pack "u", "invalid uuencoding"> now properly NUL terminates the
1113 zero-length SV produced.
1114 L<[GH #16343]|https://github.com/Perl/perl5/issues/16343>.
1118 Improve the debugging output for calloc() calls with C<-Dm>.
1119 L<[GH #16653]|https://github.com/Perl/perl5/issues/16653>.
1123 Regexp script runs were failing to permit ASCII digits in some cases.
1124 L<[GH #16704]|https://github.com/Perl/perl5/issues/16704>.
1128 On Unix-like systems supporting a platform-specific technique for
1129 determining L<< C<$^X>|perlvar/$^X >>, Perl failed to fall back to the
1130 generic technique when the platform-specific one fails (for example, a Linux
1131 system with /proc not mounted). This was a regression in Perl 5.28.0.
1132 L<[GH #16715]|https://github.com/Perl/perl5/issues/16715>.
1136 L<SDBM_File> is now more robust with corrupt database files. The
1137 improvements do not make SDBM files suitable as an interchange format.
1138 L<[GH #16164]|https://github.com/Perl/perl5/issues/16164>.
1142 C<binmode($fh);> or C<binmode($fh, ':raw');> now properly removes the
1143 C<:utf8> flag from the default C<:crlf> I/O layer on Win32.
1144 L<[GH #16730]|https://github.com/Perl/perl5/issues/16730>.
1148 The experimental reference aliasing feature was misinterpreting array and
1149 hash slice assignment as being localised, e.g.
1151 \(@a[3,5,7]) = \(....);
1153 was being interpreted as:
1155 local \(@a[3,5,7]) = \(....);
1157 L<[GH #16701]|https://github.com/Perl/perl5/issues/16701>.
1161 C<sort SUBNAME> within an C<eval EXPR> when C<EXPR> was UTF-8 upgraded
1162 could panic if the C<SUBNAME> was non-ASCII.
1163 L<[GH #16979]|https://github.com/Perl/perl5/issues/16979>.
1167 Correctly handle realloc() modifying C<errno> on success so that the
1168 modification isn't visible to the perl user, since realloc() is called
1169 implicitly by the interpreter. This modification is permitted by the
1170 C standard, but has only been observed on FreeBSD 13.0-CURRENT.
1171 L<[GH #16907]|https://github.com/Perl/perl5/issues/16907>.
1175 Perl now exposes POSIX C<getcwd> as C<Internals::getcwd()> if
1176 available. This is intended for use by C<Cwd.pm> during bootstrapping
1177 and may be removed or changed without notice. This fixes some
1178 bootstrapping issues while building perl in a directory where some
1179 ancestor directory isn't readable.
1180 L<[GH #16903]|https://github.com/Perl/perl5/issues/16903>.
1184 C<pack()> no longer can return malformed UTF-8. It croaks if it would
1185 otherwise return a UTF-8 string that contains malformed UTF-8. This
1186 protects against potential security threats.
1187 L<[GH #16035]|https://github.com/Perl/perl5/issues/16035>.
1191 See L</Any set of digits in the Common script are legal in a script run
1196 Regular expression matching no longer leaves stale UTF-8 length magic
1197 when updating C<$^R>. This could result in C<length($^R)> returning
1202 Reduce recursion on ops
1203 L<[GH #11866]|https://github.com/Perl/perl5/issues/11866>.
1205 This can prevent stack overflow when processing extremely deep op
1210 Avoid leak in multiconcat with overloading.
1211 L<[GH #16823]|https://github.com/Perl/perl5/issues/16823>.
1215 The handling of user-defined C<\p{}> properties (see
1216 L<perlunicode/User-Defined Character Properties>) has been rewritten to
1217 be in C (instead of Perl). This speeds things up, but in the process
1218 several inconsistencies and bug fixes are made.
1224 A few error messages have minor wording changes. This is essentially
1225 because the new way is integrated into the regex error handling
1226 mechanism that marks the position in the input at which the error
1227 occurred. That was not possible previously. The messages now also
1228 contain additional back-trace-like information in case the error occurs
1229 deep in nested calls.
1233 A user-defined property is implemented as a perl subroutine with certain
1234 highly constrained naming conventions. It was documented previously
1235 that the sub would be in the current package if the package was
1236 unspecified. This turned out not to be true in all cases, but now it
1241 All recursive calls are treated as infinite recursion. Previously they
1242 would cause the interpreter to panic. Now, they cause the regex pattern
1247 Similarly, any other error likely would lead to a panic; now to just the
1248 pattern failing to compile.
1252 The old mechanism did not detect illegal ranges in the definition of the
1253 property. Now, the range max must not be smaller than the range min.
1254 Otherwise, the pattern fails to compile.
1258 The intention was to have each sub called only once during the lifetime
1259 of the program, so that a property's definition is immutable. This was
1260 relaxed so that it could be called once for all /i compilations, and
1261 potentially a second time for non-/i (the sub is passed a parameter
1262 indicating which). However, in practice there were instances when this
1263 was broken, and multiple calls were possible. Those have been fixed.
1264 Now (besides the /i,non-/i cases) the only way a sub can be called
1265 multiple times is if some component of it has not been defined yet. For
1266 example, suppose we have sub IsA() whose definition is known at compile
1267 time, and it in turn calls isB() whose definition is not yet known.
1268 isA() will be called each time a pattern it appears in is compiled. If
1269 isA() also calls isC() and that definition is known, isC() will be
1274 There were some races and very long hangs should one thread be compiling
1275 the same property as another simultaneously. These have now been fixed.
1281 Fixed a failure to match properly.
1283 An EXACTFish regnode has a finite length it can hold for the string
1284 being matched. If that length is exceeded, a second node is used for
1285 the next segment of the string, for as many regnodes as are needed.
1286 Care has to be taken where to break the string, in order to deal
1287 multi-character folds in Unicode correctly. If we want to break a
1288 string at a place which could potentially be in the middle of a
1289 multi-character fold, we back off one (or more) characters, leaving
1290 a shorter EXACTFish regnode. This backing off mechanism contained
1291 an off-by-one error.
1292 L<[GH #16806]|https://github.com/Perl/perl5/issues/16806>.
1296 A bare C<eof> call with no previous file handle now returns true.
1297 L<[GH #16786]|https://github.com/Perl/perl5/issues/16786>
1301 Failing to compile a format now aborts compilation. Like other errors
1302 in sub-parses this could leave the parser in a strange state, possibly
1303 crashing perl if compilation continued.
1304 L<[GH #16169]|https://github.com/Perl/perl5/issues/16169>
1308 If an in-place edit is still in progress during global destruction and
1309 the process exit code (as stored in C<$?>) is zero, perl will now
1310 treat the in-place edit as successful, replacing the input file with
1311 any output produced.
1313 This allows code like:
1315 perl -i -ne 'print "Foo"; last'
1317 to replace the input file, while code like:
1319 perl -i -ne 'print "Foo"; die'
1321 will not. Partly resolves
1322 L<[GH #16748]|https://github.com/Perl/perl5/issues/16748>.
1326 A regression in 5.28 caused the following code to fail
1328 close(STDIN); open(CHILD, "|wc -l")'
1330 because the child's stdin would be closed on exec. This has now been fixed.
1334 Fixed an issue where compiling a regexp containing both compile-time
1335 and run-time code blocks could lead to trying to compile something
1336 which is invalid syntax.
1340 Fixed build failures with C<< -DNO_LOCALE_NUMERIC >> and
1341 C<< -DNO_LOCALE_COLLATE >>.
1342 L<[GH #16771]|https://github.com/Perl/perl5/issues/16771>.
1346 Prevent the tests in F<< ext/B/t/strict.t >> from being skipped.
1347 L<[GH #16783]|https://github.com/Perl/perl5/issues/16783>.
1351 C<< /di >> nodes ending or beginning in I<s> are now C<< EXACTF >>. We do not
1352 want two C<< EXACTFU >> to be joined together during optimization,
1353 and to form a C<< ss >>, C<< sS >>, C<< Ss >> or C<< SS >> sequence;
1354 they are the only multi-character sequences which may match differently
1355 under C<< /ui >> and C<< /di >>.
1359 =head1 Acknowledgements
1361 Perl 5.30.0 represents approximately 11 months of development since Perl
1362 5.28.0 and contains approximately 620,000 lines of changes across 1,300
1363 files from 58 authors.
1365 Excluding auto-generated files, documentation and release tools, there were
1366 approximately 510,000 lines of changes to 750 .pm, .t, .c and .h files.
1368 Perl continues to flourish into its fourth decade thanks to a vibrant
1369 community of users and developers. The following people are known to have
1370 contributed the improvements that became Perl 5.30.0:
1372 Aaron Crane, Abigail, Alberto Simões, Alexandr Savca, Andreas König, Andy
1373 Dougherty, Aristotle Pagaltzis, Brian Greenfield, Chad Granum, Chris
1374 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Dan
1375 Dedrick, Daniel Dragan, Dan Kogai, David Cantrell, David Mitchell, Dominic
1376 Hargreaves, E. Choroba, Ed J, Eugen Konkov, François Perrad, Graham Knop,
1377 Hauke D, H.Merijn Brand, Hugo van der Sanden, Jakub Wilk, James Clarke,
1378 James E Keenan, Jerry D. Hedden, Jim Cromie, John SJ Anderson, Karen
1379 Etheridge, Karl Williamson, Leon Timmermans, Matthias Bethke, Nicholas
1380 Clark, Nicolas R., Niko Tyni, Pali, Petr Písař, Phil Pearl (Lobbes),
1381 Richard Leach, Ryan Voots, Sawyer X, Shlomi Fish, Sisyphus, Slaven Rezic,
1382 Steve Hay, Sullivan Beck, Tina Müller, Tomasz Konojacki, Tom Wyant, Tony
1383 Cook, Unicode Consortium, Yves Orton, Zak B. Elep.
1385 The list above is almost certainly incomplete as it is automatically
1386 generated from version control history. In particular, it does not include
1387 the names of most of the (very much appreciated) contributors who reported
1388 issues to the Perl bug tracker. Noteworthy in this release were the large
1389 number of bug fixes made possible by Sergey Aleynikov's high quality perlbug
1390 reports for issues he discovered by fuzzing with AFL.
1392 Many of the changes included in this version originated in the CPAN modules
1393 included in Perl's core. We're grateful to the entire CPAN community for
1394 helping Perl to flourish.
1396 For a more complete list of all of Perl's historical contributors, please
1397 see the F<AUTHORS> file in the Perl source distribution.
1399 =head1 Reporting Bugs
1401 If you find what you think is a bug, you might check the perl bug database
1402 at L<https://rt.perl.org/>. There may also be information at
1403 L<http://www.perl.org/>, the Perl Home Page.
1405 If you believe you have an unreported bug, please run the L<perlbug> program
1406 included with your release. Be sure to trim your bug down to a tiny but
1407 sufficient test case. Your bug report, along with the output of C<perl -V>,
1408 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
1410 If the bug you are reporting has security implications which make it
1411 inappropriate to send to a publicly archived mailing list, then see
1412 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
1413 for details of how to report the issue.
1417 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
1418 you can do so by running the C<perlthanks> program:
1422 This will send an email to the Perl 5 Porters list with your show of thanks.
1426 The F<Changes> file for an explanation of how to view exhaustive details on
1429 The F<INSTALL> file for how to build Perl.
1431 The F<README> file for general stuff.
1433 The F<Artistic> and F<Copying> files for copyright information.