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