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