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