This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for e15ca23a92
[perl5.git] / pod / perldelta.pod
index fc3e663..0fcaf03 100644 (file)
@@ -1,5 +1,11 @@
 =encoding utf8
 
+=for comment
+To do:
+3f40aba3 Merge branch 'ebcdic' into blead
+df8c7dee Fix segfault in filehandle duplication
+b66f3475 Fix PerlIO_get_cnt and friends
+
 =head1 NAME
 
 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
@@ -27,6 +33,27 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
+=head2 rand() now uses a consistent random number generator
+
+Previously perl would use a platform specific random number generator,
+varying between the libc C<rand()>, C<random()> or C<drand48()>.
+
+This meant that the quality of perl's random numbers would vary from
+platform to platform, from the 15 bits of C<rand()> on Win32 to
+48-bits on POSIX platforms such as Linux with C<drand48()>.
+
+Perl now uses its own internal C<drand48()> implementation on all
+platforms.  [perl #115928]
+
+=head2 Better 64-bit support
+
+On 64-bit platforms, the internal array functions now use 64-bit offsets,
+allowing Perl arrays to hold more than 2**31 elements, if you have the
+memory available.
+
+The regular expression engine now supporst strings longer than 2**31
+characters.  [perl #112790, #116907]
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -125,6 +152,13 @@ XXX
 
 =item *
 
+L<autodie> has been upgraded from version 2.20 to 2.21.
+
+Numerous improvements have been made, many speed-related.  See the F<Changes>
+file in the CPAN distribution for full details.
+
+=item *
+
 L<B> has been upgraded from version 1.45 to 1.46.
 
 The fix for [perl #118525] introduced a regression in the behaviour of
@@ -152,6 +186,11 @@ internally represented.
 
 =item *
 
+C<Carp> now takes care not to clobber the status variables C<$!> and
+C<$^E>.
+
+=item *
+
 C<Carp> now won't vivify the C<overload::StrVal> glob or subroutine or the
 C<overload> stash.
 
@@ -170,6 +209,19 @@ expects C<Carp::Heavy> to provide subroutines.
 
 =item *
 
+L<charnames> has been upgraded from version 1.38 to 1.39.
+
+This module now works on EBCDIC platforms.
+
+=item *
+
+L<CPAN::Meta> has been upgraded from version 2.132140 to 2.132510.
+
+No changes have been made to the installed code other than the version bump to
+keep in sync with the latest CPAN release.
+
+=item *
+
 L<CPAN::Meta::Requirements> has been upgraded from version 2.122 to 2.123.
 
 No changes have been made to the installed code other than the version bump to
@@ -182,6 +234,8 @@ L<Data::Dumper> has been upgraded from version 2.148 to 2.149.
 This upgrade is part of a larger change to make the array interface 64-bit safe
 by using SSize_t instead of I32 for array indices.
 
+In addition, an EBCDIC fix has been applied.
+
 =item *
 
 L<Devel::Peek> has been upgraded from version 1.13 to 1.14.
@@ -190,6 +244,9 @@ This upgrade is part of a larger change to preserve referential identity when
 passing C<undef> to a subroutine by using NULL rather than &PL_sv_undef for
 nonexistent array elements.
 
+In addition, C<Dump> with no args was broken in Perl 5.19.3, but has now been
+fixed.
+
 =item *
 
 L<DynaLoader> has been upgraded from version 1.19 to 1.20.
@@ -197,28 +254,55 @@ L<DynaLoader> has been upgraded from version 1.19 to 1.20.
 The documentation now makes it clear, as has always been the case, that
 C<dl_unload_file> is only called automatically to unload all loaded shared
 objects if the perl interpreter was built with the C macro
-DL_UNLOAD_ALL_AT_EXIT defined.
+DL_UNLOAD_ALL_AT_EXIT defined.  Support for GNU DLD has also been removed.
 
 =item *
 
-L<Encode> has been upgraded from version 2.52 to 2.54.
+L<Encode> has been upgraded from version 2.52 to 2.55.
 
 An erroneous early return in C<decode_utf8> has been removed, and a bug in
-C<_utf8_on> under COW has been fixed.
+C<_utf8_on> under COW has been fixed.  Encode also now uses L<parent> rather
+than L<base> throughout.
+
+=item *
+
+L<Exporter> has been upgraded from version 5.69 to 5.70.
+
+A number of typos have been corrected in the documentation.
 
 =item *
 
-L<ExtUtils::MakeMaker> has been upgraded from version 6.72 to 6.74.
+L<ExtUtils::CBuilder> has been upgraded from version 0.280205 to 0.280212.
+
+No changes have been made to the installed code other than the version bump to
+keep in sync with the latest CPAN release.
+
+=item *
+
+L<ExtUtils::Command> has been upgraded from version 1.17 to 1.18.
+
+No changes have been made to the installed code other than the version bump to
+keep in sync with the latest CPAN release.
+
+=item *
+
+L<ExtUtils::MakeMaker> has been upgraded from version 6.72 to 6.76.
 
 Numerous updates and bug fixes are incorporated.  See the F<Changes> file for
 full details.
 
 =item *
 
-L<ExtUtils::ParseXS> has been upgraded from version 3.21 to 3.22.
+L<ExtUtils::ParseXS> has been upgraded from version 3.21 to 3.23.
 
-No changes have been made other than the version bump to keep in sync with the
-latest CPAN release.
+Unquoted "here-doc" markers for typemaps can now be optionally followed by
+a semicolon, just like quoted markers.  [perl #119761]
+
+=item *
+
+L<File::Find> has been upgraded from version 1.24 to 1.25.
+
+Better diagnostics are now provided in the case of a failed C<chdir>.
 
 =item *
 
@@ -229,6 +313,27 @@ supplied pattern has an internal NUL (C<"\0">) character.
 
 =item *
 
+L<HTTP::Tiny> has been upgraded from version 0.034 to 0.035.
+
+Encoded data from C<post_form> now preserves term order if data is provided as
+an array reference.  (They are still sorted for consistency if provided as a
+hash reference.)
+
+=item *
+
+L<I18N::LangTags> has been upgraded from version 0.39 to 0.40.
+
+Bosnian has now joined Croatian and Serbian in the lists of mutually
+intelligible Slavic languages. [perl #72594]
+
+=item *
+
+L<IO> has been upgraded from version 1.28 to 1.29.
+
+A minor internals-only change has been made to the XS code.
+
+=item *
+
 L<IPC::Open3> has been upgraded from version 1.15 to 1.16.
 
 This upgrade is part of a larger change to preserve referential identity when
@@ -237,6 +342,13 @@ nonexistent array elements.
 
 =item *
 
+L<Locale::Codes> has been upgraded from version 3.26 to 3.27.
+
+New codes have been added and the (deprecated) set of FIPS-10 country codes has
+been removed.
+
+=item *
+
 L<Math::BigInt> has been upgraded from version 1.9992 to 1.9993.
 
 Cleaned up the L<Math::BigInt> and L<Math::BigFloat> documentation to be more
@@ -265,10 +377,11 @@ C<requires> has been made more robust. [cpan #83728]
 
 =item *
 
-L<Module::Metadata> has been upgraded from version 1.000014 to 1.000016.
+L<Module::Metadata> has been upgraded from version 1.000014 to 1.000018.
 
 The module's DESCRIPTION has been re-worded regarding safety/security to
-satisfy CVE-2013-1437.
+satisfy CVE-2013-1437.  Also, versions are now detainted if needed. [cpan
+#88576]
 
 =item *
 
@@ -286,12 +399,27 @@ keep in sync with the latest CPAN release.
 
 =item *
 
-L<Perl::OSType> has been upgraded from version 1.003 to 1.004.
+L<Parse::CPAN::Meta> has been upgraded from version 1.4405 to 1.4407.
+
+No changes have been made to the installed code other than the version bump to
+keep in sync with the latest CPAN release.
+
+=item *
+
+L<Perl::OSType> has been upgraded from version 1.003 to 1.005.
 
 The Unix OSType 'bitrig' has been added.
 
 =item *
 
+L<perlfaq> has been upgraded from version 5.0150043 to 5.0150044.
+
+The use of C<gensym> in a number of examples has been removed, the use of C<&>
+in subroutine calls is now clarified and several new questions have been
+answered.
+
+=item *
+
 L<re> has been upgraded from version 0.25 to 0.26.
 
 A function signature has been corrected in the XS implementation.
@@ -319,6 +447,18 @@ nonexistent array elements.
 
 =item *
 
+L<Term::ReadLine> has been upgraded from version 1.10 to 1.14.
+
+Term::ReadLine::EditLine support has been added.
+
+=item *
+
+L<Time::Piece> has been upgraded from version 1.22 to 1.23.
+
+Day of year parsing (like "%y%j") has been fixed.
+
+=item *
+
 L<Unicode::Collate> has been upgraded from version 0.98 to 0.99.
 
 By default, out-of-range values are replaced with C<U+FFFD> (REPLACEMENT
@@ -328,6 +468,12 @@ overridden.
 
 =item *
 
+L<Unicode::UCD> has been upgraded from version 0.53 to 0.54.
+
+This module now works on EBCDIC platforms.
+
+=item *
+
 L<version> has been upgraded from version 0.9903 to 0.9904.
 
 No changes have been made to the installed code other than the version bump to
@@ -431,7 +577,25 @@ XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =item *
 
-XXX Describe change here
+Warnings and errors from the regexp engine are now UTF-8 clean
+
+=item *
+
+The "Unknown switch condition" error message has some slight changes.
+This error triggers when there is an unknown condition in a (?(foo))
+conditional; The error message used to read:
+
+    Unknown switch condition (?(%s in regex;
+
+But what %s could be was mostly up to luck; For (?(foobar)), you
+might've seen "fo" or "f".  For Unicode characters, you'd generally
+get a corrupted string.
+The message was changed to read:
+
+    Unknown switch condition (?(...)) in regex;
+
+And additionally, the '<-- HERE' marker in the error will now point
+to the correct spot in the regex.
 
 =back
 
@@ -531,7 +695,7 @@ source tree.
 
 =item Bitrig
 
-Compile support has been added for Bitrig, a fork of OpenBSD
+Compile support has been added for Bitrig, a fork of OpenBSD.
 
 =back
 
@@ -539,11 +703,16 @@ Compile support has been added for Bitrig, a fork of OpenBSD
 
 XXX List any platforms that this version of perl no longer compiles on.
 
+Configure hints and conditional code for several very old platforms
+has been removed.  We have not received reports for these in many years,
+typically not since perl-5.6.0.
+
 =over 4
 
-=item XXX-some-platform
+=item AT&T 3b1
 
-XXX
+Configure support for the 3b1, also known as the AT&T Unix PC (and the
+similar AT&T 7300), has been removed.
 
 =back
 
@@ -583,6 +752,14 @@ C<${^POSTMATCH>.  It uses slightly less memory, avoids string comparisons
 and numeric conversions during lookup, and uses 23 fewer lines of C.  This
 change should not affect any external code.
 
+=item *
+
+Arrays now use NULL internally to represent unused slots, instead of
+C<&PL_sv_undef>.  C<&PL_sv_undef> is no longer treated as a special value,
+so C<av_store(av, 0, &PL_sv_undef)> will cause element 0 of that array to
+hold a read-only undefined scalar.  C<$array[0] = anything> will croak and
+C<\$array[0]> will compare equal to C<\undef>.
+
 =back
 
 =head1 Selected Bug Fixes
@@ -598,6 +775,160 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
 The value of C<$^E> is now saved across signal handlers on Win32. [perl #85104]
 
+=item *
+
+A lexical filehandle (as in C<open my $fh...>) is usually given a name
+based on the current package and the name of the variable; e.g.,
+"main::$fh".  Under recursion, the filehandle was losing the "$fh" part of
+the name.  This has been fixed.
+
+=item *
+
+Perl 5.19.3 accidentally extended the previous bug to all closures, even
+when not called recursively; i.e., lexical handles in closure would always
+be called "main::" or "MyPackage::" etc.  This has been fixed.
+
+=item *
+
+Uninitialized values returned by XSUBs are no longer exempt from
+uninitialized warnings.  [perl #118693]
+
+=item *
+
+C<elsif ("")> no longer erroneous produces a warning about void context.
+[perl #118753]
+
+=item *
+
+Passing C<undef> to a subroutine now causes @_ to contain the same read-only undefined scalar that C<undef> returns.  Furthermore, C<exists $_[0]> will now return true if C<undef> was the first argument.
+[perl #7508, #109726].
+
+=item *
+
+Passing a nonexistent array element to a subroutine does not usually
+autovivify it unless the subroutine modifies its argument.  This did not
+work correctly with negative indices and with nonexistent elements within
+the array.  The element would be vivified immediately.  The delayed
+vivification has been extended to work with those.  [perl #118691]
+
+=item *
+
+Assigning references or globs to the scalar returned by C<$#foo> after the
+@foo array has been freed no longer causes assertion failures on debugging
+builds and memory leaks on regular builds.
+
+=item *
+
+Perl 5.19.2 threw line numbers off after some cases of line breaks
+following keywords, such as
+
+   1 unless
+   1;
+
+This has been fixed.  [perl #118931]
+
+=item *
+
+On 64-bit platforms, large ranges like 1..1000000000000 no longer crash,
+but eat up all your memory instead.  [perl #119161]
+
+=item *
+
+C<__DATA__> now puts the C<DATA> handle in the right package, even if the
+current package has been renamed through glob assignment.
+
+=item *
+
+The string position set by C<pos> could shift if the string changed
+representation internally to or from utf8.  This could happen, e.g., with
+references to objects with string overloading.
+
+=item *
+
+Taking references to the return values of two C<pos> calls with the same
+argument, and then assigning a reference to one and C<undef> to the other,
+could result in assertion failures or memory leaks.
+
+=item *
+
+Elements of C<@-> and C<@+> now update correctly when they refer to
+nonexistent captures.  Previously, a referenced element (C<$ref = \$-[1]>) 
+could refer to the wrong match after subsequent matches.
+
+=item *
+
+When C<die>, C<last>, C<next>, C<redo>, C<goto> and C<exit> unwind the
+scope, it is possible for DESTROY recursively to call a subroutine or
+format that is currently being exited.  It that case, sometimes the lexical
+variables inside the sub would start out having values from the outer call,
+instead of being undefined as they should.  This has been fixed.
+[perl #119311].
+
+=item *
+
+C<${^MPEN>} is no longer treated as a synonym for C<${^MATCH}>.
+
+=item *
+
+Perl now tries a little harder to return the correct line number in
+C<(caller)[2]>.  [perl #115768]
+
+=item *
+
+Line numbers inside multiline quote-like operators are now reported correctly.  [perl #3643]
+
+=item *
+
+C<#line> directives inside code embedded in quote-like operators are now respected.
+
+=item *
+
+Line numbers are now correct inside the second here-doc when two here-doc
+markers occur on the same line.
+
+=item *
+
+Starting with Perl 5.12, line numbers were off by one if the B<-d> switch
+was used on the #! line.  Now they are correct.
+
+=item *
+
+Perl 5.19.2 inadvertently stopped some lines of code from being available
+to the debugger if C<< => >> occurred at the beginning of a line and the
+previous line ended with a keyword.  This is now fixed.
+
+=item *
+
+Perl 5.19.2 allowed the PERL5DB environment variable to contain multiple
+lines of code.  But those lines were not made available to the debugger.
+Now the are all stuffed into line number 0, accessible via C<$dbline[0]>
+in the debugger.
+
+=item *
+
+An optimisation in Perl 5.18 made incorrect assumptions causing a bad
+interaction with the L<Devel::CallParser> CPAN module.  If the module was
+loaded, then lexical variables declared in separate statements following a C<my(...)> list might fail to be cleared on scope exit.
+
+=item *
+
+C<&xsub> and C<goto &xsub> calls now allow the called subroutine to
+autovivify elements of @_.
+
+=item *
+
+C<&xsub> and C<goto &xsub> no longer crash if C<*_> has been undefined and
+has no ARRAY entry (i.e., @_ does not exist).
+
+=item *
+
+C<&xsub> and C<goto &xsub> now work with tied @_.
+
+=item *
+
+Overlong identifiers no longer cause a buffer overflow (and a crash).  They
+started doing so in Perl 5.18.
+
 =back
 
 =head1 Known Problems