Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perl5260delta.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "PERL5260DELTA 1"
61 .TH PERL5260DELTA 1 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 perl5260delta \- what is new for perl v5.26.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes the differences between the 5.24.0 release and the
71 5.26.0 release.
72 .SH Notice
73 .IX Header "Notice"
74 This release includes three updates with widespread effects:
75 .IP \(bu 4
76 \&\f(CW"."\fR no longer in \f(CW@INC\fR
77 .Sp
78 For security reasons, the current directory (\f(CW"."\fR) is no longer included
79 by default at the end of the module search path (\f(CW@INC\fR). This may have
80 widespread implications for the building, testing and installing of
81 modules, and for the execution of scripts. See the section
82 "Removal of the current directory (\f(CW"."\fR) from \f(CW@INC\fR"
83 for the full details.
84 .IP \(bu 4
85 \&\f(CW\*(C`do\*(C'\fR may now warn
86 .Sp
87 \&\f(CW\*(C`do\*(C'\fR now gives a deprecation warning when it fails to load a file which
88 it would have loaded had \f(CW"."\fR been in \f(CW@INC\fR.
89 .IP \(bu 4
90 In regular expression patterns, a literal left brace \f(CW"{"\fR
91 should be escaped
92 .Sp
93 See "Unescaped literal \f(CW"{"\fR characters in regular expression patterns are no longer permissible".
94 .SH "Core Enhancements"
95 .IX Header "Core Enhancements"
96 .SS "Lexical subroutines are no longer experimental"
97 .IX Subsection "Lexical subroutines are no longer experimental"
98 Using the \f(CW\*(C`lexical_subs\*(C'\fR feature introduced in v5.18 no longer emits a warning. Existing
99 code that disables the \f(CW\*(C`experimental::lexical_subs\*(C'\fR warning category
100 that the feature previously used will continue to work. The
101 \&\f(CW\*(C`lexical_subs\*(C'\fR feature has no effect; all Perl code can use lexical
102 subroutines, regardless of what feature declarations are in scope.
103 .SS "Indented Here\-documents"
104 .IX Subsection "Indented Here-documents"
105 This adds a new modifier \f(CW"~"\fR to here\-docs that tells the parser
106 that it should look for \f(CW\*(C`/^\es*$DELIM\en/\*(C'\fR as the closing delimiter.
107 .PP
108 These syntaxes are all supported:
109 .PP
110 .Vb 8
111 \& <<~EOF;
112 \& <<~\eEOF;
113 \& <<~\*(AqEOF\*(Aq;
114 \& <<~"EOF";
115 \& <<~\`EOF\`;
116 \& <<~ \*(AqEOF\*(Aq;
117 \& <<~ "EOF";
118 \& <<~ \`EOF\`;
119 .Ve
120 .PP
121 The \f(CW"~"\fR modifier will strip, from each line in the here\-doc, the
122 same whitespace that appears before the delimiter.
123 .PP
124 Newlines will be copied as\-is, and lines that don\*(Aqt include the
125 proper beginning whitespace will cause perl to croak.
126 .PP
127 For example:
128 .PP
129 .Vb 5
130 \& if (1) {
131 \& print <<~EOF;
132 \& Hello there
133 \& EOF
134 \& }
135 .Ve
136 .PP
137 prints "Hello there\en" with no leading whitespace.
138 .ie n .SS "New regular expression modifier ""/xx"""
139 .el .SS "New regular expression modifier \f(CW/xx\fP"
140 .IX Subsection "New regular expression modifier /xx"
141 Specifying two \f(CW"x"\fR characters to modify a regular expression pattern
142 does everything that a single one does, but additionally TAB and SPACE
143 characters within a bracketed character class are generally ignored and
144 can be added to improve readability, like
145 \&\f(CW\*(C`/[\ ^\ A\-Z\ d\-f\ p\-x\ ]/xx\*(C'\fR. Details are at
146 "/x and /xx" in perlre.
147 .ie n .SS """@{^CAPTURE}"", ""%{^CAPTURE}"", and ""%{^CAPTURE_ALL}"""
148 .el .SS "\f(CW@{^CAPTURE}\fP, \f(CW%{^CAPTURE}\fP, and \f(CW%{^CAPTURE_ALL}\fP"
149 .IX Subsection "@{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL}"
150 \&\f(CW\*(C`@{^CAPTURE}\*(C'\fR exposes the capture buffers of the last match as an
151 array. So \f(CW$1\fR is \f(CW\*(C`${^CAPTURE}[0]\*(C'\fR. This is a more efficient equivalent
152 to code like \f(CW\*(C`substr($matched_string,$\-[0],$+[0]\-$\-[0])\*(C'\fR, and you don\*(Aqt
153 have to keep track of the \f(CW$matched_string\fR either. This variable has no
154 single character equivalent. Note that, like the other regex magic variables,
155 the contents of this variable is dynamic; if you wish to store it beyond
156 the lifetime of the match you must copy it to another array.
157 .PP
158 \&\f(CW\*(C`%{^CAPTURE}\*(C'\fR is equivalent to \f(CW\*(C`%+\*(C'\fR (\fIi.e.\fR, named captures). Other than
159 being more self\-documenting there is no difference between the two forms.
160 .PP
161 \&\f(CW\*(C`%{^CAPTURE_ALL}\*(C'\fR is equivalent to \f(CW\*(C`%\-\*(C'\fR (\fIi.e.\fR, all named captures).
162 Other than being more self\-documenting there is no difference between the
163 two forms.
164 .SS "Declaring a reference to a variable"
165 .IX Subsection "Declaring a reference to a variable"
166 As an experimental feature, Perl now allows the referencing operator to come
167 after \f(CWmy()\fR, \f(CWstate()\fR,
168 \&\f(CWour()\fR, or \f(CWlocal()\fR. This syntax must
169 be enabled with \f(CW\*(C`use feature \*(Aqdeclared_refs\*(Aq\*(C'\fR. It is experimental, and will
170 warn by default unless \f(CW\*(C`no warnings \*(Aqexperimental::refaliasing\*(Aq\*(C'\fR is in effect.
171 It is intended mainly for use in assignments to references. For example:
172 .PP
173 .Vb 2
174 \& use experimental \*(Aqrefaliasing\*(Aq, \*(Aqdeclared_refs\*(Aq;
175 \& my \e$a = \e$b;
176 .Ve
177 .PP
178 See "Assigning to References" in perlref for more details.
179 .SS "Unicode 9.0 is now supported"
180 .IX Subsection "Unicode 9.0 is now supported"
181 A list of changes is at <http://www.unicode.org/versions/Unicode9.0.0/>.
182 Modules that are shipped with core Perl but not maintained by p5p do not
183 necessarily support Unicode 9.0. Unicode::Normalize does work on 9.0.
184 .ie n .SS "Use of ""\ep{\fIscript\fP}"" uses the improved Script_Extensions property"
185 .el .SS "Use of \f(CW\ep{\fP\f(CIscript\fP\f(CW}\fP uses the improved Script_Extensions property"
186 .IX Subsection "Use of p{script} uses the improved Script_Extensions property"
187 Unicode 6.0 introduced an improved form of the Script (\f(CW\*(C`sc\*(C'\fR) property, and
188 called it Script_Extensions (\f(CW\*(C`scx\*(C'\fR). Perl now uses this improved
189 version when a property is specified as just \f(CW\*(C`\ep{\fR\f(CIscript\fR\f(CW}\*(C'\fR. This
190 should make programs more accurate when determining if a character is
191 used in a given script, but there is a slight chance of breakage for
192 programs that very specifically needed the old behavior. The meaning of
193 compound forms, like \f(CW\*(C`\ep{sc=\fR\f(CIscript\fR\f(CW}\*(C'\fR are unchanged. See
194 "Scripts" in perlunicode.
195 .SS "Perl can now do default collation in UTF\-8 locales on platforms that support it"
196 .IX Subsection "Perl can now do default collation in UTF-8 locales on platforms that support it"
197 Some platforms natively do a reasonable job of collating and sorting in
198 UTF\-8 locales. Perl now works with those. For portability and full
199 control, Unicode::Collate is still recommended, but now you may
200 not need to do anything special to get good\-enough results, depending on
201 your application. See
202 "Category \f(CW\*(C`LC_COLLATE\*(C'\fR: Collation: Text Comparisons and Sorting" in perllocale.
203 .ie n .SS "Better locale collation of strings containing embedded ""NUL"" characters"
204 .el .SS "Better locale collation of strings containing embedded \f(CWNUL\fP characters"
205 .IX Subsection "Better locale collation of strings containing embedded NUL characters"
206 In locales that have multi\-level character weights, \f(CW\*(C`NUL\*(C'\fRs are now
207 ignored at the higher priority ones. There are still some gotchas in
208 some strings, though. See
209 "Collation of strings containing embedded \f(CW\*(C`NUL\*(C'\fR characters" in perllocale.
210 .ie n .SS """CORE"" subroutines for hash and array functions callable via reference"
211 .el .SS "\f(CWCORE\fP subroutines for hash and array functions callable via reference"
212 .IX Subsection "CORE subroutines for hash and array functions callable via reference"
213 The hash and array functions in the \f(CW\*(C`CORE\*(C'\fR namespace (\f(CW\*(C`keys\*(C'\fR, \f(CW\*(C`each\*(C'\fR,
214 \&\f(CW\*(C`values\*(C'\fR, \f(CW\*(C`push\*(C'\fR, \f(CW\*(C`pop\*(C'\fR, \f(CW\*(C`shift\*(C'\fR, \f(CW\*(C`unshift\*(C'\fR and \f(CW\*(C`splice\*(C'\fR) can now
215 be called with ampersand syntax (\f(CW\*(C`&CORE::keys(\e%hash\*(C'\fR) and via reference
216 (\f(CW\*(C`my $k = \e&CORE::keys; $k\->(\e%hash)\*(C'\fR). Previously they could only be
217 used when inlined.
218 .SS "New Hash Function For 64\-bit Builds"
219 .IX Subsection "New Hash Function For 64-bit Builds"
220 We have switched to a hybrid hash function to better balance
221 performance for short and long keys.
222 .PP
223 For short keys, 16 bytes and under, we use an optimised variant of
224 One At A Time Hard, and for longer keys we use Siphash 1\-3. For very
225 long keys this is a big improvement in performance. For shorter keys
226 there is a modest improvement.
227 .SH Security
228 .IX Header "Security"
229 .ie n .SS "Removal of the current directory (""."") from @INC"
230 .el .SS "Removal of the current directory (\f(CW"".""\fP) from \f(CW@INC\fP"
231 .IX Subsection "Removal of the current directory (""."") from @INC"
232 The perl binary includes a default set of paths in \f(CW@INC\fR. Historically
233 it has also included the current directory (\f(CW"."\fR) as the final entry,
234 unless run with taint mode enabled (\f(CW\*(C`perl \-T\*(C'\fR). While convenient, this has
235 security implications: for example, where a script attempts to load an
236 optional module when its current directory is untrusted (such as \fI/tmp\fR),
237 it could load and execute code from under that directory.
238 .PP
239 Starting with v5.26, \f(CW"."\fR is always removed by default, not just under
240 tainting. This has major implications for installing modules and executing
241 scripts.
242 .PP
243 The following new features have been added to help ameliorate these
244 issues.
245 .IP \(bu 4
246 \&\fIConfigure \-Udefault_inc_excludes_dot\fR
247 .Sp
248 There is a new \fIConfigure\fR option, \f(CW\*(C`default_inc_excludes_dot\*(C'\fR (enabled
249 by default) which builds a perl executable without \f(CW"."\fR; unsetting this
250 option using \f(CW\*(C`\-U\*(C'\fR reverts perl to the old behaviour. This may fix your
251 path issues but will reintroduce all the security concerns, so don\*(Aqt
252 build a perl executable like this unless you\*(Aqre \fIreally\fR confident that
253 such issues are not a concern in your environment.
254 .IP \(bu 4
255 \&\f(CW\*(C`PERL_USE_UNSAFE_INC\*(C'\fR
256 .Sp
257 There is a new environment variable recognised by the perl interpreter.
258 If this variable has the value 1 when the perl interpreter starts up,
259 then \f(CW"."\fR will be automatically appended to \f(CW@INC\fR (except under tainting).
260 .Sp
261 This allows you restore the old perl interpreter behaviour on a
262 case\-by\-case basis. But note that this is intended to be a temporary crutch,
263 and this feature will likely be removed in some future perl version.
264 It is currently set by the \f(CW\*(C`cpan\*(C'\fR utility and \f(CW\*(C`Test::Harness\*(C'\fR to
265 ease installation of CPAN modules which have not been updated to handle the
266 lack of dot. Once again, don\*(Aqt use this unless you are sure that this
267 will not reintroduce any security concerns.
268 .IP \(bu 4
269 A new deprecation warning issued by \f(CW\*(C`do\*(C'\fR.
270 .Sp
271 While it is well\-known that \f(CW\*(C`use\*(C'\fR and \f(CW\*(C`require\*(C'\fR use \f(CW@INC\fR to search
272 for the file to load, many people don\*(Aqt realise that \f(CW\*(C`do "file"\*(C'\fR also
273 searches \f(CW@INC\fR if the file is a relative path. With the removal of \f(CW"."\fR,
274 a simple \f(CW\*(C`do "file.pl"\*(C'\fR will fail to read in and execute \f(CW\*(C`file.pl\*(C'\fR from
275 the current directory. Since this is commonly expected behaviour, a new
276 deprecation warning is now issued whenever \f(CW\*(C`do\*(C'\fR fails to load a file which
277 it otherwise would have found if a dot had been in \f(CW@INC\fR.
278 .PP
279 Here are some things script and module authors may need to do to make
280 their software work in the new regime.
281 .IP \(bu 4
282 Script authors
283 .Sp
284 If the issue is within your own code (rather than within included
285 modules), then you have two main options. Firstly, if you are confident
286 that your script will only be run within a trusted directory (under which
287 you expect to find trusted files and modules), then add \f(CW"."\fR back into the
288 path; \fIe.g.\fR:
289 .Sp
290 .Vb 6
291 \& BEGIN {
292 \& my $dir = "/some/trusted/directory";
293 \& chdir $dir or die "Can\*(Aqt chdir to $dir: $!\en";
294 \& # safe now
295 \& push @INC, \*(Aq.\*(Aq;
296 \& }
297 \&
298 \& use "Foo::Bar"; # may load /some/trusted/directory/Foo/Bar.pm
299 \& do "config.pl"; # may load /some/trusted/directory/config.pl
300 .Ve
301 .Sp
302 On the other hand, if your script is intended to be run from within
303 untrusted directories (such as \fI/tmp\fR), then your script suddenly failing
304 to load files may be indicative of a security issue. You most likely want
305 to replace any relative paths with full paths; for example,
306 .Sp
307 .Vb 1
308 \& do "foo_config.pl"
309 .Ve
310 .Sp
311 might become
312 .Sp
313 .Vb 1
314 \& do "$ENV{HOME}/foo_config.pl"
315 .Ve
316 .Sp
317 If you are absolutely certain that you want your script to load and
318 execute a file from the current directory, then use a \f(CW\*(C`./\*(C'\fR prefix; for
319 example:
320 .Sp
321 .Vb 1
322 \& do "./foo_config.pl"
323 .Ve
324 .IP \(bu 4
325 Installing and using CPAN modules
326 .Sp
327 If you install a CPAN module using an automatic tool like \f(CW\*(C`cpan\*(C'\fR, then
328 this tool will itself set the \f(CW\*(C`PERL_USE_UNSAFE_INC\*(C'\fR environment variable
329 while building and testing the module, which may be sufficient to install
330 a distribution which hasn\*(Aqt been updated to be dot\-aware. If you want to
331 install such a module manually, then you\*(Aqll need to replace the
332 traditional invocation:
333 .Sp
334 .Vb 1
335 \& perl Makefile.PL && make && make test && make install
336 .Ve
337 .Sp
338 with something like
339 .Sp
340 .Vb 2
341 \& (export PERL_USE_UNSAFE_INC=1; \e
342 \& perl Makefile.PL && make && make test && make install)
343 .Ve
344 .Sp
345 Note that this only helps build and install an unfixed module. It\*(Aqs
346 possible for the tests to pass (since they were run under
347 \&\f(CW\*(C`PERL_USE_UNSAFE_INC=1\*(C'\fR), but for the module itself to fail to perform
348 correctly in production. In this case, you may have to temporarily modify
349 your script until a fixed version of the module is released.
350 For example:
351 .Sp
352 .Vb 6
353 \& use Foo::Bar;
354 \& {
355 \& local @INC = (@INC, \*(Aq.\*(Aq);
356 \& # assuming read_config() needs \*(Aq.\*(Aq in @INC
357 \& $config = Foo::Bar\->read_config();
358 \& }
359 .Ve
360 .Sp
361 This is only rarely expected to be necessary. Again, if doing this,
362 assess the resultant risks first.
363 .IP \(bu 4
364 Module Authors
365 .Sp
366 If you maintain a CPAN distribution, it may need updating to run in
367 a dotless environment. Although \f(CW\*(C`cpan\*(C'\fR and other such tools will
368 currently set the \f(CW\*(C`PERL_USE_UNSAFE_INC\*(C'\fR during module build, this is a
369 temporary workaround for the set of modules which rely on \f(CW"."\fR being in
370 \&\f(CW@INC\fR for installation and testing, and this may mask deeper issues. It
371 could result in a module which passes tests and installs, but which
372 fails at run time.
373 .Sp
374 During build, test, and install, it will normally be the case that any perl
375 processes will be executing directly within the root directory of the
376 untarred distribution, or a known subdirectory of that, such as \fIt/\fR. It
377 may well be that \fIMakefile.PL\fR or \fIt/foo.t\fR will attempt to include
378 local modules and configuration files using their direct relative
379 filenames, which will now fail.
380 .Sp
381 However, as described above, automatic tools like \fIcpan\fR will (for now)
382 set the \f(CW\*(C`PERL_USE_UNSAFE_INC\*(C'\fR environment variable, which introduces
383 dot during a build.
384 .Sp
385 This makes it likely that your existing build and test code will work, but
386 this may mask issues with your code which only manifest when used after
387 install. It is prudent to try and run your build process with that
388 variable explicitly disabled:
389 .Sp
390 .Vb 2
391 \& (export PERL_USE_UNSAFE_INC=0; \e
392 \& perl Makefile.PL && make && make test && make install)
393 .Ve
394 .Sp
395 This is more likely to show up any potential problems with your module\*(Aqs
396 build process, or even with the module itself. Fixing such issues will
397 ensure both that your module can again be installed manually, and that
398 it will still build once the \f(CW\*(C`PERL_USE_UNSAFE_INC\*(C'\fR crutch goes away.
399 .Sp
400 When fixing issues in tests due to the removal of dot from \f(CW@INC\fR,
401 reinsertion of dot into \f(CW@INC\fR should be performed with caution, for this
402 too may suppress real errors in your runtime code. You are encouraged
403 wherever possible to apply the aforementioned approaches with explicit
404 absolute/relative paths, or to relocate your needed files into a
405 subdirectory and insert that subdirectory into \f(CW@INC\fR instead.
406 .Sp
407 If your runtime code has problems under the dotless \f(CW@INC\fR, then the comments
408 above on how to fix for script authors will mostly apply here too. Bear in
409 mind though that it is considered bad form for a module to globally add a dot to
410 \&\f(CW@INC\fR, since it introduces both a security risk and hides issues of
411 accidentally requiring dot in \f(CW@INC\fR, as explained above.
412 .SS "Escaped colons and relative paths in PATH"
413 .IX Subsection "Escaped colons and relative paths in PATH"
414 On Unix systems, Perl treats any relative paths in the \f(CW\*(C`PATH\*(C'\fR environment
415 variable as tainted when starting a new process. Previously, it was
416 allowing a backslash to escape a colon (unlike the OS), consequently
417 allowing relative paths to be considered safe if the PATH was set to
418 something like \f(CW\*(C`/\e:.\*(C'\fR. The check has been fixed to treat \f(CW"."\fR as tainted
419 in that example.
420 .ie n .SS "New ""\-Di"" switch is now required for PerlIO debugging output"
421 .el .SS "New \f(CW\-Di\fP switch is now required for PerlIO debugging output"
422 .IX Subsection "New -Di switch is now required for PerlIO debugging output"
423 This is used for debugging of code within PerlIO to avoid recursive
424 calls. Previously this output would be sent to the file specified
425 by the \f(CW\*(C`PERLIO_DEBUG\*(C'\fR environment variable if perl wasn\*(Aqt running
426 setuid and the \f(CW\*(C`\-T\*(C'\fR or \f(CW\*(C`\-t\*(C'\fR switches hadn\*(Aqt been parsed yet.
427 .PP
428 If perl performed output at a point where it hadn\*(Aqt yet parsed its
429 switches this could result in perl creating or overwriting the file
430 named by \f(CW\*(C`PERLIO_DEBUG\*(C'\fR even when the \f(CW\*(C`\-T\*(C'\fR switch had been supplied.
431 .PP
432 Perl now requires the \f(CW\*(C`\-Di\*(C'\fR switch to be present before it will produce
433 PerlIO debugging
434 output. By default this is written to \f(CW\*(C`stderr\*(C'\fR, but can optionally
435 be redirected to a file by setting the \f(CW\*(C`PERLIO_DEBUG\*(C'\fR environment
436 variable.
437 .PP
438 If perl is running setuid or the \f(CW\*(C`\-T\*(C'\fR switch was supplied,
439 \&\f(CW\*(C`PERLIO_DEBUG\*(C'\fR is ignored and the debugging output is sent to
440 \&\f(CW\*(C`stderr\*(C'\fR as for any other \f(CW\*(C`\-D\*(C'\fR switch.
441 .SH "Incompatible Changes"
442 .IX Header "Incompatible Changes"
443 .ie n .SS "Unescaped literal ""{"" characters in regular expression patterns are no longer permissible"
444 .el .SS "Unescaped literal \f(CW""{""\fP characters in regular expression patterns are no longer permissible"
445 .IX Subsection "Unescaped literal ""{"" characters in regular expression patterns are no longer permissible"
446 You have to now say something like \f(CW"\e{"\fR or \f(CW"[{]"\fR to specify to
447 match a LEFT CURLY BRACKET; otherwise, it is a fatal pattern compilation
448 error. This change will allow future extensions to the language.
449 .PP
450 These have been deprecated since v5.16, with a deprecation message
451 raised for some uses starting in v5.22. Unfortunately, the code added
452 to raise the message was buggy and failed to warn in some cases where
453 it should have. Therefore, enforcement of this ban for these cases is
454 deferred until Perl 5.30, but the code has been fixed to raise a
455 default\-on deprecation message for them in the meantime.
456 .PP
457 Some uses of literal \f(CW"{"\fR occur in contexts where we do not foresee
458 the meaning ever being anything but the literal, such as the very first
459 character in the pattern, or after a \f(CW"|"\fR meaning alternation. Thus
460 .PP
461 .Vb 1
462 \& qr/{fee|{fie/
463 .Ve
464 .PP
465 matches either of the strings \f(CW\*(C`{fee\*(C'\fR or \f(CW\*(C`{fie\*(C'\fR. To avoid forcing
466 unnecessary code changes, these uses do not need to be escaped, and no
467 warning is raised about them, and there are no current plans to change this.
468 .PP
469 But it is always correct to escape \f(CW"{"\fR, and the simple rule to
470 remember is to always do so.
471 .PP
472 See Unescaped left brace in regex is illegal here.
473 .ie n .SS "scalar(%hash) return signature changed"
474 .el .SS "\f(CWscalar(%hash)\fP return signature changed"
475 .IX Subsection "scalar(%hash) return signature changed"
476 The value returned for \f(CWscalar(%hash)\fR will no longer show information about
477 the buckets allocated in the hash. It will simply return the count of used
478 keys. It is thus equivalent to \f(CW\*(C`0+keys(%hash)\*(C'\fR.
479 .PP
480 A form of backward compatibility is provided via
481 \&\f(CWHash::Util::bucket_ratio()\fR which provides
482 the same behavior as
483 \&\f(CWscalar(%hash)\fR provided in Perl 5.24 and earlier.
484 .ie n .SS """keys"" returned from an lvalue subroutine"
485 .el .SS "\f(CWkeys\fP returned from an lvalue subroutine"
486 .IX Subsection "keys returned from an lvalue subroutine"
487 \&\f(CW\*(C`keys\*(C'\fR returned from an lvalue subroutine can no longer be assigned
488 to in list context.
489 .PP
490 .Vb 4
491 \& sub foo : lvalue { keys(%INC) }
492 \& (foo) = 3; # death
493 \& sub bar : lvalue { keys(@_) }
494 \& (bar) = 3; # also an error
495 .Ve
496 .PP
497 This makes the lvalue sub case consistent with \f(CW\*(C`(keys %hash) = ...\*(C'\fR and
498 \&\f(CW\*(C`(keys @_) = ...\*(C'\fR, which are also errors.
499 [GH #15339] <https://github.com/Perl/perl5/issues/15339>
500 .ie n .SS "The ""${^ENCODING}"" facility has been removed"
501 .el .SS "The \f(CW${^ENCODING}\fP facility has been removed"
502 .IX Subsection "The ${^ENCODING} facility has been removed"
503 The special behaviour associated with assigning a value to this variable
504 has been removed. As a consequence, the encoding pragma\*(Aqs default mode
505 is no longer supported. If
506 you still need to write your source code in encodings other than UTF\-8, use a
507 source filter such as Filter::Encoding on CPAN or encoding\*(Aqs \f(CW\*(C`Filter\*(C'\fR
508 option.
509 .ie n .SS "POSIX::tmpnam() has been removed"
510 .el .SS "\f(CWPOSIX::tmpnam()\fP has been removed"
511 .IX Subsection "POSIX::tmpnam() has been removed"
512 The fundamentally unsafe \f(CWtmpnam()\fR interface was deprecated in
513 Perl 5.22 and has now been removed. In its place, you can use,
514 for example, the File::Temp interfaces.
515 .SS "require ::Foo::Bar is now illegal"
516 .IX Subsection "require ::Foo::Bar is now illegal"
517 Formerly, \f(CW\*(C`require ::Foo::Bar\*(C'\fR would try to read \fI/Foo/Bar.pm\fR. Now any
518 bareword require which starts with a double colon dies instead.
519 .SS "Literal control character variable names are no longer permissible"
520 .IX Subsection "Literal control character variable names are no longer permissible"
521 A variable name may no longer contain a literal control character under
522 any circumstances. These previously were allowed in single\-character
523 names on ASCII platforms, but have been deprecated there since Perl
524 5.20. This affects things like \f(CW\*(C`$\fR\f(CI\ecT\fR\f(CW\*(C'\fR, where \fI\ecT\fR is a literal
525 control (such as a \f(CW\*(C`NAK\*(C'\fR or \f(CW\*(C`NEGATIVE ACKNOWLEDGE\*(C'\fR character) in the
526 source code.
527 .ie n .SS """NBSP"" is no longer permissible in ""\eN{...}"""
528 .el .SS "\f(CWNBSP\fP is no longer permissible in \f(CW\eN{...}\fP"
529 .IX Subsection "NBSP is no longer permissible in N{...}"
530 The name of a character may no longer contain non\-breaking spaces. It
531 has been deprecated to do so since Perl 5.22.
532 .SH Deprecations
533 .IX Header "Deprecations"
534 .SS "String delimiters that aren\*(Aqt stand\-alone graphemes are now deprecated"
535 .IX Subsection "String delimiters that aren't stand-alone graphemes are now deprecated"
536 For Perl to eventually allow string delimiters to be Unicode
537 grapheme clusters (which look like a single character, but may be
538 a sequence of several ones), we have to stop allowing a single character
539 delimiter that isn\*(Aqt a grapheme by itself. These are unlikely to exist
540 in actual code, as they would typically display as attached to the
541 character in front of them.
542 .ie n .SS """\ec\fIX\fP"" that maps to a printable is no longer deprecated"
543 .el .SS "\f(CW\ec\fP\f(CIX\fP\f(CW\fP that maps to a printable is no longer deprecated"
544 .IX Subsection "cX that maps to a printable is no longer deprecated"
545 This means we have no plans to remove this feature. It still raises a
546 warning, but only if syntax warnings are enabled. The feature was
547 originally intended to be a way to express non\-printable characters that
548 don\*(Aqt have a mnemonic (\f(CW\*(C`\et\*(C'\fR and \f(CW\*(C`\en\*(C'\fR are mnemonics for two
549 non\-printable characters, but most non\-printables don\*(Aqt have a
550 mnemonic.) But the feature can be used to specify a few printable
551 characters, though those are more clearly expressed as the printable
552 itself. See
553 <http://www.nntp.perl.org/group/perl.perl5.porters/2017/02/msg242944.html>.
554 .SH "Performance Enhancements"
555 .IX Header "Performance Enhancements"
556 .IP \(bu 4
557 A hash in boolean context is now sometimes faster, \fIe.g.\fR
558 .Sp
559 .Vb 1
560 \& if (!%h) { ... }
561 .Ve
562 .Sp
563 This was already special\-cased, but some cases were missed (such as
564 \&\f(CW\*(C`grep %$_, @AoH\*(C'\fR), and even the ones which weren\*(Aqt have been improved.
565 .IP \(bu 4
566 New Faster Hash Function on 64 bit builds
567 .Sp
568 We use a different hash function for short and long keys. This should
569 improve performance and security, especially for long keys.
570 .IP \(bu 4
571 readline is faster
572 .Sp
573 Reading from a file line\-by\-line with \f(CWreadline()\fR or \f(CW\*(C`<>\*(C'\fR should
574 now typically be faster due to a better implementation of the code that
575 searches for the next newline character.
576 .IP \(bu 4
577 Assigning one reference to another, \fIe.g.\fR \f(CW\*(C`$ref1 = $ref2\*(C'\fR has been
578 optimized in some cases.
579 .IP \(bu 4
580 Remove some exceptions to creating Copy\-on\-Write strings. The string
581 buffer growth algorithm has been slightly altered so that you\*(Aqre less
582 likely to encounter a string which can\*(Aqt be COWed.
583 .IP \(bu 4
584 Better optimise array and hash assignment: where an array or hash appears
585 in the LHS of a list assignment, such as \f(CW\*(C`(..., @a) = (...);\*(C'\fR, it\*(Aqs
586 likely to be considerably faster, especially if it involves emptying the
587 array/hash. For example, this code runs about a third faster compared to
588 Perl 5.24.0:
589 .Sp
590 .Vb 5
591 \& my @a;
592 \& for my $i (1..10_000_000) {
593 \& @a = (1,2,3);
594 \& @a = ();
595 \& }
596 .Ve
597 .IP \(bu 4
598 Converting a single\-digit string to a number is now substantially faster.
599 .IP \(bu 4
600 The \f(CW\*(C`split\*(C'\fR builtin is now slightly faster in many cases: in particular
601 for the two specially\-handled forms
602 .Sp
603 .Vb 2
604 \& my @a = split ...;
605 \& local @a = split ...;
606 .Ve
607 .IP \(bu 4
608 The rather slow implementation for the experimental subroutine signatures
609 feature has been made much faster; it is now comparable in speed with the
610 traditional \f(CW\*(C`my ($a, $b, @c) = @_\*(C'\fR.
611 .IP \(bu 4
612 Bareword constant strings are now permitted to take part in constant
613 folding. They were originally exempted from constant folding in August 1999,
614 during the development of Perl 5.6, to ensure that \f(CW\*(C`use strict "subs"\*(C'\fR
615 would still apply to bareword constants. That has now been accomplished a
616 different way, so barewords, like other constants, now gain the performance
617 benefits of constant folding.
618 .Sp
619 This also means that void\-context warnings on constant expressions of
620 barewords now report the folded constant operand, rather than the operation;
621 this matches the behaviour for non\-bareword constants.
622 .SH "Modules and Pragmata"
623 .IX Header "Modules and Pragmata"
624 .SS "Updated Modules and Pragmata"
625 .IX Subsection "Updated Modules and Pragmata"
626 .IP \(bu 4
627 IO::Compress has been upgraded from version 2.069 to 2.074.
628 .IP \(bu 4
629 Archive::Tar has been upgraded from version 2.04 to 2.24.
630 .IP \(bu 4
631 arybase has been upgraded from version 0.11 to 0.12.
632 .IP \(bu 4
633 attributes has been upgraded from version 0.27 to 0.29.
634 .Sp
635 The deprecation message for the \f(CW\*(C`:unique\*(C'\fR and \f(CW\*(C`:locked\*(C'\fR attributes
636 now mention that they will disappear in Perl 5.28.
637 .IP \(bu 4
638 B has been upgraded from version 1.62 to 1.68.
639 .IP \(bu 4
640 B::Concise has been upgraded from version 0.996 to 0.999.
641 .Sp
642 Its output is now more descriptive for \f(CW\*(C`op_private\*(C'\fR flags.
643 .IP \(bu 4
644 B::Debug has been upgraded from version 1.23 to 1.24.
645 .IP \(bu 4
646 B::Deparse has been upgraded from version 1.37 to 1.40.
647 .IP \(bu 4
648 B::Xref has been upgraded from version 1.05 to 1.06.
649 .Sp
650 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
651 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
652 .IP \(bu 4
653 base has been upgraded from version 2.23 to 2.25.
654 .IP \(bu 4
655 bignum has been upgraded from version 0.42 to 0.47.
656 .IP \(bu 4
657 Carp has been upgraded from version 1.40 to 1.42.
658 .IP \(bu 4
659 charnames has been upgraded from version 1.43 to 1.44.
660 .IP \(bu 4
661 Compress::Raw::Bzip2 has been upgraded from version 2.069 to 2.074.
662 .IP \(bu 4
663 Compress::Raw::Zlib has been upgraded from version 2.069 to 2.074.
664 .IP \(bu 4
665 Config::Perl::V has been upgraded from version 0.25 to 0.28.
666 .IP \(bu 4
667 CPAN has been upgraded from version 2.11 to 2.18.
668 .IP \(bu 4
669 CPAN::Meta has been upgraded from version 2.150005 to 2.150010.
670 .IP \(bu 4
671 Data::Dumper has been upgraded from version 2.160 to 2.167.
672 .Sp
673 The XS implementation now supports Deparse.
674 .IP \(bu 4
675 DB_File has been upgraded from version 1.835 to 1.840.
676 .IP \(bu 4
677 Devel::Peek has been upgraded from version 1.23 to 1.26.
678 .IP \(bu 4
679 Devel::PPPort has been upgraded from version 3.32 to 3.35.
680 .IP \(bu 4
681 Devel::SelfStubber has been upgraded from version 1.05 to 1.06.
682 .Sp
683 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
684 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
685 .IP \(bu 4
686 diagnostics has been upgraded from version 1.34 to 1.36.
687 .Sp
688 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
689 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
690 .IP \(bu 4
691 Digest has been upgraded from version 1.17 to 1.17_01.
692 .IP \(bu 4
693 Digest::MD5 has been upgraded from version 2.54 to 2.55.
694 .IP \(bu 4
695 Digest::SHA has been upgraded from version 5.95 to 5.96.
696 .IP \(bu 4
697 DynaLoader has been upgraded from version 1.38 to 1.42.
698 .IP \(bu 4
699 Encode has been upgraded from version 2.80 to 2.88.
700 .IP \(bu 4
701 encoding has been upgraded from version 2.17 to 2.19.
702 .Sp
703 This module\*(Aqs default mode is no longer supported. It now
704 dies when imported, unless the \f(CW\*(C`Filter\*(C'\fR option is being used.
705 .IP \(bu 4
706 encoding::warnings has been upgraded from version 0.12 to 0.13.
707 .Sp
708 This module is no longer supported. It emits a warning to
709 that effect and then does nothing.
710 .IP \(bu 4
711 Errno has been upgraded from version 1.25 to 1.28.
712 .Sp
713 It now documents that using \f(CW\*(C`%!\*(C'\fR automatically loads Errno for you.
714 .Sp
715 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
716 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
717 .IP \(bu 4
718 ExtUtils::Embed has been upgraded from version 1.33 to 1.34.
719 .Sp
720 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
721 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
722 .IP \(bu 4
723 ExtUtils::MakeMaker has been upgraded from version 7.10_01 to 7.24.
724 .IP \(bu 4
725 ExtUtils::Miniperl has been upgraded from version 1.05 to 1.06.
726 .IP \(bu 4
727 ExtUtils::ParseXS has been upgraded from version 3.31 to 3.34.
728 .IP \(bu 4
729 ExtUtils::Typemaps has been upgraded from version 3.31 to 3.34.
730 .IP \(bu 4
731 feature has been upgraded from version 1.42 to 1.47.
732 .IP \(bu 4
733 File::Copy has been upgraded from version 2.31 to 2.32.
734 .IP \(bu 4
735 File::Fetch has been upgraded from version 0.48 to 0.52.
736 .IP \(bu 4
737 File::Glob has been upgraded from version 1.26 to 1.28.
738 .Sp
739 It now Issues a deprecation message for \f(CWFile::Glob::glob()\fR.
740 .IP \(bu 4
741 File::Spec has been upgraded from version 3.63 to 3.67.
742 .IP \(bu 4
743 FileHandle has been upgraded from version 2.02 to 2.03.
744 .IP \(bu 4
745 Filter::Simple has been upgraded from version 0.92 to 0.93.
746 .Sp
747 It no longer treats \f(CW\*(C`no MyFilter\*(C'\fR immediately following \f(CW\*(C`use MyFilter\*(C'\fR as
748 end\-of\-file.
749 [GH #11853] <https://github.com/Perl/perl5/issues/11853>
750 .IP \(bu 4
751 Getopt::Long has been upgraded from version 2.48 to 2.49.
752 .IP \(bu 4
753 Getopt::Std has been upgraded from version 1.11 to 1.12.
754 .IP \(bu 4
755 Hash::Util has been upgraded from version 0.19 to 0.22.
756 .IP \(bu 4
757 HTTP::Tiny has been upgraded from version 0.056 to 0.070.
758 .Sp
759 Internal 599\-series errors now include the redirect history.
760 .IP \(bu 4
761 I18N::LangTags has been upgraded from version 0.40 to 0.42.
762 .Sp
763 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
764 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
765 .IP \(bu 4
766 IO has been upgraded from version 1.36 to 1.38.
767 .IP \(bu 4
768 IO::Socket::IP has been upgraded from version 0.37 to 0.38.
769 .IP \(bu 4
770 IPC::Cmd has been upgraded from version 0.92 to 0.96.
771 .IP \(bu 4
772 IPC::SysV has been upgraded from version 2.06_01 to 2.07.
773 .IP \(bu 4
774 JSON::PP has been upgraded from version 2.27300 to 2.27400_02.
775 .IP \(bu 4
776 lib has been upgraded from version 0.63 to 0.64.
777 .Sp
778 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
779 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
780 .IP \(bu 4
781 List::Util has been upgraded from version 1.42_02 to 1.46_02.
782 .IP \(bu 4
783 Locale::Codes has been upgraded from version 3.37 to 3.42.
784 .IP \(bu 4
785 Locale::Maketext has been upgraded from version 1.26 to 1.28.
786 .IP \(bu 4
787 Locale::Maketext::Simple has been upgraded from version 0.21 to 0.21_01.
788 .IP \(bu 4
789 Math::BigInt has been upgraded from version 1.999715 to 1.999806.
790 .IP \(bu 4
791 Math::BigInt::FastCalc has been upgraded from version 0.40 to 0.5005.
792 .IP \(bu 4
793 Math::BigRat has been upgraded from version 0.260802 to 0.2611.
794 .IP \(bu 4
795 Math::Complex has been upgraded from version 1.59 to 1.5901.
796 .IP \(bu 4
797 Memoize has been upgraded from version 1.03 to 1.03_01.
798 .IP \(bu 4
799 Module::CoreList has been upgraded from version 5.20170420 to 5.20170530.
800 .IP \(bu 4
801 Module::Load::Conditional has been upgraded from version 0.64 to 0.68.
802 .IP \(bu 4
803 Module::Metadata has been upgraded from version 1.000031 to 1.000033.
804 .IP \(bu 4
805 mro has been upgraded from version 1.18 to 1.20.
806 .IP \(bu 4
807 Net::Ping has been upgraded from version 2.43 to 2.55.
808 .Sp
809 IPv6 addresses and \f(CW\*(C`AF_INET6\*(C'\fR sockets are now supported, along with several
810 other enhancements.
811 .IP \(bu 4
812 NEXT has been upgraded from version 0.65 to 0.67.
813 .IP \(bu 4
814 Opcode has been upgraded from version 1.34 to 1.39.
815 .IP \(bu 4
816 open has been upgraded from version 1.10 to 1.11.
817 .IP \(bu 4
818 OS2::Process has been upgraded from version 1.11 to 1.12.
819 .Sp
820 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
821 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
822 .IP \(bu 4
823 overload has been upgraded from version 1.26 to 1.28.
824 .Sp
825 Its compilation speed has been improved slightly.
826 .IP \(bu 4
827 parent has been upgraded from version 0.234 to 0.236.
828 .IP \(bu 4
829 perl5db.pl has been upgraded from version 1.50 to 1.51.
830 .Sp
831 It now ignores \fI/dev/tty\fR on non\-Unix systems.
832 [GH #12244] <https://github.com/Perl/perl5/issues/12244>
833 .IP \(bu 4
834 Perl::OSType has been upgraded from version 1.009 to 1.010.
835 .IP \(bu 4
836 perlfaq has been upgraded from version 5.021010 to 5.021011.
837 .IP \(bu 4
838 PerlIO has been upgraded from version 1.09 to 1.10.
839 .IP \(bu 4
840 PerlIO::encoding has been upgraded from version 0.24 to 0.25.
841 .IP \(bu 4
842 PerlIO::scalar has been upgraded from version 0.24 to 0.26.
843 .IP \(bu 4
844 Pod::Checker has been upgraded from version 1.60 to 1.73.
845 .IP \(bu 4
846 Pod::Functions has been upgraded from version 1.10 to 1.11.
847 .IP \(bu 4
848 Pod::Html has been upgraded from version 1.22 to 1.2202.
849 .IP \(bu 4
850 Pod::Perldoc has been upgraded from version 3.25_02 to 3.28.
851 .IP \(bu 4
852 Pod::Simple has been upgraded from version 3.32 to 3.35.
853 .IP \(bu 4
854 Pod::Usage has been upgraded from version 1.68 to 1.69.
855 .IP \(bu 4
856 POSIX has been upgraded from version 1.65 to 1.76.
857 .Sp
858 This remedies several defects in making its symbols exportable.
859 [GH #15260] <https://github.com/Perl/perl5/issues/15260>
860 .Sp
861 The \f(CWPOSIX::tmpnam()\fR interface has been removed,
862 see "\fBPOSIX::tmpnam()\fR has been removed".
863 .Sp
864 The following deprecated functions have been removed:
865 .Sp
866 .Vb 10
867 \& POSIX::isalnum
868 \& POSIX::isalpha
869 \& POSIX::iscntrl
870 \& POSIX::isdigit
871 \& POSIX::isgraph
872 \& POSIX::islower
873 \& POSIX::isprint
874 \& POSIX::ispunct
875 \& POSIX::isspace
876 \& POSIX::isupper
877 \& POSIX::isxdigit
878 \& POSIX::tolower
879 \& POSIX::toupper
880 .Ve
881 .Sp
882 Trying to import POSIX subs that have no real implementations
883 (like \f(CWPOSIX::atend()\fR) now fails at import time, instead of
884 waiting until runtime.
885 .IP \(bu 4
886 re has been upgraded from version 0.32 to 0.34
887 .Sp
888 This adds support for the new \f(CW\*(C`/xx\*(C'\fR
889 regular expression pattern modifier, and a change to the \f(CWuse\ re\ \*(Aqstrict\*(Aq\fR experimental feature. When \f(CWre\ \*(Aqstrict\*(Aq\fR is enabled, a warning now will be generated for all
890 unescaped uses of the two characters \f(CW"}"\fR and \f(CW"]"\fR in regular
891 expression patterns (outside bracketed character classes) that are taken
892 literally. This brings them more in line with the \f(CW")"\fR character which
893 is always a metacharacter unless escaped. Being a metacharacter only
894 sometimes, depending on an action at a distance, can lead to silently
895 having the pattern mean something quite different than was intended,
896 which the \f(CW\*(C`re\ \*(Aqstrict\*(Aq\*(C'\fR mode is intended to minimize.
897 .IP \(bu 4
898 Safe has been upgraded from version 2.39 to 2.40.
899 .IP \(bu 4
900 Scalar::Util has been upgraded from version 1.42_02 to 1.46_02.
901 .IP \(bu 4
902 Storable has been upgraded from version 2.56 to 2.62.
903 .Sp
904 Fixes
905 [GH #15714] <https://github.com/Perl/perl5/issues/15714>.
906 .IP \(bu 4
907 Symbol has been upgraded from version 1.07 to 1.08.
908 .IP \(bu 4
909 Sys::Syslog has been upgraded from version 0.33 to 0.35.
910 .IP \(bu 4
911 Term::ANSIColor has been upgraded from version 4.04 to 4.06.
912 .IP \(bu 4
913 Term::ReadLine has been upgraded from version 1.15 to 1.16.
914 .Sp
915 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
916 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
917 .IP \(bu 4
918 Test has been upgraded from version 1.28 to 1.30.
919 .Sp
920 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
921 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
922 .IP \(bu 4
923 Test::Harness has been upgraded from version 3.36 to 3.38.
924 .IP \(bu 4
925 Test::Simple has been upgraded from version 1.001014 to 1.302073.
926 .IP \(bu 4
927 Thread::Queue has been upgraded from version 3.09 to 3.12.
928 .IP \(bu 4
929 Thread::Semaphore has been upgraded from 2.12 to 2.13.
930 .Sp
931 Added the \f(CW\*(C`down_timed\*(C'\fR method.
932 .IP \(bu 4
933 threads has been upgraded from version 2.07 to 2.15.
934 .IP \(bu 4
935 threads::shared has been upgraded from version 1.51 to 1.56.
936 .IP \(bu 4
937 Tie::Hash::NamedCapture has been upgraded from version 0.09 to 0.10.
938 .IP \(bu 4
939 Time::HiRes has been upgraded from version 1.9733 to 1.9741.
940 .Sp
941 It now builds on systems with C++11 compilers (such as G++ 6 and Clang++
942 3.9).
943 .Sp
944 Now uses \f(CW\*(C`clockid_t\*(C'\fR.
945 .IP \(bu 4
946 Time::Local has been upgraded from version 1.2300 to 1.25.
947 .IP \(bu 4
948 Unicode::Collate has been upgraded from version 1.14 to 1.19.
949 .IP \(bu 4
950 Unicode::UCD has been upgraded from version 0.64 to 0.68.
951 .Sp
952 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
953 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
954 .IP \(bu 4
955 version has been upgraded from version 0.9916 to 0.9917.
956 .IP \(bu 4
957 VMS::DCLsym has been upgraded from version 1.06 to 1.08.
958 .Sp
959 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
960 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
961 .IP \(bu 4
962 warnings has been upgraded from version 1.36 to 1.37.
963 .IP \(bu 4
964 XS::Typemap has been upgraded from version 0.14 to 0.15.
965 .IP \(bu 4
966 XSLoader has been upgraded from version 0.21 to 0.27.
967 .Sp
968 Fixed a security hole in which binary files could be loaded from a path
969 outside of \f(CW@INC\fR.
970 .Sp
971 It now uses 3\-arg \f(CWopen()\fR instead of 2\-arg \f(CWopen()\fR.
972 [GH #15721] <https://github.com/Perl/perl5/issues/15721>
973 .SH Documentation
974 .IX Header "Documentation"
975 .SS "New Documentation"
976 .IX Subsection "New Documentation"
977 \fIperldeprecation\fR
978 .IX Subsection "perldeprecation"
979 .PP
980 This file documents all upcoming deprecations, and some of the deprecations
981 which already have been removed. The purpose of this documentation is
982 two\-fold: document what will disappear, and by which version, and serve
983 as a guide for people dealing with code which has features that no longer
984 work after an upgrade of their perl.
985 .SS "Changes to Existing Documentation"
986 .IX Subsection "Changes to Existing Documentation"
987 We have attempted to update the documentation to reflect the changes
988 listed in this document. If you find any we have missed, send email to
989 [email protected] <mailto:[email protected]>.
990 .PP
991 Additionally, all references to Usenet have been removed, and the
992 following selected changes have been made:
993 .PP
994 \fIperlfunc\fR
995 .IX Subsection "perlfunc"
996 .IP \(bu 4
997 Removed obsolete text about \f(CWdefined()\fR
998 on aggregates that should have been deleted earlier, when the feature
999 was removed.
1000 .IP \(bu 4
1001 Corrected documentation of \f(CWeval()\fR,
1002 and \f(CWevalbytes()\fR.
1003 .IP \(bu 4
1004 Clarified documentation of \f(CWseek()\fR,
1005 \&\f(CWtell()\fR and \f(CWsysseek()\fR
1006 emphasizing that positions are in bytes and not characters.
1007 [GH #15438] <https://github.com/Perl/perl5/issues/15438>
1008 .IP \(bu 4
1009 Clarified documentation of \f(CWsort()\fR concerning
1010 the variables \f(CW$a\fR and \f(CW$b\fR.
1011 .IP \(bu 4
1012 In \f(CWsplit()\fR noted that certain pattern modifiers are
1013 legal, and added a caution about its use in Perls before v5.11.
1014 .IP \(bu 4
1015 Removed obsolete documentation of \f(CWstudy()\fR, noting
1016 that it is now a no\-op.
1017 .IP \(bu 4
1018 Noted that \f(CWvec()\fR doesn\*(Aqt work well when the string
1019 contains characters whose code points are above 255.
1020 .PP
1021 \fIperlguts\fR
1022 .IX Subsection "perlguts"
1023 .IP \(bu 4
1024 Added advice on
1025 formatted printing of operands of \f(CW\*(C`Size_t\*(C'\fR and \f(CW\*(C`SSize_t\*(C'\fR
1026 .PP
1027 \fIperlhack\fR
1028 .IX Subsection "perlhack"
1029 .IP \(bu 4
1030 Clarify what editor tab stop rules to use, and note that we are
1031 migrating away from using tabs, replacing them with sequences of SPACE
1032 characters.
1033 .PP
1034 \fIperlhacktips\fR
1035 .IX Subsection "perlhacktips"
1036 .IP \(bu 4
1037 Give another reason to use \f(CW\*(C`cBOOL\*(C'\fR to cast an expression to boolean.
1038 .IP \(bu 4
1039 Note that the macros \f(CW\*(C`TRUE\*(C'\fR and \f(CW\*(C`FALSE\*(C'\fR are available to express
1040 boolean values.
1041 .PP
1042 \fIperlinterp\fR
1043 .IX Subsection "perlinterp"
1044 .IP \(bu 4
1045 perlinterp has been expanded to give a more detailed example of how to
1046 hunt around in the parser for how a given operator is handled.
1047 .PP
1048 \fIperllocale\fR
1049 .IX Subsection "perllocale"
1050 .IP \(bu 4
1051 Some locales aren\*(Aqt compatible with Perl. Note that these can cause
1052 core dumps.
1053 .PP
1054 \fIperlmod\fR
1055 .IX Subsection "perlmod"
1056 .IP \(bu 4
1057 Various clarifications have been added.
1058 .PP
1059 \fIperlmodlib\fR
1060 .IX Subsection "perlmodlib"
1061 .IP \(bu 4
1062 Updated the site mirror list.
1063 .PP
1064 \fIperlobj\fR
1065 .IX Subsection "perlobj"
1066 .IP \(bu 4
1067 Added a section on calling methods using their fully qualified names.
1068 .IP \(bu 4
1069 Do not discourage manual \f(CW@ISA\fR.
1070 .PP
1071 \fIperlootut\fR
1072 .IX Subsection "perlootut"
1073 .IP \(bu 4
1074 Mention \f(CW\*(C`Moo\*(C'\fR more.
1075 .PP
1076 \fIperlop\fR
1077 .IX Subsection "perlop"
1078 .IP \(bu 4
1079 Note that white space must be used for quoting operators if the
1080 delimiter is a word character (\fIi.e.\fR, matches \f(CW\*(C`\ew\*(C'\fR).
1081 .IP \(bu 4
1082 Clarify that in regular expression patterns delimited by single quotes,
1083 no variable interpolation is done.
1084 .PP
1085 \fIperlre\fR
1086 .IX Subsection "perlre"
1087 .IP \(bu 4
1088 The first part was extensively rewritten to incorporate various basic
1089 points, that in earlier versions were mentioned in sort of an appendix
1090 on Version 8 regular expressions.
1091 .IP \(bu 4
1092 Note that it is common to have the \f(CW\*(C`/x\*(C'\fR modifier and forget that this
1093 means that \f(CW"#"\fR has to be escaped.
1094 .PP
1095 \fIperlretut\fR
1096 .IX Subsection "perlretut"
1097 .IP \(bu 4
1098 Add introductory material.
1099 .IP \(bu 4
1100 Note that a metacharacter occurring in a context where it can\*(Aqt mean
1101 that, silently loses its meta\-ness and matches literally.
1102 \&\f(CW\*(C`use re \*(Aqstrict\*(Aq\*(C'\fR can catch some of these.
1103 .PP
1104 \fIperlunicode\fR
1105 .IX Subsection "perlunicode"
1106 .IP \(bu 4
1107 Corrected the text about Unicode BYTE ORDER MARK handling.
1108 .IP \(bu 4
1109 Updated the text to correspond with changes in Unicode UTS#18, concerning
1110 regular expressions, and Perl compatibility with what it says.
1111 .PP
1112 \fIperlvar\fR
1113 .IX Subsection "perlvar"
1114 .IP \(bu 4
1115 Document \f(CW@ISA\fR. It was documented in other places, but not in perlvar.
1116 .SH Diagnostics
1117 .IX Header "Diagnostics"
1118 .SS "New Diagnostics"
1119 .IX Subsection "New Diagnostics"
1120 \fINew Errors\fR
1121 .IX Subsection "New Errors"
1122 .IP \(bu 4
1123 A signature parameter must start with \f(CW\*(Aq$\*(Aq\fR, \f(CW\*(Aq@\*(Aq\fR or \f(CW\*(Aq%\*(Aq\fR
1124 .IP \(bu 4
1125 Bareword in require contains "%s"
1126 .IP \(bu 4
1127 Bareword in require maps to empty filename
1128 .IP \(bu 4
1129 Bareword in require maps to disallowed filename "%s"
1130 .IP \(bu 4
1131 Bareword in require must not start with a double\-colon: "%s"
1132 .IP \(bu 4
1133 \&\f(CW%s:\fR command not found
1134 .Sp
1135 (A) You\*(Aqve accidentally run your script through \fBbash\fR or another shell
1136 instead of Perl. Check the \f(CW\*(C`#!\*(C'\fR line, or manually feed your script into
1137 Perl yourself. The \f(CW\*(C`#!\*(C'\fR line at the top of your file could look like:
1138 .Sp
1139 .Vb 1
1140 \& #!/usr/bin/perl
1141 .Ve
1142 .IP \(bu 4
1143 \&\f(CW%s:\fR command not found: \f(CW%s\fR
1144 .Sp
1145 (A) You\*(Aqve accidentally run your script through \fBzsh\fR or another shell
1146 instead of Perl. Check the \f(CW\*(C`#!\*(C'\fR line, or manually feed your script into
1147 Perl yourself. The \f(CW\*(C`#!\*(C'\fR line at the top of your file could look like:
1148 .Sp
1149 .Vb 1
1150 \& #!/usr/bin/perl
1151 .Ve
1152 .IP \(bu 4
1153 The experimental declared_refs feature is not enabled
1154 .Sp
1155 (F) To declare references to variables, as in \f(CW\*(C`my \e%x\*(C'\fR, you must first enable
1156 the feature:
1157 .Sp
1158 .Vb 2
1159 \& no warnings "experimental::declared_refs";
1160 \& use feature "declared_refs";
1161 .Ve
1162 .Sp
1163 See "Declaring a reference to a variable".
1164 .IP \(bu 4
1165 Illegal character following sigil in a subroutine signature
1166 .IP \(bu 4
1167 Indentation on line \f(CW%d\fR of here\-doc doesn\*(Aqt match delimiter
1168 .IP \(bu 4
1169 Infinite recursion via empty pattern.
1170 .Sp
1171 Using the empty pattern (which re\-executes the last successfully\-matched
1172 pattern) inside a code block in another regex, as in \f(CW\*(C`/(?{ s!!new! })/\*(C'\fR, has
1173 always previously yielded a segfault. It now produces this error.
1174 .IP \(bu 4
1175 Malformed UTF\-8 string in "%s"
1176 .IP \(bu 4
1177 Multiple slurpy parameters not allowed
1178 .IP \(bu 4
1179 \&\f(CW\*(Aq#\*(Aq\fR not allowed immediately following a sigil in a subroutine signature
1180 .IP \(bu 4
1181 panic: unknown OA_*: \f(CW%x\fR
1182 .IP \(bu 4
1183 Unescaped left brace in regex is illegal here
1184 .Sp
1185 Unescaped left braces are now illegal in some contexts in regular expression
1186 patterns. In other contexts, they are still just deprecated; they will
1187 be illegal in Perl 5.30.
1188 .IP \(bu 4
1189 Version control conflict marker
1190 .Sp
1191 (F) The parser found a line starting with \f(CW\*(C`<<<<<<<\*(C'\fR,
1192 \&\f(CW\*(C`>>>>>>>\*(C'\fR, or \f(CW\*(C`=======\*(C'\fR. These may be left by a
1193 version control system to mark conflicts after a failed merge operation.
1194 .PP
1195 \fINew Warnings\fR
1196 .IX Subsection "New Warnings"
1197 .IP \(bu 4
1198 Can\*(Aqt determine class of operator \f(CW%s\fR, assuming \f(CW\*(C`BASEOP\*(C'\fR
1199 .IP \(bu 4
1200 Declaring references is experimental
1201 .Sp
1202 (S experimental::declared_refs) This warning is emitted if you use a reference
1203 constructor on the right\-hand side of \f(CWmy()\fR, \f(CWstate()\fR, \f(CWour()\fR, or
1204 \&\f(CWlocal()\fR. Simply suppress the warning if you want to use the feature, but
1205 know that in doing so you are taking the risk of using an experimental feature
1206 which may change or be removed in a future Perl version:
1207 .Sp
1208 .Vb 3
1209 \& no warnings "experimental::declared_refs";
1210 \& use feature "declared_refs";
1211 \& $fooref = my \e$foo;
1212 .Ve
1213 .Sp
1214 See "Declaring a reference to a variable".
1215 .IP \(bu 4
1216 do "%s" failed, \*(Aq.\*(Aq is no longer in \f(CW@INC\fR
1217 .Sp
1218 Since \f(CW"."\fR is now removed from \f(CW@INC\fR by default, \f(CW\*(C`do\*(C'\fR will now trigger a warning recommending to fix the \f(CW\*(C`do\*(C'\fR statement.
1219 .IP \(bu 4
1220 \&\f(CWFile::Glob::glob()\fR will disappear in perl 5.30. Use \f(CWFile::Glob::bsd_glob()\fR instead.
1221 .IP \(bu 4
1222 Unescaped literal \*(Aq%c\*(Aq in regex; marked by <\-\- HERE in m/%s/
1223 .IP \(bu 4
1224 Use of unassigned code point or non\-standalone grapheme for a delimiter will be a fatal error starting in Perl 5.30
1225 .Sp
1226 See "Deprecations"
1227 .SS "Changes to Existing Diagnostics"
1228 .IX Subsection "Changes to Existing Diagnostics"
1229 .IP \(bu 4
1230 When a \f(CW\*(C`require\*(C'\fR fails, we now do not provide \f(CW@INC\fR when the \f(CW\*(C`require\*(C'\fR
1231 is for a file instead of a module.
1232 .IP \(bu 4
1233 When \f(CW@INC\fR is not scanned for a \f(CW\*(C`require\*(C'\fR call, we no longer display
1234 \&\f(CW@INC\fR to avoid confusion.
1235 .IP \(bu 4
1236 Attribute "locked" is deprecated, and will disappear in Perl 5.28
1237 .Sp
1238 This existing warning has had the \fIand will disappear\fR text added in this
1239 release.
1240 .IP \(bu 4
1241 Attribute "unique" is deprecated, and will disappear in Perl 5.28
1242 .Sp
1243 This existing warning has had the \fIand will disappear\fR text added in this
1244 release.
1245 .IP \(bu 4
1246 Calling POSIX::%s() is deprecated
1247 .Sp
1248 This warning has been removed, as the deprecated functions have been
1249 removed from POSIX.
1250 .IP \(bu 4
1251 Constants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32
1252 .Sp
1253 This existing warning has had the \fIthis will not be allowed\fR text added
1254 in this release.
1255 .IP \(bu 4
1256 Deprecated use of \f(CWmy()\fR in false conditional. This will be a fatal error in Perl 5.30
1257 .Sp
1258 This existing warning has had the \fIthis will be a fatal error\fR text added
1259 in this release.
1260 .IP \(bu 4
1261 \&\f(CWdump()\fR better written as \f(CWCORE::dump()\fR. \f(CWdump()\fR will no longer be available in Perl 5.30
1262 .Sp
1263 This existing warning has had the \fIno longer be available\fR text added in
1264 this release.
1265 .IP \(bu 4
1266 Experimental \f(CW%s\fR on scalar is now forbidden
1267 .Sp
1268 This message is now followed by more helpful text.
1269 [GH #15291] <https://github.com/Perl/perl5/issues/15291>
1270 .IP \(bu 4
1271 Experimental "%s" subs not enabled
1272 .Sp
1273 This warning has been removed, as lexical subs are no longer experimental.
1274 .IP \(bu 4
1275 Having more than one /%c regexp modifier is deprecated
1276 .Sp
1277 This deprecation warning has been removed, since \f(CW\*(C`/xx\*(C'\fR now has a new
1278 meaning.
1279 .IP \(bu 4
1280 %s() is deprecated on \f(CW\*(C`:utf8\*(C'\fR handles. This will be a fatal error in Perl 5.30
1281 \&.
1282 .Sp
1283 where "%s" is one of \f(CW\*(C`sysread\*(C'\fR, \f(CW\*(C`recv\*(C'\fR, \f(CW\*(C`syswrite\*(C'\fR, or \f(CW\*(C`send\*(C'\fR.
1284 .Sp
1285 This existing warning has had the \fIthis will be a fatal error\fR text added
1286 in this release.
1287 .Sp
1288 This warning is now enabled by default, as all \f(CW\*(C`deprecated\*(C'\fR category
1289 warnings should be.
1290 .IP \(bu 4
1291 \&\f(CW$*\fR is no longer supported. Its use will be fatal in Perl 5.30
1292 .Sp
1293 This existing warning has had the \fIits use will be fatal\fR text added in
1294 this release.
1295 .IP \(bu 4
1296 \&\f(CW$#\fR is no longer supported. Its use will be fatal in Perl 5.30
1297 .Sp
1298 This existing warning has had the \fIits use will be fatal\fR text added in
1299 this release.
1300 .IP \(bu 4
1301 Malformed UTF\-8 character%s
1302 .Sp
1303 Details as to the exact problem have been added at the end of this
1304 message
1305 .IP \(bu 4
1306 Missing or undefined argument to \f(CW%s\fR
1307 .Sp
1308 This warning used to warn about \f(CW\*(C`require\*(C'\fR, even if it was actually \f(CW\*(C`do\*(C'\fR
1309 which being executed. It now gets the operation name right.
1310 .IP \(bu 4
1311 NO\-BREAK SPACE in a charnames alias definition is deprecated
1312 .Sp
1313 This warning has been removed as the behavior is now an error.
1314 .IP \(bu 4
1315 Odd name/value argument for subroutine \*(Aq%s\*(Aq
1316 .Sp
1317 This warning now includes the name of the offending subroutine.
1318 .IP \(bu 4
1319 Opening dirhandle \f(CW%s\fR also as a file. This will be a fatal error in Perl 5.28
1320 .Sp
1321 This existing warning has had the \fIthis will be a fatal error\fR text added
1322 in this release.
1323 .IP \(bu 4
1324 Opening filehandle \f(CW%s\fR also as a directory. This will be a fatal error in Perl 5.28
1325 .Sp
1326 This existing warning has had the \fIthis will be a fatal error\fR text added
1327 in this release.
1328 .IP \(bu 4
1329 panic: ck_split, type=%u
1330 .Sp
1331 panic: pp_split, pm=%p, s=%p
1332 .Sp
1333 These panic errors have been removed.
1334 .IP \(bu 4
1335 Passing malformed UTF\-8 to "%s" is deprecated
1336 .Sp
1337 This warning has been changed to the fatal
1338 Malformed UTF\-8 string in "%s"
1339 .IP \(bu 4
1340 Setting \f(CW$/\fR to a reference to \f(CW%s\fR as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28
1341 .Sp
1342 This existing warning has had the \fIthis will be fatal\fR text added in
1343 this release.
1344 .IP \(bu 4
1345 \&\f(CW\*(C`${^ENCODING}\*(C'\fR is no longer supported. Its use will be fatal in Perl 5.28
1346 .Sp
1347 This warning used to be: "Setting \f(CW\*(C`${^ENCODING}\*(C'\fR is deprecated".
1348 .Sp
1349 The special action of the variable \f(CW\*(C`${^ENCODING}\*(C'\fR was formerly used to
1350 implement the \f(CW\*(C`encoding\*(C'\fR pragma. As of Perl 5.26, rather than being
1351 deprecated, assigning to this variable now has no effect except to issue
1352 the warning.
1353 .IP \(bu 4
1354 Too few arguments for subroutine \*(Aq%s\*(Aq
1355 .Sp
1356 This warning now includes the name of the offending subroutine.
1357 .IP \(bu 4
1358 Too many arguments for subroutine \*(Aq%s\*(Aq
1359 .Sp
1360 This warning now includes the name of the offending subroutine.
1361 .IP \(bu 4
1362 Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <\-\-\ HERE in m/%s/
1363 .Sp
1364 This existing warning has had the \fIhere (and will be fatal...)\fR text
1365 added in this release.
1366 .IP \(bu 4
1367 Unknown charname \*(Aq\*(Aq is deprecated. Its use will be fatal in Perl 5.28
1368 .Sp
1369 This existing warning has had the \fIits use will be fatal\fR text added in
1370 this release.
1371 .IP \(bu 4
1372 Use of bare << to mean <<"" is deprecated. Its use will be fatal in Perl 5.28
1373 .Sp
1374 This existing warning has had the \fIits use will be fatal\fR text added in
1375 this release.
1376 .IP \(bu 4
1377 Use of code point 0x%s is deprecated; the permissible max is 0x%s. This will be fatal in Perl 5.28
1378 .Sp
1379 This existing warning has had the \fIthis will be fatal\fR text added in
1380 this release.
1381 .IP \(bu 4
1382 Use of comma\-less variable list is deprecated. Its use will be fatal in Perl 5.28
1383 .Sp
1384 This existing warning has had the \fIits use will be fatal\fR text added in
1385 this release.
1386 .IP \(bu 4
1387 Use of inherited \f(CW\*(C`AUTOLOAD\*(C'\fR for non\-method %s() is deprecated. This will be fatal in Perl 5.28
1388 .Sp
1389 This existing warning has had the \fIthis will be fatal\fR text added in
1390 this release.
1391 .IP \(bu 4
1392 Use of strings with code points over 0xFF as arguments to \f(CW%s\fR operator is deprecated. This will be a fatal error in Perl 5.28
1393 .Sp
1394 This existing warning has had the \fIthis will be a fatal error\fR text added in
1395 this release.
1396 .SH "Utility Changes"
1397 .IX Header "Utility Changes"
1398 .SS "\fIc2ph\fP and \fIpstruct\fP"
1399 .IX Subsection "c2ph and pstruct"
1400 .IP \(bu 4
1401 These old utilities have long since superceded by h2xs, and are
1402 now gone from the distribution.
1403 .SS \fIPorting/pod_lib.pl\fP
1404 .IX Subsection "Porting/pod_lib.pl"
1405 .IP \(bu 4
1406 Removed spurious executable bit.
1407 .IP \(bu 4
1408 Account for the possibility of DOS file endings.
1409 .SS \fIPorting/sync\-with\-cpan\fP
1410 .IX Subsection "Porting/sync-with-cpan"
1411 .IP \(bu 4
1412 Many improvements.
1413 .SS \fIperf/benchmarks\fP
1414 .IX Subsection "perf/benchmarks"
1415 .IP \(bu 4
1416 Tidy file, rename some symbols.
1417 .SS \fIPorting/checkAUTHORS.pl\fP
1418 .IX Subsection "Porting/checkAUTHORS.pl"
1419 .IP \(bu 4
1420 Replace obscure character range with \f(CW\*(C`\ew\*(C'\fR.
1421 .SS \fIt/porting/regen.t\fP
1422 .IX Subsection "t/porting/regen.t"
1423 .IP \(bu 4
1424 Try to be more helpful when tests fail.
1425 .SS \fIutils/h2xs.PL\fP
1426 .IX Subsection "utils/h2xs.PL"
1427 .IP \(bu 4
1428 Avoid infinite loop for enums.
1429 .SS perlbug
1430 .IX Subsection "perlbug"
1431 .IP \(bu 4
1432 Long lines in the message body are now wrapped at 900 characters, to stay
1433 well within the 1000\-character limit imposed by SMTP mail transfer agents.
1434 This is particularly likely to be important for the list of arguments to
1435 \&\fIConfigure\fR, which can readily exceed the limit if, for example, it names
1436 several non\-default installation paths. This change also adds the first unit
1437 tests for perlbug.
1438 [perl #128020] <https://rt.perl.org/Public/Bug/Display.html?id=128020>
1439 .SH "Configuration and Compilation"
1440 .IX Header "Configuration and Compilation"
1441 .IP \(bu 4
1442 \&\f(CW\*(C`\-Ddefault_inc_excludes_dot\*(C'\fR was added, and enabled by default.
1443 .IP \(bu 4
1444 The \f(CW\*(C`dtrace\*(C'\fR build process has further changes
1445 [GH #15718] <https://github.com/Perl/perl5/issues/15718>:
1446 .RS 4
1447 .IP \(bu 4
1448 If the \f(CW\*(C`\-xnolibs\*(C'\fR is available, use that so a \fIdtrace\fR perl can be
1449 built within a FreeBSD jail.
1450 .IP \(bu 4
1451 On systems that build a \fIdtrace\fR object file (FreeBSD, Solaris, and
1452 SystemTap\*(Aqs dtrace emulation), copy the input objects to a separate
1453 directory and process them there, and use those objects in the link,
1454 since \f(CW\*(C`dtrace \-G\*(C'\fR also modifies these objects.
1455 .IP \(bu 4
1456 Add \fIlibelf\fR to the build on FreeBSD 10.x, since \fIdtrace\fR adds
1457 references to \fIlibelf\fR symbols.
1458 .IP \(bu 4
1459 Generate a dummy \fIdtrace_main.o\fR if \f(CW\*(C`dtrace \-G\*(C'\fR fails to build it. A
1460 default build on Solaris generates probes from the unused inline
1461 functions, while they don\*(Aqt on FreeBSD, which causes \f(CW\*(C`dtrace \-G\*(C'\fR to
1462 fail.
1463 .RE
1464 .RS 4
1465 .RE
1466 .IP \(bu 4
1467 You can now disable perl\*(Aqs use of the \f(CW\*(C`PERL_HASH_SEED\*(C'\fR and
1468 \&\f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR environment variables by configuring perl with
1469 \&\f(CW\*(C`\-Accflags=NO_PERL_HASH_ENV\*(C'\fR.
1470 .IP \(bu 4
1471 You can now disable perl\*(Aqs use of the \f(CW\*(C`PERL_HASH_SEED_DEBUG\*(C'\fR environment
1472 variable by configuring perl with
1473 \&\f(CW\*(C`\-Accflags=\-DNO_PERL_HASH_SEED_DEBUG\*(C'\fR.
1474 .IP \(bu 4
1475 \&\fIConfigure\fR now zeroes out the alignment bytes when calculating the bytes
1476 for 80\-bit \f(CW\*(C`NaN\*(C'\fR and \f(CW\*(C`Inf\*(C'\fR to make builds more reproducible.
1477 [GH #15725] <https://github.com/Perl/perl5/issues/15725>
1478 .IP \(bu 4
1479 Since v5.18, for testing purposes we have included support for
1480 building perl with a variety of non\-standard, and non\-recommended
1481 hash functions. Since we do not recommend the use of these functions,
1482 we have removed them and their corresponding build options. Specifically
1483 this includes the following build options:
1484 .Sp
1485 .Vb 8
1486 \& PERL_HASH_FUNC_SDBM
1487 \& PERL_HASH_FUNC_DJB2
1488 \& PERL_HASH_FUNC_SUPERFAST
1489 \& PERL_HASH_FUNC_MURMUR3
1490 \& PERL_HASH_FUNC_ONE_AT_A_TIME
1491 \& PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
1492 \& PERL_HASH_FUNC_MURMUR_HASH_64A
1493 \& PERL_HASH_FUNC_MURMUR_HASH_64B
1494 .Ve
1495 .IP \(bu 4
1496 Remove "Warning: perl appears in your path"
1497 .Sp
1498 This install warning is more or less obsolete, since most platforms already
1499 \&\fBwill\fR have a \fI/usr/bin/perl\fR or similar provided by the OS.
1500 .IP \(bu 4
1501 Reduce verbosity of \f(CW\*(C`make install.man\*(C'\fR
1502 .Sp
1503 Previously, two progress messages were emitted for each manpage: one by
1504 installman itself, and one by the function in \fIinstall_lib.pl\fR that it calls to
1505 actually install the file. Disabling the second of those in each case saves
1506 over 750 lines of unhelpful output.
1507 .IP \(bu 4
1508 Cleanup for \f(CW\*(C`clang \-Weverything\*(C'\fR support.
1509 [GH #15683] <https://github.com/Perl/perl5/issues/15683>
1510 .IP \(bu 4
1511 \&\fIConfigure\fR: signbit scan was assuming too much, stop assuming negative 0.
1512 .IP \(bu 4
1513 Various compiler warnings have been silenced.
1514 .IP \(bu 4
1515 Several smaller changes have been made to remove impediments to compiling
1516 under C++11.
1517 .IP \(bu 4
1518 Builds using \f(CW\*(C`USE_PAD_RESET\*(C'\fR now work again; this configuration had
1519 bit\-rotted.
1520 .IP \(bu 4
1521 A probe for \f(CW\*(C`gai_strerror\*(C'\fR was added to \fIConfigure\fR that checks if
1522 the \f(CWgai_strerror()\fR routine is available and can be used to
1523 translate error codes returned by \f(CWgetaddrinfo()\fR into human
1524 readable strings.
1525 .IP \(bu 4
1526 \&\fIConfigure\fR now aborts if both \f(CW\*(C`\-Duselongdouble\*(C'\fR and \f(CW\*(C`\-Dusequadmath\*(C'\fR are
1527 requested.
1528 [GH #14944] <https://github.com/Perl/perl5/issues/14944>
1529 .IP \(bu 4
1530 Fixed a bug in which \fIConfigure\fR could append \f(CW\*(C`\-quadmath\*(C'\fR to the
1531 archname even if it was already present.
1532 [GH #15423] <https://github.com/Perl/perl5/issues/15423>
1533 .IP \(bu 4
1534 Clang builds with \f(CW\*(C`\-DPERL_GLOBAL_STRUCT\*(C'\fR or
1535 \&\f(CW\*(C`\-DPERL_GLOBAL_STRUCT_PRIVATE\*(C'\fR have
1536 been fixed (by disabling Thread Safety Analysis for these configurations).
1537 .IP \(bu 4
1538 \&\fImake_ext.pl\fR no longer updates a module\*(Aqs \fIpm_to_blib\fR file when no
1539 files require updates. This could cause dependencies, \fIperlmain.c\fR
1540 in particular, to be rebuilt unnecessarily.
1541 [GH #15060] <https://github.com/Perl/perl5/issues/15060>
1542 .IP \(bu 4
1543 The output of \f(CW\*(C`perl \-V\*(C'\fR has been reformatted so that each configuration
1544 and compile\-time option is now listed one per line, to improve
1545 readability.
1546 .IP \(bu 4
1547 \&\fIConfigure\fR now builds \f(CW\*(C`miniperl\*(C'\fR and \f(CW\*(C`generate_uudmap\*(C'\fR if you
1548 invoke it with \f(CW\*(C`\-Dusecrosscompiler\*(C'\fR but not \f(CW\*(C`\-Dtargethost=somehost\*(C'\fR.
1549 This means you can supply your target platform \f(CW\*(C`config.sh\*(C'\fR, generate
1550 the headers and proceed to build your cross\-target perl.
1551 [GH #15126] <https://github.com/Perl/perl5/issues/15126>
1552 .IP \(bu 4
1553 Perl built with \f(CW\*(C`\-Accflags=\-DPERL_TRACE_OPS\*(C'\fR now only dumps the operator
1554 counts when the environment variable \f(CW\*(C`PERL_TRACE_OPS\*(C'\fR is set to a
1555 non\-zero integer. This allows \f(CW\*(C`make test\*(C'\fR to pass on such a build.
1556 .IP \(bu 4
1557 When building with GCC 6 and link\-time optimization (the \f(CW\*(C`\-flto\*(C'\fR option to
1558 \&\f(CW\*(C`gcc\*(C'\fR), \fIConfigure\fR was treating all probed symbols as present on the
1559 system, regardless of whether they actually exist. This has been fixed.
1560 [GH #15322] <https://github.com/Perl/perl5/issues/15322>
1561 .IP \(bu 4
1562 The \fIt/test.pl\fR library is used for internal testing of Perl itself, and
1563 also copied by several CPAN modules. Some of those modules must work on
1564 older versions of Perl, so \fIt/test.pl\fR must in turn avoid newer Perl
1565 features. Compatibility with Perl 5.8 was inadvertently removed some time
1566 ago; it has now been restored.
1567 [GH #15302] <https://github.com/Perl/perl5/issues/15302>
1568 .IP \(bu 4
1569 The build process no longer emits an extra blank line before building each
1570 "simple" extension (those with only \fI*.pm\fR and \fI*.pod\fR files).
1571 .SH Testing
1572 .IX Header "Testing"
1573 Tests were added and changed to reflect the other additions and changes
1574 in this release. Furthermore, these substantive changes were made:
1575 .IP \(bu 4
1576 A new test script, \fIcomp/parser_run.t\fR, has been added that is like
1577 \&\fIcomp/parser.t\fR but with \fItest.pl\fR included so that \f(CWrunperl()\fR and the
1578 like are available for use.
1579 .IP \(bu 4
1580 Tests for locales were erroneously using locales incompatible with Perl.
1581 .IP \(bu 4
1582 Some parts of the test suite that try to exhaustively test edge cases in the
1583 regex implementation have been restricted to running for a maximum of five
1584 minutes. On slow systems they could otherwise take several hours, without
1585 significantly improving our understanding of the correctness of the code
1586 under test.
1587 .IP \(bu 4
1588 A new internal facility allows analysing the time taken by the individual
1589 tests in Perl\*(Aqs own test suite; see \fIPorting/harness\-timer\-report.pl\fR.
1590 .IP \(bu 4
1591 \&\fIt/re/regexp_nonull.t\fR has been added to test that the regular expression
1592 engine can handle scalars that do not have a null byte just past the end of
1593 the string.
1594 .IP \(bu 4
1595 A new test script, \fIt/op/decl\-refs.t\fR, has been added to test the new feature
1596 "Declaring a reference to a variable".
1597 .IP \(bu 4
1598 A new test script, \fIt/re/keep_tabs.t\fR has been added to contain tests
1599 where \f(CW\*(C`\et\*(C'\fR characters should not be expanded into spaces.
1600 .IP \(bu 4
1601 A new test script, \fIt/re/anyof.t\fR, has been added to test that the ANYOF nodes
1602 generated by bracketed character classes are as expected.
1603 .IP \(bu 4
1604 There is now more extensive testing of the Unicode\-related API macros
1605 and functions.
1606 .IP \(bu 4
1607 Several of the longer running API test files have been split into
1608 multiple test files so that they can be run in parallel.
1609 .IP \(bu 4
1610 \&\fIt/harness\fR now tries really hard not to run tests which are located
1611 outside of the Perl source tree.
1612 [GH #14578] <https://github.com/Perl/perl5/issues/14578>
1613 .IP \(bu 4
1614 Prevent debugger tests (\fIlib/perl5db.t\fR) from failing due to the contents
1615 of \f(CW$ENV{PERLDB_OPTS}\fR.
1616 [GH #15782] <https://github.com/Perl/perl5/issues/15782>
1617 .SH "Platform Support"
1618 .IX Header "Platform Support"
1619 .SS "New Platforms"
1620 .IX Subsection "New Platforms"
1621 .IP NetBSD/VAX 4
1622 .IX Item "NetBSD/VAX"
1623 Perl now compiles under NetBSD on VAX machines. However, it\*(Aqs not
1624 possible for that platform to implement floating\-point infinities and
1625 NaNs compatible with most modern systems, which implement the IEEE\-754
1626 floating point standard. The hexadecimal floating point (\f(CW\*(C`0x...p[+\-]n\*(C'\fR
1627 literals, \f(CW\*(C`printf %a\*(C'\fR) is not implemented, either.
1628 The \f(CW\*(C`make test\*(C'\fR passes 98% of tests.
1629 .RS 4
1630 .IP \(bu 4
1631 Test fixes and minor updates.
1632 .IP \(bu 4
1633 Account for lack of \f(CW\*(C`inf\*(C'\fR, \f(CW\*(C`nan\*(C'\fR, and \f(CW\-0.0\fR support.
1634 .RE
1635 .RS 4
1636 .RE
1637 .SS "Platform\-Specific Notes"
1638 .IX Subsection "Platform-Specific Notes"
1639 .IP Darwin 4
1640 .IX Item "Darwin"
1641 .RS 4
1642 .PD 0
1643 .IP \(bu 4
1644 .PD
1645 Don\*(Aqt treat \f(CW\*(C`\-Dprefix=/usr\*(C'\fR as special: instead require an extra option
1646 \&\f(CW\*(C`\-Ddarwin_distribution\*(C'\fR to produce the same results.
1647 .IP \(bu 4
1648 OS X El Capitan doesn\*(Aqt implement the \f(CWclock_gettime()\fR or
1649 \&\f(CWclock_getres()\fR APIs; emulate them as necessary.
1650 .IP \(bu 4
1651 Deprecated \f(CWsyscall(2)\fR on macOS 10.12.
1652 .RE
1653 .RS 4
1654 .RE
1655 .IP EBCDIC 4
1656 .IX Item "EBCDIC"
1657 Several tests have been updated to work (or be skipped) on EBCDIC platforms.
1658 .IP HP\-UX 4
1659 .IX Item "HP-UX"
1660 The Net::Ping UDP test is now skipped on HP\-UX.
1661 .IP Hurd 4
1662 .IX Item "Hurd"
1663 The hints for Hurd have been improved, enabling malloc wrap and reporting the
1664 GNU libc used (previously it was an empty string when reported).
1665 .IP VAX 4
1666 .IX Item "VAX"
1667 VAX floating point formats are now supported on NetBSD.
1668 .IP VMS 4
1669 .IX Item "VMS"
1670 .RS 4
1671 .PD 0
1672 .IP \(bu 4
1673 .PD
1674 The path separator for the \f(CW\*(C`PERL5LIB\*(C'\fR and \f(CW\*(C`PERLLIB\*(C'\fR environment entries is
1675 now a colon (\f(CW":"\fR) when running under a Unix shell. There is no change when
1676 running under DCL (it\*(Aqs still \f(CW"|"\fR).
1677 .IP \(bu 4
1678 \&\fIconfigure.com\fR now recognizes the VSI\-branded C compiler and no longer
1679 recognizes the "DEC"\-branded C compiler (as there hasn\*(Aqt been such a thing for
1680 15 or more years).
1681 .RE
1682 .RS 4
1683 .RE
1684 .IP Windows 4
1685 .IX Item "Windows"
1686 .RS 4
1687 .PD 0
1688 .IP \(bu 4
1689 .PD
1690 Support for compiling perl on Windows using Microsoft Visual Studio 2015
1691 (containing Visual C++ 14.0) has been added.
1692 .Sp
1693 This version of VC++ includes a completely rewritten C run\-time library, some
1694 of the changes in which mean that work done to resolve a socket
1695 \&\f(CWclose()\fR bug in
1696 perl #120091 and perl #118059 is not workable in its current state with this
1697 version of VC++. Therefore, we have effectively reverted that bug fix for
1698 VS2015 onwards on the basis that being able to build with VS2015 onwards is
1699 more important than keeping the bug fix. We may revisit this in the future to
1700 attempt to fix the bug again in a way that is compatible with VS2015.
1701 .Sp
1702 These changes do not affect compilation with GCC or with Visual Studio versions
1703 up to and including VS2013, \fIi.e.\fR, the bug fix is retained (unchanged) for those
1704 compilers.
1705 .Sp
1706 Note that you may experience compatibility problems if you mix a perl built
1707 with GCC or VS <= VS2013 with XS modules built with VS2015, or if you mix a
1708 perl built with VS2015 with XS modules built with GCC or VS <= VS2013.
1709 Some incompatibility may arise because of the bug fix that has been reverted
1710 for VS2015 builds of perl, but there may well be incompatibility anyway because
1711 of the rewritten CRT in VS2015 (\fIe.g.\fR, see discussion at
1712 <http://stackoverflow.com/questions/30412951>).
1713 .IP \(bu 4
1714 It now automatically detects GCC versus Visual C and sets the VC version
1715 number on Win32.
1716 .RE
1717 .RS 4
1718 .RE
1719 .IP Linux 4
1720 .IX Item "Linux"
1721 Drop support for Linux \fIa.out\fR executable format. Linux has used ELF for
1722 over twenty years.
1723 .IP "OpenBSD 6" 4
1724 .IX Item "OpenBSD 6"
1725 OpenBSD 6 still does not support returning \f(CW\*(C`pid\*(C'\fR, \f(CW\*(C`gid\*(C'\fR, or \f(CW\*(C`uid\*(C'\fR with
1726 \&\f(CW\*(C`SA_SIGINFO\*(C'\fR. Make sure to account for it.
1727 .IP FreeBSD 4
1728 .IX Item "FreeBSD"
1729 \&\fIt/uni/overload.t\fR: Skip hanging test on FreeBSD.
1730 .IP "DragonFly BSD" 4
1731 .IX Item "DragonFly BSD"
1732 DragonFly BSD now has support for \f(CWsetproctitle()\fR.
1733 [GH #15703] <https://github.com/Perl/perl5/issues/15703>.
1734 .SH "Internal Changes"
1735 .IX Header "Internal Changes"
1736 .IP \(bu 4
1737 A new API function \f(CWsv_setpv_bufsize()\fR
1738 allows simultaneously setting the
1739 length and the allocated size of the buffer in an \f(CW\*(C`SV\*(C'\fR, growing the
1740 buffer if necessary.
1741 .IP \(bu 4
1742 A new API macro \f(CWSvPVCLEAR()\fR sets its \f(CW\*(C`SV\*(C'\fR
1743 argument to an empty string,
1744 like Perl\-space \f(CW\*(C`$x = \*(Aq\*(Aq\*(C'\fR, but with several optimisations.
1745 .IP \(bu 4
1746 Several new macros and functions for dealing with Unicode and
1747 UTF\-8\-encoded strings have been added to the API, as well as some
1748 changes in the
1749 functionality of existing functions (see "Unicode Support" in perlapi for
1750 more details):
1751 .RS 4
1752 .IP \(bu 4
1753 New versions of the API macros like \f(CW\*(C`isALPHA_utf8\*(C'\fR and \f(CW\*(C`toLOWER_utf8\*(C'\fR
1754 have been added, each with the suffix \f(CW\*(C`_safe\*(C'\fR, like
1755 \&\f(CW\*(C`isSPACE_utf8_safe\*(C'\fR. These take an extra
1756 parameter, giving an upper
1757 limit of how far into the string it is safe to read. Using the old
1758 versions could cause attempts to read beyond the end of the input buffer
1759 if the UTF\-8 is not well\-formed, and their use now raises a deprecation
1760 warning. Details are at "Character classification" in perlapi.
1761 .IP \(bu 4
1762 Macros like \f(CW\*(C`isALPHA_utf8\*(C'\fR and
1763 \&\f(CW\*(C`toLOWER_utf8\*(C'\fR now die if they detect
1764 that their input UTF\-8 is malformed. A deprecation warning had been
1765 issued since Perl 5.18.
1766 .IP \(bu 4
1767 Several new macros for analysing the validity of utf8 sequences. These
1768 are:
1769 .Sp
1770 \&\f(CW\*(C`UTF8_GOT_ABOVE_31_BIT\*(C'\fR
1771 \&\f(CW\*(C`UTF8_GOT_CONTINUATION\*(C'\fR
1772 \&\f(CW\*(C`UTF8_GOT_EMPTY\*(C'\fR
1773 \&\f(CW\*(C`UTF8_GOT_LONG\*(C'\fR
1774 \&\f(CW\*(C`UTF8_GOT_NONCHAR\*(C'\fR
1775 \&\f(CW\*(C`UTF8_GOT_NON_CONTINUATION\*(C'\fR
1776 \&\f(CW\*(C`UTF8_GOT_OVERFLOW\*(C'\fR
1777 \&\f(CW\*(C`UTF8_GOT_SHORT\*(C'\fR
1778 \&\f(CW\*(C`UTF8_GOT_SUPER\*(C'\fR
1779 \&\f(CW\*(C`UTF8_GOT_SURROGATE\*(C'\fR
1780 \&\f(CW\*(C`UTF8_IS_INVARIANT\*(C'\fR
1781 \&\f(CW\*(C`UTF8_IS_NONCHAR\*(C'\fR
1782 \&\f(CW\*(C`UTF8_IS_SUPER\*(C'\fR
1783 \&\f(CW\*(C`UTF8_IS_SURROGATE\*(C'\fR
1784 \&\f(CW\*(C`UVCHR_IS_INVARIANT\*(C'\fR
1785 \&\f(CW\*(C`isUTF8_CHAR_flags\*(C'\fR
1786 \&\f(CW\*(C`isSTRICT_UTF8_CHAR\*(C'\fR
1787 \&\f(CW\*(C`isC9_STRICT_UTF8_CHAR\*(C'\fR
1788 .IP \(bu 4
1789 Functions that are all extensions of the \f(CW\*(C`is_utf8_string_\fR\f(CI*\fR\f(CW()\*(C'\fR functions,
1790 that apply various restrictions to the UTF\-8 recognized as valid:
1791 .Sp
1792 \&\f(CW\*(C`is_strict_utf8_string\*(C'\fR,
1793 \&\f(CW\*(C`is_strict_utf8_string_loc\*(C'\fR,
1794 \&\f(CW\*(C`is_strict_utf8_string_loclen\*(C'\fR,
1795 .Sp
1796 \&\f(CW\*(C`is_c9strict_utf8_string\*(C'\fR,
1797 \&\f(CW\*(C`is_c9strict_utf8_string_loc\*(C'\fR,
1798 \&\f(CW\*(C`is_c9strict_utf8_string_loclen\*(C'\fR,
1799 .Sp
1800 \&\f(CW\*(C`is_utf8_string_flags\*(C'\fR,
1801 \&\f(CW\*(C`is_utf8_string_loc_flags\*(C'\fR,
1802 \&\f(CW\*(C`is_utf8_string_loclen_flags\*(C'\fR,
1803 .Sp
1804 \&\f(CW\*(C`is_utf8_fixed_width_buf_flags\*(C'\fR,
1805 \&\f(CW\*(C`is_utf8_fixed_width_buf_loc_flags\*(C'\fR,
1806 \&\f(CW\*(C`is_utf8_fixed_width_buf_loclen_flags\*(C'\fR.
1807 .Sp
1808 \&\f(CW\*(C`is_utf8_invariant_string\*(C'\fR.
1809 \&\f(CW\*(C`is_utf8_valid_partial_char\*(C'\fR.
1810 \&\f(CW\*(C`is_utf8_valid_partial_char_flags\*(C'\fR.
1811 .IP \(bu 4
1812 The functions \f(CW\*(C`utf8n_to_uvchr\*(C'\fR and its
1813 derivatives have had several changes of behaviour.
1814 .Sp
1815 Calling them, while passing a string length of 0 is now asserted against
1816 in DEBUGGING builds, and otherwise, returns the Unicode REPLACEMENT
1817 CHARACTER. If you have nothing to decode, you shouldn\*(Aqt call the decode
1818 function.
1819 .Sp
1820 They now return the Unicode REPLACEMENT CHARACTER if called with UTF\-8
1821 that has the overlong malformation and that malformation is allowed by
1822 the input parameters. This malformation is where the UTF\-8 looks valid
1823 syntactically, but there is a shorter sequence that yields the same code
1824 point. This has been forbidden since Unicode version 3.1.
1825 .Sp
1826 They now accept an input
1827 flag to allow the overflow malformation. This malformation is when the
1828 UTF\-8 may be syntactically valid, but the code point it represents is
1829 not capable of being represented in the word length on the platform.
1830 What "allowed" means, in this case, is that the function doesn\*(Aqt return an
1831 error, and it advances the parse pointer to beyond the UTF\-8 in
1832 question, but it returns the Unicode REPLACEMENT CHARACTER as the value
1833 of the code point (since the real value is not representable).
1834 .Sp
1835 They no longer abandon searching for other malformations when the first
1836 one is encountered. A call to one of these functions thus can generate
1837 multiple diagnostics, instead of just one.
1838 .IP \(bu 4
1839 \&\f(CWvalid_utf8_to_uvchr()\fR has been added
1840 to the API (although it was
1841 present in core earlier). Like \f(CWutf8_to_uvchr_buf()\fR, but assumes that
1842 the next character is well\-formed. Use with caution.
1843 .IP \(bu 4
1844 A new function, \f(CW\*(C`utf8n_to_uvchr_error\*(C'\fR,
1845 has been added for
1846 use by modules that need to know the details of UTF\-8 malformations
1847 beyond pass/fail. Previously, the only ways to know why a sequence was
1848 ill\-formed was to capture and parse the generated diagnostics or to do
1849 your own analysis.
1850 .IP \(bu 4
1851 There is now a safer version of \fButf8_hop()\fR, called
1852 \&\f(CWutf8_hop_safe()\fR.
1853 Unlike \fButf8_hop()\fR, \fButf8_hop_safe()\fR won\*(Aqt navigate before the beginning or
1854 after the end of the supplied buffer.
1855 .IP \(bu 4
1856 Two new functions, \f(CWutf8_hop_forward()\fR and
1857 \&\f(CWutf8_hop_back()\fR are
1858 similar to \f(CWutf8_hop_safe()\fR but are for when you know which direction
1859 you wish to travel.
1860 .IP \(bu 4
1861 Two new macros which return useful utf8 byte sequences:
1862 .Sp
1863 \&\f(CW\*(C`BOM_UTF8\*(C'\fR
1864 .Sp
1865 \&\f(CW\*(C`REPLACEMENT_CHARACTER_UTF8\*(C'\fR
1866 .RE
1867 .RS 4
1868 .RE
1869 .IP \(bu 4
1870 Perl is now built with the \f(CW\*(C`PERL_OP_PARENT\*(C'\fR compiler define enabled by
1871 default. To disable it, use the \f(CW\*(C`PERL_NO_OP_PARENT\*(C'\fR compiler define.
1872 This flag alters how the \f(CW\*(C`op_sibling\*(C'\fR field is used in \f(CW\*(C`OP\*(C'\fR structures,
1873 and has been available optionally since perl 5.22.
1874 .Sp
1875 See "Internal Changes" in perl5220delta for more details of what this
1876 build option does.
1877 .IP \(bu 4
1878 Three new ops, \f(CW\*(C`OP_ARGELEM\*(C'\fR, \f(CW\*(C`OP_ARGDEFELEM\*(C'\fR, and \f(CW\*(C`OP_ARGCHECK\*(C'\fR have
1879 been added. These are intended principally to implement the individual
1880 elements of a subroutine signature, plus any overall checking required.
1881 .IP \(bu 4
1882 The \f(CW\*(C`OP_PUSHRE\*(C'\fR op has been eliminated and the \f(CW\*(C`OP_SPLIT\*(C'\fR op has been
1883 changed from class \f(CW\*(C`LISTOP\*(C'\fR to \f(CW\*(C`PMOP\*(C'\fR.
1884 .Sp
1885 Formerly the first child of a split would be a \f(CW\*(C`pushre\*(C'\fR, which would have the
1886 \&\f(CW\*(C`split\*(C'\fR\*(Aqs regex attached to it. Now the regex is attached directly to the
1887 \&\f(CW\*(C`split\*(C'\fR op, and the \f(CW\*(C`pushre\*(C'\fR has been eliminated.
1888 .IP \(bu 4
1889 The \f(CWop_class()\fR API function has been added. This
1890 is like the existing
1891 \&\f(CWOP_CLASS()\fR macro, but can more accurately determine what struct an op
1892 has been allocated as. For example \f(CWOP_CLASS()\fR might return
1893 \&\f(CW\*(C`OA_BASEOP_OR_UNOP\*(C'\fR indicating that ops of this type are usually
1894 allocated as an \f(CW\*(C`OP\*(C'\fR or \f(CW\*(C`UNOP\*(C'\fR; while \f(CWop_class()\fR will return
1895 \&\f(CW\*(C`OPclass_BASEOP\*(C'\fR or \f(CW\*(C`OPclass_UNOP\*(C'\fR as appropriate.
1896 .IP \(bu 4
1897 All parts of the internals now agree that the \f(CW\*(C`sassign\*(C'\fR op is a \f(CW\*(C`BINOP\*(C'\fR;
1898 previously it was listed as a \f(CW\*(C`BASEOP\*(C'\fR in \fIregen/opcodes\fR, which meant
1899 that several parts of the internals had to be special\-cased to accommodate
1900 it. This oddity\*(Aqs original motivation was to handle code like \f(CW\*(C`$x ||= 1\*(C'\fR;
1901 that is now handled in a simpler way.
1902 .IP \(bu 4
1903 The output format of the \f(CWop_dump()\fR function (as
1904 used by \f(CW\*(C`perl \-Dx\*(C'\fR)
1905 has changed: it now displays an "ASCII\-art" tree structure, and shows more
1906 low\-level details about each op, such as its address and class.
1907 .IP \(bu 4
1908 The \f(CW\*(C`PADOFFSET\*(C'\fR type has changed from being unsigned to signed, and
1909 several pad\-related variables such as \f(CW\*(C`PL_padix\*(C'\fR have changed from being
1910 of type \f(CW\*(C`I32\*(C'\fR to type \f(CW\*(C`PADOFFSET\*(C'\fR.
1911 .IP \(bu 4
1912 The \f(CW\*(C`DEBUGGING\*(C'\fR\-mode output for regex compilation and execution has been
1913 enhanced.
1914 .IP \(bu 4
1915 Several obscure SV flags have been eliminated, sometimes along with the
1916 macros which manipulate them: \f(CW\*(C`SVpbm_VALID\*(C'\fR, \f(CW\*(C`SVpbm_TAIL\*(C'\fR, \f(CW\*(C`SvTAIL_on\*(C'\fR,
1917 \&\f(CW\*(C`SvTAIL_off\*(C'\fR, \f(CW\*(C`SVrepl_EVAL\*(C'\fR, \f(CW\*(C`SvEVALED\*(C'\fR.
1918 .IP \(bu 4
1919 An OP \f(CW\*(C`op_private\*(C'\fR flag has been eliminated: \f(CW\*(C`OPpRUNTIME\*(C'\fR. This used to
1920 often get set on \f(CW\*(C`PMOP\*(C'\fR ops, but had become meaningless over time.
1921 .SH "Selected Bug Fixes"
1922 .IX Header "Selected Bug Fixes"
1923 .IP \(bu 4
1924 Perl no longer panics when switching into some locales on machines with
1925 buggy \f(CWstrxfrm()\fR implementations in their \fIlibc\fR.
1926 [GH #13768] <https://github.com/Perl/perl5/issues/13768>
1927 .IP \(bu 4
1928 \&\f(CW\*(C` $\-{$name} \*(C'\fR would leak an \f(CW\*(C`AV\*(C'\fR on each access if the regular
1929 expression had no named captures. The same applies to access to any
1930 hash tied with Tie::Hash::NamedCapture and \f(CW\*(C`all => 1\*(C'\fR.
1931 [GH #15882] <https://github.com/Perl/perl5/issues/15882>
1932 .IP \(bu 4
1933 Attempting to use the deprecated variable \f(CW$#\fR as the object in an
1934 indirect object method call could cause a heap use after free or
1935 buffer overflow.
1936 [GH #15599] <https://github.com/Perl/perl5/issues/15599>
1937 .IP \(bu 4
1938 When checking for an indirect object method call, in some rare cases
1939 the parser could reallocate the line buffer but then continue to use
1940 pointers to the old buffer.
1941 [GH #15585] <https://github.com/Perl/perl5/issues/15585>
1942 .IP \(bu 4
1943 Supplying a glob as the format argument to
1944 \&\f(CW\*(C`formline\*(C'\fR would
1945 cause an assertion failure.
1946 [GH #15862] <https://github.com/Perl/perl5/issues/15862>
1947 .IP \(bu 4
1948 Code like \f(CW\*(C` $value1 =~ qr/.../ ~~ $value2 \*(C'\fR would have the match
1949 converted into a \f(CW\*(C`qr//\*(C'\fR operator, leaving extra elements on the stack to
1950 confuse any surrounding expression.
1951 [GH #15859] <https://github.com/Perl/perl5/issues/15859>
1952 .IP \(bu 4
1953 Since v5.24 in some obscure cases, a regex which included code blocks
1954 from multiple sources (\fIe.g.\fR, via embedded via \f(CW\*(C`qr//\*(C'\fR objects) could end up
1955 with the wrong current pad and crash or give weird results.
1956 [GH #15657] <https://github.com/Perl/perl5/issues/15657>
1957 .IP \(bu 4
1958 Occasionally \f(CWlocal()\fRs in a code block within a pattern weren\*(Aqt being
1959 undone when the pattern matching backtracked over the code block.
1960 [GH #15056] <https://github.com/Perl/perl5/issues/15056>
1961 .IP \(bu 4
1962 Using \f(CWsubstr()\fR to modify a magic variable could access freed memory
1963 in some cases.
1964 [GH #15871] <https://github.com/Perl/perl5/issues/15871>
1965 .IP \(bu 4
1966 Under \f(CW\*(C`use utf8\*(C'\fR, the entire source code is now checked for being UTF\-8
1967 well formed, not just quoted strings as before.
1968 [GH #14973] <https://github.com/Perl/perl5/issues/14973>.
1969 .IP \(bu 4
1970 The range operator \f(CW".."\fR on strings now handles its arguments correctly when in
1971 the scope of the \f(CW\*(C`unicode_strings\*(C'\fR
1972 feature. The previous behaviour was sufficiently unexpected that we believe no
1973 correct program could have made use of it.
1974 .IP \(bu 4
1975 The \f(CW\*(C`split\*(C'\fR operator did not ensure enough space was allocated for
1976 its return value in scalar context. It could then write a single
1977 pointer immediately beyond the end of the memory block allocated for
1978 the stack.
1979 [GH #15749] <https://github.com/Perl/perl5/issues/15749>
1980 .IP \(bu 4
1981 Using a large code point with the \f(CW"W"\fR pack template character with
1982 the current output position aligned at just the right point could
1983 cause a write of a single zero byte immediately beyond the end of an
1984 allocated buffer.
1985 [GH #15572] <https://github.com/Perl/perl5/issues/15572>
1986 .IP \(bu 4
1987 Supplying a format\*(Aqs picture argument as part of the format argument list
1988 where the picture specifies modifying the argument could cause an
1989 access to the new freed compiled format.
1990 [GH #15566] <https://github.com/Perl/perl5/issues/15566>
1991 .IP \(bu 4
1992 The \fBsort()\fR operator\*(Aqs built\-in numeric comparison
1993 function didn\*(Aqt handle large integers that weren\*(Aqt exactly
1994 representable by a double. This now uses the same code used to
1995 implement the \f(CW\*(C`<=>\*(C'\fR operator.
1996 [GH #15768] <https://github.com/Perl/perl5/issues/15768>
1997 .IP \(bu 4
1998 Fix issues with \f(CW\*(C`/(?{ ... <<EOF })/\*(C'\fR that broke
1999 Method::Signatures.
2000 [GH #15779] <https://github.com/Perl/perl5/issues/15779>
2001 .IP \(bu 4
2002 Fixed an assertion failure with \f(CW\*(C`chop\*(C'\fR and \f(CW\*(C`chomp\*(C'\fR, which
2003 could be triggered by \f(CW\*(C`chop(@x =~ tr/1/1/)\*(C'\fR.
2004 [GH #15738] <https://github.com/Perl/perl5/issues/15738>.
2005 .IP \(bu 4
2006 Fixed a comment skipping error in patterns under \f(CW\*(C`/x\*(C'\fR; it could stop
2007 skipping a byte early, which could be in the middle of a UTF\-8
2008 character.
2009 [GH #15790] <https://github.com/Perl/perl5/issues/15790>.
2010 .IP \(bu 4
2011 \&\fIperldb\fR now ignores \fI/dev/tty\fR on non\-Unix systems.
2012 [GH #12244] <https://github.com/Perl/perl5/issues/12244>;
2013 .IP \(bu 4
2014 Fix assertion failure for \f(CW\*(C`{}\->$x\*(C'\fR when \f(CW$x\fR isn\*(Aqt defined.
2015 [GH #15791] <https://github.com/Perl/perl5/issues/15791>.
2016 .IP \(bu 4
2017 Fix an assertion error which could be triggered when a lookahead string
2018 in patterns exceeded a minimum length.
2019 [GH #15796] <https://github.com/Perl/perl5/issues/15796>.
2020 .IP \(bu 4
2021 Only warn once per literal number about a misplaced \f(CW"_"\fR.
2022 [GH #9989] <https://github.com/Perl/perl5/issues/9989>.
2023 .IP \(bu 4
2024 The \f(CW\*(C`tr///\*(C'\fR parse code could be looking at uninitialized data after a
2025 perse error.
2026 [GH #15624] <https://github.com/Perl/perl5/issues/15624>.
2027 .IP \(bu 4
2028 In a pattern match, a back\-reference (\f(CW\*(C`\e1\*(C'\fR) to an unmatched capture could
2029 read back beyond the start of the string being matched.
2030 [GH #15634] <https://github.com/Perl/perl5/issues/15634>.
2031 .IP \(bu 4
2032 \&\f(CW\*(C`use re \*(Aqstrict\*(Aq\*(C'\fR is supposed to warn if you use a range (such as
2033 \&\f(CW\*(C`/(?[ [ X\-Y ] ])/\*(C'\fR) whose start and end digit aren\*(Aqt from the same group
2034 of 10. It didn\*(Aqt do that for five groups of mathematical digits starting
2035 at \f(CW\*(C`U+1D7E\*(C'\fR.
2036 .IP \(bu 4
2037 A sub containing a "forward" declaration with the same name (\fIe.g.\fR,
2038 \&\f(CW\*(C`sub c { sub c; }\*(C'\fR) could sometimes crash or loop infinitely.
2039 [GH #15557] <https://github.com/Perl/perl5/issues/15557>
2040 .IP \(bu 4
2041 A crash in executing a regex with a non\-anchored UTF\-8 substring against a
2042 target string that also used UTF\-8 has been fixed.
2043 [GH #15628] <https://github.com/Perl/perl5/issues/15628>
2044 .IP \(bu 4
2045 Previously, a shebang line like \f(CW\*(C`#!perl \-i u\*(C'\fR could be erroneously
2046 interpreted as requesting the \f(CW\*(C`\-u\*(C'\fR option. This has been fixed.
2047 [GH #15623] <https://github.com/Perl/perl5/issues/15623>
2048 .IP \(bu 4
2049 The regex engine was previously producing incorrect results in some rare
2050 situations when backtracking past an alternation that matches only one
2051 thing; this
2052 showed up as capture buffers (\f(CW$1\fR, \f(CW$2\fR, \fIetc.\fR) erroneously containing data
2053 from regex execution paths that weren\*(Aqt actually executed for the final
2054 match.
2055 [GH #15666] <https://github.com/Perl/perl5/issues/15666>
2056 .IP \(bu 4
2057 Certain regexes making use of the experimental \f(CW\*(C`regex_sets\*(C'\fR feature could
2058 trigger an assertion failure. This has been fixed.
2059 [GH #15620] <https://github.com/Perl/perl5/issues/15620>
2060 .IP \(bu 4
2061 Invalid assignments to a reference constructor (\fIe.g.\fR, \f(CW\*(C`\eeval=time\*(C'\fR) could
2062 sometimes crash in addition to giving a syntax error.
2063 [GH #14815] <https://github.com/Perl/perl5/issues/14815>
2064 .IP \(bu 4
2065 The parser could sometimes crash if a bareword came after \f(CW\*(C`evalbytes\*(C'\fR.
2066 [GH #15586] <https://github.com/Perl/perl5/issues/15586>
2067 .IP \(bu 4
2068 Autoloading via a method call would warn erroneously ("Use of inherited
2069 AUTOLOAD for non\-method") if there was a stub present in the package into
2070 which the invocant had been blessed. The warning is no longer emitted in
2071 such circumstances.
2072 [GH #9094] <https://github.com/Perl/perl5/issues/9094>
2073 .IP \(bu 4
2074 The use of \f(CW\*(C`splice\*(C'\fR on arrays with non\-existent elements could cause other
2075 operators to crash.
2076 [GH #15577] <https://github.com/Perl/perl5/issues/15577>
2077 .IP \(bu 4
2078 A possible buffer overrun when a pattern contains a fixed utf8 substring.
2079 [GH #15534] <https://github.com/Perl/perl5/issues/15534>
2080 .IP \(bu 4
2081 Fixed two possible use\-after\-free bugs in perl\*(Aqs lexer.
2082 [GH #15549] <https://github.com/Perl/perl5/issues/15549>
2083 .IP \(bu 4
2084 Fixed a crash with \f(CW\*(C`s///l\*(C'\fR where it thought it was dealing with UTF\-8
2085 when it wasn\*(Aqt.
2086 [GH #15543] <https://github.com/Perl/perl5/issues/15543>
2087 .IP \(bu 4
2088 Fixed a place where the regex parser was not setting the syntax error
2089 correctly on a syntactically incorrect pattern.
2090 [GH #15565] <https://github.com/Perl/perl5/issues/15565>
2091 .IP \(bu 4
2092 The \f(CW\*(C`&.\*(C'\fR operator (and the \f(CW"&"\fR operator, when it treats its arguments as
2093 strings) were failing to append a trailing null byte if at least one string
2094 was marked as utf8 internally. Many code paths (system calls, regexp
2095 compilation) still expect there to be a null byte in the string buffer
2096 just past the end of the logical string. An assertion failure was the
2097 result.
2098 [GH #15606] <https://github.com/Perl/perl5/issues/15606>
2099 .IP \(bu 4
2100 Avoid a heap\-after\-use error in the parser when creating an error message
2101 for a syntactically invalid heredoc.
2102 [GH #15527] <https://github.com/Perl/perl5/issues/15527>
2103 .IP \(bu 4
2104 Fix a segfault when run with \f(CW\*(C`\-DC\*(C'\fR options on DEBUGGING builds.
2105 [GH #15563] <https://github.com/Perl/perl5/issues/15563>
2106 .IP \(bu 4
2107 Fixed the parser error handling in subroutine attributes for an
2108 \&\*(Aq\f(CW\*(C`:attr(foo\*(C'\fR\*(Aq that does not have an ending \*(Aq\f(CW")"\fR\*(Aq.
2109 .IP \(bu 4
2110 Fix the perl lexer to correctly handle a backslash as the last char in
2111 quoted\-string context. This actually fixed two bugs,
2112 [GH #15546] <https://github.com/Perl/perl5/issues/15546> and
2113 [GH #15582] <https://github.com/Perl/perl5/issues/15582>.
2114 .IP \(bu 4
2115 In the API function \f(CW\*(C`gv_fetchmethod_pvn_flags\*(C'\fR, rework separator parsing
2116 to prevent possible string overrun with an invalid \f(CW\*(C`len\*(C'\fR argument.
2117 [GH #15598] <https://github.com/Perl/perl5/issues/15598>
2118 .IP \(bu 4
2119 Problems with in\-place array sorts: code like \f(CW\*(C`@a = sort { ... } @a\*(C'\fR,
2120 where the source and destination of the sort are the same plain array, are
2121 optimised to do less copying around. Two side\-effects of this optimisation
2122 were that the contents of \f(CW@a\fR as seen by sort routines were
2123 partially sorted; and under some circumstances accessing \f(CW@a\fR during the
2124 sort could crash the interpreter. Both these issues have been fixed, and
2125 Sort functions see the original value of \f(CW@a\fR.
2126 [GH #15387] <https://github.com/Perl/perl5/issues/15387>
2127 .IP \(bu 4
2128 Non\-ASCII string delimiters are now reported correctly in error messages
2129 for unterminated strings.
2130 [GH #15469] <https://github.com/Perl/perl5/issues/15469>
2131 .IP \(bu 4
2132 \&\f(CW\*(C`pack("p", ...)\*(C'\fR used to emit its warning ("Attempt to pack pointer to
2133 temporary value") erroneously in some cases, but has been fixed.
2134 .IP \(bu 4
2135 \&\f(CW@DB::args\fR is now exempt from "used once" warnings. The warnings only
2136 occurred under \fB\-w\fR, because \fIwarnings.pm\fR itself uses \f(CW@DB::args\fR
2137 multiple times.
2138 .IP \(bu 4
2139 The use of built\-in arrays or hash slices in a double\-quoted string no
2140 longer issues a warning ("Possible unintended interpolation...") if the
2141 variable has not been mentioned before. This affected code like
2142 \&\f(CW\*(C`qq|@DB::args|\*(C'\fR and \f(CW\*(C`qq|@SIG{\*(AqCHLD\*(Aq, \*(AqHUP\*(Aq}|\*(C'\fR. (The special variables
2143 \&\f(CW\*(C`@\-\*(C'\fR and \f(CW\*(C`@+\*(C'\fR were already exempt from the warning.)
2144 .IP \(bu 4
2145 \&\f(CW\*(C`gethostent\*(C'\fR and similar functions now perform a null check internally, to
2146 avoid crashing with the torsocks library. This was a regression from v5.22.
2147 [GH #15478] <https://github.com/Perl/perl5/issues/15478>
2148 .IP \(bu 4
2149 \&\f(CW\*(C`defined *{\*(Aq!\*(Aq}\*(C'\fR, \f(CW\*(C`defined *{\*(Aq[\*(Aq}\*(C'\fR, and \f(CW\*(C`defined *{\*(Aq\-\*(Aq}\*(C'\fR no longer leak
2150 memory if the typeglob in question has never been accessed before.
2151 .IP \(bu 4
2152 Mentioning the same constant twice in a row (which is a syntax error) no
2153 longer fails an assertion under debugging builds. This was a regression
2154 from v5.20.
2155 [GH #15017] <https://github.com/Perl/perl5/issues/15017>
2156 .IP \(bu 4
2157 Many issues relating to \f(CW\*(C`printf "%a"\*(C'\fR of hexadecimal floating point
2158 were fixed. In addition, the "subnormals" (formerly known as "denormals")
2159 floating point numbers are now supported both with the plain IEEE 754
2160 floating point numbers (64\-bit or 128\-bit) and the x86 80\-bit
2161 "extended precision". Note that subnormal hexadecimal floating
2162 point literals will give a warning about "exponent underflow".
2163 [GH #15495] <https://github.com/Perl/perl5/issues/15495>
2164 [GH #15503] <https://github.com/Perl/perl5/issues/15503>
2165 [GH #15504] <https://github.com/Perl/perl5/issues/15504>
2166 [GH #15505] <https://github.com/Perl/perl5/issues/15505>
2167 [GH #15510] <https://github.com/Perl/perl5/issues/15510>
2168 [GH #15512] <https://github.com/Perl/perl5/issues/15512>
2169 .IP \(bu 4
2170 A regression in v5.24 with \f(CW\*(C`tr/\eN{U+...}/foo/\*(C'\fR when the code point was between
2171 128 and 255 has been fixed.
2172 [GH #15475] <https://github.com/Perl/perl5/issues/15475>.
2173 .IP \(bu 4
2174 Use of a string delimiter whose code point is above 2**31 now works
2175 correctly on platforms that allow this. Previously, certain characters,
2176 due to truncation, would be confused with other delimiter characters
2177 with special meaning (such as \f(CW"?"\fR in \f(CW\*(C`m?...?\*(C'\fR), resulting
2178 in inconsistent behaviour. Note that this is non\-portable,
2179 and is based on Perl\*(Aqs extension to UTF\-8, and is probably not
2180 displayable nor enterable by any editor.
2181 [GH #15477] <https://github.com/Perl/perl5/issues/15477>
2182 .IP \(bu 4
2183 \&\f(CW\*(C`@{x\*(C'\fR followed by a newline where \f(CW"x"\fR represents a control or non\-ASCII
2184 character no longer produces a garbled syntax error message or a crash.
2185 [GH #15518] <https://github.com/Perl/perl5/issues/15518>
2186 .IP \(bu 4
2187 An assertion failure with \f(CW\*(C`%: = 0\*(C'\fR has been fixed.
2188 [GH #15358] <https://github.com/Perl/perl5/issues/15358>
2189 .IP \(bu 4
2190 In Perl 5.18, the parsing of \f(CW"$foo::$bar"\fR was accidentally changed, such
2191 that it would be treated as \f(CW\*(C`$foo."::".$bar\*(C'\fR. The previous behavior, which
2192 was to parse it as \f(CW\*(C`$foo:: . $bar\*(C'\fR, has been restored.
2193 [GH #15408] <https://github.com/Perl/perl5/issues/15408>
2194 .IP \(bu 4
2195 Since Perl 5.20, line numbers have been off by one when perl is invoked with
2196 the \fB\-x\fR switch. This has been fixed.
2197 [GH #15413] <https://github.com/Perl/perl5/issues/15413>
2198 .IP \(bu 4
2199 Vivifying a subroutine stub in a deleted stash (\fIe.g.\fR,
2200 \&\f(CW\*(C`delete $My::{"Foo::"}; \e&My::Foo::foo\*(C'\fR) no longer crashes. It had begun
2201 crashing in Perl 5.18.
2202 [GH #15420] <https://github.com/Perl/perl5/issues/15420>
2203 .IP \(bu 4
2204 Some obscure cases of subroutines and file handles being freed at the same time
2205 could result in crashes, but have been fixed. The crash was introduced in Perl
2206 5.22.
2207 [GH #15435] <https://github.com/Perl/perl5/issues/15435>
2208 .IP \(bu 4
2209 Code that looks for a variable name associated with an uninitialized value
2210 could cause an assertion failure in cases where magic is involved, such as
2211 \&\f(CW\*(C`$ISA[0][0]\*(C'\fR. This has now been fixed.
2212 [GH #15364] <https://github.com/Perl/perl5/issues/15364>
2213 .IP \(bu 4
2214 A crash caused by code generating the warning "Subroutine STASH::NAME
2215 redefined" in cases such as \f(CW\*(C`sub P::f{} undef *P::; *P::f =sub{};\*(C'\fR has been
2216 fixed. In these cases, where the STASH is missing, the warning will now appear
2217 as "Subroutine NAME redefined".
2218 [GH #15368] <https://github.com/Perl/perl5/issues/15368>
2219 .IP \(bu 4
2220 Fixed an assertion triggered by some code that handles deprecated behavior in
2221 formats, \fIe.g.\fR, in cases like this:
2222 .Sp
2223 .Vb 3
2224 \& format STDOUT =
2225 \& @
2226 \& 0"$x"
2227 .Ve
2228 .Sp
2229 [GH #15366] <https://github.com/Perl/perl5/issues/15366>
2230 .IP \(bu 4
2231 A possible divide by zero in string transformation code on Windows has been
2232 avoided, fixing a crash when collating an empty string.
2233 [GH #15439] <https://github.com/Perl/perl5/issues/15439>
2234 .IP \(bu 4
2235 Some regular expression parsing glitches could lead to assertion failures with
2236 regular expressions such as \f(CW\*(C`/(?<=/\*(C'\fR and \f(CW\*(C`/(?<!/\*(C'\fR. This has now been fixed.
2237 [GH #15332] <https://github.com/Perl/perl5/issues/15332>
2238 .IP \(bu 4
2239 \&\f(CW\*(C` until ($x = 1) { ... } \*(C'\fR and \f(CW\*(C` ... until $x = 1 \*(C'\fR now properly
2240 warn when syntax warnings are enabled.
2241 [GH #15138] <https://github.com/Perl/perl5/issues/15138>
2242 .IP \(bu 4
2243 \&\fBsocket()\fR now leaves the error code returned by the system in \f(CW$!\fR on
2244 failure.
2245 [GH #15383] <https://github.com/Perl/perl5/issues/15383>
2246 .IP \(bu 4
2247 Assignment variants of any bitwise ops under the \f(CW\*(C`bitwise\*(C'\fR feature would
2248 crash if the left\-hand side was an array or hash.
2249 [GH #15346] <https://github.com/Perl/perl5/issues/15346>
2250 .IP \(bu 4
2251 \&\f(CW\*(C`require\*(C'\fR followed by a single colon (as in \f(CW\*(C`foo() ? require : ...\*(C'\fR is
2252 now parsed correctly as \f(CW\*(C`require\*(C'\fR with implicit \f(CW$_\fR, rather than
2253 \&\f(CW\*(C`require ""\*(C'\fR.
2254 [GH #15380] <https://github.com/Perl/perl5/issues/15380>
2255 .IP \(bu 4
2256 Scalar \f(CW\*(C`keys %hash\*(C'\fR can now be assigned to consistently in all scalar
2257 lvalue contexts. Previously it worked for some contexts but not others.
2258 .IP \(bu 4
2259 List assignment to \f(CW\*(C`vec\*(C'\fR or \f(CW\*(C`substr\*(C'\fR with an array or hash for its first
2260 argument used to result in crashes or "Can\*(Aqt coerce" error messages at run
2261 time, unlike scalar assignment, which would give an error at compile time.
2262 List assignment now gives a compile\-time error, too.
2263 [GH #15370] <https://github.com/Perl/perl5/issues/15370>
2264 .IP \(bu 4
2265 Expressions containing an \f(CW\*(C`&&\*(C'\fR or \f(CW\*(C`||\*(C'\fR operator (or their synonyms \f(CW\*(C`and\*(C'\fR
2266 and \f(CW\*(C`or\*(C'\fR) were being compiled incorrectly in some cases. If the left\-hand
2267 side consisted of either a negated bareword constant or a negated \f(CW\*(C`do {}\*(C'\fR
2268 block containing a constant expression, and the right\-hand side consisted of
2269 a negated non\-foldable expression, one of the negations was effectively
2270 ignored. The same was true of \f(CW\*(C`if\*(C'\fR and \f(CW\*(C`unless\*(C'\fR statement modifiers,
2271 though with the left\-hand and right\-hand sides swapped. This long\-standing
2272 bug has now been fixed.
2273 [GH #15285] <https://github.com/Perl/perl5/issues/15285>
2274 .IP \(bu 4
2275 \&\f(CW\*(C`reset\*(C'\fR with an argument no longer crashes when encountering stash entries
2276 other than globs.
2277 [GH #15314] <https://github.com/Perl/perl5/issues/15314>
2278 .IP \(bu 4
2279 Assignment of hashes to, and deletion of, typeglobs named \f(CW*::::::\fR no
2280 longer causes crashes.
2281 [GH #15307] <https://github.com/Perl/perl5/issues/15307>
2282 .IP \(bu 4
2283 Perl wasn\*(Aqt correctly handling true/false values in the LHS of a list
2284 assign; specifically the truth values returned by boolean operators.
2285 This could trigger an assertion failure in something like the following:
2286 .Sp
2287 .Vb 3
2288 \& for ($x > $y) {
2289 \& ($_, ...) = (...); # here $_ is aliased to a truth value
2290 \& }
2291 .Ve
2292 .Sp
2293 This was a regression from v5.24.
2294 [GH #15690] <https://github.com/Perl/perl5/issues/15690>
2295 .IP \(bu 4
2296 Assertion failure with user\-defined Unicode\-like properties.
2297 [GH #15696] <https://github.com/Perl/perl5/issues/15696>
2298 .IP \(bu 4
2299 Fix error message for unclosed \f(CW\*(C`\eN{\*(C'\fR in a regex. An unclosed \f(CW\*(C`\eN{\*(C'\fR
2300 could give the wrong error message:
2301 \&\f(CW"\eN{NAME} must be resolved by the lexer"\fR.
2302 .IP \(bu 4
2303 List assignment in list context where the LHS contained aggregates and
2304 where there were not enough RHS elements, used to skip scalar lvalues.
2305 Previously, \f(CW\*(C`(($a,$b,@c,$d) = (1))\*(C'\fR in list context returned \f(CW\*(C`($a)\*(C'\fR; now
2306 it returns \f(CW\*(C`($a,$b,$d)\*(C'\fR. \f(CW\*(C`(($a,$b,$c) = (1))\*(C'\fR is unchanged: it still
2307 returns \f(CW\*(C`($a,$b,$c)\*(C'\fR. This can be seen in the following:
2308 .Sp
2309 .Vb 2
2310 \& sub inc { $_++ for @_ }
2311 \& inc(($a,$b,@c,$d) = (10))
2312 .Ve
2313 .Sp
2314 Formerly, the values of \f(CW\*(C`($a,$b,$d)\*(C'\fR would be left as \f(CW\*(C`(11,undef,undef)\*(C'\fR;
2315 now they are \f(CW\*(C`(11,1,1)\*(C'\fR.
2316 .IP \(bu 4
2317 Code like this: \f(CW\*(C`/(?{ s!!! })/\*(C'\fR could trigger infinite recursion on the C
2318 stack (not the normal perl stack) when the last successful pattern in
2319 scope is itself. We avoid the segfault by simply forbidding the use of
2320 the empty pattern when it would resolve to the currently executing
2321 pattern.
2322 [GH #15669] <https://github.com/Perl/perl5/issues/15669>
2323 .IP \(bu 4
2324 Avoid reading beyond the end of the line buffer in perl\*(Aqs lexer when
2325 there\*(Aqs a short UTF\-8 character at the end.
2326 [GH #15531] <https://github.com/Perl/perl5/issues/15531>
2327 .IP \(bu 4
2328 Alternations in regular expressions were sometimes failing to match
2329 a utf8 string against a utf8 alternate.
2330 [GH #15680] <https://github.com/Perl/perl5/issues/15680>
2331 .IP \(bu 4
2332 Make \f(CW\*(C`do "a\e0b"\*(C'\fR fail silently (and return \f(CW\*(C`undef\*(C'\fR and set \f(CW$!\fR)
2333 instead of throwing an error.
2334 [GH #15676] <https://github.com/Perl/perl5/issues/15676>
2335 .IP \(bu 4
2336 \&\f(CW\*(C`chdir\*(C'\fR with no argument didn\*(Aqt ensure that there was stack space
2337 available for returning its result.
2338 [GH #15569] <https://github.com/Perl/perl5/issues/15569>
2339 .IP \(bu 4
2340 All error messages related to \f(CW\*(C`do\*(C'\fR now refer to \f(CW\*(C`do\*(C'\fR; some formerly
2341 claimed to be from \f(CW\*(C`require\*(C'\fR instead.
2342 .IP \(bu 4
2343 Executing \f(CW\*(C`undef $x\*(C'\fR where \f(CW$x\fR is tied or magical no longer incorrectly
2344 blames the variable for an uninitialized\-value warning encountered by the
2345 tied/magical code.
2346 .IP \(bu 4
2347 Code like \f(CW\*(C`$x = $x . "a"\*(C'\fR was incorrectly failing to yield a
2348 use of uninitialized value
2349 warning when \f(CW$x\fR was a lexical variable with an undefined value. That has
2350 now been fixed.
2351 [GH #15269] <https://github.com/Perl/perl5/issues/15269>
2352 .IP \(bu 4
2353 \&\f(CW\*(C`undef *_; shift\*(C'\fR or \f(CW\*(C`undef *_; pop\*(C'\fR inside a subroutine, with no
2354 argument to \f(CW\*(C`shift\*(C'\fR or \f(CW\*(C`pop\*(C'\fR, began crashing in Perl 5.14, but has now
2355 been fixed.
2356 .IP \(bu 4
2357 \&\f(CW"string$scalar\->$*"\fR now correctly prefers concatenation
2358 overloading to string overloading if \f(CW\*(C`$scalar\->$*\*(C'\fR returns an
2359 overloaded object, bringing it into consistency with \f(CW$$scalar\fR.
2360 .IP \(bu 4
2361 \&\f(CW\*(C`/@0{0*\->@*/*0\*(C'\fR and similar contortions used to crash, but no longer
2362 do, but merely produce a syntax error.
2363 [GH #15333] <https://github.com/Perl/perl5/issues/15333>
2364 .IP \(bu 4
2365 \&\f(CW\*(C`do\*(C'\fR or \f(CW\*(C`require\*(C'\fR with an argument which is a reference or typeglob
2366 which, when stringified,
2367 contains a null character, started crashing in Perl 5.20, but has now been
2368 fixed.
2369 [GH #15337] <https://github.com/Perl/perl5/issues/15337>
2370 .IP \(bu 4
2371 Improve the error message for a missing \f(CWtie()\fR package/method. This
2372 brings the error messages in line with the ones used for normal method
2373 calls.
2374 .IP \(bu 4
2375 Parsing bad POSIX charclasses no longer leaks memory.
2376 [GH #15382] <https://github.com/Perl/perl5/issues/15382>
2377 .SH "Known Problems"
2378 .IX Header "Known Problems"
2379 .IP \(bu 4
2380 G++ 6 handles subnormal (denormal) floating point values differently
2381 than gcc 6 or g++ 5 resulting in "flush\-to\-zero". The end result is
2382 that if you specify very small values using the hexadecimal floating
2383 point format, like \f(CW\*(C`0x1.fffffffffffffp\-1022\*(C'\fR, they become zeros.
2384 [GH #15990] <https://github.com/Perl/perl5/issues/15990>
2385 .SH "Errata From Previous Releases"
2386 .IX Header "Errata From Previous Releases"
2387 .IP \(bu 4
2388 Fixed issues with recursive regexes. The behavior was fixed in Perl 5.24.
2389 [GH #14935] <https://github.com/Perl/perl5/issues/14935>
2390 .SH Obituary
2391 .IX Header "Obituary"
2392 Jon Portnoy (AVENJ), a prolific Perl author and admired Gentoo community
2393 member, has passed away on August 10, 2016. He will be remembered and
2394 missed by all those who he came in contact with, and enriched with his
2395 intellect, wit, and spirit.
2396 .PP
2397 It is with great sadness that we also note Kip Hampton\*(Aqs passing. Probably
2398 best known as the author of the Perl & XML column on XML.com, he was a
2399 core contributor to AxKit, an XML server platform that became an Apache
2400 Foundation project. He was a frequent speaker in the early days at
2401 OSCON, and most recently at YAPC::NA in Madison. He was frequently on
2402 irc.perl.org as ubu, generally in the #axkit\-dahut community, the
2403 group responsible for YAPC::NA Asheville in 2011.
2404 .PP
2405 Kip and his constant contributions to the community will be greatly
2406 missed.
2407 .SH Acknowledgements
2408 .IX Header "Acknowledgements"
2409 Perl 5.26.0 represents approximately 13 months of development since Perl 5.24.0
2410 and contains approximately 360,000 lines of changes across 2,600 files from 86
2411 authors.
2412 .PP
2413 Excluding auto\-generated files, documentation and release tools, there were
2414 approximately 230,000 lines of changes to 1,800 .pm, .t, .c and .h files.
2415 .PP
2416 Perl continues to flourish into its third decade thanks to a vibrant community
2417 of users and developers. The following people are known to have contributed the
2418 improvements that became Perl 5.26.0:
2419 .PP
2420 Aaron Crane, Abigail, Ævar Arnfjörð Bjarmason, Alex Vandiver, Andreas
2421 König, Andreas Voegele, Andrew Fresh, Andy Lester, Aristotle Pagaltzis, Chad
2422 Granum, Chase Whitener, Chris \*(AqBinGOs\*(Aq Williams, Chris Lamb, Christian Hansen,
2423 Christian Millour, Colin Newell, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan
2424 Collins, Daniel Dragan, Dave Cross, Dave Rolsky, David Golden, David H.
2425 Gutteridge, David Mitchell, Dominic Hargreaves, Doug Bell, E. Choroba, Ed Avis,
2426 Father Chrysostomos, François Perrad, Hauke D, H.Merijn Brand, Hugo van der
2427 Sanden, Ivan Pozdeev, James E Keenan, James Raspass, Jarkko Hietaniemi, Jerry
2428 D. Hedden, Jim Cromie, J. Nick Koston, John Lightsey, Karen Etheridge, Karl
2429 Williamson, Leon Timmermans, Lukas Mai, Matthew Horsfall, Maxwell Carey, Misty
2430 De Meo, Neil Bowers, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Paul
2431 Marquess, Peter Avalos, Petr Písař, Pino Toscano, Rafael Garcia\-Suarez, Reini
2432 Urban, Renee Baecker, Ricardo Signes, Richard Levitte, Rick Delaney, Salvador
2433 Fandiño, Samuel Thibault, Sawyer X, Sébastien Aperghis\-Tramoni, Sergey
2434 Aleynikov, Shlomi Fish, Smylers, Stefan Seifert, Steffen Müller, Stevan
2435 Little, Steve Hay, Steven Humphrey, Sullivan Beck, Theo Buehler, Thomas Sibley,
2436 Todd Rinaldo, Tomasz Konojacki, Tony Cook, Unicode Consortium, Yaroslav Kuzmin,
2437 Yves Orton, Zefram.
2438 .PP
2439 The list above is almost certainly incomplete as it is automatically generated
2440 from version control history. In particular, it does not include the names of
2441 the (very much appreciated) contributors who reported issues to the Perl bug
2442 tracker.
2443 .PP
2444 Many of the changes included in this version originated in the CPAN modules
2445 included in Perl\*(Aqs core. We\*(Aqre grateful to the entire CPAN community for
2446 helping Perl to flourish.
2447 .PP
2448 For a more complete list of all of Perl\*(Aqs historical contributors, please see
2449 the \fIAUTHORS\fR file in the Perl source distribution.
2450 .SH "Reporting Bugs"
2451 .IX Header "Reporting Bugs"
2452 If you find what you think is a bug, you might check the perl bug database at
2453 <https://rt.perl.org/>. There may also be information at
2454 <http://www.perl.org/>, the Perl Home Page.
2455 .PP
2456 If you believe you have an unreported bug, please run the perlbug program
2457 included with your release. Be sure to trim your bug down to a tiny but
2458 sufficient test case. Your bug report, along with the output of \f(CW\*(C`perl \-V\*(C'\fR,
2459 will be sent off to \f(CW\*(C`[email protected]\*(C'\fR to be analysed by the Perl porting team.
2460 .PP
2461 If the bug you are reporting has security implications which make it
2462 inappropriate to send to a publicly archived mailing list, then see
2463 "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec
2464 for details of how to report the issue.
2465 .SH "Give Thanks"
2466 .IX Header "Give Thanks"
2467 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
2468 you can do so by running the \f(CW\*(C`perlthanks\*(C'\fR program:
2469 .PP
2470 .Vb 1
2471 \& perlthanks
2472 .Ve
2473 .PP
2474 This will send an email to the Perl 5 Porters list with your show of thanks.
2475 .SH "SEE ALSO"
2476 .IX Header "SEE ALSO"
2477 The \fIChanges\fR file for an explanation of how to view exhaustive details on
2478 what changed.
2479 .PP
2480 The \fIINSTALL\fR file for how to build Perl.
2481 .PP
2482 The \fIREADME\fR file for general stuff.
2483 .PP
2484 The \fIArtistic\fR and \fICopying\fR files for copyright information.