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