This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add @_ in signatured sub being experimental to perldelta.pod
[perl5.git] / pod / perl5340delta.pod
CommitLineData
b129a266
S
1=encoding utf8
2
3=head1 NAME
4
5perl5340delta - what is new for perl v5.34.0
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.32.0 release and the 5.34.0
10release.
11
12If you are upgrading from an earlier release such as 5.30.0, first read
13L<perl5320delta>, which describes differences between 5.30.0 and 5.32.0.
14
15=head1 Core Enhancements
16
17=head2 Experimental Try/Catch Syntax
18
19An initial experimental attempt at providing C<try>/C<catch> notation has
20been added.
21
22 use feature 'try';
23
24 try {
25 a_function();
26 }
27 catch ($e) {
28 warn "An error occurred: $e";
29 }
30
31For more information, see L<perlsyn/"Try Catch Exception Handling">.
32
33=head2 C<qr/{,n}/> is now accepted
34
35An empty lower bound is now accepted for regular expression quantifiers,
24eef90b
KW
36like C<m/x{,3}/> meaning C<m/x{0,3}/>
37
38=cut
39
b129a266
S
40
41=head2 Blanks freely allowed within but adjacent to curly braces
42
43(in double-quotish contexts and regular expression patterns)
44
45This means you can write things like S<C<\x{ FFFC }>> if you like. This
46applies to all such constructs, namely C<\b{}>, C<\g{}>, C<\k{}>,
47C<\N{}>, C<\o{}>, and C<\x{}>; as well as the regular expression
48quantifier C<{I<m>,I<n>}>. C<\p{}> and C<\P{}> retain their
49already-existing, even looser, rules mandated by the Unicode standard
50(see L<perluniprops/Properties accessible through \p{} and \P{}>).
51
52This ability is in effect regardless of the presence of the C</x>
53regular expression pattern modifier.
54
55Additionally, the comma in a regular expression braced quantifier may
56have blanks (tabs or spaces) before and/or after the comma, like
57S<C<qr/a{ 5, 7 }/>>.
58
59=head2 New octal syntax C<0oI<ddddd>>
60
61It is now possible to specify octal literals with C<0o> prefixes,
62as in C<0o123_456>, parallel to the existing construct to specify
63hexadecimal literal C<0xI<ddddd>> and binary literal C<0bI<ddddd>>.
64Also, the builtin C<oct()> function now accepts this new syntax.
65
66See L<perldata/Scalar value constructors> and L<perlfunc/oct EXPR>.
67
68=head1 Performance Enhancements
69
70=over 4
71
72=item *
73
74Fix a memory leak in RegEx
75[L<GH #18604|https://github.com/Perl/perl5/issues/18604>]
76
77=back
78
79=head1 Modules and Pragmata
80
81=head2 New Modules and Pragmata
82
83=over 4
84
85=item *
86
87L<ExtUtils::PL2Bat> 0.004 has been added to the Perl core.
88
89This module is a generalization of the C<pl2bat> script. It being a script has
90led to at least two forks of this code; this module will unify them under one
91implementation with tests.
92
93=back
94
95=head2 Updated Modules and Pragmata
96
97=over 4
98
99=item *
100
101L<Archive::Tar> has been upgraded from version 2.36 to 2.38.
102
103=item *
104
105L<autodie> has been upgraded from version 2.32 to 2.34.
106
107=item *
108
109L<B> has been upgraded from version 1.80 to 1.82.
110
111=item *
112
113L<B::Deparse> has been upgraded from version 1.54 to 1.56.
114
115=item *
116
117L<bytes> has been upgraded from version 1.07 to 1.08.
118
119=item *
120
121L<Carp> has been upgraded from version 1.50 to 1.52.
122
123=item *
124
125L<Compress::Raw::Bzip2> has been upgraded from version 2.093 to 2.101.
126
127=item *
128
129L<Compress::Raw::Zlib> has been upgraded from version 2.093 to 2.101.
130
131=item *
132
133L<Config::Perl::V> has been upgraded from version 0.32 to 0.33.
134
135=item *
136
137L<CPAN> has been upgraded from version 2.27 to 2.28.
138
139=item *
140
141L<Data::Dumper> has been upgraded from version 2.174 to 2.179.
142
143=item *
144
145L<DB> has been upgraded from version 1.58 to 1.59.
146
147=item *
148
149L<DB_File> has been upgraded from version 1.853 to 1.855.
150
151=item *
152
153L<Devel::Peek> has been upgraded from version 1.28 to 1.30.
154
155=item *
156
157L<Devel::PPPort> has been upgraded from version 3.57 to 3.62.
158
159New C<PERL_VERSION_*> comparison macros are now available.
160
161C<ppport.h --api-info> no longer includes non-API info unless that is the only
162match
163
164=item *
165
166L<Digest> has been upgraded from version 1.17_01 to 1.19.
167
168=item *
169
170L<Digest::MD5> has been upgraded from version 2.55_01 to 2.58.
171
172=item *
173
174L<DynaLoader> has been upgraded from version 1.47 to 1.50.
175
176=item *
177
178L<Encode> has been upgraded from version 3.06 to 3.08.
179
180=item *
181
182L<Env> has been upgraded from version 1.04 to 1.05.
183
184=item *
185
186L<Errno> has been upgraded from version 1.30 to 1.33.
187
188=item *
189
190L<experimental> has been upgraded from version 0.020 to 0.024.
191
192=item *
193
194L<Exporter> has been upgraded from version 5.74 to 5.76.
195
196=item *
197
198L<ExtUtils::CBuilder> has been upgraded from version 0.280234 to 0.280236.
199
200=item *
201
202L<ExtUtils::Install> has been upgraded from version 2.14 to 2.20.
203
204=item *
205
206L<ExtUtils::MakeMaker> has been upgraded from version 7.44 to 7.62.
207
208=item *
209
210L<ExtUtils::Manifest> has been upgraded from version 1.72 to 1.73.
211
212=item *
213
214L<ExtUtils::Miniperl> has been upgraded from version 1.09 to 1.10.
215
216=item *
217
218L<ExtUtils::ParseXS> has been upgraded from version 3.40 to 3.43.
219
220=item *
221
222L<ExtUtils::Typemaps> has been upgraded from version 3.38 to 3.43.
223
224=item *
225
226L<Fcntl> has been upgraded from version 1.13 to 1.14.
227
228=item *
229
230L<feature> has been upgraded from version 1.58 to 1.64.
231
232Added the default enabled C<bareword_filehandles> feature.
233
234A new L<multidimensional|feature/"The 'multidimensional' feature">
235feature has been added, which is enabled by
236default but allows turning off L<multi-dimensional array
237emulation|perldata/Multi-dimensional array emulation>.
238
239=item *
240
241L<File::Copy> has been upgraded from version 2.34 to 2.35.
242
243=item *
244
245L<File::Fetch> has been upgraded from version 0.56 to 1.00.
246
247=item *
248
249L<File::Find> has been upgraded from version 1.37 to 1.39.
250
251=item *
252
253L<File::Path> has been upgraded from version 2.16 to 2.18.
254
255=item *
256
257L<File::Spec> has been upgraded from version 3.78 to 3.80.
258
259=item *
260
261L<File::Temp> has been upgraded from version 0.2309 to 0.2311.
262
263=item *
264
265L<Filter::Util::Call> has been upgraded from version 1.59 to 1.60.
266
267=item *
268
269L<FindBin> has been upgraded from version 1.51 to 1.52.
270
271=item *
272
273L<GDBM_File> has been upgraded from version 1.18 to 1.19.
274
275New functions and compatibility for newer versions of GDBM.
276[L<GH #18435|https://github.com/Perl/perl5/pull/18435>]
277
278=item *
279
280L<Getopt::Long> has been upgraded from version 2.51 to 2.52.
281
282=item *
283
284L<Getopt::Std> has been upgraded from version 1.12 to 1.13.
285
286=item *
287
288L<Hash::Util> has been upgraded from version 0.23 to 0.25.
289
290=item *
291
292L<Hash::Util::FieldHash> has been upgraded from version 1.20 to 1.21.
293
294=item *
295
296L<I18N::LangTags> has been upgraded from version 0.44 to 0.45.
297
298=item *
299
300L<if> has been upgraded from version 0.0608 to 0.0609.
301
302=item *
303
304L<IO> has been upgraded from version 1.43 to 1.46.
305
306IO::Socket now stores error messages in C<$IO::Socket::errstr>, in
307addition to in C<$@>.
308
309The C<error> method now reports the error state for both the input and
310output streams for sockets and character devices. Similarly
311C<clearerr> now clears the error state for both streams.
312
313A spurious error reported for regular file handles has been
314fixed in L<IO::Handle>.
315[L<GH #18019|https://github.com/Perl/perl5/issues/18019>]
316
317=item *
318
319IO-Compress has been upgraded from version 2.093 to 2.102.
320
321bin/zipdetails version 2.02
322
323=item *
324
325L<IO::Socket::IP> has been upgraded from version 0.39 to 0.41.
326
327=item *
328
329L<IO::Zlib> has been upgraded from version 1.10 to 1.11.
330
331=item *
332
333L<IPC::SysV> has been upgraded from version 2.07 to 2.09.
334
335=item *
336
337L<JSON::PP> has been upgraded from version 4.04 to 4.06.
338
339=item *
340
341The libnet distribution has been upgraded from version 3.11 to 3.13.
342
343=item *
344
345L<locale> has been upgraded from version 1.09 to 1.10.
346
347=item *
348
349L<Math::Complex> has been upgraded from version 1.5901 to 1.5902.
350
351=item *
352
353L<MIME::Base64> has been upgraded from version 3.15 to 3.16.
354
355=item *
356
357L<Module::CoreList> has been upgraded from version 5.20200620 to 5.20210520.
358
359=item *
360
361L<Module::Load> has been upgraded from version 0.34 to 0.36.
362
363=item *
364
365L<Module::Load::Conditional> has been upgraded from version 0.70 to 0.74.
366
367=item *
368
369L<mro> has been upgraded from version 1.23 to 1.25_001.
370
371=item *
372
373L<Net::Ping> has been upgraded from version 2.72 to 2.74.
374
375=item *
376
377L<NEXT> has been upgraded from version 0.67_01 to 0.68.
378
379=item *
380
381L<ODBM_File> has been upgraded from version 1.16 to 1.17.
382
383=item *
384
385L<Opcode> has been upgraded from version 1.47 to 1.50.
386
387=item *
388
389L<overload> has been upgraded from version 1.31 to 1.33.
390
391=item *
392
393L<perlfaq> has been upgraded from version 5.20200523 to 5.20210411.
394
395=item *
396
397L<PerlIO::encoding> has been upgraded from version 0.28 to 0.30.
398
399=item *
400
401L<PerlIO::mmap> has been upgraded from version 0.016 to 0.017.
402
403=item *
404
405L<PerlIO::scalar> has been upgraded from version 0.30 to 0.31.
406
407=item *
408
409L<PerlIO::via::QuotedPrint> has been upgraded from version 0.08 to 0.09.
410
411=item *
412
413L<Pod::Checker> has been upgraded from version 1.73 to 1.74.
414
415=item *
416
417L<Pod::Html> has been upgraded from version 1.25 to 1.27.
418
419=item *
420
421L<Pod::Simple> has been upgraded from version 3.40 to 3.42.
422
423=item *
424
425L<Pod::Usage> has been upgraded from version 1.69 to 2.01.
426
427=item *
428
429L<POSIX> has been upgraded from version 1.94 to 1.97.
430
431POSIX::signbit() behaviour has been improved.
432[L<GH #18441|https://github.com/Perl/perl5/pull/18441>]
433
434Documentation for C<asctime> clarifies that the result is always in English.
435(Use C<strftime> for a localized result.)
436
437=item *
438
439L<re> has been upgraded from version 0.40 to 0.41.
440
441(See under L</Internal Changes> for more information.)
442
443=item *
444
445L<Safe> has been upgraded from version 2.41 to 2.43.
446
447=item *
448
449L<Socket> has been upgraded from version 2.029 to 2.031.
450
451=item *
452
453L<Storable> has been upgraded from version 3.21 to 3.23.
454
455=item *
456
457L<strict> has been upgraded from version 1.11 to 1.12.
458
459=item *
460
461L<subs> has been upgraded from version 1.03 to 1.04.
462
463=item *
464
465L<Symbol> has been upgraded from version 1.08 to 1.09.
466
467=item *
468
469L<Test::Harness> has been upgraded from version 3.42 to 3.43.
470
471=item *
472
473L<Test::Simple> has been upgraded from version 1.302175 to 1.302183.
474
475=item *
476
477L<Text::Balanced> has been upgraded from version 2.03 to 2.04.
478
479=item *
480
481L<threads> has been upgraded from version 2.25 to 2.26.
482
483=item *
484
485L<threads::shared> has been upgraded from version 1.61 to 1.62.
486
487=item *
488
489L<Tie::RefHash> has been upgraded from version 1.39 to 1.40.
490
491=item *
492
493L<Time::HiRes> has been upgraded from version 1.9764 to 1.9767.
494
495=item *
496
497L<Time::Local> has been upgraded from version 1.28 to 1.30.
498
499=item *
500
501L<Unicode::Collate> has been upgraded from version 1.27 to 1.29.
502
503=item *
504
505L<Unicode::Normalize> has been upgraded from version 1.27 to 1.28.
506
507=item *
508
509L<utf8> has been upgraded from version 1.22 to 1.24.
510
511=item *
512
513L<version> has been upgraded from version 0.9924 to 0.9928.
514
515=item *
516
517L<warnings> has been upgraded from version 1.47 to 1.51.
518
519=item *
520
521L<Win32> has been upgraded from version 0.53 to 0.57.
522
523Fix calling convention for C<PFNRegGetValueA>.
524
525Added C<Win32::IsSymlinkCreationAllowed()>,
526C<Win32::IsDeveloperModeEnabled()>, and C<Win32::GetProcessPrivileges()>.
527
528Removed old code for versions before Windows 2000.
529
530=item *
531
532L<XS::APItest> has been upgraded from version 1.09 to 1.16.
533
534=item *
535
536L<XS::Typemap> has been upgraded from version 0.17 to 0.18.
537
538=back
539
540=head1 Documentation
541
542=head2 New Documentation
543
544=head3 L<perldocstyle>
545
546This document is a guide for the authorship and maintenance of the
547documentation that ships with Perl.
548
549=head3 L<perlgov>
550
551This document describes the goals, scope, system, and rules for Perl's new
552governance model.
553
554Other pod files, most notably L<perlpolicy>, were amended to reflect
555its adoption.
556
557=head2 Changes to Existing Documentation
558
559We have attempted to update the documentation to reflect the changes
560listed in this document. If you find any we have missed, open an issue
561at L<https://github.com/Perl/perl5/issues>.
562
563Additionally, the following selected changes have been made:
564
565=over 4
566
567=item *
568
569L<perlapi>, L<perlguts>, L<perlxs>, and L<perlxstut> now prefer C<SvPVbyte>
570over C<SvPV>.
571
572=item *
573
574References to B<Pumpking> have been replaced with a more accurate term or
575B<Steering Council> where appropriate.
576
577=item *
578
579B<The Perl Steering Council> is now the fallback contact for security issues.
580
581=back
582
583=head3 L<perlapi>
584
585=over 4
586
587=item *
588
589Efforts continue in improving the presentation of this document, and to
590document more API elements.
591
592=back
593
594=head3 L<perlcommunity>
595
596=over 4
597
598=item *
599
600The freenode IRC URL has been updated.
601
602=back
603
604=head3 L<perldebguts>
605
606=over 4
607
608=item *
609
610Corrected the description of the scalar C<< ${"_<$filename"} >>
611variables.
612
613=back
614
615=head3 L<perldiag>
616
617=over 4
618
619=item *
620
621Now documents additional examples of "not imported" warnings.
622
623=back
624
625=head3 L<perlfaq>
626
627=over 4
628
629=item *
630
631The Perl FAQ was updated to CPAN version 5.20201107 with minor
632improvements.
633
634=back
635
636=head3 L<perlfunc>
637
638=over 4
639
640=item *
641
642L<my()|perlfunc/my> and L<state()|perlfunc/state> now explicitly warn
643the reader that lexical variables should typically not be redeclared
644within the same scope or statement.
645[L<GH #18389|https://github.com/Perl/perl5/issues/18389>]
646
647=item *
648
649The L<localtime|perlfunc/localtime> entry has been improved and now
650also states that the result of the function is always in English.
651
652=item *
653
654L<msgsnd()|perlfunc/msgsnd> documented a length field included in the
655packed C<MSG> parameter to C<msgsnd()>, but there was no such field.
656C<MSG> contains only the type and the message content.
657
658=item *
659
660Better explanation of what happens when C<sleep> is called with a zero or
661negative value.
662
663=item *
664
665Simplify the C<split()> documentation by removing the C<join()>s from the
666examples
667[L<GH #18676|https://github.com/Perl/perl5/issues/18676>]
668
669=back
670
671=head3 L<perlgit>
672
673=over 4
674
675=item *
676
677document how to create a remote-tracking branch for every PR
678
679=item *
680
681document how to get a PR as a local branch
682
683=back
684
685=head3 L<perlguts>
686
687=over 4
688
689=item *
690
691L<perlguts> now explains in greater detail the need to consult C<SvUTF8>
692when calling C<SvPV> (or variants). A new "How do I pass a Perl string to a C
693library?" section in the same document discusses when to use which style of
694macro to read an SV's string value.
695
696=item *
697
698Corrected C<my_rpeep> example in perlguts.
699
700=item *
701
702A section has been added on the formatted printing of special sizes.
703
704=back
705
706=head3 L<perlop>
707
708=over 4
709
710=item *
711
712The C<< <> >> and C<<< <<>> >>> operators are commonly referred to as
713the diamond and double diamond operators respectively, but that wasn't
714mentioned previously in their documentation.
715
716=item *
717
718Document range op behavior change.
719
720=back
721
722=head3 L<perlpacktut>
723
724=over 4
725
726=item *
727
728Incorrect variables used in an example have been fixed.
729
730=back
731
732=head3 L<perlsyn>
733
734=over 4
735
736=item *
737
738Document that caller() does not see try{} blocks
739
740=item *
741
742A new example shows how a lexical C<my> variable can be declared
743during the initialization of a C<for> loop.
744
745=back
746
747=head3 L<perlunifaq>
748
749=over 4
750
751=item *
752
753Fix description of what Perl does with unencoded strings
754
755=back
756
757=head1 Diagnostics
758
759The following additions or changes have been made to diagnostic output,
760including warnings and fatal error messages. For the complete list of
761diagnostic messages, see L<perldiag>.
762
763=head2 New Diagnostics
764
765=head3 New Errors
766
767=over 4
768
769=item *
770
771L<Bareword filehandle "%s" not allowed under 'no feature "bareword_filehandles"'|perldiag/"Bareword filehandle "%s" not allowed under 'no feature "bareword_filehandles"'">
772
773This accompanies the new
774L<bareword_filehandles|feature/"The 'bareword_filehandles' feature."> feature.
775
776=item *
777
778L<Multidimensional hash lookup is disabled|perldiag/"Multidimensional hash lookup is disabled">
779
780This accompanies the new
781L<multidimensional|feature/"The 'multidimensional' feature"> feature.
782
783=back
784
785=head3 New Warnings
786
787=over 4
788
789=item *
790
791L<Wide character in setenv key (encoding to utf8)|perldiag/"Wide character in %s">
792
793Attempts to put wide characters into environment variable keys via C<%ENV> now
794provoke this warning.
795
796=back
797
798=head2 Changes to Existing Diagnostics
799
800=over 4
801
802=item *
803
804L<Error %s in expansion of %s|perldiag/"Error %s in expansion of %s">
805
806An error was encountered in handling a user-defined property
807(L<perlunicode/User-Defined Character Properties>). These are
808programmer written subroutines, hence subject to errors that may
809prevent them from compiling or running.
810
811=item *
812
813L<Infinite recursion in user-defined property|perldiag/"Infinite recursion in user-defined property">
814
815A user-defined property (L<perlunicode/User-Defined Character Properties>)
816can depend on the definitions of other user-defined
817properties. If the chain of dependencies leads back to this property,
818infinite recursion would occur, were it not for the check that raised
819this error.
820
821=item *
822
823L<Timeout waiting for another thread to define \p{%s}|perldiag/"Timeout waiting for another thread to define \p{%s}">
824
825The first time a user-defined property
826(L<perlunicode/User-Defined Character Properties>) is used, its
827definition is looked up and converted into an internal form for more
828efficient handling in subsequent uses. There could be a race if two or
829more threads tried to do this processing nearly simultaneously.
830
831=item *
832
833L<Unknown user-defined property name \p{%s}|perldiag/"Unknown user-defined property name \p{%s}">
834
835You specified to use a property within the C<\p{...}> which was a
836syntactically valid user-defined property, but no definition was found
837for it
838
839=item *
840
841L<Too few arguments for subroutine '%s' (got %d; expected %d)|perldiag/"Too few arguments for subroutine '%s' (got %d; expected %d)">
842
843Subroutine argument-count mismatch errors now include the number of
844given and expected arguments.
845
846=item *
847
848L<Too many arguments for subroutine '%s' (got %d; expected %d)|perldiag/"Too many arguments for subroutine '%s' (got %d; expected %d)">
849
850Subroutine argument-count mismatch errors now include the number of
851given and expected arguments.
852
853=item *
854
855L<Lost precision when %s %f by 1|perldiag/"Lost precision when %s %f by 1">
856
857This warning was only issued for positive too-large values when
858incrementing, and only for negative ones when decrementing.
859It is now issued for both positive or negative too-large values.
860[L<GH #18333|https://github.com/Perl/perl5/issues/18333>]
861
862=item *
863
864L<\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/%s/">
865
866This error was incorrectly produced in some cases involving nested
867lookarounds. This has been fixed.
868[L<GH #18123|https://github.com/Perl/perl5/issues/18123>]
869
870=item *
871
872L<Use of uninitialized value%s|perldiag/"Use of uninitialized value%s">
873
874This warning may now include the array or hash index when the
875uninitialized value is the result of an element not found. This will
876only happen if the index is a simple non-magical variable.
877
878=back
879
880=head1 Utility Changes
881
882=head2 L<perl5db.pl> (the debugger)
883
884=over 4
885
886=item * New option: C<HistItemMinLength>
887
888This option controls the minimum length a command must be to get stored in
889history. Traditionally, this has been fixed at 2. Changes to the debugger
890are often perilous, and new bugs should be reported so the debugger can be
891debugged.
892
893=item * Fix to C<i> and C<l> commands
894
895The C<i $var> and C<l $var> commands work again with lexical variables.
896
897=back
898
899=head1 Configuration and Compilation
900
901=over 4
902
903=item *
904
905Prevented incpath to spill into libpth
906
907=item *
908
909Use realpath if available. (This might catch more duplicate paths.)
910
911=item *
912
913Only include real existing paths.
914
915=item *
916
917Filter inc paths out of libpth.
918
919=item * stadtx hash support has been removed
920
921stadtx support has been entirely removed. Previously, it could be requested
922with C<PERL_HASH_FUNC_STADTX>, and was default in 64-bit builds. It has been
923replaced with SipHash. SipHash has been more rigorously reviewed than stadtx.
924
925=item * Configure
926
927A new probe checks for buggy libc implementations of the C<gcvt>/C<qgcvt>
928functions.
929[L<GH #18170|https://github.com/Perl/perl5/issues/18170>]
930
931=item * C<-Dusedefaultstrict>
932
933Perl can now be built with L<strict> on by default (using the configuration
934option C<-Dusedefaultstrict>.
935
936These strict defaults do not apply when C<perl> is run via C<-e> or C<-E>.
937
938This setting provides a diagnostic mechanism intended for development
939purposes only and is thus undefined by default.
940
941=item *
942
943The minimum supported Bison version is now 2.4, and the maximum is 3.7.
944
945=item *
946
947Newer 64-bit versions of the Intel C/C++ compiler are now recognised
948and have the correct flags set.
949
950=item *
951
952We now trap SIGBUS when F<Configure> checks for C<va_copy>.
953
954On several systems the attempt to determine if we need C<va_copy> or similar
955results in a SIGBUS instead of the expected SIGSEGV, which previously caused a
956core dump.
957
958[L<GH #18148|https://github.com/Perl/perl5/issues/18148>]
959
960=back
961
962=head1 Testing
963
964Tests were added and changed to reflect the other additions and
965changes in this release. Furthermore, these significant changes were
966made:
967
968=over 4
969
970=item *
971
972Split Config-dependent tests in F<t/opbasic/arith.t> to F<t/op/arith2.t>
973
974=item *
975
976F<t/re/opt.t> was added, providing a test harness for regexp optimization.
977[L<GH #18213|https://github.com/Perl/perl5/pull/18213>]
978
979=item *
980
981A workaround for CPAN distributions needing dot in C<@INC> has been removed
982[L<GH #18394|https://github.com/Perl/perl5/pull/18394>].
983All distributions that previously required the workaround have now been
984adapted.
985
986=item *
987
988When testing in parallel on many-core platforms, you can now cause the
989test suite to finish somewhat earlier, but with less logical ordering of
990the tests, by setting
991
992 PERL_TEST_HARNESS_ASAP=1
993
994while running the test suite.
995
996=back
997
998=head1 Platform Support
999
1000=head2 New Platforms
1001
1002=over 4
1003
1004=item 9front
1005
1006Allow building Perl on i386 9front systems (a fork of plan9).
1007
1008=back
1009
1010=head2 Updated Platforms
1011
1012=over 4
1013
1014=item Plan9
1015
1016Improve support for Plan9 on i386 platforms.
1017
1018=item MacOS (Darwin)
1019
1020The hints file for darwin has been updated to handle future MacOS versions
1021beyond 10. [L<GH #17946|https://github.com/Perl/perl5/issues/17946>]
1022
1023=back
1024
1025=head2 Discontinued Platforms
1026
1027=over 4
1028
1029=item Symbian
1030
1031Support code relating to Symbian has been removed. Symbian was an
1032operating system for mobile devices. The port was last updated in July
10332009, and the platform itself in October 2012.
1034
1035=back
1036
1037=head2 Platform-Specific Notes
1038
1039=over 4
1040
1041=item DragonFlyBSD
1042
1043Tests were updated to workaround DragonFlyBSD bugs in L<tc*()
1044functions|https://bugs.dragonflybsd.org/issues/3252> and L<ctime
1045updates|https://bugs.dragonflybsd.org/issues/3251>.
1046
1047=item Mac OS X
1048
1049A number of system libraries no longer exist as actual files on Big Sur,
1050even though C<dlopen> will pretend they do, so now we fall back to C<dlopen>
1051if a library file can not be found.
1052[L<GH #18407|https://github.com/Perl/perl5/issues/18407>]
1053
1054=item Windows
1055
1056Reading non-ASCII characters from the console when its codepage was set to
105765001 (UTF-8) was broken due to a bug in Windows. A workaround for this
1058problem has been implemented.
1059[L<GH #18701|https://github.com/Perl/perl5/issues/18701>]
1060
1061Building with mingw.org compilers (version 3.4.5 or later) using mingw runtime
1062versions < 3.22 now works again. This was broken in Perl 5.31.4.
1063
1064Building with mingw.org compilers (version 3.4.5 or later) using mingw runtime
1065versions >= 3.21 now works (for compilers up to version 5.3.0).
1066
1067F<Makefile.mk>, and thus support for dmake, has been removed. It is still
1068possible to build Perl on Windows using nmake (Makefile) and GNU make
1069(GNUmakefile).
1070[L<GH #18511|https://github.com/Perl/perl5/pull/18511>]
1071
1072perl can now be built with C<USE_QUADMATH> on MS Windows using
1073(32-bit and 64-bit) mingw-w64 ports of gcc.
1074[L<GH #18465|https://github.com/Perl/perl5/pull/18465>]
1075
1076The F<pl2bat.pl> utility now needs to C<use ExtUtils::PL2Bat>. This could
1077cause failures in parallel builds.
1078
1079Windows now supports L<symlink()|perlfunc/symlink> and
1080L<readlink()|perlfunc/readlink>, and L<lstat()|perlfunc/lstat> is no
1081longer an alias for L<stat()|perlfunc/stat>.
1082[L<GH #18005|https://github.com/Perl/perl5/issues/18005>].
1083
1084Unlike POSIX systems, creating a symbolic link on Windows requires
1085either elevated privileges or Windows 10 1703 or later with Developer
1086Mode enabled.
1087
1088stat(), including C<stat FILEHANDLE>, and lstat() now uses our own
1089implementation that populates the device C<dev> and inode numbers
1090C<ino> returned rather than always returning zero. The number of
1091links C<nlink> field is now always populated.
1092
1093L<< C<${^WIN32_SLOPPY_STAT}> |perlvar/${^WIN32_SLOPPY_STAT} >> previously
1094controlled whether the C<nlink> field was populated requiring a
1095separate Windows API call to fetch, since C<nlink> and the other
1096information required for C<stat()> is now retrieved in a single API call.
1097
1098The C<-r> and C<-w> operators now return true for the C<STDIN>,
1099C<STDOUT> and C<STDERR> handles. Unfortunately it still won't return
1100true for duplicates of those handles.
1101[L<GH #8502|https://github.com/Perl/perl5/issues/8502>].
1102
1103The times returned by stat() and lstat() are no longer incorrect
1104across Daylight Savings Time adjustments.
1105[L<GH #6080|https://github.com/Perl/perl5/issues/6080>].
1106
1107C<-x> on a filehandle should now match C<-x> on the corresponding
1108filename on Vista or later.
1109[L<GH #4145|https://github.com/Perl/perl5/issues/4145>].
1110
1111C<-e '"'> no longer incorrectly returns true.
1112[L<GH #12431|https://github.com/Perl/perl5/issues/12431>].
1113
1114The same manifest is now used for Visual C++ and gcc builds.
1115
1116Previously, MSVC builds were using the B</manifestdependency> flag instead of
1117embedding F<perlexe.manifest>, which caused issues such as C<GetVersionEx()>
1118returning the wrong version number on Windows 10.
1119
1120=item z/OS
1121
1122The locale categories C<LC_SYNTAX> and C<LC_TOD> are now recognized.
1123Perl doesn't do anything with these, except it now allows you to specify
1124them. They are included in C<LC_ALL>.
1125
1126=back
1127
1128=head1 Internal Changes
1129
1130=over 4
1131
1132=item *
1133
1134Corrected handling of double and long double parameters for perl's
1135implementation of formatted output for C<-Dusequadmath> builds.
1136
1137This applies to C<PerlIO_printf()>, C<croak()>, C<warn()>, C<sv_catpvf()> and
1138their variants.
1139
1140Previously in C<quadmath> builds, code like:
1141
1142 PerlIO_printf(PerlIO_stderr(), "%g", somedouble);
1143
1144or
1145
1146 PerlIO_printf(PerlIO_stderr(), "%Lg", somelongdouble);
1147
1148would erroneously throw an exception "panic: quadmath invalid format
1149...", since the code added for quadmath builds assumed C<NV>s were the
1150only floating point format passed into these functions.
1151
1152This code would also process the standard C long double specifier C<L>
1153as if it expected an C<NV> (C<__float128> for quadmath builds),
1154resulting in undefined behaviour.
1155
1156These functions now correctly accept doubles, long doubles and NVs.
1157
1158=item *
1159
1160Previously the right operand of bitwise shift operators (shift amount)
1161was implicitly cast from IV to int, but it might lead wrong results
1162if IV does not fit in int.
1163
1164And also, shifting INT_MIN bits used to yield the shiftee unchanged
1165(treated as 0-bit shift instead of negative shift).
1166
1167=item *
1168
1169A set of C<cop_hints_exists_{pv,pvn,pvs,sv}> functions was added,
1170to support checking for the existence of keys in the hints hash of a
1171specific cop without needing to create a mortal copy of said value.
1172
1173=item *
1174
1175An aid has been added for using the C<DEBUG> macros when debugging XS or
1176C code. The comments in F<perl.h> describe C<DEBUG_PRE_STMTS> and
1177C<DEBUG_POST_STMTS>. which you can C<#define> to do things like save and
1178restore C<errno>, in case the C<DEBUG> calls are interfering with that,
1179or to display timestamps, or which thread it's coming from, or the
1180location of the call, or whatever. You can make a quick hack to help
1181you track something down without having to edit individual C<DEBUG>
1182calls.
1183
1184=item *
1185
1186Make C<REFCOUNTED_HE_EXISTS> available outside of core
1187
1188=item *
1189
1190All C<SvTRUE>-ish functions now evaluate their arguments exactly once.
1191In 5.32, plain L<perlapi/C<SvTRUE>> was changed to do that; now the rest
1192do as well.
1193
1194=item *
1195
1196Unicode is now a first class citizen when considering the pattern /A*B/ where
1197A and B are arbitrary. The pattern matching code tries to make a tight loop
1198to match the span of A's. The logic of this was now really updated with
1199support for UTF-8.
1200
1201=item *
1202
1203The L<re> module has a new function C<optimization>, which can return a
1204hashref of optimization data discovered about a compiled regexp.
1205
1206=item *
1207
1208The C<PERL_GLOBAL_STRUCT> compilation option has been removed, and
1209with it the need or the C<dVAR> macro. C<dVAR> remains defined as a
1210no-op outside C<PERL_CORE> for backwards compatiblity with XS modules.
1211
1212=item *
1213
1214A new savestack type C<SAVEt_HINTS_HH> has been added, which neatens the
1215previous behaviour of C<SAVEt_HINTS>. On previous versions the types and
1216values pushed to the save stack would depend on whether the hints included the
1217C<HINT_LOCALIZE_HH> bit, which complicates external code that inspects the
1218save stack. The new version uses a different savestack type to indicate the
1219difference.
1220
1221=item *
1222
1223A new API function L<perlapi/av_count> has been added which gives a
1224clearly named way to find how many elements are in an array.
1225
1226=back
1227
1228=head1 Selected Bug Fixes
1229
1230=over 4
1231
1232=item *
1233
1234Setting C<%ENV> now properly handles upgraded strings in the key. Previously
1235Perl sent the SV's internal PV directly to the OS; now it will handle keys
1236as it has handled values since 5.18: attempt to downgrade the string first;
1237if that fails then warn and use the utf8 form.
1238
1239=item *
1240
1241Fix a memory leak in regcomp.c
1242[L<GH #18604|https://github.com/Perl/perl5/issues/18604>]
1243
1244=item * pack/unpack format 'D' now works on all systems that could support it
1245
1246Previously if C<NV == long double>, now it is supported on all platforms that
1247have long doubles. In particular that means it is now also supported on
1248quadmath platforms.
1249
1250=item *
1251
1252Skip trying to constant fold an incomplete op tree
1253[L<GH #18380|https://github.com/Perl/perl5/issues/18380>]
1254
1255Constant folding of chained comparison op trees could fail under certain
1256conditions, causing perl to crash. As a quick fix, constant folding is
1257now skipped for such op trees. This also addresses
1258[L<GH #17917|https://github.com/Perl/perl5/issues/17917>].
1259
1260=item *
1261
1262C<%g> formatting broken on Ubuntu-18.04, C<NVSIZE == 8>
1263[L<GH #18170|https://github.com/Perl/perl5/issues/18170>]
1264
1265Buggy libc implementations of the C<gcvt> and C<qgcvt> functions
1266caused C<(s)printf> to incorrectly truncate C<%g> formatted numbers.
1267A new Configure probe now checks for this, with the result that the libc
1268C<sprintf> will be used in place of C<gcvt> and C<qgcvt>.
1269
1270Tests added as part of this fix also revealed related problems in
1271some Windows builds. The makefiles for MINGW builds on Windows have
1272thus been adjusted to use C<USE_MINGW_ANSI_STDIO> by default, ensuring
1273that they also provide correct C<(s)printf> formatting of numbers.
1274
1275=item *
1276
1277F<op.c>: croak on C<my $_> when C<use utf8> is in effect
1278[L<GH #18449|https://github.com/Perl/perl5/issues/18449>]
1279
1280The lexical topic feature experiment was removed in Perl v5.24 and
1281declaring C<my $_> became a compile time error. However, it was previously
1282still possible to make this declaration if C<use utf8> was in effect.
1283
1284=item *
1285
1286F<regexec.c>: Fix assertion failure
1287[L<GH #18451|https://github.com/Perl/perl5/issues/18451>]
1288
1289Fuzzing triggered an assertion failure in the regexp engine when too many
1290characters were copied into a buffer.
1291
1292=item *
1293
1294L<semctl()|perlfunc/semctl>, L<msgctl()|perlfunc/msgctl>, and
1295L<shmctl()|perlfunc/shmctl> now properly reset the UTF-8 flag on the
1296C<ARG> parameter if it's modified for C<IPC_STAT> or C<GETALL>
1297operations.
1298
1299=item *
1300
1301C<semctl()>, C<msgctl()>, and C<shmctl()> now attempt to downgrade the C<ARG>
1302parameter if its value is being used as input to C<IPC_SET> or
1303C<SETALL> calls. A failed downgrade will thrown an exception.
1304
1305=item *
1306
1307In cases where C<semctl()>, C<msgctl()> or C<shmctl()> would treat the C<ARG>
1308parameter as a pointer, an undefined value no longer generates a
1309warning. In most such calls the pointer isn't used anyway and this
1310allows you to supply C<undef> for a value not used by the underlying
1311function.
1312
1313=item *
1314
1315L<semop()|perlfunc/semop> now downgrades the C<OPSTRING> parameter,
1316L<msgsnd()|perlfunc/msgsnd> now downgrades the C<MSG> parameter and
1317L<shmwrite|perlfunc/shmwrite> now downgrades the C<STRING> parameter
1318to treat them as bytes. Previously they would be left upgraded,
1319providing a corrupted structure to the underlying function call.
1320
1321=item *
1322
1323L<msgrcv()|perlfunc/msgrcv> now properly resets the UTF-8 flag the
1324C<VAR> parameter when it is modified. Previously the UTF-8 flag could
1325be left on, resulting in a possibly corrupt result in C<VAR>.
1326
1327=item *
1328
1329Magic is now called correctly for stacked file test operators.
1330[L<GH #18293|https://github.com/Perl/perl5/issues/18293>]
1331
1332=item *
1333
1334The C<@ary = split(...)> optimization no longer switches in the target
1335array as the value stack.
1336[L<GH #18232|https://github.com/Perl/perl5/issues/18232>]
1337Also see discussion at
1338L<https://github.com/Perl/perl5/pull/18014#issuecomment-671299506>.
1339
1340=item *
1341
1342Fixed a bug in which some regexps with recursive subpatterns matched
1343incorrectly.
1344
1345[L<GH #18096|https://github.com/Perl/perl5/issues/18096>]
1346
1347=item *
1348
1349On Win32, C<waitpid(-1, WNOHANG)> could sometimes have a very large
1350timeout. [L<GH #16529|https://github.com/Perl/perl5/issues/16529>]
1351
1352=item *
1353
1354C<MARK> and hence C<items> are now correctly initialized in C<BOOT> XSUBs.
1355
1356=item *
1357
1358Some list assignments involving C<undef> on the left-hand side were
1359over-optimized and produced incorrect results.
1360[L<GH #16685|https://github.com/Perl/perl5/issues/16685>],
1361[L<GH #17816|https://github.com/Perl/perl5/issues/17816>]
1362
1363=back
1364
1365=head1 Known Problems
1366
1367None
1368
1369=head1 Errata From Previous Releases
1370
1371None
1372
1373=head1 Obituary
1374
1375Kent Fredric (KENTNL) passed away in February 2021. A native of New Zealand
1376and a self-described "huge geek," Kent was the author or maintainer of 178
1377CPAN distributions, the Perl maintainer for the Gentoo Linux distribution and
1378a contributor to the Perl core distribution. He is mourned by his family,
1379friends and open source software communities worldwide.
1380
1381=head1 Acknowledgements
1382
1383Perl 5.34.0 represents approximately 11 months of development since Perl
13845.32.0 and contains approximately 280,000 lines of changes across 2,100
1385files from 78 authors.
1386
1387Excluding auto-generated files, documentation and release tools, there were
1388approximately 150,000 lines of changes to 1,300 .pm, .t, .c and .h files.
1389
1390Perl continues to flourish into its fourth decade thanks to a vibrant
1391community of users and developers. The following people are known to have
1392contributed the improvements that became Perl 5.34.0:
1393
1394Aaron Crane, Adam Hartley, Andy Dougherty, Ben Cornett, Branislav
1395Zahradník, brian d foy, Chris 'BinGOs' Williams, Christian Walde
1396(Mithaldu), Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Daniel
1397Böhmer, Daniel Laügt, Dan Kogai, David Cantrell, David Mitchell, Dominic
1398Hamon, E. Choroba, Ed J, Eric Herman, Eric Lindblad, Eugene Alvin Villar,
1399Felipe Gasper, Giovanni Tataranni, Graham Knop, Graham Ollis, Hauke D,
1400H.Merijn Brand, Hugo van der Sanden, Ichinose Shogo, Ivan Baidakou, Jae
1401Bradley, James E Keenan, Jason McIntosh, jkahrman, John Karr, John Lightsey,
1402Kang-min Liu, Karen Etheridge, Karl Williamson, Keith Thompson, Leon
1403Timmermans, Marc Reisner, Marcus Holland-Moritz, Max Maischein, Michael G
1404Schwern, Nicholas Clark, Nicolas R., Paul Evans, Petr Písař, raiph, Renee
1405Baecker, Ricardo Signes, Richard Leach, Romano, Ryan Voots, Samanta Navarro,
1406Samuel Thibault, Sawyer X, Scott Baker, Sergey Poznyakoff, Sevan Janiyan,
1407Shirakata Kentaro, Shlomi Fish, Sisyphus, Sizhe Zhao, Steve Hay, TAKAI
1408Kousuke, Thibault Duponchelle, Todd Rinaldo, Tomasz Konojacki, Tom Hukins,
1409Tom Stellard, Tony Cook, vividsnow, Yves Orton, Zakariyya Mughal,
1410Михаил Козачков.
1411
1412The list above is almost certainly incomplete as it is automatically
1413generated from version control history. In particular, it does not include
1414the names of the (very much appreciated) contributors who reported issues to
1415the Perl bug tracker.
1416
1417Many of the changes included in this version originated in the CPAN modules
1418included in Perl's core. We're grateful to the entire CPAN community for
1419helping Perl to flourish.
1420
1421For a more complete list of all of Perl's historical contributors, please
1422see the F<AUTHORS> file in the Perl source distribution.
1423
1424=head1 Reporting Bugs
1425
1426If you find what you think is a bug, you might check the perl bug database
1427at L<https://github.com/Perl/perl5/issues>. There may also be information at
1428L<http://www.perl.org/>, the Perl Home Page.
1429
1430If you believe you have an unreported bug, please open an issue at
1431L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
1432tiny but sufficient test case.
1433
1434If the bug you are reporting has security implications which make it
1435inappropriate to send to a public issue tracker, then see
1436L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
1437for details of how to report the issue.
1438
1439=head1 Give Thanks
1440
1441If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
1442you can do so by running the C<perlthanks> program:
1443
1444 perlthanks
1445
1446This will send an email to the Perl 5 Porters list with your show of thanks.
1447
1448=head1 SEE ALSO
1449
1450The F<Changes> file for an explanation of how to view exhaustive details on
1451what changed.
1452
1453The F<INSTALL> file for how to build Perl.
1454
1455The F<README> file for general stuff.
1456
1457The F<Artistic> and F<Copying> files for copyright information.
1458
1459=cut