This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make stacked -l work
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
d2006265 3=for comment
d6cf2367
FC
4This has been completed up to 84c2f6fdcb.
5
d2006265 6
44691e6f
AB
7=head1 NAME
8
63ac71b9
RS
9[ this is a template for a new perldelta file. Any text flagged as
10XXX needs to be processed before release. ]
11
f25d4e05 12perldelta - what is new for perl v5.15.3
760696b8 13
5438d4b8 14=head1 DESCRIPTION
5cd408a2 15
f25d4e05
RS
16This document describes differences between the 5.15.2 release and
17the 5.15.3 release.
5cd408a2 18
f25d4e05
RS
19If you are upgrading from an earlier release such as 5.15.1, first read
20L<perl5152delta>, which describes differences between 5.15.1 and
215.15.2.
062678b2 22
63ac71b9 23=head1 Notice
4185c919 24
63ac71b9 25XXX Any important notices here
0afed34d 26
63ac71b9 27=head1 Core Enhancements
0afed34d 28
63ac71b9
RS
29XXX New core language features go here. Summarise user-visible core language
30enhancements. Particularly prominent performance optimisations could go
31here, but most should go in the L</Performance Enhancements> section.
0afed34d 32
63ac71b9 33[ List each enhancement as a =head2 entry ]
0afed34d 34
d2006265
FC
35=head2 More CORE subs are callable through references
36
c148612c 37Perl 5.15.2 introduced subroutines in the CORE namespace. Most of them
d2006265
FC
38could only be called as barewords; i.e., they could be aliased at compile
39time and then inlined under new names.
40
2702a50a
FC
41Almost all of these functions can now be called through references and via
42C<&foo()> syntax, bypassing the prototype. See L<CORE> for a list of the
43exceptions.
d2006265 44
d6cf2367
FC
45=head2 New debugger commands
46
47The debugger now has C<disable> and C<enable> commands for disabling
48existing breakpoints and reënabling them. See L<perldebug>.
49
63ac71b9 50=head1 Security
0afed34d 51
63ac71b9
RS
52XXX Any security-related notices go here. In particular, any security
53vulnerabilities closed should be noted here rather than in the
54L</Selected Bug Fixes> section.
135c0b08 55
63ac71b9 56[ List each security issue as a =head2 entry ]
135c0b08 57
46661105
CB
58=head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
59
60Calling C<File::Glob::bsd_glob> with the unsupported flag GLOB_ALTDIRFUNC would
61cause an access violation / segfault. A Perl program that accepts a flags value from
62an external source could expose itself to denial of service or arbitrary code
63execution attacks. There are no known exploits in the wild. The problem has been
64corrected by explicitly disabling all unsupported flags and setting unused function
65pointers to null. Bug reported by Clément Lecigne.
66
5438d4b8 67=head1 Incompatible Changes
7818c927 68
e1dccc0d
Z
69=head2 $[ has been removed
70
71The array/string index offsetting mechanism, controlled by the C<$[> magic
72variable, has been removed. C<$[> now always reads as zero. Writing a
73zero to it is still permitted, but writing a non-zero value causes an
74exception. Those hopelessly addicted to FORTRAN-style 1-based indexing
75may wish to use the module L<Array::Base>, which provides an independent
76implementation of the index offsetting concept, or L<Classic::Perl>,
77which allows L<Array::Base> to be controlled through assignment to C<$[>.
78
5d1892be 79=head2 User-defined case changing operations.
7b2b001e 80
5d1892be
KW
81This feature was deprecated in Perl 5.14, and has now been removed.
82The CPAN module L<Unicode::Casing> provides better functionality without
83the drawbacks that this feature had, as are detailed in the 5.14
84documentation:
85L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
bdb9ba77 86
7ec04da5
SM
87=head2 XSUBs are now 'static'
88
89XSUB C functions are now 'static', that is, they are not visible from
404452ea
SM
90outside the compilation unit. Users can use the new C<XS_EXTERNAL(name)>
91and C<XS_INTERNAL(name)> macros to pick the desired linking behaviour.
92The ordinary C<XS(name)> declaration for XSUBs will continue to declare
93non-'static' XSUBs for compatibility, but the XS compiler,
94C<ExtUtils::ParseXS> (C<xsubpp>) will emit 'static' XSUBs by default.
95C<ExtUtils::ParseXS>'s behaviour can be reconfigured from XS using the
7ec04da5
SM
96C<EXPORT_XSUB_SYMBOLS> keyword, see L<perlxs> for details.
97
d6cf2367
FC
98=head2 Borland compiler
99
100All support for the Borland compiler has been dropped. The code had not
101worked for a long time anyway.
102
5d4ff231
FC
103=head2 Weakening read-only references
104
105Weakening read-only references is no longer permitted. It should never
106hove worked anyway, and in some cases could result in crashes.
107
63ac71b9 108=head1 Deprecations
760696b8 109
63ac71b9
RS
110XXX Any deprecated features, syntax, modules etc. should be listed here.
111In particular, deprecated modules should be listed here even if they are
112listed as an updated module in the L</Modules and Pragmata> section.
760696b8 113
63ac71b9 114[ List each deprecation as a =head2 entry ]
760696b8 115
63ac71b9 116=head1 Performance Enhancements
115ff745 117
63ac71b9
RS
118XXX Changes which enhance performance without changing behaviour go here. There
119may well be none in a stable release.
115ff745 120
63ac71b9 121[ List each enhancement as a =item entry ]
115ff745 122
63ac71b9 123=over 4
4ea805df
CBW
124
125=item *
126
63ac71b9 127XXX
1ba7a2fb 128
63ac71b9 129=back
730e5b5b 130
63ac71b9 131=head1 Modules and Pragmata
730e5b5b 132
63ac71b9
RS
133XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
134go here. If Module::CoreList is updated, generate an initial draft of the
135following sections using F<Porting/corelist-perldelta.pl>, which prints stub
136entries to STDOUT. Results can be pasted in place of the '=head2' entries
137below. A paragraph summary for important changes should then be added by hand.
138In an ideal world, dual-life modules would have a F<Changes> file that could be
139cribbed.
730e5b5b 140
63ac71b9 141[ Within each section, list entries as a =item entry ]
730e5b5b 142
63ac71b9 143=head2 New Modules and Pragmata
a30cae0b 144
63ac71b9 145=over 4
a30cae0b
CBW
146
147=item *
148
63ac71b9 149XXX
bbc28bfc 150
63ac71b9 151=back
bbc28bfc 152
63ac71b9 153=head2 Updated Modules and Pragmata
e46d9735 154
63ac71b9 155=over 4
e46d9735
CBW
156
157=item *
158
5f8b5b70
NC
159L<AnyDBM_File> has been upgraded from version 1.00 to version 1.01.
160
161This is only a minor documentation update.
162
163=item *
164
43c6b706 165L<Archive::Extract> has been upgraded from version 0.52 to version 0.56.
4afdee4c
CBW
166
167Resolved an issue where C<unzip> executable was present in C<PATH> on MSWin32
57126352 168
d93f0209
FC
169=item *
170
93e94d8a
CBW
171L<Archive::Tar> has been upgraded from version 1.76 to version 1.78.
172
173=item *
174
13975bd1
CBW
175L<CPAN::Meta> has been upgraded from version 2.112150 to version 2.112580.
176
177=item *
178
53b10071
CBW
179L<CPAN::Meta::YAML> has been upgraded from version 0.003 to version 0.004.
180
181=item *
182
891b5d1e 183L<CPANPLUS> has been upgraded from version 0.9109 to version 0.9111.
755f12e5
NC
184
185=item *
186
50b3d220
CBW
187L<CPANPLUS::Dist::Build> has been upgraded from version 0.56 to version 0.58.
188
189=item *
190
49ef49fe
CBW
191L<Devel::PPPort> has been upgraded from version 3.19 to version 3.20.
192
193=item *
194
43c6b706 195L<diagnostics> has been upgraded from version 1.24 to version 1.25.
d2006265
FC
196
197It now strips out C<SZ<><...>> formatting codes before displaying
198descriptions [perl #94488].
199
200=item *
201
4bbdbd51
NC
202L<Data::Dumper> has been upgraded from version 2.133 to version 2.134.
203
204The XS code for sorting hash keys has been simplified slightly.
205
206=item *
207
f87cd9fa
CBW
208L<Exporter> has been upgraded from version 5.64_03 to version 5.65.
209
210=item *
211
404452ea 212L<ExtUtils::ParseXS> has been upgraded from version 3.03_01 to version 3.04_04.
98e61122
NC
213
214The handling of C<dVAR> in the generated XS code has been simplified.
215
404452ea
SM
216The previously broken "INCLUDE: ... |" functionality has been repaired
217(CPAN RT #70213).
218
219A compatibility-workaround for modules that cannot
220live with the new XSUB staticness (see I<XSUBs are now static> above)
221has been implemented with the C<PERL_EUPXS_ALWAYS_EXPORT> and
222C<PERL_EUPXS_NEVER_EXPORT> preprocessor defines.
223
224The compiler warnings when -except option is used with F<xsubpp>
225have been fixed.
226
227The XSUB.h changes to make C<XS(name)> use C<XS_INTERNAL(name)>
228by default (which were in the 5.15.2 dev release of perl)
229have been reverted since too many CPAN modules expect to
230be able to refer to XSUBs declared with C<XS(name)>.
231Instead, C<ExtUtils::ParseXS> will define a copy of the
232C<XS_INTERNAL>/C<XS_EXTERNAL> macros as necessary going back to
233perl 5.10.0. By default, ExtUtils::ParseXS will use
234C<XS_INTERNAL(name)> instead of C<XS(name)>.
235
236Fixed regression for input-typemap override in XS argument
237list (CPAN RT #70448).
238
239C<ExtUtils::Typemaps> now properly strips trailing semicolons
240from inputmaps. These could previously trigger warnings (errors
241in strict C89 compilers) due to additional semicolons being
242interpreted as empty statements.
243
244Now detects and throws a warning if there is a C<CODE> section using
245C<RETVAL>, but no C<OUTPUT> section (CPAN RT #69536).
246
98e61122
NC
247=item *
248
43c6b706
CBW
249L<Locale::Codes> has been upgraded from version 3.17 to version 3.18.
250
251The CIA world added non-standard values, so this is no longer used as a source
252of data.
253
254=item *
255
46661105
CB
256L<File::Glob> has been upgraded from version 1.12 to version 1.13.
257
d6cf2367
FC
258On Windows, tilde (~) expansion now checks the C<USERPROFILE> environment
259variable, after checking C<HOME>.
260
261See also L</Security>.
46661105
CB
262
263=item *
264
0b2be169
FC
265L<Filter::Simple> has been upgrade from version 0.87 to 0.88.
266
267It is now better at detecting the end of a pod section. It always checks
268for =cut, instead of checking for =end (if the pod begins with =begin) or
269the end of the paragraph (if the pod begins with =for) [perl #92436].
270
828d6195
FC
271It is also better at detecting variables. A method call on a variable is
272no longer considered part of the variable name, so strings passed to a
273method are now hidden from filters that do not want to deal with strings
274[perl #92436].
275
0b2be169
FC
276=item *
277
986a805c
FC
278L<IO> has been upgraded from version 1.25_05 to 1.25_06, and L<IO::Handle>
279from version 1.32 to 1.33.
280
281Together, these upgrades fix a problem with IO::Handle's C<getline> and
282C<getlines> methods. When these methods are called on the special ARGV
283handle, the next file is automatically opened, as happens with the built-in
284C<< <> >> and C<readline> functions. But, unlike the built-ins, these
285methods were not respecting the caller's use of the L<open> pragma and
286applying the approprate I/O layers to the newly-opened file
287[rt.cpan.org #66474].
288
289=item *
290
43c6b706 291L<Math::BigRat> has been upgraded from version 0.2602 to version 0.2603.
d93f0209
FC
292
293C<int()> on a Math::BigRat object containing -1/2 now creates a
294Math::BigInt containing 0, rather than -0. L<Math::BigInt> does not even
295support negative zero, so the resulting object was actually malformed
296[perl #95530].
297
60527824
FR
298=item *
299
d6cf2367
FC
300L<Module::CoreList> has been upgraded from version 2.55 to 2.56.
301
302It was missing a few entries: L<DB_File> in 5.8.2, L<Errno> in 5.6.0 and
3035.6.1, and L<VMS::Filespec> in 5.12.3.
304
305=item *
306
d6ee8587 307L<Module::Metadata> has been upgraded from version 1.000005_01 to version 1.000007.
d39de893
CBW
308
309=item *
310
39afdc5a
CBW
311L<Module::Load::Conditional> has been upgraded from version 0.44 to version 0.46.
312
313=item *
314
666c7ca6
NC
315L<ODBM_File> has been upgraded from version 1.11 to version 1.12.
316
317This is only a minor refactoring of the XS code to bring it closer to the
318other C<?DBM_File> modules.
319
320=item *
321
d6cf2367
FC
322L<open> has been upgraded from version 1.08 to 1.09.
323
324It no longer turns of layers on standard handles when invoked without the
325":std" directive. Similarly, when invoked I<with> the ":std" directive, it
326now clears layers on STDERR before applying the new ones, and not just on
327STDIN and STDOUT [perl #92728].
328
329=item *
330
c56bc1f6 331L<perlfaq> has been upgraded from version 5.01500302 to version 5.0150034.
a9feb6cb
CBW
332
333=item *
334
43c6b706 335L<Pod::Simple> has been upgraded from version 3.18 to version 3.19.
60527824 336
7ac26854
NC
337=item *
338
339L<POSIX> has been upgraded from version 1.24 to version 1.25.
340
341L<POSIX> no longer uses L<AutoLoader>. Any code which was relying on this
342implementation detail was buggy, and may fail as a result of this change.
343The module's Perl code has been considerably simplified, roughly halving
29d1ad9e
NC
344the number of lines, with no change in functionality. The XS code has
345been refactored to reduce the size of the shared object by about 12%,
346with no change in functionality. More POSIX functions now have tests.
7ac26854 347
518487b2
NC
348C<POSIX::Termios::setattr> now defaults the third argument to C<TCSANOW>,
349instead of 0. On most platforms C<TCSANOW> is defined as 0, but on some
3500 is not a valid parameter, which caused a call with defaults to fail.
351
daef35db
NC
352=item *
353
b420b12a
NC
354L<Storable> has been upgraded from version 2.31 to version 2.32.
355
356XS code which duplicates functionality of F<ppport.h> has been removed.
357Tests should now pass on older versions of L<Test::More>. Storable now
358builds and passes tests back to perl 5.004.
359
360=item *
361
d6cf2367
FC
362L<threads::shared> has been upgraded from version 1.38 to 1.40.
363
364Destructors on shared objects used to be ignored sometimes if the objects
365were referenced only by shared data structures. This has been mostly
366fixed, but destructors may still be ignored if the objects still exist at
367global destruction time [perl #98204].
368
369=item *
370
daef35db
NC
371L<XSLoader> has been upgraded from version 0.15 to version 0.16.
372
63ac71b9 373=back
259925f6 374
63ac71b9 375=head2 Removed Modules and Pragmata
6252d2e2 376
63ac71b9 377=over 4
9840cdee
CBW
378
379=item *
380
63ac71b9 381XXX
54e02335 382
63ac71b9 383=back
310913d4 384
63ac71b9 385=head1 Documentation
310913d4 386
63ac71b9
RS
387XXX Changes to files in F<pod/> go here. Consider grouping entries by
388file and be sure to link to the appropriate page, e.g. L<perlfunc>.
7b2b001e 389
63ac71b9 390=head2 New Documentation
7b2b001e 391
b89e9b0d 392=head3 L<perlootut>
7b2b001e 393
b89e9b0d
DR
394This a new OO tutorial. It focuses on basic OO concepts, and then recommends
395that readers choose an OO framework from CPAN.
2df9265e 396
63ac71b9 397=head2 Changes to Existing Documentation
2df9265e 398
b89e9b0d 399=head3 L<perlobj>
dc80b0c6 400
63ac71b9 401=over 4
83b32788
CBW
402
403=item *
404
b89e9b0d
DR
405This document has been rewritten from scratch, and its coverage of various OO
406concepts has been expanded.
4eb81ef2 407
63ac71b9 408=back
4eb81ef2 409
d6cf2367
FC
410=head3 L<perlpragma>
411
412=over 4
413
414=item *
415
416There is now a standard convention for naming keys in the C<%^H>,
417documented under L<Key naming|perlpragma/Key naming>.
418
419=back
420
b89e9b0d
DR
421=head2 Removed Documentation
422
423=head3 Old OO Documentation
424
425All the old OO tutorials, perltoot, perltooc, and perlboot, have been
d6cf2367
FC
426removed. The perlbot (bag of object tricks) document has been removed as well.
427
428=head3 Development Deltas
429
430The old perldelta files for development cycles prior to 5.15 have been
431removed.
b89e9b0d 432
63ac71b9 433=head1 Diagnostics
4eb81ef2 434
63ac71b9
RS
435The following additions or changes have been made to diagnostic output,
436including warnings and fatal error messages. For the complete list of
437diagnostic messages, see L<perldiag>.
82eefd8a 438
63ac71b9
RS
439XXX New or changed warnings emitted by the core's C<C> code go here. Also
440include any changes in L<perldiag> that reconcile it to the C<C> code.
82eefd8a 441
63ac71b9
RS
442[ Within each section, list entries as a =item entry that links to perldiag,
443 e.g.
6252d2e2 444
63ac71b9 445 =item *
6252d2e2 446
63ac71b9
RS
447 L<Invalid version object|perldiag/"Invalid version object">
448]
5213914c 449
63ac71b9 450=head2 New Diagnostics
5213914c 451
63ac71b9 452XXX Newly added diagnostic messages go here
5213914c 453
63ac71b9 454=head3 New Errors
17609435 455
63ac71b9 456=over 4
17609435 457
69f26f52
CBW
458=item *
459
63ac71b9 460XXX L<message|perldiag/"message">
69f26f52 461
5438d4b8 462=back
77ccfaeb 463
63ac71b9 464=head3 New Warnings
c69a30ec 465
63ac71b9
RS
466=over 4
467
468=item *
7c420290 469
63ac71b9 470XXX L<message|perldiag/"message">
7818c927 471
63ac71b9 472=back
7818c927 473
63ac71b9 474=head2 Changes to Existing Diagnostics
dd413713 475
63ac71b9 476XXX Changes (i.e. rewording) of diagnostic messages go here
7818c927 477
5438d4b8 478=over 4
7818c927
FC
479
480=item *
481
63ac71b9 482XXX Describe change here
5aeca1f7 483
5438d4b8 484=back
5aeca1f7 485
63ac71b9 486=head1 Utility Changes
0cb4637e 487
63ac71b9
RS
488XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
489here. Most of these are built within the directories F<utils> and F<x2p>.
0cb4637e 490
63ac71b9
RS
491[ List utility changes as a =head3 entry for each utility and =item
492entries for each change
493Use L<XXX> with program names to get proper documentation linking. ]
4abaf918 494
7d167fe7 495=head3 L<h2ph>
4abaf918 496
5438d4b8 497=over 4
4abaf918
Z
498
499=item *
500
7d167fe7
FC
501L<h2ph> used to generate code of the form
502
503 unless(defined(&FOO)) {
504 sub FOO () {42;}
505 }
506
507But the subroutine is a compile-time declaration, and is hence unaffected
508by the condition. It has now been corrected to emit a string C<eval>
509around the subroutine [perl #99368].
8b00e523 510
e8e35311
FC
511=back
512
63ac71b9 513=head1 Configuration and Compilation
b908e258 514
63ac71b9
RS
515XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
516go here. Any other changes to the Perl build process should be listed here.
517However, any platform-specific changes should be listed in the
518L</Platform Support> section, instead.
b908e258 519
63ac71b9 520[ List changes as a =item entry ].
b908e258 521
63ac71b9 522=over 4
71449ad0
DG
523
524=item *
525
5ecd28b8
NC
526The file F<global.sym> is no longer needed, and has been removed. It
527contained a list of all exported functions, one of the files generated by
528F<regen/embed.pl> from data in F<embed.fnc> and F<regen/opcodes>. The code
529has been refactored so that the only user of F<global.sym>, F<makedef.pl>,
530now reads F<embed.fnc> and F<regen/opcodes> directly, removing the need to
531store the list of exported functions in an intermediate file.
532
533As F<global.sym> was never installed, this change will not be visible
534outside the build process.
b908e258 535
6693394d
FC
536=back
537
63ac71b9 538=head1 Testing
bbc28bfc 539
63ac71b9
RS
540XXX Any significant changes to the testing of a freshly built perl should be
541listed here. Changes which create B<new> files in F<t/> go here as do any
542large changes to the testing harness (e.g. when parallel testing was added).
543Changes to existing files in F<t/> aren't worth summarising, although the bugs
544that they represent may be covered elsewhere.
bbc28bfc 545
63ac71b9 546[ List each test improvement as a =item entry ]
b7188eb5 547
34dc2ec0 548=over 4
42a91c97 549
6693394d 550=item *
42a91c97 551
c752c500
FC
552F<t/porting/globvar.t> has been added, to run a sanity check on F<globar.sym>.
553F<globar.sym> is not needed on most *nix platforms, but is for Win32, hence
554previously was it was possible to inadvertently commit changes that worked
555perfectly locally, but broke the build on Win32.
310913d4 556
d2006265
FC
557=item *
558
559F<t/op/unlink.t> has been added to test the C<unlink> function.
560
34dc2ec0 561=back
42a91c97 562
0890f1a5 563=head1 Platform Support
975dff8c 564
63ac71b9 565XXX Any changes to platform support should be listed in the sections below.
9cfd094e 566
63ac71b9
RS
567[ Within the sections, list each platform as a =item entry with specific
568changes as paragraphs below it. ]
9cfd094e 569
63ac71b9 570=head2 New Platforms
9cfd094e 571
63ac71b9
RS
572XXX List any platforms that this version of perl compiles on, that previous
573versions did not. These will either be enabled by new files in the F<hints/>
574directories, or new subdirectories and F<README> files at the top level of the
575source tree.
7c4c6e7c 576
5438d4b8 577=over 4
95f7e41f 578
63ac71b9 579=item XXX-some-platform
95f7e41f 580
63ac71b9 581XXX
df5b44bd 582
63ac71b9 583=back
310913d4 584
63ac71b9 585=head2 Discontinued Platforms
310913d4 586
63ac71b9 587XXX List any platforms that this version of perl no longer compiles on.
310913d4 588
63ac71b9
RS
589=over 4
590
591=item XXX-some-platform
592
593XXX
310913d4 594
5438d4b8 595=back
df5b44bd 596
63ac71b9
RS
597=head2 Platform-Specific Notes
598
599XXX List any changes for specific platforms. This could include configuration
600and compilation changes or changes in portability/compatibility. However,
601changes within modules for platforms should generally be listed in the
602L</Modules and Pragmata> section.
e22e289d 603
5438d4b8 604=over 4
7818c927 605
63ac71b9 606=item XXX-some-platform
7818c927 607
63ac71b9 608XXX
f79aa60b 609
63ac71b9 610=back
7818c927 611
63ac71b9 612=head1 Internal Changes
3fdd840f 613
63ac71b9
RS
614XXX Changes which affect the interface available to C<XS> code go here.
615Other significant internal changes for future core maintainers should
616be noted as well.
3fdd840f 617
63ac71b9 618[ List each change as a =item entry ]
7ffa7e75 619
63ac71b9 620=over 4
7ffa7e75 621
862b2c43
FC
622=item *
623
c39e29ea
FC
624The C<is_gv_magical_sv> function has been eliminated and merged with
625C<gv_fetchpvn_flags>. It used to be called to determine whether a GV
626should be autovivified in rvalue context. Now it has been replaced with a
627new C<GV_ADDMG> flag (not part of the API).
628
629=item *
630
631Padlists are now marked C<AvREAL>; i.e., reference-counted. They have
632always been reference-counted, but were not marked real, because F<pad.c>
633did its own clean-up, instead of using the usual clean-up code in F<sv.c>.
634That caused problems in thread cloning, so now the C<AvREAL> flag is on,
635but is turned off in F<pad.c> right before the padlist is freed (after
636F<pad.c> has done its custom freeing of the pads).
862b2c43 637
d6cf2367
FC
638=item *
639
640All the C files that make up the Perl core have been converted to UTF-8.
641
63ac71b9 642=back
c973bd4f 643
63ac71b9 644=head1 Selected Bug Fixes
a6cefd81 645
63ac71b9
RS
646XXX Important bug fixes in the core language are summarised here.
647Bug fixes in files in F<ext/> and F<lib/> are best summarised in
648L</Modules and Pragmata>.
a6cefd81 649
63ac71b9 650[ List each fix as a =item entry ]
c4499eff 651
63ac71b9 652=over 4
c4499eff 653
bbc28bfc
FC
654=item *
655
d2006265
FC
656In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
657variable had not been used yet. This has been fixed.
658
659=item *
660
b4155db2
FC
661C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
662return true for most, but not all built-in variables, if
663they had not been used yet. Many times that new built-in
664variables were added in past versions, this construct was
23496c6e 665not taken into account, so this affected C<${^GLOBAL_PHASE}> and
b4155db2
FC
666C<${^UTF8CACHE}>, among others. It also used to return false if the
667package name was given as well (C<${"::!"}>) and for subroutines in the
668CORE package [perl #97978] [perl #97492] [perl #97484].
23496c6e
FC
669
670=item *
671
d2006265
FC
672Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
673represents the name of a built-in global variable used to return false if
674the variable had never been used before, but only on the I<first> call.
675This, too, has been fixed.
676
677=item *
678
679Various functions that take a filehandle argument in rvalue context
680(C<close>, C<readline>, etc.) used to call C<FETCH> multiple times, if it
681was a tied variable, and warn twice, if it was C<undef> [perl #97482].
682
683=item *
684
685C<close> and similar filehandle functions, when called on built-in global
686variables (like C<$+>), used to die if the variable happened to hold the
687undefined value, instead of producing the usual "Use of uninitialized
688value" warning.
689
690=item *
691
692When autovivified file handles were introduced in Perl 5.6.0, C<readline>
693was inadvertently made to autovivify when called as C<readline($foo)> (but
694not as C<< <$foo> >>). It has now been fixed never to autovivify.
695
696=item *
697
698C<defined ${ $tied_variable }> used to call C<FETCH> multiple times, but
699now calls it just once.
700
701=item *
702
703Some cases of dereferencing a complex expression, such as
704C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
705it once.
706
707=item *
708
709For a tied variable returning a package name, C<< $tied->method >> used to
710call C<FETCH> multiple times (even up to six!), and sometimes would
711fail to call the method, due to memory corruption.
712
713=item *
714
715Calling an undefined anonymous subroutine (e.g., what $x holds after
716C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
717has been corrected to "Undefined subroutine called" [perl #71154].
bbc28bfc 718
e1a80902
FC
719=item *
720
721Causing C<@DB::args> to be freed between uses of C<caller> no longer
722results in a crash [perl #93320].
723
fdd313f4
FC
724=item *
725
726Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
727values. It would die in strict mode or lvalue context for most undefined
728values, but would be treated as the empty string (with a warning) for the
729specific scalar return by C<undef()> (C<&PL_sv_undef> internally). This
730has been corrected. C<undef()> is now treated like other undefined
731scalars, as in Perl 5.005.
732
01433346
FC
733=item *
734
735It used to be possible to free the typeglob of a localised array or hash
736(e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
737
88d69532
FC
738=item *
739
740C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
741C<setpgrp> was ignoring its argument if there was just one. Now it is
742equivalent to C<setpgrp($foo,0)>.
743
33d4ef81
FC
744=item *
745
8d4393cf
FC
746Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied> now call FETCH
747only once.
33d4ef81 748
93564729
FC
749=item *
750
d6cf2367
FC
751C<chdir>, C<chmod>, C<chown>, C<utime>, C<truncate>, C<stat>, C<lstat> and the filetest ops (C<-r>, C<-x>, etc.)
752now always call FETCH if passed a tied
93564729
FC
753variable as the last argument. They used to ignore tiedness if the last
754thing return from or assigned to the variable was a typeglob or reference
755to a typeglob.
756
c39e29ea
FC
757=item *
758
759Perl 5.15.1 inadvertently stopped C<*foo =~ s/\*//r> from working, as it
760would try to force the *foo glob into a string. This has been fixed
761[perl #97954].
762
763=item *
764
765If things were arranged in memory the right way, it was possible for
766thread joining to emit "Attempt to free unreferenced scalar" warnings if
767C<caller> had been used from the C<DB> package prior to thread creation,
768due to the way pads were reference-counted and cloned [perl #98092].
769
770=item *
771
772CORE:: subs were introduced in the previous development release, but
773C<defined &{"CORE::..."}> did not return true. That has been rectified
774[perl #97484].
775
776=item *
777
778Lvalue subroutines were made to autovivify in 5.15.0, but it did not work
779in some cases involving an intervening list operator between the
780dereference operator and the subroutine call (C<${(), lvsub()}>)
781[perl #98184].
782
d6cf2367
FC
783=item *
784
785A bug has been fixed that occurs when a tied variable is used as a
786subroutine reference: if the last thing assigned to or returned from the
787variable was a reference or typeglob, the C<\&$tied> could either crash or
788return the wrong subroutine. The reference case is a regression introduced
789in Perl 5.10.0. For typeglobs, it has probably never worked till now.
790
791=item *
792
793C<given> was not scoping its implicit $_ properly, resulting in memory
794leaks or "Variable is not available" warnings [perl #94682].
795
796=item *
797
798C<-l> followed by a bareword no longer "eats" the previous argument to
799the list operator in whose argument list it resides. In less convoluted
800English: C<print "bar", -l foo> now actually prints "bar", because C<-l>
801on longer eats it.
802
803=item *
804
805In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a
806tied argument belonging to the previous argument to a list operator, if
807called with a bareword argument or no argument at all. This has been
808fixed, so C<push @foo, $tied, -r> no longer calls FETCH on C<$tied>.
809
810=item *
811
812C<shmread> was not setting the scalar flags correctly when reading from
813shared memory, causing the existing cached numeric representation in the
814scalar to persist [perl #98480].
815
5d4ff231
FC
816=item *
817
818Weakening the first argument to an automatically-invoked C<DESTROY> method
819could result in erroneous "DESTROY created new reference" errors or
820crashes. Now it is an error to weaken a read-only reference.
821
a3342be3
FC
822=item *
823
824Under miniperl (used to configure modules when perl itself is built),
825C<glob> now clears %ENV before calling csh, since the latter croaks on some
826systems if it does not like the contents of the LS_COLORS enviroment
827variable [perl #98662].
828
60092ce4
FC
829=item *
830
831C<++> and C<--> now work on copies of globs, instead of dying.
832
309aab3a
FC
833=item *
834
835The subroutines in the CORE:: namespace that were introduced in the
836previous development release run with the lexical hints (strict, warnings)
837of the caller, just as though the built-in function had been called. But
838this was not the case for C<goto &CORE::sub>. The CORE sub would end up
839running with the lexical hints of the subroutine it replaced, instead of
840that subroutine's caller. This has been fixed.
841
1f26655e
FC
842=item *
843
844Stacked C<-l> (followed immediately by other filetest operators) did not
845work previously; now it does. It is only permitted when the rightmost
846filetest op has the special "_" handle for its argument and the most
847recent C<stat>/C<lstat> call was an C<lstat>.
848
63ac71b9 849=back
bbc28bfc 850
63ac71b9 851=head1 Known Problems
bbc28bfc 852
63ac71b9
RS
853XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
854tests that had to be C<TODO>ed for the release would be noted here, unless
855they were specific to a particular platform (see below).
bbc28bfc 856
63ac71b9
RS
857This is a list of some significant unfixed bugs, which are regressions
858from either 5.XXX.XXX or 5.XXX.XXX.
bbc28bfc 859
63ac71b9 860[ List each fix as a =item entry ]
bbc28bfc 861
63ac71b9 862=over 4
bbc28bfc 863
bad4ae38
FC
864=item *
865
63ac71b9 866XXX
bad4ae38 867
63ac71b9 868=back
ab6ce8ea 869
63ac71b9 870=head1 Obituary
ab6ce8ea 871
63ac71b9
RS
872XXX If any significant core contributor has died, we've added a short obituary
873here.
c62f68e3 874
44691e6f
AB
875=head1 Acknowledgements
876
63ac71b9
RS
877XXX Generate this with:
878
879 perl Porting/acknowledgements.pl v5.15.2..HEAD
29cf780c 880
44691e6f
AB
881=head1 Reporting Bugs
882
883If you find what you think is a bug, you might check the articles
34dc2ec0 884recently posted to the comp.lang.perl.misc newsgroup and the perl
44691e6f
AB
885bug database at http://rt.perl.org/perlbug/ . There may also be
886information at http://www.perl.org/ , the Perl Home Page.
887
888If you believe you have an unreported bug, please run the L<perlbug>
889program included with your release. Be sure to trim your bug down
890to a tiny but sufficient test case. Your bug report, along with the
891output of C<perl -V>, will be sent off to perlbug@perl.org to be
892analysed by the Perl porting team.
893
894If the bug you are reporting has security implications, which make it
895inappropriate to send to a publicly archived mailing list, then please send
34dc2ec0 896it to perl5-security-report@perl.org. This points to a closed subscription
b4707b2a
FC
897unarchived mailing list, which includes
898all the core committers, who will be able
44691e6f
AB
899to help assess the impact of issues, figure out a resolution, and help
900co-ordinate the release of patches to mitigate or fix the problem across all
34dc2ec0
DM
901platforms on which Perl is supported. Please only use this address for
902security issues in the Perl core, not for modules independently
44691e6f
AB
903distributed on CPAN.
904
905=head1 SEE ALSO
906
907The F<Changes> file for an explanation of how to view exhaustive details
908on what changed.
909
910The F<INSTALL> file for how to build Perl.
911
912The F<README> file for general stuff.
913
914The F<Artistic> and F<Copying> files for copyright information.
915
916=cut