-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathperl5260delta.html
2236 lines (1416 loc) · 132 KB
/
perl5260delta.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>perl5260delta - what is new for perl v5.26.0</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:[email protected]" />
</head>
<body>
<ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#Notice">Notice</a></li>
<li><a href="#Core-Enhancements">Core Enhancements</a>
<ul>
<li><a href="#Lexical-subroutines-are-no-longer-experimental">Lexical subroutines are no longer experimental</a></li>
<li><a href="#Indented-Here-documents">Indented Here-documents</a></li>
<li><a href="#New-regular-expression-modifier-xx">New regular expression modifier /xx</a></li>
<li><a href="#CAPTURE-CAPTURE-and-CAPTURE_ALL">@{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL}</a></li>
<li><a href="#Declaring-a-reference-to-a-variable">Declaring a reference to a variable</a></li>
<li><a href="#Unicode-9.0-is-now-supported">Unicode 9.0 is now supported</a></li>
<li><a href="#Use-of-p-script-uses-the-improved-Script_Extensions-property">Use of \p{script} uses the improved Script_Extensions property</a></li>
<li><a href="#Perl-can-now-do-default-collation-in-UTF-8-locales-on-platforms-that-support-it">Perl can now do default collation in UTF-8 locales on platforms that support it</a></li>
<li><a href="#Better-locale-collation-of-strings-containing-embedded-NUL-characters">Better locale collation of strings containing embedded NUL characters</a></li>
<li><a href="#CORE-subroutines-for-hash-and-array-functions-callable-via-reference">CORE subroutines for hash and array functions callable via reference</a></li>
<li><a href="#New-Hash-Function-For-64-bit-Builds">New Hash Function For 64-bit Builds</a></li>
</ul>
</li>
<li><a href="#Security">Security</a>
<ul>
<li><a href="#Removal-of-the-current-directory-.-from-INC">Removal of the current directory (".") from @INC</a></li>
<li><a href="#Escaped-colons-and-relative-paths-in-PATH">Escaped colons and relative paths in PATH</a></li>
<li><a href="#New--Di-switch-is-now-required-for-PerlIO-debugging-output">New -Di switch is now required for PerlIO debugging output</a></li>
</ul>
</li>
<li><a href="#Incompatible-Changes">Incompatible Changes</a>
<ul>
<li><a href="#Unescaped-literal-characters-in-regular-expression-patterns-are-no-longer-permissible">Unescaped literal "{" characters in regular expression patterns are no longer permissible</a></li>
<li><a href="#scalar-hash-return-signature-changed">scalar(%hash) return signature changed</a></li>
<li><a href="#keys-returned-from-an-lvalue-subroutine">keys returned from an lvalue subroutine</a></li>
<li><a href="#The-ENCODING-facility-has-been-removed">The ${^ENCODING} facility has been removed</a></li>
<li><a href="#POSIX::tmpnam-has-been-removed">POSIX::tmpnam() has been removed</a></li>
<li><a href="#require-::Foo::Bar-is-now-illegal">require ::Foo::Bar is now illegal.</a></li>
<li><a href="#Literal-control-character-variable-names-are-no-longer-permissible">Literal control character variable names are no longer permissible</a></li>
<li><a href="#NBSP-is-no-longer-permissible-in-N">NBSP is no longer permissible in \N{...}</a></li>
</ul>
</li>
<li><a href="#Deprecations">Deprecations</a>
<ul>
<li><a href="#String-delimiters-that-arent-stand-alone-graphemes-are-now-deprecated">String delimiters that aren't stand-alone graphemes are now deprecated</a></li>
<li><a href="#cX-that-maps-to-a-printable-is-no-longer-deprecated">\cX that maps to a printable is no longer deprecated</a></li>
</ul>
</li>
<li><a href="#Performance-Enhancements">Performance Enhancements</a></li>
<li><a href="#Modules-and-Pragmata">Modules and Pragmata</a>
<ul>
<li><a href="#Updated-Modules-and-Pragmata">Updated Modules and Pragmata</a></li>
</ul>
</li>
<li><a href="#Documentation">Documentation</a>
<ul>
<li><a href="#New-Documentation">New Documentation</a>
<ul>
<li><a href="#perldeprecation">perldeprecation</a></li>
</ul>
</li>
<li><a href="#Changes-to-Existing-Documentation">Changes to Existing Documentation</a>
<ul>
<li><a href="#perlfunc">perlfunc</a></li>
<li><a href="#perlguts">perlguts</a></li>
<li><a href="#perlhack">perlhack</a></li>
<li><a href="#perlhacktips">perlhacktips</a></li>
<li><a href="#perlinterp">perlinterp</a></li>
<li><a href="#perllocale">perllocale</a></li>
<li><a href="#perlmod">perlmod</a></li>
<li><a href="#perlmodlib">perlmodlib</a></li>
<li><a href="#perlobj">perlobj</a></li>
<li><a href="#perlootut">perlootut</a></li>
<li><a href="#perlop">perlop</a></li>
<li><a href="#perlre">perlre</a></li>
<li><a href="#perlretut">perlretut</a></li>
<li><a href="#perlunicode">perlunicode</a></li>
<li><a href="#perlvar">perlvar</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#Diagnostics">Diagnostics</a>
<ul>
<li><a href="#New-Diagnostics">New Diagnostics</a>
<ul>
<li><a href="#New-Errors">New Errors</a></li>
<li><a href="#New-Warnings">New Warnings</a></li>
</ul>
</li>
<li><a href="#Changes-to-Existing-Diagnostics">Changes to Existing Diagnostics</a></li>
</ul>
</li>
<li><a href="#Utility-Changes">Utility Changes</a>
<ul>
<li><a href="#c2ph-and-pstruct">c2ph and pstruct</a></li>
<li><a href="#Porting-pod_lib.pl">Porting/pod_lib.pl</a></li>
<li><a href="#Porting-sync-with-cpan">Porting/sync-with-cpan</a></li>
<li><a href="#perf-benchmarks">perf/benchmarks</a></li>
<li><a href="#Porting-checkAUTHORS.pl">Porting/checkAUTHORS.pl</a></li>
<li><a href="#t-porting-regen.t">t/porting/regen.t</a></li>
<li><a href="#utils-h2xs.PL">utils/h2xs.PL</a></li>
<li><a href="#perlbug">perlbug</a></li>
</ul>
</li>
<li><a href="#Configuration-and-Compilation">Configuration and Compilation</a></li>
<li><a href="#Testing">Testing</a></li>
<li><a href="#Platform-Support">Platform Support</a>
<ul>
<li><a href="#New-Platforms">New Platforms</a></li>
<li><a href="#Platform-Specific-Notes">Platform-Specific Notes</a></li>
</ul>
</li>
<li><a href="#Internal-Changes">Internal Changes</a></li>
<li><a href="#Selected-Bug-Fixes">Selected Bug Fixes</a></li>
<li><a href="#Known-Problems">Known Problems</a></li>
<li><a href="#Errata-From-Previous-Releases">Errata From Previous Releases</a></li>
<li><a href="#Obituary">Obituary</a></li>
<li><a href="#Acknowledgements">Acknowledgements</a></li>
<li><a href="#Reporting-Bugs">Reporting Bugs</a></li>
<li><a href="#Give-Thanks">Give Thanks</a></li>
<li><a href="#SEE-ALSO">SEE ALSO</a></li>
</ul>
<h1 id="NAME">NAME</h1>
<p>perl5260delta - what is new for perl v5.26.0</p>
<h1 id="DESCRIPTION">DESCRIPTION</h1>
<p>This document describes the differences between the 5.24.0 release and the 5.26.0 release.</p>
<h1 id="Notice">Notice</h1>
<p>This release includes three updates with widespread effects:</p>
<ul>
<li><p><code>"."</code> no longer in <code>@INC</code></p>
<p>For security reasons, the current directory (<code>"."</code>) is no longer included by default at the end of the module search path (<code>@INC</code>). This may have widespread implications for the building, testing and installing of modules, and for the execution of scripts. See the section <a href="#Removal-of-the-current-directory-.-from-INC">"Removal of the current directory (<code>"."</code>) from <code>@INC</code>"</a> for the full details.</p>
</li>
<li><p><code>do</code> may now warn</p>
<p><code>do</code> now gives a deprecation warning when it fails to load a file which it would have loaded had <code>"."</code> been in <code>@INC</code>.</p>
</li>
<li><p>In regular expression patterns, a literal left brace <code>"{"</code> should be escaped</p>
<p>See <a href="#Unescaped-literal-characters-in-regular-expression-patterns-are-no-longer-permissible">"Unescaped literal <code>"{"</code> characters in regular expression patterns are no longer permissible"</a>.</p>
</li>
</ul>
<h1 id="Core-Enhancements">Core Enhancements</h1>
<h2 id="Lexical-subroutines-are-no-longer-experimental">Lexical subroutines are no longer experimental</h2>
<p>Using the <code>lexical_subs</code> feature introduced in v5.18 no longer emits a warning. Existing code that disables the <code>experimental::lexical_subs</code> warning category that the feature previously used will continue to work. The <code>lexical_subs</code> feature has no effect; all Perl code can use lexical subroutines, regardless of what feature declarations are in scope.</p>
<h2 id="Indented-Here-documents">Indented Here-documents</h2>
<p>This adds a new modifier <code>"~"</code> to here-docs that tells the parser that it should look for <code>/^\s*$DELIM\n/</code> as the closing delimiter.</p>
<p>These syntaxes are all supported:</p>
<pre><code> <<~EOF;
<<~\EOF;
<<~'EOF';
<<~"EOF";
<<~`EOF`;
<<~ 'EOF';
<<~ "EOF";
<<~ `EOF`;</code></pre>
<p>The <code>"~"</code> modifier will strip, from each line in the here-doc, the same whitespace that appears before the delimiter.</p>
<p>Newlines will be copied as-is, and lines that don't include the proper beginning whitespace will cause perl to croak.</p>
<p>For example:</p>
<pre><code> if (1) {
print <<~EOF;
Hello there
EOF
}</code></pre>
<p>prints "Hello there\n" with no leading whitespace.</p>
<h2 id="New-regular-expression-modifier-xx">New regular expression modifier <code>/xx</code></h2>
<p>Specifying two <code>"x"</code> characters to modify a regular expression pattern does everything that a single one does, but additionally TAB and SPACE characters within a bracketed character class are generally ignored and can be added to improve readability, like <span style="white-space: nowrap;"><code>/[ ^ A-Z d-f p-x ]/xx</code></span>. Details are at <a href="/cperl/perlre.html#x-and-xx">"/x and /xx" in perlre</a>.</p>
<h2 id="CAPTURE-CAPTURE-and-CAPTURE_ALL"><code>@{^CAPTURE}</code>, <code>%{^CAPTURE}</code>, and <code>%{^CAPTURE_ALL}</code></h2>
<p><code>@{^CAPTURE}</code> exposes the capture buffers of the last match as an array. So <code>$1</code> is <code>${^CAPTURE}[0]</code>. This is a more efficient equivalent to code like <code>substr($matched_string,$-[0],$+[0]-$-[0])</code>, and you don't have to keep track of the <code>$matched_string</code> either. This variable has no single character equivalent. Note that, like the other regex magic variables, the contents of this variable is dynamic; if you wish to store it beyond the lifetime of the match you must copy it to another array.</p>
<p><code>%{^CAPTURE}</code> is equivalent to <code>%+</code> (<i>i.e.</i>, named captures). Other than being more self-documenting there is no difference between the two forms.</p>
<p><code>%{^CAPTURE_ALL}</code> is equivalent to <code>%-</code> (<i>i.e.</i>, all named captures). Other than being more self-documenting there is no difference between the two forms.</p>
<h2 id="Declaring-a-reference-to-a-variable">Declaring a reference to a variable</h2>
<p>As an experimental feature, Perl now allows the referencing operator to come after <a href="/cperl/perlfunc.html#my"><code>my()</code></a>, <a href="/cperl/perlfunc.html#state"><code>state()</code></a>, <a href="/cperl/perlfunc.html#our"><code>our()</code></a>, or <a href="/cperl/perlfunc.html#local"><code>local()</code></a>. This syntax must be enabled with <code>use feature 'declared_refs'</code>. It is experimental, and will warn by default unless <code>no warnings 'experimental::refaliasing'</code> is in effect. It is intended mainly for use in assignments to references. For example:</p>
<pre><code> use experimental 'refaliasing', 'declared_refs';
my \$a = \$b;</code></pre>
<p>See <a href="/cperl/perlref.html#Assigning-to-References">"Assigning to References" in perlref</a> for more details.</p>
<h2 id="Unicode-9.0-is-now-supported">Unicode 9.0 is now supported</h2>
<p>A list of changes is at <a href="http://www.unicode.org/versions/Unicode9.0.0/">http://www.unicode.org/versions/Unicode9.0.0/</a>. Modules that are shipped with core Perl but not maintained by p5p do not necessarily support Unicode 9.0. <a href="/cperl/lib/Unicode/Normalize.html">Unicode::Normalize</a> does work on 9.0.</p>
<h2 id="Use-of-p-script-uses-the-improved-Script_Extensions-property">Use of <code>\p{<i>script</i>}</code> uses the improved Script_Extensions property</h2>
<p>Unicode 6.0 introduced an improved form of the Script (<code>sc</code>) property, and called it Script_Extensions (<code>scx</code>). Perl now uses this improved version when a property is specified as just <code>\p{<i>script</i>}</code>. This should make programs more accurate when determining if a character is used in a given script, but there is a slight chance of breakage for programs that very specifically needed the old behavior. The meaning of compound forms, like <code>\p{sc=<i>script</i>}</code> are unchanged. See <a href="/cperl/perlunicode.html#Scripts">"Scripts" in perlunicode</a>.</p>
<h2 id="Perl-can-now-do-default-collation-in-UTF-8-locales-on-platforms-that-support-it">Perl can now do default collation in UTF-8 locales on platforms that support it</h2>
<p>Some platforms natively do a reasonable job of collating and sorting in UTF-8 locales. Perl now works with those. For portability and full control, <a href="/cperl/lib/Unicode/Collate.html">Unicode::Collate</a> is still recommended, but now you may not need to do anything special to get good-enough results, depending on your application. See <a href="/cperl/perllocale.html#Category-LC_COLLATE:-Collation:-Text-Comparisons-and-Sorting">"Category <code>LC_COLLATE</code>: Collation: Text Comparisons and Sorting" in perllocale</a>.</p>
<h2 id="Better-locale-collation-of-strings-containing-embedded-NUL-characters">Better locale collation of strings containing embedded <code>NUL</code> characters</h2>
<p>In locales that have multi-level character weights, <code>NUL</code>s are now ignored at the higher priority ones. There are still some gotchas in some strings, though. See <a href="/cperl/perllocale.html#Collation-of-strings-containing-embedded-NUL-characters">"Collation of strings containing embedded <code>NUL</code> characters" in perllocale</a>.</p>
<h2 id="CORE-subroutines-for-hash-and-array-functions-callable-via-reference"><code>CORE</code> subroutines for hash and array functions callable via reference</h2>
<p>The hash and array functions in the <code>CORE</code> namespace (<code>keys</code>, <code>each</code>, <code>values</code>, <code>push</code>, <code>pop</code>, <code>shift</code>, <code>unshift</code> and <code>splice</code>) can now be called with ampersand syntax (<code>&CORE::keys(\%hash</code>) and via reference (<code>my $k = \&CORE::keys; $k->(\%hash)</code>). Previously they could only be used when inlined.</p>
<h2 id="New-Hash-Function-For-64-bit-Builds">New Hash Function For 64-bit Builds</h2>
<p>We have switched to a hybrid hash function to better balance performance for short and long keys.</p>
<p>For short keys, 16 bytes and under, we use an optimised variant of One At A Time Hard, and for longer keys we use Siphash 1-3. For very long keys this is a big improvement in performance. For shorter keys there is a modest improvement.</p>
<h1 id="Security">Security</h1>
<h2 id="Removal-of-the-current-directory-.-from-INC">Removal of the current directory (<code>"."</code>) from <code>@INC</code></h2>
<p>The perl binary includes a default set of paths in <code>@INC</code>. Historically it has also included the current directory (<code>"."</code>) as the final entry, unless run with taint mode enabled (<code>perl -T</code>). While convenient, this has security implications: for example, where a script attempts to load an optional module when its current directory is untrusted (such as <i>/tmp</i>), it could load and execute code from under that directory.</p>
<p>Starting with v5.26, <code>"."</code> is always removed by default, not just under tainting. This has major implications for installing modules and executing scripts.</p>
<p>The following new features have been added to help ameliorate these issues.</p>
<ul>
<li><p><i>Configure -Udefault_inc_excludes_dot</i></p>
<p>There is a new <i>Configure</i> option, <code>default_inc_excludes_dot</code> (enabled by default) which builds a perl executable without <code>"."</code>; unsetting this option using <code>-U</code> reverts perl to the old behaviour. This may fix your path issues but will reintroduce all the security concerns, so don't build a perl executable like this unless you're <i>really</i> confident that such issues are not a concern in your environment.</p>
</li>
<li><p><code>PERL_USE_UNSAFE_INC</code></p>
<p>There is a new environment variable recognised by the perl interpreter. If this variable has the value 1 when the perl interpreter starts up, then <code>"."</code> will be automatically appended to <code>@INC</code> (except under tainting).</p>
<p>This allows you restore the old perl interpreter behaviour on a case-by-case basis. But note that this is intended to be a temporary crutch, and this feature will likely be removed in some future perl version. It is currently set by the <code>cpan</code> utility and <code>Test::Harness</code> to ease installation of CPAN modules which have not been updated to handle the lack of dot. Once again, don't use this unless you are sure that this will not reintroduce any security concerns.</p>
</li>
<li><p>A new deprecation warning issued by <code>do</code>.</p>
<p>While it is well-known that <code>use</code> and <code>require</code> use <code>@INC</code> to search for the file to load, many people don't realise that <code>do "file"</code> also searches <code>@INC</code> if the file is a relative path. With the removal of <code>"."</code>, a simple <code>do "file.pl"</code> will fail to read in and execute <code>file.pl</code> from the current directory. Since this is commonly expected behaviour, a new deprecation warning is now issued whenever <code>do</code> fails to load a file which it otherwise would have found if a dot had been in <code>@INC</code>.</p>
</li>
</ul>
<p>Here are some things script and module authors may need to do to make their software work in the new regime.</p>
<ul>
<li><p>Script authors</p>
<p>If the issue is within your own code (rather than within included modules), then you have two main options. Firstly, if you are confident that your script will only be run within a trusted directory (under which you expect to find trusted files and modules), then add <code>"."</code> back into the path; <i>e.g.</i>:</p>
<pre><code> BEGIN {
my $dir = "/some/trusted/directory";
chdir $dir or die "Can't chdir to $dir: $!\n";
# safe now
push @INC, '.';
}
use "Foo::Bar"; # may load /some/trusted/directory/Foo/Bar.pm
do "config.pl"; # may load /some/trusted/directory/config.pl</code></pre>
<p>On the other hand, if your script is intended to be run from within untrusted directories (such as <i>/tmp</i>), then your script suddenly failing to load files may be indicative of a security issue. You most likely want to replace any relative paths with full paths; for example,</p>
<pre><code> do "foo_config.pl"</code></pre>
<p>might become</p>
<pre><code> do "$ENV{HOME}/foo_config.pl"</code></pre>
<p>If you are absolutely certain that you want your script to load and execute a file from the current directory, then use a <code>./</code> prefix; for example:</p>
<pre><code> do "./foo_config.pl"</code></pre>
</li>
<li><p>Installing and using CPAN modules</p>
<p>If you install a CPAN module using an automatic tool like <code>cpan</code>, then this tool will itself set the <code>PERL_USE_UNSAFE_INC</code> environment variable while building and testing the module, which may be sufficient to install a distribution which hasn't been updated to be dot-aware. If you want to install such a module manually, then you'll need to replace the traditional invocation:</p>
<pre><code> perl Makefile.PL && make && make test && make install</code></pre>
<p>with something like</p>
<pre><code> (export PERL_USE_UNSAFE_INC=1; \
perl Makefile.PL && make && make test && make install)</code></pre>
<p>Note that this only helps build and install an unfixed module. It's possible for the tests to pass (since they were run under <code>PERL_USE_UNSAFE_INC=1</code>), but for the module itself to fail to perform correctly in production. In this case, you may have to temporarily modify your script until a fixed version of the module is released. For example:</p>
<pre><code> use Foo::Bar;
{
local @INC = (@INC, '.');
# assuming read_config() needs '.' in @INC
$config = Foo::Bar->read_config();
}</code></pre>
<p>This is only rarely expected to be necessary. Again, if doing this, assess the resultant risks first.</p>
</li>
<li><p>Module Authors</p>
<p>If you maintain a CPAN distribution, it may need updating to run in a dotless environment. Although <code>cpan</code> and other such tools will currently set the <code>PERL_USE_UNSAFE_INC</code> during module build, this is a temporary workaround for the set of modules which rely on <code>"."</code> being in <code>@INC</code> for installation and testing, and this may mask deeper issues. It could result in a module which passes tests and installs, but which fails at run time.</p>
<p>During build, test, and install, it will normally be the case that any perl processes will be executing directly within the root directory of the untarred distribution, or a known subdirectory of that, such as <i>t/</i>. It may well be that <i>Makefile.PL</i> or <i>t/foo.t</i> will attempt to include local modules and configuration files using their direct relative filenames, which will now fail.</p>
<p>However, as described above, automatic tools like <i>cpan</i> will (for now) set the <code>PERL_USE_UNSAFE_INC</code> environment variable, which introduces dot during a build.</p>
<p>This makes it likely that your existing build and test code will work, but this may mask issues with your code which only manifest when used after install. It is prudent to try and run your build process with that variable explicitly disabled:</p>
<pre><code> (export PERL_USE_UNSAFE_INC=0; \
perl Makefile.PL && make && make test && make install)</code></pre>
<p>This is more likely to show up any potential problems with your module's build process, or even with the module itself. Fixing such issues will ensure both that your module can again be installed manually, and that it will still build once the <code>PERL_USE_UNSAFE_INC</code> crutch goes away.</p>
<p>When fixing issues in tests due to the removal of dot from <code>@INC</code>, reinsertion of dot into <code>@INC</code> should be performed with caution, for this too may suppress real errors in your runtime code. You are encouraged wherever possible to apply the aforementioned approaches with explicit absolute/relative paths, or to relocate your needed files into a subdirectory and insert that subdirectory into <code>@INC</code> instead.</p>
<p>If your runtime code has problems under the dotless <code>@INC</code>, then the comments above on how to fix for script authors will mostly apply here too. Bear in mind though that it is considered bad form for a module to globally add a dot to <code>@INC</code>, since it introduces both a security risk and hides issues of accidentally requiring dot in <code>@INC</code>, as explained above.</p>
</li>
</ul>
<h2 id="Escaped-colons-and-relative-paths-in-PATH">Escaped colons and relative paths in PATH</h2>
<p>On Unix systems, Perl treats any relative paths in the <code>PATH</code> environment variable as tainted when starting a new process. Previously, it was allowing a backslash to escape a colon (unlike the OS), consequently allowing relative paths to be considered safe if the PATH was set to something like <code>/\:.</code>. The check has been fixed to treat <code>"."</code> as tainted in that example.</p>
<h2 id="New--Di-switch-is-now-required-for-PerlIO-debugging-output">New <code>-Di</code> switch is now required for PerlIO debugging output</h2>
<p>This is used for debugging of code within PerlIO to avoid recursive calls. Previously this output would be sent to the file specified by the <code>PERLIO_DEBUG</code> environment variable if perl wasn't running setuid and the <code>-T</code> or <code>-t</code> switches hadn't been parsed yet.</p>
<p>If perl performed output at a point where it hadn't yet parsed its switches this could result in perl creating or overwriting the file named by <code>PERLIO_DEBUG</code> even when the <code>-T</code> switch had been supplied.</p>
<p>Perl now requires the <code>-Di</code> switch to be present before it will produce PerlIO debugging output. By default this is written to <code>stderr</code>, but can optionally be redirected to a file by setting the <code>PERLIO_DEBUG</code> environment variable.</p>
<p>If perl is running setuid or the <code>-T</code> switch was supplied, <code>PERLIO_DEBUG</code> is ignored and the debugging output is sent to <code>stderr</code> as for any other <code>-D</code> switch.</p>
<h1 id="Incompatible-Changes">Incompatible Changes</h1>
<h2 id="Unescaped-literal-characters-in-regular-expression-patterns-are-no-longer-permissible">Unescaped literal <code>"{"</code> characters in regular expression patterns are no longer permissible</h2>
<p>You have to now say something like <code>"\{"</code> or <code>"[{]"</code> to specify to match a LEFT CURLY BRACKET; otherwise, it is a fatal pattern compilation error. This change will allow future extensions to the language.</p>
<p>These have been deprecated since v5.16, with a deprecation message raised for some uses starting in v5.22. Unfortunately, the code added to raise the message was buggy and failed to warn in some cases where it should have. Therefore, enforcement of this ban for these cases is deferred until Perl 5.30, but the code has been fixed to raise a default-on deprecation message for them in the meantime.</p>
<p>Some uses of literal <code>"{"</code> occur in contexts where we do not foresee the meaning ever being anything but the literal, such as the very first character in the pattern, or after a <code>"|"</code> meaning alternation. Thus</p>
<pre><code> qr/{fee|{fie/</code></pre>
<p>matches either of the strings <code>{fee</code> or <code>{fie</code>. To avoid forcing unnecessary code changes, these uses do not need to be escaped, and no warning is raised about them, and there are no current plans to change this.</p>
<p>But it is always correct to escape <code>"{"</code>, and the simple rule to remember is to always do so.</p>
<p>See <a href="/cperl/perldiag.html#Unescaped-left-brace-in-regex-is-illegal-here-in-regex-marked-by----HERE-in-m-s">Unescaped left brace in regex is illegal here</a>.</p>
<h2 id="scalar-hash-return-signature-changed"><code>scalar(%hash)</code> return signature changed</h2>
<p>The value returned for <code>scalar(%hash)</code> will no longer show information about the buckets allocated in the hash. It will simply return the count of used keys. It is thus equivalent to <code>0+keys(%hash)</code>.</p>
<p>A form of backward compatibility is provided via <a href="/cperl/lib/Hash/Util.html#bucket_ratio"><code>Hash::Util::bucket_ratio()</code></a> which provides the same behavior as <code>scalar(%hash)</code> provided in Perl 5.24 and earlier.</p>
<h2 id="keys-returned-from-an-lvalue-subroutine"><code>keys</code> returned from an lvalue subroutine</h2>
<p><code>keys</code> returned from an lvalue subroutine can no longer be assigned to in list context.</p>
<pre><code> sub foo : lvalue { keys(%INC) }
(foo) = 3; # death
sub bar : lvalue { keys(@_) }
(bar) = 3; # also an error</code></pre>
<p>This makes the lvalue sub case consistent with <code>(keys %hash) = ...</code> and <code>(keys @_) = ...</code>, which are also errors. <a href="https://rt.perl.org/Public/Bug/Display.html?id=128187">[perl #128187]</a></p>
<h2 id="The-ENCODING-facility-has-been-removed">The <code>${^ENCODING}</code> facility has been removed</h2>
<p>The special behaviour associated with assigning a value to this variable has been removed. As a consequence, the <a href="/cperl/lib/encoding.html">encoding</a> pragma's default mode is no longer supported. If you still need to write your source code in encodings other than UTF-8, use a source filter such as <a>Filter::Encoding</a> on CPAN or <a href="/cperl/lib/encoding.html">encoding</a>'s <code>Filter</code> option.</p>
<h2 id="POSIX::tmpnam-has-been-removed"><code>POSIX::tmpnam()</code> has been removed</h2>
<p>The fundamentally unsafe <code>tmpnam()</code> interface was deprecated in Perl 5.22 and has now been removed. In its place, you can use, for example, the <a href="/cperl/lib/File/Temp.html">File::Temp</a> interfaces.</p>
<h2 id="require-::Foo::Bar-is-now-illegal">require ::Foo::Bar is now illegal.</h2>
<p>Formerly, <code>require ::Foo::Bar</code> would try to read <i>/Foo/Bar.pm</i>. Now any bareword require which starts with a double colon dies instead.</p>
<h2 id="Literal-control-character-variable-names-are-no-longer-permissible">Literal control character variable names are no longer permissible</h2>
<p>A variable name may no longer contain a literal control character under any circumstances. These previously were allowed in single-character names on ASCII platforms, but have been deprecated there since Perl 5.20. This affects things like <code>$<i>\cT</i></code>, where <i>\cT</i> is a literal control (such as a <code>NAK</code> or <code>NEGATIVE ACKNOWLEDGE</code> character) in the source code.</p>
<h2 id="NBSP-is-no-longer-permissible-in-N"><code>NBSP</code> is no longer permissible in <code>\N{...}</code></h2>
<p>The name of a character may no longer contain non-breaking spaces. It has been deprecated to do so since Perl 5.22.</p>
<h1 id="Deprecations">Deprecations</h1>
<h2 id="String-delimiters-that-arent-stand-alone-graphemes-are-now-deprecated">String delimiters that aren't stand-alone graphemes are now deprecated</h2>
<p>For Perl to eventually allow string delimiters to be Unicode grapheme clusters (which look like a single character, but may be a sequence of several ones), we have to stop allowing a single character delimiter that isn't a grapheme by itself. These are unlikely to exist in actual code, as they would typically display as attached to the character in front of them.</p>
<h2 id="cX-that-maps-to-a-printable-is-no-longer-deprecated"><code>\c<i>X</i></code> that maps to a printable is no longer deprecated</h2>
<p>This means we have no plans to remove this feature. It still raises a warning, but only if syntax warnings are enabled. The feature was originally intended to be a way to express non-printable characters that don't have a mnemonic (<code>\t</code> and <code>\n</code> are mnemonics for two non-printable characters, but most non-printables don't have a mnemonic.) But the feature can be used to specify a few printable characters, though those are more clearly expressed as the printable itself. See <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2017/02/msg242944.html">http://www.nntp.perl.org/group/perl.perl5.porters/2017/02/msg242944.html</a>.</p>
<h1 id="Performance-Enhancements">Performance Enhancements</h1>
<ul>
<li><p>A hash in boolean context is now sometimes faster, <i>e.g.</i></p>
<pre><code> if (!%h) { ... }</code></pre>
<p>This was already special-cased, but some cases were missed (such as <code>grep %$_, @AoH</code>), and even the ones which weren't have been improved.</p>
</li>
<li><p>New Faster Hash Function on 64 bit builds</p>
<p>We use a different hash function for short and long keys. This should improve performance and security, especially for long keys.</p>
</li>
<li><p>readline is faster</p>
<p>Reading from a file line-by-line with <code>readline()</code> or <code><></code> should now typically be faster due to a better implementation of the code that searches for the next newline character.</p>
</li>
<li><p>Assigning one reference to another, <i>e.g.</i> <code>$ref1 = $ref2</code> has been optimized in some cases.</p>
</li>
<li><p>Remove some exceptions to creating Copy-on-Write strings. The string buffer growth algorithm has been slightly altered so that you're less likely to encounter a string which can't be COWed.</p>
</li>
<li><p>Better optimise array and hash assignment: where an array or hash appears in the LHS of a list assignment, such as <code>(..., @a) = (...);</code>, it's likely to be considerably faster, especially if it involves emptying the array/hash. For example, this code runs about a third faster compared to Perl 5.24.0:</p>
<pre><code> my @a;
for my $i (1..10_000_000) {
@a = (1,2,3);
@a = ();
}</code></pre>
</li>
<li><p>Converting a single-digit string to a number is now substantially faster.</p>
</li>
<li><p>The <code>split</code> builtin is now slightly faster in many cases: in particular for the two specially-handled forms</p>
<pre><code> my @a = split ...;
local @a = split ...;</code></pre>
</li>
<li><p>The rather slow implementation for the experimental subroutine signatures feature has been made much faster; it is now comparable in speed with the traditional <code>my ($a, $b, @c) = @_</code>.</p>
</li>
<li><p>Bareword constant strings are now permitted to take part in constant folding. They were originally exempted from constant folding in August 1999, during the development of Perl 5.6, to ensure that <code>use strict "subs"</code> would still apply to bareword constants. That has now been accomplished a different way, so barewords, like other constants, now gain the performance benefits of constant folding.</p>
<p>This also means that void-context warnings on constant expressions of barewords now report the folded constant operand, rather than the operation; this matches the behaviour for non-bareword constants.</p>
</li>
</ul>
<h1 id="Modules-and-Pragmata">Modules and Pragmata</h1>
<h2 id="Updated-Modules-and-Pragmata">Updated Modules and Pragmata</h2>
<ul>
<li><p>IO::Compress has been upgraded from version 2.069 to 2.074.</p>
</li>
<li><p><a href="/cperl/lib/Archive/Tar.html">Archive::Tar</a> has been upgraded from version 2.04 to 2.24.</p>
</li>
<li><p><a>arybase</a> has been upgraded from version 0.11 to 0.12.</p>
</li>
<li><p><a href="/cperl/lib/attributes.html">attributes</a> has been upgraded from version 0.27 to 0.29.</p>
<p>The deprecation message for the <code>:unique</code> and <code>:locked</code> attributes now mention that they will disappear in Perl 5.28.</p>
</li>
<li><p><a href="/cperl/lib/B.html">B</a> has been upgraded from version 1.62 to 1.68.</p>
</li>
<li><p><a href="/cperl/lib/B/Concise.html">B::Concise</a> has been upgraded from version 0.996 to 0.999.</p>
<p>Its output is now more descriptive for <code>op_private</code> flags.</p>
</li>
<li><p><a>B::Debug</a> has been upgraded from version 1.23 to 1.24.</p>
</li>
<li><p><a href="/cperl/lib/B/Deparse.html">B::Deparse</a> has been upgraded from version 1.37 to 1.40.</p>
</li>
<li><p><a href="/cperl/lib/B/Xref.html">B::Xref</a> has been upgraded from version 1.05 to 1.06.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/base.html">base</a> has been upgraded from version 2.23 to 2.25.</p>
</li>
<li><p><a href="/cperl/lib/bignum.html">bignum</a> has been upgraded from version 0.42 to 0.47.</p>
</li>
<li><p><a href="/cperl/lib/Carp.html">Carp</a> has been upgraded from version 1.40 to 1.42.</p>
</li>
<li><p><a href="/cperl/lib/charnames.html">charnames</a> has been upgraded from version 1.43 to 1.44.</p>
</li>
<li><p><a href="/cperl/lib/Compress/Raw/Bzip2.html">Compress::Raw::Bzip2</a> has been upgraded from version 2.069 to 2.074.</p>
</li>
<li><p><a href="/cperl/lib/Compress/Raw/Zlib.html">Compress::Raw::Zlib</a> has been upgraded from version 2.069 to 2.074.</p>
</li>
<li><p><a href="/cperl/lib/Config/Perl/V.html">Config::Perl::V</a> has been upgraded from version 0.25 to 0.28.</p>
</li>
<li><p><a href="/cperl/lib/CPAN.html">CPAN</a> has been upgraded from version 2.11 to 2.18.</p>
</li>
<li><p><a href="/cperl/lib/CPAN/Meta.html">CPAN::Meta</a> has been upgraded from version 2.150005 to 2.150010.</p>
</li>
<li><p><a href="/cperl/lib/Data/Dumper.html">Data::Dumper</a> has been upgraded from version 2.160 to 2.167.</p>
<p>The XS implementation now supports Deparse.</p>
</li>
<li><p><a href="/cperl/lib/DB_File.html">DB_File</a> has been upgraded from version 1.835 to 1.840.</p>
</li>
<li><p><a href="/cperl/lib/Devel/Peek.html">Devel::Peek</a> has been upgraded from version 1.23 to 1.26.</p>
</li>
<li><p><a href="/cperl/lib/Devel/PPPort.html">Devel::PPPort</a> has been upgraded from version 3.32 to 3.35.</p>
</li>
<li><p><a href="/cperl/lib/Devel/SelfStubber.html">Devel::SelfStubber</a> has been upgraded from version 1.05 to 1.06.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/diagnostics.html">diagnostics</a> has been upgraded from version 1.34 to 1.36.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/Digest.html">Digest</a> has been upgraded from version 1.17 to 1.17_01.</p>
</li>
<li><p><a href="/cperl/lib/Digest/MD5.html">Digest::MD5</a> has been upgraded from version 2.54 to 2.55.</p>
</li>
<li><p><a href="/cperl/lib/Digest/SHA.html">Digest::SHA</a> has been upgraded from version 5.95 to 5.96.</p>
</li>
<li><p><a href="/cperl/lib/DynaLoader.html">DynaLoader</a> has been upgraded from version 1.38 to 1.42.</p>
</li>
<li><p><a href="/cperl/lib/Encode.html">Encode</a> has been upgraded from version 2.80 to 2.88.</p>
</li>
<li><p><a href="/cperl/lib/encoding.html">encoding</a> has been upgraded from version 2.17 to 2.19.</p>
<p>This module's default mode is no longer supported. It now dies when imported, unless the <code>Filter</code> option is being used.</p>
</li>
<li><p><a href="/cperl/lib/encoding/warnings.html">encoding::warnings</a> has been upgraded from version 0.12 to 0.13.</p>
<p>This module is no longer supported. It emits a warning to that effect and then does nothing.</p>
</li>
<li><p><a href="/cperl/lib/Errno.html">Errno</a> has been upgraded from version 1.25 to 1.28.</p>
<p>It now documents that using <code>%!</code> automatically loads Errno for you.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/ExtUtils/Embed.html">ExtUtils::Embed</a> has been upgraded from version 1.33 to 1.34.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/ExtUtils/MakeMaker.html">ExtUtils::MakeMaker</a> has been upgraded from version 7.10_01 to 7.24.</p>
</li>
<li><p><a href="/cperl/lib/ExtUtils/Miniperl.html">ExtUtils::Miniperl</a> has been upgraded from version 1.05 to 1.06.</p>
</li>
<li><p><a href="/cperl/lib/ExtUtils/ParseXS.html">ExtUtils::ParseXS</a> has been upgraded from version 3.31 to 3.34.</p>
</li>
<li><p><a href="/cperl/lib/ExtUtils/Typemaps.html">ExtUtils::Typemaps</a> has been upgraded from version 3.31 to 3.34.</p>
</li>
<li><p><a href="/cperl/lib/feature.html">feature</a> has been upgraded from version 1.42 to 1.47.</p>
</li>
<li><p><a href="/cperl/lib/File/Copy.html">File::Copy</a> has been upgraded from version 2.31 to 2.32.</p>
</li>
<li><p><a href="/cperl/lib/File/Fetch.html">File::Fetch</a> has been upgraded from version 0.48 to 0.52.</p>
</li>
<li><p><a href="/cperl/lib/File/Glob.html">File::Glob</a> has been upgraded from version 1.26 to 1.28.</p>
<p>It now Issues a deprecation message for <code>File::Glob::glob()</code>.</p>
</li>
<li><p><a href="/cperl/lib/File/Spec.html">File::Spec</a> has been upgraded from version 3.63 to 3.67.</p>
</li>
<li><p><a href="/cperl/lib/FileHandle.html">FileHandle</a> has been upgraded from version 2.02 to 2.03.</p>
</li>
<li><p><a href="/cperl/lib/Filter/Simple.html">Filter::Simple</a> has been upgraded from version 0.92 to 0.93.</p>
<p>It no longer treats <code>no MyFilter</code> immediately following <code>use MyFilter</code> as end-of-file. <a href="https://rt.perl.org/Public/Bug/Display.html?id=107726">[perl #107726]</a></p>
</li>
<li><p><a href="/cperl/lib/Getopt/Long.html">Getopt::Long</a> has been upgraded from version 2.48 to 2.49.</p>
</li>
<li><p><a href="/cperl/lib/Getopt/Std.html">Getopt::Std</a> has been upgraded from version 1.11 to 1.12.</p>
</li>
<li><p><a href="/cperl/lib/Hash/Util.html">Hash::Util</a> has been upgraded from version 0.19 to 0.22.</p>
</li>
<li><p><a href="/cperl/lib/HTTP/Tiny.html">HTTP::Tiny</a> has been upgraded from version 0.056 to 0.070.</p>
<p>Internal 599-series errors now include the redirect history.</p>
</li>
<li><p><a href="/cperl/lib/I18N/LangTags.html">I18N::LangTags</a> has been upgraded from version 0.40 to 0.42.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/IO.html">IO</a> has been upgraded from version 1.36 to 1.38.</p>
</li>
<li><p><a href="/cperl/lib/IO/Socket/IP.html">IO::Socket::IP</a> has been upgraded from version 0.37 to 0.38.</p>
</li>
<li><p><a href="/cperl/lib/IPC/Cmd.html">IPC::Cmd</a> has been upgraded from version 0.92 to 0.96.</p>
</li>
<li><p><a href="/cperl/lib/IPC/SysV.html">IPC::SysV</a> has been upgraded from version 2.06_01 to 2.07.</p>
</li>
<li><p><a href="/cperl/lib/JSON/PP.html">JSON::PP</a> has been upgraded from version 2.27300 to 2.27400_02.</p>
</li>
<li><p><a href="/cperl/lib/lib.html">lib</a> has been upgraded from version 0.63 to 0.64.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/List/Util.html">List::Util</a> has been upgraded from version 1.42_02 to 1.46_02.</p>
</li>
<li><p><a>Locale::Codes</a> has been upgraded from version 3.37 to 3.42.</p>
</li>
<li><p><a href="/cperl/lib/Locale/Maketext.html">Locale::Maketext</a> has been upgraded from version 1.26 to 1.28.</p>
</li>
<li><p><a href="/cperl/lib/Locale/Maketext/Simple.html">Locale::Maketext::Simple</a> has been upgraded from version 0.21 to 0.21_01.</p>
</li>
<li><p><a href="/cperl/lib/Math/BigInt.html">Math::BigInt</a> has been upgraded from version 1.999715 to 1.999806.</p>
</li>
<li><p><a href="/cperl/lib/Math/BigInt/FastCalc.html">Math::BigInt::FastCalc</a> has been upgraded from version 0.40 to 0.5005.</p>
</li>
<li><p><a href="/cperl/lib/Math/BigRat.html">Math::BigRat</a> has been upgraded from version 0.260802 to 0.2611.</p>
</li>
<li><p><a href="/cperl/lib/Math/Complex.html">Math::Complex</a> has been upgraded from version 1.59 to 1.5901.</p>
</li>
<li><p><a href="/cperl/lib/Memoize.html">Memoize</a> has been upgraded from version 1.03 to 1.03_01.</p>
</li>
<li><p><a href="/cperl/lib/Module/CoreList.html">Module::CoreList</a> has been upgraded from version 5.20170420 to 5.20170530.</p>
</li>
<li><p><a href="/cperl/lib/Module/Load/Conditional.html">Module::Load::Conditional</a> has been upgraded from version 0.64 to 0.68.</p>
</li>
<li><p><a href="/cperl/lib/Module/Metadata.html">Module::Metadata</a> has been upgraded from version 1.000031 to 1.000033.</p>
</li>
<li><p><a href="/cperl/lib/mro.html">mro</a> has been upgraded from version 1.18 to 1.20.</p>
</li>
<li><p><a href="/cperl/lib/Net/Ping.html">Net::Ping</a> has been upgraded from version 2.43 to 2.55.</p>
<p>IPv6 addresses and <code>AF_INET6</code> sockets are now supported, along with several other enhancements.</p>
</li>
<li><p><a href="/cperl/lib/NEXT.html">NEXT</a> has been upgraded from version 0.65 to 0.67.</p>
</li>
<li><p><a href="/cperl/lib/Opcode.html">Opcode</a> has been upgraded from version 1.34 to 1.39.</p>
</li>
<li><p><a href="/cperl/lib/open.html">open</a> has been upgraded from version 1.10 to 1.11.</p>
</li>
<li><p><a>OS2::Process</a> has been upgraded from version 1.11 to 1.12.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/overload.html">overload</a> has been upgraded from version 1.26 to 1.28.</p>
<p>Its compilation speed has been improved slightly.</p>
</li>
<li><p><a href="/cperl/lib/parent.html">parent</a> has been upgraded from version 0.234 to 0.236.</p>
</li>
<li><p><a>perl5db.pl</a> has been upgraded from version 1.50 to 1.51.</p>
<p>It now ignores <i>/dev/tty</i> on non-Unix systems. <a href="https://rt.perl.org/Public/Bug/Display.html?id=113960">[perl #113960]</a></p>
</li>
<li><p><a href="/cperl/lib/Perl/OSType.html">Perl::OSType</a> has been upgraded from version 1.009 to 1.010.</p>
</li>
<li><p><a href="/cperl/lib/perlfaq.html">perlfaq</a> has been upgraded from version 5.021010 to 5.021011.</p>
</li>
<li><p><a href="/cperl/lib/PerlIO.html">PerlIO</a> has been upgraded from version 1.09 to 1.10.</p>
</li>
<li><p><a href="/cperl/lib/PerlIO/encoding.html">PerlIO::encoding</a> has been upgraded from version 0.24 to 0.25.</p>
</li>
<li><p><a href="/cperl/lib/PerlIO/scalar.html">PerlIO::scalar</a> has been upgraded from version 0.24 to 0.26.</p>
</li>
<li><p><a href="/cperl/lib/Pod/Checker.html">Pod::Checker</a> has been upgraded from version 1.60 to 1.73.</p>
</li>
<li><p><a href="/cperl/lib/Pod/Functions.html">Pod::Functions</a> has been upgraded from version 1.10 to 1.11.</p>
</li>
<li><p><a href="/cperl/lib/Pod/Html.html">Pod::Html</a> has been upgraded from version 1.22 to 1.2202.</p>
</li>
<li><p><a href="/cperl/lib/Pod/Perldoc.html">Pod::Perldoc</a> has been upgraded from version 3.25_02 to 3.28.</p>
</li>
<li><p><a href="/cperl/lib/Pod/Simple.html">Pod::Simple</a> has been upgraded from version 3.32 to 3.35.</p>
</li>
<li><p><a href="/cperl/lib/Pod/Usage.html">Pod::Usage</a> has been upgraded from version 1.68 to 1.69.</p>
</li>
<li><p><a href="/cperl/lib/POSIX.html">POSIX</a> has been upgraded from version 1.65 to 1.76.</p>
<p>This remedies several defects in making its symbols exportable. <a href="https://rt.perl.org/Public/Bug/Display.html?id=127821">[perl #127821]</a></p>
<p>The <code>POSIX::tmpnam()</code> interface has been removed, see <a href="#POSIX::tmpnam-has-been-removed">"POSIX::tmpnam() has been removed"</a>.</p>
<p>The following deprecated functions have been removed:</p>
<pre><code> POSIX::isalnum
POSIX::isalpha
POSIX::iscntrl
POSIX::isdigit
POSIX::isgraph
POSIX::islower
POSIX::isprint
POSIX::ispunct
POSIX::isspace
POSIX::isupper
POSIX::isxdigit
POSIX::tolower
POSIX::toupper</code></pre>
<p>Trying to import POSIX subs that have no real implementations (like <code>POSIX::atend()</code>) now fails at import time, instead of waiting until runtime.</p>
</li>
<li><p><a href="/cperl/lib/re.html">re</a> has been upgraded from version 0.32 to 0.34</p>
<p>This adds support for the new <a href="/cperl/perlre.html#x-and-xx"><code>/xx</code></a> regular expression pattern modifier, and a change to the <a href="/cperl/lib/re.html#strict-mode"><span style="white-space: nowrap;"><code>use re 'strict'</code></span></a> experimental feature. When <span style="white-space: nowrap;"><code>re 'strict'</code></span> is enabled, a warning now will be generated for all unescaped uses of the two characters <code>"}"</code> and <code>"]"</code> in regular expression patterns (outside bracketed character classes) that are taken literally. This brings them more in line with the <code>")"</code> character which is always a metacharacter unless escaped. Being a metacharacter only sometimes, depending on an action at a distance, can lead to silently having the pattern mean something quite different than was intended, which the <span style="white-space: nowrap;"><code>re 'strict'</code></span> mode is intended to minimize.</p>
</li>
<li><p><a href="/cperl/lib/Safe.html">Safe</a> has been upgraded from version 2.39 to 2.40.</p>
</li>
<li><p><a href="/cperl/lib/Scalar/Util.html">Scalar::Util</a> has been upgraded from version 1.42_02 to 1.46_02.</p>
</li>
<li><p><a href="/cperl/lib/Storable.html">Storable</a> has been upgraded from version 2.56 to 2.62.</p>
<p>Fixes <a href="https://rt.perl.org/Public/Bug/Display.html?id=130098">[perl #130098]</a>.</p>
</li>
<li><p><a href="/cperl/lib/Symbol.html">Symbol</a> has been upgraded from version 1.07 to 1.08.</p>
</li>
<li><p><a href="/cperl/lib/Sys/Syslog.html">Sys::Syslog</a> has been upgraded from version 0.33 to 0.35.</p>
</li>
<li><p><a href="/cperl/lib/Term/ANSIColor.html">Term::ANSIColor</a> has been upgraded from version 4.04 to 4.06.</p>
</li>
<li><p><a href="/cperl/lib/Term/ReadLine.html">Term::ReadLine</a> has been upgraded from version 1.15 to 1.16.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/Test.html">Test</a> has been upgraded from version 1.28 to 1.30.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/Test/Harness.html">Test::Harness</a> has been upgraded from version 3.36 to 3.38.</p>
</li>
<li><p><a href="/cperl/lib/Test/Simple.html">Test::Simple</a> has been upgraded from version 1.001014 to 1.302073.</p>
</li>
<li><p><a href="/cperl/lib/Thread/Queue.html">Thread::Queue</a> has been upgraded from version 3.09 to 3.12.</p>
</li>
<li><p><a href="/cperl/lib/Thread/Semaphore.html">Thread::Semaphore</a> has been upgraded from 2.12 to 2.13.</p>
<p>Added the <code>down_timed</code> method.</p>
</li>
<li><p><a href="/cperl/lib/threads.html">threads</a> has been upgraded from version 2.07 to 2.15.</p>
</li>
<li><p><a href="/cperl/lib/threads/shared.html">threads::shared</a> has been upgraded from version 1.51 to 1.56.</p>
</li>
<li><p><a href="/cperl/lib/Tie/Hash/NamedCapture.html">Tie::Hash::NamedCapture</a> has been upgraded from version 0.09 to 0.10.</p>
</li>
<li><p><a href="/cperl/lib/Time/HiRes.html">Time::HiRes</a> has been upgraded from version 1.9733 to 1.9741.</p>
<p>It now builds on systems with C++11 compilers (such as G++ 6 and Clang++ 3.9).</p>
<p>Now uses <code>clockid_t</code>.</p>
</li>
<li><p><a href="/cperl/lib/Time/Local.html">Time::Local</a> has been upgraded from version 1.2300 to 1.25.</p>
</li>
<li><p><a href="/cperl/lib/Unicode/Collate.html">Unicode::Collate</a> has been upgraded from version 1.14 to 1.19.</p>
</li>
<li><p><a href="/cperl/lib/Unicode/UCD.html">Unicode::UCD</a> has been upgraded from version 0.64 to 0.68.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/version.html">version</a> has been upgraded from version 0.9916 to 0.9917.</p>
</li>
<li><p><a>VMS::DCLsym</a> has been upgraded from version 1.06 to 1.08.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
<li><p><a href="/cperl/lib/warnings.html">warnings</a> has been upgraded from version 1.36 to 1.37.</p>
</li>
<li><p><a href="/cperl/lib/XS/Typemap.html">XS::Typemap</a> has been upgraded from version 0.14 to 0.15.</p>
</li>
<li><p><a href="/cperl/lib/XSLoader.html">XSLoader</a> has been upgraded from version 0.21 to 0.27.</p>
<p>Fixed a security hole in which binary files could be loaded from a path outside of <a href="/cperl/perlvar.html#INC"><code>@INC</code></a>.</p>
<p>It now uses 3-arg <code>open()</code> instead of 2-arg <code>open()</code>. <a href="https://rt.perl.org/Public/Bug/Display.html?id=130122">[perl #130122]</a></p>
</li>
</ul>
<h1 id="Documentation">Documentation</h1>
<h2 id="New-Documentation">New Documentation</h2>
<h3 id="perldeprecation"><a href="/cperl/perldeprecation.html">perldeprecation</a></h3>
<p>This file documents all upcoming deprecations, and some of the deprecations which already have been removed. The purpose of this documentation is two-fold: document what will disappear, and by which version, and serve as a guide for people dealing with code which has features that no longer work after an upgrade of their perl.</p>
<h2 id="Changes-to-Existing-Documentation">Changes to Existing Documentation</h2>
<p>We have attempted to update the documentation to reflect the changes listed in this document. If you find any we have missed, send email to <a href="mailto:[email protected]">[email protected]</a>.</p>
<p>Additionally, all references to Usenet have been removed, and the following selected changes have been made:</p>
<h3 id="perlfunc"><a href="/cperl/perlfunc.html">perlfunc</a></h3>
<ul>
<li><p>Removed obsolete text about <a href="/cperl/perlfunc.html#defined"><code>defined()</code></a> on aggregates that should have been deleted earlier, when the feature was removed.</p>
</li>
<li><p>Corrected documentation of <a href="/cperl/perlfunc.html#eval"><code>eval()</code></a>, and <a href="/cperl/perlfunc.html#evalbytes"><code>evalbytes()</code></a>.</p>
</li>
<li><p>Clarified documentation of <a href="/cperl/perlfunc.html#seek"><code>seek()</code></a>, <a href="/cperl/perlfunc.html#tell"><code>tell()</code></a> and <a href="/cperl/perlfunc.html#sysseek"><code>sysseek()</code></a> emphasizing that positions are in bytes and not characters. <a href="https://rt.perl.org/Public/Bug/Display.html?id=128607">[perl #128607]</a></p>
</li>
<li><p>Clarified documentation of <a href="/cperl/perlfunc.html#sort-LIST"><code>sort()</code></a> concerning the variables <code>$a</code> and <code>$b</code>.</p>
</li>
<li><p>In <a href="/cperl/perlfunc.html#split"><code>split()</code></a> noted that certain pattern modifiers are legal, and added a caution about its use in Perls before v5.11.</p>
</li>
<li><p>Removed obsolete documentation of <a href="/cperl/perlfunc.html#study"><code>study()</code></a>, noting that it is now a no-op.</p>
</li>
<li><p>Noted that <a href="/cperl/perlfunc.html#vec"><code>vec()</code></a> doesn't work well when the string contains characters whose code points are above 255.</p>
</li>
</ul>
<h3 id="perlguts"><a href="/cperl/perlguts.html">perlguts</a></h3>
<ul>
<li><p>Added advice on <a href="/cperl/perlguts.html#Formatted-Printing-of-Size_t-and-SSize_t">formatted printing of operands of <code>Size_t</code> and <code>SSize_t</code></a></p>
</li>
</ul>
<h3 id="perlhack"><a href="/cperl/perlhack.html">perlhack</a></h3>
<ul>
<li><p>Clarify what editor tab stop rules to use, and note that we are migrating away from using tabs, replacing them with sequences of SPACE characters.</p>
</li>
</ul>
<h3 id="perlhacktips"><a href="/cperl/perlhacktips.html">perlhacktips</a></h3>
<ul>
<li><p>Give another reason to use <code>cBOOL</code> to cast an expression to boolean.</p>
</li>
<li><p>Note that the macros <code>TRUE</code> and <code>FALSE</code> are available to express boolean values.</p>
</li>
</ul>
<h3 id="perlinterp"><a href="/cperl/perlinterp.html">perlinterp</a></h3>
<ul>
<li><p><a href="/cperl/perlinterp.html">perlinterp</a> has been expanded to give a more detailed example of how to hunt around in the parser for how a given operator is handled.</p>
</li>
</ul>
<h3 id="perllocale"><a href="/cperl/perllocale.html">perllocale</a></h3>