This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PerlIO::Via: check arg is non-NULL before using it.
[perl5.git] / pod / perl5300delta.pod
CommitLineData
862f380b
S
1=encoding utf8
2
3=head1 NAME
4
5perl5300delta - what is new for perl v5.30.0
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.28.0 release and the 5.30.0
10release.
11
12If you are upgrading from an earlier release such as 5.26.0, first read
13L<perl5280delta>, which describes differences between 5.26.0 and 5.28.0.
14
15=head1 Notice
16
17sv_utf8_(downgrade|decode) are no longer marked as experimental.
18L<[perl #133788]|https://rt.perl.org/Ticket/Display.html?id=133788>.
19
20=head1 Core Enhancements
21
22=head2 Limited variable length lookbehind in regular expression pattern matching is now experimentally supported
23
24Using a lookbehind assertion (like C<(?<=foo?)> or C<(?<!ba{1,9}r)> previously
25would generate an error and refuse to compile. Now it compiles (if the
26maximum lookbehind is at most 255 characters), but raises a warning in
27the new C<experimental::vlb> warnings category. This is to caution you
28that the precise behavior is subject to change based on feedback from
29use in the field.
30
31See L<perlre/(?<=pattern)> and L<perlre/(?<!pattern)>.
32
33=head2 The upper limit C<"n"> specifiable in a regular expression quantifier of the form C<"{m,n}"> has been doubled to 65534
34
35The meaning of an unbounded upper quantifier C<"{m,}"> remains unchanged.
36It matches 2**31 - 1 times on most platforms, and more on ones where a C
37language short variable is more than 4 bytes long.
38
39=head2 Unicode 12.1 is supported
40
41Because of a change in Unicode release cycles, Perl jumps from Unicode
4210.0 in Perl 5.28 to Unicode 12.1 in Perl 5.30.
43
44For details on the Unicode changes, see
45L<https://www.unicode.org/versions/Unicode11.0.0/> for 11.0;
46L<https://www.unicode.org/versions/Unicode12.0.0/> for 12.0;
47and
48L<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
50character, that for the new Japanese era name.)
51
52The Word_Break property, as in past Perl releases, remains tailored to
53behave more in line with expectations of Perl users. This means that
54sequential runs of horizontal white space characters are not broken
55apart, but kept as a single run. Unicode 11 changed from past versions
56to be more in line with Perl, but it left several white space characters
57as causing breaks: TAB, NO BREAK SPACE, and FIGURE SPACE (U+2007). We
58have decided to continue to use the previous Perl tailoring with regards
59to these.
60
61=head2 Wildcards in Unicode property value specifications are now partially supported
62
63You can now do something like this in a regular expression pattern
64
65 qr! \p{nv= /(?x) \A [0-5] \z / }!
66
67which matches all Unicode code points whose numeric value is
68between 0 and 5 inclusive. So, it could match the Thai or Bengali
69digits whose numeric values are 0, 1, 2, 3, 4, or 5.
70
71This marks another step in implementing the regular expression features
72the Unicode Consortium suggests.
73
74Most properties are supported, with the remainder planned for 5.32.
75Details are in L<perlunicode/Wildcards in Property Values>.
76
77=head2 qr'\N{name}' is now supported
78
79Previously it was an error to evaluate a named character C<\N{...}>
80within a single quoted regular expression pattern (whose evaluation is
81deferred from the normal place). This restriction is now removed.
82
83=head2 Turkic UTF-8 locales are now seamlessly supported
84
85Turkic languages have different casing rules than other languages for
86the characters C<"i"> and C<"I">. The uppercase of C<"i"> is LATIN
87CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of C<"I"> is LATIN
88SMALL LETTER DOTLESS I (U+0131). Unicode furnishes alternate casing
89rules for use with Turkic languages. Previously, Perl ignored these,
90but now, it uses them when it detects that it is operating under a
91Turkic UTF-8 locale.
92
93=head2 It is now possible to compile perl to always use thread-safe locale operations.
94
95Previously, these calls were only used when the perl was compiled to be
96multi-threaded. To always enable them, add
97
98 -Accflags='-DUSE_THREAD_SAFE_LOCALE'
99
100to your F<Configure> flags.
101
102=head2 Eliminate opASSIGN macro usage from core
103
104This macro is still defined but no longer used in core
105
106=head2 C<-Drv> now means something on C<-DDEBUGGING> builds
107
108Now, adding the verbose flag (C<-Dv>) to the C<-Dr> flag turns on all
109possible regular expression debugging.
110
111=head1 Incompatible Changes
112
113=head2 Assigning non-zero to C<$[> is fatal
114
115Setting L<< C<$[>|perlvar/$[ >> to a non-zero value has been deprecated since
116Perl 5.12 and now throws a fatal error.
117See L<<< perldeprecation/Assigning non-zero to C<< $[ >> is fatal >>>.
118
119=head2 Delimiters must now be graphemes
120
121See L<perldeprecation/Use of unassigned code point or non-standalone grapheme
122for a delimiter.>
123
124=head2 Some formerly deprecated uses of an unescaped left brace C<"{"> in
125regular expression patterns are now illegal
126
127But to avoid breaking code unnecessarily, most instances that issued a
128deprecation warning, remain legal and now have a non-deprecation warning
129raised. See L<perldeprecation/Unescaped left braces in regular expressions>.
130
131=head2 Previously deprecated sysread()/syswrite() on :utf8 handles is now fatal
132
133Calling sysread(), syswrite(), send() or recv() on a C<:utf8> handle,
134whether applied explicitly or implicitly, is now fatal. This was
135deprecated in perl 5.24.
136
137There were two problems with calling these functions on C<:utf8>
138handles:
139
140=over
141
142=item *
143
144All four functions only paid attention to the C<:utf8> flag. Other
145layers were completely ignored, so a handle with
146C<:encoding(UTF-16LE)> layer would be treated as UTF-8. Other layers,
147such as compression are completely ignored with or without the
148C<:utf8> flag.
149
150=item *
151
152sysread() and recv() would read from the handle, skipping any
153validation by the layers, and do no validation of their own. This
154could lead to invalidly encoded perl scalars.
155
156=back
157
158L<[perl #125760]|https://rt.perl.org/Ticket/Display.html?id=125760>.
159
160=head2 my() in false conditional prohibited
161
162Declarations such as C<my $x if 0> are no longer permitted.
163
164L<[perl #133543]|https://rt.perl.org/Ticket/Display.html?id=133543>.
165
166=head2 Fatalize $* and $#
167
168These special variables, long deprecated, now throw exceptions when used.
169
170L<[perl #133583]|https://rt.perl.org/Ticket/Display.html?id=133583>.
171
172=head2 Fatalize unqualified use of dump()
173
174The C<dump()> function, long discouraged, may no longer be used unless it is
175fully qualified, I<i.e.>, C<CORE::dump()>.
176
177L<[perl #133584]|https://rt.perl.org/Ticket/Display.html?id=133584>.
178
179=head2 Remove File::Glob::glob()
180
181The C<File::Glob::glob()> function, long deprecated, has been removed and now
182throws an exception which advises use of C<File::Glob::bsd_glob()> instead.
183
184L<[perl #133586]|https://rt.perl.org/Ticket/Display.html?id=133586>.
185
186=head2 C<pack()> no longer can return malformed UTF-8
187
188It croaks if it would otherwise return a UTF-8 string that contains
189malformed UTF-8. This protects against potential security threats. This
190is considered a bug fix as well.
191L<[perl #131642]|https://rt.perl.org/Ticket/Display.html?id=131642>.
192
193=head2 Any set of digits in the Common script are legal in a script run of another script
194
195There are several sets of digits in the Common script. C<[0-9]> is the
196most familiar. But there are also C<[\x{FF10}-\x{FF19}]> (FULLWIDTH
197DIGIT ZERO - FULLWIDTH DIGIT NINE), and several sets for use in
198mathematical notation, such as the MATHEMATICAL DOUBLE-STRUCK DIGITs.
199Any of these sets should be able to appear in script runs of, say,
200Greek. But the design of 5.30 overlooked all but the ASCII digits
201C<[0-9]>, so the design was flawed. This has been fixed, so is both a
202bug fix and an incompatibility.
203L<[perl #133547]|https://rt.perl.org/Ticket/Display.html?id=133547>.
204
205All digits in a run still have to come from the same set of ten digits.
206
207=head2 JSON::PP enables allow_nonref by default
208
209As JSON::XS 4.0 changed its policy and enabled allow_nonref
210by default, JSON::PP also enabled allow_nonref by default.
211
212=head1 Deprecations
213
214=head2 In XS code, use of various macros dealing with UTF-8.
215
216This deprecation was scheduled to become fatal in 5.30, but has been
217delayed to 5.32 due to problems that showed up with some CPAN modules.
218For details of what's affected, see L<perldeprecation|
219perldeprecation/In XS code, use of various macros dealing with UTF-8.>.
220
221=head1 Performance Enhancements
222
223=over 4
224
225=item *
226
227Translating from UTF-8 into the code point it represents now is done via a
228deterministic finite automaton, speeding it up. As a typical example,
229C<ord("\x7fff")> now requires 12% fewer instructions than before. The
230performance of checking that a sequence of bytes is valid UTF-8 is similarly
231improved, again by using a DFA.
232
233=item *
234
235Eliminate recursion from finalize_op().
236L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>.
237
238=item *
239
240A handful of small optimizations related to character folding
241and character classes in regular expressions.
242
243=item *
244
245Optimization of C<IV> to C<UV> conversions.
246L<[perl #133677]|https://rt.perl.org/Ticket/Display.html?id=133677>.
247
248=item *
249
250Speed up of the integer stringification algorithm by processing
251two digits at a time instead of one.
252L<[perl #133691]|https://rt.perl.org/Ticket/Display.html?id=133691>.
253
254=item *
255
256Improvements based on LGTM analysis and recommendation.
257(L<https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree>).
258L<[perl #133686]|https://rt.perl.org/Ticket/Display.html?id=133686>.
259L<[perl #133699]|https://rt.perl.org/Ticket/Display.html?id=133699>.
260
261=item *
262
263Code optimizations in F<regcomp.c>, F<regcomp.h>, F<regexec.c>.
264
265=item *
266
267Regular expression pattern matching of things like C<qr/[^I<a>]/> is
268significantly sped up, where I<a> is any ASCII character. Other classes
269can get this speed up, but which ones is complicated and depends on the
270underlying bit patterns of those characters, so differs between ASCII
271and EBCDIC platforms, but all case pairs, like C<qr/[Gg]/> are included,
272as is C<[^01]>.
273
274=back
275
276=head1 Modules and Pragmata
277
278=head2 Updated Modules and Pragmata
279
280=over 4
281
282=item *
283
284L<Archive::Tar> has been upgraded from version 2.30 to 2.32.
285
286=item *
287
288L<B> has been upgraded from version 1.74 to 1.76.
289
290=item *
291
292L<B::Concise> has been upgraded from version 1.003 to 1.004.
293
294=item *
295
296L<B::Deparse> has been upgraded from version 1.48 to 1.49.
297
298=item *
299
300L<bignum> has been upgraded from version 0.49 to 0.51.
301
302=item *
303
304L<bytes> has been upgraded from version 1.06 to 1.07.
305
306=item *
307
308L<Carp> has been upgraded from version 1.38 to 1.50
309
310=item *
311
312L<Compress::Raw::Bzip2> has been upgraded from version 2.074 to 2.084.
313
314=item *
315
316L<Compress::Raw::Zlib> has been upgraded from version 2.076 to 2.084.
317
318=item *
319
320L<Config::Extensions> has been upgraded from version 0.02 to 0.03.
321
322=item *
323
324L<Config::Perl::V>. has been upgraded from version 0.29 to 0.32. This was due
325to a new configuration variable that has influence on binary compatibility:
326C<USE_THREAD_SAFE_LOCALE>.
327
328=item *
329
330L<CPAN> has been upgraded from version 2.20 to 2.22.
331
332=item *
333
334L<Data::Dumper> has been upgraded from version 2.170 to 2.174
335
336L<Data::Dumper> now avoids leaking when C<croak>ing.
337
338=item *
339
340L<DB_File> has been upgraded from version 1.840 to 1.843.
341
342=item *
343
344L<deprecate> has been upgraded from version 0.03 to 0.04.
345
346=item *
347
348L<Devel::Peek> has been upgraded from version 1.27 to 1.28.
349
350=item *
351
352L<Devel::PPPort> has been upgraded from version 3.40 to 3.52.
353
354=item *
355
356L<Digest::SHA> has been upgraded from version 6.01 to 6.02.
357
358=item *
359
360L<Encode> has been upgraded from version 2.97 to 3.01.
361
362=item *
363
364L<Errno> has been upgraded from version 1.29 to 1.30.
365
366=item *
367
368L<experimental> has been upgraded from version 0.019 to 0.020.
369
370=item *
371
372L<ExtUtils::CBuilder> has been upgraded from version 0.280230 to 0.280231.
373
374=item *
375
376L<ExtUtils::Manifest> has been upgraded from version 1.70 to 1.72.
377
378=item *
379
380L<ExtUtils::Miniperl> has been upgraded from version 1.08 to 1.09.
381
382=item *
383
384L<ExtUtils::ParseXS> has been upgraded from version 3.39 to 3.40.
385C<OUTLIST> parameters are no longer incorrectly included in the
386automatically generated function prototype.
387L<[perl #133654]|https://rt.perl.org/Ticket/Display.html?id=133654>.
388
389=item *
390
391L<feature> has been upgraded from version 1.52 to 1.54.
392
393=item *
394
395L<File::Copy> has been upgraded from version 2.33 to 2.34.
396
397=item *
398
399L<File::Find> has been upgraded from version 1.34 to 1.36.
400
401C<$File::Find::dont_use_nlink> now defaults to 1 on all
402platforms.
403L<[perl #133673]|https://rt.perl.org/Ticket/Display.html?id=133673>.
404
405Variables C<< $Is_Win32 >> and C<< $Is_VMS >> are being initialized.
406
407=item *
408
409L<File::Glob> has been upgraded from version 1.31 to 1.32.
410
411=item *
412
413L<File::Path> has been upgraded from version 2.15 to 2.16.
414
415=item *
416
417L<File::Spec> has been upgraded from version 3.74 to 3.78.
418
419Silence L<Cwd> warning on Android builds if C<targetsh> is not defined.
420
421=item *
422
423L<File::Temp> has been upgraded from version 0.2304 to 0.2309.
424
425=item *
426
427L<Filter::Util::Call> has been upgraded from version 1.58 to 1.59.
428
429=item *
430
431L<GDBM_File> has been upgraded from version 1.17 to 1.18.
432
433=item *
434
435L<HTTP::Tiny> has been upgraded from version 0.070 to 0.076.
436
437=item *
438
439L<I18N::Langinfo> has been upgraded from version 0.17 to 0.18.
440
441=item *
442
443L<IO> has been upgraded from version 1.39 to 1.40.
444
445=item *
446
447IO-Compress has been upgraded from version 2.074 to 2.084.
448
449Adds support for C<< IO::Uncompress::Zstd >> and
450C<< IO::Uncompress::UnLzip >>.
451
452The C<< BinModeIn >> and C<< BinModeOut >> options are now no-ops.
453ALL files will be read/written in binmode.
454
455=item *
456
457L<IPC::Cmd> has been upgraded from version 1.00 to 1.02.
458
459=item *
460
461L<JSON::PP> has been upgraded from version 2.97001 to 4.02.
462
463L<JSON::PP> as JSON::XS 4.0 enables C<allow_nonref> by default.
464
465=item *
466
467L<lib> has been upgraded from version 0.64 to 0.65.
468
469=item *
470
471L<Locale::Codes> has been upgraded from version 3.56 to 3.57.
472
473=item *
474
475L<Math::BigInt> has been upgraded from version 1.999811 to 1.999816.
476
477C<< bnok() >> now supports the full Kronenburg extension.
478L<[cpan #95628]|https://rt.cpan.org/Ticket/Display.html?id=95628>.
479
480=item *
481
482L<Math::BigInt::FastCalc> has been upgraded from version 0.5006 to 0.5008.
483
484=item *
485
486L<Math::BigRat> has been upgraded from version 0.2613 to 0.2614.
487
488=item *
489
490L<Module::CoreList> has been upgraded from version 5.20180622 to 5.20190520.
491
492Changes to B::Op_private and Config
493
494=item *
495
496L<Module::Load> has been upgraded from version 0.32 to 0.34.
497
498=item *
499
500L<Module::Metadata> has been upgraded from version 1.000033 to 1.000036.
501
502Properly clean up temporary directories after testing.
503
504=item *
505
506L<NDBM_File> has been upgraded from version 1.14 to 1.15.
507
508=item *
509
510L<Net::Ping> has been upgraded from version 2.62 to 2.71.
511
512=item *
513
514L<ODBM_File> has been upgraded from version 1.15 to 1.16.
515
516=item *
517
518PathTools has been upgraded from version 3.74 to 3.78.
519
520=item *
521
522L<parent> has been upgraded from version 0.236 to 0.237.
523
524=item *
525
526L<perl5db.pl> has been upgraded from version 1.54 to 1.55.
527
528Debugging threaded code no longer deadlocks in C<DB::sub> nor
529C<DB::lsub>.
530
531=item *
532
533L<perlfaq> has been upgraded from version 5.021011 to 5.20190126.
534
535=item *
536
537L<PerlIO::encoding> has been upgraded from version 0.26 to 0.27.
538
539Warnings enabled by setting the C<WARN_ON_ERR> flag in
540C<$PerlIO::encoding::fallback> are now only produced if warnings are
541enabled with C<use warnings "utf8";> or setting C<$^W>.
542
543=item *
544
545L<PerlIO::scalar> has been upgraded from version 0.29 to 0.30.
546
547=item *
548
549podlators has been upgraded from version 4.10 to 4.11.
550
551=item *
552
553L<POSIX> has been upgraded from version 1.84 to 1.88.
554
555=item *
556
557L<re> has been upgraded from version 0.36 to 0.37.
558
559=item *
560
561L<SDBM_File> has been upgraded from version 1.14 to 1.15.
562
563=item *
564
565L<sigtrap> has been upgraded from version 1.08 to 1.09.
566
567=item *
568
569L<Storable> has been upgraded from version 3.08 to 3.15.
570
571Storable no longer probes for recursion limits at build time.
572L<[perl #133708]|https://rt.perl.org/Ticket/Display.html?id=133708>
573and others.
574
575Metasploit exploit code was included to test for CVE-2015-1992
576detection, this caused anti-virus detections on at least one AV suite.
577The exploit code has been removed and replaced with a simple
578functional test.
579L<[perl #133706]|https://rt.perl.org/Ticket/Display.html?id=133706>
580
581=item *
582
583L<Test::Simple> has been upgraded from version 1.302133 to 1.302162.
584
585=item *
586
587L<Thread::Queue> has been upgraded from version 3.12 to 3.13.
588
589=item *
590
591L<threads::shared> has been upgraded from version 1.58 to 1.60.
592
593Added support for extra tracing of locking, this requires a
594C<-DDEBUGGING> and extra compilation flags.
595
596=item *
597
598L<Time::HiRes> has been upgraded from version 1.9759 to 1.9760.
599
600=item *
601
602L<Time::Local> has been upgraded from version 1.25 to 1.28.
603
604=item *
605
606L<Time::Piece> has been upgraded from version 1.3204 to 1.33.
607
608=item *
609
610L<Unicode::Collate> has been upgraded from version 1.25 to 1.27.
611
612=item *
613
614L<Unicode::UCD> has been upgraded from version 0.70 to 0.72.
615
616=item *
617
618L<User::grent> has been upgraded from version 1.02 to 1.03.
619
620=item *
621
622L<utf8> has been upgraded from version 1.21 to 1.22.
623
624=item *
625
626L<vars> has been upgraded from version 1.04 to 1.05.
627
628C<vars.pm> no longer disables non-vars strict when checking if strict
629vars is enabled.
630L<[perl #130674]|https://rt.perl.org/Ticket/Display.html?id=130674>.
631
632=item *
633
634L<version> has been upgraded from version 0.9923 to 0.9924.
635
636=item *
637
638L<warnings> has been upgraded from version 1.42 to 1.44.
639
640=item *
641
642L<XS::APItest> has been upgraded from version 0.98 to 1.00.
643
644=item *
645
646L<XS::Typemap> has been upgraded from version 0.16 to 0.17.
647
648=back
649
650=head2 Removed Modules and Pragmata
651
652The following modules will be removed from the core distribution in a
653future release, and will at that time need to be installed from CPAN.
654Distributions on CPAN which require these modules will need to list them as
655prerequisites.
656
657The core versions of these modules will now issue C<"deprecated">-category
658warnings to alert you to this fact. To silence these deprecation warnings,
659install the modules in question from CPAN.
660
661Note that these are (with rare exceptions) fine modules that you are encouraged
662to continue to use. Their disinclusion from core primarily hinges on their
663necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
664not usually on concerns over their design.
665
666=over 4
667
668=item *
669
670B::Debug is no longer distributed with the core distribution. It
671continues to be available on CPAN as
672C<< L<B::Debug|https://metacpan.org/pod/B::Debug> >>.
673
674=item *
675
676Locale::Codes has been removed at the request of its author. It
677continues to be available on CPAN as
678C<< L<Locale::Codes|https://metacpan.org/pod/Locale::Codes> >>
679L<[perl #133458]|https://rt.perl.org/Ticket/Display.html?id=133458>.
680
681=back
682
683=head1 Documentation
684
685=head2 Changes to Existing Documentation
686
687We have attempted to update the documentation to reflect the changes
688listed in this document. If you find any we have missed, send email
689to L<perlbug@perl.org|mailto:perlbug@perl.org>.
690
691=head3 L<perlapi>
692
693=over 4
694
695=item *
696
697C<AvFILL()> was wrongly listed as deprecated. This has been corrected.
698L<[perl #133278]|https://rt.perl.org/Ticket/Display.html?id=133278>
699
700=back
701
702=head3 L<perlop>
703
704=over 4
705
706=item *
707
708We no longer have null (empty line) here doc terminators, so
709L<perlop> should not refer to them.
710
711=item *
712
713The behaviour of C<tr> when the delimiter is an apostrophe has been clarified.
714In particular, hyphens aren't special, and C<\x{}> isn't interpolated.
715L<[perl #130679]|https://rt.perl.org/Ticket/Display.html?id=130679>
716
717=back
718
719=head3 L<perlreapi>, L<perlvar>
720
721=over 4
722
723=item *
724
725Improve docs for lastparen, lastcloseparen.
726
727=back
728
729=head3 L<perlfunc>
730
731=over 4
732
733=item *
734
735The entry for L<perlfunc/-X> has been clarified to indicate that symbolic
736links are followed for most tests.
737
738=item *
739
740Clarification of behaviour of C<reset EXPR>.
741
742=item *
743
744Try to clarify that C<< ref(qr/xx/) >> returns C<Regexp> rather than
745C<REGEXP> and why.
746L<[perl #133751]|https://rt.perl.org/Ticket/Display.html?id=133751>.
747
748=back
749
750=head3 L<perlreref>
751
752=over 4
753
754=item *
755
756Clarification of the syntax of /(?(cond)yes)/.
757
758=back
759
760=head3 L<perllocale>
761
762=over 4
763
764=item *
765
766There are actually two slightly different types of UTF-8 locales: one for Turkic
767languages and one for everything else. Starting in Perl v5.30, Perl seamlessly
768handles both types.
769
770=back
771
772=head3 L<perlrecharclass>
773
774=over 4
775
776=item *
777
778Added a note for the ::xdigit:: character class.
779
780=back
781
782=head3 L<perlvar>
783
784=over 4
785
786=item *
787
788More specific documentation of paragraph mode.
789L<[perl #133722]|https://rt.perl.org/Ticket/Display.html?id=133722>.
790
791=back
792
793=head1 Diagnostics
794
795The following additions or changes have been made to diagnostic output,
796including warnings and fatal error messages. For the complete list of
797diagnostic messages, see L<perldiag>.
798
799=head2 Changes to Existing Diagnostics
800
801=over 4
802
803=item *
804
805As noted under L<Incompatible Changes> above, the deprecation warning
806"Unescaped left brace in regex is deprecated here (and will be fatal in Perl
8075.30), passed through in regex; marked by S<<-- HERE> in m/%s/" has been
808changed to the non-deprecation warning "Unescaped left brace in regex is passed
809through in regex; marked by S<<-- HERE> in m/%s/".
810
811=item *
812
813Specifying C<\o{}> without anything between the braces now yields the
814fatal error message "Empty \o{}". Previously it was "Number with no
815digits". This means the same wording is used for this kind of error as
816with similar constructs such as C<\p{}>.
817
818=item *
819
820Within the scope of the experimental feature C<use re 'strict'>,
821specifying C<\x{}> without anything between the braces now yields the
822fatal error message "Empty \x{}". Previously it was "Number with no
823digits". This means the same wording is used for this kind of error as
824with similar constructs such as C<\p{}>. It is legal, though not wise
825to have an empty C<\x> outside of C<re 'strict'>; it silently generates
826a NUL character.
827
828=item *
829
830L<Type of arg %d to %s must be %s (not %s)|perldiag/"Type of arg %d to %s must be %s (not %s)">
831
832Attempts to push, pop, etc on a hash or glob now produce this message
833rather than complaining that they no longer work on scalars.
834L<[perl #130367]|https://rt.perl.org/Ticket/Display.html?id=130367>.
835
836=item *
837
838L<Prototype not terminated|perldiag/"Prototype not terminated">
839
840The file and line number is now reported for this error.
841L<[perl #133524]|https://rt.perl.org/Ticket/Display.html?id=133524>
842
843=item *
844
845Under C<< -Dr >> (or C<< use re 'Debug' >>) the compiled regex engine
846program is displayed. It used to use two different spellings for I<<
847infinity >>,
848C<< INFINITY >>, and C<< INFTY >>. It now uses the latter exclusively,
849as that spelling has been around the longest.
850
851=back
852
853=head1 Utility Changes
854
855=head2 L<xsubpp>
856
857=over 4
858
859=item *
860
861The generated prototype (with C<< PROTOTYPES: ENABLE >>) would include
862C<< OUTLIST >> parameters, but these aren't arguments to the perl function.
863This has been rectified.
864L<[perl #133654]|https://rt.perl.org/Ticket/Display.html?id=133654>.
865
866=back
867
868=head1 Configuration and Compilation
869
870=over 4
871
872=item *
873
874Normally the thread-safe locale functions are used only on threaded
875builds. It is now possible to force their use on unthreaded builds on
876systems that have them available, by including the
877C<-Accflags='-DUSE_THREAD_SAFE_LOCALE'> option to F<Configure>.
878
879=item *
880
881Improve detection of memrchr, strlcat, and strlcpy
882
883=item *
884
885Improve Configure detection of memmem().
886L<[perl #133760]|https://rt.perl.org/Ticket/Display.html?id=133760>.
887
888=item *
889
890Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build option.
891
892=item *
893
894Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.
895
896=back
897
898=head1 Testing
899
900=over 4
901
902=item *
903
904F<t/lib/croak/op>
905L<[perl #130367]|https://rt.perl.org/Ticket/Display.html?id=130367>.
906
907separate error for C<push>, etc. on hash/glob.
908
909=item *
910
911F<t/op/svleak.t>
912L<[perl #133660]|https://rt.perl.org/Ticket/Display.html?id=133660>.
913
914Add test for C<goto &sub> in overload leaking.
915
916=item *
917
918Split F<t/re/fold_grind.t> into multiple test files.
919
920=item *
921
922Fix intermittent tests which failed due to race conditions which
923surface during parallel testing.
924L<[perl #133740]|https://rt.perl.org/Ticket/Display.html?id=133740>.
925
926=item *
927
928Thoroughly test paragraph mode, using a new test file,
929F<t/io/paragraph_mode.t>.
930L<[perl #133722]|https://rt.perl.org/Ticket/Display.html?id=133722>.
931
932=item *
933
934Some tests in F<< t/io/eintr.t >> caused the process to hang on
935pre-16 Darwin. These tests are skipped for those version of Darwin.
936
937=back
938
939=head1 Platform Support
940
941=head2 Platform-Specific Notes
942
943=over 4
944
945=item HP-UX 11.11
946
947An obscure problem in C<pack()> when compiling with HP C-ANSI-C has been fixed
948by disabling optimizations in F<pp_pack.c>.
949
950=item Mac OS X
951
952Perl's build and testing process on Mac OS X for C<-Duseshrplib>
953builds is now compatible with Mac OS X System Integrity Protection
954(SIP).
955
956SIP prevents binaries in F</bin> (and a few other places) being passed
957the C<DYLD_LIBRARY_PATH> environment variable. For our purposes this
958prevents C<DYLD_LIBRARY_PATH> from being passed to the shell, which
959prevents that variable being passed to the testing or build process,
960so running C<perl> couldn't find F<libperl.dylib>.
961
962To work around that, the initial build of the F<perl> executable
963expects to find F<libperl.dylib> in the build directory, and the
964library path is then adjusted during installation to point to the
965installed library.
966
967L<[perl #126706]|https://rt.perl.org/Ticket/Display.html?id=126706>.
968
969=item Minix3
970
971Some support for Minix3 has been re-added.
972
973=item Cygwin
974
975Cygwin doesn't make C<< cuserid >> visible.
976
977=item Win32 Mingw
978
979C99 math functions are now available.
980
981=item Windows
982
983=over 4
984
985=item *
986
987The C<USE_CPLUSPLUS> build option which has long been available in
988F<win32/Makefile> (for B<nmake>) and F<win32/makefile.mk> (for B<dmake>) is now
989also available in F<win32/GNUmakefile> (for B<gmake>).
990
991=item *
992
993The B<nmake> makefile no longer defaults to Visual C++ 6.0 (a very old version
994which is unlikely to be widely used today). As a result, it is now a
995requirement to specify the C<CCTYPE> since there is no obvious choice of which
996modern version to default to instead. Failure to specify C<CCTYPE> will result
997in an error being output and the build will stop.
998
999(The B<dmake> and B<gmake> makefiles will automatically detect which compiler
1000is being used, so do not require C<CCTYPE> to be set. This feature has not yet
1001been added to the B<nmake> makefile.)
1002
1003=item *
1004
1005C<sleep()> with warnings enabled for a C<USE_IMP_SYS> build no longer
1006warns about the sleep timeout being too large.
1007L<[perl #133376]|https://rt.perl.org/Ticket/Display.html?id=133376>.
1008
1009=item *
1010
1011Support for compiling perl on Windows using Microsoft Visual Studio 2019
1012(containing Visual C++ 14.2) has been added.
1013
1014=item *
1015
1016socket() now sets C<$!> if the protocol, address family and socket
1017type combination is not found.
1018L<[perl #133853]|https://rt.perl.org/Ticket/Display.html?id=133853>.
1019
1020=item *
1021
1022The Windows Server 2003 SP1 Platform SDK build, with its early x64 compiler and
1023tools, was accidentally broken in Perl 5.27.9. This has now been fixed.
1024
1025=back
1026
1027=back
1028
1029=head1 Internal Changes
1030
1031=over 4
1032
1033=item *
1034
1035The sizing pass has been eliminated from the regular expression
1036compiler. An extra pass may instead be needed in some cases to count
1037the number of parenthetical capture groups.
1038
1039=item *
1040
1041A new function L<perlapi/C<my_strtod>> or its synonym, Strtod(), is
1042now available with the same signature as the libc strtod(). It provides
1043strotod() equivalent behavior on all platforms, using the best available
1044precision, depending on platform capabilities and F<Configure> options,
1045while handling locale-related issues, such as if the radix character
1046should be a dot or comma.
1047
1048=item *
1049
1050Added C<newSVsv_nomg()> to copy a SV without processing get magic on
1051the source.
1052L<[perl #132964]|https://rt.perl.org/Ticket/Display.html?id=132964>.
1053
1054=item *
1055
1056It is now forbidden to malloc more than C<PTRDIFF_T_MAX> bytes. Much
1057code (including C optimizers) assumes that all data structures will not
1058be larger than this, so this catches such attempts before overflow
1059happens.
1060
1061=item *
1062
1063Two new regnodes have been introduced C<< EXACT_ONLY8 >>, and
1064C<< EXACTFU_ONLY8 >>. They're equivalent to C<< EXACT >> and C<< EXACTFU >>,
1065except that they contain a code point which requires UTF-8 to
1066represent/match. Hence, if the target string isn't UTF-8, we know
1067it can't possibly match, without needing to try.
1068
1069=item *
1070
1071C<< print_bytes_for_locale() >> is now defined if C<< DEBUGGING >>,
1072Prior, it didn't get defined unless C<< LC_COLLATE >> was defined
1073on the platform.
1074
1075=back
1076
1077=head1 Selected Bug Fixes
1078
1079=over 4
1080
1081=item *
1082
1083Compilation under C<-DPERL_MEM_LOG> and C<-DNO_LOCALE> have been fixed.
1084
1085=item *
1086
1087Perl 5.28 introduced an C<index()> optimization when comparing to -1 (or
1088indirectly, e.g. >= 0). When this optimization was triggered inside a C<when>
1089clause it caused a warning ("Argument %s isn't numeric in smart match"). This
1090has now been fixed.
1091L<[perl #133368]|https://rt.perl.org/Ticket/Display.html?id=133368>
1092
1093=item *
1094
1095The new in-place editing code no longer leaks directory handles.
1096L<[perl #133314]|https://rt.perl.org/Ticket/Display.html?id=133314>.
1097
1098=item *
1099
1100Warnings produced from constant folding operations on overloaded
1101values no longer produce spurious "Use of uninitialized value"
1102warnings.
1103L<[perl #132683]|https://rt.perl.org/Ticket/Display.html?id=132683>.
1104
1105=item *
1106
1107Fix for "mutator not seen in (lex = ...) .= ..."
1108L<[perl #133441]|https://rt.perl.org/Ticket/Display.html?id=133441>.
1109
1110=item *
1111
1112C<pack "u", "invalid uuencoding"> now properly NUL terminates the
1113zero-length SV produced.
1114L<[perl #132655]|https://rt.perl.org/Ticket/Display.html?id=132655>.
1115
1116=item *
1117
1118Improve the debugging output for calloc() calls with C<-Dm>.
1119L<[perl #133439]|https://rt.perl.org/Ticket/Display.html?id=133439>.
1120
1121=item *
1122
1123Regexp script runs were failing to permit ASCII digits in some cases.
1124L<[perl #133547]|https://rt.perl.org/Ticket/Display.html?id=133547>.
1125
1126=item *
1127
1128On Unix-like systems supporting a platform-specific technique for
1129determining L<< C<$^X>|perlvar/$^X >>, Perl failed to fall back to the
1130generic technique when the platform-specific one fails (for example, a Linux
1131system with /proc not mounted). This was a regression in Perl 5.28.0.
1132L<[perl #133573]|https://rt.perl.org/Ticket/Display.html?id=133573>.
1133
1134=item *
1135
1136L<SDBM_File> is now more robust with corrupt database files. The
1137improvements do not make SDBM files suitable as an interchange format.
1138L<[perl #132147]|https://rt.perl.org/Ticket/Display.html?id=132147>.
1139
1140=item *
1141
1142C<binmode($fh);> or C<binmode($fh, ':raw');> now properly removes the
1143C<:utf8> flag from the default C<:crlf> I/O layer on Win32.
1144L<[perl #133604]|https://rt.perl.org/Ticket/Display.html?id=133604>.
1145
1146=item *
1147
1148The experimental reference aliasing feature was misinterpreting array and
1149hash slice assignment as being localised, e.g.
1150
1151 \(@a[3,5,7]) = \(....);
1152
1153was being interpreted as:
1154
1155 local \(@a[3,5,7]) = \(....);
1156
1157L<[perl #133538]|https://rt.perl.org/Ticket/Display.html?id=133538>.
1158
1159=item *
1160
1161C<sort SUBNAME> within an C<eval EXPR> when C<EXPR> was UTF-8 upgraded
1162could panic if the C<SUBNAME> was non-ASCII.
1163L<[perl #134061]|https://rt.perl.org/Ticket/Display.html?id=134061>.
1164
1165=item *
1166
1167Correctly handle realloc() modifying C<errno> on success so that the
1168modification isn't visible to the perl user, since realloc() is called
1169implicitly by the interpreter. This modification is permitted by the
1170C standard, but has only been observed on FreeBSD 13.0-CURRENT.
1171L<[perl #133958]|https://rt.perl.org/Ticket/Display.html?id=133958>.
1172
1173=item *
1174
1175Perl now exposes POSIX C<getcwd> as C<Internals::getcwd()> if
1176available. This is intended for use by C<Cwd.pm> during bootstrapping
1177and may be removed or changed without notice. This fixes some
1178bootstrapping issues while building perl in a directory where some
1179ancestor directory isn't readable.
1180L<[perl #133951]|https://rt.perl.org/Ticket/Display.html?id=133951>.
1181
1182=item *
1183
1184C<pack()> no longer can return malformed UTF-8. It croaks if it would
1185otherwise return a UTF-8 string that contains malformed UTF-8. This
1186protects against potential security threats.
1187L<[perl #131642]|https://rt.perl.org/Ticket/Display.html?id=131642>.
1188
1189=item *
1190
1191See L</Any set of digits in the Common script are legal in a script run
1192of another script>.
1193
1194=item *
1195
1196Regular expression matching no longer leaves stale UTF-8 length magic
1197when updating C<$^R>. This could result in C<length($^R)> returning
1198an incorrect value.
1199
1200=item *
1201
1202Reduce recursion on ops
1203L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>.
1204
1205This can prevent stack overflow when processing extremely deep op
1206trees.
1207
1208=item *
1209
1210Avoid leak in multiconcat with overloading.
1211L<[perl #133789]|https://rt.perl.org/Ticket/Display.html?id=133789>.
1212
1213=item *
1214
1215The handling of user-defined C<\p{}> properties (see
1216L<perlunicode/User-Defined Character Properties>) has been rewritten to
1217be in C (instead of Perl). This speeds things up, but in the process
1218several inconsistencies and bug fixes are made.
1219
1220=over 4
1221
1222=item 1
1223
1224A few error messages have minor wording changes. This is essentially
1225because the new way is integrated into the regex error handling
1226mechanism that marks the position in the input at which the error
1227occurred. That was not possible previously. The messages now also
1228contain additional back-trace-like information in case the error occurs
1229deep in nested calls.
1230
1231=item 2
1232
1233A user-defined property is implemented as a perl subroutine with certain
1234highly constrained naming conventions. It was documented previously
1235that the sub would be in the current package if the package was
1236unspecified. This turned out not to be true in all cases, but now it
1237is.
1238
1239=item 3
1240
1241All recursive calls are treated as infinite recursion. Previously they
1242would cause the interpreter to panic. Now, they cause the regex pattern
1243to fail to compile.
1244
1245=item 4
1246
1247Similarly, any other error likely would lead to a panic; now to just the
1248pattern failing to compile.
1249
1250=item 5
1251
1252The old mechanism did not detect illegal ranges in the definition of the
1253property. Now, the range max must not be smaller than the range min.
1254Otherwise, the pattern fails to compile.
1255
1256=item 6
1257
1258The intention was to have each sub called only once during the lifetime
1259of the program, so that a property's definition is immutable. This was
1260relaxed so that it could be called once for all /i compilations, and
1261potentially a second time for non-/i (the sub is passed a parameter
1262indicating which). However, in practice there were instances when this
1263was broken, and multiple calls were possible. Those have been fixed.
1264Now (besides the /i,non-/i cases) the only way a sub can be called
1265multiple times is if some component of it has not been defined yet. For
1266example, suppose we have sub IsA() whose definition is known at compile
1267time, and it in turn calls isB() whose definition is not yet known.
1268isA() will be called each time a pattern it appears in is compiled. If
1269isA() also calls isC() and that definition is known, isC() will be
1270called just once.
1271
1272=item 7
1273
1274There were some races and very long hangs should one thread be compiling
1275the same property as another simultaneously. These have now been fixed.
1276
1277=back
1278
1279=item *
1280
1281Fixed a failure to match properly.
1282
1283An EXACTFish regnode has a finite length it can hold for the string
1284being matched. If that length is exceeded, a second node is used for
1285the next segment of the string, for as many regnodes as are needed.
1286Care has to be taken where to break the string, in order to deal
1287multi-character folds in Unicode correctly. If we want to break a
1288string at a place which could potentially be in the middle of a
1289multi-character fold, we back off one (or more) characters, leaving
1290a shorter EXACTFish regnode. This backing off mechanism contained
1291an off-by-one error.
1292L<[perl #133756]|https://rt.perl.org/Ticket/Display.html?id=133756>.
1293
1294=item *
1295
1296A bare C<eof> call with no previous file handle now returns true.
1297L<[perl #133721]|https://rt.perl.org/Ticket/Display.html?id=133721>
1298
1299=item *
1300
1301Failing to compile a format now aborts compilation. Like other errors
1302in sub-parses this could leave the parser in a strange state, possibly
1303crashing perl if compilation continued.
1304L<[perl #132158]|https://rt.perl.org/Ticket/Display.html?id=132158>
1305
1306=item *
1307
1308If an in-place edit is still in progress during global destruction and
1309the process exit code (as stored in C<$?>) is zero, perl will now
1310treat the in-place edit as successful, replacing the input file with
1311any output produced.
1312
1313This allows code like:
1314
1315 perl -i -ne 'print "Foo"; last'
1316
1317to replace the input file, while code like:
1318
1319 perl -i -ne 'print "Foo"; die'
1320
1321will not. Partly resolves
1322L<[perl #133659]|https://rt.perl.org/Ticket/Display.html?id=133659>.
1323
1324=item *
1325
1326A regression in 5.28 caused the following code to fail
1327
1328 close(STDIN); open(CHILD, "|wc -l")'
1329
1330because the child's stdin would be closed on exec. This has now been fixed.
1331
1332=item *
1333
1334Fixed an issue where compiling a regexp containing both compile-time
1335and run-time code blocks could lead to trying to compile something
1336which is invalid syntax.
1337
1338=item *
1339
1340Fixed build failures with C<< -DNO_LOCALE_NUMERIC >> and
1341C<< -DNO_LOCALE_COLLATE >>.
1342L<[perl #133696]|https://rt.perl.org/Ticket/Display.html?id=133696>.
1343
1344=item *
1345
1346Prevent the tests in F<< ext/B/t/strict.t >> from being skipped.
1347L<[perl #133713]|https://rt.perl.org/Ticket/Display.html?id=133713>.
1348
1349=item *
1350
1351C<< /di >> nodes ending or beginning in I<s> are now C<< EXACTF >>. We do not
1352want two C<< EXACTFU >> to be joined together during optimization,
1353and to form a C<< ss >>, C<< sS >>, C<< Ss >> or C<< SS >> sequence;
1354they are the only multi-character sequences which may match differently
1355under C<< /ui >> and C<< /di >>.
1356
1357=back
1358
1359=head1 Acknowledgements
1360
1361Perl 5.30.0 represents approximately 11 months of development since Perl
13625.28.0 and contains approximately 620,000 lines of changes across 1,300
1363files from 58 authors.
1364
1365Excluding auto-generated files, documentation and release tools, there were
1366approximately 510,000 lines of changes to 750 .pm, .t, .c and .h files.
1367
1368Perl continues to flourish into its fourth decade thanks to a vibrant
1369community of users and developers. The following people are known to have
1370contributed the improvements that became Perl 5.30.0:
1371
1372Aaron Crane, Abigail, Alberto Simões, Alexandr Savca, Andreas König, Andy
1373Dougherty, Aristotle Pagaltzis, Brian Greenfield, Chad Granum, Chris
1374'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Dan
1375Dedrick, Daniel Dragan, Dan Kogai, David Cantrell, David Mitchell, Dominic
1376Hargreaves, E. Choroba, Ed J, Eugen Konkov, François Perrad, Graham Knop,
1377Hauke D, H.Merijn Brand, Hugo van der Sanden, Jakub Wilk, James Clarke,
1378James E Keenan, Jerry D. Hedden, Jim Cromie, John SJ Anderson, Karen
1379Etheridge, Karl Williamson, Leon Timmermans, Matthias Bethke, Nicholas
1380Clark, Nicolas R., Niko Tyni, Pali, Petr Písař, Phil Pearl (Lobbes),
1381Richard Leach, Ryan Voots, Sawyer X, Shlomi Fish, Sisyphus, Slaven Rezic,
1382Steve Hay, Sullivan Beck, Tina Müller, Tomasz Konojacki, Tom Wyant, Tony
1383Cook, Unicode Consortium, Yves Orton, Zak B. Elep.
1384
1385The list above is almost certainly incomplete as it is automatically
1386generated from version control history. In particular, it does not include
1387the names of most of the (very much appreciated) contributors who reported
1388issues to the Perl bug tracker. Noteworthy in this release were the large
1389number of bug fixes made possible by Sergey Aleynikov's high quality perlbug
1390reports for issues he discovered by fuzzing with AFL.
1391
1392Many of the changes included in this version originated in the CPAN modules
1393included in Perl's core. We're grateful to the entire CPAN community for
1394helping Perl to flourish.
1395
1396For a more complete list of all of Perl's historical contributors, please
1397see the F<AUTHORS> file in the Perl source distribution.
1398
1399=head1 Reporting Bugs
1400
1401If you find what you think is a bug, you might check the perl bug database
1402at L<https://rt.perl.org/>. There may also be information at
1403L<http://www.perl.org/>, the Perl Home Page.
1404
1405If you believe you have an unreported bug, please run the L<perlbug> program
1406included with your release. Be sure to trim your bug down to a tiny but
1407sufficient test case. Your bug report, along with the output of C<perl -V>,
1408will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
1409
1410If the bug you are reporting has security implications which make it
1411inappropriate to send to a publicly archived mailing list, then see
1412L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
1413for details of how to report the issue.
1414
1415=head1 Give Thanks
1416
1417If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
1418you can do so by running the C<perlthanks> program:
1419
1420 perlthanks
1421
1422This will send an email to the Perl 5 Porters list with your show of thanks.
1423
1424=head1 SEE ALSO
1425
1426The F<Changes> file for an explanation of how to view exhaustive details on
1427what changed.
1428
1429The F<INSTALL> file for how to build Perl.
1430
1431The F<README> file for general stuff.
1432
1433The F<Artistic> and F<Copying> files for copyright information.
1434
1435=cut