This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ahem. *Final* finalisation.
[perl5.git] / pod / perldelta.pod
index 31fa0e9..5bd675f 100644 (file)
@@ -1,18 +1,7 @@
 =encoding utf8
 
-=for comment
-This has been completed up to 8ff3250783, except for:
-04777d295957ad270188e4debf51b523e07cc5b0
-c565ab54dc649bb62cd4d57149d7b2abb21df5f3
-1c8d11ca3d0ce8bc11562f159b94c2c7e62dea6c
-51698cb360d5bba06e12496ef9c7bf82e3352b71
-0c4d3b5ea916cf640ea163c5a6bcffefade55a1b
-
 =head1 NAME
 
-[ this is a template for a new perldelta file. Any text flagged as
-XXX needs to be processed before release. ]
-
 perldelta - what is new for perl v5.13.7
 
 =head1 DESCRIPTION
@@ -24,18 +13,8 @@ If you are upgrading from an earlier release such as 5.13.5, first read
 L<perl5136delta>, which describes differences between 5.13.5 and
 5.13.6.
 
-=head1 Notice
-
-XXX Any important notices here
-
 =head1 Core Enhancements
 
-XXX New core language features go here. Summarise user-visible core language
-enhancements. Particularly prominent performance optimisations could go
-here, but most should go in the L</Performance Enhancements> section.
-
-[ List each enhancement as a =head2 entry ]
-
 =head2 Single term prototype
 
 The C<+> prototype is a special alternative to C<$> that will act like
@@ -133,23 +112,57 @@ the C<y///> operator.
 It causes it to perform the substitution on a I<copy> of its operand,
 returning that copy instead of a character count.
 
-=head1 Security
-
-XXX Any security-related notices go here.  In particular, any security
-vulnerabilities closed should be noted here rather than in the
-L</Selected Bug Fixes> section.
-
-[ List each security issue as a =head2 entry ]
+=head2 New global variable C<${^GLOBAL_PHASE}>
+
+A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow
+introspection of the current phase of the perl interpreter. It's explained in
+detail in L<perlvar/"${^GLOBAL_PHASE}"> and
+L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">.
+
+=head2 Unicode Version 6.0 is now supported (mostly)
+
+Perl comes with the Unicode 6.0 data base updated with
+L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>,
+with one exception noted below.
+See L<http://unicode.org/versions/Unicode6.0.0> for details on the new
+release.  Perl does not support any Unicode provisional properties,
+including the new ones for this release, but their database files are
+packaged with Perl.
+
+Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514,
+which is a symbol that looks like a bell, and used in Japanese cell
+phones.  This conflicts with the long-standing Perl usage of having
+C<BELL> mean the ASCII C<BEL> character, U+0007.  In Perl 5.14,
+C<\N{BELL}> will continue to mean U+0007, but its use will generate a
+deprecated warning message, unless such warnings are turned off.  The
+new name for U+0007 in Perl will be C<ALERT>, which corresponds nicely
+with the existing shorthand sequence for it, C<"\a">.  C<\N{BEL}> will
+mean U+0007, with no warning given.  The character at U+1F514 will not
+have a name in 5.14, but can be referred to by C<\N{U+1F514}>.  The plan
+is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code
+that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>,
+C<\N{BEL}>, or C<"\a"> instead.
+
+=head2 Improved support for custom OPs
+
+Custom ops can now be registered with the new C<custom_op_register> C
+function and the C<XOP> structure. This will make it easier to add new
+properties of custom ops in the future. Two new properties have been added
+already, C<xop_class> and C<xop_peep>.
+
+C<xop_class> is one of the OA_*OP constants, and allows L<B> and other
+introspection mechanisms to work with custom ops that aren't BASEOPs.
+C<xop_peep> is a pointer to a function that will be called for ops of this
+type from C<Perl_rpeep>.
+
+See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
+detail.
+
+The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
+supported but discouraged.
 
 =head1 Incompatible Changes
 
-XXX For a release on a stable branch, this section aspires to be:
-
-    There are no changes intentionally incompatible with 5.XXX.XXX. If any
-    exist, they are bugs and reports are welcome.
-
-[ List each incompatible change as a =head2 entry ]
-
 =head2 Dereferencing typeglobs
 
 If you assign a typeglob to a scalar variable:
@@ -184,6 +197,9 @@ The C<*$glob> on the second line returns a new immutable glob. That new
 glob is made an alias to C<*bar>. Then it is discarded. So the second
 assignment has no effect.
 
+It also means that C<tie $handle> will now tie C<$handle> as a scalar, even
+if it has had a glob assigned to it.
+
 The upside to this incompatible change is that bugs
 L<[perl #77496]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77496>,
 L<[perl #77502]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77502>,
@@ -196,41 +212,39 @@ and maybe others, too, have been fixed.
 See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even
 more detail.
 
-=head1 Deprecations
+=head2 Clearing stashes
 
-XXX Any deprecated features, syntax, modules etc. should be listed here.
-In particular, deprecated modules should be listed here even if they are
-listed as an updated module in the L</Modules and Pragmata> section.
+Stash list assignment C<%foo:: = ()> used to make the stash anonymous
+temporarily while it was being emptied. Consequently, any of its
+subroutines referenced elsewhere would become anonymous (showing up as
+"(unknown)" in C<caller>). Now they retain their package names, such that
+C<caller> will return the original sub name if there is still a reference
+to its typeglob, or "foo::__ANON__" otherwise
+L<[perl #79208]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79208>.
 
-[ List each deprecation as a =head2 entry ]
+=head1 Deprecations
 
-=head1 Performance Enhancements
+=head2 C<\N{BELL}> is deprecated
 
-XXX Changes which enhance performance without changing behaviour go here. There
-may well be none in a stable release.
+This is because Unicode is using that name for a different character.
+See L</Unicode Version 6.0 is now supported (mostly)> for more
+explanation.
 
-[ List each enhancement as a =item entry ]
+=head1 Performance Enhancements
 
 =over 4
 
 =item *
 
-XXX
+When an object has many weak references to it, freeing that object
+can under some some circumstances take O(N^2) time to free (where N is the
+number of references). The number of circumstances has been reduced.
+L<[perl #75254]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75254>.
 
 =back
 
 =head1 Modules and Pragmata
 
-XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
-go here.  If Module::CoreList is updated, generate an initial draft of the
-following sections using F<Porting/corelist-perldelta.pl>, which prints stub
-entries to STDOUT.  Results can be pasted in place of the '=head2' entries
-below.  A paragraph summary for important changes should then be added by hand.
-In an ideal world, dual-life modules would have a F<Changes> file that could be
-cribbed.
-
-[ Within each section, list entries as a =item entry ]
-
 =head2 New Modules and Pragmata
 
 =over 4
@@ -238,7 +252,7 @@ cribbed.
 =item *
 
 The following modules were added by the C<Unicode::Collate> 
-upgrade from 0.63 to 0.65. See below for details.
+upgrade from 0.63 to 0.67. See below for details.
 
 C<Unicode::Collate::CJK::Big5>
 
@@ -267,7 +281,20 @@ executable.
 
 =item *
 
-C<B> has been upgraded from 1.24 to 1.25.
+C<Archive::Tar> has been upgraded from 1.68 to 1.72
+
+This adds the ptargrep utility for using regular expressions against 
+the contents of files in a tar archive.
+
+=item *
+
+C<B> has been upgraded from 1.24 to 1.26.
+
+It no longer crashes when taking apart a C<y///> containing characters
+outside the octet range or compiled in a C<use utf8> scope.
+
+The size of the shared object has been reduced by about 40%, with no
+reduction in functionality.
 
 =item *
 
@@ -304,6 +331,10 @@ C<CPANPLUS::Dist::Build> has been upgraded from 0.48 to 0.50
 
 =item *
 
+C<Data::Dumper> has been upgraded from 2.129 to 2.130_01.
+
+=item *
+
 C<DynaLoader> has been upgraded from 1.10 to 1.11.
 
 It fixes a buffer overflow when passed a very long file name.
@@ -312,6 +343,16 @@ It fixes a buffer overflow when passed a very long file name.
 
 C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23.
 
+The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs>
+can now C<croak> for missing constants, or generate a complete C<AUTOLOAD>
+subroutine in XS, allowing simplification of many modules that use it.
+(C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, C<Socket>)
+
+C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all
+constants onto the package's C{@EXPORT_OK}. This has been used to replace
+less space-efficient code in C<B>, helping considerably shrink the size of its
+shared object.
+
 =item *
 
 C<Fcntl> has been upgraded from 1.09 to 1.10.
@@ -331,6 +372,13 @@ C<File::Glob> has been upgraded from 1.09 to 1.10.
 
 =item *
 
+C<File::stat> has been upgraded from 1.03 to 1.04.
+
+The C<-x> and C<-X> file test operators now work correctly under the root
+user.
+
+=item *
+
 C<GDBM_File> has been upgraded from 1.11 to 1.12.
 
 This fixes a memory leak when DBM filters are used.
@@ -353,11 +401,15 @@ C<Locale::Maketext> has been upgraded from 1.16 to 1.17.
 
 =item *
 
-C<Math::BigInt> has been upgraded from 1.97 to 1.98.
+C<Math::BigInt> has been upgraded from 1.97 to 1.99_01.
 
 =item *
 
-C<Math::BigInt::FastCalc> has been upgraded from 0.22 to 0.24.
+C<Math::BigRat> has been upgraded from 0.26 to 0.26_01
+
+=item *
+
+C<Math::BigInt::FastCalc> has been upgraded from 0.22 to 0.24_01.
 
 =item *
 
@@ -384,10 +436,20 @@ This fixes a memory leak when DBM filters are used.
 
 =item *
 
+C<Opcode> has been upgraded from 1.16 to 1.17.
+
+=item *
+
 C<parent> has been upgraded from 0.223 to 0.224
 
 =item *
 
+C<Pod::Simple> has been upgraded from 3.14 to 3.15
+
+Includes various fixes to C<HTML> and C<XHTML> handling.
+
+=item *
+
 C<POSIX> has been upgraded from 1.21 to 1.22.
 
 =item *
@@ -418,15 +480,23 @@ C<Socket> has been upgraded from 1.90 to 1.91.
 
 =item *
 
+C<Storable> has been upgraded from 2.22 to 2.24
+
+Includes performance improvement for overloaded classes.
+
+=item *
+
 C<Sys::Hostname> has been upgraded from 1.13 to 1.14.
 
 =item *
 
-C<Unicode::Collate> has been upgraded from 0.63 to 0.66
+C<Unicode::Collate> has been upgraded from 0.63 to 0.67
 
 This release newly adds locales C<ja> C<ko> and C<zh> and its variants 
 ( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ).
 
+Supported UCA_Version 22 for Unicode 6.0.0.
+
 The following modules have been added:
 
 C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes 
@@ -449,21 +519,8 @@ tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
 
 =back
 
-=head2 Removed Modules and Pragmata
-
-=over 4
-
-=item *
-
-XXX
-
-=back
-
 =head1 Documentation
 
-XXX Changes to files in F<pod/> go here.  Consider grouping entries by
-file and be sure to link to the appropriate page, e.g. L<perlfunc>.
-
 L<perlvar> reorders the variables and groups them by topic. Each variable
 introduced after Perl 5.000 notes the first version in which it is 
 available. L<perlvar> also has a new section for deprecated variables to
@@ -471,18 +528,15 @@ note when they were removed.
 
 =head2 New Documentation
 
-XXX Changes which create B<new> files in F<pod/> go here.
+=head3 L<perlpodstyle>
 
-=head3 L<XXX>
+New style guide for POD documentation,
+split mostly from the NOTES section of the pod2man man page.
 
-XXX Description of the purpose of the new file here
+( This was added to C<v5.13.6> but was not documented with that release ).
 
 =head2 Changes to Existing Documentation
 
-XXX Changes which significantly change existing files in F<pod/> go here.
-However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
-section.
-
 =over
 
 =item *
@@ -496,31 +550,10 @@ C<use locale> affects formats.
 
 =back
 
-=head3 L<XXX>
-
-=over 4
-
-=item *
-
-XXX Description of the change here
-
-=back
-
 =head1 Diagnostics
 
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages.  For the complete list of
-diagnostic messages, see L<perldiag>.
-
-XXX New or changed warnings emitted by the core's C<C> code go here. Also
-include any changes in L<perldiag> that reconcile it to the C<C> code.
-
-[ Within each section, list entries as a =item entry ]
-
 =head2 New Diagnostics
 
-XXX Newly added diagnostic messages go here
-
 =over 4
 
 =item *
@@ -531,120 +564,45 @@ operator, and has been documented.
 
 =back
 
-=head2 Changes to Existing Diagnostics
-
-XXX Changes (i.e. rewording) of diagnostic messages go here
-
-=over 4
-
-=item *
-
-XXX
-
-=back
-
 =head1 Utility Changes
 
-XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
-here. Most of these are built within the directories F<utils> and F<x2p>.
-
-[ List utility changes as a =head3 entry for each utility and =item
-entries for each change
-Use L<XXX> with program names to get proper documentation linking. ]
-
-=head3 L<XXX>
+=head3 L<ptargrep>
 
 =over 4
 
 =item *
 
-XXX
+L<ptargrep> is a utility to apply pattern matching to the contents of files 
+in a tar archive. It comes with C<Archive::Tar>.
 
 =back
 
-=head1 Configuration and Compilation
-
-XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
-go here.  Any other changes to the Perl build process should be listed here.
-However, any platform-specific changes should be listed in the
-L</Platform Support> section, instead.
-
-[ List changes as a =item entry ].
+=head1 Testing
 
 =over 4
 
 =item *
 
-XXX
-
-=back
-
-=head1 Testing
-
-XXX Any significant changes to the testing of a freshly built perl should be
-listed here.  Changes which create B<new> files in F<t/> go here as do any
-large changes to the testing harness (e.g. when parallel testing was added).
-Changes to existing files in F<t/> aren't worth summarising, although the bugs
-that they represent may be covered elsewhere.
-
-[ List each test improvement as a =item entry ]
-
-=over 4
+The new F<t/mro/isa_aliases.t> has been added, which tests that
+C<*Foo::ISA = *Bar::ISA> works properly.
 
 =item *
 
 F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible
 at the Perl level via C<mro::get_isarev>) is updated properly.
 
-=item
+=item *
 
 F<t/run/switchd-78586.t> has been added, which tests that
 L<[perl #78586]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78586>
-has been fixed (related to line numbers in the debbuger).
+has been fixed (related to line numbers in the debugger).
 
 =back
 
 =head1 Platform Support
 
-XXX Any changes to platform support should be listed in the sections below.
-
-[ Within the sections, list each platform as a =item entry with specific
-changes as paragraphs below it. ]
-
-=head2 New Platforms
-
-XXX List any platforms that this version of perl compiles on, that previous
-versions did not. These will either be enabled by new files in the F<hints/>
-directories, or new subdirectories and F<README> files at the top level of the
-source tree.
-
-=over 4
-
-=item XXX-some-platform
-
-XXX
-
-=back
-
-=head2 Discontinued Platforms
-
-XXX List any platforms that this version of perl no longer compiles on.
-
-=over 4
-
-=item XXX-some-platform
-
-XXX
-
-=back
-
 =head2 Platform-Specific Notes
 
-XXX List any changes for specific platforms. This could include configuration
-and compilation changes or changes in portability/compatibility.  However,
-changes within modules for platforms should generally be listed in the
-L</Modules and Pragmata> section.
-
 =over 4
 
 =item Windows
@@ -653,15 +611,18 @@ Directory handles are now properly cloned when threads are created. In perl
 5.13.6, child threads simply stopped inheriting directory handles. In
 previous versions, threads would share handles, resulting in crashes.
 
-=back
+Support for building with Visual C++ 2010 is now underway, but is not yet
+complete. See F<README.win32> for more details.
 
-=head1 Internal Changes
+=item VMS
 
-XXX Changes which affect the interface available to C<XS> code go here.
-Other significant internal changes for future core maintainers should
-be noted as well.
+Record-oriented files (record format variable or variable with fixed control)
+opened for write by the perlio layer will now be line buffered to prevent the
+introduction of spurious line breaks whenever the perlio buffer fills up.
+
+=back
 
-[ List each test improvement as a =item entry ]
+=head1 Internal Changes
 
 =over 4
 
@@ -709,7 +670,7 @@ without a label.
 =item *
 
 A new C<parse_label()> function has been added, that parses a statement
-labels, separate from statements.
+label, separate from statements.
 
 =item *
 
@@ -727,12 +688,6 @@ but are considered experimental.
 
 =head1 Selected Bug Fixes
 
-XXX Important bug fixes in the core language are summarised here.
-Bug fixes in files in F<ext/> and F<lib/> are best summarised in
-L</Modules and Pragmata>.
-
-[ List each fix as a =item entry ]
-
 =over 4
 
 =item *
@@ -806,13 +761,14 @@ L<[perl #78674]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78674>.
 
 =item *
 
-Typeglob assignments would crash if the glob's stash no longer existed, if
-the glob assigned to was named 'ISA' or the glob on either side of the
-assignment contained a subroutine.
+Typeglob assignments would crash if the glob's stash no longer existed, so
+long as the glob assigned to was named 'ISA' or the glob on either side of
+the assignment contained a subroutine.
 
 =item *
 
-Calling C<< ->import >> on a class lacking an import method could corrupt the stack result in strange behaviour. For instance,
+Calling C<< ->import >> on a class lacking an import method could corrupt
+the stack, resulting in strange behaviour. For instance,
 
   push @a, "foo", $b = bar->import;
 
@@ -857,32 +813,81 @@ L<[perl #70998]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=70998>.
 
 C<s///r> (added in 5.13.2) no longer leaks.
 
-=back
+=item *
 
-=head1 Known Problems
+The trie optimisation was not taking empty groups into account, preventing
+'foo' from matching C</\A(?:(?:)foo|bar|zot)\z/>
+L<[perl #78356]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78356>.
 
-XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
-tests that had to be C<TODO>ed for the release would be noted here, unless
-they were specific to a particular platform (see below).
+=item *
 
-This is a list of some significant unfixed bugs, which are regressions
-from either 5.XXX.XXX or 5.XXX.XXX.
+A pattern containing a C<+> inside a lookahead would sometimes cause an
+incorrect match failure in a global match (e.g., C</(?=(\S+))/g>)
+L<[perl #68564]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68564>.
 
-[ List each fix as a =item entry ]
+=item *
 
-=over 4
+Iterating with C<foreach> over an array returned by an lvalue sub now works
+L<[perl #23790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=23790>.
+
+=item *
+
+C<$@> is now localised during calls to C<binmode> to prevent action at a
+distance
+L<[perl #78844]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78844>.
+
+=item *
+
+C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now
+updated properly when packages are deleted or removed from the C<@ISA> of
+other classes. This allows many packages to be created and deleted without
+causing a memory leak
+L<[perl #75176]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75176>.
 
 =item *
 
-XXX
+C<undef *Foo::> and C<undef *Foo::ISA> and C<delete $package::{ISA}>
+used not to update the internal isa caches if the
+stash or C<@ISA> array had a reference elsewhere. In
+fact, C<undef *Foo::ISA> would stop a new C<@Foo::ISA> array from updating
+caches.
+
+=item *
+
+C<@ISA> arrays can now be shared between classes via
+C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA>
+L<[perl #77238]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77238>.
+
+=item *
+
+The parser no longer hangs when encountering certain Unicode characters,
+such as U+387
+L<[perl #74022]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74022>.
+
+=item *
+
+C<formline> no longer crashes when passed a tainted format picture. It also
+taints C<$^A> now if its arguments are tainted
+L<[perl #79138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79138>.
+
+=item *
+
+A signal handler called within a signal handler could cause leaks or
+double-frees. Now fixed.
+L<[perl #76248]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76248>.
+
+=item *
+
+When trying to report C<Use of uninitialized value $Foo::BAR>, crashes could
+occur if the GLOB of the global variable causing the warning has been detached
+from its original stash by, for example C<delete $::{'Foo::'}>. This has been
+fixed by disabling the reporting of variable names in the warning in those
+cases.
 
 =back
 
 =head1 Obituary
 
-XXX If any significant core contributor has died, we've added a short obituary
-here.
-
 Randy Kobes, creator of the kobesearch alternative to search.cpan.org and
 contributor/maintainer to several core Perl toolchain modules, passed away
 on September 18, 2010 after a battle with lung cancer.  His contributions
@@ -890,7 +895,18 @@ to the Perl community will be missed.
 
 =head1 Acknowledgements
 
-XXX The list of people to thank goes here.
+Perl 5.13.7 represents approximately one month of development since Perl 5.13.6
+and contains 72427 lines of changes across 516 files from 39 authors and committers:
+
+Abhijit Menon-Sen, Abigail, Ben Morrow, Chas. J. Owens IV, Chris 'BinGOs' Williams, Craig A. Berry,
+David Golden, David Mitchell, Father Chrysostomos, Fingle Nark, Florian Ragwitz, George Greer,
+Grant McLean, H.Merijn Brand, Ian Goodacre, Jan Dubois, Jerry D. Hedden, Jesse Vincent, Karl Williamson,
+Lubomir Rintel, Marty Pauley, Moritz Lenz, Nicholas Clark, Nicolas Kaiser, Niko Tyni, Peter John Acklam,
+Rafael Garcia-Suarez, Shlomi Fish, Steffen Mueller, Steve Hay, Tatsuhiko Miyagawa, Tim Bunce, Todd Rinaldo,
+Tom Christiansen, Tom Hukins, Tony Cook, Yves Orton, Zefram and brian d foy
+
+Many of the changes included in this version originated in the CPAN modules included in
+Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.
 
 =head1 Reporting Bugs