This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update ExtUtils-CBuilder to CPAN version 0.2800
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for comment
4 This has been completed up to 7c7df81, except for:
5 d9a4b459f94297889956ac3adc42707365f274c2
6
7 =head1 NAME
8
9 [ this is a template for a new perldelta file. Any text flagged as
10 XXX needs to be processed before release. ]
11
12 perldelta - what is new for perl v5.13.8
13
14 =head1 DESCRIPTION
15
16 This document describes differences between the 5.13.8 release and
17 the 5.13.7 release.
18
19 If you are upgrading from an earlier release such as 5.13.6, first read
20 L<perl5137delta>, which describes differences between 5.13.6 and
21 5.13.7.
22
23 =head1 Notice
24
25 XXX Any important notices here
26
27 =head1 Core Enhancements
28
29 XXX New core language features go here. Summarise user-visible core language
30 enhancements. Particularly prominent performance optimisations could go
31 here, but most should go in the L</Performance Enhancements> section.
32
33 [ List each enhancement as a =head2 entry ]
34
35 =head2 C<-d:-foo> calls C<Devel::foo::unimport>
36
37 The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
38 equivalent to C<-MDevel::foo=bar>, which expands
39 internally to C<use Devel::foo 'bar';>.
40 F<perl> now allows prefixing the module name with C<->, with the same
41 semantics as C<-M>, I<i.e.>
42
43 =over 4
44
45 =item C<-d:-foo>
46
47 Equivalent to C<-M-Devel::foo>, expands to
48 C<no Devel::foo;>, calls C<< Devel::foo->unimport() >>
49 if the method exists.
50
51 =item C<-d:-foo=bar>
52
53 Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>,
54 calls C<< Devel::foo->unimport('bar') >> if the method exists.
55
56 =back
57
58 This is particularly useful to suppresses the default actions of a
59 C<Devel::*> module's C<import> method whilst still loading it for debugging.
60
61 =head2 Filehandle method calls load IO::File on demand
62
63 When a method call on a filehandle would die because the method can not
64 be resolved and L<IO::File> has not been loaded, Perl now loads IO::File
65 via C<require> and attempts method resolution again:
66
67   open my $fh, ">", $file;
68   $fh->binmode(":raw");     # loads IO::File and succeeds
69
70 This also works for globs like STDOUT, STDERR and STDIN:
71
72   STDOUT->autoflush(1);
73
74 Because this on-demand load only happens if method resolution fails, the
75 legacy approach of manually loading an IO::File parent class for partial
76 method support still works as expected:
77
78   use IO::Handle;
79   open my $fh, ">", $file;
80   $fh->autoflush(1);        # IO::File not loaded
81
82 =head2 Full functionality for C<use feature 'unicode_strings'>
83
84 This release provides full functionality for C<use feature
85 'unicode_strings'>.  Under its scope, all string operations executed and
86 regular expressions compiled (even if executed outside its scope) have
87 Unicode semantics.   See L<feature>.
88
89 This feature avoids the "Unicode Bug" (See
90 L<perlunicode/The "Unicode Bug"> for details.)  If their is a
91 possibility that your code will process Unicode strings, you are
92 B<strongly> encouraged to use this subpragma to avoid nasty surprises.
93
94 =head2 Exception Handling Backcompat Hack
95
96 When an exception is thrown in an C<eval BLOCK>, C<$@> is now set before
97 unwinding, as well as being set after unwinding as the eval block exits.  This
98 early setting supports code that has historically treated C<$@> during unwinding
99 as an indicator of whether the unwinding was due to an exception.  These modules
100 had been broken by 5.13.1's change from setting C<$@> early to setting it late.
101 This double setting arrangement is a stopgap until the reason for unwinding can
102 be made properly introspectable.  C<$@> has never been a reliable indicator of
103 this.
104
105 =head1 Security
106
107 XXX Any security-related notices go here.  In particular, any security
108 vulnerabilities closed should be noted here rather than in the
109 L</Selected Bug Fixes> section.
110
111 [ List each security issue as a =head2 entry ]
112
113 =head1 Incompatible Changes
114
115 =head2 Attempting to use C<:=> as an empty attribute list is now a syntax error
116
117 Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>,
118 with the C<:> being treated as the start of an attribute list, ending before
119 the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now
120 a syntax error. This will allow the future use of C<:=> as a new token.
121
122 We find no Perl 5 code on CPAN using this construction, outside the core's
123 tests for it, so we believe that this change will have very little impact on
124 real-world codebases.
125
126 If it is absolutely necessary to have empty attribute lists (for example,
127 because of a code generator) then avoid the error by adding a space before
128 the C<=>.
129
130 =head1 Deprecations
131
132 XXX Any deprecated features, syntax, modules etc. should be listed here.
133 In particular, deprecated modules should be listed here even if they are
134 listed as an updated module in the L</Modules and Pragmata> section.
135
136 [ List each deprecation as a =head2 entry ]
137
138 =head2 C<?PATTERN?> is deprecated
139
140 C<?PATTERN?> (without the initial m) has been deprecated and now produces
141 a warning.
142
143 =head2 C<sv_compile_2op> is now deprecated
144
145 The C<sv_compile_2op> is now deprecated, and will be removed. Searches suggest
146 that nothing on CPAN is using it, so this should have zero impact.
147
148 It attempted to provide an API to compile code down to an optree, but failed
149 to bind correctly to lexicals in the enclosing scope. It's not possible to
150 fix this problem within the constraints of its parameters and return value.
151
152 =head2 Tie functions on scalars holding typeglobs
153
154 Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
155 acts on a file handle if the scalar happens to hold a typeglob.
156
157 This is a long-standing bug that will be removed in Perl 5.16, as
158 there is currently no way to tie the scalar itself when it holds
159 a typeglob, and no way to untie a scalar that has had a typeglob
160 assigned to it.
161
162 This bug was fixed in 5.13.7 but, because of the breakage it caused, the
163 fix has been reverted. Now there is a deprecation warning whenever a tie
164 function is used on a handle without an explicit C<*>.
165
166 =head1 Performance Enhancements
167
168 XXX Changes which enhance performance without changing behaviour go here. There
169 may well be none in a stable release.
170
171 [ List each enhancement as a =item entry ]
172
173 =over 4
174
175 =item *
176
177 XXX
178
179 =back
180
181 =head1 Modules and Pragmata
182
183 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
184 go here.  If Module::CoreList is updated, generate an initial draft of the
185 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
186 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
187 below.  A paragraph summary for important changes should then be added by hand.
188 In an ideal world, dual-life modules would have a F<Changes> file that could be
189 cribbed.
190
191 [ Within each section, list entries as a =item entry ]
192
193 =head2 New Modules and Pragmata
194
195 =over 4
196
197 =item *
198
199 XXX
200
201 =back
202
203 =head2 Updated Modules and Pragmata
204
205 =over 4
206
207 =item *
208
209 C<ExtUtils::CBuilder> has been upgraded from 0.2703 to 0.2800
210
211 =item *
212
213 C<if> has been upgraded from 0.06 to 0.0601.
214
215 =item *
216
217 C<IPC::Cmd> has been upgraded from 0.64 to 0.66
218
219 Resolves an issue with splitting Win32 command lines
220 and documentation enhancements.
221
222 =item *
223
224 C<Locale::Codes> has been upgraded from version 3.14 to 3.15
225
226 =item *
227
228 C<Memoize> has been upgraded from version 1.01_03 to 1.02.
229
230 =item *
231
232 C<MIME::Base64> has been upgraded from 3.10 to 3.13
233
234 Now provides encode_base64url and decode_base64url functions to process
235 the base64 scheme for "URL applications".
236
237 =item *
238
239 C<mro> has been upgraded from version 1.05 to 1.06.
240
241 C<next::method> I<et al.> now take into account that every class inherits
242 from UNIVERSAL
243 L<[perl #68654]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68654>.
244
245 =item *
246
247 C<overload> has been upgraded from 1.11 to 1.12.
248
249 =item *
250
251 C<PerlIO::scalar> has been upgraded from 0.10 to 0.11.
252
253 A C<read> after a C<seek> beyond the end of the string no longer thinks it
254 has data to read
255 L<[perl #78716]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78716>.
256
257 =item *
258
259 C<re> has been upgraded from 0.14 to 0.15.
260
261 =item *
262
263 C<Socket> has been upgraded from 1.91 to 1.92.
264
265 It has several new functions for handling IPv6 addresses.
266
267 =item *
268
269 C<Storable> has been upgraded from 2.24 to 2.25.
270
271 This adds support for serialising code references that contain UTF-8 strings
272 correctly. The Storable minor version number changed as a result -- this means
273 Storable users that set C<$Storable::accept_future_minor> to a C<FALSE> value
274 will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details).
275
276 =item *
277
278 C<Time::HiRes> has been upgraded from 1.9721 to 1.9721_01.
279
280 =item *
281
282 C<Unicode::Collate> has been upgraded from 0.67 to 0.68
283
284 =item *
285
286 C<Unicode::UCD> has been upgraded from 0.29 to 0.30.
287
288 =item *
289
290 C<version> has been upgraded from 0.82 to 0.86.
291
292 =back
293
294 =head2 Removed Modules and Pragmata
295
296 =over 4
297
298 =item *
299
300 XXX
301
302 =back
303
304 =head1 Documentation
305
306 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
307 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
308
309 =head2 New Documentation
310
311 XXX Changes which create B<new> files in F<pod/> go here.
312
313 =head3 L<XXX>
314
315 XXX Description of the purpose of the new file here
316
317 =head2 Changes to Existing Documentation
318
319 XXX Changes which significantly change existing files in F<pod/> go here.
320 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
321 section.
322
323 =head3 L<XXX>
324
325 =over 4
326
327 =item *
328
329 XXX Description of the change here
330
331 =back
332
333 =head1 Diagnostics
334
335 The following additions or changes have been made to diagnostic output,
336 including warnings and fatal error messages.  For the complete list of
337 diagnostic messages, see L<perldiag>.
338
339 XXX New or changed warnings emitted by the core's C<C> code go here. Also
340 include any changes in L<perldiag> that reconcile it to the C<C> code.
341
342 [ Within each section, list entries as a =item entry ]
343
344 =head2 New Diagnostics
345
346 XXX Newly added diagnostic messages go here
347
348 =over 4
349
350 =item *
351
352 There is a new "Closure prototype called" error.
353
354 =back
355
356 =head2 Changes to Existing Diagnostics
357
358 XXX Changes (i.e. rewording) of diagnostic messages go here
359
360 =over 4
361
362 =item *
363
364 The "Found = in conditional" warning that is emitted when a constant is
365 assigned to a variable in a condition is now withheld if the constant is
366 actually a subroutine or one generated by C<use constant>, since the value
367 of the constant may not be known at the time the program is written
368 L<[perl #77762]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77762>.
369
370 =back
371
372 =head1 Utility Changes
373
374 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
375 here. Most of these are built within the directories F<utils> and F<x2p>.
376
377 [ List utility changes as a =head3 entry for each utility and =item
378 entries for each change
379 Use L<XXX> with program names to get proper documentation linking. ]
380
381 =head3 L<XXX>
382
383 =over 4
384
385 =item *
386
387 XXX
388
389 =back
390
391 =head1 Configuration and Compilation
392
393 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
394 go here.  Any other changes to the Perl build process should be listed here.
395 However, any platform-specific changes should be listed in the
396 L</Platform Support> section, instead.
397
398 [ List changes as a =item entry ].
399
400 =over 4
401
402 =item *
403
404 XXX
405
406 =back
407
408 =head1 Testing
409
410 XXX Any significant changes to the testing of a freshly built perl should be
411 listed here.  Changes which create B<new> files in F<t/> go here as do any
412 large changes to the testing harness (e.g. when parallel testing was added).
413 Changes to existing files in F<t/> aren't worth summarising, although the bugs
414 that they represent may be covered elsewhere.
415
416 [ List each test improvement as a =item entry ]
417
418 =over 4
419
420 =item *
421
422 XXX
423
424 =back
425
426 =head1 Platform Support
427
428 XXX Any changes to platform support should be listed in the sections below.
429
430 [ Within the sections, list each platform as a =item entry with specific
431 changes as paragraphs below it. ]
432
433 =head2 New Platforms
434
435 XXX List any platforms that this version of perl compiles on, that previous
436 versions did not. These will either be enabled by new files in the F<hints/>
437 directories, or new subdirectories and F<README> files at the top level of the
438 source tree.
439
440 =over 4
441
442 =item XXX-some-platform
443
444 XXX
445
446 =back
447
448 =head2 Discontinued Platforms
449
450 XXX List any platforms that this version of perl no longer compiles on.
451
452 =over 4
453
454 =item XXX-some-platform
455
456 XXX
457
458 =back
459
460 =head2 Platform-Specific Notes
461
462 XXX List any changes for specific platforms. This could include configuration
463 and compilation changes or changes in portability/compatibility.  However,
464 changes within modules for platforms should generally be listed in the
465 L</Modules and Pragmata> section.
466
467 =over 4
468
469 =item NetBSD
470
471 The NetBSD hints file has been changed to make the system's malloc the
472 default.
473
474 =back
475
476 =head1 Internal Changes
477
478 XXX Changes which affect the interface available to C<XS> code go here.
479 Other significant internal changes for future core maintainers should
480 be noted as well.
481
482 [ List each test improvement as a =item entry ]
483
484 =over 4
485
486 =item *
487
488 C<mg_findext> and C<sv_unmagicext> have been added.
489
490 These new functions allow extension authors to find and remove magic attached to
491 scalars based on both the magic type and the magic virtual table, similar to how
492 C<sv_magicext> attaches magic of a certain type and with a given virtual table
493 to a scalar. This eliminates the need for extensions to walk the list of
494 C<MAGIC> pointers of an C<SV> to find the magic that belongs to them.
495
496 =back
497
498 =head1 Selected Bug Fixes
499
500 XXX Important bug fixes in the core language are summarised here.
501 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
502 L</Modules and Pragmata>.
503
504 [ List each fix as a =item entry ]
505
506 =over 4
507
508 =item *
509
510 C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving
511 identically to C<use 5.12.0;>. Previously, C<require> in a C<BEGIN> block
512 was erroneously executing the C<use feature ':5.12.0'> and
513 C<use strict; use warnings;> behaviour, which only C<use> was documented to
514 provide
515 L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>.
516
517 =item *
518
519 C<use 5.42>
520 L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>,
521 C<use 6> and C<no 5> no longer leak memory.
522
523 =item *
524
525 C<eval "BEGIN{die}"> no longer leaks memory on non-threaded builds.
526
527 =item *
528
529 PerlIO no longer crashes when called recursively, e.g., from a signal
530 handler. Now it just leaks memory
531 L<[perl #75556]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75556>.
532
533 =item *
534
535 Defining a constant with the same name as one of perl's special blocks
536 (e.g., INIT) stopped working in 5.12.0, but has now been fixed
537 L<[perl #78634]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78634>.
538
539 =item *
540
541 A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used
542 to be stringified, even if the hash was tied
543 L<[perl #79178]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79178>.
544
545 =item *
546
547 A closure containing an C<if> statement followed by a constant or variable
548 is no longer treated as a constant
549 L<[perl #63540]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63540>.
550
551 =item *
552
553 Calling a closure prototype (what is passed to an attribute handler for a
554 closure) now results in a "Closure prototype called" error message
555 L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>.
556
557 =item *
558
559 A regular expression optimisation would sometimes cause a match with a
560 C<{n,m}> quantifier to fail when it should match
561 L<[perl #79152]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79152>.
562
563 =item *
564
565 What has become known as the "Unicode Bug" is resolved in this release.
566 Under C<use feature 'unicode_strings'>, the internal storage format of a
567 string no longer affects the external semantics.  There are two known
568 exceptions.  User-defined case changing functions, which are planned to
569 be deprecated in 5.14, require utf8-encoded strings to function; and the
570 character C<LATIN SMALL LETTER SHARP S> in regular expression
571 case-insensitive matching has a somewhat different set of bugs depending
572 on the internal storage format.  Case-insensitive matching of all
573 characters that have multi-character matches, as this one does, is
574 problematical in Perl.
575 L<[perl #58182]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=58182>.
576
577 =back
578
579 =head1 Known Problems
580
581 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
582 tests that had to be C<TODO>ed for the release would be noted here, unless
583 they were specific to a particular platform (see below).
584
585 This is a list of some significant unfixed bugs, which are regressions
586 from either 5.XXX.XXX or 5.XXX.XXX.
587
588 [ List each fix as a =item entry ]
589
590 =over 4
591
592 =item *
593
594 XXX
595
596 =back
597
598 =head1 Obituary
599
600 XXX If any significant core contributor has died, we've added a short obituary
601 here.
602
603 =head1 Acknowledgements
604
605 XXX The list of people to thank goes here.
606
607 =head1 Reporting Bugs
608
609 If you find what you think is a bug, you might check the articles
610 recently posted to the comp.lang.perl.misc newsgroup and the perl
611 bug database at http://rt.perl.org/perlbug/ .  There may also be
612 information at http://www.perl.org/ , the Perl Home Page.
613
614 If you believe you have an unreported bug, please run the L<perlbug>
615 program included with your release.  Be sure to trim your bug down
616 to a tiny but sufficient test case.  Your bug report, along with the
617 output of C<perl -V>, will be sent off to perlbug@perl.org to be
618 analysed by the Perl porting team.
619
620 If the bug you are reporting has security implications, which make it
621 inappropriate to send to a publicly archived mailing list, then please send
622 it to perl5-security-report@perl.org. This points to a closed subscription
623 unarchived mailing list, which includes all the core committers, who be able
624 to help assess the impact of issues, figure out a resolution, and help
625 co-ordinate the release of patches to mitigate or fix the problem across all
626 platforms on which Perl is supported. Please only use this address for
627 security issues in the Perl core, not for modules independently
628 distributed on CPAN.
629
630 =head1 SEE ALSO
631
632 The F<Changes> file for an explanation of how to view exhaustive details
633 on what changed.
634
635 The F<INSTALL> file for how to build Perl.
636
637 The F<README> file for general stuff.
638
639 The F<Artistic> and F<Copying> files for copyright information.
640
641 =cut