This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Free temps on recursive scalar lvalue sub exit
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 [ this is a template for a new perldelta file. Any text flagged as
6 XXX needs to be processed before release. ]
7
8 perldelta - what is new for perl v5.15.1
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.15.1 release and
13 the 5.15.0 release.
14
15 If you are upgrading from an earlier release such as 5.14.0, first read
16 L<perl5150delta>, which describes differences between 5.14.0 and
17 5.15.0.
18
19 =head1 Notice
20
21 XXX Any important notices here
22
23 =head1 Core Enhancements
24
25 XXX New core language features go here. Summarise user-visible core language
26 enhancements. Particularly prominent performance optimisations could go
27 here, but most should go in the L</Performance Enhancements> section.
28
29 [ List each enhancement as a =head2 entry ]
30
31 =head2 C<splice()> doesn't warn when truncating
32
33 You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
34 worrying about warnings.
35
36 =head2 The C<\$> prototype accepts any scalar lvalue
37
38 The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
39 argument.  Previously they only accepted scalars beginning with C<$> and
40 hash and array elements.  This change makes them consistent with the way
41 the built-in C<read> and C<recv> functions (among others) parse their
42 arguments. This means that one can override the built-in functions with
43 custom subroutines that parse their arguments the same way.
44
45 =head2 You can now C<study> more than one string
46
47 The restriction that you can only have one C<study> active at a time has been
48 removed. You can now usefully C<study> as many strings as you want (until you
49 exhaust memory).
50
51 =head1 Security
52
53 XXX Any security-related notices go here.  In particular, any security
54 vulnerabilities closed should be noted here rather than in the
55 L</Selected Bug Fixes> section.
56
57 [ List each security issue as a =head2 entry ]
58
59 =head1 Incompatible Changes
60
61 XXX For a release on a stable branch, this section aspires to be:
62
63     There are no changes intentionally incompatible with 5.XXX.XXX
64     If any exist, they are bugs and reports are welcome.
65
66 [ List each incompatible change as a =head2 entry ]
67
68 =head1 Deprecations
69
70 XXX Any deprecated features, syntax, modules etc. should be listed here.
71 In particular, deprecated modules should be listed here even if they are
72 listed as an updated module in the L</Modules and Pragmata> section.
73
74 [ List each deprecation as a =head2 entry ]
75
76 =head1 Performance Enhancements
77
78 XXX Changes which enhance performance without changing behaviour go here. There
79 may well be none in a stable release.
80
81 [ List each enhancement as a =item entry ]
82
83 =over 4
84
85 =item *
86
87 The implementation of C<s///r> makes one less copy of the scalar's value.
88
89 =item *
90
91 If a studied scalar is C<split> with a regex, the engine will now take
92 advantage of the C<study> data.
93
94 =item *
95
96 C<study> now uses considerably less memory for shorter strings. Strings shorter
97 than 65535 characters use roughly half the memory than previously, strings
98 shorter than 255 characters use roughly one quarter of the memory.
99
100 =item *
101
102 Recursive calls to lvalue subroutines in lvalue scalar context use less
103 memory.
104
105 =back
106
107 =head1 Modules and Pragmata
108
109 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
110 go here.  If Module::CoreList is updated, generate an initial draft of the
111 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
112 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
113 below.  A paragraph summary for important changes should then be added by hand.
114 In an ideal world, dual-life modules would have a F<Changes> file that could be
115 cribbed.
116
117 [ Within each section, list entries as a =item entry ]
118
119 =head2 New Modules and Pragmata
120
121 =over 4
122
123 =item *
124
125 XXX
126
127 =back
128
129 =head2 Updated Modules and Pragmata
130
131 =over 4
132
133 =item *
134
135 L<CGI> has been upgraded from version 3.54 to version 3.55
136
137 [THINGS THAT MAY BREAK YOUR CODE]
138
139 C<url()> was fixed to return C<PATH_INFO> when it is explicitly requested
140 with either the path=>1 or path_info=>1 flag.
141
142 If your code is running under mod_rewrite (or compatible) and you are calling C<self_url()> or
143 you are calling C<url()> and passing path_info=>1, These methods will actually be
144 returning C<PATH_INFO> now, as you have explicitly requested, or has C<self_url()>
145 has requested on your behalf.
146
147 The C<PATH_INFO> has been omitted in such URLs since the issue was introduced
148 in the 3.12 release in December, 2005.
149
150 This bug is so old your application may have come to depend on it or
151 workaround it. Check for application before upgrading to this release.
152
153 Examples of affected method calls:
154
155   $q->url(-absolute => 1, -query => 1, -path_info => 1 )
156   $q->url(-path=>1)
157   $q->url(-full=>1,-path=>1)
158   $q->url(-rewrite=>1,-path=>1)
159   $q->self_url();
160
161 =item *
162
163 L<Compress::Raw::Bzip2> has been upgraded from version 2.035 to version 2.037
164
165 =item *
166
167 L<Compress::Raw::Zlib> has been upgraded from version 2.035 to version 2.037
168
169 Added offset parameter to CRC32
170
171 =item *
172
173 L<Compress::Zlib> has been upgraded from version 2.035 to version 2.037
174
175 IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14).
176 There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed
177 Stored context now. And fixed a Zip64 issue in
178 IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
179
180 =item *
181
182 L<CPANPLUS> has been upgraded from version 0.9105 to version 0.9106
183
184 =item *
185
186 L<ExtUtils::MakeMaker> has been upgraded from version 6.57_05 to version 6.58
187
188 =item *
189
190 L<IPC::Cmd> has been upgraded from version 0.70 to version 0.72
191
192 Capturing of command output (both C<STDOUT> and C<STDERR>) is now supported
193 using L<IPC::Open3> on MSWin32 without requiring L<IPC::Run>.
194
195 =item *
196
197 L<Locale::Codes> has been upgraded from version 3.16 to version 3.17
198
199 Added Language Extension codes (langext) and Language Variation codes
200 (langvar) as defined in the IANA language registry.
201
202 Added language codes from ISO 639-5
203
204 Added language/script codes from the IANA language subtag
205 registry
206
207 Fixed an uninitialized value warning.  RT 67438
208
209 Fixed the return value for the all_XXX_codes and all_XXX_names functions.  RT 69100
210
211 Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to
212 allow for cleaner future additions.  The original four modules (Locale::Language,
213 Locale::Currency, Locale::Country, Locale::Script) will continue to work, but
214 all new sets of codes will be added in the Locale::Codes namespace.
215
216 =item *
217
218 L<attributes> has been upgraded from version 0.14 to 0.15, as part of the
219 lvalue attribute warnings fix.  See L</Selected Bug Fixes>, below.
220
221 =item *
222
223 L<Math::BigInt::FastCalc> has been upgraded from version 0.28 to version 0.29.
224
225 The XS code is now compiled with C<PERL_NO_GET_CONTEXT>, which will aid
226 performance under ithreads.
227
228 =item *
229
230 L<Unicode::Collate> has been upgraded from version 0.76 to version 0.77
231
232 Applied [perl #93470] silencing compiler warnings with -Wwrite-strings
233
234 =item *
235
236 L<Win32API::File> has been upgraded from version 0.1101 to version 0.1200
237
238 Added SetStdHandle and GetStdHandle functions
239
240 =item *
241
242 L<threads> has been upgraded from version 1.83 to 1.84
243
244 An unused variable was removed from the XS code.
245
246 =back
247
248 =head2 Removed Modules and Pragmata
249
250 =over 4
251
252 =item *
253
254 Perl 4-era .pl libraries
255
256 Perl used to bundle a handful of library files that predate Perl 5. Most of
257 these files, which have been deprecated since version 5.14.0, have now been
258 removed. If your code still relies on these libraries, you can install them
259 again from C<Perl4::CoreLibs> on CPAN.
260
261 =back
262
263 =head1 Documentation
264
265 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
266 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
267
268 =head2 New Documentation
269
270 XXX Changes which create B<new> files in F<pod/> go here.
271
272 =head3 L<XXX>
273
274 XXX Description of the purpose of the new file here
275
276 =head2 Changes to Existing Documentation
277
278 XXX Changes which significantly change existing files in F<pod/> go here.
279 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
280 section.
281
282 =head3 L<XXX>
283
284 =over 4
285
286 =item *
287
288 XXX Description of the change here
289
290 =back
291
292 =head1 Diagnostics
293
294 The following additions or changes have been made to diagnostic output,
295 including warnings and fatal error messages.  For the complete list of
296 diagnostic messages, see L<perldiag>.
297
298 XXX New or changed warnings emitted by the core's C<C> code go here. Also
299 include any changes in L<perldiag> that reconcile it to the C<C> code.
300
301 [ Within each section, list entries as a =item entry that links to perldiag,
302   e.g.
303
304   =item *
305
306   L<Invalid version object|perldiag/"Invalid version object">
307 ]
308
309 =head2 New Diagnostics
310
311 XXX Newly added diagnostic messages go here
312
313 =head3 New Errors
314
315 =over 4
316
317 =item *
318
319 XXX L<message|perldiag/"message">
320
321 =back
322
323 =head3 New Warnings
324
325 =over 4
326
327 =item *
328
329 XXX L<message|perldiag/"message">
330
331 =back
332
333 =head2 Changes to Existing Diagnostics
334
335 XXX Changes (i.e. rewording) of diagnostic messages go here
336
337 =over 4
338
339 =item *
340
341 XXX Describe change here
342
343 =back
344
345 =head1 Utility Changes
346
347 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
348 here. Most of these are built within the directories F<utils> and F<x2p>.
349
350 [ List utility changes as a =head3 entry for each utility and =item
351 entries for each change
352 Use L<XXX> with program names to get proper documentation linking. ]
353
354 =head3 L<XXX>
355
356 =over 4
357
358 =item *
359
360 XXX
361
362 =back
363
364 =head1 Configuration and Compilation
365
366 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
367 go here.  Any other changes to the Perl build process should be listed here.
368 However, any platform-specific changes should be listed in the
369 L</Platform Support> section, instead.
370
371 [ List changes as a =item entry ].
372
373 =over 4
374
375 =item *
376
377 XXX
378
379 =back
380
381 =head1 Testing
382
383 XXX Any significant changes to the testing of a freshly built perl should be
384 listed here.  Changes which create B<new> files in F<t/> go here as do any
385 large changes to the testing harness (e.g. when parallel testing was added).
386 Changes to existing files in F<t/> aren't worth summarising, although the bugs
387 that they represent may be covered elsewhere.
388
389 [ List each test improvement as a =item entry ]
390
391 =over 4
392
393 =item *
394
395 XXX
396
397 =back
398
399 =head1 Platform Support
400
401 XXX Any changes to platform support should be listed in the sections below.
402
403 [ Within the sections, list each platform as a =item entry with specific
404 changes as paragraphs below it. ]
405
406 =head2 New Platforms
407
408 XXX List any platforms that this version of perl compiles on, that previous
409 versions did not. These will either be enabled by new files in the F<hints/>
410 directories, or new subdirectories and F<README> files at the top level of the
411 source tree.
412
413 =over 4
414
415 =item XXX-some-platform
416
417 XXX
418
419 =back
420
421 =head2 Discontinued Platforms
422
423 XXX List any platforms that this version of perl no longer compiles on.
424
425 =over 4
426
427 =item XXX-some-platform
428
429 XXX
430
431 =back
432
433 =head2 Platform-Specific Notes
434
435 XXX List any changes for specific platforms. This could include configuration
436 and compilation changes or changes in portability/compatibility.  However,
437 changes within modules for platforms should generally be listed in the
438 L</Modules and Pragmata> section.
439
440 =over 4
441
442 =item XXX-some-platform
443
444 XXX
445
446 =back
447
448 =head1 Internal Changes
449
450 XXX Changes which affect the interface available to C<XS> code go here.
451 Other significant internal changes for future core maintainers should
452 be noted as well.
453
454 [ List each change as a =item entry ]
455
456 =over 4
457
458 =item *
459
460 XXX
461
462 =back
463
464 =head1 Selected Bug Fixes
465
466 XXX Important bug fixes in the core language are summarised here.
467 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
468 L</Modules and Pragmata>.
469
470 [ List each fix as a =item entry ]
471
472 =over 4
473
474 =item *
475
476 Applying the :lvalue attribute to subroutine that is already defined does
477 not work properly, as the attribute changes the way the sub is compiled.
478 Hence, Perl 5.12 began warning when an attempt is made to apply the
479 attribute to an already defined sub.  In such cases, the attribute is
480 discarded.
481
482 But the change in 5.12 missed the case where custom attributes are also
483 present: that case still silently and ineffectively applied the attribute.
484 That omission has now been corrected.  C<sub foo :lvalue :Whatever> (when
485 C<foo> is already defined) now warns about the :lvalue attribute, and does
486 not apply it.
487
488 L<attributes.pm|attributes> has likewise been updated to warn and not apply
489 the attribute.
490
491 =item *
492
493 =for comment
494 Not necessary for perl5160delta
495
496 The remaining discrepancies between explicit and implicit return from
497 lvalue subroutines have been resolved.  They mainly involved which error
498 message to display when a read-only value is returned in lvalue context.
499 Also, returning a PADTMP (the result of most built-ins, like C<index>) in
500 lvalue context is now forbidden for explicit return, as it always has been
501 for implicit return.  This is not a regression from 5.14, as all the cases
502 in which it could happen where previously syntax errors.
503
504 =item *
505
506 =for comment
507 Not necessary for perl5160delta
508
509 Explicitly returning a tied C<my> variable from an lvalue subroutine in
510 list lvalue context used to clear the variable before the assignment could
511 happen.  This is something that was missed when explicit return was made to
512 work in 5.15.0.
513
514 =item *
515
516 =for comment
517 Not necessary for perl5160delta
518
519 A minor memory leak, introduced in 5.15.0, has been fixed.  It would occur
520 when a hash is freed that has had its current iterator deleted
521 [perl #93454].
522
523 =item *
524
525 The C<prototype> function now returns a prototype (the empty string) for
526 the C<__FILE__>, C<__LINE__> and C<__PACKAGE__> directives, instead of
527 dying, as they are indistinguishable syntactically from nullary functions
528 like C<time>.
529
530 =back
531
532 =head1 Known Problems
533
534 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
535 tests that had to be C<TODO>ed for the release would be noted here, unless
536 they were specific to a particular platform (see below).
537
538 This is a list of some significant unfixed bugs, which are regressions
539 from either 5.XXX.XXX or 5.XXX.XXX.
540
541 [ List each fix as a =item entry ]
542
543 =over 4
544
545 =item *
546
547 XXX
548
549 =back
550
551 =head1 Obituary
552
553 XXX If any significant core contributor has died, we've added a short obituary
554 here.
555
556 =head1 Acknowledgements
557
558 XXX The list of people to thank goes here.
559
560 =head1 Reporting Bugs
561
562 If you find what you think is a bug, you might check the articles
563 recently posted to the comp.lang.perl.misc newsgroup and the perl
564 bug database at http://rt.perl.org/perlbug/ .  There may also be
565 information at http://www.perl.org/ , the Perl Home Page.
566
567 If you believe you have an unreported bug, please run the L<perlbug>
568 program included with your release.  Be sure to trim your bug down
569 to a tiny but sufficient test case.  Your bug report, along with the
570 output of C<perl -V>, will be sent off to perlbug@perl.org to be
571 analysed by the Perl porting team.
572
573 If the bug you are reporting has security implications, which make it
574 inappropriate to send to a publicly archived mailing list, then please send
575 it to perl5-security-report@perl.org. This points to a closed subscription
576 unarchived mailing list, which includes
577 all the core committers, who will be able
578 to help assess the impact of issues, figure out a resolution, and help
579 co-ordinate the release of patches to mitigate or fix the problem across all
580 platforms on which Perl is supported. Please only use this address for
581 security issues in the Perl core, not for modules independently
582 distributed on CPAN.
583
584 =head1 SEE ALSO
585
586 The F<Changes> file for an explanation of how to view exhaustive details
587 on what changed.
588
589 The F<INSTALL> file for how to build Perl.
590
591 The F<README> file for general stuff.
592
593 The F<Artistic> and F<Copying> files for copyright information.
594
595 =cut