This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123367] Test my sub defined in BEGIN{eval}
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perldelta - what is new for perl v5.25.1
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.25.0 release and the 5.25.1
10 release.
11
12 If you are upgrading from an earlier release such as 5.24.0, first read
13 L<perl5250delta>, which describes differences between 5.24.0 and 5.25.0.
14
15 =head1 Notice
16
17 XXX Any important notices here
18
19 =head1 Core Enhancements
20
21 XXX New core language features go here.  Summarize user-visible core language
22 enhancements.  Particularly prominent performance optimisations could go
23 here, but most should go in the L</Performance Enhancements> section.
24
25 [ List each enhancement as a =head2 entry ]
26
27 =head1 Security
28
29 XXX Any security-related notices go here.  In particular, any security
30 vulnerabilities closed should be noted here rather than in the
31 L</Selected Bug Fixes> section.
32
33 [ List each security issue as a =head2 entry ]
34
35 =head2 POSIX::tmpnam() has been removed
36
37 The fundamentally unsafe C<tmpnam()> interface was deprecated in
38 Perl 5.22.0 and has now been removed.  In its place you can use
39 for example the L<File::Temp> interfaces.
40
41 =head2 require ::Foo::Bar is now illegal.
42
43 Formerly, C<require ::Foo::Bar> would try to read F</Foo/Bar.pm>. Now any
44 bareword require which starts with a double colon dies instead.
45
46 =head2 Unescaped literal C<"{"> characters in regular expression
47 patterns are no longer permissible
48
49 You have to now say something like C<"\{"> or C<"[{]"> to specify to
50 match a LEFT CURLY BRACKET.  This will allow future extensions to the
51 language.  This restriction is not enforced, nor are there current plans
52 to enforce it, if the C<"{"> is the first character in the pattern.
53
54 These have been deprecated since v5.16, with a deprecation message
55 displayed starting in v5.22.
56
57 =head2 Literal control character variable names are no longer permissible
58
59 A variable name may no longer contain a literal control character under
60 any circumstances.  These previously were allowed in single-character
61 names on ASCII platforms, but have been deprecated there since Perl
62 v5.20.  This affects things like C<$I<\cT>>, where I<\cT> is a literal
63 control (such as a C<NAK> or C<NEGATIVE ACKNOWLEDGE> character) in the
64 source code.
65
66 =head2 C<qr//xx> is no longer permissible
67
68 Using more than one C</x> regular expression pattern modifier on a
69 single pattern is now forbidden.  This is to allow a future enhancement
70 to the language.  This usage has been deprecated since v5.22.
71
72 =head2 C<NBSP> is no longer permissible in C<\N{...}>
73
74 The name of a character may no longer contain non-breaking spaces.  It
75 has been deprecated to do so since Perl v5.22.
76
77 =head1 Deprecations
78
79 XXX Any deprecated features, syntax, modules etc. should be listed here.
80
81 =head2 Module removals
82
83 XXX Remove this section if inapplicable.
84
85 The following modules will be removed from the core distribution in a
86 future release, and will at that time need to be installed from CPAN.
87 Distributions on CPAN which require these modules will need to list them as
88 prerequisites.
89
90 The core versions of these modules will now issue C<"deprecated">-category
91 warnings to alert you to this fact.  To silence these deprecation warnings,
92 install the modules in question from CPAN.
93
94 Note that these are (with rare exceptions) fine modules that you are encouraged
95 to continue to use.  Their disinclusion from core primarily hinges on their
96 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
97 not usually on concerns over their design.
98
99 =over
100
101 =item XXX
102
103 XXX Note that deprecated modules should be listed here even if they are listed
104 as an updated module in the L</Modules and Pragmata> section.
105
106 =back
107
108 [ List each other deprecation as a =head2 entry ]
109
110 =head1 Performance Enhancements
111
112 XXX Changes which enhance performance without changing behaviour go here.
113 There may well be none in a stable release.
114
115 [ List each enhancement as a =item entry ]
116
117 =over 4
118
119 =item *
120
121 Bareword constant strings are now permitted to take part in constant
122 folding. They were originally exempted from constant folding in August 1999,
123 during the development of Perl 5.6, to ensure that C<use strict "subs">
124 would still apply to bareword constants. That has now been accomplished a
125 different way, so barewords, like other constants, now gain the performance
126 benefits of constant folding.
127
128 This also means that void-context warnings on constant expressions of
129 barewords now report the folded constant operand, rather than the operation;
130 this matches the behaviour for non-bareword constants.
131
132 =back
133
134 =head1 Modules and Pragmata
135
136 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
137 go here.  If Module::CoreList is updated, generate an initial draft of the
138 following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
139 for important changes should then be added by hand.  In an ideal world,
140 dual-life modules would have a F<Changes> file that could be cribbed.
141
142 [ Within each section, list entries as a =item entry ]
143
144 =head2 New Modules and Pragmata
145
146 =over 4
147
148 =item *
149
150 XXX
151
152 =back
153
154 =head2 Updated Modules and Pragmata
155
156 =over 4
157
158 =item *
159
160 L<POSIX> has been upgraded from version 1.66 to 1.69. This remedies several
161 defects in making its symbols exportable. [perl #127821]  Furthermore,
162 the C<POSIX::tmpnam()> interface has been removed,
163 see L</"POSIX::tmpnam() has been removed">.
164
165 =back
166
167 =head2 Removed Modules and Pragmata
168
169 =over 4
170
171 =item *
172
173 XXX
174
175 =back
176
177 =head1 Documentation
178
179 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
180 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
181
182 =head2 New Documentation
183
184 XXX Changes which create B<new> files in F<pod/> go here.
185
186 =head3 L<XXX>
187
188 XXX Description of the purpose of the new file here
189
190 =head2 Changes to Existing Documentation
191
192 XXX Changes which significantly change existing files in F<pod/> go here.
193 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
194 section.
195
196 =head3 L<XXX>
197
198 =over 4
199
200 =item *
201
202 XXX Description of the change here
203
204 =back
205
206 =head1 Diagnostics
207
208 The following additions or changes have been made to diagnostic output,
209 including warnings and fatal error messages.  For the complete list of
210 diagnostic messages, see L<perldiag>.
211
212 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
213 include any changes in L<perldiag> that reconcile it to the C<C> code.
214
215 =head2 New Diagnostics
216
217 XXX Newly added diagnostic messages go under here, separated into New Errors
218 and New Warnings
219
220 =head3 New Errors
221
222 =over 4
223
224 =item *
225
226 L<Bareword in require contains "%s"|perldiag/"Bareword in require contains "%s"">
227
228 =item *
229
230 L<Bareword in require maps to empty filename|perldiag/"Bareword in require maps to empty filename">
231
232 =item *
233
234 L<Bareword in require maps to disallowed filename "%s"|perldiag/"Bareword in require maps to disallowed filename "%s"">
235
236 =item *
237
238 L<Bareword in require must not start with a double-colon: "%s"|perldiag/"Bareword in require must not start with a double-colon: "%s"">
239
240 =back
241
242 =head3 New Warnings
243
244 =over 4
245
246 =item *
247
248 XXX L<message|perldiag/"message">
249
250 =back
251
252 =head2 Changes to Existing Diagnostics
253
254 XXX Changes (i.e. rewording) of diagnostic messages go here
255
256 =over 4
257
258 =item *
259
260 Code like C<$x = $x . "a"> was incorrectly failing to yield a
261 L<use of uninitialized value|perldiag/"Use of uninitialized value%s">
262 warning when C<$x> was a lexical variable with an undefined value. That has
263 now been fixed. [perl #127877]
264
265 =item *
266
267 When the error "Experimental push on scalar is now forbidden" is raised for
268 the hash functions C<keys>, C<each>, and C<values>, it is now followed by
269 the more helpful message, "Type of arg 1 to whatever must be hash or
270 array". [perl #127976]
271
272 =item *
273
274 C<undef *_; shift> or C<undef *_; pop> inside a subroutine, with no
275 argument to C<shift> or C<pop>, began crashing in Perl 5.14.0, but has now
276 been fixed.
277
278 =item *
279
280 C<< "string$scalar->$*" >> now correctly prefers concat overloading to
281 string overlading if C<< $scalar->$* >> returns an overloaded object,
282 bringing it into consistency with C<$$scalar>.
283
284 =item *
285
286 C<< /@0{0*->@*/*0 >> and similar contortions used to crash, but no longer
287 do, but merely produce a syntax error. [perl #128171]
288
289 =item *
290
291 C<do> or C<require> with a reference or typeglob which, when stringified,
292 contains a null character started crashing in Perl 5.20.0, but has now been
293 fixed. [perl #128182]
294
295 =back
296
297 =head1 Utility Changes
298
299 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
300 Most of these are built within the directory F<utils>.
301
302 [ List utility changes as a =head2 entry for each utility and =item
303 entries for each change
304 Use L<XXX> with program names to get proper documentation linking. ]
305
306 =head2 L<perlbug>
307
308 =over 4
309
310 =item *
311
312 Long lines in the message body are now wrapped at 900 characters, to stay
313 well within the 1000-character limit imposed by SMTP mail transfer agents.
314 This is particularly likely to be important for the list of arguments to
315 C<Configure>, which can readily exceed the limit if, for example, it names
316 several non-default installation paths. This change also adds the first unit
317 tests for perlbug. [perl #128020]
318
319 =back
320
321 =head1 Configuration and Compilation
322
323 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
324 go here.  Any other changes to the Perl build process should be listed here.
325 However, any platform-specific changes should be listed in the
326 L</Platform Support> section, instead.
327
328 [ List changes as a =item entry ].
329
330 =over 4
331
332 =item *
333
334 C<Configure> now builds C<miniperl> and C<generate_uudmap> if you
335 invoke it with C<-Dusecrosscompiler> but not C<-Dtargethost=somehost>.
336 This means you can supply your target platform C<config.sh>, generate
337 the headers and proceed to build your cross-target perl.  [perl #127234]
338
339 =item *
340
341 Builds with C<-Accflags=-DPERL_TRACE_OPS> now only dump the operator
342 counts when the environment variable C<PERL_TRACE_OPS> to be set to a
343 non-zero integer.  This allows C<make test> to pass on such a build.
344
345 =item *
346
347 When building with GCC 6 and link-time optimization (the C<-flto> option to
348 C<gcc>), C<Configure> was treating all probed symbols as present on the
349 system, regardless of whether they actually exist. This has been fixed.
350 [perl #128131]
351
352 =item *
353
354 The F<t/test.pl> library is used for internal testing of Perl itself, and
355 also copied by several CPAN modules. Some of those modules must work on
356 older versions of Perl, so F<t/test.pl> must in turn avoid newer Perl
357 features. Compatibility with Perl 5.8 was inadvertently removed some time
358 ago; it has now been restored. [perl #128052]
359
360 =item *
361
362 The build process no longer emits an extra blank line before building each
363 "simple" extension (those with only F<*.pm> and F<*.pod> files).
364
365 =back
366
367 =head1 Testing
368
369 XXX Any significant changes to the testing of a freshly built perl should be
370 listed here.  Changes which create B<new> files in F<t/> go here as do any
371 large changes to the testing harness (e.g. when parallel testing was added).
372 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
373 that they represent may be covered elsewhere.
374
375 [ List each test improvement as a =item entry ]
376
377 =over 4
378
379 =item *
380
381 XXX
382
383 =back
384
385 =head1 Platform Support
386
387 XXX Any changes to platform support should be listed in the sections below.
388
389 [ Within the sections, list each platform as a =item entry with specific
390 changes as paragraphs below it. ]
391
392 =head2 New Platforms
393
394 XXX List any platforms that this version of perl compiles on, that previous
395 versions did not.  These will either be enabled by new files in the F<hints/>
396 directories, or new subdirectories and F<README> files at the top level of the
397 source tree.
398
399 =over 4
400
401 =item XXX-some-platform
402
403 XXX
404
405 =back
406
407 =head2 Discontinued Platforms
408
409 XXX List any platforms that this version of perl no longer compiles on.
410
411 =over 4
412
413 =item XXX-some-platform
414
415 XXX
416
417 =back
418
419 =head2 Platform-Specific Notes
420
421 XXX List any changes for specific platforms.  This could include configuration
422 and compilation changes or changes in portability/compatibility.  However,
423 changes within modules for platforms should generally be listed in the
424 L</Modules and Pragmata> section.
425
426 =over 4
427
428 =item XXX-some-platform
429
430 XXX
431
432 =back
433
434 =head1 Internal Changes
435
436 XXX Changes which affect the interface available to C<XS> code go here.  Other
437 significant internal changes for future core maintainers should be noted as
438 well.
439
440 [ List each change as a =item entry ]
441
442 =over 4
443
444 =item *
445
446 Perl is now built with the C<PERL_OP_PARENT> compiler define enabled by
447 default. To disable it, use the C<PERL_NO_OP_PARENT> compiler define.
448 This flag alters how the C<op_sibling> field is used in C<OP> structures,
449 and has been available optionally since perl 5.22.0.
450
451 See L<perl5220delta/"Internal Changes"> for more details of what this
452 build option does.
453
454 =back
455
456 =head1 Selected Bug Fixes
457
458 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
459 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
460
461 [ List each fix as a =item entry ]
462
463 =over 4
464
465 =item *
466
467 Expressions containing an C<&&> or C<||> operator (or their synonyms C<and>
468 and C<or>) were being compiled incorrectly in some cases. If the left-hand
469 side consisted of either a negated bareword constant or a negated C<do {}>
470 block containing a constant expression, and the right-hand side consisted of
471 a negated non-foldable expression, one of the negations was effectively
472 ignored. The same was true of C<if> and C<unless> statement modifiers,
473 though with the left-hand and right-hand sides swapped. This long-standing
474 bug has now been fixed. [perl #127952]
475
476 =item *
477
478 C<reset> with an argument no longer crashes when encountering stash entries
479 other than globs. [perl #128106]
480
481 =item *
482
483 Assignment of hashes to, and deletion of, typeglobs named C<*::::::> no
484 longer causes crashes. [perl #128086]
485
486 =back
487
488 =head1 Known Problems
489
490 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
491 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
492 platform specific bugs also go here.
493
494 [ List each fix as a =item entry ]
495
496 =over 4
497
498 =item *
499
500 XXX
501
502 =back
503
504 =head1 Errata From Previous Releases
505
506 =over 4
507
508 =item *
509
510 XXX Add anything here that we forgot to add, or were mistaken about, in
511 the perldelta of a previous release.
512
513 =back
514
515 =head1 Obituary
516
517 XXX If any significant core contributor has died, we've added a short obituary
518 here.
519
520 =head1 Acknowledgements
521
522 Generate this with:
523
524   perl Porting/acknowledgements.pl v5.25.1..HEAD
525
526 =head1 Reporting Bugs
527
528 If you find what you think is a bug, you might check the articles recently
529 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
530 L<https://rt.perl.org/> .  There may also be information at
531 L<http://www.perl.org/> , the Perl Home Page.
532
533 If you believe you have an unreported bug, please run the L<perlbug> program
534 included with your release.  Be sure to trim your bug down to a tiny but
535 sufficient test case.  Your bug report, along with the output of C<perl -V>,
536 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
537
538 If the bug you are reporting has security implications which make it
539 inappropriate to send to a publicly archived mailing list, then see
540 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
541 for details of how to report the issue.
542
543 =head1 SEE ALSO
544
545 The F<Changes> file for an explanation of how to view exhaustive details on
546 what changed.
547
548 The F<INSTALL> file for how to build Perl.
549
550 The F<README> file for general stuff.
551
552 The F<Artistic> and F<Copying> files for copyright information.
553
554 =cut