This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
epigraphs.pod: Adding announcement email link
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
2c8edc25 5perldelta - what is new for perl v5.26.0
eabfc7bc 6
2cfe9b50 7=head1 DESCRIPTION
eabfc7bc 8
2c8edc25
S
9This document describes the differences between the 5.24.0 release and the
105.26.0 release.
11
89853d76
DH
12=head1 Notice
13
16beba24 14This release includes three updates with widespread effects:
89853d76
DH
15
16=over 4
17
df48f9a4 18=item * C<"."> no longer in C<@INC>
89853d76 19
df48f9a4 20For security reasons, the current directory (C<".">) is no longer included
8ab76fe6
DM
21by default at the end of the module search path (C<@INC>). This may have
22widespread implications for the building, testing and installing of
23modules, and for the execution of scripts. See the section
48e85ff2 24L<< Removal of the current directory (C<".">) from C<@INC> >>
8ab76fe6 25for the full details.
89853d76
DH
26
27=item * C<do> may now warn
28
8928e7db 29C<do> now gives a deprecation warning when it fails to load a file which
df48f9a4 30it would have loaded had C<"."> been in C<@INC>.
89853d76 31
16beba24
KW
32=item * In regular expression patterns, a literal left brace C<"{">
33should be escaped
34
35See L</Unescaped literal C<"{"> characters in regular expression patterns are no longer permissible>.
36
89853d76
DH
37=back
38
2c8edc25 39=head1 Core Enhancements
f3ed8cbf 40
22a7b456 41=head2 Lexical subroutines are no longer experimental
2c8edc25 42
22a7b456
DM
43Using the C<lexical_subs> feature introduced in v5.18 no longer emits a warning. Existing
44code that disables the C<experimental::lexical_subs> warning category
45that the feature previously used will continue to work. The
46C<lexical_subs> feature has no effect; all Perl code can use lexical
47subroutines, regardless of what feature declarations are in scope.
2c8edc25
S
48
49=head2 Indented Here-documents
50
df48f9a4 51This adds a new modifier C<"~"> to here-docs that tells the parser
0f032fe1 52that it should look for C</^\s*$DELIM\n/> as the closing delimiter.
2c8edc25
S
53
54These syntaxes are all supported:
55
56 <<~EOF;
57 <<~\EOF;
58 <<~'EOF';
59 <<~"EOF";
60 <<~`EOF`;
61 <<~ 'EOF';
62 <<~ "EOF";
63 <<~ `EOF`;
64
df48f9a4 65The C<"~"> modifier will strip, from each line in the here-doc, the
2c8edc25
S
66same whitespace that appears before the delimiter.
67
fce64130 68Newlines will be copied as-is, and lines that don't include the
2c8edc25
S
69proper beginning whitespace will cause perl to croak.
70
71For example:
72
73 if (1) {
74 print <<~EOF;
75 Hello there
76 EOF
77 }
78
79prints "Hello there\n" with no leading whitespace.
80
22a7b456
DM
81=head2 New regular expression modifier C</xx>
82
df48f9a4 83Specifying two C<"x"> characters to modify a regular expression pattern
22a7b456
DM
84does everything that a single one does, but additionally TAB and SPACE
85characters within a bracketed character class are generally ignored and
86can be added to improve readability, like
87S<C</[ ^ A-Z d-f p-x ]/xx>>. Details are at
88L<perlre/E<sol>x and E<sol>xx>.
89
0f032fe1 90=head2 C<@{^CAPTURE}>, C<%{^CAPTURE}>, and C<%{^CAPTURE_ALL}>
2c8edc25
S
91
92C<@{^CAPTURE}> exposes the capture buffers of the last match as an
95b17558 93array. So C<$1> is C<${^CAPTURE}[0]>. This is a more efficient equivalent
95013431 94to code like C<substr($matched_string,$-[0],$+[0]-$-[0])>, and you don't
95b17558 95have to keep track of the C<$matched_string> either. This variable has no
fb5d4b1a
KW
96single character equivalent. Note that, like the other regex magic variables,
97the contents of this variable is dynamic; if you wish to store it beyond
95013431 98the lifetime of the match you must copy it to another array.
2c8edc25 99
fb5d4b1a 100C<%{^CAPTURE}> is equivalent to C<%+> (I<i.e.>, named captures). Other than
95013431 101being more self documenting there is no difference between the two forms.
2c8edc25 102
fb5d4b1a 103C<%{^CAPTURE_ALL}> is equivalent to C<%-> (I<i.e.>, all named captures).
95013431
YO
104Other than being more self documenting there is no difference between the
105two forms.
2c8edc25 106
22a7b456
DM
107=head2 Declaring a reference to a variable
108
109As an experimental feature, Perl now allows the referencing operator to come
110after L<C<my()>|perlfunc/my>, L<C<state()>|perlfunc/state>,
111L<C<our()>|perlfunc/our>, or L<C<local()>|perlfunc/local>. This syntax must
112be enabled with C<use feature 'declared_refs'>. It is experimental, and will
113warn by default unless C<no warnings 'experimental::refaliasing'> is in effect.
114It is intended mainly for use in assignments to references. For example:
115
116 use experimental 'refaliasing', 'declared_refs';
117 my \$a = \$b;
118
119See L<perlref/Assigning to References> for more details.
120
2c8edc25
S
121=head2 Unicode 9.0 is now supported
122
123A list of changes is at L<http://www.unicode.org/versions/Unicode9.0.0/>.
124Modules that are shipped with core Perl but not maintained by p5p do not
125necessarily support Unicode 9.0. L<Unicode::Normalize> does work on 9.0.
126
127=head2 Use of C<\p{I<script>}> uses the improved Script_Extensions property
128
129Unicode 6.0 introduced an improved form of the Script (C<sc>) property, and
f6ac1635
KW
130called it Script_Extensions (C<scx>). Perl now uses this improved
131version when a property is specified as just C<\p{I<script>}>. This
132should make programs be more accurate when determining if a character is
133used in a given script, but there is a slight chance of breakage for
134programs that very specifically needed the old behavior. The meaning of
135compound forms, like C<\p{sc=I<script>}> are unchanged. See
136L<perlunicode/Scripts>.
2c8edc25 137
2c8edc25
S
138=head2 Perl can now do default collation in UTF-8 locales on platforms
139that support it
a049258c 140
2c8edc25
S
141Some platforms natively do a reasonable job of collating and sorting in
142UTF-8 locales. Perl now works with those. For portability and full
143control, L<Unicode::Collate> is still recommended, but now you may
144not need to do anything special to get good-enough results, depending on
145your application. See
146L<perllocale/Category C<LC_COLLATE>: Collation: Text Comparisons and Sorting>.
147
148=head2 Better locale collation of strings containing embedded C<NUL>
149characters
150
fce64130 151In locales that have multi-level character weights, C<NUL>s are now
2c8edc25
S
152ignored at the higher priority ones. There are still some gotchas in
153some strings, though. See
154L<perllocale/Collation of strings containing embedded C<NUL> characters>.
155
2c8edc25
S
156=head2 C<CORE> subroutines for hash and array functions callable via
157reference
158
fb5d4b1a
KW
159The hash and array functions in the C<CORE> namespace (C<keys>, C<each>,
160C<values>, C<push>, C<pop>, C<shift>, C<unshift> and C<splice>) can now
2c8edc25 161be called with ampersand syntax (C<&CORE::keys(\%hash>) and via reference
e6abae1c 162(C<< my $k = \&CORE::keys; $k-E<gt>(\%hash) >>). Previously they could only be
2c8edc25
S
163used when inlined.
164
22a7b456
DM
165=head2 New Hash Function For 64-bit Builds
166
167We have switched to a hybrid hash function to better balance
168performance for short and long keys.
169
170For short keys, 16 bytes and under, we use an optimised variant of
171One At A Time Hard, and for longer keys we use Siphash 1-3. For very
172long keys this is a big improvement in performance. For shorter keys
173there is a modest improvement.
174
a049258c
S
175=head1 Security
176
df48f9a4 177=head2 Removal of the current directory (C<".">) from C<@INC>
2c8edc25 178
95b17558 179The perl binary includes a default set of paths in C<@INC>. Historically
df48f9a4 180it has also included the current directory (C<".">) as the final entry,
95b17558 181unless run with taint mode enabled (C<perl -T>). While convenient, this has
89853d76
DH
182security implications: for example, where a script attempts to load an
183optional module when its current directory is untrusted (such as F</tmp>),
184it could load and execute code from under that directory.
185
df48f9a4 186Starting with v5.26, C<"."> is always removed by default, not just under
95b17558 187tainting. This has major implications for installing modules and executing
89853d76
DH
188scripts.
189
190The following new features have been added to help ameliorate these
191issues.
192
193=over
194
195=item * C<Configure -Udefault_inc_excludes_dot>
196
197There is a new C<Configure> option, C<default_inc_excludes_dot> (enabled
df48f9a4 198by default) which builds a perl executable without C<".">; unsetting this
95b17558 199option using C<-U> reverts perl to the old behaviour. This may fix your
89853d76
DH
200path issues but will reintroduce all the security concerns, so don't
201build a perl executable like this unless you're I<really> confident that
202such issues are not a concern in your environment.
203
409c12ef 204=item * C<PERL_USE_UNSAFE_INC>
89853d76
DH
205
206There is a new environment variable recognised by the perl interpreter.
df48f9a4
KW
207If this variable has the value 1 when the perl interpreter starts up,
208then C<"."> will be automatically appended to C<@INC> (except under tainting).
89853d76
DH
209
210This allows you restore the old perl interpreter behaviour on a
95b17558 211case-by-case basis. But note that this is intended to be a temporary crutch,
89853d76
DH
212and this feature will likely be removed in some future perl version.
213It is currently set by the C<cpan> utility and C<Test::Harness> to
fce64130 214ease installation of CPAN modules which have not been updated to handle the
95b17558 215lack of dot. Once again, don't use this unless you are sure that this
89853d76
DH
216will not reintroduce any security concerns.
217
96e0fd86 218=item * A new deprecation warning issued by C<do>.
89853d76
DH
219
220While it is well-known that C<use> and C<require> use C<@INC> to search
221for the file to load, many people don't realise that C<do "file"> also
df48f9a4 222searches C<@INC> if the file is a relative path. With the removal of C<".">,
89853d76 223a simple C<do "file.pl"> will fail to read in and execute C<file.pl> from
95b17558 224the current directory. Since this is commonly expected behaviour, a new
96e0fd86 225deprecation warning is now issued whenever C<do> fails to load a file which
89853d76
DH
226it otherwise would have found if dot had been in C<@INC>.
227
228=back
229
230Here are some things script and module authors may need to do to make
231their software work in the new regime.
232
233=over
234
235=item * Script authors
236
237If the issue is within your own code (rather than within included
95b17558 238modules), then you have two main options. Firstly, if you are confident
89853d76 239that your script will only be run within a trusted directory (under which
df48f9a4 240you expect to find trusted files and modules), then add C<"."> back into the
fce64130 241path; I<e.g.>:
89853d76
DH
242
243 BEGIN {
244 my $dir = "/some/trusted/directory";
245 chdir $dir or die "Can't chdir to $dir: $!\n";
246 # safe now
247 push @INC, '.';
248 }
249 use "Foo::Bar"; # may load /some/trusted/directory/Foo/Bar.pm
250 do "config.pl"; # may load /some/trusted/directory/config.pl
251
252On the other hand, if your script is intended to be run from within
253untrusted directories (such as F</tmp>), then your script suddenly failing
95b17558 254to load files may be indicative of a security issue. You most likely want
89853d76
DH
255to replace any relative paths with full paths; for example,
256
f418c24b 257 do "foo_config.pl"
89853d76
DH
258
259might become
260
f418c24b 261 do "$ENV{HOME}/foo_config.pl"
89853d76
DH
262
263If you are absolutely certain that you want your script to load and
264execute a file from the current directory, then use a C<./> prefix; for
265example:
266
f418c24b 267 do "./foo_config.pl"
89853d76
DH
268
269=item * Installing and using CPAN modules
270
271If you install a CPAN module using an automatic tool like C<cpan>, then
272this tool will itself set the C<PERL_USE_UNSAFE_INC> environment variable
273while building and testing the module, which may be sufficient to install
274a distribution which hasn't been updated to be dot-aware. If you want to
275install such a module manually, then you'll need to replace the
276traditional invocation:
277
278 perl Makefile.PL && make && make test && make install
279
280with something like
281
282 (export PERL_USE_UNSAFE_INC=1; \
283 perl Makefile.PL && make && make test && make install)
284
95b17558 285Note that this only helps build and install an unfixed module. It's
89853d76
DH
286possible for the tests to pass (since they were run under
287C<PERL_USE_UNSAFE_INC=1>), but for the module itself to fail to perform
95b17558 288correctly in production. In this case you may have to temporarily modify
0f275d26 289your script until such time as a fixed version of the module is released.
89853d76
DH
290For example:
291
292 use Foo::Bar;
293 {
294 local @INC = (@INC, '.');
295 # assuming read_config() needs '.' in @INC
296 $config = Foo::Bar->read_config();
297 }
298
95b17558 299This is only rarely expected to be necessary. Again, if doing this,
89853d76
DH
300assess the resultant risks first.
301
302=item * Module Authors
303
304If you maintain a CPAN distribution, it may need updating to run in
95b17558 305a dotless environment. Although C<cpan> and other such tools will
0f275d26 306currently set the C<PERL_USE_UNSAFE_INC> during module build, this is a
df48f9a4 307temporary workaround for the set of modules which rely on C<"."> being in
95b17558 308C<@INC> for installation and testing, and this may mask deeper issues. It
89853d76
DH
309could result in a module which passes tests and installs, but which
310fails at run time.
311
312During build, test and install, it will normally be the case that any perl
313processes will be executing directly within the root directory of the
95b17558 314untarred distribution, or a known subdirectory of that, such as F<t/>. It
89853d76
DH
315may well be that F<Makefile.PL> or F<t/foo.t> will attempt to include
316local modules and configuration files using their direct relative
317filenames, which will now fail.
318
319However, as described above, automatic tools like F<cpan> will (for now)
320set the C<PERL_USE_UNSAFE_INC> environment variable, which introduces
321dot during build.
322
323This makes it likely that your existing build and test code will work, but
324this may mask issues with your code which only manifest when used after
95b17558 325install. It is prudent to try and run your build process with that
89853d76 326variable explicitly disabled:
0f275d26 327
89853d76
DH
328 (export PERL_USE_UNSAFE_INC=0; \
329 perl Makefile.PL && make && make test && make install)
330
331This is more likely to show up any potential problems with your module's
95b17558 332build process, or even with the module itself. Fixing such issues will
89853d76
DH
333ensure both that your module can again be installed manually, and that
334it will still build once the C<PERL_USE_UNSAFE_INC> crutch goes away.
335
336When fixing issues in tests due to the removal of dot from C<@INC>,
337reinsertion of dot into C<@INC> should be performed with caution, for this
95b17558 338too may suppress real errors in your runtime code. You are encouraged
89853d76 339wherever possible to apply the aforementioned approaches with explicit
0f275d26
KW
340absolute/relative paths, or to relocate your needed files into a
341subdirectory and insert that subdirectory into C<@INC> instead.
89853d76
DH
342
343If your runtime code has problems under the dotless C<@INC>, then the comments
95b17558 344above on how to fix for script authors will mostly apply here too. Bear in
89853d76
DH
345mind though that it is considered bad form for a module to globally add dot to
346C<@INC>, since it introduces both a security risk and hides issues of
347accidentally requiring dot in C<@INC>, as explained above.
348
349=back
2c8edc25 350
fb5d4b1a 351=head2 Escaped colons and relative paths in PATH
2c8edc25
S
352
353On Unix systems, Perl treats any relative paths in the PATH environment
354variable as tainted when starting a new process. Previously, it was
355allowing a backslash to escape a colon (unlike the OS), consequently
356allowing relative paths to be considered safe if the PATH was set to
5aeff080 357something like C</\:.>. The check has been fixed to treat C<"."> as tainted
2c8edc25
S
358in that example.
359
96e0fd86 360=head2 New C<-Di> switch is now required for PerlIO debugging output
2c8edc25 361
3ee934f7
KW
362This is used for debugging of code within PerlIO to avoid recursive
363calls. Previously this output would be sent to the file specified
2c8edc25
S
364by the C<PERLIO_DEBUG> environment variable if perl wasn't running
365setuid and the C<-T> or C<-t> switches hadn't been parsed yet.
366
367If perl performed output at a point where it hadn't yet parsed its
368switches this could result in perl creating or overwriting the file
369named by C<PERLIO_DEBUG> even when the C<-T> switch had been supplied.
370
96e0fd86
DM
371Perl now requires the C<-Di> switch to be present before it will produce
372PerlIO debugging
2c8edc25
S
373output. By default this is written to C<stderr>, but can optionally
374be redirected to a file by setting the C<PERLIO_DEBUG> environment
375variable.
a049258c 376
3ee934f7 377If perl is running setuid or the C<-T> switch was supplied,
2c8edc25
S
378C<PERLIO_DEBUG> is ignored and the debugging output is sent to
379C<stderr> as for any other C<-D> switch.
a049258c
S
380
381=head1 Incompatible Changes
382
8d25d2f3
KW
383=head2 Unescaped literal C<"{"> characters in regular expression
384patterns are no longer permissible
a049258c 385
8d25d2f3
KW
386You have to now say something like C<"\{"> or C<"[{]"> to specify to
387match a LEFT CURLY BRACKET; otherwise it is a fatal pattern compilation
388error. This change will allow future extensions to the language.
389
390These have been deprecated since v5.16, with a deprecation message
391raised for some uses starting in v5.22. Unfortunately, the code added
d8362e1b
KW
392to raise the message was buggy, and failed to warn in some cases where
393it should have. Therefore, enforcement of this ban for these cases is
394deferred until Perl 5.30, but the code has been fixed to raise a
395default-on deprecation message for them in the meantime.
8d25d2f3
KW
396
397Some uses of literal C<"{"> occur in contexts where we do not foresee
d8362e1b
KW
398the meaning ever being anything but the literal, such as the very first
399character in the pattern, or after a C<"|"> meaning alternation. Thus
400
401 qr/{fee|{fie/
402
403matches either of the strings C<{fee> or C<{fie>. To avoid forcing
404unnecessary code changes, these uses do not need to be escaped, and no
405warning is raised about them, and there are no current plans to change this.
406
407But it is always correct to escape C<"{">, and the simple rule to
408remember is to always do so.
a049258c 409
1ffafadd
KW
410See L<Unescaped left brace in regex is illegal here|perldiag/Unescaped left brace in regex is illegal here in regex; marked by S<E<lt>-- HERE> in mE<sol>%sE<sol>>.
411
2c8edc25
S
412=head2 C<scalar(%hash)> return signature changed
413
414The value returned for C<scalar(%hash)> will no longer show information about
415the buckets allocated in the hash. It will simply return the count of used
416keys. It is thus equivalent to C<0+keys(%hash)>.
417
0f275d26
KW
418A form of backwards compatibility is provided via
419L<C<Hash::Util::bucket_ratio()>|Hash::Util/bucket_ratio> which provides
420the same behavior as
421C<scalar(%hash)> provided in Perl 5.24 and earlier.
2c8edc25
S
422
423=head2 C<keys> returned from an lvalue subroutine
424
425C<keys> returned from an lvalue subroutine can no longer be assigned
426to in list context.
427
428 sub foo : lvalue { keys(%INC) }
429 (foo) = 3; # death
430 sub bar : lvalue { keys(@_) }
431 (bar) = 3; # also an error
432
433This makes the lvalue sub case consistent with C<(keys %hash) = ...> and
a3a9a3d2
KW
434C<(keys @_) = ...>, which are also errors.
435L<[perl #128187]|https://rt.perl.org/Public/Bug/Display.html?id=128187>
a049258c 436
70ef9fe7 437=head2 The C<${^ENCODING}> facility has been removed
8d25d2f3 438
70ef9fe7
DM
439The special behaviour associated with assigning a value to this variable
440has been removed. As a consequence, the L<encoding> pragma's default mode
441is no longer supported. If
8d25d2f3
KW
442you still need to write your source code in encodings other than UTF-8, use a
443source filter such as L<Filter::Encoding> on CPAN or L<encoding>'s C<Filter>
444option.
445
0f032fe1 446=head2 C<POSIX::tmpnam()> has been removed
8d25d2f3
KW
447
448The fundamentally unsafe C<tmpnam()> interface was deprecated in
53799a91 449Perl 5.22 and has now been removed. In its place you can use,
8d25d2f3
KW
450for example, the L<File::Temp> interfaces.
451
452=head2 require ::Foo::Bar is now illegal.
453
95b17558 454Formerly, C<require ::Foo::Bar> would try to read F</Foo/Bar.pm>. Now any
8d25d2f3
KW
455bareword require which starts with a double colon dies instead.
456
457=head2 Literal control character variable names are no longer permissible
458
459A variable name may no longer contain a literal control character under
460any circumstances. These previously were allowed in single-character
461names on ASCII platforms, but have been deprecated there since Perl
4625.20. This affects things like C<$I<\cT>>, where I<\cT> is a literal
463control (such as a C<NAK> or C<NEGATIVE ACKNOWLEDGE> character) in the
464source code.
465
466=head2 C<NBSP> is no longer permissible in C<\N{...}>
467
468The name of a character may no longer contain non-breaking spaces. It
53799a91 469has been deprecated to do so since Perl 5.22.
8d25d2f3 470
a049258c
S
471=head1 Deprecations
472
2c8edc25
S
473=head2 String delimiters that aren't stand-alone graphemes are now deprecated
474
475In order for Perl to eventually allow string delimiters to be Unicode
476grapheme clusters (which look like a single character, but may be
0f275d26 477a sequence of several ones), we have to stop allowing a single character
2c8edc25
S
478delimiter that isn't a grapheme by itself. These are unlikely to exist
479in actual code, as they would typically display as attached to the
480character in front of them.
481
4d46f4a9
KW
482=head2 C<\cI<X>> that maps to a printable is no longer deprecated
483
484This means we have no plans to remove this feature. It still raises a
485warning, but only if syntax warnings are enabled. The feature was
486originally intended to be a way to express non-printable characters that
487don't have a mnemonic (C<\t> and C<\n> are mnemonics for two
488non-printable characters, but most non-printables don't have a
489mnemonic.) But the feature can be used to specify a few printable
490characters, though those are more clearly expressed as the printable
491itself. See
1f81bc18
KW
492L<http://www.nntp.perl.org/group/perl.perl5.porters/2017/02/msg242944.html>.
493
2c8edc25 494=head1 Performance Enhancements
a049258c 495
2c8edc25 496=over 4
a049258c 497
2c8edc25 498=item *
a049258c 499
fce64130 500A hash in boolean context is now sometimes faster, I<e.g.>
a049258c 501
2c8edc25 502 if (!%h) { ... }
a049258c 503
8928e7db 504This was already special-cased, but some cases were missed (such as
96e0fd86 505C<grep %$_, @AoH>), and even the ones which weren't have been improved.
a049258c 506
2c8edc25 507=item * New Faster Hash Function on 64 bit builds
a049258c 508
95b17558 509We use a different hash function for short and long keys. This should
2c8edc25 510improve performance and security, especially for long keys.
a049258c 511
2c8edc25 512=item * readline is faster
a049258c 513
2c8edc25
S
514Reading from a file line-by-line with C<readline()> or C<< E<lt>E<gt> >> should
515now typically be faster due to a better implementation of the code that
516searches for the next newline character.
517
518=item *
a049258c 519
96e0fd86
DM
520Assigning one reference to another, I<e.g.> C<$ref1 = $ref2> has been
521optimized in some cases.
a049258c 522
2c8edc25 523=item *
ad5c8857 524
96e0fd86
DM
525Remove some exceptions to creating Copy-on-Write strings. The string
526buffer growth algorithm has been altered slightly so that you're less
527likely to encounter a string which which can't be COWed.
2c8edc25
S
528
529=item *
530
8928e7db
DM
531Better optimise array and hash assignment: where an array or hash appears
532in the LHS of a list assignment, such as C<(..., @a) = (...);>, it's
533likely to be considerably faster, especially if it involves emptying the
96e0fd86 534array/hash. For example this code runs about a third faster compared to
d3972b39 535Perl 5.24.0:
d053832c
AB
536
537 my @a;
8928e7db 538 for my $i (1..10_000_000) {
d053832c
AB
539 @a = (1,2,3);
540 @a = ();
541 }
542
2c8edc25
S
543=item *
544
545Converting a single-digit string to a number is now substantially faster.
546
547=item *
548
96e0fd86
DM
549The C<split> builtin is now slightly faster in many cases: in particular
550for the two specially-handled forms
551
552 my @a = split ...;
553 local @a = split ...;
2c8edc25
S
554
555=item *
556
557The rather slow implementation for the experimental subroutine signatures
558feature has been made much faster; it is now comparable in speed with the
96e0fd86 559traditional C<my ($a, $b, @c) = @_>.
7ca0bfc4 560
fbe3f407
S
561=item *
562
2c8edc25 563Bareword constant strings are now permitted to take part in constant
95b17558 564folding. They were originally exempted from constant folding in August 1999,
2c8edc25 565during the development of Perl 5.6, to ensure that C<use strict "subs">
95b17558 566would still apply to bareword constants. That has now been accomplished a
2c8edc25
S
567different way, so barewords, like other constants, now gain the performance
568benefits of constant folding.
569
570This also means that void-context warnings on constant expressions of
571barewords now report the folded constant operand, rather than the operation;
572this matches the behaviour for non-bareword constants.
a049258c
S
573
574=back
575
2c8edc25
S
576=head1 Modules and Pragmata
577
a049258c
S
578=head2 Updated Modules and Pragmata
579
580=over 4
fbe3f407 581
759020c9 582=item *
7ca0bfc4 583
0cc8c746
S
584L<Archive::Tar> has been upgraded from version 2.04 to 2.24.
585
586=item *
587
588L<arybase> has been upgraded from version 0.11 to 0.12.
589
590=item *
591
592L<attributes> has been upgraded from version 0.27 to 0.29.
a049258c 593
2c8edc25 594The deprecation message for the C<:unique> and C<:locked> attributes
0f275d26 595now mention that they will disappear in Perl 5.28.
a049258c 596
2c8edc25 597=item *
a049258c 598
0cc8c746
S
599L<B> has been upgraded from version 1.62 to 1.68.
600
601=item *
602
603L<B::Concise> has been upgraded from version 0.996 to 0.999.
2c8edc25
S
604
605Its output is now more descriptive for C<op_private> flags.
d5c7a4fc 606
759020c9
S
607=item *
608
0cc8c746
S
609L<B::Debug> has been upgraded from version 1.23 to 1.24.
610
611=item *
612
613L<B::Deparse> has been upgraded from version 1.37 to 1.40.
614
615=item *
616
2c8edc25 617L<B::Xref> has been upgraded from version 1.05 to 1.06.
a049258c 618
a3a9a3d2
KW
619It now uses 3-arg C<open()> instead of 2-arg C<open()>.
620L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c 621
2c8edc25 622=item *
a049258c 623
0cc8c746
S
624L<base> has been upgraded from version 2.23 to 2.25.
625
626=item *
627
628L<bignum> has been upgraded from version 0.42 to 0.47.
629
630=item *
631
632L<Carp> has been upgraded from version 1.40 to 1.42.
633
634=item *
635
636L<charnames> has been upgraded from version 1.43 to 1.44.
637
638=item *
639
640L<Compress::Raw::Bzip2> has been upgraded from version 2.069 to 2.074.
641
642=item *
643
644L<Compress::Raw::Zlib> has been upgraded from version 2.069 to 2.074.
645
646=item *
647
648L<Config::Perl::V> has been upgraded from version 0.25 to 0.28.
649
650=item *
651
652L<CPAN> has been upgraded from version 2.11 to 2.18.
653
654=item *
655
656L<CPAN::Meta> has been upgraded from version 2.150005 to 2.150010.
657
658=item *
659
660L<Data::Dumper> has been upgraded from version 2.160 to 2.167.
a049258c 661
2c8edc25 662The XS implementation now supports Deparse.
a049258c 663
2c8edc25 664=item *
a049258c 665
0cc8c746
S
666L<DB_File> has been upgraded from version 1.835 to 1.840.
667
668=item *
669
670L<Devel::Peek> has been upgraded from version 1.23 to 1.26.
671
672=item *
673
674L<Devel::PPPort> has been upgraded from version 3.32 to 3.35.
675
676=item *
677
2c8edc25 678L<Devel::SelfStubber> has been upgraded from version 1.05 to 1.06.
a049258c 679
a3a9a3d2
KW
680It now uses 3-arg C<open()> instead of 2-arg C<open()>.
681L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c 682
2c8edc25 683=item *
a049258c 684
0cc8c746 685L<diagnostics> has been upgraded from version 1.34 to 1.36.
a049258c 686
a3a9a3d2
KW
687It now uses 3-arg C<open()> instead of 2-arg C<open()>.
688L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
7ca0bfc4 689
ad5c8857 690=item *
7ca0bfc4 691
0cc8c746
S
692L<Digest> has been upgraded from version 1.17 to 1.17_01.
693
694=item *
695
696L<Digest::MD5> has been upgraded from version 2.54 to 2.55.
697
698=item *
699
700L<Digest::SHA> has been upgraded from version 5.95 to 5.96.
701
702=item *
703
704L<DynaLoader> has been upgraded from version 1.38 to 1.42.
705
706=item *
707
708L<Encode> has been upgraded from version 2.80 to 2.88.
709
710=item *
711
712L<encoding> has been upgraded from version 2.17 to 2.19.
8f7edc68 713
ee8180b8 714This module's default mode is no longer supported. It now
2c8edc25 715dies when imported, unless the C<Filter> option is being used.
d5c7a4fc 716
2c8edc25 717=item *
d5c7a4fc 718
2c8edc25 719L<encoding::warnings> has been upgraded from version 0.12 to 0.13.
a049258c 720
ee8180b8 721This module is no longer supported. It emits a warning to
2c8edc25 722that effect and then does nothing.
a049258c 723
2c8edc25 724=item *
d5c7a4fc 725
0cc8c746 726L<Errno> has been upgraded from version 1.25 to 1.28.
a049258c 727
96e0fd86 728It now documents that using C<%!> automatically loads Errno for you.
d5c7a4fc 729
a3a9a3d2
KW
730It now uses 3-arg C<open()> instead of 2-arg C<open()>.
731L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
3abe9611 732
c714fb1f 733=item *
3ce6a296 734
2c8edc25 735L<ExtUtils::Embed> has been upgraded from version 1.33 to 1.34.
a049258c 736
a3a9a3d2
KW
737It now uses 3-arg C<open()> instead of 2-arg C<open()>.
738L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c 739
2c8edc25 740=item *
a049258c 741
0cc8c746
S
742L<ExtUtils::MakeMaker> has been upgraded from version 7.10_01 to 7.24.
743
744=item *
745
746L<ExtUtils::Miniperl> has been upgraded from version 1.05 to 1.06.
747
748=item *
749
750L<ExtUtils::ParseXS> has been upgraded from version 3.31 to 3.34.
751
752=item *
753
754L<ExtUtils::Typemaps> has been upgraded from version 3.31 to 3.34.
755
756=item *
757
758L<feature> has been upgraded from version 1.42 to 1.47.
2c8edc25 759
a049258c 760=item *
5c92a635 761
0cc8c746
S
762L<File::Copy> has been upgraded from version 2.31 to 2.32.
763
764=item *
765
766L<File::Fetch> has been upgraded from version 0.48 to 0.52.
767
768=item *
769
770L<File::Glob> has been upgraded from version 1.26 to 1.28.
d5c7a4fc 771
96e0fd86 772It now Issues a deprecation message for C<File::Glob::glob()>.
d5c7a4fc 773
2c8edc25 774=item *
d5c7a4fc 775
0cc8c746
S
776L<File::Spec> has been upgraded from version 3.63 to 3.67.
777
778=item *
779
780L<FileHandle> has been upgraded from version 2.02 to 2.03.
781
782=item *
783
2c8edc25 784L<Filter::Simple> has been upgraded from version 0.92 to 0.93.
a049258c 785
2c8edc25 786It no longer treats C<no MyFilter> immediately following C<use MyFilter> as
a3a9a3d2
KW
787end-of-file.
788L<[perl #107726]|https://rt.perl.org/Public/Bug/Display.html?id=107726>
64afbd29
DM
789
790=item *
791
0cc8c746
S
792L<Getopt::Long> has been upgraded from version 2.48 to 2.49.
793
794=item *
795
796L<Getopt::Std> has been upgraded from version 1.11 to 1.12.
797
798=item *
799
800L<Hash::Util> has been upgraded from version 0.19 to 0.22.
801
802=item *
803
804L<HTTP::Tiny> has been upgraded from version 0.056 to 0.070.
a049258c 805
2c8edc25 806Internal 599-series errors now include the redirect history.
a049258c 807
2c8edc25 808=item *
a049258c 809
0cc8c746 810L<I18N::LangTags> has been upgraded from version 0.40 to 0.42.
a049258c 811
a3a9a3d2
KW
812It now uses 3-arg C<open()> instead of 2-arg C<open()>.
813L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c 814
2c8edc25 815=item *
a049258c 816
0cc8c746
S
817L<IO> has been upgraded from version 1.36 to 1.38.
818
819=item *
820
96e0fd86 821IO::Compress has been upgraded from version 2.069 to 2.074.
0cc8c746
S
822
823=item *
824
825L<IO::Socket::IP> has been upgraded from version 0.37 to 0.38.
826
827=item *
828
829L<IPC::Cmd> has been upgraded from version 0.92 to 0.96.
830
831=item *
832
833L<IPC::SysV> has been upgraded from version 2.06_01 to 2.07.
834
835=item *
836
837L<JSON::PP> has been upgraded from version 2.27300 to 2.27400_02.
838
839=item *
840
2c8edc25
S
841L<lib> has been upgraded from version 0.63 to 0.64.
842
a3a9a3d2
KW
843It now uses 3-arg C<open()> instead of 2-arg C<open()>.
844L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
faab9793 845
c714fb1f 846=item *
ad5c8857 847
0cc8c746
S
848L<List::Util> has been upgraded from version 1.42_02 to 1.46_02.
849
850=item *
851
852L<Locale::Codes> has been upgraded from version 3.37 to 3.42.
853
854=item *
855
856L<Locale::Maketext> has been upgraded from version 1.26 to 1.28.
857
858=item *
859
860L<Locale::Maketext::Simple> has been upgraded from version 0.21 to 0.21_01.
861
862=item *
863
864L<Math::BigInt> has been upgraded from version 1.999715 to 1.999806.
ad5c8857 865
2c8edc25 866=item *
2e0dcc12 867
0cc8c746
S
868L<Math::BigInt::FastCalc> has been upgraded from version 0.40 to 0.5005.
869
870=item *
871
872L<Math::BigRat> has been upgraded from version 0.260802 to 0.2611.
873
874=item *
875
876L<Math::Complex> has been upgraded from version 1.59 to 1.5901.
877
878=item *
879
880L<Memoize> has been upgraded from version 1.03 to 1.03_01.
881
882=item *
883
884L<Module::CoreList> has been upgraded from version 5.20170420 to 5.20170520.
885
886=item *
887
888L<Module::Load::Conditional> has been upgraded from version 0.64 to 0.68.
889
890=item *
891
892L<Module::Metadata> has been upgraded from version 1.000031 to 1.000033.
893
894=item *
895
896L<mro> has been upgraded from version 1.18 to 1.20.
897
898=item *
899
900L<Net::Ping> has been upgraded from version 2.43 to 2.55.
d5c7a4fc 901
2c8edc25
S
902IPv6 addresses and C<AF_INET6> sockets are now supported, along with several
903other enhancements.
d5c7a4fc 904
a049258c 905=item *
d5c7a4fc 906
0cc8c746
S
907L<NEXT> has been upgraded from version 0.65 to 0.67.
908
909=item *
910
911L<Opcode> has been upgraded from version 1.34 to 1.39.
912
913=item *
914
915L<open> has been upgraded from version 1.10 to 1.11.
916
917=item *
918
2c8edc25 919L<OS2::Process> has been upgraded from version 1.11 to 1.12.
a049258c 920
a3a9a3d2
KW
921It now uses 3-arg C<open()> instead of 2-arg C<open()>.
922L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c 923
2c8edc25 924=item *
a049258c 925
2c8edc25 926L<overload> has been upgraded from version 1.26 to 1.28.
a049258c 927
2c8edc25 928Its compilation speed has been improved slightly.
a049258c 929
2c8edc25
S
930=item *
931
0cc8c746
S
932L<parent> has been upgraded from version 0.234 to 0.236.
933
934=item *
935
2c8edc25
S
936L<perl5db.pl> has been upgraded from version 1.50 to 1.51.
937
96e0fd86 938It now ignores F</dev/tty> on non-Unix systems.
a3a9a3d2 939L<[perl #113960]|https://rt.perl.org/Public/Bug/Display.html?id=113960>
2c8edc25
S
940
941=item *
942
0cc8c746
S
943L<Perl::OSType> has been upgraded from version 1.009 to 1.010.
944
945=item *
946
947L<perlfaq> has been upgraded from version 5.021010 to 5.021011.
948
949=item *
950
951L<PerlIO> has been upgraded from version 1.09 to 1.10.
952
953=item *
954
955L<PerlIO::encoding> has been upgraded from version 0.24 to 0.25.
956
957=item *
958
959L<PerlIO::scalar> has been upgraded from version 0.24 to 0.26.
960
961=item *
962
963L<Pod::Checker> has been upgraded from version 1.60 to 1.73.
964
965=item *
966
967L<Pod::Functions> has been upgraded from version 1.10 to 1.11.
968
969=item *
970
971L<Pod::Html> has been upgraded from version 1.22 to 1.2202.
972
973=item *
974
975L<Pod::Perldoc> has been upgraded from version 3.25_02 to 3.28.
976
977=item *
978
979L<Pod::Simple> has been upgraded from version 3.32 to 3.35.
980
981=item *
982
983L<Pod::Usage> has been upgraded from version 1.68 to 1.69.
984
985=item *
986
96e0fd86
DM
987L<POSIX> has been upgraded from version 1.65 to 1.76.
988
989This remedies several defects in making its symbols exportable.
a3a9a3d2 990L<[perl #127821]|https://rt.perl.org/Public/Bug/Display.html?id=127821>
96e0fd86 991
2c8edc25
S
992The C<POSIX::tmpnam()> interface has been removed,
993see L</"POSIX::tmpnam() has been removed">.
96e0fd86 994
2c8edc25
S
995Trying to import POSIX subs that have no real implementations
996(like C<POSIX::atend()>) now fails at import time, instead of
997waiting until runtime.
998
999=item *
1000
0cc8c746 1001L<re> has been upgraded from version 0.32 to 0.34
2c8edc25
S
1002
1003This adds support for the new L<C<E<47>xx>|perlre/E<sol>x and E<sol>xx>
1004regular expression pattern modifier, and a change to the L<S<C<use re
1005'strict'>>|re/'strict' mode> experimental feature. When S<C<re
1006'strict'>> is enabled, a warning now will be generated for all
df48f9a4 1007unescaped uses of the two characters C<"}"> and C<"]"> in regular
2c8edc25 1008expression patterns (outside bracketed character classes) that are taken
df48f9a4 1009literally. This brings them more in line with the C<")"> character which
2c8edc25
S
1010is always a metacharacter unless escaped. Being a metacharacter only
1011sometimes, depending on action at a distance, can lead to silently
1012having the pattern mean something quite different than was intended,
1013which the S<C<re 'strict'>> mode is intended to minimize.
1014
1015=item *
1016
0cc8c746
S
1017L<Safe> has been upgraded from version 2.39 to 2.40.
1018
1019=item *
1020
1021L<Scalar::Util> has been upgraded from version 1.42_02 to 1.46_02.
1022
1023=item *
1024
1025L<Storable> has been upgraded from version 2.56 to 2.62.
2c8edc25 1026
a3a9a3d2
KW
1027Fixes
1028L<[perl #130098]|https://rt.perl.org/Public/Bug/Display.html?id=130098>.
2c8edc25
S
1029
1030=item *
1031
0cc8c746
S
1032L<Symbol> has been upgraded from version 1.07 to 1.08.
1033
1034=item *
1035
1036L<Sys::Syslog> has been upgraded from version 0.33 to 0.35.
1037
1038=item *
1039
1040L<Term::ANSIColor> has been upgraded from version 4.04 to 4.06.
1041
1042=item *
1043
2c8edc25
S
1044L<Term::ReadLine> has been upgraded from version 1.15 to 1.16.
1045
a3a9a3d2
KW
1046It now uses 3-arg C<open()> instead of 2-arg C<open()>.
1047L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
2c8edc25
S
1048
1049=item *
1050
0cc8c746 1051L<Test> has been upgraded from version 1.28 to 1.30.
2c8edc25 1052
a3a9a3d2
KW
1053It now uses 3-arg C<open()> instead of 2-arg C<open()>.
1054L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
2c8edc25
S
1055
1056=item *
1057
0cc8c746
S
1058L<Test::Harness> has been upgraded from version 3.36 to 3.38.
1059
1060=item *
1061
1062L<Test::Simple> has been upgraded from version 1.001014 to 1.302073.
1063
1064=item *
1065
1066L<Thread::Queue> has been upgraded from version 3.09 to 3.12.
1067
1068=item *
1069
2c8edc25
S
1070L<Thread::Semaphore> has been upgraded from 2.12 to 2.13.
1071
1072Added the C<down_timed> method.
1073
1074=item *
1075
0cc8c746 1076L<threads> has been upgraded from version 2.07 to 2.15.
2c8edc25 1077
2c8edc25
S
1078=item *
1079
0cc8c746 1080L<threads::shared> has been upgraded from version 1.51 to 1.56.
2c8edc25 1081
2c8edc25
S
1082=item *
1083
0cc8c746
S
1084L<Tie::Hash::NamedCapture> has been upgraded from version 0.09 to 0.10.
1085
1086=item *
1087
1088L<Time::HiRes> has been upgraded from version 1.9733 to 1.9741.
2c8edc25
S
1089
1090It now builds on systems with C++11 compilers (such as G++ 6 and Clang++
10913.9).
1092
1093Now uses C<clockid_t>.
1094
1095=item *
1096
0cc8c746
S
1097L<Time::Local> has been upgraded from version 1.2300 to 1.25.
1098
1099=item *
1100
1101L<Unicode::Collate> has been upgraded from version 1.14 to 1.19.
1102
1103=item *
1104
1105L<Unicode::UCD> has been upgraded from version 0.64 to 0.68.
2c8edc25 1106
a3a9a3d2
KW
1107It now uses 3-arg C<open()> instead of 2-arg C<open()>.
1108L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
2c8edc25
S
1109
1110=item *
1111
0cc8c746
S
1112L<version> has been upgraded from version 0.9916 to 0.9917.
1113
1114=item *
1115
1116L<VMS::DCLsym> has been upgraded from version 1.06 to 1.08.
2c8edc25 1117
a3a9a3d2
KW
1118It now uses 3-arg C<open()> instead of 2-arg C<open()>.
1119L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c
S
1120
1121=item *
1122
0cc8c746
S
1123L<warnings> has been upgraded from version 1.36 to 1.37.
1124
1125=item *
1126
1127L<XS::Typemap> has been upgraded from version 0.14 to 0.15.
1128
1129=item *
1130
1131L<XSLoader> has been upgraded from version 0.21 to 0.27.
2c8edc25
S
1132
1133Fixed a security hole in which binary files could be loaded from a path
1134outside of L<C<@INC>|perlvar/@INC>.
1135
a3a9a3d2
KW
1136It now uses 3-arg C<open()> instead of 2-arg C<open()>.
1137L<[perl #130122]|https://rt.perl.org/Public/Bug/Display.html?id=130122>
a049258c
S
1138
1139=back
1140
2c8edc25
S
1141=head1 Documentation
1142
1143=head2 New Documentation
a049258c 1144
2c8edc25 1145=head3 L<perldeprecation>
a049258c 1146
2c8edc25 1147This file documents all upcoming deprecations, and some of the deprecations
95b17558 1148which already have been removed. The purpose of this documentation is
2c8edc25
S
1149two-fold: document what will disappear, and by which version, and serve
1150as a guide for people dealing with code which has features that no longer
1151work after an upgrade of their perl.
a049258c 1152
2c8edc25 1153=head2 Changes to Existing Documentation
a049258c 1154
b10de59c
KW
1155We have attempted to update the documentation to reflect the changes
1156listed in this document. If you find any we have missed, send email to
bfe8fcbb 1157L<perlbug@perl.org|mailto:perlbug@perl.org>.
a049258c 1158
b10de59c
KW
1159Additionally all references to Usenet have been removed, and the
1160following selected changes have been made:
2c8edc25 1161
b10de59c 1162=head3 L<perlfunc>
a049258c 1163
b10de59c 1164=over 4
a049258c 1165
2c8edc25
S
1166=item *
1167
b10de59c
KW
1168Removed obsolete text about L<C<defined()>|perlfunc/defined>
1169on aggregates that should have been deleted earlier, when the feature
1170was removed.
2c8edc25
S
1171
1172=item *
1173
b10de59c
KW
1174Corrected documentation of L<C<eval()>|perlfunc/eval>,
1175and L<C<evalbytes()>|perlfunc/evalbytes>.
a049258c 1176
2c8edc25 1177=item *
a049258c 1178
b10de59c
KW
1179Clarified documentation of L<C<seek()>|perlfunc/seek>,
1180L<C<tell()>|perlfunc/tell> and L<C<sysseek()>|perlfunc/sysseek>
f9b6dffc 1181emphasizing that positions are in bytes and not characters.
b10de59c 1182L<[perl #128607]|https://rt.perl.org/Public/Bug/Display.html?id=128607>
2c8edc25
S
1183
1184=item *
1185
b10de59c
KW
1186Clarified documentation of L<C<sort()>|perlfunc/sort LIST> concerning
1187the variables C<$a> and C<$b>.
2c8edc25
S
1188
1189=item *
a049258c 1190
de7be789
KW
1191In L<C<split()>|perlfunc/split> noted that certain pattern modifiers are
1192legal, and added a caution about its use in Perls before v5.11,
a049258c 1193
2c8edc25 1194=item *
a049258c 1195
b10de59c
KW
1196Removed obsolete documentation of L<C<study()>|perlfunc/study>, noting
1197that it is now a no-op.
2c8edc25
S
1198
1199=item *
1200
b10de59c
KW
1201Noted that L<C<vec()>|perlfunc/vec> doesn't work well when the string
1202contains characters whose code points are above 255.
a049258c 1203
2c8edc25 1204=back
a049258c 1205
b10de59c 1206=head3 L<perlguts>
a049258c
S
1207
1208=over 4
1209
1210=item *
1211
b10de59c
KW
1212Added advice on
1213L<formatted printing of operands of C<Size_t> and C<SSize_t>|perlguts/Formatted Printing of Size_t and SSize_t>
a049258c
S
1214
1215=back
1216
b10de59c 1217=head3 L<perlhack>
2c8edc25
S
1218
1219=over 4
1220
1221=item *
1222
7964b3a0
KW
1223Clarify what editor tab stop rules to use, and note that we are
1224migrating away from using tabs, replacing them with sequences of SPACE
1225characters.
2c8edc25
S
1226
1227=back
a049258c 1228
b10de59c 1229=head3 L<perlhacktips>
a049258c
S
1230
1231=over 4
1232
1233=item *
1234
b10de59c 1235Give another reason to use C<cBOOL> to cast an expression to boolean.
2c8edc25
S
1236
1237=item *
1238
b10de59c
KW
1239Note that there are macros C<TRUE> and C<FALSE> available to express
1240boolean values.
a049258c 1241
2c8edc25 1242=back
a049258c 1243
2c8edc25 1244=head3 L<perlinterp>
a049258c
S
1245
1246=over 4
1247
1248=item *
1249
2c8edc25
S
1250L<perlinterp> has been expanded to give a more detailed example of how to
1251hunt around in the parser for how a given operator is handled.
a049258c
S
1252
1253=back
1254
2c8edc25 1255=head3 L<perllocale>
a049258c
S
1256
1257=over 4
1258
a6733086
S
1259=item *
1260
b10de59c
KW
1261Some locales aren't compatible with Perl. Note that these can cause
1262core dumps.
a049258c
S
1263
1264=back
1265
15a20477 1266=head3 L<perlmod>
2c8edc25
S
1267
1268=over 4
1269
1270=item *
1271
b10de59c 1272Various clarifications have been added.
2c8edc25
S
1273
1274=back
1275
1276=head3 L<perlmodlib>
1277
1278=over 4
1279
1280=item *
1281
b10de59c 1282Updated the site mirror list.
2c8edc25
S
1283
1284=back
1285
1286=head3 L<perlobj>
1287
1288=over 4
1289
1290=item *
1291
1292Added a section on calling methods using their fully qualified names.
1293
1294=item *
1295
0f032fe1 1296Do not discourage manual C<@ISA>.
2c8edc25
S
1297
1298=back
1299
1300=head3 L<perlootut>
1301
1302=over 4
1303
1304=item *
1305
2c8edc25
S
1306Mention C<Moo> more.
1307
1308=back
1309
1310=head3 L<perlop>
1311
1312=over 4
1313
1314=item *
1315
b072a8ef
KW
1316Note that white space must be used for quoting operators if the
1317delimiter is a word character (I<i.e.>, matches C<\w>).
1318
1319=item *
1320
1321Clarify that in regular expression patterns delimited by single quotes,
1322no variable interpolation is done.
2c8edc25
S
1323
1324=back
1325
1326=head3 L<perlre>
1327
1328=over 4
1329
1330=item *
1331
1c34b59a
KW
1332The first part was extensively rewritten to incorporate various basic
1333points, that in earlier versions were mentioned in sort of an appendix
1334on Version 8 regular expressions.
1335
0cbd1ffa
KW
1336=item *
1337
b10de59c
KW
1338Note that it is common to have the C</x> modifier and forget that this
1339means that C<"#"> has to be escaped.
2c8edc25
S
1340
1341=back
1342
b10de59c 1343=head3 L<perlretut>
2c8edc25
S
1344
1345=over 4
1346
1347=item *
1348
b10de59c 1349Add introductory material
2c8edc25
S
1350
1351=item *
1352
b10de59c
KW
1353Note that a metacharacter occurring in a context where it can't mean
1354that, silently loses its meta-ness and matches literally.
1355L<C<use re 'strict'>|re/'strict' mode> can catch some of these.
2c8edc25
S
1356
1357=back
1358
1359=head3 L<perlunicode>
1360
1361=over 4
1362
1363=item *
1364
b10de59c 1365Corrected the text about Unicode BYTE ORDER MARK handling.
2c8edc25
S
1366
1367=item *
1368
1369Updated the text to correspond with changes in Unicode UTS#18, concerning
1370regular expressions, and Perl compatibility with what it says.
1371
1372=back
1373
1374=head3 L<perlvar>
1375
1376=over 4
1377
1378=item *
1379
95b17558 1380Document C<@ISA>. Was documented other places, not not in L<perlvar>.
2c8edc25
S
1381
1382=back
1383
1384=head1 Diagnostics
1385
1386=head2 New Diagnostics
1387
1388=head3 New Errors
1389
1390=over 4
1391
1392=item *
1393
6ebc3119
KW
1394L<A signature parameter must start with C<'$'>, C<'@'> or C<'%'>
1395|perldiag/A signature parameter must start with C<'$'>, C<'@'> or C<'%'>>
1396
1397=item *
1398
25d191b5 1399L<Bareword in require contains "%s"|perldiag/"Bareword in require contains "%s"">
2c8edc25
S
1400
1401=item *
1402
25d191b5 1403L<Bareword in require maps to empty filename|perldiag/"Bareword in require maps to empty filename">
2c8edc25
S
1404
1405=item *
1406
25d191b5 1407L<Bareword in require maps to disallowed filename "%s"|perldiag/"Bareword in require maps to disallowed filename "%s"">
473ac7a0 1408
2c8edc25
S
1409=item *
1410
25d191b5 1411L<Bareword in require must not start with a double-colon: "%s"|perldiag/"Bareword in require must not start with a double-colon: "%s"">
2c8edc25
S
1412
1413=item *
1414
1415L<%s: command not found|perldiag/"%s: command not found">
1416
1417(A) You've accidentally run your script through B<bash> or another shell
068a1201
KW
1418instead of Perl. Check the C<#!> line, or manually feed your script into
1419Perl yourself. The C<#!> line at the top of your file could look like:
2c8edc25
S
1420
1421 #!/usr/bin/perl
1422
1423=item *
1424
1425L<%s: command not found: %s|perldiag/"%s: command not found: %s">
1426
1427(A) You've accidentally run your script through B<zsh> or another shell
068a1201
KW
1428instead of Perl. Check the C<#!> line, or manually feed your script into
1429Perl yourself. The C<#!> line at the top of your file could look like:
2c8edc25
S
1430
1431 #!/usr/bin/perl
1432
1433=item *
1434
25d191b5 1435L<The experimental declared_refs feature is not enabled|perldiag/"The experimental declared_refs feature is not enabled">
2c8edc25 1436
25d191b5
KW
1437(F) To declare references to variables, as in C<my \%x>, you must first enable
1438the feature:
2c8edc25 1439
25d191b5
KW
1440 no warnings "experimental::declared_refs";
1441 use feature "declared_refs";
2c8edc25 1442
25d191b5 1443See L</Declaring a reference to a variable>.
2c8edc25
S
1444
1445=item *
1446
6ebc3119
KW
1447L<Illegal character following sigil in a subroutine signature
1448|perldiag/Illegal character following sigil in a subroutine signature>
1449
1450=item *
1451
1452L<Indentation on line %d of here-doc doesn't match delimiter
1453|perldiag/Indentation on line %d of here-doc doesn't match delimiter>
1454
1455=item *
1456
70ef9fe7 1457L<Infinite recursion via empty pattern|perldiag/"Infinite recursion via empty pattern">.
25d191b5
KW
1458
1459Using the empty pattern (which re-executes the last successfully-matched
1460pattern) inside a code block in another regex, as in C</(?{ s!!new! })/>, has
1461always previously yielded a segfault. It now produces this error.
2c8edc25
S
1462
1463=item *
1464
6ebc3119
KW
1465L<Malformed UTF-8 string in "%s"
1466|perldiag/Malformed UTF-8 string in "%s">
1467
1468=item *
1469
1470L<Multiple slurpy parameters not allowed
1471|perldiag/Multiple slurpy parameters not allowed>
1472
1473=item *
1474
1475L<C<'#'> not allowed immediately following a sigil in a subroutine signature
1476|perldiag/C<'#'> not allowed immediately following a sigil in a subroutine signature>
1477
1478=item *
1479
1480L<panic: unknown OA_*: %x
1481|perldiag/panic: unknown OA_*: %x>
1482
1483=item *
1484
25d191b5
KW
1485L<Unescaped left brace in regex is illegal here|perldiag/Unescaped left brace in regex is illegal here in regex; marked by S<E<lt>-- HERE> in mE<sol>%sE<sol>>
1486
1487Unescaped left braces are now illegal in some contexts in regular expression
1488patterns. In other contexts, they are still just deprecated; they will
1489be illegal in Perl 5.30.
2c8edc25
S
1490
1491=item *
1492
25d191b5
KW
1493L<Version control conflict marker|perldiag/"Version control conflict marker">
1494
1495(F) The parser found a line starting with C<E<lt>E<lt>E<lt>E<lt>E<lt>E<lt>E<lt>>,
1496C<E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>>, or C<=======>. These may be left by a
1497version control system to mark conflicts after a failed merge operation.
2c8edc25
S
1498
1499=back
1500
1501=head3 New Warnings
1502
1503=over 4
1504
1505=item *
1506
6ebc3119
KW
1507L<Can't determine class of operator %s, assuming C<BASEOP>
1508|perldiag/Can't determine class of operator %s, assuming C<BASEOP>>
1509
1510=item *
1511
2c8edc25
S
1512L<Declaring references is experimental|perldiag/"Declaring references is experimental">
1513
1514(S experimental::declared_refs) This warning is emitted if you use a reference
1515constructor on the right-hand side of C<my()>, C<state()>, C<our()>, or
1516C<local()>. Simply suppress the warning if you want to use the feature, but
1517know that in doing so you are taking the risk of using an experimental feature
1518which may change or be removed in a future Perl version:
1519
1520 no warnings "experimental::declared_refs";
1521 use feature "declared_refs";
1522 $fooref = my \$foo;
1523
473ac7a0
KW
1524See L</Declaring a reference to a variable>.
1525
2c8edc25
S
1526=item *
1527
ef94516c
KW
1528L<do "%s" failed, '.' is no longer in @INC|perldiag/do "%s" failed, '.' is no longer in @INC; did you mean do ".E<sol>%s"?>
1529
1530Since C<"."> is now removed from C<@INC> by default, C<do> will now trigger a warning recommending to fix the C<do> statement.
1531
1532=item *
1533
70ef9fe7
DM
1534L<C<File::Glob::glob()> will disappear in perl 5.30. Use C<File::Glob::bsd_glob()> instead.
1535|perldiag/C<File::Glob::glob()> will disappear in perl 5.30. Use C<File::Glob::bsd_glob()> instead.>
2c8edc25 1536
89853d76
DH
1537=item *
1538
b09c6dc3 1539L<Unescaped literal '%c' in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
6ebc3119
KW
1540|perldiag/Unescaped literal '%c' in regex; marked by <-- HERE in mE<sol>%sE<sol>>
1541
1542=item *
1543
ef94516c 1544L<Use of unassigned code point or non-standalone grapheme for a delimiter will be a fatal error starting in Perl 5.30|perldiag/"Use of unassigned code point or non-standalone grapheme for a delimiter will be a fatal error starting in Perl 5.30">
89853d76 1545
ef94516c 1546See L</Deprecations>
89853d76 1547
2c8edc25
S
1548=back
1549
1550=head2 Changes to Existing Diagnostics
1551
1552=over 4
1553
1554=item *
1555
1556When a C<require> fails, we now do not provide C<@INC> when the C<require>
1557is for a file instead of a module.
1558
1559=item *
1560
1561When C<@INC> is not scanned for a C<require> call, we no longer display
1562C<@INC> to avoid confusion.
1563
1564=item *
1565
cf3a543f
KW
1566L<Attribute "locked" is deprecated, and will disappear in Perl 5.28
1567|perldiag/Attribute "locked" is deprecated, and will disappear in Perl 5.28>
2c8edc25 1568
70ef9fe7
DM
1569This existing warning has had the I<and will disappear> text added in this
1570release.
1571
2c8edc25
S
1572=item *
1573
cf3a543f
KW
1574L<Attribute "unique" is deprecated, and will disappear in Perl 5.28
1575|perldiag/Attribute "unique" is deprecated, and will disappear in Perl 5.28>
2c8edc25 1576
70ef9fe7
DM
1577This existing warning has had the I<and will disappear> text added in this
1578release.
1579
1580=item *
1581
1582Calling POSIX::%s() is deprecated
1583
1584This warning has been removed, as the deprecated functions have been
1585removed from POSIX.
1586
2c8edc25
S
1587=item *
1588
cf3a543f
KW
1589L<Constants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32
1590|perldiag/Constants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32>
2c8edc25 1591
70ef9fe7
DM
1592This existing warning has had the I<this will not be allowed> text added
1593in this release.
1594
2c8edc25
S
1595=item *
1596
cf3a543f
KW
1597L<Deprecated use of C<my()> in false conditional. This will be a fatal error in Perl 5.30
1598|perldiag/Deprecated use of C<my()> in false conditional. This will be a fatal error in Perl 5.30>
2c8edc25 1599
70ef9fe7
DM
1600This existing warning has had the I<this will be a fatal error> text added
1601in this release.
1602
2c8edc25
S
1603=item *
1604
cf3a543f
KW
1605L<C<dump()> better written as C<CORE::dump()>. C<dump()> will no longer be available in Perl 5.30
1606|perldiag/C<dump()> better written as C<CORE::dump()>. C<dump()> will no longer be available in Perl 5.30>
2c8edc25 1607
70ef9fe7
DM
1608This existing warning has had the I<no longer be available> text added in
1609this release.
1610
2c8edc25
S
1611=item *
1612
70ef9fe7
DM
1613L<Experimental %s on scalar is now forbidden
1614|perldiag/Experimental %s on scalar is now forbidden>
1615
1616This message is now followed by more helpful text.
1617L<[perl #127976]|https://rt.perl.org/Public/Bug/Display.html?id=127976>
2c8edc25
S
1618
1619=item *
1620
70ef9fe7 1621Experimental "%s" subs not enabled
29480ba4 1622
70ef9fe7 1623This warning was been removed, as lexical subs are no longer experimental.
906e28fb
KW
1624
1625=item *
1626
70ef9fe7
DM
1627Having more than one /%c regexp modifier is deprecated
1628
1629This deprecation warning has been removed, since C</xx> now has a new
1630meaning.
2c8edc25
S
1631
1632=item *
1633
cf3a543f
KW
1634L<%s() is deprecated on C<:utf8> handles. This will be a fatal error in Perl 5.30
1635|perldiag/%s() is deprecated on C<:utf8> handles. This will be a fatal error in Perl 5.30>.
2c8edc25 1636
70ef9fe7
DM
1637where "%s" is one of C<sysread>, C<recv>, C<syswrite>, or C<send>.
1638
1639This existing warning has had the I<this will be a fatal error> text added
1640in this release.
1641
3c6ddc9f
TC
1642This warning is now enabled by default, as all C<deprecated> category
1643warnings should be.
1644
2c8edc25
S
1645=item *
1646
cf3a543f
KW
1647L<C<$*> is no longer supported. Its use will be fatal in Perl 5.30
1648|perldiag/C<$*> is no longer supported. Its use will be fatal in Perl 5.30>
2c8edc25 1649
70ef9fe7
DM
1650This existing warning has had the I<its use will be fatal> text added in
1651this release.
1652
2c8edc25
S
1653=item *
1654
6ebc3119
KW
1655L<C<$#> is no longer supported. Its use will be fatal in Perl 5.30
1656|perldiag/C<$#> is no longer supported. Its use will be fatal in Perl 5.30>
1657
70ef9fe7
DM
1658This existing warning has had the I<its use will be fatal> text added in
1659this release.
1660
6ebc3119
KW
1661=item *
1662
a72cf578
KW
1663L<Malformed UTF-8 character%s
1664|perldiag/Malformed UTF-8 character%s>
1665
1666Details as to the exact problem have been added at the end of this
1667message
1668
1669=item *
1670
70ef9fe7
DM
1671L<Missing or undefined argument to %s
1672|perldiag/Missing or undefined argument to %s>
1673
1674This warning used to warn about C<require>, even if it was actually C<do>
1675which being executed. It now gets the operation name right.
1676
1677=item *
1678
1679NO-BREAK SPACE in a charnames alias definition is deprecated
1680
1681This warning has been removed as the behavior is now an error.
1682
1683=item *
1684
1ad4777f
DM
1685L<Odd nameE<sol>value argument for subroutine '%s'
1686|perldiag/"Odd nameE<sol>value argument for subroutine '%s'">
1687
1688This warning now includes the name of the offending subroutine.
1689
1690=item *
1691
cf3a543f
KW
1692L<Opening dirhandle %s also as a file. This will be a fatal error in Perl 5.28
1693|perldiag/Opening dirhandle %s also as a file. This will be a fatal error in Perl 5.28>
2c8edc25 1694
70ef9fe7
DM
1695This existing warning has had the I<this will be a fatal error> text added
1696in this release.
1697
2c8edc25
S
1698=item *
1699
cf3a543f
KW
1700L<Opening filehandle %s also as a directory. This will be a fatal error in Perl 5.28
1701|perldiag/Opening filehandle %s also as a directory. This will be a fatal error in Perl 5.28>
2c8edc25 1702
70ef9fe7
DM
1703This existing warning has had the I<this will be a fatal error> text added
1704in this release.
1705
1706=item *
1707
1708panic: ck_split, type=%u
1709
1710panic: pp_split, pm=%p, s=%p
1711
1712These panic errors have been removed.
1713
1714=item *
1715
1716Passing malformed UTF-8 to "%s" is deprecated
1717
1718This warning has been changed to the fatal
1719L<Malformed UTF-8 string in "%s"
1720|perldiag/Malformed UTF-8 string in "%s">
1721
2c8edc25
S
1722=item *
1723
b09c6dc3
S
1724L<Setting C<< $E<sol> >> to a reference to %s as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28
1725|perldiag/Setting C<< $E<sol> >> to a reference to %s as a form of slurp is deprecated, treating as undef. This will be fatal in Perl 5.28>
2c8edc25 1726
70ef9fe7
DM
1727This existing warning has had the I<this will be fatal> text added in
1728this release.
1729
1730=item *
1731
1732L<C<${^ENCODING}> is no longer supported. Its use will be fatal in Perl 5.28|perldiag/"${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28">
1733
1734This warning used to be: "Setting C<${^ENCODING}> is deprecated".
1735
1736The special action of the variable C<${^ENCODING}> was formerly used to
1737implement the C<encoding> pragma. As of Perl 5.26, rather than being
1738deprecated, assigning to this variable now has no effect except to issue
1739the warning.
1740
1741=item *
1742
1743L<Too few arguments for subroutine '%s'
1744|perldiag/Too few arguments for subroutine '%s'>
1745
1746This warning now includes the name of the offending subroutine.
1747
1748=item *
1749
1750L<Too many arguments for subroutine '%s'
1751|perldiag/Too many arguments for subroutine '%s'>
1752
1753This warning now includes the name of the offending subroutine.
1754
2c8edc25
S
1755=item *
1756
cf3a543f 1757L<Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by S<< E<lt>-- HERE >> in mE<sol>%sE<sol>
b09c6dc3 1758|perldiag/Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by S<< E<lt>-- HERE >> in mE<sol>%sE<sol>>
2c8edc25 1759
70ef9fe7
DM
1760This existing warning has had the I<here (and will be fatal...)> text
1761added in this release.
1762
2c8edc25
S
1763=item *
1764
cf3a543f
KW
1765L<Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28
1766|perldiag/Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28>
2c8edc25 1767
70ef9fe7
DM
1768This existing warning has had the I<its use will be fatal> text added in
1769this release.
1770
2c8edc25
S
1771=item *
1772
cf3a543f
KW
1773L<Use of bare E<lt>E<lt> to mean E<lt>E<lt>"" is deprecated. Its use will be fatal in Perl 5.28
1774|perldiag/Use of bare E<lt>E<lt> to mean E<lt>E<lt>"" is deprecated. Its use will be fatal in Perl 5.28>
2c8edc25 1775
70ef9fe7
DM
1776This existing warning has had the I<its use will be fatal> text added in
1777this release.
1778
2c8edc25
S
1779=item *
1780
cf3a543f
KW
1781L<Use of code point 0x%s is deprecated; the permissible max is 0x%s. This will be fatal in Perl 5.28
1782|perldiag/Use of code point 0x%s is deprecated; the permissible max is 0x%s. This will be fatal in Perl 5.28>
2c8edc25 1783
70ef9fe7
DM
1784This existing warning has had the I<this will be fatal> text added in
1785this release.
1786
2c8edc25
S
1787=item *
1788
cf3a543f
KW
1789L<Use of comma-less variable list is deprecated. Its use will be fatal in Perl 5.28
1790|perldiag/Use of comma-less variable list is deprecated. Its use will be fatal in Perl 5.28>
2c8edc25 1791
70ef9fe7
DM
1792This existing warning has had the I<its use will be fatal> text added in
1793this release.
1794
2c8edc25
S
1795=item *
1796
cf3a543f
KW
1797L<Use of inherited C<AUTOLOAD> for non-method %s() is deprecated. This will be fatal in Perl 5.28
1798|perldiag/Use of inherited C<AUTOLOAD> for non-method %s() is deprecated. This will be fatal in Perl 5.28>
2c8edc25 1799
70ef9fe7
DM
1800This existing warning has had the I<this will be fatal> text added in
1801this release.
1802
2c8edc25
S
1803=item *
1804
cf3a543f
KW
1805L<Use of strings with code points over 0xFF as arguments to %s operator is deprecated. This will be a fatal error in Perl 5.28
1806|perldiag/Use of strings with code points over 0xFF as arguments to %s operator is deprecated. This will be a fatal error in Perl 5.28>
2c8edc25 1807
70ef9fe7
DM
1808This existing warning has had the I<this will be a fatal error> text added in
1809this release.
1810
2c8edc25
S
1811=back
1812
1813=head1 Utility Changes
1814
1815=head2 F<c2ph> and F<pstruct>
1816
1817=over 4
1818
1819=item *
1820
1821These old utilities have long since superceded by L<h2xs>, and are
1822now gone from the distribution.
1823
1824=back
1825
1826=head2 F<Porting/pod_lib.pl>
1827
1828=over 4
1829
1830=item *
1831
1832Removed spurious executable bit.
1833
1834=item *
1835
fb5d4b1a 1836Account for the possibility of DOS file endings.
2c8edc25
S
1837
1838=back
1839
1840=head2 F<Porting/sync-with-cpan>
1841
1842=over 4
1843
1844=item *
1845
1846Many improvements
1847
1848=back
1849
1850=head2 F<perf/benchmarks>
1851
1852=over 4
1853
1854=item *
1855
1856Tidy file, rename some symbols.
1857
1858=back
1859
1860=head2 F<Porting/checkAUTHORS.pl>
1861
1862=over 4
1863
1864=item *
1865
0f275d26 1866Replace obscure character range with C<\w>.
2c8edc25
S
1867
1868=back
1869
1870=head2 F<t/porting/regen.t>
1871
1872=over 4
1873
1874=item *
1875
1876try to be more helpful when tests fail.
1877
1878=back
1879
1880=head2 F<utils/h2xs.PL>
1881
1882=over 4
1883
1884=item *
1885
1886Avoid infinite loop for enums.
1887
1888=back
1889
1890=head2 L<perlbug>
1891
1892=over 4
1893
1894=item *
1895
1896Long lines in the message body are now wrapped at 900 characters, to stay
1897well within the 1000-character limit imposed by SMTP mail transfer agents.
1898This is particularly likely to be important for the list of arguments to
1899C<Configure>, which can readily exceed the limit if, for example, it names
95b17558 1900several non-default installation paths. This change also adds the first unit
a3a9a3d2
KW
1901tests for perlbug.
1902L<[perl #128020]|https://rt.perl.org/Public/Bug/Display.html?id=128020>
2c8edc25
S
1903
1904=back
1905
1906=head1 Configuration and Compilation
1907
1908=over 4
1909
1910=item *
1911
89853d76 1912C<-Ddefault_inc_excludes_dot> has been turned on by default.
2c8edc25
S
1913
1914=item *
1915
a3a9a3d2
KW
1916The C<dtrace> build process has further changes
1917L<[perl #130108]|https://rt.perl.org/Public/Bug/Display.html?id=130108>:
2c8edc25
S
1918
1919=over
1920
1921=item *
1922
1923If the C<-xnolibs> is available, use that so a F<dtrace> perl can be
1924built within a FreeBSD jail.
1925
1926=item *
1927
1928On systems that build a dtrace object file (FreeBSD, Solaris and
1929SystemTap's dtrace emulation), copy the input objects to a separate
1930directory and process them there, and use those objects in the link,
1931since C<dtrace -G> also modifies these objects.
1932
1933=item *
1934
1935Add libelf to the build on FreeBSD 10.x, since dtrace adds references
1936to libelf symbols.
1937
1938=item *
1939
1940Generate a dummy dtrace_main.o if C<dtrace -G> fails to build it. A
1941default build on Solaris generates probes from the unused inline
1942functions, while they don't on FreeBSD, which causes C<dtrace -G> to
1943fail.
1944
1945=back
1946
2c8edc25
S
1947=item *
1948
0f032fe1
KW
1949You can now disable perl's use of the C<PERL_HASH_SEED> and
1950C<PERL_PERTURB_KEYS> environment variables by configuring perl with
2c8edc25
S
1951C<-Accflags=NO_PERL_HASH_ENV>.
1952
1953=item *
1954
0f032fe1 1955You can now disable perl's use of the C<PERL_HASH_SEED_DEBUG> environment
2c8edc25
S
1956variable by configuring perl with
1957C<-Accflags=-DNO_PERL_HASH_SEED_DEBUG>.
1958
1959=item *
1960
1961Zero out the alignment bytes when calculating the bytes for 80-bit C<NaN>
a3a9a3d2
KW
1962and C<Inf> to make builds more reproducible.
1963L<[perl #130133]|https://rt.perl.org/Public/Bug/Display.html?id=130133>
2c8edc25
S
1964
1965=item *
1966
fb5d4b1a 1967Since v5.18 for testing purposes, we have included support for
2c8edc25 1968building perl with a variety of non-standard, and non-recommended
95b17558
KW
1969hash functions. Since we do not recommend the use of these functions
1970we have removed them and their corresponding build options. Specifically
2c8edc25
S
1971this includes the following build options:
1972
1973 PERL_HASH_FUNC_SDBM
1974 PERL_HASH_FUNC_DJB2
1975 PERL_HASH_FUNC_SUPERFAST
1976 PERL_HASH_FUNC_MURMUR3
1977 PERL_HASH_FUNC_ONE_AT_A_TIME
1978 PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
1979 PERL_HASH_FUNC_MURMUR_HASH_64A
1980 PERL_HASH_FUNC_MURMUR_HASH_64B
1981
1982=item *
1983
1984Remove "Warning: perl appears in your path"
1985
1986This install warning is more or less obsolete, since most platforms already
0f032fe1 1987B<will> have a F</usr/bin/perl> or similar provided by the OS.
2c8edc25
S
1988
1989=item *
1990
0f032fe1 1991Reduce verbosity of C<make install.man>
2c8edc25
S
1992
1993Previously, two progress messages were emitted for each manpage: one by
1994installman itself, and one by the function in install_lib.pl that it calls to
95b17558 1995actually install the file. Disabling the second of those in each case saves
2c8edc25
S
1996over 750 lines of unhelpful output.
1997
1998=item *
1999
a3a9a3d2
KW
2000Cleanup for C<clang -Weverything> support.
2001L<[perl #129961]|https://rt.perl.org/Public/Bug/Display.html?id=129961>
2c8edc25
S
2002
2003=item *
2004
2005Configure: signbit scan was assuming too much, stop assuming negative 0.
2006
2007=item *
2008
2009Various compiler warnings have been silenced.
2010
2011=item *
2012
2013Several smaller changes have been made to remove impediments to compiling under
2014C++11.
2015
2016=item *
2017
2018Builds using C<USE_PAD_RESET> now work again; this configuration had
2019bit-rotted.
2020
2021=item *
2022
2023A probe for C<gai_strerror> was added to F<Configure> that checks if the
0f032fe1
KW
2024the C<gai_strerror()> routine is available and can be used to
2025translate error codes returned by C<getaddrinfo()> into human
2c8edc25
S
2026readable strings.
2027
2028=item *
2029
0f032fe1 2030F<Configure> now aborts if both C<-Duselongdouble> and C<-Dusequadmath> are
2c8edc25
S
2031requested.
2032L<[perl #126203]|https://rt.perl.org/Public/Bug/Display.html?id=126203>
2033
2034=item *
2035
0f032fe1 2036Fixed a bug in which F<Configure> could append C<-quadmath> to the archname even
2c8edc25
S
2037if it was already present.
2038L<[perl #128538]|https://rt.perl.org/Public/Bug/Display.html?id=128538>
2039
2040=item *
2041
0f032fe1
KW
2042Clang builds with C<-DPERL_GLOBAL_STRUCT> or
2043C<-DPERL_GLOBAL_STRUCT_PRIVATE> have
2c8edc25
S
2044been fixed (by disabling Thread Safety Analysis for these configurations).
2045
2046=item *
2047
2048F<make_ext.pl> no longer updates a module's F<pm_to_blib> file when no
2049files require updates. This could cause dependencies, F<perlmain.c>
a3a9a3d2
KW
2050in particular, to be rebuilt unnecessarily.
2051L<[perl #126710]|https://rt.perl.org/Public/Bug/Display.html?id=126710>
2c8edc25
S
2052
2053=item *
2054
2055The output of C<perl -V> has been reformatted so that each configuration
2056and compile-time option is now listed one per line, to improve
2057readability.
2058
2059=item *
2060
2061C<Configure> now builds C<miniperl> and C<generate_uudmap> if you
2062invoke it with C<-Dusecrosscompiler> but not C<-Dtargethost=somehost>.
2063This means you can supply your target platform C<config.sh>, generate
a3a9a3d2
KW
2064the headers and proceed to build your cross-target perl.
2065L<[perl #127234]|https://rt.perl.org/Public/Bug/Display.html?id=127234>
2c8edc25
S
2066
2067=item *
2068
2069Builds with C<-Accflags=-DPERL_TRACE_OPS> now only dump the operator
2070counts when the environment variable C<PERL_TRACE_OPS> to be set to a
2071non-zero integer. This allows C<make test> to pass on such a build.
2072
2073=item *
2074
2075When building with GCC 6 and link-time optimization (the C<-flto> option to
2076C<gcc>), C<Configure> was treating all probed symbols as present on the
95b17558 2077system, regardless of whether they actually exist. This has been fixed.
a3a9a3d2 2078L<[perl #128131]|https://rt.perl.org/Public/Bug/Display.html?id=128131>
2c8edc25
S
2079
2080=item *
2081
2082The F<t/test.pl> library is used for internal testing of Perl itself, and
95b17558 2083also copied by several CPAN modules. Some of those modules must work on
2c8edc25 2084older versions of Perl, so F<t/test.pl> must in turn avoid newer Perl
95b17558 2085features. Compatibility with Perl 5.8 was inadvertently removed some time
a3a9a3d2
KW
2086ago; it has now been restored.
2087L<[perl #128052]|https://rt.perl.org/Public/Bug/Display.html?id=128052>
2c8edc25
S
2088
2089=item *
2090
2091The build process no longer emits an extra blank line before building each
2092"simple" extension (those with only F<*.pm> and F<*.pod> files).
2093
2094=back
2095
2096=head1 Testing
2097
dd84ba97
KW
2098Tests were added and changed to reflect the other additions and changes
2099in this release. In addition, these substantive changes were made:
2100
2c8edc25
S
2101=over 4
2102
2103=item *
2104
dd84ba97
KW
2105A new test script, F<comp/parser_run.t>, has been added to test
2106reads through invalid pointers.
2c8edc25
S
2107
2108=item *
2109
2110Tests for locales were erroneously using locales incompatible with Perl.
2111
2112=item *
2113
2114Some parts of the test suite that try to exhaustively test edge cases in the
2115regex implementation have been restricted to running for a maximum of five
95b17558 2116minutes. On slow systems they could otherwise take several hours, without
2c8edc25
S
2117significantly improving our understanding of the correctness of the code
2118under test.
2119
2120In addition, some of those test cases have been split into more files, to
2121allow them to be run in parallel on suitable systems.
2122
2123=item *
2124
2125A new internal facility allows analysing the time taken by the individual
2126tests in Perl's own test suite; see F<Porting/harness-timer-report.pl>.
2127
2128=item *
2129
2130F<t/re/regexp_nonull.t> has been added to test that the regular expression
2131engine can handle scalars that do not have a null byte just past the end of
2132the string.
2133
2134=item *
2135
0ebc1fcf
KW
2136A new test script, F<t/op/decl-refs.t>, has been added to test the new feature
2137L</Declaring a reference to a variable>.
2c8edc25
S
2138
2139=item *
2140
dd84ba97
KW
2141A new test script, F<t/re/keep_tabs.t> has been added to contain tests
2142where C<\t> characters should not be expanded into spaces.
2143
2144=item *
2145
2c8edc25
S
2146A new test script, F<t/re/anyof.t>, has been added to test that the ANYOF nodes
2147generated by bracketed character classes are as expected.
2148
2149=item *
2150
dd84ba97
KW
2151There is now more extensive testing of the Unicode-related API macros
2152and functions.
2153
2154=item *
2155
2156Several of the longer running API test files have been split into
2157multiple test files so that they can be run in parallel.
2158
2159=item *
2160
2c8edc25 2161F<t/harness> now tries really hard not to run tests outside of the Perl
a3a9a3d2
KW
2162source tree.
2163L<[perl #124050]|https://rt.perl.org/Public/Bug/Display.html?id=124050>
2c8edc25
S
2164
2165=back
2166
2167=head1 Platform Support
2168
2169=head2 New Platforms
2170
2171=over 4
2172
2173=item NetBSD/VAX
2174
2175Perl now compiles under NetBSD on VAX machines. However, it's not
2176possible for that platform to implement floating-point infinities and
2177NaNs compatibly with most modern systems, which implement the IEEE-754
2178floating point standard. The hexadecimal floating point (C<0x...p[+-]n>
2179literals, C<printf %a>) is not implemented, either.
2180The C<make test> passes 98% of tests.
2181
2182=over 4
2183
2184=item *
2185
2186Test fixes and minor updates.
2187
2188=item *
2189
2190Account for lack of C<inf>, C<nan>, and C<-0.0> support.
2191
2192=back
2193
2194=back
2195
2196=head2 Platform-Specific Notes
2197
2198=over 4
2199
2200=item Darwin
2201
0f032fe1
KW
2202don't treat C<-Dprefix=/usr> as special, instead require an extra option
2203C<-Ddarwin_distribution> to produce the same results.
2c8edc25
S
2204
2205=item POSIX
2206
2207Finish removing POSIX deprecated functions.
2208
2209=item OS X
2210
0f032fe1
KW
2211OS X El Capitan doesn't implement the C<clock_gettime()> or
2212C<clock_getres()> APIs; emulate them as necessary.
2c8edc25
S
2213
2214=item macOS
2215
0f032fe1 2216Deprecated C<syscall(2)> on macOS 10.12.
2c8edc25
S
2217
2218=item EBCDIC
2219
2220Several tests have been updated to work (or be skipped) on EBCDIC platforms.
2221
2222=item HP-UX
2223
2224L<Net::Ping> UDP test is skipped on HP-UX.
2225
2226=item Hurd
2227
2228The hints for Hurd have been improved enabling malloc wrap and reporting the
2229GNU libc used (previously it was an empty string when reported).
2230
2231=item VAX
2232
29ce4d71 2233VAX floating point formats are now supported on NetBSD.
2c8edc25
S
2234
2235=item VMS
2236
2237=over 4
2238
2239=item *
2240
2241The path separator for the C<PERL5LIB> and C<PERLLIB> environment entries is
df48f9a4
KW
2242now a colon (C<":">) when running under a Unix shell. There is no change when
2243running under DCL (it's still C<"|">).
2c8edc25
S
2244
2245=item *
2246
29ce4d71
CB
2247C<configure.com> now recognizes the VSI-branded C compiler and no longer
2248recognizes the "DEC"-branded C compiler (as there hasn't been such a thing for
224915 or more years).
2c8edc25
S
2250
2251=back
2252
2253=item Windows
2254
2255=over 4
2256
2257=item *
2258
2259Support for compiling perl on Windows using Microsoft Visual Studio 2015
2260(containing Visual C++ 14.0) has been added.
2261
2262This version of VC++ includes a completely rewritten C run-time library, some
0f032fe1
KW
2263of the changes in which mean that work done to resolve a socket
2264C<close()> bug in
2c8edc25
S
2265perl #120091 and perl #118059 is not workable in its current state with this
2266version of VC++. Therefore, we have effectively reverted that bug fix for
2267VS2015 onwards on the basis that being able to build with VS2015 onwards is
2268more important than keeping the bug fix. We may revisit this in the future to
2269attempt to fix the bug again in a way that is compatible with VS2015.
2270
2271These changes do not affect compilation with GCC or with Visual Studio versions
fce64130 2272up to and including VS2013, I<i.e.>, the bug fix is retained (unchanged) for those
2c8edc25
S
2273compilers.
2274
2275Note that you may experience compatibility problems if you mix a perl built
2276with GCC or VS E<lt>= VS2013 with XS modules built with VS2015, or if you mix a
2277perl built with VS2015 with XS modules built with GCC or VS E<lt>= VS2013.
2278Some incompatibility may arise because of the bug fix that has been reverted
2279for VS2015 builds of perl, but there may well be incompatibility anyway because
fce64130 2280of the rewritten CRT in VS2015 (I<e.g.>, see discussion at
bdd37d82 2281L<http://stackoverflow.com/questions/30412951>).
2c8edc25
S
2282
2283=back
2284
2285=item Win32
2286
2287=over 4
2288
2289=item *
2290
95b17558 2291Tweaks for Win32 VC vs GCC detection makefile code. This fixes issue that CCHOME
2c8edc25 2292depends on CCTYPE, which in auto detect mode is set after CCHOME, so CCHOME uses
95b17558 2293the uninit CCTYPE var. Also fix else vs .ELSE in makefile.mk
2c8edc25
S
2294
2295=item *
2296
2297fp definitions have been updated.
2298
2299=back
2300
2c8edc25
S
2301=item Linux
2302
2303Drop support for Linux a.out Linux has used ELF for over twenty years.
2304
2305=item OpenBSD 6
2306
2307OpenBSD 6 still does not support returning pid, gid or uid with SA_SIGINFO.
2308Make sure this is accounted for.
2309
2310=item FreeBSD
2311
0f032fe1 2312F<t/uni/overload.t>: Skip hanging test on FreeBSD.
2c8edc25
S
2313
2314=back
2315
2316=head1 Internal Changes
2317
2318=over 4
2319
2320=item *
2321
0ebc1fcf
KW
2322A new API function L<C<sv_setpv_bufsize()>|perlapi/sv_setpv_bufsize>
2323allows simultaneously setting the
c2ef64b1
DM
2324length and allocated size of the buffer in an C<SV>, growing the buffer if
2325necessary.
2c8edc25
S
2326
2327=item *
2328
0ebc1fcf
KW
2329A new API macro L<C<SvPVCLEAR()>|perlapi/SvPVCLEAR> sets its C<SV>
2330argument to an empty string,
c2ef64b1 2331like Perl-space C<$x = ''>, but with several optimisations.
2c8edc25
S
2332
2333=item *
2334
c11f9206 2335Several new macros and functions for dealing with Unicode and
fb5d4b1a
KW
2336UTF-8-encoded strings have been added to the API, as well as some
2337changes in
c11f9206
DM
2338functionality of existing functions (see L<perlapi/Unicode Support> for
2339more details):
2340
2341=over
2342
2343=item *
2344
0ebc1fcf
KW
2345New versions of the API macros like C<isALPHA_utf8> and C<toLOWER_utf8>
2346have been added, each with the suffix C<_safe>, like
2347L<C<isSPACE_utf8_safe>|perlapi/isSPACE>. These take an extra
2348parameter, giving an upper
2349limit of how far into the string it is safe to read. Using the old
2350versions could cause attempts to read beyond the end of the input buffer
2351if the UTF-8 is not well-formed, and their use now raises a deprecation
2352warning. Details are at L<perlapi/Character classification>.
2c8edc25
S
2353
2354=item *
2355
0ebc1fcf
KW
2356Macros like L<C<isALPHA_utf8>|perlapi/isALPHA> and
2357L<C<toLOWER_utf8>|perlapi/toLOWER_utf8> now die if they detect
ac6c7175
KW
2358that their input UTF-8 is malformed. A deprecation warning had been
2359issued since Perl 5.18.
2c8edc25
S
2360
2361=item *
2362
c11f9206
DM
2363Several new macros for analysing the validity of utf8 sequences. These
2364are:
2365
bfe8fcbb
KW
2366L<C<UTF8_GOT_ABOVE_31_BIT>|perlapi/UTF8_GOT_ABOVE_31_BIT>
2367L<C<UTF8_GOT_CONTINUATION>|perlapi/UTF8_GOT_CONTINUATION>
2368L<C<UTF8_GOT_EMPTY>|perlapi/UTF8_GOT_EMPTY>
2369L<C<UTF8_GOT_LONG>|perlapi/UTF8_GOT_LONG>
2370L<C<UTF8_GOT_NONCHAR>|perlapi/UTF8_GOT_NONCHAR>
2371L<C<UTF8_GOT_NON_CONTINUATION>|perlapi/UTF8_GOT_NON_CONTINUATION>
2372L<C<UTF8_GOT_OVERFLOW>|perlapi/UTF8_GOT_OVERFLOW>
2373L<C<UTF8_GOT_SHORT>|perlapi/UTF8_GOT_SHORT>
2374L<C<UTF8_GOT_SUPER>|perlapi/UTF8_GOT_SUPER>
2375L<C<UTF8_GOT_SURROGATE>|perlapi/UTF8_GOT_SURROGATE>
2376L<C<UTF8_IS_INVARIANT>|perlapi/UTF8_IS_INVARIANT>
2377L<C<UTF8_IS_NONCHAR>|perlapi/UTF8_IS_NONCHAR>
2378L<C<UTF8_IS_SUPER>|perlapi/UTF8_IS_SUPER>
2379L<C<UTF8_IS_SURROGATE>|perlapi/UTF8_IS_SURROGATE>
2380L<C<UVCHR_IS_INVARIANT>|perlapi/UVCHR_IS_INVARIANT>
2381L<C<isUTF8_CHAR_flags>|perlapi/isUTF8_CHAR_flags>
2382L<C<isSTRICT_UTF8_CHAR>|perlapi/isSTRICT_UTF8_CHAR>
2383L<C<isC9_STRICT_UTF8_CHAR>|perlapi/isC9_STRICT_UTF8_CHAR>
2c8edc25
S
2384
2385=item *
2386
0f032fe1 2387Functions that are all extensions of the C<is_utf8_string_I<*>()> functions,
c11f9206
DM
2388that apply various restrictions to the UTF-8 recognized as valid:
2389
bfe8fcbb
KW
2390L<C<is_strict_utf8_string>|perlapi/is_strict_utf8_string>,
2391L<C<is_strict_utf8_string_loc>|perlapi/is_strict_utf8_string_loc>,
2392L<C<is_strict_utf8_string_loclen>|perlapi/is_strict_utf8_string_loclen>,
c11f9206 2393
bfe8fcbb
KW
2394L<C<is_c9strict_utf8_string>|perlapi/is_c9strict_utf8_string>,
2395L<C<is_c9strict_utf8_string_loc>|perlapi/is_c9strict_utf8_string_loc>,
2396L<C<is_c9strict_utf8_string_loclen>|perlapi/is_c9strict_utf8_string_loclen>,
c11f9206 2397
bfe8fcbb
KW
2398L<C<is_utf8_string_flags>|perlapi/is_utf8_string_flags>,
2399L<C<is_utf8_string_loc_flags>|perlapi/is_utf8_string_loc_flags>,
2400L<C<is_utf8_string_loclen_flags>|perlapi/is_utf8_string_loclen_flags>,
c11f9206 2401
bfe8fcbb
KW
2402L<C<is_utf8_fixed_width_buf_flags>|perlapi/is_utf8_fixed_width_buf_flags>,
2403L<C<is_utf8_fixed_width_buf_loc_flags>|perlapi/is_utf8_fixed_width_buf_loc_flags>,
2404L<C<is_utf8_fixed_width_buf_loclen_flags>|perlapi/is_utf8_fixed_width_buf_loclen_flags>.
c11f9206 2405
bfe8fcbb
KW
2406L<C<is_utf8_invariant_string>|perlapi/is_utf8_invariant_string>.
2407L<C<is_utf8_valid_partial_char>|perlapi/is_utf8_valid_partial_char>.
2408L<C<is_utf8_valid_partial_char_flags>|perlapi/is_utf8_valid_partial_char_flags>.
2c8edc25
S
2409
2410=item *
2411
bfe8fcbb
KW
2412The functions L<C<utf8n_to_uvchr>|perlapi/utf8n_to_uvchr> and its
2413derivatives have had several changes of behaviour.
c11f9206
DM
2414
2415Calling them, while passing a string length of 0 is now asserted against
2416in DEBUGGING builds, and otherwise returns the Unicode REPLACEMENT
2417CHARACTER. If you have nothing to decode, you shouldn't call the decode
2418function.
2419
2420They now return the Unicode REPLACEMENT CHARACTER if called with UTF-8
2421that has the overlong malformation, and that malformation is allowed by
2422the input parameters. This malformation is where the UTF-8 looks valid
2423syntactically, but there is a shorter sequence that yields the same code
2424point. This has been forbidden since Unicode version 3.1.
2425
2426They now accept an input
2c8edc25
S
2427flag to allow the overflow malformation. This malformation is when the
2428UTF-8 may be syntactically valid, but the code point it represents is
2429not capable of being represented in the word length on the platform.
2430What "allowed" means in this case is that the function doesn't return an
fb5d4b1a
KW
2431error, and it advances the parse pointer to beyond the UTF-8 in
2432question, but it returns the Unicode REPLACEMENT CHARACTER as the value
2433of the code point (since the real value is not representable).
2c8edc25 2434
55b0afa5
KW
2435They no longer abandon searching for other malformations when the first
2436one is encountered. A call to one of these functions thus can generate
2437multiple diagnostics, instead of just one.
2c8edc25
S
2438
2439=item *
2440
0ebc1fcf
KW
2441L<C<valid_utf8_to_uvchr()>|perlapi/valid_utf8_to_uvchr> has been added
2442to the API (although it was
c11f9206 2443present in core earlier). Like C<utf8_to_uvchr_buf()>, but assumes that
fb5d4b1a 2444the next character is well-formed. Use with caution.
c11f9206
DM
2445
2446=item *
2447
bfe8fcbb
KW
2448A new function, L<C<utf8n_to_uvchr_error>|perlapi/utf8n_to_uvchr_error>,
2449has been added for
2c8edc25
S
2450use by modules that need to know the details of UTF-8 malformations
2451beyond pass/fail. Previously, the only ways to know why a sequence was
2452ill-formed was to capture and parse the generated diagnostics, or to do
2453your own analysis.
2454
2455=item *
2456
0ebc1fcf
KW
2457There is now a safer version of utf8_hop(), called
2458L<C<utf8_hop_safe()>|perlapi/utf8_hop_safe>.
c11f9206
DM
2459Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or
2460after the end of the supplied buffer.
2c8edc25
S
2461
2462=item *
2463
0ebc1fcf
KW
2464Two new functions, L<C<utf8_hop_forward()>|perlapi/utf8_hop_forward> and
2465L<C<utf8_hop_back()>|perlapi/utf8_hop_back> are
c11f9206
DM
2466similar to C<utf8_hop_safe()> but are for when you know which direction
2467you wish to travel.
2c8edc25
S
2468
2469=item *
2470
c11f9206
DM
2471Two new macros which return useful utf8 byte sequences:
2472
bfe8fcbb
KW
2473L<C<BOM_UTF8>|perlapi/BOM_UTF8>
2474L<C<REPLACEMENT_CHARACTER_UTF8>|perlapi/REPLACEMENT_CHARACTER_UTF8>
c11f9206
DM
2475
2476=back
c2ef64b1
DM
2477
2478=item *
2479
2480Perl is now built with the C<PERL_OP_PARENT> compiler define enabled by
2481default. To disable it, use the C<PERL_NO_OP_PARENT> compiler define.
2482This flag alters how the C<op_sibling> field is used in C<OP> structures,
2483and has been available optionally since perl 5.22.
2484
2485See L<perl5220delta/"Internal Changes"> for more details of what this
2486build option does.
2487
2488=item *
2489
2490Three new ops, C<OP_ARGELEM>, C<OP_ARGDEFELEM> and C<OP_ARGCHECK> have
2491been added. These are intended principally to implement the individual
2492elements of a subroutine signature, plus any overall checking required.
2493
2494=item *
2495
96e0fd86
DM
2496The C<OP_PUSHRE> op has been eliminated and the C<OP_SPLIT> op has been
2497changed from class C<LISTOP> to C<PMOP>.
2498
2499Formerly the first child of a split would be a pushre, which would have the
2500split's regex attached to it. Now the regex is attached directly to the
2501split op, and the pushre has been eliminated.
2502
2503=item *
2504
0ebc1fcf
KW
2505The L<C<op_class()>|perlapi/op_class> API function has been added. This
2506is like the existing
c2ef64b1
DM
2507C<OP_CLASS()> macro, but can more accurately determine what struct an op
2508has been allocated as. For example C<OP_CLASS()> might return
2509C<OA_BASEOP_OR_UNOP> indicating that ops of this type are usually
2510allocated as an C<OP> or C<UNOP>; while C<op_class()> will return
2511C<OPclass_BASEOP> or C<OPclass_UNOP> as appropriate.
2c8edc25
S
2512
2513=item *
2514
2515All parts of the internals now agree that the C<sassign> op is a C<BINOP>;
2516previously it was listed as a C<BASEOP> in F<regen/opcodes>, which meant
2517that several parts of the internals had to be special-cased to accommodate
95b17558 2518it. This oddity's original motivation was to handle code like C<$x ||= 1>;
2c8edc25
S
2519that is now handled in a simpler way.
2520
2521=item *
2522
0ebc1fcf
KW
2523The output format of the L<C<op_dump()>|perlapi/op_dump> function (as
2524used by C<perl -Dx>)
c2ef64b1
DM
2525has changed: it now displays an "ASCII-art" tree structure, and shows more
2526low-level details about each op, such as its address and class.
2c8edc25
S
2527
2528=item *
2529
c2ef64b1
DM
2530The C<PADOFFSET> type has changed from being unsigned to signed, and
2531several pad-related variables such as C<PL_padix> have changed from being
2532of type C<I32> to type C<PADOFFSET>.
2c8edc25
S
2533
2534=item *
2535
c2ef64b1
DM
2536The C<DEBUGGING>-mode output for regex compilation and execution has been
2537enhanced.
2c8edc25
S
2538
2539=item *
2540
74ca8c9e
DM
2541Several obscure SV flags have been eliminated, sometimes along with the
2542macros which manipulate them: C<SVpbm_VALID>, C<SVpbm_TAIL>, C<SvTAIL_on>,
2543C<SvTAIL_off>, C<SVrepl_EVAL>, C<SvEVALED>
2c8edc25
S
2544
2545=item *
2546
74ca8c9e
DM
2547An OP op_private flag has been eliminated: C<OPpRUNTIME>. This used to
2548often get set on C<PMOP>s, but had become meaningless over time.
2c8edc25
S
2549
2550=back
2551
2552=head1 Selected Bug Fixes
2553
2554=over 4
2555
2556=item *
2557
5573eafe 2558Perl no longer panics when switching into some locales on machines with
a3a9a3d2
KW
2559buggy C<strxfrm()> implementations in their libc.
2560L<[perl #121734]|https://rt.perl.org/Public/Bug/Display.html?id=121734>
5573eafe
DM
2561
2562=item *
2563
2c8edc25
S
2564C< $-{$name} > would leak an C<AV> on each access if the regular
2565expression had no named captures. The same applies to access to any
2566hash tied with L<Tie::Hash::NamedCapture> and C<< all =E<gt> 1 >>. [perl
2567#130822]
2568
2569=item *
2570
2571Attempting to use the deprecated variable C<$#> as the object in an
2572indirect object method call could cause a heap use after free or
a3a9a3d2
KW
2573buffer overflow.
2574L<[perl #129274]|https://rt.perl.org/Public/Bug/Display.html?id=129274>
2c8edc25
S
2575
2576=item *
2577
2578When checking for an indirect object method call in some rare cases
2579the parser could reallocate the line buffer but then continue to use
a3a9a3d2
KW
2580pointers to the old buffer.
2581L<[perl #129190]|https://rt.perl.org/Public/Bug/Display.html?id=129190>
2c8edc25
S
2582
2583=item *
2584
0f032fe1
KW
2585Supplying a glob as the format argument to
2586L<C<formline>|perlfunc/formline> would
a3a9a3d2
KW
2587cause an assertion failure.
2588L<[perl #130722]|https://rt.perl.org/Public/Bug/Display.html?id=130722>
2c8edc25
S
2589
2590=item *
2591
2592Code like C< $value1 =~ qr/.../ ~~ $value2 > would have the match
0f032fe1 2593converted into a C<qr//> operator, leaving extra elements on the stack to
a3a9a3d2
KW
2594confuse any surrounding expression.
2595L<[perl #130705]|https://rt.perl.org/Public/Bug/Display.html?id=130705>
2c8edc25
S
2596
2597=item *
2598
d3972b39 2599Since v5.24 in some obscure cases, a regex which included code blocks
0f032fe1 2600from multiple sources (I<e.g.>, via embedded via C<qr//> objects) could end up
a3a9a3d2
KW
2601with the wrong current pad and crash or give weird results.
2602L<[perl #129881]|https://rt.perl.org/Public/Bug/Display.html?id=129881>
2c8edc25
S
2603
2604=item *
2605
2606Occasionally C<local()>s in a code block within a patterns weren't being
2607undone when the pattern matching backtracked over the code block.
a3a9a3d2 2608L<[perl #126697]|https://rt.perl.org/Public/Bug/Display.html?id=126697>
2c8edc25
S
2609
2610=item *
2611
2612Using C<substr()> to modify a magic variable could access freed memory
a3a9a3d2
KW
2613in some cases.
2614L<[perl #129340]|https://rt.perl.org/Public/Bug/Display.html?id=129340>
2c8edc25
S
2615
2616=item *
2617
2c8edc25 2618Under C<use utf8>, the entire Perl program is now checked that the UTF-8
a3a9a3d2
KW
2619is wellformed.
2620L<[perl #126310]|https://rt.perl.org/Public/Bug/Display.html?id=126310>.
2c8edc25
S
2621
2622=item *
2623
df48f9a4 2624The range operator C<".."> on strings now handles its arguments correctly when in
2c8edc25 2625the scope of the L<< C<unicode_strings>|feature/"The 'unicode_strings' feature" >>
95b17558 2626feature. The previous behaviour was sufficiently unexpected that we believe no
2c8edc25
S
2627correct program could have made use of it.
2628
2629=item *
2630
0f032fe1 2631The C<split> operator did not ensure enough space was allocated for
2c8edc25
S
2632its return value in scalar context. It could then write a single
2633pointer immediately beyond the end of the memory block allocated for
a3a9a3d2
KW
2634the stack.
2635L<[perl #130262]|https://rt.perl.org/Public/Bug/Display.html?id=130262>
2c8edc25
S
2636
2637=item *
2638
df48f9a4 2639Using a large code point with the C<"W"> pack template character with
2c8edc25
S
2640the current output position aligned at just the right point could
2641cause a write a single zero byte immediately beyond the end of an
a3a9a3d2
KW
2642allocated buffer.
2643L<[perl #129149]|https://rt.perl.org/Public/Bug/Display.html?id=129149>
2c8edc25
S
2644
2645=item *
2646
2647Supplying the form picture argument as part of the form argument list
2648where the picture specifies modifying the argument could cause an
a3a9a3d2
KW
2649access to the new freed compiled form.
2650L<[perl #129125]|https://rt.perl.org/Public/Bug/Display.html?id=129125>
2c8edc25
S
2651
2652=item *
2653
03c6d75f
TC
2654The L<sort()|perlfunc/sort> operator's built-in numeric comparison
2655function didn't handle large integers that weren't exactly
2656representable by a double. This now uses the same code used to
b09c6dc3 2657implement the C<< E<lt>=E<gt> >> operator.
a3a9a3d2 2658L<[perl #130335]|https://rt.perl.org/Public/Bug/Display.html?id=130335>
2c8edc25
S
2659
2660=item *
2661
0ebc1fcf 2662Fix issues with C</(?{ ... E<lt>E<lt>EOF })/> that broke
a3a9a3d2
KW
2663L<Method::Signatures>.
2664L<[perl #130398]|https://rt.perl.org/Public/Bug/Display.html?id=130398>
2c8edc25
S
2665
2666=item *
2667
a3a9a3d2
KW
2668Prevent tests from getting hung up on 'NonStop' option.
2669L<[perl #130445]|https://rt.perl.org/Public/Bug/Display.html?id=130445>
2c8edc25
S
2670
2671=item *
2672
2673Fixed an assertion failure with C<chop> and C<chomp>, which
a3a9a3d2
KW
2674could be triggered by C<chop(@x =~ tr/1/1/)>.
2675L<[perl #130198]|https://rt.perl.org/Public/Bug/Display.html?id=130198>.
2c8edc25
S
2676
2677=item *
2678
fb5d4b1a
KW
2679Fixed a comment skipping error in patterns under C</x>; it could stop
2680skipping a byte early, which could be in the middle of a UTF-8
a3a9a3d2
KW
2681character.
2682L<[perl #130495]|https://rt.perl.org/Public/Bug/Display.html?id=130495>.
2c8edc25
S
2683
2684=item *
2685
a3a9a3d2
KW
2686F<perldb> now ignores F</dev/tty> on non-Unix systems.
2687L<[perl #113960]|https://rt.perl.org/Public/Bug/Display.html?id=113960>;
2c8edc25
S
2688
2689=item *
2690
a3a9a3d2
KW
2691Fix assertion failure for C<{}-E<gt>$x> when C<$x> isn't defined.
2692L<[perl #130496]|https://rt.perl.org/Public/Bug/Display.html?id=130496>.
2c8edc25
S
2693
2694=item *
2695
a3a9a3d2
KW
2696DragonFly BSD now has support for C<setproctitle()>.
2697L<[perl #130068]|https://rt.perl.org/Public/Bug/Display.html?id=130068>.
2c8edc25
S
2698
2699=item *
2700
fb5d4b1a 2701Fix an assertion error which could be triggered when a lookahead string
a3a9a3d2
KW
2702in patterns exceeded a minimum length.
2703L<[perl #130522]|https://rt.perl.org/Public/Bug/Display.html?id=130522>.
2c8edc25
S
2704
2705=item *
2706
a3a9a3d2
KW
2707Only warn once per literal about a misplaced C<"_">.
2708L<[perl #70878]|https://rt.perl.org/Public/Bug/Display.html?id=70878>.
2c8edc25
S
2709
2710=item *
2711
a3a9a3d2
KW
2712Ensure range-start is set after error in C<tr///>.
2713L<[perl #129342]|https://rt.perl.org/Public/Bug/Display.html?id=129342>.
2c8edc25
S
2714
2715=item *
2716
2717Don't read past start of string for unmatched backref; otherwise,
a3a9a3d2
KW
2718we may have heap buffer overflow.
2719L<[perl #129377]|https://rt.perl.org/Public/Bug/Display.html?id=129377>.
2c8edc25
S
2720
2721=item *
2722
2c8edc25 2723C<use re 'strict'> is supposed to warn if you use a range whose start
95b17558 2724and end digit aren't from the same group of 10. It didn't do that
2c8edc25
S
2725for five groups of mathematical digits starting at U+1D7E.
2726
2727=item *
2728
fce64130 2729A sub containing a "forward" declaration with the same name (I<e.g.>,
2c8edc25
S
2730C<sub c { sub c; }>) could sometimes crash or loop infinitely. [perl
2731#129090]
2732
2733=item *
2734
fb5d4b1a 2735A crash in executing a regex with a non-anchored UTF-8 substring against a
a3a9a3d2
KW
2736target string that also used UTF-8 has been fixed.
2737L<[perl #129350]|https://rt.perl.org/Public/Bug/Display.html?id=129350>
2c8edc25
S
2738
2739=item *
2740
2741Previously, a shebang line like C<#!perl -i u> could be erroneously
95b17558 2742interpreted as requesting the C<-u> option. This has been fixed. [perl
2c8edc25
S
2743#129336]
2744
2745=item *
2746
2747The regex engine was previously producing incorrect results in some rare
2748situations when backtracking past a trie that matches only one thing; this
0f032fe1 2749showed up as capture buffers (C<$1>, C<$2>, I<etc.>) erroneously containing data
2c8edc25 2750from regex execution paths that weren't actually executed for the final
a3a9a3d2
KW
2751match.
2752L<[perl #129897]|https://rt.perl.org/Public/Bug/Display.html?id=129897>
2c8edc25
S
2753
2754=item *
2755
2756Certain regexes making use of the experimental C<regex_sets> feature could
a3a9a3d2
KW
2757trigger an assertion failure. This has been fixed.
2758L<[perl #129322]|https://rt.perl.org/Public/Bug/Display.html?id=129322>
2c8edc25
S
2759
2760=item *
2761
fce64130 2762Invalid assignments to a reference constructor (I<e.g.>, C<\eval=time>) could
a3a9a3d2
KW
2763sometimes crash in addition to giving a syntax error.
2764L<[perl #125679]|https://rt.perl.org/Public/Bug/Display.html?id=125679>
2c8edc25
S
2765
2766=item *
2767
2768The parser could sometimes crash if a bareword came after C<evalbytes>.
a3a9a3d2 2769L<[perl #129196]|https://rt.perl.org/Public/Bug/Display.html?id=129196>
2c8edc25
S
2770
2771=item *
2772
2773Autoloading via a method call would warn erroneously ("Use of inherited
2774AUTOLOAD for non-method") if there was a stub present in the package into
2775which the invocant had been blessed. The warning is no longer emitted in
a3a9a3d2
KW
2776such circumstances.
2777L<[perl #47047]|https://rt.perl.org/Public/Bug/Display.html?id=47047>
2c8edc25
S
2778
2779=item *
2780
2c8edc25 2781The use of C<splice> on arrays with nonexistent elements could cause other
a3a9a3d2
KW
2782operators to crash.
2783L<[perl #129164]|https://rt.perl.org/Public/Bug/Display.html?id=129164>
2c8edc25
S
2784
2785=item *
2786
2787Fixed case where C<re_untuit_start> will overshoot the length of a utf8
a3a9a3d2
KW
2788string.
2789L<[perl #129012]|https://rt.perl.org/Public/Bug/Display.html?id=129012>
2c8edc25
S
2790
2791=item *
2792
2793Handle C<CXt_SUBST> better in C<Perl_deb_stack_all>, previously it wasn't
2794checking that the I<current> C<cx> is the right type, and instead was always
a3a9a3d2
KW
2795checking the base C<cx> (effectively a noop).
2796L<[perl #129029]|https://rt.perl.org/Public/Bug/Display.html?id=129029>
2c8edc25
S
2797
2798=item *
2799
95b17558 2800Fixed two possible use-after-free bugs in C<Perl_yylex>. C<Perl_yylex>
2c8edc25 2801maintains up to two pointers into the parser buffer, one of which can
a3a9a3d2
KW
2802become stale under the right conditions.
2803L<[perl #129069]|https://rt.perl.org/Public/Bug/Display.html?id=129069>
2c8edc25
S
2804
2805=item *
2806
2807Fixed a crash with C<s///l> where it thought it was dealing with UTF-8
a3a9a3d2
KW
2808when it wasn't.
2809L<[perl #129038]|https://rt.perl.org/Public/Bug/Display.html?id=129038>
2c8edc25
S
2810
2811=item *
2812
2813Fixed place where regex was not setting the syntax error correctly.
a3a9a3d2 2814L<[perl #129122]|https://rt.perl.org/Public/Bug/Display.html?id=129122>
2c8edc25
S
2815
2816=item *
2817
df48f9a4 2818The C<&.> operator (and the C<"&"> operator, when it treats its arguments as
2c8edc25
S
2819strings) were failing to append a trailing null byte if at least one string
2820was marked as utf8 internally. Many code paths (system calls, regexp
2821compilation) still expect there to be a null byte in the string buffer
2822just past the end of the logical string. An assertion failure was the
a3a9a3d2
KW
2823result.
2824L<[perl #129287]|https://rt.perl.org/Public/Bug/Display.html?id=129287>
2c8edc25
S
2825
2826=item *
2827
95b17558 2828Make sure C<PL_oldoldbufptr> is preserved in C<scan_heredoc()>. In some
a3a9a3d2
KW
2829cases this is used in building error messages.
2830L<[perl #128988]|https://rt.perl.org/Public/Bug/Display.html?id=128988>
2c8edc25
S
2831
2832=item *
2833
570ce26a 2834Fix segfault when run with C<-DC> options on DEBUGGING builds.
a3a9a3d2 2835L<[perl #129106]|https://rt.perl.org/Public/Bug/Display.html?id=129106>
2c8edc25
S
2836
2837=item *
2838
2839Fixed the parser error handling for an 'C<:attr(foo>' that does not have
df48f9a4 2840an ending 'C<")">'.
2c8edc25
S
2841
2842=item *
2843
2844Fix C<Perl_delimcpy()> to handle a backslash as last char, this
a3a9a3d2
KW
2845actually fixed two bugs,
2846L<[perl #129064]|https://rt.perl.org/Public/Bug/Display.html?id=129064> and
2847L<[perl #129176]|https://rt.perl.org/Public/Bug/Display.html?id=129176>.
2c8edc25
S
2848
2849=item *
2850
a3a9a3d2 2851L<[perl #129267]|https://rt.perl.org/Public/Bug/Display.html?id=129267> rework C<gv_fetchmethod_pvn_flags> separator parsing to
0f032fe1 2852prevent possible string overrun with invalid len in F<gv.c>
2c8edc25
S
2853
2854=item *
2855
2856Problems with in-place array sorts: code like C<@a = sort { ... } @a>,
2857where the source and destination of the sort are the same plain array, are
95b17558 2858optimised to do less copying around. Two side-effects of this optimisation
2c8edc25
S
2859were that the contents of C<@a> as visible to to sort routine were
2860partially sorted, and under some circumstances accessing C<@a> during the
95b17558 2861sort could crash the interpreter. Both these issues have been fixed, and
2c8edc25
S
2862Sort functions see the original value of C<@a>.
2863
2864=item *
2865
2866Non-ASCII string delimiters are now reported correctly in error messages
a3a9a3d2
KW
2867for unterminated strings.
2868L<[perl #128701]|https://rt.perl.org/Public/Bug/Display.html?id=128701>
2c8edc25
S
2869
2870=item *
2871
2872C<pack("p", ...)> used to emit its warning ("Attempt to pack pointer to
2873temporary value") erroneously in some cases, but has been fixed.
2874
2875=item *
2876
2877C<@DB::args> is now exempt from "used once" warnings. The warnings only
2878occurred under B<-w>, because F<warnings.pm> itself uses C<@DB::args>
2879multiple times.
2880
2881=item *
2882
2883The use of built-in arrays or hash slices in a double-quoted string no
2884longer issues a warning ("Possible unintended interpolation...") if the
2885variable has not been mentioned before. This affected code like
2886C<qq|@DB::args|> and C<qq|@SIG{'CHLD', 'HUP'}|>. (The special variables
2887C<@-> and C<@+> were already exempt from the warning.)
2888
2889=item *
2890
2891C<gethostent> and similar functions now perform a null check internally, to
d3972b39 2892avoid crashing with torsocks. This was a regression from v5.22. [perl
2c8edc25
S
2893#128740]
2894
2895=item *
2896
2897C<defined *{'!'}>, C<defined *{'['}>, and C<defined *{'-'}> no longer leak
2898memory if the typeglob in question has never been accessed before.
2899
2900=item *
2901
2c8edc25
S
2902Mentioning the same constant twice in a row (which is a syntax error) no
2903longer fails an assertion under debugging builds. This was a regression
a3a9a3d2
KW
2904from v5.20.
2905L<[perl #126482]|https://rt.perl.org/Public/Bug/Display.html?id=126482>
2c8edc25
S
2906
2907=item *
2908
2909Many issues relating to C<printf "%a"> of hexadecimal floating point
2910were fixed. In addition, the "subnormals" (formerly known as "denormals")
fb5d4b1a 2911floating point numbers are now supported both with the plain IEEE 754
2c8edc25
S
2912floating point numbers (64-bit or 128-bit) and the x86 80-bit
2913"extended precision". Note that subnormal hexadecimal floating
2914point literals will give a warning about "exponent underflow".
2915[perl #128843, #128889, #128890, #128893, #128909, #128919]
2916
2917=item *
2918
d3972b39 2919A regression in v5.24 with C<tr/\N{U+...}/foo/> when the code point was between
a3a9a3d2
KW
2920128 and 255 has been fixed.
2921L<[perl #128734]|https://rt.perl.org/Public/Bug/Display.html?id=128734>.
2c8edc25
S
2922
2923=item *
2924
2c8edc25
S
2925Use of a string delimiter whose code point is above 2**31 now works
2926correctly on platforms that allow this. Previously, certain characters,
2927due to truncation, would be confused with other delimiter characters
df48f9a4 2928with special meaning (such as C<"?"> in C<m?...?>), resulting
2c8edc25
S
2929in inconsistent behaviour. Note that this is non-portable,
2930and is based on Perl's extension to UTF-8, and is probably not
a3a9a3d2
KW
2931displayable nor enterable by any editor.
2932L<[perl #128738]|https://rt.perl.org/Public/Bug/Display.html?id=128738>
2c8edc25
S
2933
2934=item *
2935
df48f9a4 2936C<@{x> followed by a newline where C<"x"> represents a control or non-ASCII
2c8edc25 2937character no longer produces a garbled syntax error message or a crash.
a3a9a3d2 2938L<[perl #128951]|https://rt.perl.org/Public/Bug/Display.html?id=128951>
2c8edc25
S
2939
2940=item *
2941
2942An assertion failure with C<%: = 0> has been fixed.
2943L<[perl #128238]|https://rt.perl.org/Public/Bug/Display.html?id=128238>
2944
2945=item *
2946
2947In Perl 5.18, the parsing of C<"$foo::$bar"> was accidentally changed, such
2948that it would be treated as C<$foo."::".$bar>. The previous behavior, which
2949was to parse it as C<$foo:: . $bar>, has been restored.
2950L<[perl #128478]|https://rt.perl.org/Public/Bug/Display.html?id=128478>
2951
2952=item *
2953
2954Since Perl 5.20, line numbers have been off by one when perl is invoked with
2955the B<-x> switch. This has been fixed.
2956L<[perl #128508]|https://rt.perl.org/Public/Bug/Display.html?id=128508>
2957
2958=item *
2959
fce64130 2960Vivifying a subroutine stub in a deleted stash (I<e.g.>, C<delete $My::{"Foo::"};
2c8edc25
S
2961\&My::Foo::foo>) no longer crashes. It had begun crashing in Perl 5.18.
2962L<[perl #128532]|https://rt.perl.org/Public/Bug/Display.html?id=128532>
2963
2964=item *
2965
2966Some obscure cases of subroutines and file handles being freed at the same time
2967could result in crashes, but have been fixed. The crash was introduced in Perl
29685.22.
2969L<[perl #128597]|https://rt.perl.org/Public/Bug/Display.html?id=128597>
2970
2971=item *
2972
2973Code that looks for a variable name associated with an uninitialized value
fb5d4b1a 2974could cause an assertion failure in cases where magic is involved, such as
2c8edc25
S
2975C<$ISA[0][0]>. This has now been fixed.
2976L<[perl #128253]|https://rt.perl.org/Public/Bug/Display.html?id=128253>
2977
2978=item *
2979
2980A crash caused by code generating the warning "Subroutine STASH::NAME
2981redefined" in cases such as C<sub P::f{} undef *P::; *P::f =sub{};> has been
2982fixed. In these cases, where the STASH is missing, the warning will now appear
2983as "Subroutine NAME redefined".
2984L<[perl #128257]|https://rt.perl.org/Public/Bug/Display.html?id=128257>
2985
2986=item *
2987
2988Fixed an assertion triggered by some code that handles deprecated behavior in
fce64130 2989formats, I<e.g.>, in cases like this:
2c8edc25
S
2990
2991 format STDOUT =
2992 @
2993 0"$x"
2994
2995L<[perl #128255]|https://rt.perl.org/Public/Bug/Display.html?id=128255>
2996
2997=item *
2998
2999A possible divide by zero in string transformation code on Windows has been
3000avoided, fixing a crash when collating an empty string.
3001L<[perl #128618]|https://rt.perl.org/Public/Bug/Display.html?id=128618>
3002
3003=item *
3004
3005Some regular expression parsing glitches could lead to assertion failures with
e6abae1c 3006regular expressions such as C</(?E<lt>=/> and C</(?E<lt>!/>. This has now been fixed.
2c8edc25
S
3007L<[perl #128170]|https://rt.perl.org/Public/Bug/Display.html?id=128170>
3008
3009=item *
3010
3011C< until ($x = 1) { ... } > and C< ... until $x = 1 > now properly
a3a9a3d2
KW
3012warn when syntax warnings are enabled.
3013L<[perl #127333]|https://rt.perl.org/Public/Bug/Display.html?id=127333>
2c8edc25
S
3014
3015=item *
3016
3017socket() now leaves the error code returned by the system in C<$!> on
a3a9a3d2
KW
3018failure.
3019L<[perl #128316]|https://rt.perl.org/Public/Bug/Display.html?id=128316>
2c8edc25
S
3020
3021=item *
3022
3023Assignment variants of any bitwise ops under the C<bitwise> feature would
a3a9a3d2
KW
3024crash if the left-hand side was an array or hash.
3025L<[perl #128204]|https://rt.perl.org/Public/Bug/Display.html?id=128204>
2c8edc25
S
3026
3027=item *
3028
3029C<require> followed by a single colon (as in C<foo() ? require : ...> is
0f032fe1 3030now parsed correctly as C<require> with implicit C<$_>, rather than
a3a9a3d2
KW
3031C<require "">.
3032L<[perl #128307]|https://rt.perl.org/Public/Bug/Display.html?id=128307>
2c8edc25
S
3033
3034=item *
3035
3036Scalar C<keys %hash> can now be assigned to consistently in all scalar
3037lvalue contexts. Previously it worked for some contexts but not others.
3038
3039=item *
3040
3041List assignment to C<vec> or C<substr> with an array or hash for its first
3042argument used to result in crashes or "Can't coerce" error messages at run
3043time, unlike scalar assignment, which would give an error at compile time.
a3a9a3d2
KW
3044List assignment now gives a compile-time error, too.
3045L<[perl #128260]|https://rt.perl.org/Public/Bug/Display.html?id=128260>
2c8edc25
S
3046
3047=item *
3048
3049Expressions containing an C<&&> or C<||> operator (or their synonyms C<and>
95b17558 3050and C<or>) were being compiled incorrectly in some cases. If the left-hand
2c8edc25
S
3051side consisted of either a negated bareword constant or a negated C<do {}>
3052block containing a constant expression, and the right-hand side consisted of
3053a negated non-foldable expression, one of the negations was effectively
95b17558
KW
3054ignored. The same was true of C<if> and C<unless> statement modifiers,
3055though with the left-hand and right-hand sides swapped. This long-standing
a3a9a3d2
KW
3056bug has now been fixed.
3057L<[perl #127952]|https://rt.perl.org/Public/Bug/Display.html?id=127952>
2c8edc25
S
3058
3059=item *
3060
3061C<reset> with an argument no longer crashes when encountering stash entries
a3a9a3d2
KW
3062other than globs.
3063L<[perl #128106]|https://rt.perl.org/Public/Bug/Display.html?id=128106>
2c8edc25
S
3064
3065=item *
3066
3067Assignment of hashes to, and deletion of, typeglobs named C<*::::::> no
a3a9a3d2
KW
3068longer causes crashes.
3069L<[perl #128086]|https://rt.perl.org/Public/Bug/Display.html?id=128086>
2c8edc25
S
3070
3071=item *
3072
a3a9a3d2
KW
3073Handle C<SvIMMORTALs> in LHS of list assign.
3074L<[perl #129991]|https://rt.perl.org/Public/Bug/Display.html?id=129991>
2c8edc25
S
3075
3076=item *
3077
a3a9a3d2
KW
3078Assertion failure with user-defined Unicode-like properties.
3079L<[perl #130010]|https://rt.perl.org/Public/Bug/Display.html?id=130010>
2c8edc25
S
3080
3081=item *
3082
3083Fix error message for unclosed C<\N{> in regcomp.
3084
3085An unclosed C<\N{> could give the wrong error message
3086C<"\N{NAME} must be resolved by the lexer">.
3087
3088=item *
3089
3090List assignment in list context where the LHS contained aggregates and
3091where there were not enough RHS elements, used to skip scalar lvalues.
3092Previously, C<(($a,$b,@c,$d) = (1))> in list context returned C<($a)>; now
95b17558
KW
3093it returns C<($a,$b,$d)>. C<(($a,$b,$c) = (1))> is unchanged: it still
3094returns C<($a,$b,$c)>. This can be seen in the following:
2c8edc25
S
3095
3096 sub inc { $_++ for @_ }
3097 inc(($a,$b,@c,$d) = (10))
3098
3099Formerly, the values of C<($a,$b,$d)> would be left as C<(11,undef,undef)>;
3100now they are C<(11,1,1)>.
3101
3102=item *
3103
f632cffa
KW
3104Code like this: C</(?{ s!!! })/> can trigger infinite recursion on the C
3105stack (not the normal perl stack) when the last successful pattern in
3106scope is itself. We avoid the segfault by simply forbidding the use of
3107the empty pattern when it would resolve to the currently executing
a3a9a3d2
KW
3108pattern.
3109L<[perl #129903]|https://rt.perl.org/Public/Bug/Display.html?id=129903>
2c8edc25
S
3110
3111=item *
3112
0c092f6b 3113Avoid reading beyond the end of the line buffer when there's a
a3a9a3d2
KW
3114short UTF-8 character at the end.
3115L<[perl #128997]|https://rt.perl.org/Public/Bug/Display.html?id=128997>
2c8edc25
S
3116
3117=item *
3118
a3a9a3d2
KW
3119Fix firstchar bitmap under utf8 with prefix optimisation.
3120L<[perl #129950]|https://rt.perl.org/Public/Bug/Display.html?id=129950>
2c8edc25
S
3121
3122=item *
3123
a3a9a3d2
KW
3124Make F<Carp/t/arg_string.t>: be liberal in C<f>/C<p> formats.
3125L<[perl #129954]|https://rt.perl.org/Public/Bug/Display.html?id=129954>
2c8edc25
S
3126
3127=item *
3128
a3a9a3d2
KW
3129Make C<do "a\0b"> fail silently instead of throwing an error.
3130L<[perl #129928]|https://rt.perl.org/Public/Bug/Display.html?id=129928>
2c8edc25
S
3131
3132=item *
3133
a3a9a3d2
KW
3134Make C<chdir> allocate the stack it needs.
3135L<[perl #129130]|https://rt.perl.org/Public/Bug/Display.html?id=129130>
2c8edc25 3136
acea3104
KW
3137=item *
3138
3139C<do> errors now refer to C<do> (not C<require>).
3140
3141=item *
3142
3143Executing C<undef $x> where C<$x> is tied or magical no longer incorrectly
3144blames the variable for an uninitialized-value warning encountered by the
3145tied/magical code.
3146
3147=item *
3148
3149Code like C<$x = $x . "a"> was incorrectly failing to yield a
3150L<use of uninitialized value|perldiag/"Use of uninitialized value%s">
3151warning when C<$x> was a lexical variable with an undefined value. That has
a3a9a3d2
KW
3152now been fixed.
3153L<[perl #127877]|https://rt.perl.org/Public/Bug/Display.html?id=127877>
acea3104
KW
3154
3155=item *
3156
3157C<undef *_; shift> or C<undef *_; pop> inside a subroutine, with no
3158argument to C<shift> or C<pop>, began crashing in Perl 5.14, but has now
3159been fixed.
3160
3161=item *
3162
3163C<< "string$scalar-E<gt>$*" >> now correctly prefers concat overloading to
3164string overloading if C<< $scalar-E<gt>$* >> returns an overloaded object,
3165bringing it into consistency with C<$$scalar>.
3166
3167=item *
3168
3169C<< /@0{0*-E<gt>@*/*0 >> and similar contortions used to crash, but no longer
a3a9a3d2
KW
3170do, but merely produce a syntax error.
3171L<[perl #128171]|https://rt.perl.org/Public/Bug/Display.html?id=128171>
acea3104
KW
3172
3173=item *
3174
3175C<do> or C<require> with a reference or typeglob which, when stringified,
3176contains a null character started crashing in Perl 5.20, but has now been
a3a9a3d2
KW
3177fixed.
3178L<[perl #128182]|https://rt.perl.org/Public/Bug/Display.html?id=128182>
acea3104
KW
3179
3180=item *
3181
3182Improve error for missing C<tie()> package/method. This brings the error messages
3183in line with the ones used for normal method calls, despite not using
3184call_method().
3185
2c8edc25
S
3186=back
3187
3188=head1 Known Problems
3189
3190=over 4
3191
3192=item *
3193
3194Some modules have been broken by the L<context stack rework|/Internal Changes>.
fb5d4b1a
KW
3195These modules were relying on non-guaranteed implementation details in
3196the perl interpreter.
2c8edc25
S
3197Their maintainers have been informed, and should contact perl5-porters for
3198advice if needed. Below is a subset of these modules:
3199
3200=over 4
3201
3202=item * L<Algorithm::Permute>
3203
3204=item * L<Coro>
3205
fb5d4b1a
KW
3206L<Coro> and Perl 5.22 were already incompatible due to a change in the perl
3207interpreter,
2c8edc25
S
3208and the reworking on the perl context stack creates a further incompatibility.
3209perl5-porters has L<discussed the issue on the mailing
3210list|http://www.nntp.perl.org/group/perl.perl5.porters/2016/05/msg236174.html>.
3211
3212=item * L<Data::Alias>
3213
3214=item * L<RPerl>
3215
3216=item * L<Scope::Upper>
3217
3218=item * L<TryCatch>
3219
3220=back
3221
3222=item *
3223
53799a91 3224The module L<lexical::underscore> no longer works on Perl 5.24, because perl
2c8edc25
S
3225no longer has a lexical C<$_>!
3226
3227=item *
3228
53799a91 3229C<mod_perl> has been patched for compatibility for v5.22 and later but no
2c8edc25
S
3230release has been made. The relevant patch (and other changes) can be found in
3231their source code repository, L<mirrored at
3232GitHub|https://github.com/apache/mod_perl/commit/82827132efd3c2e25cc413c85af61bb63375da6e>.
3233
3234=back
3235
3236=head1 Errata From Previous Releases
3237
3238=over 4
3239
3240=item *
3241
ee8180b8 3242Parsing bad POSIX charclasses no longer leaks memory.
2c8edc25
S
3243L<[perl #128313]|https://rt.perl.org/Public/Bug/Display.html?id=128313>
3244
3245=item *
3246
53799a91 3247Fixed issues with recursive regexes. The behavior was fixed in Perl 5.24.
2c8edc25
S
3248L<[perl #126182]|https://rt.perl.org/Public/Bug/Display.html?id=126182>
3249
3250=back
3251
3252=head1 Obituary
3253
3254Jon Portnoy (AVENJ), a prolific Perl author and admired Gentoo community
95b17558 3255member, has passed away on August 10, 2016. He will be remembered and
c94c0e4f 3256missed by all those who he came in contact with, and enriched with his
2c8edc25
S
3257intellect, wit, and spirit.
3258
c94c0e4f 3259It is with great sadness that we also note Kip Hampton's passing. Probably
2c8edc25
S
3260best known as the author of the Perl & XML column on XML.com, he was a
3261core contributor to AxKit, an XML server platform that became an Apache
95b17558
KW
3262Foundation project. He was a frequent speaker in the early days at
3263OSCON, and most recently at YAPC::NA in Madison. He was frequently on
2c8edc25
S
3264irc.perl.org as `ubu`, generally in the #axkit-dahut community, the
3265group responsible for YAPC::NA Asheville in 2011.
a049258c 3266
2c8edc25
S
3267Kip and his constant contributions to the community will be greatly
3268missed.
a049258c
S
3269
3270=head1 Acknowledgements
2e0dcc12 3271
0cc8c746 3272Perl 5.26.0 represents approximately 12 months of development since Perl 5.24.0
c2948ced 3273and contains approximately 370,000 lines of changes across 2,600 files from 86
0cc8c746
S
3274authors.
3275
3276Excluding auto-generated files, documentation and release tools, there were
3277approximately 230,000 lines of changes to 1,800 .pm, .t, .c and .h files.
3278
3279Perl continues to flourish into its third decade thanks to a vibrant community
95b17558 3280of users and developers. The following people are known to have contributed the
ad543fb2 3281improvements that became Perl 5.26.0:
0cc8c746
S
3282
3283Aaron Crane, Abigail, Ævar Arnfjörð Bjarmason, Alex Vandiver, Andreas
3284König, Andreas Voegele, Andrew Fresh, Andy Lester, Aristotle Pagaltzis, Chad
3285Granum, Chase Whitener, Chris 'BinGOs' Williams, Chris Lamb, Christian Hansen,
3286Christian Millour, Colin Newell, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan
c2948ced
S
3287Collins, Daniel Dragan, Dave Cross, Dave Rolsky, David Golden, David H.
3288Gutteridge, David Mitchell, Dominic Hargreaves, Doug Bell, E. Choroba, Ed Avis,
3289Father Chrysostomos, François Perrad, Hauke D, H.Merijn Brand, Hugo van der
3290Sanden, Ivan Pozdeev, James E Keenan, James Raspass, Jarkko Hietaniemi, Jerry
3291D. Hedden, Jim Cromie, J. Nick Koston, John Lightsey, Karen Etheridge, Karl
3292Williamson, Leon Timmermans, Lukas Mai, Matthew Horsfall, Maxwell Carey, Misty
3293De Meo, Neil Bowers, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Paul
3294Marquess, Peter Avalos, Petr Písař, Pino Toscano, Rafael Garcia-Suarez, Reini
3295Urban, Renee Baecker, Ricardo Signes, Richard Levitte, Rick Delaney, Salvador
3296Fandiño, Samuel Thibault, Sawyer X, Sébastien Aperghis-Tramoni, Sergey
3297Aleynikov, Shlomi Fish, Smylers, Stefan Seifert, Steffen Müller, Stevan
3298Little, Steve Hay, Steven Humphrey, Sullivan Beck, Theo Buehler, Thomas Sibley,
3299Todd Rinaldo, Tomasz Konojacki, Tony Cook, Unicode Consortium, Yaroslav Kuzmin,
3300Yves Orton, Zefram.
0cc8c746
S
3301
3302The list above is almost certainly incomplete as it is automatically generated
95b17558 3303from version control history. In particular, it does not include the names of
0cc8c746
S
3304the (very much appreciated) contributors who reported issues to the Perl bug
3305tracker.
3306
3307Many of the changes included in this version originated in the CPAN modules
95b17558 3308included in Perl's core. We're grateful to the entire CPAN community for
0cc8c746
S
3309helping Perl to flourish.
3310
3311For a more complete list of all of Perl's historical contributors, please see
3312the F<AUTHORS> file in the Perl source distribution.
f5b73711 3313
44691e6f
AB
3314=head1 Reporting Bugs
3315
2c8edc25
S
3316If you find what you think is a bug, you might check the articles recently
3317posted to the comp.lang.perl.misc newsgroup and the perl bug database at
3318L<https://rt.perl.org/> . There may also be information at
4b8803f0 3319L<http://www.perl.org/> , the Perl Home Page.
44691e6f 3320
e08634c5
SH
3321If you believe you have an unreported bug, please run the L<perlbug> program
3322included with your release. Be sure to trim your bug down to a tiny but
3323sufficient test case. Your bug report, along with the output of C<perl -V>,
7c825fca 3324will be sent off to C<perlbug@perl.org> to be analysed by the Perl porting team.
44691e6f 3325
87c118b9
DM
3326If the bug you are reporting has security implications which make it
3327inappropriate to send to a publicly archived mailing list, then see
c0ea3294
SH
3328L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
3329for details of how to report the issue.
44691e6f
AB
3330
3331=head1 SEE ALSO
3332
e08634c5
SH
3333The F<Changes> file for an explanation of how to view exhaustive details on
3334what changed.
44691e6f
AB
3335
3336The F<INSTALL> file for how to build Perl.
3337
3338The F<README> file for general stuff.
3339
3340The F<Artistic> and F<Copying> files for copyright information.
3341
3342=cut