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