4 This has been completed up to 91fad77, except for:
5 bf5522a13a381257966e7ed6b731195a873b153e
6 9cef83062267e94311e1fd8744396e440642738e
7 8e88cfee26d866223a6b3bfffce6270271de00db
11 [ this is a template for a new perldelta file. Any text flagged as
12 XXX needs to be processed before release. ]
14 perldelta - what is new for perl v5.13.8
18 This document describes differences between the 5.13.8 release and
21 If you are upgrading from an earlier release such as 5.13.6, first read
22 L<perl5137delta>, which describes differences between 5.13.6 and
27 XXX Any important notices here
29 =head1 Core Enhancements
31 XXX New core language features go here. Summarise user-visible core language
32 enhancements. Particularly prominent performance optimisations could go
33 here, but most should go in the L</Performance Enhancements> section.
35 [ List each enhancement as a =head2 entry ]
37 =head2 C<-d:-foo> calls C<Devel::foo::unimport>
39 The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
40 equivalent to C<-MDevel::foo=bar>, which expands
41 internally to C<use Devel::foo 'bar';>.
42 F<perl> now allows prefixing the module name with C<->, with the same
43 semantics as C<-M>, I<i.e.>
49 Equivalent to C<-M-Devel::foo>, expands to
50 C<no Devel::foo;>, calls C<< Devel::foo->unimport() >>
55 Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>,
56 calls C<< Devel::foo->unimport('bar') >> if the method exists.
60 This is particularly useful to suppresses the default actions of a
61 C<Devel::*> module's C<import> method whilst still loading it for debugging.
63 =head2 Filehandle method calls load IO::File on demand
65 When a method call on a filehandle would die because the method can not
66 be resolved and L<IO::File> has not been loaded, Perl now loads IO::File
67 via C<require> and attempts method resolution again:
69 open my $fh, ">", $file;
70 $fh->binmode(":raw"); # loads IO::File and succeeds
72 This also works for globs like STDOUT, STDERR and STDIN:
76 Because this on-demand load only happens if method resolution fails, the
77 legacy approach of manually loading an IO::File parent class for partial
78 method support still works as expected:
81 open my $fh, ">", $file;
82 $fh->autoflush(1); # IO::File not loaded
84 =head2 Full functionality for C<use feature 'unicode_strings'>
86 This release provides full functionality for C<use feature
87 'unicode_strings'>. Under its scope, all string operations executed and
88 regular expressions compiled (even if executed outside its scope) have
89 Unicode semantics. See L<feature>.
91 This feature avoids the "Unicode Bug" (See
92 L<perlunicode/The "Unicode Bug"> for details.) If their is a
93 possibility that your code will process Unicode strings, you are
94 B<strongly> encouraged to use this subpragma to avoid nasty surprises.
96 This availability of this should strongly affect the whole tone of
97 various documents, such as L<perlunicode> and L<perluniintro>, but this
98 work has not been done yet.
100 =head2 Exception Handling Backcompat Hack
102 When an exception is thrown in an C<eval BLOCK>, C<$@> is now set before
103 unwinding, as well as being set after unwinding as the eval block exits. This
104 early setting supports code that has historically treated C<$@> during unwinding
105 as an indicator of whether the unwinding was due to an exception. These modules
106 had been broken by 5.13.1's change from setting C<$@> early to setting it late.
107 This double setting arrangement is a stopgap until the reason for unwinding can
108 be made properly introspectable. C<$@> has never been a reliable indicator of
111 =head2 printf-like functions understand size modifiers "hh", "z", "t", and sometimes "j"
113 Perl's printf and sprintf operators, and Perl's internal printf replacement
114 function, now understand the C90 size modifiers "hh" (C<char>), "z"
115 (C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99
116 compiler, Perl now understands the size modifier "j" (C<intmax_t>).
118 So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'.
120 =head2 DTrace probes now include package name
122 The DTrace probes now include an additional argument (C<arg3>) which contains
123 the package the subroutine being entered or left was compiled in.
125 For example using the following DTrace script:
127 perl$target:::sub-entry
129 printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
134 perl -e'sub test { }; test'
140 =head2 Stacked labels
142 Multiple statement labels can now appear before a single statement.
146 XXX Any security-related notices go here. In particular, any security
147 vulnerabilities closed should be noted here rather than in the
148 L</Selected Bug Fixes> section.
150 [ List each security issue as a =head2 entry ]
152 =head1 Incompatible Changes
154 =head2 Attempting to use C<:=> as an empty attribute list is now a syntax error
156 Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>,
157 with the C<:> being treated as the start of an attribute list, ending before
158 the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now
159 a syntax error. This will allow the future use of C<:=> as a new token.
161 We find no Perl 5 code on CPAN using this construction, outside the core's
162 tests for it, so we believe that this change will have very little impact on
163 real-world codebases.
165 If it is absolutely necessary to have empty attribute lists (for example,
166 because of a code generator) then avoid the error by adding a space before
169 =head2 Run-time code block in regular expressions
171 Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not
172 to inherit any pragmata (strict, warnings, etc.) if the regular expression
173 was compiled at run time as happens in cases like these two:
176 $foo =~ $bar; # when $bar contains (?{...})
177 $foo =~ /$bar(?{ $finished = 1 })/;
179 This was a bug, which has now been fixed. But it has the potential to break
180 any code that was relying on this bug.
184 XXX Any deprecated features, syntax, modules etc. should be listed here.
185 In particular, deprecated modules should be listed here even if they are
186 listed as an updated module in the L</Modules and Pragmata> section.
188 [ List each deprecation as a =head2 entry ]
190 =head2 C<?PATTERN?> is deprecated
192 C<?PATTERN?> (without the initial m) has been deprecated and now produces
195 =head2 C<sv_compile_2op> is now deprecated
197 The C<sv_compile_2op> is now deprecated, and will be removed. Searches suggest
198 that nothing on CPAN is using it, so this should have zero impact.
200 It attempted to provide an API to compile code down to an optree, but failed
201 to bind correctly to lexicals in the enclosing scope. It's not possible to
202 fix this problem within the constraints of its parameters and return value.
204 =head2 Tie functions on scalars holding typeglobs
206 Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
207 acts on a file handle if the scalar happens to hold a typeglob.
209 This is a long-standing bug that will be removed in Perl 5.16, as
210 there is currently no way to tie the scalar itself when it holds
211 a typeglob, and no way to untie a scalar that has had a typeglob
214 This bug was fixed in 5.13.7 but, because of the breakage it caused, the
215 fix has been reverted. Now there is a deprecation warning whenever a tie
216 function is used on a handle without an explicit C<*>.
218 =head1 Performance Enhancements
220 XXX Changes which enhance performance without changing behaviour go here. There
221 may well be none in a stable release.
223 [ List each enhancement as a =item entry ]
233 =head1 Modules and Pragmata
235 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
236 go here. If Module::CoreList is updated, generate an initial draft of the
237 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
238 entries to STDOUT. Results can be pasted in place of the '=head2' entries
239 below. A paragraph summary for important changes should then be added by hand.
240 In an ideal world, dual-life modules would have a F<Changes> file that could be
243 [ Within each section, list entries as a =item entry ]
245 =head2 New Modules and Pragmata
255 =head2 Updated Modules and Pragmata
261 C<Archive::Tar> has been upgraded from version 1.72 to 1.74
265 C<B::Concise> has been upgraded from version 0.81 to 0.82.
267 It no longer produces mangled output with the C<-tree> option
268 L<[perl #80632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80632>.
272 C<Devel::SelfStubber> has been upgraded from version 1.04 to 1.05.
276 C<Digest::SHA> has been upgraded from 5.48 to 5.50
278 shasum now more closely mimics sha1sum/md5sum and Addfile
279 accepts all POSIX filenames.
283 C<Dumpvalue> has been upgraded from version 1.14 to 1.15.
287 C<Env> has been upgraded from version 1.01 to 1.02.
291 C<ExtUtils::CBuilder> has been upgraded from 0.2703 to 0.2802
295 C<ExtUtils::Embed> has been upgraded from 1.29 to 1.30.
299 C<if> has been upgraded from 0.06 to 0.0601.
303 C<Devel::SelfStubber> has been upgraded from version 1.03 to 1.04.
307 C<IPC::Cmd> has been upgraded from 0.64 to 0.66
309 Resolves an issue with splitting Win32 command lines
310 and documentation enhancements.
314 C<IPC::Open3> has been upgraded from 1.07 to 1.08.
318 C<Locale::Codes> has been upgraded from version 3.14 to 3.15
322 C<Memoize> has been upgraded from version 1.01_03 to 1.02.
326 C<MIME::Base64> has been upgraded from 3.10 to 3.13
328 Now provides encode_base64url and decode_base64url functions to process
329 the base64 scheme for "URL applications".
333 C<mro> has been upgraded from version 1.05 to 1.06.
335 C<next::method> I<et al.> now take into account that every class inherits
337 L<[perl #68654]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68654>.
341 C<Net::Ping> has been upgraded from 2.36 to 2.37.
345 C<overload> has been upgraded from 1.11 to 1.12.
349 C<PerlIO::encoding> has been upgraded from 0.13 to 0.14.
353 C<PerlIO::scalar> has been upgraded from 0.10 to 0.11.
355 A C<read> after a C<seek> beyond the end of the string no longer thinks it
357 L<[perl #78716]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78716>.
361 C<re> has been upgraded from 0.14 to 0.15.
365 C<Socket> has been upgraded from 1.91 to 1.92.
367 It has several new functions for handling IPv6 addresses.
371 C<Storable> has been upgraded from 2.24 to 2.25.
373 This adds support for serialising code references that contain UTF-8 strings
374 correctly. The Storable minor version number changed as a result -- this means
375 Storable users that set C<$Storable::accept_future_minor> to a C<FALSE> value
376 will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details).
380 C<Time::HiRes> has been upgraded from 1.9721 to 1.9721_01.
384 C<Unicode::Collate> has been upgraded from 0.67 to 0.68
388 C<Unicode::UCD> has been upgraded from 0.29 to 0.30.
392 C<version> has been upgraded from 0.82 to 0.86.
396 C<Win32> has been upgraded from 0.039 to 0.040.
400 =head2 Removed Modules and Pragmata
412 XXX Changes to files in F<pod/> go here. Consider grouping entries by
413 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
415 =head2 New Documentation
417 XXX Changes which create B<new> files in F<pod/> go here.
421 XXX Description of the purpose of the new file here
423 =head2 Changes to Existing Documentation
425 XXX Changes which significantly change existing files in F<pod/> go here.
426 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
435 XXX Description of the change here
441 The following additions or changes have been made to diagnostic output,
442 including warnings and fatal error messages. For the complete list of
443 diagnostic messages, see L<perldiag>.
445 XXX New or changed warnings emitted by the core's C<C> code go here. Also
446 include any changes in L<perldiag> that reconcile it to the C<C> code.
448 [ Within each section, list entries as a =item entry ]
450 =head2 New Diagnostics
452 XXX Newly added diagnostic messages go here
458 There is a new "Closure prototype called" error.
462 =head2 Changes to Existing Diagnostics
464 XXX Changes (i.e. rewording) of diagnostic messages go here
470 The "Found = in conditional" warning that is emitted when a constant is
471 assigned to a variable in a condition is now withheld if the constant is
472 actually a subroutine or one generated by C<use constant>, since the value
473 of the constant may not be known at the time the program is written
474 L<[perl #77762]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77762>.
478 =head1 Utility Changes
480 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
481 here. Most of these are built within the directories F<utils> and F<x2p>.
483 [ List utility changes as a =head3 entry for each utility and =item
484 entries for each change
485 Use L<XXX> with program names to get proper documentation linking. ]
497 =head1 Configuration and Compilation
499 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
500 go here. Any other changes to the Perl build process should be listed here.
501 However, any platform-specific changes should be listed in the
502 L</Platform Support> section, instead.
504 [ List changes as a =item entry ].
510 The C<Encode> module can now (once again) be included in a static Perl
511 build. The special-case handling for this situation got broken in Perl
512 5.11.0, and has now been repaired.
522 XXX Any significant changes to the testing of a freshly built perl should be
523 listed here. Changes which create B<new> files in F<t/> go here as do any
524 large changes to the testing harness (e.g. when parallel testing was added).
525 Changes to existing files in F<t/> aren't worth summarising, although the bugs
526 that they represent may be covered elsewhere.
528 [ List each test improvement as a =item entry ]
538 =head1 Platform Support
540 XXX Any changes to platform support should be listed in the sections below.
542 [ Within the sections, list each platform as a =item entry with specific
543 changes as paragraphs below it. ]
547 XXX List any platforms that this version of perl compiles on, that previous
548 versions did not. These will either be enabled by new files in the F<hints/>
549 directories, or new subdirectories and F<README> files at the top level of the
554 =item XXX-some-platform
560 =head2 Discontinued Platforms
562 XXX List any platforms that this version of perl no longer compiles on.
566 =item XXX-some-platform
572 =head2 Platform-Specific Notes
574 XXX List any changes for specific platforms. This could include configuration
575 and compilation changes or changes in portability/compatibility. However,
576 changes within modules for platforms should generally be listed in the
577 L</Modules and Pragmata> section.
583 The NetBSD hints file has been changed to make the system's malloc the
588 =head1 Internal Changes
590 XXX Changes which affect the interface available to C<XS> code go here.
591 Other significant internal changes for future core maintainers should
594 [ List each test improvement as a =item entry ]
600 C<mg_findext> and C<sv_unmagicext> have been added.
602 These new functions allow extension authors to find and remove magic attached to
603 scalars based on both the magic type and the magic virtual table, similar to how
604 C<sv_magicext> attaches magic of a certain type and with a given virtual table
605 to a scalar. This eliminates the need for extensions to walk the list of
606 C<MAGIC> pointers of an C<SV> to find the magic that belongs to them.
610 The C<parse_fullexpr()>, C<parse_listexpr(), C<parse_termexpr()> and
611 C<parse_arithexpr()> functions have been added.
613 These are for parsing expressions at various precedence levels.
617 =head1 Selected Bug Fixes
619 XXX Important bug fixes in the core language are summarised here.
620 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
621 L</Modules and Pragmata>.
623 [ List each fix as a =item entry ]
629 C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving
630 identically to C<use 5.12.0;>. Previously, C<require> in a C<BEGIN> block
631 was erroneously executing the C<use feature ':5.12.0'> and
632 C<use strict; use warnings;> behaviour, which only C<use> was documented to
634 L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>.
639 L<[perl #69050]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=69050>,
640 C<use 6> and C<no 5> no longer leak memory.
644 C<eval "BEGIN{die}"> no longer leaks memory on non-threaded builds.
648 PerlIO no longer crashes when called recursively, e.g., from a signal
649 handler. Now it just leaks memory
650 L<[perl #75556]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75556>.
654 Defining a constant with the same name as one of perl's special blocks
655 (e.g., INIT) stopped working in 5.12.0, but has now been fixed
656 L<[perl #78634]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78634>.
660 A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used
661 to be stringified, even if the hash was tied
662 L<[perl #79178]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79178>.
666 A closure containing an C<if> statement followed by a constant or variable
667 is no longer treated as a constant
668 L<[perl #63540]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63540>.
672 Calling a closure prototype (what is passed to an attribute handler for a
673 closure) now results in a "Closure prototype called" error message instead
675 L<[perl #68560]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68560>.
679 A regular expression optimisation would sometimes cause a match with a
680 C<{n,m}> quantifier to fail when it should match
681 L<[perl #79152]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79152>.
685 What has become known as the "Unicode Bug" is resolved in this release.
686 Under C<use feature 'unicode_strings'>, the internal storage format of a
687 string no longer affects the external semantics. There are two known
688 exceptions. User-defined case changing functions, which are planned to
689 be deprecated in 5.14, require utf8-encoded strings to function; and the
690 character C<LATIN SMALL LETTER SHARP S> in regular expression
691 case-insensitive matching has a somewhat different set of bugs depending
692 on the internal storage format. Case-insensitive matching of all
693 characters that have multi-character matches, as this one does, is
694 problematical in Perl.
695 L<[perl #58182]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=58182>.
699 Mentioning a read-only lexical variable from the enclosing scope in a
700 string C<eval> would cause the variable to become writable
701 L<[perl #19135]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=19135>.
705 C<state> can now be used with attributes. It used to mean the same thing as
706 C<my> if attributes were present
707 L<[perl #68658]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68658>.
711 Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in
712 the "Use of uninitialized value in numeric gt" warning when C<$a> is
713 undefined (since it is not part of the C<E<gt>> expression, but the operand
715 L<[perl #72090]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72090>.
719 C<require> no longer causes C<caller> to return the wrong file name for
720 the scope that called C<require> and other scopes higher up that had the
722 L<[perl #68712]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68712>.
726 The ref types in the typemap for XS bindings now support magical variables
727 L<[perl #72684]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72684>.
731 Match variables (e.g., C<$1>) no longer persist between calls to a sort
733 L<[perl #76026]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76026>.
737 The C<B> module was returning B::OPs instead of B::LOGOPs for C<entertry>
738 L<[perl #80622]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=80622>.
740 This was due to a bug in the perl core, not in C<B> itself.
744 Some numeric operators were converting integers to floating point,
745 resulting in loss of precision on 64-bit platforms
746 L<[perl #77456]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77456>.
750 =head1 Known Problems
752 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
753 tests that had to be C<TODO>ed for the release would be noted here, unless
754 they were specific to a particular platform (see below).
756 This is a list of some significant unfixed bugs, which are regressions
757 from either 5.XXX.XXX or 5.XXX.XXX.
759 [ List each fix as a =item entry ]
771 XXX If any significant core contributor has died, we've added a short obituary
774 =head1 Acknowledgements
776 XXX The list of people to thank goes here.
778 =head1 Reporting Bugs
780 If you find what you think is a bug, you might check the articles
781 recently posted to the comp.lang.perl.misc newsgroup and the perl
782 bug database at http://rt.perl.org/perlbug/ . There may also be
783 information at http://www.perl.org/ , the Perl Home Page.
785 If you believe you have an unreported bug, please run the L<perlbug>
786 program included with your release. Be sure to trim your bug down
787 to a tiny but sufficient test case. Your bug report, along with the
788 output of C<perl -V>, will be sent off to perlbug@perl.org to be
789 analysed by the Perl porting team.
791 If the bug you are reporting has security implications, which make it
792 inappropriate to send to a publicly archived mailing list, then please send
793 it to perl5-security-report@perl.org. This points to a closed subscription
794 unarchived mailing list, which includes all the core committers, who be able
795 to help assess the impact of issues, figure out a resolution, and help
796 co-ordinate the release of patches to mitigate or fix the problem across all
797 platforms on which Perl is supported. Please only use this address for
798 security issues in the Perl core, not for modules independently
803 The F<Changes> file for an explanation of how to view exhaustive details
806 The F<INSTALL> file for how to build Perl.
808 The F<README> file for general stuff.
810 The F<Artistic> and F<Copying> files for copyright information.