xref: /openbsd-src/gnu/usr.bin/perl/pod/perl5200delta.pod (revision e068048151d29f2562a32185e21a8ba885482260)
16fb12b70Safresh1=encoding utf8
26fb12b70Safresh1
36fb12b70Safresh1=head1 NAME
46fb12b70Safresh1
56fb12b70Safresh1perl5200delta - what is new for perl v5.20.0
66fb12b70Safresh1
76fb12b70Safresh1=head1 DESCRIPTION
86fb12b70Safresh1
96fb12b70Safresh1This document describes differences between the 5.18.0 release and the
106fb12b70Safresh15.20.0 release.
116fb12b70Safresh1
126fb12b70Safresh1If you are upgrading from an earlier release such as 5.16.0, first read
136fb12b70Safresh1L<perl5180delta>, which describes differences between 5.16.0 and 5.18.0.
146fb12b70Safresh1
156fb12b70Safresh1=head1 Core Enhancements
166fb12b70Safresh1
176fb12b70Safresh1=head2 Experimental Subroutine signatures
186fb12b70Safresh1
196fb12b70Safresh1Declarative syntax to unwrap argument list into lexical variables.
206fb12b70Safresh1C<sub foo ($a,$b) {...}> checks the number of arguments and puts the
216fb12b70Safresh1arguments into lexical variables.  Signatures are not equivalent to
226fb12b70Safresh1the existing idiom of C<sub foo { my($a,$b) = @_; ... }>.  Signatures
236fb12b70Safresh1are only available by enabling a non-default feature, and generate
246fb12b70Safresh1warnings about being experimental.  The syntactic clash with
256fb12b70Safresh1prototypes is managed by disabling the short prototype syntax when
266fb12b70Safresh1signatures are enabled.
276fb12b70Safresh1
286fb12b70Safresh1See L<perlsub/Signatures> for details.
296fb12b70Safresh1
306fb12b70Safresh1=head2 C<sub>s now take a C<prototype> attribute
316fb12b70Safresh1
326fb12b70Safresh1When declaring or defining a C<sub>, the prototype can now be specified inside
336fb12b70Safresh1of a C<prototype> attribute instead of in parens following the name.
346fb12b70Safresh1
356fb12b70Safresh1For example, C<sub foo($$){}> could be rewritten as
366fb12b70Safresh1C<sub foo : prototype($$){}>.
376fb12b70Safresh1
386fb12b70Safresh1=head2 More consistent prototype parsing
396fb12b70Safresh1
406fb12b70Safresh1Multiple semicolons in subroutine prototypes have long been tolerated and
416fb12b70Safresh1treated as a single semicolon.  There was one case where this did not
426fb12b70Safresh1happen.  A subroutine whose prototype begins with "*" or ";*" can affect
436fb12b70Safresh1whether a bareword is considered a method name or sub call.  This now
446fb12b70Safresh1applies also to ";;;*".
456fb12b70Safresh1
466fb12b70Safresh1Whitespace has long been allowed inside subroutine prototypes, so
476fb12b70Safresh1C<sub( $ $ )> is equivalent to C<sub($$)>, but until now it was stripped
486fb12b70Safresh1when the subroutine was parsed.  Hence, whitespace was I<not> allowed in
496fb12b70Safresh1prototypes set by C<Scalar::Util::set_prototype>.  Now it is permitted,
506fb12b70Safresh1and the parser no longer strips whitespace.  This means
516fb12b70Safresh1C<prototype &mysub> returns the original prototype, whitespace and all.
526fb12b70Safresh1
536fb12b70Safresh1=head2 C<rand> now uses a consistent random number generator
546fb12b70Safresh1
556fb12b70Safresh1Previously perl would use a platform specific random number generator, varying
566fb12b70Safresh1between the libc rand(), random() or drand48().
576fb12b70Safresh1
586fb12b70Safresh1This meant that the quality of perl's random numbers would vary from platform
596fb12b70Safresh1to platform, from the 15 bits of rand() on Windows to 48-bits on POSIX
606fb12b70Safresh1platforms such as Linux with drand48().
616fb12b70Safresh1
626fb12b70Safresh1Perl now uses its own internal drand48() implementation on all platforms.  This
636fb12b70Safresh1does not make perl's C<rand> cryptographically secure.  [perl #115928]
646fb12b70Safresh1
656fb12b70Safresh1=head2 New slice syntax
666fb12b70Safresh1
676fb12b70Safresh1The new C<%hash{...}> and C<%array[...]> syntax returns a list of key/value (or
686fb12b70Safresh1index/value) pairs.  See L<perldata/"Key/Value Hash Slices">.
696fb12b70Safresh1
706fb12b70Safresh1=head2 Experimental Postfix Dereferencing
716fb12b70Safresh1
726fb12b70Safresh1When the C<postderef> feature is in effect, the following syntactical
736fb12b70Safresh1equivalencies are set up:
746fb12b70Safresh1
756fb12b70Safresh1  $sref->$*;  # same as ${ $sref }  # interpolates
766fb12b70Safresh1  $aref->@*;  # same as @{ $aref }  # interpolates
776fb12b70Safresh1  $href->%*;  # same as %{ $href }
786fb12b70Safresh1  $cref->&*;  # same as &{ $cref }
796fb12b70Safresh1  $gref->**;  # same as *{ $gref }
806fb12b70Safresh1
816fb12b70Safresh1  $aref->$#*; # same as $#{ $aref }
826fb12b70Safresh1
836fb12b70Safresh1  $gref->*{ $slot }; # same as *{ $gref }{ $slot }
846fb12b70Safresh1
856fb12b70Safresh1  $aref->@[ ... ];  # same as @$aref[ ... ]  # interpolates
866fb12b70Safresh1  $href->@{ ... };  # same as @$href{ ... }  # interpolates
876fb12b70Safresh1  $aref->%[ ... ];  # same as %$aref[ ... ]
886fb12b70Safresh1  $href->%{ ... };  # same as %$href{ ... }
896fb12b70Safresh1
906fb12b70Safresh1Those marked as interpolating only interpolate if the associated
916fb12b70Safresh1C<postderef_qq> feature is also enabled.  This feature is B<experimental> and
926fb12b70Safresh1will trigger C<experimental::postderef>-category warnings when used, unless
936fb12b70Safresh1they are suppressed.
946fb12b70Safresh1
956fb12b70Safresh1For more information, consult L<the Postfix Dereference Syntax section of
966fb12b70Safresh1perlref|perlref/Postfix Dereference Syntax>.
976fb12b70Safresh1
986fb12b70Safresh1=head2 Unicode 6.3 now supported
996fb12b70Safresh1
1006fb12b70Safresh1Perl now supports and is shipped with Unicode 6.3 (though Perl may be
1016fb12b70Safresh1recompiled with any previous Unicode release as well).  A detailed list of
1026fb12b70Safresh1Unicode 6.3 changes is at L<http://www.unicode.org/versions/Unicode6.3.0/>.
1036fb12b70Safresh1
1046fb12b70Safresh1=head2 New C<\p{Unicode}> regular expression pattern property
1056fb12b70Safresh1
1066fb12b70Safresh1This is a synonym for C<\p{Any}> and matches the set of Unicode-defined
1076fb12b70Safresh1code points 0 - 0x10FFFF.
1086fb12b70Safresh1
1096fb12b70Safresh1=head2 Better 64-bit support
1106fb12b70Safresh1
1116fb12b70Safresh1On 64-bit platforms, the internal array functions now use 64-bit offsets,
1126fb12b70Safresh1allowing Perl arrays to hold more than 2**31 elements, if you have the memory
1136fb12b70Safresh1available.
1146fb12b70Safresh1
1156fb12b70Safresh1The regular expression engine now supports strings longer than 2**31
1166fb12b70Safresh1characters.  [perl #112790, #116907]
1176fb12b70Safresh1
1186fb12b70Safresh1The functions PerlIO_get_bufsiz, PerlIO_get_cnt, PerlIO_set_cnt and
1196fb12b70Safresh1PerlIO_set_ptrcnt now have SSize_t, rather than int, return values and
1206fb12b70Safresh1parameters.
1216fb12b70Safresh1
1226fb12b70Safresh1=head2 C<S<use locale>> now works on UTF-8 locales
1236fb12b70Safresh1
1246fb12b70Safresh1Until this release, only single-byte locales, such as the ISO 8859
1256fb12b70Safresh1series were supported.  Now, the increasingly common multi-byte UTF-8
1266fb12b70Safresh1locales are also supported.  A UTF-8 locale is one in which the
1276fb12b70Safresh1character set is Unicode and the encoding is UTF-8.  The POSIX
1286fb12b70Safresh1C<LC_CTYPE> category operations (case changing (like C<lc()>, C<"\U">),
1296fb12b70Safresh1and character classification (C<\w>, C<\D>, C<qr/[[:punct:]]/>)) under
1306fb12b70Safresh1such a locale work just as if not under locale, but instead as if under
1316fb12b70Safresh1C<S<use feature 'unicode_strings'>>, except taint rules are followed.
1326fb12b70Safresh1Sorting remains by code point order in this release.  [perl #56820].
1336fb12b70Safresh1
1346fb12b70Safresh1=head2 C<S<use locale>> now compiles on systems without locale ability
1356fb12b70Safresh1
1366fb12b70Safresh1Previously doing this caused the program to not compile.  Within its
1376fb12b70Safresh1scope the program behaves as if in the "C" locale.  Thus programs
1386fb12b70Safresh1written for platforms that support locales can run on locale-less
1396fb12b70Safresh1platforms without change.  Attempts to change the locale away from the
1406fb12b70Safresh1"C" locale will, of course, fail.
1416fb12b70Safresh1
1426fb12b70Safresh1=head2 More locale initialization fallback options
1436fb12b70Safresh1
1446fb12b70Safresh1If there was an error with locales during Perl start-up, it immediately
1456fb12b70Safresh1gave up and tried to use the C<"C"> locale.  Now it first tries using
1466fb12b70Safresh1other locales given by the environment variables, as detailed in
1476fb12b70Safresh1L<perllocale/ENVIRONMENT>.  For example, if C<LC_ALL> and C<LANG> are
1486fb12b70Safresh1both set, and using the C<LC_ALL> locale fails, Perl will now try the
1496fb12b70Safresh1C<LANG> locale, and only if that fails, will it fall back to C<"C">.  On
1506fb12b70Safresh1Windows machines, Perl will try, ahead of using C<"C">, the system
1516fb12b70Safresh1default locale if all the locales given by environment variables fail.
1526fb12b70Safresh1
1536fb12b70Safresh1=head2 C<-DL> runtime option now added for tracing locale setting
1546fb12b70Safresh1
1556fb12b70Safresh1This is designed for Perl core developers to aid in field debugging bugs
1566fb12b70Safresh1regarding locales.
1576fb12b70Safresh1
1586fb12b70Safresh1=head2 B<-F> now implies B<-a> and B<-a> implies B<-n>
1596fb12b70Safresh1
1606fb12b70Safresh1Previously B<-F> without B<-a> was a no-op, and B<-a> without B<-n> or B<-p>
1616fb12b70Safresh1was a no-op, with this change, if you supply B<-F> then both B<-a> and B<-n>
1626fb12b70Safresh1are implied and if you supply B<-a> then B<-n> is implied.
1636fb12b70Safresh1
1646fb12b70Safresh1You can still use B<-p> for its extra behaviour. [perl #116190]
1656fb12b70Safresh1
1666fb12b70Safresh1=head2 $a and $b warnings exemption
1676fb12b70Safresh1
1686fb12b70Safresh1The special variables $a and $b, used in C<sort>, are now exempt from "used
1696fb12b70Safresh1once" warnings, even where C<sort> is not used.  This makes it easier for
1706fb12b70Safresh1CPAN modules to provide functions using $a and $b for similar purposes.
1716fb12b70Safresh1[perl #120462]
1726fb12b70Safresh1
1736fb12b70Safresh1=head1 Security
1746fb12b70Safresh1
1756fb12b70Safresh1=head2 Avoid possible read of free()d memory during parsing
1766fb12b70Safresh1
1776fb12b70Safresh1It was possible that free()d memory could be read during parsing in the unusual
1786fb12b70Safresh1circumstance of the Perl program ending with a heredoc and the last line of the
1796fb12b70Safresh1file on disk having no terminating newline character.  This has now been fixed.
1806fb12b70Safresh1
1816fb12b70Safresh1=head1 Incompatible Changes
1826fb12b70Safresh1
1836fb12b70Safresh1=head2 C<do> can no longer be used to call subroutines
1846fb12b70Safresh1
1856fb12b70Safresh1The C<do SUBROUTINE(LIST)> form has resulted in a deprecation warning
1866fb12b70Safresh1since Perl v5.0.0, and is now a syntax error.
1876fb12b70Safresh1
1886fb12b70Safresh1=head2 Quote-like escape changes
1896fb12b70Safresh1
1906fb12b70Safresh1The character after C<\c> in a double-quoted string ("..." or qq(...))
1916fb12b70Safresh1or regular expression must now be a printable character and may not be
1926fb12b70Safresh1C<{>.
1936fb12b70Safresh1
1946fb12b70Safresh1A literal C<{> after C<\B> or C<\b> is now fatal.
1956fb12b70Safresh1
1966fb12b70Safresh1These were deprecated in perl v5.14.0.
1976fb12b70Safresh1
1986fb12b70Safresh1=head2 Tainting happens under more circumstances; now conforms to documentation
1996fb12b70Safresh1
2006fb12b70Safresh1This affects regular expression matching and changing the case of a
2016fb12b70Safresh1string (C<lc>, C<"\U">, I<etc>.) within the scope of C<use locale>.
2026fb12b70Safresh1The result is now tainted based on the operation, no matter what the
2036fb12b70Safresh1contents of the string were, as the documentation (L<perlsec>,
2046fb12b70Safresh1L<perllocale/SECURITY>) indicates it should.  Previously, for the case
2056fb12b70Safresh1change operation, if the string contained no characters whose case
2066fb12b70Safresh1change could be affected by the locale, the result would not be tainted.
2076fb12b70Safresh1For example, the result of C<uc()> on an empty string or one containing
2086fb12b70Safresh1only above-Latin1 code points is now tainted, and wasn't before.  This
2096fb12b70Safresh1leads to more consistent tainting results.  Regular expression patterns
2106fb12b70Safresh1taint their non-binary results (like C<$&>, C<$2>) if and only if the
2116fb12b70Safresh1pattern contains elements whose matching depends on the current
2126fb12b70Safresh1(potentially tainted) locale.  Like the case changing functions, the
2136fb12b70Safresh1actual contents of the string being matched now do not matter, whereas
2146fb12b70Safresh1formerly it did.  For example, if the pattern contains a C<\w>, the
2156fb12b70Safresh1results will be tainted even if the match did not have to use that
2166fb12b70Safresh1portion of the pattern to succeed or fail, because what a C<\w> matches
2176fb12b70Safresh1depends on locale.  However, for example, a C<.> in a pattern will not
2186fb12b70Safresh1enable tainting, because the dot matches any single character, and what
2196fb12b70Safresh1the current locale is doesn't change in any way what matches and what
2206fb12b70Safresh1doesn't.
2216fb12b70Safresh1
2226fb12b70Safresh1=head2 C<\p{}>, C<\P{}> matching has changed for non-Unicode code
2236fb12b70Safresh1points.
2246fb12b70Safresh1
2256fb12b70Safresh1C<\p{}> and C<\P{}> are defined by Unicode only on Unicode-defined code
2266fb12b70Safresh1points (C<U+0000> through C<U+10FFFF>).  Their behavior on matching
2276fb12b70Safresh1these legal Unicode code points is unchanged, but there are changes for
2286fb12b70Safresh1code points C<0x110000> and above.  Previously, Perl treated the result
2296fb12b70Safresh1of matching C<\p{}> and C<\P{}> against these as C<undef>, which
2306fb12b70Safresh1translates into "false".  For C<\P{}>, this was then complemented into
2316fb12b70Safresh1"true".  A warning was supposed to be raised when this happened.
2326fb12b70Safresh1However, various optimizations could prevent the warning, and the
2336fb12b70Safresh1results were often counter-intuitive, with both a match and its seeming
2346fb12b70Safresh1complement being false.  Now all non-Unicode code points are treated as
2356fb12b70Safresh1typical unassigned Unicode code points.  This generally is more
2366fb12b70Safresh1Do-What-I-Mean.  A warning is raised only if the results are arguably
2376fb12b70Safresh1different from a strict Unicode approach, and from what Perl used to do.
2386fb12b70Safresh1Code that needs to be strictly Unicode compliant can make this warning
2396fb12b70Safresh1fatal, and then Perl always raises the warning.
2406fb12b70Safresh1
2416fb12b70Safresh1Details are in L<perlunicode/Beyond Unicode code points>.
2426fb12b70Safresh1
2436fb12b70Safresh1=head2 C<\p{All}> has been expanded to match all possible code points
2446fb12b70Safresh1
2456fb12b70Safresh1The Perl-defined regular expression pattern element C<\p{All}>, unused
2466fb12b70Safresh1on CPAN, used to match just the Unicode code points; now it matches all
2476fb12b70Safresh1possible code points; that is, it is equivalent to C<qr/./s>.  Thus
2486fb12b70Safresh1C<\p{All}> is no longer synonymous with C<\p{Any}>, which continues to
2496fb12b70Safresh1match just the Unicode code points, as Unicode says it should.
2506fb12b70Safresh1
2516fb12b70Safresh1=head2 Data::Dumper's output may change
2526fb12b70Safresh1
2536fb12b70Safresh1Depending on the data structures dumped and the settings set for
2546fb12b70Safresh1Data::Dumper, the dumped output may have changed from previous
2556fb12b70Safresh1versions.
2566fb12b70Safresh1
2576fb12b70Safresh1If you have tests that depend on the exact output of Data::Dumper,
2586fb12b70Safresh1they may fail.
2596fb12b70Safresh1
2606fb12b70Safresh1To avoid this problem in your code, test against the data structure
2616fb12b70Safresh1from evaluating the dumped structure, instead of the dump itself.
2626fb12b70Safresh1
2636fb12b70Safresh1=head2 Locale decimal point character no longer leaks outside of S<C<use locale>> scope
2646fb12b70Safresh1
2656fb12b70Safresh1This is actually a bug fix, but some code has come to rely on the bug
2666fb12b70Safresh1being present, so this change is listed here.  The current locale that
2676fb12b70Safresh1the program is running under is not supposed to be visible to Perl code
2686fb12b70Safresh1except within the scope of a S<C<use locale>>.  However, until now under
2696fb12b70Safresh1certain circumstances, the character used for a decimal point (often a
2706fb12b70Safresh1comma) leaked outside the scope.  If your code is affected by this
2716fb12b70Safresh1change, simply add a S<C<use locale>>.
2726fb12b70Safresh1
2736fb12b70Safresh1=head2 Assignments of Windows sockets error codes to $! now prefer F<errno.h> values over WSAGetLastError() values
2746fb12b70Safresh1
2756fb12b70Safresh1In previous versions of Perl, Windows sockets error codes as returned by
2766fb12b70Safresh1WSAGetLastError() were assigned to $!, and some constants such as ECONNABORTED,
2776fb12b70Safresh1not in F<errno.h> in VC++ (or the various Windows ports of gcc) were defined to
2786fb12b70Safresh1corresponding WSAE* values to allow $! to be tested against the E* constants
2796fb12b70Safresh1exported by L<Errno> and L<POSIX>.
2806fb12b70Safresh1
2816fb12b70Safresh1This worked well until VC++ 2010 and later, which introduced new E* constants
2826fb12b70Safresh1with values E<gt> 100 into F<errno.h>, including some being (re)defined by perl
2836fb12b70Safresh1to WSAE* values.  That caused problems when linking XS code against other
2846fb12b70Safresh1libraries which used the original definitions of F<errno.h> constants.
2856fb12b70Safresh1
2866fb12b70Safresh1To avoid this incompatibility, perl now maps WSAE* error codes to E* values
2876fb12b70Safresh1where possible, and assigns those values to $!.  The E* constants exported by
2886fb12b70Safresh1L<Errno> and L<POSIX> are updated to match so that testing $! against them,
2896fb12b70Safresh1wherever previously possible, will continue to work as expected, and all E*
2906fb12b70Safresh1constants found in F<errno.h> are now exported from those modules with their
2916fb12b70Safresh1original F<errno.h> values.
2926fb12b70Safresh1
2936fb12b70Safresh1In order to avoid breakage in existing Perl code which assigns WSAE* values to
2946fb12b70Safresh1$!, perl now intercepts the assignment and performs the same mapping to E*
2956fb12b70Safresh1values as it uses internally when assigning to $! itself.
2966fb12b70Safresh1
2976fb12b70Safresh1However, one backwards-incompatibility remains: existing Perl code which
2986fb12b70Safresh1compares $! against the numeric values of the WSAE* error codes that were
2996fb12b70Safresh1previously assigned to $! will now be broken in those cases where a
3006fb12b70Safresh1corresponding E* value has been assigned instead.  This is only an issue for
3016fb12b70Safresh1those E* values E<lt> 100, which were always exported from L<Errno> and
3026fb12b70Safresh1L<POSIX> with their original F<errno.h> values, and therefore could not be used
3036fb12b70Safresh1for WSAE* error code tests (e.g. WSAEINVAL is 10022, but the corresponding
3046fb12b70Safresh1EINVAL is 22).  (E* values E<gt> 100, if present, were redefined to WSAE*
3056fb12b70Safresh1values anyway, so compatibility can be achieved by using the E* constants,
3066fb12b70Safresh1which will work both before and after this change, albeit using different
3076fb12b70Safresh1numeric values under the hood.)
3086fb12b70Safresh1
3096fb12b70Safresh1=head2 Functions C<PerlIO_vsprintf> and C<PerlIO_sprintf> have been removed
3106fb12b70Safresh1
3116fb12b70Safresh1These two functions, undocumented, unused in CPAN, and problematic, have been
3126fb12b70Safresh1removed.
3136fb12b70Safresh1
3146fb12b70Safresh1=head1 Deprecations
3156fb12b70Safresh1
3166fb12b70Safresh1=head2 The C</\C/> character class
3176fb12b70Safresh1
3186fb12b70Safresh1The C</\C/> regular expression character class is deprecated. From perl
3196fb12b70Safresh15.22 onwards it will generate a warning, and from perl 5.24 onwards it
3206fb12b70Safresh1will be a regular expression compiler error. If you need to examine the
3216fb12b70Safresh1individual bytes that make up a UTF8-encoded character, then use
3226fb12b70Safresh1C<utf8::encode()> on the string (or a copy) first.
3236fb12b70Safresh1
3246fb12b70Safresh1=head2 Literal control characters in variable names
3256fb12b70Safresh1
3266fb12b70Safresh1This deprecation affects things like $\cT, where \cT is a literal control (such
3276fb12b70Safresh1as a C<NAK> or C<NEGATIVE ACKNOWLEDGE> character) in
3286fb12b70Safresh1the source code.  Surprisingly, it appears that originally this was intended as
3296fb12b70Safresh1the canonical way of accessing variables like $^T, with the caret form only
3306fb12b70Safresh1being added as an alternative.
3316fb12b70Safresh1
3326fb12b70Safresh1The literal control form is being deprecated for two main reasons.  It has what
3336fb12b70Safresh1are likely unfixable bugs, such as $\cI not working as an alias for $^I, and
3346fb12b70Safresh1their usage not being portable to non-ASCII platforms: While $^T will work
3356fb12b70Safresh1everywhere, \cT is whitespace in EBCDIC.  [perl #119123]
3366fb12b70Safresh1
3376fb12b70Safresh1=head2 References to non-integers and non-positive integers in C<$/>
3386fb12b70Safresh1
3396fb12b70Safresh1Setting C<$/> to a reference to zero or a reference to a negative integer is
3406fb12b70Safresh1now deprecated, and will behave B<exactly> as though it was set to C<undef>.
3416fb12b70Safresh1If you want slurp behavior set C<$/> to C<undef> explicitly.
3426fb12b70Safresh1
3436fb12b70Safresh1Setting C<$/> to a reference to a non integer is now forbidden and will
3446fb12b70Safresh1throw an error. Perl has never documented what would happen in this
3456fb12b70Safresh1context and while it used to behave the same as setting C<$/> to
3466fb12b70Safresh1the address of the references in future it may behave differently, so we
3476fb12b70Safresh1have forbidden this usage.
3486fb12b70Safresh1
3496fb12b70Safresh1=head2 Character matching routines in POSIX
3506fb12b70Safresh1
3516fb12b70Safresh1Use of any of these functions in the C<POSIX> module is now deprecated:
3526fb12b70Safresh1C<isalnum>, C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>,
3536fb12b70Safresh1C<isprint>, C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>.  The
3546fb12b70Safresh1functions are buggy and don't work on UTF-8 encoded strings.  See their
3556fb12b70Safresh1entries in L<POSIX> for more information.
3566fb12b70Safresh1
3576fb12b70Safresh1A warning is raised on the first call to any of them from each place in
3586fb12b70Safresh1the code that they are called.  (Hence a repeated statement in a loop
3596fb12b70Safresh1will raise just the one warning.)
3606fb12b70Safresh1
3616fb12b70Safresh1=head2 Interpreter-based threads are now I<discouraged>
3626fb12b70Safresh1
3636fb12b70Safresh1The "interpreter-based threads" provided by Perl are not the fast, lightweight
3646fb12b70Safresh1system for multitasking that one might expect or hope for.  Threads are
3656fb12b70Safresh1implemented in a way that make them easy to misuse.  Few people know how to
3666fb12b70Safresh1use them correctly or will be able to provide help.
3676fb12b70Safresh1
3686fb12b70Safresh1The use of interpreter-based threads in perl is officially
3696fb12b70Safresh1L<discouraged|perlpolicy/discouraged>.
3706fb12b70Safresh1
3716fb12b70Safresh1=head2 Module removals
3726fb12b70Safresh1
3736fb12b70Safresh1The following modules will be removed from the core distribution in a
3746fb12b70Safresh1future release, and will at that time need to be installed from CPAN.
3756fb12b70Safresh1Distributions on CPAN which require these modules will need to list them as
3766fb12b70Safresh1prerequisites.
3776fb12b70Safresh1
3786fb12b70Safresh1The core versions of these modules will now issue C<"deprecated">-category
3796fb12b70Safresh1warnings to alert you to this fact.  To silence these deprecation warnings,
3806fb12b70Safresh1install the modules in question from CPAN.
3816fb12b70Safresh1
3826fb12b70Safresh1Note that the planned removal of these modules from core does not reflect a
3836fb12b70Safresh1judgement about the quality of the code and should not be taken as a suggestion
3846fb12b70Safresh1that their use be halted.  Their disinclusion from core primarily hinges on
3856fb12b70Safresh1their necessity to bootstrapping a fully functional, CPAN-capable Perl
3866fb12b70Safresh1installation, not on concerns over their design.
3876fb12b70Safresh1
3886fb12b70Safresh1=over
3896fb12b70Safresh1
3906fb12b70Safresh1=item L<CGI> and its associated CGI:: packages
3916fb12b70Safresh1
3926fb12b70Safresh1=item L<inc::latest>
3936fb12b70Safresh1
3946fb12b70Safresh1=item L<Package::Constants>
3956fb12b70Safresh1
3966fb12b70Safresh1=item L<Module::Build> and its associated Module::Build:: packages
3976fb12b70Safresh1
3986fb12b70Safresh1=back
3996fb12b70Safresh1
4006fb12b70Safresh1=head2 Utility removals
4016fb12b70Safresh1
4026fb12b70Safresh1The following utilities will be removed from the core distribution in a
4036fb12b70Safresh1future release, and will at that time need to be installed from CPAN.
4046fb12b70Safresh1
4056fb12b70Safresh1=over 4
4066fb12b70Safresh1
4076fb12b70Safresh1=item L<find2perl>
4086fb12b70Safresh1
4096fb12b70Safresh1=item L<s2p>
4106fb12b70Safresh1
4116fb12b70Safresh1=item L<a2p>
4126fb12b70Safresh1
4136fb12b70Safresh1=back
4146fb12b70Safresh1
4156fb12b70Safresh1=head1 Performance Enhancements
4166fb12b70Safresh1
4176fb12b70Safresh1=over 4
4186fb12b70Safresh1
4196fb12b70Safresh1=item *
4206fb12b70Safresh1
4216fb12b70Safresh1Perl has a new copy-on-write mechanism that avoids the need to copy the
4226fb12b70Safresh1internal string buffer when assigning from one scalar to another. This
4236fb12b70Safresh1makes copying large strings appear much faster.  Modifying one of the two
4246fb12b70Safresh1(or more) strings after an assignment will force a copy internally. This
4256fb12b70Safresh1makes it unnecessary to pass strings by reference for efficiency.
4266fb12b70Safresh1
4276fb12b70Safresh1This feature was already available in 5.18.0, but wasn't enabled by
4286fb12b70Safresh1default. It is the default now, and so you no longer need build perl with
4296fb12b70Safresh1the F<Configure> argument:
4306fb12b70Safresh1
4316fb12b70Safresh1    -Accflags=-DPERL_NEW_COPY_ON_WRITE
4326fb12b70Safresh1
4336fb12b70Safresh1It can be disabled (for now) in a perl build with:
4346fb12b70Safresh1
4356fb12b70Safresh1    -Accflags=-DPERL_NO_COW
4366fb12b70Safresh1
4376fb12b70Safresh1On some operating systems Perl can be compiled in such a way that any
4386fb12b70Safresh1attempt to modify string buffers shared by multiple SVs will crash.  This
4396fb12b70Safresh1way XS authors can test that their modules handle copy-on-write scalars
4406fb12b70Safresh1correctly.  See L<perlguts/"Copy on Write"> for detail.
4416fb12b70Safresh1
4426fb12b70Safresh1=item *
4436fb12b70Safresh1
4446fb12b70Safresh1Perl has an optimizer for regular expression patterns.  It analyzes the pattern
4456fb12b70Safresh1to find things such as the minimum length a string has to be to match, etc.  It
4466fb12b70Safresh1now better handles code points that are above the Latin1 range.
4476fb12b70Safresh1
4486fb12b70Safresh1=item *
4496fb12b70Safresh1
4506fb12b70Safresh1Executing a regex that contains the C<^> anchor (or its variant under the
4516fb12b70Safresh1C</m> flag) has been made much faster in several situations.
4526fb12b70Safresh1
4536fb12b70Safresh1=item *
4546fb12b70Safresh1
4556fb12b70Safresh1Precomputed hash values are now used in more places during method lookup.
4566fb12b70Safresh1
4576fb12b70Safresh1=item *
4586fb12b70Safresh1
4596fb12b70Safresh1Constant hash key lookups (C<$hash{key}> as opposed to C<$hash{$key}>) have
4606fb12b70Safresh1long had the internal hash value computed at compile time, to speed up
4616fb12b70Safresh1lookup.  This optimisation has only now been applied to hash slices as
4626fb12b70Safresh1well.
4636fb12b70Safresh1
4646fb12b70Safresh1=item *
4656fb12b70Safresh1
4666fb12b70Safresh1Combined C<and> and C<or> operators in void context, like those
4676fb12b70Safresh1generated for C<< unless ($a && $b) >> and C<< if ($a || b) >> now
4686fb12b70Safresh1short circuit directly to the end of the statement. [perl #120128]
4696fb12b70Safresh1
4706fb12b70Safresh1=item *
4716fb12b70Safresh1
4726fb12b70Safresh1In certain situations, when C<return> is the last statement in a subroutine's
4736fb12b70Safresh1main scope, it will be optimized out. This means code like:
4746fb12b70Safresh1
4756fb12b70Safresh1  sub baz { return $cat; }
4766fb12b70Safresh1
4776fb12b70Safresh1will now behave like:
4786fb12b70Safresh1
4796fb12b70Safresh1  sub baz { $cat; }
4806fb12b70Safresh1
4816fb12b70Safresh1which is notably faster.
4826fb12b70Safresh1
4836fb12b70Safresh1[perl #120765]
4846fb12b70Safresh1
4856fb12b70Safresh1=item *
4866fb12b70Safresh1
4876fb12b70Safresh1Code like:
4886fb12b70Safresh1
4896fb12b70Safresh1  my $x; # or @x, %x
4906fb12b70Safresh1  my $y;
4916fb12b70Safresh1
4926fb12b70Safresh1is now optimized to:
4936fb12b70Safresh1
4946fb12b70Safresh1  my ($x, $y);
4956fb12b70Safresh1
4966fb12b70Safresh1In combination with the L<padrange optimization introduced in
4976fb12b70Safresh1v5.18.0|perl5180delta/Internal Changes>, this means longer uninitialized my
4986fb12b70Safresh1variable statements are also optimized, so:
4996fb12b70Safresh1
5006fb12b70Safresh1  my $x; my @y; my %z;
5016fb12b70Safresh1
5026fb12b70Safresh1becomes:
5036fb12b70Safresh1
5046fb12b70Safresh1  my ($x, @y, %z);
5056fb12b70Safresh1
5066fb12b70Safresh1[perl #121077]
5076fb12b70Safresh1
5086fb12b70Safresh1=item *
5096fb12b70Safresh1
5106fb12b70Safresh1The creation of certain sorts of lists, including array and hash slices, is now
5116fb12b70Safresh1faster.
5126fb12b70Safresh1
5136fb12b70Safresh1=item *
5146fb12b70Safresh1
5156fb12b70Safresh1The optimisation for arrays indexed with a small constant integer is now
5166fb12b70Safresh1applied for integers in the range -128..127, rather than 0..255. This should
5176fb12b70Safresh1speed up Perl code using expressions like C<$x[-1]>, at the expense of
5186fb12b70Safresh1(presumably much rarer) code using expressions like C<$x[200]>.
5196fb12b70Safresh1
5206fb12b70Safresh1=item *
5216fb12b70Safresh1
5226fb12b70Safresh1The first iteration over a large hash (using C<keys> or C<each>) is now
5236fb12b70Safresh1faster. This is achieved by preallocating the hash's internal iterator
5246fb12b70Safresh1state, rather than lazily creating it when the hash is first iterated. (For
5256fb12b70Safresh1small hashes, the iterator is still created only when first needed. The
5266fb12b70Safresh1assumption is that small hashes are more likely to be used as objects, and
5276fb12b70Safresh1therefore never allocated. For large hashes, that's less likely to be true,
5286fb12b70Safresh1and the cost of allocating the iterator is swamped by the cost of allocating
5296fb12b70Safresh1space for the hash itself.)
5306fb12b70Safresh1
5316fb12b70Safresh1=item *
5326fb12b70Safresh1
5336fb12b70Safresh1When doing a global regex match on a string that came from the C<readline>
5346fb12b70Safresh1or C<E<lt>E<gt>> operator, the data is no longer copied unnecessarily.
5356fb12b70Safresh1[perl #121259]
5366fb12b70Safresh1
5376fb12b70Safresh1=item *
5386fb12b70Safresh1
5396fb12b70Safresh1Dereferencing (as in C<$obj-E<gt>[0]> or C<$obj-E<gt>{k}>) is now faster
5406fb12b70Safresh1when C<$obj> is an instance of a class that has overloaded methods, but
5416fb12b70Safresh1doesn't overload any of the dereferencing methods C<@{}>, C<%{}>, and so on.
5426fb12b70Safresh1
5436fb12b70Safresh1=item *
5446fb12b70Safresh1
5456fb12b70Safresh1Perl's optimiser no longer skips optimising code that follows certain
5466fb12b70Safresh1C<eval {}> expressions (including those with an apparent infinite loop).
5476fb12b70Safresh1
5486fb12b70Safresh1=item *
5496fb12b70Safresh1
5506fb12b70Safresh1The implementation now does a better job of avoiding meaningless work at
5516fb12b70Safresh1runtime. Internal effect-free "null" operations (created as a side-effect of
5526fb12b70Safresh1parsing Perl programs) are normally deleted during compilation. That
5536fb12b70Safresh1deletion is now applied in some situations that weren't previously handled.
5546fb12b70Safresh1
5556fb12b70Safresh1=item *
5566fb12b70Safresh1
5576fb12b70Safresh1Perl now does less disk I/O when dealing with Unicode properties that cover
5586fb12b70Safresh1up to three ranges of consecutive code points.
5596fb12b70Safresh1
5606fb12b70Safresh1=back
5616fb12b70Safresh1
5626fb12b70Safresh1=head1 Modules and Pragmata
5636fb12b70Safresh1
5646fb12b70Safresh1=head2 New Modules and Pragmata
5656fb12b70Safresh1
5666fb12b70Safresh1=over 4
5676fb12b70Safresh1
5686fb12b70Safresh1=item *
5696fb12b70Safresh1
5706fb12b70Safresh1L<experimental> 0.007 has been added to the Perl core.
5716fb12b70Safresh1
5726fb12b70Safresh1=item *
5736fb12b70Safresh1
5746fb12b70Safresh1L<IO::Socket::IP> 0.29 has been added to the Perl core.
5756fb12b70Safresh1
5766fb12b70Safresh1=back
5776fb12b70Safresh1
5786fb12b70Safresh1=head2 Updated Modules and Pragmata
5796fb12b70Safresh1
5806fb12b70Safresh1=over 4
5816fb12b70Safresh1
5826fb12b70Safresh1=item *
5836fb12b70Safresh1
5846fb12b70Safresh1L<Archive::Tar> has been upgraded from version 1.90 to 1.96.
5856fb12b70Safresh1
5866fb12b70Safresh1=item *
5876fb12b70Safresh1
5886fb12b70Safresh1L<arybase> has been upgraded from version 0.06 to 0.07.
5896fb12b70Safresh1
5906fb12b70Safresh1=item *
5916fb12b70Safresh1
5926fb12b70Safresh1L<Attribute::Handlers> has been upgraded from version 0.94 to 0.96.
5936fb12b70Safresh1
5946fb12b70Safresh1=item *
5956fb12b70Safresh1
5966fb12b70Safresh1L<attributes> has been upgraded from version 0.21 to 0.22.
5976fb12b70Safresh1
5986fb12b70Safresh1=item *
5996fb12b70Safresh1
6006fb12b70Safresh1L<autodie> has been upgraded from version 2.13 to 2.23.
6016fb12b70Safresh1
6026fb12b70Safresh1=item *
6036fb12b70Safresh1
6046fb12b70Safresh1L<AutoLoader> has been upgraded from version 5.73 to 5.74.
6056fb12b70Safresh1
6066fb12b70Safresh1=item *
6076fb12b70Safresh1
6086fb12b70Safresh1L<autouse> has been upgraded from version 1.07 to 1.08.
6096fb12b70Safresh1
6106fb12b70Safresh1=item *
6116fb12b70Safresh1
6126fb12b70Safresh1L<B> has been upgraded from version 1.42 to 1.48.
6136fb12b70Safresh1
6146fb12b70Safresh1=item *
6156fb12b70Safresh1
6166fb12b70Safresh1L<B::Concise> has been upgraded from version 0.95 to 0.992.
6176fb12b70Safresh1
6186fb12b70Safresh1=item *
6196fb12b70Safresh1
6206fb12b70Safresh1L<B::Debug> has been upgraded from version 1.18 to 1.19.
6216fb12b70Safresh1
6226fb12b70Safresh1=item *
6236fb12b70Safresh1
6246fb12b70Safresh1L<B::Deparse> has been upgraded from version 1.20 to 1.26.
6256fb12b70Safresh1
6266fb12b70Safresh1=item *
6276fb12b70Safresh1
6286fb12b70Safresh1L<base> has been upgraded from version 2.18 to 2.22.
6296fb12b70Safresh1
6306fb12b70Safresh1=item *
6316fb12b70Safresh1
6326fb12b70Safresh1L<Benchmark> has been upgraded from version 1.15 to 1.18.
6336fb12b70Safresh1
6346fb12b70Safresh1=item *
6356fb12b70Safresh1
6366fb12b70Safresh1L<bignum> has been upgraded from version 0.33 to 0.37.
6376fb12b70Safresh1
6386fb12b70Safresh1=item *
6396fb12b70Safresh1
6406fb12b70Safresh1L<Carp> has been upgraded from version 1.29 to 1.3301.
6416fb12b70Safresh1
6426fb12b70Safresh1=item *
6436fb12b70Safresh1
6446fb12b70Safresh1L<CGI> has been upgraded from version 3.63 to 3.65.
6456fb12b70Safresh1NOTE: L<CGI> is deprecated and may be removed from a future version of Perl.
6466fb12b70Safresh1
6476fb12b70Safresh1=item *
6486fb12b70Safresh1
6496fb12b70Safresh1L<charnames> has been upgraded from version 1.36 to 1.40.
6506fb12b70Safresh1
6516fb12b70Safresh1=item *
6526fb12b70Safresh1
6536fb12b70Safresh1L<Class::Struct> has been upgraded from version 0.64 to 0.65.
6546fb12b70Safresh1
6556fb12b70Safresh1=item *
6566fb12b70Safresh1
6576fb12b70Safresh1L<Compress::Raw::Bzip2> has been upgraded from version 2.060 to 2.064.
6586fb12b70Safresh1
6596fb12b70Safresh1=item *
6606fb12b70Safresh1
6616fb12b70Safresh1L<Compress::Raw::Zlib> has been upgraded from version 2.060 to 2.065.
6626fb12b70Safresh1
6636fb12b70Safresh1=item *
6646fb12b70Safresh1
6656fb12b70Safresh1L<Config::Perl::V> has been upgraded from version 0.17 to 0.20.
6666fb12b70Safresh1
6676fb12b70Safresh1=item *
6686fb12b70Safresh1
6696fb12b70Safresh1L<constant> has been upgraded from version 1.27 to 1.31.
6706fb12b70Safresh1
6716fb12b70Safresh1=item *
6726fb12b70Safresh1
6736fb12b70Safresh1L<CPAN> has been upgraded from version 2.00 to 2.05.
6746fb12b70Safresh1
6756fb12b70Safresh1=item *
6766fb12b70Safresh1
6776fb12b70Safresh1L<CPAN::Meta> has been upgraded from version 2.120921 to 2.140640.
6786fb12b70Safresh1
6796fb12b70Safresh1=item *
6806fb12b70Safresh1
6816fb12b70Safresh1L<CPAN::Meta::Requirements> has been upgraded from version 2.122 to 2.125.
6826fb12b70Safresh1
6836fb12b70Safresh1=item *
6846fb12b70Safresh1
6856fb12b70Safresh1L<CPAN::Meta::YAML> has been upgraded from version 0.008 to 0.012.
6866fb12b70Safresh1
6876fb12b70Safresh1=item *
6886fb12b70Safresh1
6896fb12b70Safresh1L<Data::Dumper> has been upgraded from version 2.145 to 2.151.
6906fb12b70Safresh1
6916fb12b70Safresh1=item *
6926fb12b70Safresh1
6936fb12b70Safresh1L<DB> has been upgraded from version 1.04 to 1.07.
6946fb12b70Safresh1
6956fb12b70Safresh1=item *
6966fb12b70Safresh1
6976fb12b70Safresh1L<DB_File> has been upgraded from version 1.827 to 1.831.
6986fb12b70Safresh1
6996fb12b70Safresh1=item *
7006fb12b70Safresh1
7016fb12b70Safresh1L<DBM_Filter> has been upgraded from version 0.05 to 0.06.
7026fb12b70Safresh1
7036fb12b70Safresh1=item *
7046fb12b70Safresh1
7056fb12b70Safresh1L<deprecate> has been upgraded from version 0.02 to 0.03.
7066fb12b70Safresh1
7076fb12b70Safresh1=item *
7086fb12b70Safresh1
7096fb12b70Safresh1L<Devel::Peek> has been upgraded from version 1.11 to 1.16.
7106fb12b70Safresh1
7116fb12b70Safresh1=item *
7126fb12b70Safresh1
7136fb12b70Safresh1L<Devel::PPPort> has been upgraded from version 3.20 to 3.21.
7146fb12b70Safresh1
7156fb12b70Safresh1=item *
7166fb12b70Safresh1
7176fb12b70Safresh1L<diagnostics> has been upgraded from version 1.31 to 1.34.
7186fb12b70Safresh1
7196fb12b70Safresh1=item *
7206fb12b70Safresh1
7216fb12b70Safresh1L<Digest::MD5> has been upgraded from version 2.52 to 2.53.
7226fb12b70Safresh1
7236fb12b70Safresh1=item *
7246fb12b70Safresh1
7256fb12b70Safresh1L<Digest::SHA> has been upgraded from version 5.84 to 5.88.
7266fb12b70Safresh1
7276fb12b70Safresh1=item *
7286fb12b70Safresh1
7296fb12b70Safresh1L<DynaLoader> has been upgraded from version 1.18 to 1.25.
7306fb12b70Safresh1
7316fb12b70Safresh1=item *
7326fb12b70Safresh1
7336fb12b70Safresh1L<Encode> has been upgraded from version 2.49 to 2.60.
7346fb12b70Safresh1
7356fb12b70Safresh1=item *
7366fb12b70Safresh1
7376fb12b70Safresh1L<encoding> has been upgraded from version 2.6_01 to 2.12.
7386fb12b70Safresh1
7396fb12b70Safresh1=item *
7406fb12b70Safresh1
7416fb12b70Safresh1L<English> has been upgraded from version 1.06 to 1.09.
7426fb12b70Safresh1
743b8851fccSafresh1C<$OLD_PERL_VERSION> was added as an alias of C<$]>.
744b8851fccSafresh1
7456fb12b70Safresh1=item *
7466fb12b70Safresh1
7476fb12b70Safresh1L<Errno> has been upgraded from version 1.18 to 1.20_03.
7486fb12b70Safresh1
7496fb12b70Safresh1=item *
7506fb12b70Safresh1
7516fb12b70Safresh1L<Exporter> has been upgraded from version 5.68 to 5.70.
7526fb12b70Safresh1
7536fb12b70Safresh1=item *
7546fb12b70Safresh1
7556fb12b70Safresh1L<ExtUtils::CBuilder> has been upgraded from version 0.280210 to 0.280216.
7566fb12b70Safresh1
7576fb12b70Safresh1=item *
7586fb12b70Safresh1
7596fb12b70Safresh1L<ExtUtils::Command> has been upgraded from version 1.17 to 1.18.
7606fb12b70Safresh1
7616fb12b70Safresh1=item *
7626fb12b70Safresh1
7636fb12b70Safresh1L<ExtUtils::Embed> has been upgraded from version 1.30 to 1.32.
7646fb12b70Safresh1
7656fb12b70Safresh1=item *
7666fb12b70Safresh1
7676fb12b70Safresh1L<ExtUtils::Install> has been upgraded from version 1.59 to 1.67.
7686fb12b70Safresh1
7696fb12b70Safresh1=item *
7706fb12b70Safresh1
7716fb12b70Safresh1L<ExtUtils::MakeMaker> has been upgraded from version 6.66 to 6.98.
7726fb12b70Safresh1
7736fb12b70Safresh1=item *
7746fb12b70Safresh1
7756fb12b70Safresh1L<ExtUtils::Miniperl> has been upgraded from version  to 1.01.
7766fb12b70Safresh1
7776fb12b70Safresh1=item *
7786fb12b70Safresh1
7796fb12b70Safresh1L<ExtUtils::ParseXS> has been upgraded from version 3.18 to 3.24.
7806fb12b70Safresh1
7816fb12b70Safresh1=item *
7826fb12b70Safresh1
7836fb12b70Safresh1L<ExtUtils::Typemaps> has been upgraded from version 3.19 to 3.24.
7846fb12b70Safresh1
7856fb12b70Safresh1=item *
7866fb12b70Safresh1
7876fb12b70Safresh1L<ExtUtils::XSSymSet> has been upgraded from version 1.2 to 1.3.
7886fb12b70Safresh1
7896fb12b70Safresh1=item *
7906fb12b70Safresh1
7916fb12b70Safresh1L<feature> has been upgraded from version 1.32 to 1.36.
7926fb12b70Safresh1
7936fb12b70Safresh1=item *
7946fb12b70Safresh1
7956fb12b70Safresh1L<fields> has been upgraded from version 2.16 to 2.17.
7966fb12b70Safresh1
7976fb12b70Safresh1=item *
7986fb12b70Safresh1
7996fb12b70Safresh1L<File::Basename> has been upgraded from version 2.84 to 2.85.
8006fb12b70Safresh1
8016fb12b70Safresh1=item *
8026fb12b70Safresh1
8036fb12b70Safresh1L<File::Copy> has been upgraded from version 2.26 to 2.29.
8046fb12b70Safresh1
8056fb12b70Safresh1=item *
8066fb12b70Safresh1
8076fb12b70Safresh1L<File::DosGlob> has been upgraded from version 1.10 to 1.12.
8086fb12b70Safresh1
8096fb12b70Safresh1=item *
8106fb12b70Safresh1
8116fb12b70Safresh1L<File::Fetch> has been upgraded from version 0.38 to 0.48.
8126fb12b70Safresh1
8136fb12b70Safresh1=item *
8146fb12b70Safresh1
8156fb12b70Safresh1L<File::Find> has been upgraded from version 1.23 to 1.27.
8166fb12b70Safresh1
8176fb12b70Safresh1=item *
8186fb12b70Safresh1
8196fb12b70Safresh1L<File::Glob> has been upgraded from version 1.20 to 1.23.
8206fb12b70Safresh1
8216fb12b70Safresh1=item *
8226fb12b70Safresh1
8236fb12b70Safresh1L<File::Spec> has been upgraded from version 3.40 to 3.47.
8246fb12b70Safresh1
8256fb12b70Safresh1=item *
8266fb12b70Safresh1
8276fb12b70Safresh1L<File::Temp> has been upgraded from version 0.23 to 0.2304.
8286fb12b70Safresh1
8296fb12b70Safresh1=item *
8306fb12b70Safresh1
8316fb12b70Safresh1L<FileCache> has been upgraded from version 1.08 to 1.09.
8326fb12b70Safresh1
8336fb12b70Safresh1=item *
8346fb12b70Safresh1
8356fb12b70Safresh1L<Filter::Simple> has been upgraded from version 0.89 to 0.91.
8366fb12b70Safresh1
8376fb12b70Safresh1=item *
8386fb12b70Safresh1
8396fb12b70Safresh1L<Filter::Util::Call> has been upgraded from version 1.45 to 1.49.
8406fb12b70Safresh1
8416fb12b70Safresh1=item *
8426fb12b70Safresh1
8436fb12b70Safresh1L<Getopt::Long> has been upgraded from version 2.39 to 2.42.
8446fb12b70Safresh1
8456fb12b70Safresh1=item *
8466fb12b70Safresh1
8476fb12b70Safresh1L<Getopt::Std> has been upgraded from version 1.07 to 1.10.
8486fb12b70Safresh1
8496fb12b70Safresh1=item *
8506fb12b70Safresh1
8516fb12b70Safresh1L<Hash::Util::FieldHash> has been upgraded from version 1.10 to 1.15.
8526fb12b70Safresh1
8536fb12b70Safresh1=item *
8546fb12b70Safresh1
8556fb12b70Safresh1L<HTTP::Tiny> has been upgraded from version 0.025 to 0.043.
8566fb12b70Safresh1
8576fb12b70Safresh1=item *
8586fb12b70Safresh1
8596fb12b70Safresh1L<I18N::Langinfo> has been upgraded from version 0.10 to 0.11.
8606fb12b70Safresh1
8616fb12b70Safresh1=item *
8626fb12b70Safresh1
8636fb12b70Safresh1L<I18N::LangTags> has been upgraded from version 0.39 to 0.40.
8646fb12b70Safresh1
8656fb12b70Safresh1=item *
8666fb12b70Safresh1
8676fb12b70Safresh1L<if> has been upgraded from version 0.0602 to 0.0603.
8686fb12b70Safresh1
8696fb12b70Safresh1=item *
8706fb12b70Safresh1
8716fb12b70Safresh1L<inc::latest> has been upgraded from version 0.4003 to 0.4205.
8726fb12b70Safresh1NOTE: L<inc::latest> is deprecated and may be removed from a future version of Perl.
8736fb12b70Safresh1
8746fb12b70Safresh1=item *
8756fb12b70Safresh1
8766fb12b70Safresh1L<integer> has been upgraded from version 1.00 to 1.01.
8776fb12b70Safresh1
8786fb12b70Safresh1=item *
8796fb12b70Safresh1
8806fb12b70Safresh1L<IO> has been upgraded from version 1.28 to 1.31.
8816fb12b70Safresh1
8826fb12b70Safresh1=item *
8836fb12b70Safresh1
8846fb12b70Safresh1L<IO::Compress::Gzip> and friends have been upgraded from version 2.060 to
8856fb12b70Safresh12.064.
8866fb12b70Safresh1
8876fb12b70Safresh1=item *
8886fb12b70Safresh1
8896fb12b70Safresh1L<IPC::Cmd> has been upgraded from version 0.80 to 0.92.
8906fb12b70Safresh1
8916fb12b70Safresh1=item *
8926fb12b70Safresh1
8936fb12b70Safresh1L<IPC::Open3> has been upgraded from version 1.13 to 1.16.
8946fb12b70Safresh1
8956fb12b70Safresh1=item *
8966fb12b70Safresh1
8976fb12b70Safresh1L<IPC::SysV> has been upgraded from version 2.03 to 2.04.
8986fb12b70Safresh1
8996fb12b70Safresh1=item *
9006fb12b70Safresh1
9016fb12b70Safresh1L<JSON::PP> has been upgraded from version 2.27202 to 2.27203.
9026fb12b70Safresh1
9036fb12b70Safresh1=item *
9046fb12b70Safresh1
9056fb12b70Safresh1L<List::Util> has been upgraded from version 1.27 to 1.38.
9066fb12b70Safresh1
9076fb12b70Safresh1=item *
9086fb12b70Safresh1
9096fb12b70Safresh1L<locale> has been upgraded from version 1.02 to 1.03.
9106fb12b70Safresh1
9116fb12b70Safresh1=item *
9126fb12b70Safresh1
9136fb12b70Safresh1L<Locale::Codes> has been upgraded from version 3.25 to 3.30.
9146fb12b70Safresh1
9156fb12b70Safresh1=item *
9166fb12b70Safresh1
9176fb12b70Safresh1L<Locale::Maketext> has been upgraded from version 1.23 to 1.25.
9186fb12b70Safresh1
9196fb12b70Safresh1=item *
9206fb12b70Safresh1
9216fb12b70Safresh1L<Math::BigInt> has been upgraded from version 1.9991 to 1.9993.
9226fb12b70Safresh1
9236fb12b70Safresh1=item *
9246fb12b70Safresh1
9256fb12b70Safresh1L<Math::BigInt::FastCalc> has been upgraded from version 0.30 to 0.31.
9266fb12b70Safresh1
9276fb12b70Safresh1=item *
9286fb12b70Safresh1
9296fb12b70Safresh1L<Math::BigRat> has been upgraded from version 0.2604 to 0.2606.
9306fb12b70Safresh1
9316fb12b70Safresh1=item *
9326fb12b70Safresh1
9336fb12b70Safresh1L<MIME::Base64> has been upgraded from version 3.13 to 3.14.
9346fb12b70Safresh1
9356fb12b70Safresh1=item *
9366fb12b70Safresh1
9376fb12b70Safresh1L<Module::Build> has been upgraded from version 0.4003 to 0.4205.
9386fb12b70Safresh1NOTE: L<Module::Build> is deprecated and may be removed from a future version of Perl.
9396fb12b70Safresh1
9406fb12b70Safresh1=item *
9416fb12b70Safresh1
9426fb12b70Safresh1L<Module::CoreList> has been upgraded from version 2.89 to 3.10.
9436fb12b70Safresh1
9446fb12b70Safresh1=item *
9456fb12b70Safresh1
9466fb12b70Safresh1L<Module::Load> has been upgraded from version 0.24 to 0.32.
9476fb12b70Safresh1
9486fb12b70Safresh1=item *
9496fb12b70Safresh1
9506fb12b70Safresh1L<Module::Load::Conditional> has been upgraded from version 0.54 to 0.62.
9516fb12b70Safresh1
9526fb12b70Safresh1=item *
9536fb12b70Safresh1
9546fb12b70Safresh1L<Module::Metadata> has been upgraded from version 1.000011 to 1.000019.
9556fb12b70Safresh1
9566fb12b70Safresh1=item *
9576fb12b70Safresh1
9586fb12b70Safresh1L<mro> has been upgraded from version 1.11 to 1.16.
9596fb12b70Safresh1
9606fb12b70Safresh1=item *
9616fb12b70Safresh1
9626fb12b70Safresh1L<Net::Ping> has been upgraded from version 2.41 to 2.43.
9636fb12b70Safresh1
9646fb12b70Safresh1=item *
9656fb12b70Safresh1
9666fb12b70Safresh1L<Opcode> has been upgraded from version 1.25 to 1.27.
9676fb12b70Safresh1
9686fb12b70Safresh1=item *
9696fb12b70Safresh1
9706fb12b70Safresh1L<Package::Constants> has been upgraded from version 0.02 to 0.04.
9716fb12b70Safresh1NOTE: L<Package::Constants> is deprecated and may be removed from a future version of Perl.
9726fb12b70Safresh1
9736fb12b70Safresh1=item *
9746fb12b70Safresh1
9756fb12b70Safresh1L<Params::Check> has been upgraded from version 0.36 to 0.38.
9766fb12b70Safresh1
9776fb12b70Safresh1=item *
9786fb12b70Safresh1
9796fb12b70Safresh1L<parent> has been upgraded from version 0.225 to 0.228.
9806fb12b70Safresh1
9816fb12b70Safresh1=item *
9826fb12b70Safresh1
9836fb12b70Safresh1L<Parse::CPAN::Meta> has been upgraded from version 1.4404 to 1.4414.
9846fb12b70Safresh1
9856fb12b70Safresh1=item *
9866fb12b70Safresh1
9876fb12b70Safresh1L<Perl::OSType> has been upgraded from version 1.003 to 1.007.
9886fb12b70Safresh1
9896fb12b70Safresh1=item *
9906fb12b70Safresh1
9916fb12b70Safresh1L<perlfaq> has been upgraded from version 5.0150042 to 5.0150044.
9926fb12b70Safresh1
9936fb12b70Safresh1=item *
9946fb12b70Safresh1
9956fb12b70Safresh1L<PerlIO> has been upgraded from version 1.07 to 1.09.
9966fb12b70Safresh1
9976fb12b70Safresh1=item *
9986fb12b70Safresh1
9996fb12b70Safresh1L<PerlIO::encoding> has been upgraded from version 0.16 to 0.18.
10006fb12b70Safresh1
10016fb12b70Safresh1=item *
10026fb12b70Safresh1
10036fb12b70Safresh1L<PerlIO::scalar> has been upgraded from version 0.16 to 0.18.
10046fb12b70Safresh1
10056fb12b70Safresh1=item *
10066fb12b70Safresh1
10076fb12b70Safresh1L<PerlIO::via> has been upgraded from version 0.12 to 0.14.
10086fb12b70Safresh1
10096fb12b70Safresh1=item *
10106fb12b70Safresh1
10116fb12b70Safresh1L<Pod::Escapes> has been upgraded from version 1.04 to 1.06.
10126fb12b70Safresh1
10136fb12b70Safresh1=item *
10146fb12b70Safresh1
10156fb12b70Safresh1L<Pod::Functions> has been upgraded from version 1.06 to 1.08.
10166fb12b70Safresh1
10176fb12b70Safresh1=item *
10186fb12b70Safresh1
10196fb12b70Safresh1L<Pod::Html> has been upgraded from version 1.18 to 1.21.
10206fb12b70Safresh1
10216fb12b70Safresh1=item *
10226fb12b70Safresh1
10236fb12b70Safresh1L<Pod::Parser> has been upgraded from version 1.60 to 1.62.
10246fb12b70Safresh1
10256fb12b70Safresh1=item *
10266fb12b70Safresh1
10276fb12b70Safresh1L<Pod::Perldoc> has been upgraded from version 3.19 to 3.23.
10286fb12b70Safresh1
10296fb12b70Safresh1=item *
10306fb12b70Safresh1
10316fb12b70Safresh1L<Pod::Usage> has been upgraded from version 1.61 to 1.63.
10326fb12b70Safresh1
10336fb12b70Safresh1=item *
10346fb12b70Safresh1
10356fb12b70Safresh1L<POSIX> has been upgraded from version 1.32 to 1.38_03.
10366fb12b70Safresh1
10376fb12b70Safresh1=item *
10386fb12b70Safresh1
10396fb12b70Safresh1L<re> has been upgraded from version 0.23 to 0.26.
10406fb12b70Safresh1
10416fb12b70Safresh1=item *
10426fb12b70Safresh1
10436fb12b70Safresh1L<Safe> has been upgraded from version 2.35 to 2.37.
10446fb12b70Safresh1
10456fb12b70Safresh1=item *
10466fb12b70Safresh1
10476fb12b70Safresh1L<Scalar::Util> has been upgraded from version 1.27 to 1.38.
10486fb12b70Safresh1
10496fb12b70Safresh1=item *
10506fb12b70Safresh1
10516fb12b70Safresh1L<SDBM_File> has been upgraded from version 1.09 to 1.11.
10526fb12b70Safresh1
10536fb12b70Safresh1=item *
10546fb12b70Safresh1
10556fb12b70Safresh1L<Socket> has been upgraded from version 2.009 to 2.013.
10566fb12b70Safresh1
10576fb12b70Safresh1=item *
10586fb12b70Safresh1
10596fb12b70Safresh1L<Storable> has been upgraded from version 2.41 to 2.49.
10606fb12b70Safresh1
10616fb12b70Safresh1=item *
10626fb12b70Safresh1
10636fb12b70Safresh1L<strict> has been upgraded from version 1.07 to 1.08.
10646fb12b70Safresh1
10656fb12b70Safresh1=item *
10666fb12b70Safresh1
10676fb12b70Safresh1L<subs> has been upgraded from version 1.01 to 1.02.
10686fb12b70Safresh1
10696fb12b70Safresh1=item *
10706fb12b70Safresh1
10716fb12b70Safresh1L<Sys::Hostname> has been upgraded from version 1.17 to 1.18.
10726fb12b70Safresh1
10736fb12b70Safresh1=item *
10746fb12b70Safresh1
10756fb12b70Safresh1L<Sys::Syslog> has been upgraded from version 0.32 to 0.33.
10766fb12b70Safresh1
10776fb12b70Safresh1=item *
10786fb12b70Safresh1
10796fb12b70Safresh1L<Term::Cap> has been upgraded from version 1.13 to 1.15.
10806fb12b70Safresh1
10816fb12b70Safresh1=item *
10826fb12b70Safresh1
10836fb12b70Safresh1L<Term::ReadLine> has been upgraded from version 1.12 to 1.14.
10846fb12b70Safresh1
10856fb12b70Safresh1=item *
10866fb12b70Safresh1
10876fb12b70Safresh1L<Test::Harness> has been upgraded from version 3.26 to 3.30.
10886fb12b70Safresh1
10896fb12b70Safresh1=item *
10906fb12b70Safresh1
10916fb12b70Safresh1L<Test::Simple> has been upgraded from version 0.98 to 1.001002.
10926fb12b70Safresh1
10936fb12b70Safresh1=item *
10946fb12b70Safresh1
10956fb12b70Safresh1L<Text::ParseWords> has been upgraded from version 3.28 to 3.29.
10966fb12b70Safresh1
10976fb12b70Safresh1=item *
10986fb12b70Safresh1
10996fb12b70Safresh1L<Text::Tabs> has been upgraded from version 2012.0818 to 2013.0523.
11006fb12b70Safresh1
11016fb12b70Safresh1=item *
11026fb12b70Safresh1
11036fb12b70Safresh1L<Text::Wrap> has been upgraded from version 2012.0818 to 2013.0523.
11046fb12b70Safresh1
11056fb12b70Safresh1=item *
11066fb12b70Safresh1
11076fb12b70Safresh1L<Thread> has been upgraded from version 3.02 to 3.04.
11086fb12b70Safresh1
11096fb12b70Safresh1=item *
11106fb12b70Safresh1
11116fb12b70Safresh1L<Thread::Queue> has been upgraded from version 3.02 to 3.05.
11126fb12b70Safresh1
11136fb12b70Safresh1=item *
11146fb12b70Safresh1
11156fb12b70Safresh1L<threads> has been upgraded from version 1.86 to 1.93.
11166fb12b70Safresh1
11176fb12b70Safresh1=item *
11186fb12b70Safresh1
11196fb12b70Safresh1L<threads::shared> has been upgraded from version 1.43 to 1.46.
11206fb12b70Safresh1
11216fb12b70Safresh1=item *
11226fb12b70Safresh1
11236fb12b70Safresh1L<Tie::Array> has been upgraded from version 1.05 to 1.06.
11246fb12b70Safresh1
11256fb12b70Safresh1=item *
11266fb12b70Safresh1
11276fb12b70Safresh1L<Tie::File> has been upgraded from version 0.99 to 1.00.
11286fb12b70Safresh1
11296fb12b70Safresh1=item *
11306fb12b70Safresh1
11316fb12b70Safresh1L<Tie::Hash> has been upgraded from version 1.04 to 1.05.
11326fb12b70Safresh1
11336fb12b70Safresh1=item *
11346fb12b70Safresh1
11356fb12b70Safresh1L<Tie::Scalar> has been upgraded from version 1.02 to 1.03.
11366fb12b70Safresh1
11376fb12b70Safresh1=item *
11386fb12b70Safresh1
11396fb12b70Safresh1L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
11406fb12b70Safresh1
11416fb12b70Safresh1=item *
11426fb12b70Safresh1
11436fb12b70Safresh1L<Time::HiRes> has been upgraded from version 1.9725 to 1.9726.
11446fb12b70Safresh1
11456fb12b70Safresh1=item *
11466fb12b70Safresh1
11476fb12b70Safresh1L<Time::Piece> has been upgraded from version 1.20_01 to 1.27.
11486fb12b70Safresh1
11496fb12b70Safresh1=item *
11506fb12b70Safresh1
11516fb12b70Safresh1L<Unicode::Collate> has been upgraded from version 0.97 to 1.04.
11526fb12b70Safresh1
11536fb12b70Safresh1=item *
11546fb12b70Safresh1
11556fb12b70Safresh1L<Unicode::Normalize> has been upgraded from version 1.16 to 1.17.
11566fb12b70Safresh1
11576fb12b70Safresh1=item *
11586fb12b70Safresh1
11596fb12b70Safresh1L<Unicode::UCD> has been upgraded from version 0.51 to 0.57.
11606fb12b70Safresh1
11616fb12b70Safresh1=item *
11626fb12b70Safresh1
11636fb12b70Safresh1L<utf8> has been upgraded from version 1.10 to 1.13.
11646fb12b70Safresh1
11656fb12b70Safresh1=item *
11666fb12b70Safresh1
11676fb12b70Safresh1L<version> has been upgraded from version 0.9902 to 0.9908.
11686fb12b70Safresh1
11696fb12b70Safresh1=item *
11706fb12b70Safresh1
11716fb12b70Safresh1L<vmsish> has been upgraded from version 1.03 to 1.04.
11726fb12b70Safresh1
11736fb12b70Safresh1=item *
11746fb12b70Safresh1
11756fb12b70Safresh1L<warnings> has been upgraded from version 1.18 to 1.23.
11766fb12b70Safresh1
11776fb12b70Safresh1=item *
11786fb12b70Safresh1
11796fb12b70Safresh1L<Win32> has been upgraded from version 0.47 to 0.49.
11806fb12b70Safresh1
11816fb12b70Safresh1=item *
11826fb12b70Safresh1
11836fb12b70Safresh1L<XS::Typemap> has been upgraded from version 0.10 to 0.13.
11846fb12b70Safresh1
11856fb12b70Safresh1=item *
11866fb12b70Safresh1
11876fb12b70Safresh1L<XSLoader> has been upgraded from version 0.16 to 0.17.
11886fb12b70Safresh1
11896fb12b70Safresh1=back
11906fb12b70Safresh1
11916fb12b70Safresh1=head1 Documentation
11926fb12b70Safresh1
11936fb12b70Safresh1=head2 New Documentation
11946fb12b70Safresh1
11956fb12b70Safresh1=head3 L<perlrepository>
11966fb12b70Safresh1
11976fb12b70Safresh1This document was removed (actually, renamed L<perlgit> and given a major
11986fb12b70Safresh1overhaul) in Perl v5.14, causing Perl documentation websites to show the now
11996fb12b70Safresh1out of date version in Perl v5.12 as the latest version.  It has now been
12006fb12b70Safresh1restored in stub form, directing readers to current information.
12016fb12b70Safresh1
12026fb12b70Safresh1=head2 Changes to Existing Documentation
12036fb12b70Safresh1
12046fb12b70Safresh1=head3 L<perldata>
12056fb12b70Safresh1
12066fb12b70Safresh1=over 4
12076fb12b70Safresh1
12086fb12b70Safresh1=item *
12096fb12b70Safresh1
12106fb12b70Safresh1New sections have been added to document the new index/value array slice and
12116fb12b70Safresh1key/value hash slice syntax.
12126fb12b70Safresh1
12136fb12b70Safresh1=back
12146fb12b70Safresh1
12156fb12b70Safresh1=head3 L<perldebguts>
12166fb12b70Safresh1
12176fb12b70Safresh1=over 4
12186fb12b70Safresh1
12196fb12b70Safresh1=item *
12206fb12b70Safresh1
12216fb12b70Safresh1The C<DB::goto> and C<DB::lsub> debugger subroutines are now documented.  [perl
12226fb12b70Safresh1#77680]
12236fb12b70Safresh1
12246fb12b70Safresh1=back
12256fb12b70Safresh1
12266fb12b70Safresh1=head3 L<perlexperiment>
12276fb12b70Safresh1
12286fb12b70Safresh1=over
12296fb12b70Safresh1
12306fb12b70Safresh1=item *
12316fb12b70Safresh1
12326fb12b70Safresh1C<\s> matching C<\cK> is marked experimental.
12336fb12b70Safresh1
12346fb12b70Safresh1=item *
12356fb12b70Safresh1
12366fb12b70Safresh1ithreads were accepted in v5.8.0 (but are discouraged as of v5.20.0).
12376fb12b70Safresh1
12386fb12b70Safresh1=item *
12396fb12b70Safresh1
12406fb12b70Safresh1Long doubles are not considered experimental.
12416fb12b70Safresh1
12426fb12b70Safresh1=item *
12436fb12b70Safresh1
12446fb12b70Safresh1Code in regular expressions, regular expression backtracking verbs,
12456fb12b70Safresh1and lvalue subroutines are no longer listed as experimental.  (This
12466fb12b70Safresh1also affects L<perlre> and L<perlsub>.)
12476fb12b70Safresh1
12486fb12b70Safresh1=back
12496fb12b70Safresh1
12506fb12b70Safresh1=head3 L<perlfunc>
12516fb12b70Safresh1
12526fb12b70Safresh1=over
12536fb12b70Safresh1
12546fb12b70Safresh1=item *
12556fb12b70Safresh1
12566fb12b70Safresh1C<chop> and C<chomp> now note that they can reset the hash iterator.
12576fb12b70Safresh1
12586fb12b70Safresh1=item *
12596fb12b70Safresh1
12606fb12b70Safresh1C<exec>'s handling of arguments is now more clearly documented.
12616fb12b70Safresh1
12626fb12b70Safresh1=item *
12636fb12b70Safresh1
12646fb12b70Safresh1C<eval EXPR> now has caveats about expanding floating point numbers in some
12656fb12b70Safresh1locales.
12666fb12b70Safresh1
12676fb12b70Safresh1=item *
12686fb12b70Safresh1
1269*e0680481Safresh1C<goto EXPR> is now documented to handle an expression that evaluates to a
12706fb12b70Safresh1code reference as if it was C<goto &$coderef>.  This behavior is at least ten
12716fb12b70Safresh1years old.
12726fb12b70Safresh1
12736fb12b70Safresh1=item *
12746fb12b70Safresh1
12756fb12b70Safresh1Since Perl v5.10, it has been possible for subroutines in C<@INC> to return
12766fb12b70Safresh1a reference to a scalar holding initial source code to prepend to the file.
12776fb12b70Safresh1This is now documented.
12786fb12b70Safresh1
12796fb12b70Safresh1=item *
12806fb12b70Safresh1
12816fb12b70Safresh1The documentation of C<ref> has been updated to recommend the use of
12826fb12b70Safresh1C<blessed>, C<isa> and C<reftype> when dealing with references to blessed
12836fb12b70Safresh1objects.
12846fb12b70Safresh1
12856fb12b70Safresh1=back
12866fb12b70Safresh1
12876fb12b70Safresh1=head3 L<perlguts>
12886fb12b70Safresh1
12896fb12b70Safresh1=over 4
12906fb12b70Safresh1
12916fb12b70Safresh1=item *
12926fb12b70Safresh1
12936fb12b70Safresh1Numerous minor changes have been made to reflect changes made to the perl
12946fb12b70Safresh1internals in this release.
12956fb12b70Safresh1
12966fb12b70Safresh1=item *
12976fb12b70Safresh1
12986fb12b70Safresh1New sections on L<Read-Only Values|perlguts/"Read-Only Values"> and
12996fb12b70Safresh1L<Copy on Write|perlguts/"Copy on Write"> have been added.
13006fb12b70Safresh1
13016fb12b70Safresh1=back
13026fb12b70Safresh1
13036fb12b70Safresh1=head3 L<perlhack>
13046fb12b70Safresh1
13056fb12b70Safresh1=over 4
13066fb12b70Safresh1
13076fb12b70Safresh1=item *
13086fb12b70Safresh1
13096fb12b70Safresh1The L<Super Quick Patch Guide|perlhack/SUPER QUICK PATCH GUIDE> section has
13106fb12b70Safresh1been updated.
13116fb12b70Safresh1
13126fb12b70Safresh1=back
13136fb12b70Safresh1
13146fb12b70Safresh1=head3 L<perlhacktips>
13156fb12b70Safresh1
13166fb12b70Safresh1=over 4
13176fb12b70Safresh1
13186fb12b70Safresh1=item *
13196fb12b70Safresh1
13206fb12b70Safresh1The documentation has been updated to include some more examples of C<gdb>
13216fb12b70Safresh1usage.
13226fb12b70Safresh1
13236fb12b70Safresh1=back
13246fb12b70Safresh1
13256fb12b70Safresh1=head3 L<perllexwarn>
13266fb12b70Safresh1
13276fb12b70Safresh1=over 4
13286fb12b70Safresh1
13296fb12b70Safresh1=item *
13306fb12b70Safresh1
13316fb12b70Safresh1The L<perllexwarn> documentation used to describe the hierarchy of warning
13326fb12b70Safresh1categories understood by the L<warnings> pragma. That description has now
13336fb12b70Safresh1been moved to the L<warnings> documentation itself, leaving L<perllexwarn>
13346fb12b70Safresh1as a stub that points to it. This change consolidates all documentation for
13356fb12b70Safresh1lexical warnings in a single place.
13366fb12b70Safresh1
13376fb12b70Safresh1=back
13386fb12b70Safresh1
13396fb12b70Safresh1=head3 L<perllocale>
13406fb12b70Safresh1
13416fb12b70Safresh1=over
13426fb12b70Safresh1
13436fb12b70Safresh1=item *
13446fb12b70Safresh1
13456fb12b70Safresh1The documentation now mentions F<fc()> and C<\F>, and includes many
13466fb12b70Safresh1clarifications and corrections in general.
13476fb12b70Safresh1
13486fb12b70Safresh1=back
13496fb12b70Safresh1
13506fb12b70Safresh1=head3 L<perlop>
13516fb12b70Safresh1
13526fb12b70Safresh1=over 4
13536fb12b70Safresh1
13546fb12b70Safresh1=item *
13556fb12b70Safresh1
13566fb12b70Safresh1The language design of Perl has always called for monomorphic operators.
13576fb12b70Safresh1This is now mentioned explicitly.
13586fb12b70Safresh1
13596fb12b70Safresh1=back
13606fb12b70Safresh1
13616fb12b70Safresh1=head3 L<perlopentut>
13626fb12b70Safresh1
13636fb12b70Safresh1=over 4
13646fb12b70Safresh1
13656fb12b70Safresh1=item *
13666fb12b70Safresh1
13676fb12b70Safresh1The C<open> tutorial has been completely rewritten by Tom Christiansen, and now
13686fb12b70Safresh1focuses on covering only the basics, rather than providing a comprehensive
13696fb12b70Safresh1reference to all things openable.  This rewrite came as the result of a
13706fb12b70Safresh1vigorous discussion on perl5-porters kicked off by a set of improvements
13716fb12b70Safresh1written by Alexander Hartmaier to the existing L<perlopentut>.  A "more than
13726fb12b70Safresh1you ever wanted to know about C<open>" document may follow in subsequent
13736fb12b70Safresh1versions of perl.
13746fb12b70Safresh1
13756fb12b70Safresh1=back
13766fb12b70Safresh1
13776fb12b70Safresh1=head3 L<perlre>
13786fb12b70Safresh1
13796fb12b70Safresh1=over 4
13806fb12b70Safresh1
13816fb12b70Safresh1=item *
13826fb12b70Safresh1
13836fb12b70Safresh1The fact that the regexp engine makes no effort to call (?{}) and (??{})
13846fb12b70Safresh1constructs any specified number of times (although it will basically DWIM
13856fb12b70Safresh1in case of a successful match) has been documented.
13866fb12b70Safresh1
13876fb12b70Safresh1=item *
13886fb12b70Safresh1
13896fb12b70Safresh1The C</r> modifier (for non-destructive substitution) is now documented. [perl
13906fb12b70Safresh1#119151]
13916fb12b70Safresh1
13926fb12b70Safresh1=item *
13936fb12b70Safresh1
13946fb12b70Safresh1The documentation for C</x> and C<(?# comment)> has been expanded and clarified.
13956fb12b70Safresh1
13966fb12b70Safresh1=back
13976fb12b70Safresh1
13986fb12b70Safresh1=head3 L<perlreguts>
13996fb12b70Safresh1
14006fb12b70Safresh1=over 4
14016fb12b70Safresh1
14026fb12b70Safresh1=item *
14036fb12b70Safresh1
14046fb12b70Safresh1The documentation has been updated in the light of recent changes to
14056fb12b70Safresh1F<regcomp.c>.
14066fb12b70Safresh1
14076fb12b70Safresh1=back
14086fb12b70Safresh1
14096fb12b70Safresh1=head3 L<perlsub>
14106fb12b70Safresh1
14116fb12b70Safresh1=over 4
14126fb12b70Safresh1
14136fb12b70Safresh1=item *
14146fb12b70Safresh1
14156fb12b70Safresh1The need to predeclare recursive functions with prototypes in order for the
14166fb12b70Safresh1prototype to be honoured in the recursive call is now documented. [perl #2726]
14176fb12b70Safresh1
14186fb12b70Safresh1=item *
14196fb12b70Safresh1
14206fb12b70Safresh1A list of subroutine names used by the perl implementation is now included.
14216fb12b70Safresh1[perl #77680]
14226fb12b70Safresh1
14236fb12b70Safresh1=back
14246fb12b70Safresh1
14256fb12b70Safresh1=head3 L<perltrap>
14266fb12b70Safresh1
14276fb12b70Safresh1=over 4
14286fb12b70Safresh1
14296fb12b70Safresh1=item *
14306fb12b70Safresh1
14316fb12b70Safresh1There is now a L<JavaScript|perltrap/JavaScript Traps> section.
14326fb12b70Safresh1
14336fb12b70Safresh1=back
14346fb12b70Safresh1
14356fb12b70Safresh1=head3 L<perlunicode>
14366fb12b70Safresh1
14376fb12b70Safresh1=over 4
14386fb12b70Safresh1
14396fb12b70Safresh1=item *
14406fb12b70Safresh1
14416fb12b70Safresh1The documentation has been updated to reflect C<Bidi_Class> changes in
14426fb12b70Safresh1Unicode 6.3.
14436fb12b70Safresh1
14446fb12b70Safresh1=back
14456fb12b70Safresh1
14466fb12b70Safresh1=head3 L<perlvar>
14476fb12b70Safresh1
14486fb12b70Safresh1=over 4
14496fb12b70Safresh1
14506fb12b70Safresh1=item *
14516fb12b70Safresh1
14526fb12b70Safresh1A new section explaining the performance issues of $`, $& and $', including
14536fb12b70Safresh1workarounds and changes in different versions of Perl, has been added.
14546fb12b70Safresh1
14556fb12b70Safresh1=item *
14566fb12b70Safresh1
14576fb12b70Safresh1Three L<English> variable names which have long been documented but do not
14586fb12b70Safresh1actually exist have been removed from the documentation.  These were
14596fb12b70Safresh1C<$OLD_PERL_VERSION>, C<$OFMT>, and C<$ARRAY_BASE>.
14606fb12b70Safresh1
1461b8851fccSafresh1(Actually, C<OLD_PERL_VERSION> I<does> exist, starting with this revision, but
1462b8851fccSafresh1remained undocumented until perl 5.22.0.)
1463b8851fccSafresh1
14646fb12b70Safresh1=back
14656fb12b70Safresh1
14666fb12b70Safresh1=head3 L<perlxs>
14676fb12b70Safresh1
14686fb12b70Safresh1=over 4
14696fb12b70Safresh1
14706fb12b70Safresh1=item *
14716fb12b70Safresh1
14726fb12b70Safresh1Several problems in the C<MY_CXT> example have been fixed.
14736fb12b70Safresh1
14746fb12b70Safresh1=back
14756fb12b70Safresh1
14766fb12b70Safresh1=head1 Diagnostics
14776fb12b70Safresh1
14786fb12b70Safresh1The following additions or changes have been made to diagnostic output,
14796fb12b70Safresh1including warnings and fatal error messages.  For the complete list of
14806fb12b70Safresh1diagnostic messages, see L<perldiag>.
14816fb12b70Safresh1
14826fb12b70Safresh1=head2 New Diagnostics
14836fb12b70Safresh1
14846fb12b70Safresh1=head3 New Errors
14856fb12b70Safresh1
14866fb12b70Safresh1=over 4
14876fb12b70Safresh1
14886fb12b70Safresh1=item *
14896fb12b70Safresh1
14906fb12b70Safresh1L<delete argument is indexE<sol>value array slice, use array slice|perldiag/"delete argument is index/value array slice, use array slice">
14916fb12b70Safresh1
14926fb12b70Safresh1(F) You used index/value array slice syntax (C<%array[...]>) as the argument to
14936fb12b70Safresh1C<delete>.  You probably meant C<@array[...]> with an @ symbol instead.
14946fb12b70Safresh1
14956fb12b70Safresh1=item *
14966fb12b70Safresh1
14976fb12b70Safresh1L<delete argument is keyE<sol>value hash slice, use hash slice|perldiag/"delete argument is key/value hash slice, use hash slice">
14986fb12b70Safresh1
14996fb12b70Safresh1(F) You used key/value hash slice syntax (C<%hash{...}>) as the argument to
15006fb12b70Safresh1C<delete>.  You probably meant C<@hash{...}> with an @ symbol instead.
15016fb12b70Safresh1
15026fb12b70Safresh1=item *
15036fb12b70Safresh1
15046fb12b70Safresh1L<Magical list constants are not supported|perldiag/"Magical list constants are
15056fb12b70Safresh1not supported">
15066fb12b70Safresh1
15076fb12b70Safresh1(F) You assigned a magical array to a stash element, and then tried to use the
15086fb12b70Safresh1subroutine from the same slot.  You are asking Perl to do something it cannot
15096fb12b70Safresh1do, details subject to change between Perl versions.
15106fb12b70Safresh1
15116fb12b70Safresh1=item *
15126fb12b70Safresh1
15136fb12b70Safresh1Added L<Setting $E<sol> to a %s reference is forbidden|perldiag/"Setting $E<sol> to %s reference is forbidden">
15146fb12b70Safresh1
15156fb12b70Safresh1=back
15166fb12b70Safresh1
15176fb12b70Safresh1=head3 New Warnings
15186fb12b70Safresh1
15196fb12b70Safresh1=over 4
15206fb12b70Safresh1
15216fb12b70Safresh1=item *
15226fb12b70Safresh1
15236fb12b70Safresh1L<%s on reference is experimental|perldiag/"push on reference is experimental">:
15246fb12b70Safresh1
15256fb12b70Safresh1The "auto-deref" feature is experimental.
15266fb12b70Safresh1
15276fb12b70Safresh1Starting in v5.14.0, it was possible to use push, pop, keys, and other
15286fb12b70Safresh1built-in functions not only on aggregate types, but on references to
15296fb12b70Safresh1them.  The feature was not deployed to its original intended
15306fb12b70Safresh1specification, and now may become redundant to postfix dereferencing.
15316fb12b70Safresh1It has always been categorized as an experimental feature, and in
15326fb12b70Safresh1v5.20.0 is carries a warning as such.
15336fb12b70Safresh1
15346fb12b70Safresh1Warnings will now be issued at compile time when these operations are
15356fb12b70Safresh1detected.
15366fb12b70Safresh1
15376fb12b70Safresh1  no if $] >= 5.01908, warnings => "experimental::autoderef";
15386fb12b70Safresh1
15396fb12b70Safresh1Consider, though, replacing the use of these features, as they may
15406fb12b70Safresh1change behavior again before becoming stable.
15416fb12b70Safresh1
15426fb12b70Safresh1=item *
15436fb12b70Safresh1
15446fb12b70Safresh1L<A sequence of multiple spaces in a charnames alias definition is deprecated|perldiag/"A sequence of multiple spaces in a charnames alias definition is deprecated">
15456fb12b70Safresh1
15466fb12b70Safresh1L<Trailing white-space in a charnames alias definition is deprecated|perldiag/"Trailing white-space in a charnames alias definition is deprecated">
15476fb12b70Safresh1
15486fb12b70Safresh1These two deprecation warnings involving C<\N{...}> were incorrectly
15496fb12b70Safresh1implemented.  They did not warn by default (now they do) and could not be
15506fb12b70Safresh1made fatal via C<< use warnings FATAL => 'deprecated' >> (now they can).
15516fb12b70Safresh1
15526fb12b70Safresh1=item *
15536fb12b70Safresh1
15546fb12b70Safresh1L<Attribute prototype(%s) discards earlier prototype attribute in same sub|perldiag/"Attribute prototype(%s) discards earlier prototype attribute in same sub">
15556fb12b70Safresh1
15566fb12b70Safresh1(W misc) A sub was declared as C<sub foo : prototype(A) : prototype(B) {}>, for
15576fb12b70Safresh1example.  Since each sub can only have one prototype, the earlier
15586fb12b70Safresh1declaration(s) are discarded while the last one is applied.
15596fb12b70Safresh1
15606fb12b70Safresh1=item *
15616fb12b70Safresh1
15626fb12b70Safresh1L<Invalid \0 character in %s for %s: %s\0%s|perldiag/"Invalid \0 character in %s for %s: %s\0%s">
15636fb12b70Safresh1
15646fb12b70Safresh1(W syscalls) Embedded \0 characters in pathnames or other system call arguments
15656fb12b70Safresh1produce a warning as of 5.20.  The parts after the \0 were formerly ignored by
15666fb12b70Safresh1system calls.
15676fb12b70Safresh1
15686fb12b70Safresh1=item *
15696fb12b70Safresh1
15706fb12b70Safresh1L<Matched non-Unicode code point 0x%X against Unicode property; may not be portable|perldiag/"Matched non-Unicode code point 0x%X against Unicode property; may not be portable">.
15716fb12b70Safresh1
15726fb12b70Safresh1This replaces the message "Code point 0x%X is not Unicode, all \p{} matches
15736fb12b70Safresh1fail; all \P{} matches succeed".
15746fb12b70Safresh1
15756fb12b70Safresh1=item *
15766fb12b70Safresh1
15776fb12b70Safresh1L<Missing ']' in prototype for %s : %s|perldiag/"Missing ']' in prototype for %s : %s">
15786fb12b70Safresh1
15796fb12b70Safresh1(W illegalproto) A grouping was started with C<[> but never closed with C<]>.
15806fb12b70Safresh1
15816fb12b70Safresh1=item *
15826fb12b70Safresh1
15836fb12b70Safresh1L<Possible precedence issue with control flow operator|perldiag/"Possible precedence issue with control flow operator">
15846fb12b70Safresh1
15856fb12b70Safresh1(W syntax) There is a possible problem with the mixing of a control flow
15866fb12b70Safresh1operator (e.g. C<return>) and a low-precedence operator like C<or>.  Consider:
15876fb12b70Safresh1
15886fb12b70Safresh1    sub { return $a or $b; }
15896fb12b70Safresh1
15906fb12b70Safresh1This is parsed as:
15916fb12b70Safresh1
15926fb12b70Safresh1    sub { (return $a) or $b; }
15936fb12b70Safresh1
15946fb12b70Safresh1Which is effectively just:
15956fb12b70Safresh1
15966fb12b70Safresh1    sub { return $a; }
15976fb12b70Safresh1
15986fb12b70Safresh1Either use parentheses or the high-precedence variant of the operator.
15996fb12b70Safresh1
16006fb12b70Safresh1Note this may be also triggered for constructs like:
16016fb12b70Safresh1
16026fb12b70Safresh1    sub { 1 if die; }
16036fb12b70Safresh1
16046fb12b70Safresh1=item *
16056fb12b70Safresh1
16066fb12b70Safresh1L<Postfix dereference is experimental|perldiag/"Postfix dereference is experimental">
16076fb12b70Safresh1
16086fb12b70Safresh1(S experimental::postderef) This warning is emitted if you use the experimental
16096fb12b70Safresh1postfix dereference syntax.  Simply suppress the warning if you want to use the
16106fb12b70Safresh1feature, but know that in doing so you are taking the risk of using an
16116fb12b70Safresh1experimental feature which may change or be removed in a future Perl version:
16126fb12b70Safresh1
16136fb12b70Safresh1    no warnings "experimental::postderef";
16146fb12b70Safresh1    use feature "postderef", "postderef_qq";
16156fb12b70Safresh1    $ref->$*;
16166fb12b70Safresh1    $aref->@*;
16176fb12b70Safresh1    $aref->@[@indices];
16186fb12b70Safresh1    ... etc ...
16196fb12b70Safresh1
16206fb12b70Safresh1=item *
16216fb12b70Safresh1
16226fb12b70Safresh1L<Prototype '%s' overridden by attribute 'prototype(%s)' in %s|perldiag/"Prototype '%s' overridden by attribute 'prototype(%s)' in %s">
16236fb12b70Safresh1
16246fb12b70Safresh1(W prototype) A prototype was declared in both the parentheses after the sub
16256fb12b70Safresh1name and via the prototype attribute.  The prototype in parentheses is useless,
16266fb12b70Safresh1since it will be replaced by the prototype from the attribute before it's ever
16276fb12b70Safresh1used.
16286fb12b70Safresh1
16296fb12b70Safresh1=item *
16306fb12b70Safresh1
16316fb12b70Safresh1L<Scalar value @%s[%s] better written as $%s[%s]|perldiag/"Scalar value @%s[%s] better written as $%s[%s]">
16326fb12b70Safresh1
16336fb12b70Safresh1(W syntax) In scalar context, you've used an array index/value slice (indicated
16346fb12b70Safresh1by %) to select a single element of an array.  Generally it's better to ask for
16356fb12b70Safresh1a scalar value (indicated by $).  The difference is that C<$foo[&bar]> always
16366fb12b70Safresh1behaves like a scalar, both in the value it returns and when evaluating its
16376fb12b70Safresh1argument, while C<%foo[&bar]> provides a list context to its subscript, which
16386fb12b70Safresh1can do weird things if you're expecting only one subscript.  When called in
16396fb12b70Safresh1list context, it also returns the index (what C<&bar> returns) in addition to
16406fb12b70Safresh1the value.
16416fb12b70Safresh1
16426fb12b70Safresh1=item *
16436fb12b70Safresh1
16446fb12b70Safresh1L<Scalar value @%s{%s} better written as $%s{%s}|perldiag/"Scalar value @%s{%s} better written as $%s{%s}">
16456fb12b70Safresh1
16466fb12b70Safresh1(W syntax) In scalar context, you've used a hash key/value slice (indicated by
16476fb12b70Safresh1%) to select a single element of a hash.  Generally it's better to ask for a
16486fb12b70Safresh1scalar value (indicated by $).  The difference is that C<$foo{&bar}> always
16496fb12b70Safresh1behaves like a scalar, both in the value it returns and when evaluating its
16506fb12b70Safresh1argument, while C<@foo{&bar}> and provides a list context to its subscript,
16516fb12b70Safresh1which can do weird things if you're expecting only one subscript.  When called
16526fb12b70Safresh1in list context, it also returns the key in addition to the value.
16536fb12b70Safresh1
16546fb12b70Safresh1=item *
16556fb12b70Safresh1
16566fb12b70Safresh1L<Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef|perldiag/"Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef">
16576fb12b70Safresh1
16586fb12b70Safresh1=item *
16596fb12b70Safresh1
16606fb12b70Safresh1L<Unexpected exit %u|perldiag/"Unexpected exit %u">
16616fb12b70Safresh1
16626fb12b70Safresh1(S) exit() was called or the script otherwise finished gracefully when
16636fb12b70Safresh1C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.
16646fb12b70Safresh1
16656fb12b70Safresh1=item *
16666fb12b70Safresh1
16676fb12b70Safresh1L<Unexpected exit failure %d|perldiag/"Unexpected exit failure %d">
16686fb12b70Safresh1
16696fb12b70Safresh1(S) An uncaught die() was called when C<PERL_EXIT_WARN> was set in
16706fb12b70Safresh1C<PL_exit_flags>.
16716fb12b70Safresh1
16726fb12b70Safresh1=item *
16736fb12b70Safresh1
16746fb12b70Safresh1L<Use of literal control characters in variable names is deprecated|perldiag/"Use of literal control characters in variable names is deprecated">
16756fb12b70Safresh1
16766fb12b70Safresh1(D deprecated) Using literal control characters in the source to refer to the
16776fb12b70Safresh1^FOO variables, like $^X and ${^GLOBAL_PHASE} is now deprecated.  This only
16786fb12b70Safresh1affects code like $\cT, where \cT is a control (like a C<SOH>) in the
16796fb12b70Safresh1source code: ${"\cT"} and $^T remain valid.
16806fb12b70Safresh1
16816fb12b70Safresh1=item *
16826fb12b70Safresh1
16836fb12b70Safresh1L<Useless use of greediness modifier|perldiag/"Useless use of greediness modifier '%c' in regex; marked by <-- HERE in m/%s/">
16846fb12b70Safresh1
16856fb12b70Safresh1This fixes [Perl #42957].
16866fb12b70Safresh1
16876fb12b70Safresh1=back
16886fb12b70Safresh1
16896fb12b70Safresh1=head2 Changes to Existing Diagnostics
16906fb12b70Safresh1
16916fb12b70Safresh1=over 4
16926fb12b70Safresh1
16936fb12b70Safresh1=item *
16946fb12b70Safresh1
16956fb12b70Safresh1Warnings and errors from the regexp engine are now UTF-8 clean.
16966fb12b70Safresh1
16976fb12b70Safresh1=item *
16986fb12b70Safresh1
16996fb12b70Safresh1The "Unknown switch condition" error message has some slight changes.  This
17006fb12b70Safresh1error triggers when there is an unknown condition in a C<(?(foo))> conditional.
17016fb12b70Safresh1The error message used to read:
17026fb12b70Safresh1
17036fb12b70Safresh1    Unknown switch condition (?(%s in regex;
17046fb12b70Safresh1
17056fb12b70Safresh1But what %s could be was mostly up to luck.  For C<(?(foobar))>, you might have
17066fb12b70Safresh1seen "fo" or "f".  For Unicode characters, you would generally get a corrupted
17076fb12b70Safresh1string.  The message has been changed to read:
17086fb12b70Safresh1
17096fb12b70Safresh1    Unknown switch condition (?(...)) in regex;
17106fb12b70Safresh1
17116fb12b70Safresh1Additionally, the C<'E<lt>-- HERE'> marker in the error will now point to the
17126fb12b70Safresh1correct spot in the regex.
17136fb12b70Safresh1
17146fb12b70Safresh1=item *
17156fb12b70Safresh1
17166fb12b70Safresh1The "%s "\x%X" does not map to Unicode" warning is now correctly listed as a
17176fb12b70Safresh1severe warning rather than as a fatal error.
17186fb12b70Safresh1
17196fb12b70Safresh1=item *
17206fb12b70Safresh1
17216fb12b70Safresh1Under rare circumstances, one could get a "Can't coerce readonly REF to
17226fb12b70Safresh1string" instead of the customary "Modification of a read-only value".  This
17236fb12b70Safresh1alternate error message has been removed.
17246fb12b70Safresh1
17256fb12b70Safresh1=item *
17266fb12b70Safresh1
17276fb12b70Safresh1"Ambiguous use of * resolved as operator *": This and similar warnings
17286fb12b70Safresh1about "%" and "&" used to occur in some circumstances where there was no
17296fb12b70Safresh1operator of the type cited, so the warning was completely wrong.  This has
17306fb12b70Safresh1been fixed [perl #117535, #76910].
17316fb12b70Safresh1
17326fb12b70Safresh1=item *
17336fb12b70Safresh1
17346fb12b70Safresh1Warnings about malformed subroutine prototypes are now more consistent in
17356fb12b70Safresh1how the prototypes are rendered.  Some of these warnings would truncate
17366fb12b70Safresh1prototypes containing nulls.  In other cases one warning would suppress
17376fb12b70Safresh1another.  The warning about illegal characters in prototypes no longer says
17386fb12b70Safresh1"after '_'" if the bad character came before the underscore.
17396fb12b70Safresh1
17406fb12b70Safresh1=item *
17416fb12b70Safresh1
17426fb12b70Safresh1L<Perl folding rules are not up-to-date for 0x%X; please use the perlbug
17436fb12b70Safresh1utility to report; in regex; marked by <-- HERE in
17446fb12b70Safresh1mE<sol>%sE<sol>|perldiag/"Perl folding rules are not up-to-date for 0x%X;
17456fb12b70Safresh1please use the perlbug utility to report; in regex; marked by <-- HERE in
17466fb12b70Safresh1m/%s/">
17476fb12b70Safresh1
17486fb12b70Safresh1This message is now only in the regexp category, and not in the deprecated
17496fb12b70Safresh1category.  It is still a default (i.e., severe) warning [perl #89648].
17506fb12b70Safresh1
17516fb12b70Safresh1=item *
17526fb12b70Safresh1
17536fb12b70Safresh1L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">
17546fb12b70Safresh1
17556fb12b70Safresh1This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
17566fb12b70Safresh1be in scalar context at compile time.  Previously it was worded "Scalar
17576fb12b70Safresh1value %%s[%s] better written as $%s[%s]".
17586fb12b70Safresh1
17596fb12b70Safresh1=item *
17606fb12b70Safresh1
17616fb12b70Safresh1L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:
17626fb12b70Safresh1
17636fb12b70Safresh1The description for this diagnostic has been extended to cover all cases where the warning may occur.
17646fb12b70Safresh1Issues with the positioning of the arrow indicator have also been resolved.
17656fb12b70Safresh1
17666fb12b70Safresh1=item *
17676fb12b70Safresh1
17686fb12b70Safresh1The error messages for C<my($a?$b$c)> and C<my(do{})> now mention "conditional
17696fb12b70Safresh1expression" and "do block", respectively, instead of reading 'Can't declare
17706fb12b70Safresh1null operation in "my"'.
17716fb12b70Safresh1
17726fb12b70Safresh1=item *
17736fb12b70Safresh1
17746fb12b70Safresh1When C<use re "debug"> executes a regex containing a backreference, the
17756fb12b70Safresh1debugging output now shows what string is being matched.
17766fb12b70Safresh1
17776fb12b70Safresh1=item *
17786fb12b70Safresh1
17796fb12b70Safresh1The now fatal error message C<Character following "\c" must be ASCII> has been
17806fb12b70Safresh1reworded as C<Character following "\c" must be printable ASCII> to emphasize
17816fb12b70Safresh1that in C<\cI<X>>, I<X> must be a I<printable (non-control)> ASCII character.
17826fb12b70Safresh1
17836fb12b70Safresh1=back
17846fb12b70Safresh1
17856fb12b70Safresh1=head1 Utility Changes
17866fb12b70Safresh1
17876fb12b70Safresh1=head3 L<a2p>
17886fb12b70Safresh1
17896fb12b70Safresh1=over 4
17906fb12b70Safresh1
17916fb12b70Safresh1=item *
17926fb12b70Safresh1
17936fb12b70Safresh1A possible crash from an off-by-one error when trying to access before the
17946fb12b70Safresh1beginning of a buffer has been fixed.  [perl #120244]
17956fb12b70Safresh1
17966fb12b70Safresh1=back
17976fb12b70Safresh1
17986fb12b70Safresh1=head3 F<bisect.pl>
17996fb12b70Safresh1
18006fb12b70Safresh1The git bisection tool F<Porting/bisect.pl> has had many enhancements.
18016fb12b70Safresh1
18026fb12b70Safresh1It is provided as part of the source distribution but not installed because
18036fb12b70Safresh1it is not self-contained as it relies on being run from within a git
18046fb12b70Safresh1checkout. Note also that it makes no attempt to fix tests, correct runtime
18056fb12b70Safresh1bugs or make something useful to install - its purpose is to make minimal
18066fb12b70Safresh1changes to get any historical revision of interest to build and run as close
18076fb12b70Safresh1as possible to "as-was", and thereby make C<git bisect> easy to use.
18086fb12b70Safresh1
18096fb12b70Safresh1=over 4
18106fb12b70Safresh1
18116fb12b70Safresh1=item *
18126fb12b70Safresh1
18136fb12b70Safresh1Can optionally run the test case with a timeout.
18146fb12b70Safresh1
18156fb12b70Safresh1=item *
18166fb12b70Safresh1
18176fb12b70Safresh1Can now run in-place in a clean git checkout.
18186fb12b70Safresh1
18196fb12b70Safresh1=item *
18206fb12b70Safresh1
18216fb12b70Safresh1Can run the test case under C<valgrind>.
18226fb12b70Safresh1
18236fb12b70Safresh1=item *
18246fb12b70Safresh1
18256fb12b70Safresh1Can apply user supplied patches and fixes to the source checkout before
18266fb12b70Safresh1building.
18276fb12b70Safresh1
18286fb12b70Safresh1=item *
18296fb12b70Safresh1
18306fb12b70Safresh1Now has fixups to enable building several more historical ranges of bleadperl,
18316fb12b70Safresh1which can be useful for pinpointing the origins of bugs or behaviour changes.
18326fb12b70Safresh1
18336fb12b70Safresh1=back
18346fb12b70Safresh1
18356fb12b70Safresh1=head3 L<find2perl>
18366fb12b70Safresh1
18376fb12b70Safresh1=over 4
18386fb12b70Safresh1
18396fb12b70Safresh1=item *
18406fb12b70Safresh1
18416fb12b70Safresh1L<find2perl> now handles C<?> wildcards correctly.  [perl #113054]
18426fb12b70Safresh1
18436fb12b70Safresh1=back
18446fb12b70Safresh1
18456fb12b70Safresh1=head3 L<perlbug>
18466fb12b70Safresh1
18476fb12b70Safresh1=over 4
18486fb12b70Safresh1
18496fb12b70Safresh1=item *
18506fb12b70Safresh1
18516fb12b70Safresh1F<perlbug> now has a C<-p> option for attaching patches with a bug report.
18526fb12b70Safresh1
18536fb12b70Safresh1=item *
18546fb12b70Safresh1
18556fb12b70Safresh1L<perlbug> has been modified to supply the report template with CRLF line
18566fb12b70Safresh1endings on Windows.
1857eac174f2Safresh1L<[GH #13612]|https://github.com/Perl/perl5/issues/13612>
18586fb12b70Safresh1
18596fb12b70Safresh1=item *
18606fb12b70Safresh1
18616fb12b70Safresh1L<perlbug> now makes as few assumptions as possible about the encoding of the
18626fb12b70Safresh1report.  This will likely change in the future to assume UTF-8 by default but
18636fb12b70Safresh1allow a user override.
18646fb12b70Safresh1
18656fb12b70Safresh1=back
18666fb12b70Safresh1
18676fb12b70Safresh1=head1 Configuration and Compilation
18686fb12b70Safresh1
18696fb12b70Safresh1=over 4
18706fb12b70Safresh1
18716fb12b70Safresh1=item *
18726fb12b70Safresh1
18736fb12b70Safresh1The F<Makefile.PL> for L<SDBM_File> now generates a better F<Makefile>, which
18746fb12b70Safresh1avoids a race condition during parallel makes, which could cause the build to
18756fb12b70Safresh1fail.  This is the last known parallel make problem (on *nix platforms), and
18766fb12b70Safresh1therefore we believe that a parallel make should now always be error free.
18776fb12b70Safresh1
18786fb12b70Safresh1=item *
18796fb12b70Safresh1
18806fb12b70Safresh1F<installperl> and F<installman>'s option handling has been refactored to use
18816fb12b70Safresh1L<Getopt::Long>. Both are used by the F<Makefile> C<install> targets, and
18826fb12b70Safresh1are not installed, so these changes are only likely to affect custom
18836fb12b70Safresh1installation scripts.
18846fb12b70Safresh1
18856fb12b70Safresh1=over 4
18866fb12b70Safresh1
18876fb12b70Safresh1=item *
18886fb12b70Safresh1
18896fb12b70Safresh1Single letter options now also have long names.
18906fb12b70Safresh1
18916fb12b70Safresh1=item *
18926fb12b70Safresh1
18936fb12b70Safresh1Invalid options are now rejected.
18946fb12b70Safresh1
18956fb12b70Safresh1=item *
18966fb12b70Safresh1
18976fb12b70Safresh1Command line arguments that are not options are now rejected.
18986fb12b70Safresh1
18996fb12b70Safresh1=item *
19006fb12b70Safresh1
19016fb12b70Safresh1Each now has a C<--help> option to display the usage message.
19026fb12b70Safresh1
19036fb12b70Safresh1=back
19046fb12b70Safresh1
19056fb12b70Safresh1The behaviour for all valid documented invocations is unchanged.
19066fb12b70Safresh1
19076fb12b70Safresh1=item *
19086fb12b70Safresh1
19096fb12b70Safresh1Where possible, the build now avoids recursive invocations of F<make> when
19106fb12b70Safresh1building pure-Perl extensions, without removing any parallelism from the
19116fb12b70Safresh1build. Currently around 80 extensions can be processed directly by the
19126fb12b70Safresh1F<make_ext.pl> tool, meaning that 80 invocations of F<make> and 160
19136fb12b70Safresh1invocations of F<miniperl> are no longer made.
19146fb12b70Safresh1
19156fb12b70Safresh1=item *
19166fb12b70Safresh1
19176fb12b70Safresh1The build system now works correctly when compiling under GCC or Clang with
19186fb12b70Safresh1link-time optimization enabled (the C<-flto> option). [perl #113022]
19196fb12b70Safresh1
19206fb12b70Safresh1=item *
19216fb12b70Safresh1
19226fb12b70Safresh1Distinct library basenames with C<d_libname_unique>.
19236fb12b70Safresh1
19246fb12b70Safresh1When compiling perl with this option, the library files for XS modules are
19256fb12b70Safresh1named something "unique" -- for example, Hash/Util/Util.so becomes
19266fb12b70Safresh1Hash/Util/PL_Hash__Util.so.  This behavior is similar to what currently
19276fb12b70Safresh1happens on VMS, and serves as groundwork for the Android port.
19286fb12b70Safresh1
19296fb12b70Safresh1=item *
19306fb12b70Safresh1
19316fb12b70Safresh1C<sysroot> option to indicate the logical root directory under gcc and clang.
19326fb12b70Safresh1
19336fb12b70Safresh1When building with this option set, both Configure and the compilers search
19346fb12b70Safresh1for all headers and libraries under this new sysroot, instead of /.
19356fb12b70Safresh1
19366fb12b70Safresh1This is a huge time saver if cross-compiling, but can also help
19376fb12b70Safresh1on native builds if your toolchain's files have non-standard locations.
19386fb12b70Safresh1
19396fb12b70Safresh1=item *
19406fb12b70Safresh1
19416fb12b70Safresh1The cross-compilation model has been renovated.
19426fb12b70Safresh1There's several new options, and some backwards-incompatible changes:
19436fb12b70Safresh1
19446fb12b70Safresh1We now build binaries for miniperl and generate_uudmap to be used on the host,
19456fb12b70Safresh1rather than running every miniperl call on the target; this means that, short
19466fb12b70Safresh1of 'make test', we no longer need access to the target system once Configure is
19476fb12b70Safresh1done.  You can provide already-built binaries through the C<hostperl> and
19486fb12b70Safresh1C<hostgenerate> options to Configure.
19496fb12b70Safresh1
19506fb12b70Safresh1Additionally, if targeting an EBCDIC platform from an ASCII host,
19516fb12b70Safresh1or viceversa, you'll need to run Configure with C<-Uhostgenerate>, to
19526fb12b70Safresh1indicate that generate_uudmap should be run on the target.
19536fb12b70Safresh1
19546fb12b70Safresh1Finally, there's also a way of having Configure end early, right after
19556fb12b70Safresh1building the host binaries, by cross-compiling without specifying a
19566fb12b70Safresh1C<targethost>.
19576fb12b70Safresh1
19586fb12b70Safresh1The incompatible changes include no longer using xconfig.h, xlib, or
19596fb12b70Safresh1Cross.pm, so canned config files and Makefiles will have to be updated.
19606fb12b70Safresh1
19616fb12b70Safresh1=item *
19626fb12b70Safresh1
19636fb12b70Safresh1Related to the above, there is now a way of specifying the location of sh
19646fb12b70Safresh1(or equivalent) on the target system: C<targetsh>.
19656fb12b70Safresh1
19666fb12b70Safresh1For example, Android has its sh in /system/bin/sh, so if cross-compiling
19676fb12b70Safresh1from a more normal Unixy system with sh in /bin/sh, "targetsh" would end
19686fb12b70Safresh1up as /system/bin/sh, and "sh" as /bin/sh.
19696fb12b70Safresh1
19706fb12b70Safresh1=item *
19716fb12b70Safresh1
19726fb12b70Safresh1By default, B<gcc> 4.9 does some optimizations that break perl.  The B<-fwrapv>
19736fb12b70Safresh1option disables those optimizations (and probably others), so for B<gcc> 4.3
19746fb12b70Safresh1and later (since the there might be similar problems lurking on older versions
19756fb12b70Safresh1too, but B<-fwrapv> was broken before 4.3, and the optimizations probably won't
19766fb12b70Safresh1go away), F<Configure> now adds B<-fwrapv> unless the user requests
19776fb12b70Safresh1B<-fno-wrapv>, which disables B<-fwrapv>, or B<-fsanitize=undefined>, which
19786fb12b70Safresh1turns the overflows B<-fwrapv> ignores into runtime errors.
1979eac174f2Safresh1L<[GH #13690]|https://github.com/Perl/perl5/issues/13690>
19806fb12b70Safresh1
19816fb12b70Safresh1=back
19826fb12b70Safresh1
19836fb12b70Safresh1=head1 Testing
19846fb12b70Safresh1
19856fb12b70Safresh1=over 4
19866fb12b70Safresh1
19876fb12b70Safresh1=item *
19886fb12b70Safresh1
19896fb12b70Safresh1The C<test.valgrind> make target now allows tests to be run in parallel.
19906fb12b70Safresh1This target allows Perl's test suite to be run under Valgrind, which detects
19916fb12b70Safresh1certain sorts of C programming errors, though at significant cost in running
19926fb12b70Safresh1time. On suitable hardware, allowing parallel execution claws back a lot of
19936fb12b70Safresh1that additional cost. [perl #121431]
19946fb12b70Safresh1
19956fb12b70Safresh1=item *
19966fb12b70Safresh1
19976fb12b70Safresh1Various tests in F<t/porting/> are no longer skipped when the perl
19986fb12b70Safresh1F<.git> directory is outside the perl tree and pointed to by
19996fb12b70Safresh1C<$GIT_DIR>. [perl #120505]
20006fb12b70Safresh1
20016fb12b70Safresh1=item *
20026fb12b70Safresh1
20036fb12b70Safresh1The test suite no longer fails when the user's interactive shell maintains a
20046fb12b70Safresh1C<$PWD> environment variable, but the F</bin/sh> used for running tests
20056fb12b70Safresh1doesn't.
20066fb12b70Safresh1
20076fb12b70Safresh1=back
20086fb12b70Safresh1
20096fb12b70Safresh1=head1 Platform Support
20106fb12b70Safresh1
20116fb12b70Safresh1=head2 New Platforms
20126fb12b70Safresh1
20136fb12b70Safresh1=over 4
20146fb12b70Safresh1
20156fb12b70Safresh1=item Android
20166fb12b70Safresh1
20176fb12b70Safresh1Perl can now be built for Android, either natively or through
20186fb12b70Safresh1cross-compilation, for all three currently available architectures (ARM,
20196fb12b70Safresh1MIPS, and x86), on a wide range of versions.
20206fb12b70Safresh1
20216fb12b70Safresh1=item Bitrig
20226fb12b70Safresh1
20236fb12b70Safresh1Compile support has been added for Bitrig, a fork of OpenBSD.
20246fb12b70Safresh1
20256fb12b70Safresh1=item FreeMiNT
20266fb12b70Safresh1
20276fb12b70Safresh1Support has been added for FreeMiNT, a free open-source OS for the Atari ST
20286fb12b70Safresh1system and its successors, based on the original MiNT that was officially
20296fb12b70Safresh1adopted by Atari.
20306fb12b70Safresh1
20316fb12b70Safresh1=item Synology
20326fb12b70Safresh1
20336fb12b70Safresh1Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
20346fb12b70Safresh1cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
20356fb12b70Safresh1P1022 ppc - e500v2) not meant for workstations or development. These boxes
20366fb12b70Safresh1should build now. The basic problems are the non-standard location for tools.
20376fb12b70Safresh1
20386fb12b70Safresh1=back
20396fb12b70Safresh1
20406fb12b70Safresh1=head2 Discontinued Platforms
20416fb12b70Safresh1
20426fb12b70Safresh1=over 4
20436fb12b70Safresh1
20446fb12b70Safresh1=item C<sfio>
20456fb12b70Safresh1
20466fb12b70Safresh1Code related to supporting the C<sfio> I/O system has been removed.
20476fb12b70Safresh1
20486fb12b70Safresh1Perl 5.004 added support to use the native API of C<sfio>, AT&T's Safe/Fast
20496fb12b70Safresh1I/O library. This code still built with v5.8.0, albeit with many regression
20506fb12b70Safresh1tests failing, but was inadvertently broken before the v5.8.1 release,
20516fb12b70Safresh1meaning that it has not worked on any version of Perl released since then.
20526fb12b70Safresh1In over a decade we have received no bug reports about this, hence it is clear
20536fb12b70Safresh1that no-one is using this functionality on any version of Perl that is still
20546fb12b70Safresh1supported to any degree.
20556fb12b70Safresh1
20566fb12b70Safresh1=item AT&T 3b1
20576fb12b70Safresh1
20586fb12b70Safresh1Configure support for the 3b1, also known as the AT&T Unix PC (and the similar
20596fb12b70Safresh1AT&T 7300), has been removed.
20606fb12b70Safresh1
20616fb12b70Safresh1=item DG/UX
20626fb12b70Safresh1
20636fb12b70Safresh1DG/UX was a Unix sold by Data General. The last release was in April 2001.
20646fb12b70Safresh1It only runs on Data General's own hardware.
20656fb12b70Safresh1
20666fb12b70Safresh1=item EBCDIC
20676fb12b70Safresh1
20686fb12b70Safresh1In the absence of a regular source of smoke reports, code intended to support
20696fb12b70Safresh1native EBCDIC platforms will be removed from perl before 5.22.0.
20706fb12b70Safresh1
20716fb12b70Safresh1=back
20726fb12b70Safresh1
20736fb12b70Safresh1=head2 Platform-Specific Notes
20746fb12b70Safresh1
20756fb12b70Safresh1=over 4
20766fb12b70Safresh1
20776fb12b70Safresh1=item Cygwin
20786fb12b70Safresh1
20796fb12b70Safresh1=over 4
20806fb12b70Safresh1
20816fb12b70Safresh1=item *
20826fb12b70Safresh1
20836fb12b70Safresh1recv() on a connected handle would populate the returned sender
20846fb12b70Safresh1address with whatever happened to be in the working buffer.  recv()
20856fb12b70Safresh1now uses a workaround similar to the Win32 recv() wrapper and returns
20866fb12b70Safresh1an empty string when recvfrom(2) doesn't modify the supplied address
20876fb12b70Safresh1length. [perl #118843]
20886fb12b70Safresh1
20896fb12b70Safresh1=item *
20906fb12b70Safresh1
20916fb12b70Safresh1Fixed a build error in cygwin.c on Cygwin 1.7.28.
20926fb12b70Safresh1
20936fb12b70Safresh1Tests now handle the errors that occur when C<cygserver> isn't
20946fb12b70Safresh1running.
20956fb12b70Safresh1
20966fb12b70Safresh1=back
20976fb12b70Safresh1
20986fb12b70Safresh1=item GNU/Hurd
20996fb12b70Safresh1
21006fb12b70Safresh1The BSD compatibility library C<libbsd> is no longer required for builds.
21016fb12b70Safresh1
21026fb12b70Safresh1=item Linux
21036fb12b70Safresh1
21046fb12b70Safresh1The hints file now looks for C<libgdbm_compat> only if C<libgdbm> itself is
21056fb12b70Safresh1also wanted. The former is never useful without the latter, and in some
21066fb12b70Safresh1circumstances, including it could actually prevent building.
21076fb12b70Safresh1
21086fb12b70Safresh1=item Mac OS
21096fb12b70Safresh1
21106fb12b70Safresh1The build system now honors an C<ld> setting supplied by the user running
21116fb12b70Safresh1F<Configure>.
21126fb12b70Safresh1
21136fb12b70Safresh1=item MidnightBSD
21146fb12b70Safresh1
21156fb12b70Safresh1C<objformat> was removed from version 0.4-RELEASE of MidnightBSD and had been
21166fb12b70Safresh1deprecated on earlier versions.  This caused the build environment to be
21176fb12b70Safresh1erroneously configured for C<a.out> rather than C<elf>.  This has been now
21186fb12b70Safresh1been corrected.
21196fb12b70Safresh1
21206fb12b70Safresh1=item Mixed-endian platforms
21216fb12b70Safresh1
21226fb12b70Safresh1The code supporting C<pack> and C<unpack> operations on mixed endian
21236fb12b70Safresh1platforms has been removed. We believe that Perl has long been unable to
21246fb12b70Safresh1build on mixed endian architectures (such as PDP-11s), so we don't think
21256fb12b70Safresh1that this change will affect any platforms which were able to build v5.18.0.
21266fb12b70Safresh1
21276fb12b70Safresh1=item VMS
21286fb12b70Safresh1
21296fb12b70Safresh1=over 4
21306fb12b70Safresh1
21316fb12b70Safresh1=item *
21326fb12b70Safresh1
21336fb12b70Safresh1The C<PERL_ENV_TABLES> feature to control the population of %ENV at perl
21346fb12b70Safresh1start-up was broken in Perl 5.16.0 but has now been fixed.
21356fb12b70Safresh1
21366fb12b70Safresh1=item *
21376fb12b70Safresh1
21386fb12b70Safresh1Skip access checks on remotes in opendir().  [perl #121002]
21396fb12b70Safresh1
21406fb12b70Safresh1=item *
21416fb12b70Safresh1
21426fb12b70Safresh1A check for glob metacharacters in a path returned by the
21436fb12b70Safresh1L<C<glob()>|perlfunc/glob> operator has been replaced with a check for VMS
21446fb12b70Safresh1wildcard characters.  This saves a significant number of unnecessary
21456fb12b70Safresh1L<C<lstat()>|perlfunc/lstat> calls such that some simple glob operations become
21466fb12b70Safresh160-80% faster.
21476fb12b70Safresh1
21486fb12b70Safresh1=back
21496fb12b70Safresh1
21506fb12b70Safresh1=item Win32
21516fb12b70Safresh1
21526fb12b70Safresh1=over 4
21536fb12b70Safresh1
21546fb12b70Safresh1=item *
21556fb12b70Safresh1
21566fb12b70Safresh1C<rename> and C<link> on Win32 now set $! to ENOSPC and EDQUOT when
21576fb12b70Safresh1appropriate.  [perl #119857]
21586fb12b70Safresh1
21596fb12b70Safresh1=item *
21606fb12b70Safresh1
21616fb12b70Safresh1The BUILD_STATIC and ALL_STATIC makefile options for linking some or (nearly)
21626fb12b70Safresh1all extensions statically (into perl520.dll, and into a separate
21636fb12b70Safresh1perl-static.exe too) were broken for MinGW builds. This has now been fixed.
21646fb12b70Safresh1
21656fb12b70Safresh1The ALL_STATIC option has also been improved to include the Encode and Win32
21666fb12b70Safresh1extensions (for both VC++ and MinGW builds).
21676fb12b70Safresh1
21686fb12b70Safresh1=item *
21696fb12b70Safresh1
21706fb12b70Safresh1Support for building with Visual C++ 2013 has been added.  There are currently
21716fb12b70Safresh1two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
21726fb12b70Safresh1will hopefully be resolved soon.
21736fb12b70Safresh1
21746fb12b70Safresh1=item *
21756fb12b70Safresh1
21766fb12b70Safresh1Experimental support for building with Intel C++ Compiler has been added.  The
21776fb12b70Safresh1nmake makefile (win32/Makefile) and the dmake makefile (win32/makefile.mk) can
21786fb12b70Safresh1be used.  A "nmake test" will not pass at this time due to F<cpan/CGI/t/url.t>.
21796fb12b70Safresh1
21806fb12b70Safresh1=item *
21816fb12b70Safresh1
21826fb12b70Safresh1Killing a process tree with L<perlfunc/kill> and a negative signal, was broken
21836fb12b70Safresh1starting in 5.18.0. In this bug, C<kill> always returned 0 for a negative
21846fb12b70Safresh1signal even for valid PIDs, and no processes were terminated. This has been
21856fb12b70Safresh1fixed [perl #121230].
21866fb12b70Safresh1
21876fb12b70Safresh1=item *
21886fb12b70Safresh1
21896fb12b70Safresh1The time taken to build perl on Windows has been reduced quite significantly
21906fb12b70Safresh1(time savings in the region of 30-40% are typically seen) by reducing the
21916fb12b70Safresh1number of, usually failing, I/O calls for each L<C<require()>|perlfunc/require>
21926fb12b70Safresh1(for B<miniperl.exe> only).
2193eac174f2Safresh1L<[GH #13566]|https://github.com/Perl/perl5/issues/13566>
21946fb12b70Safresh1
21956fb12b70Safresh1=item *
21966fb12b70Safresh1
21976fb12b70Safresh1About 15 minutes of idle sleeping was removed from running C<make test> due to
21986fb12b70Safresh1a bug in which the timeout monitor used for tests could not be cancelled once
21996fb12b70Safresh1the test completes, and the full timeout period elapsed before running the next
22006fb12b70Safresh1test file.
2201eac174f2Safresh1L<[GH #13647]|https://github.com/Perl/perl5/issues/13647>
22026fb12b70Safresh1
22036fb12b70Safresh1=item *
22046fb12b70Safresh1
22056fb12b70Safresh1On a perl built without pseudo-fork (pseudo-fork builds were not affected by
22066fb12b70Safresh1this bug), killing a process tree with L<C<kill()>|perlfunc/kill> and a negative
22076fb12b70Safresh1signal resulted in C<kill()> inverting the returned value.  For example, if
22086fb12b70Safresh1C<kill()> killed 1 process tree PID then it returned 0 instead of 1, and if
22096fb12b70Safresh1C<kill()> was passed 2 invalid PIDs then it returned 2 instead of 0.  This has
22106fb12b70Safresh1probably been the case since the process tree kill feature was implemented on
22116fb12b70Safresh1Win32.  It has now been corrected to follow the documented behaviour.
2212eac174f2Safresh1L<[GH #13595]|https://github.com/Perl/perl5/issues/13595>
22136fb12b70Safresh1
22146fb12b70Safresh1=item *
22156fb12b70Safresh1
22166fb12b70Safresh1When building a 64-bit perl, an uninitialized memory read in B<miniperl.exe>,
22176fb12b70Safresh1used during the build process, could lead to a 4GB B<wperl.exe> being created.
22186fb12b70Safresh1This has now been fixed.  (Note that B<perl.exe> itself was unaffected, but
22196fb12b70Safresh1obviously B<wperl.exe> would have been completely broken.)
2220eac174f2Safresh1L<[GH #13677]|https://github.com/Perl/perl5/issues/13677>
22216fb12b70Safresh1
22226fb12b70Safresh1=item *
22236fb12b70Safresh1
22246fb12b70Safresh1Perl can now be built with B<gcc> version 4.8.1 from L<http://www.mingw.org>.
22256fb12b70Safresh1This was previously broken due to an incorrect definition of DllMain() in one
22266fb12b70Safresh1of perl's source files.  Earlier B<gcc> versions were also affected when using
22276fb12b70Safresh1version 4 of the w32api package.  Versions of B<gcc> available from
22286fb12b70Safresh1L<http://mingw-w64.sourceforge.net/> were not affected.
2229eac174f2Safresh1L<[GH #13733]|https://github.com/Perl/perl5/issues/13733>
22306fb12b70Safresh1
22316fb12b70Safresh1=item *
22326fb12b70Safresh1
22336fb12b70Safresh1The test harness now has no failures when perl is built on a FAT drive with the
22346fb12b70Safresh1Windows OS on an NTFS drive.
2235eac174f2Safresh1L<[GH #6348]|https://github.com/Perl/perl5/issues/6348>
22366fb12b70Safresh1
22376fb12b70Safresh1=item *
22386fb12b70Safresh1
22396fb12b70Safresh1When cloning the context stack in fork() emulation, Perl_cx_dup()
22406fb12b70Safresh1would crash accessing parameter information for context stack entries
22416fb12b70Safresh1that included no parameters, as with C<&foo;>.
2242eac174f2Safresh1L<[GH #13763]|https://github.com/Perl/perl5/issues/13763>
22436fb12b70Safresh1
22446fb12b70Safresh1=item *
22456fb12b70Safresh1
22466fb12b70Safresh1Introduced by
2247eac174f2Safresh1L<[GH #12161]|https://github.com/Perl/perl5/issues/12161>, a memory
22486fb12b70Safresh1leak on every call to C<system> and backticks (C< `` >), on most Win32 Perls
22496fb12b70Safresh1starting from 5.18.0 has been fixed.  The memory leak only occurred if you
22509f11ffb7Safresh1enabled pseudo-fork in your build of Win32 Perl, and were running that build on
22516fb12b70Safresh1Server 2003 R2 or newer OS.  The leak does not appear on WinXP SP3.
2252eac174f2Safresh1L<[GH #13741]|https://github.com/Perl/perl5/issues/13741>
22536fb12b70Safresh1
22546fb12b70Safresh1=back
22556fb12b70Safresh1
22566fb12b70Safresh1=item WinCE
22576fb12b70Safresh1
22586fb12b70Safresh1=over 4
22596fb12b70Safresh1
22606fb12b70Safresh1=item *
22616fb12b70Safresh1
22626fb12b70Safresh1The building of XS modules has largely been restored.  Several still cannot
22636fb12b70Safresh1(yet) be built but it is now possible to build Perl on WinCE with only a couple
22646fb12b70Safresh1of further patches (to L<Socket> and L<ExtUtils::MakeMaker>), hopefully to be
22656fb12b70Safresh1incorporated soon.
22666fb12b70Safresh1
22676fb12b70Safresh1=item *
22686fb12b70Safresh1
22696fb12b70Safresh1Perl can now be built in one shot with no user intervention on WinCE by running
22706fb12b70Safresh1C<nmake -f Makefile.ce all>.
22716fb12b70Safresh1
22726fb12b70Safresh1Support for building with EVC (Embedded Visual C++) 4 has been restored.  Perl
22736fb12b70Safresh1can also be built using Smart Devices for Visual C++ 2005 or 2008.
22746fb12b70Safresh1
22756fb12b70Safresh1=back
22766fb12b70Safresh1
22776fb12b70Safresh1=back
22786fb12b70Safresh1
22796fb12b70Safresh1=head1 Internal Changes
22806fb12b70Safresh1
22816fb12b70Safresh1=over 4
22826fb12b70Safresh1
22836fb12b70Safresh1=item *
22846fb12b70Safresh1
22856fb12b70Safresh1The internal representation has changed for the match variables $1, $2 etc.,
22866fb12b70Safresh1$`, $&, $', ${^PREMATCH}, ${^MATCH} and ${^POSTMATCH}.  It uses slightly less
22876fb12b70Safresh1memory, avoids string comparisons and numeric conversions during lookup, and
22886fb12b70Safresh1uses 23 fewer lines of C.  This change should not affect any external code.
22896fb12b70Safresh1
22906fb12b70Safresh1=item *
22916fb12b70Safresh1
22926fb12b70Safresh1Arrays now use NULL internally to represent unused slots, instead of
22936fb12b70Safresh1&PL_sv_undef.  &PL_sv_undef is no longer treated as a special value, so
22946fb12b70Safresh1av_store(av, 0, &PL_sv_undef) will cause element 0 of that array to hold a
22956fb12b70Safresh1read-only undefined scalar.  C<$array[0] = anything> will croak and
22966fb12b70Safresh1C<\$array[0]> will compare equal to C<\undef>.
22976fb12b70Safresh1
22986fb12b70Safresh1=item *
22996fb12b70Safresh1
23006fb12b70Safresh1The SV returned by HeSVKEY_force() now correctly reflects the UTF8ness of the
23016fb12b70Safresh1underlying hash key when that key is not stored as a SV.  [perl #79074]
23026fb12b70Safresh1
23036fb12b70Safresh1=item *
23046fb12b70Safresh1
23056fb12b70Safresh1Certain rarely used functions and macros available to XS code are now
23066fb12b70Safresh1deprecated.  These are:
23076fb12b70Safresh1C<utf8_to_uvuni_buf> (use C<utf8_to_uvchr_buf> instead),
23086fb12b70Safresh1C<valid_utf8_to_uvuni> (use C<utf8_to_uvchr_buf> instead),
23096fb12b70Safresh1C<NATIVE_TO_NEED> (this did not work properly anyway),
23106fb12b70Safresh1and C<ASCII_TO_NEED> (this did not work properly anyway).
23116fb12b70Safresh1
23126fb12b70Safresh1Starting in this release, almost never does application code need to
23136fb12b70Safresh1distinguish between the platform's character set and Latin1, on which the
23146fb12b70Safresh1lowest 256 characters of Unicode are based.  New code should not use
23156fb12b70Safresh1C<utf8n_to_uvuni> (use C<utf8_to_uvchr_buf> instead),
23166fb12b70Safresh1nor
23176fb12b70Safresh1C<uvuni_to_utf8> (use C<uvchr_to_utf8> instead),
23186fb12b70Safresh1
23196fb12b70Safresh1=item *
23206fb12b70Safresh1
23216fb12b70Safresh1The Makefile shortcut targets for many rarely (or never) used testing and
23226fb12b70Safresh1profiling targets have been removed, or merged into the only other Makefile
23236fb12b70Safresh1target that uses them.  Specifically, these targets are gone, along with
23246fb12b70Safresh1documentation that referenced them or explained how to use them:
23256fb12b70Safresh1
23266fb12b70Safresh1    check.third check.utf16 check.utf8 coretest minitest.prep
23276fb12b70Safresh1    minitest.utf16 perl.config.dashg perl.config.dashpg
23286fb12b70Safresh1    perl.config.gcov perl.gcov perl.gprof perl.gprof.config
23296fb12b70Safresh1    perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix
23306fb12b70Safresh1    perl.third perl.third.config perl.valgrind.config purecovperl
23316fb12b70Safresh1    pureperl quantperl test.deparse test.taintwarn test.third
23326fb12b70Safresh1    test.torture test.utf16 test.utf8 test_notty.deparse
23336fb12b70Safresh1    test_notty.third test_notty.valgrind test_prep.third
23346fb12b70Safresh1    test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16
23356fb12b70Safresh1    ucheck.valgrind utest utest.third utest.utf16 utest.valgrind
23366fb12b70Safresh1
23376fb12b70Safresh1It's still possible to run the relevant commands by "hand" - no underlying
23386fb12b70Safresh1functionality has been removed.
23396fb12b70Safresh1
23406fb12b70Safresh1=item *
23416fb12b70Safresh1
23426fb12b70Safresh1It is now possible to keep Perl from initializing locale handling.
23436fb12b70Safresh1For the most part, Perl doesn't pay attention to locale.  (See
23446fb12b70Safresh1L<perllocale>.)  Nonetheless, until now, on startup, it has always
23456fb12b70Safresh1initialized locale handling to the system default, just in case the
23466fb12b70Safresh1program being executed ends up using locales.  (This is one of the first
23476fb12b70Safresh1things a locale-aware program should do, long before Perl knows if it
23486fb12b70Safresh1will actually be needed or not.)  This works well except when Perl is
23496fb12b70Safresh1embedded in another application which wants a locale that isn't the
23506fb12b70Safresh1system default.  Now, if the environment variable
23516fb12b70Safresh1C<PERL_SKIP_LOCALE_INIT> is set at the time Perl is started, this
23526fb12b70Safresh1initialization step is skipped.  Prior to this, on Windows platforms,
23536fb12b70Safresh1the only workaround for this deficiency was to use a hacked-up copy of
23546fb12b70Safresh1internal Perl code.  Applications that need to use older Perls can
23556fb12b70Safresh1discover if the embedded Perl they are using needs the workaround by
23566fb12b70Safresh1testing that the C preprocessor symbol C<HAS_SKIP_LOCALE_INIT> is not
23576fb12b70Safresh1defined.  [RT #38193]
23586fb12b70Safresh1
23596fb12b70Safresh1=item *
23606fb12b70Safresh1
23616fb12b70Safresh1C<BmRARE> and C<BmPREVIOUS> have been removed.  They were not used anywhere
23626fb12b70Safresh1and are not part of the API.  For XS modules, they are now #defined as 0.
23636fb12b70Safresh1
23646fb12b70Safresh1=item *
23656fb12b70Safresh1
23666fb12b70Safresh1C<sv_force_normal>, which usually croaks on read-only values, used to allow
23676fb12b70Safresh1read-only values to be modified at compile time.  This has been changed to
23686fb12b70Safresh1croak on read-only values regardless.  This change uncovered several core
23696fb12b70Safresh1bugs.
23706fb12b70Safresh1
23716fb12b70Safresh1=item *
23726fb12b70Safresh1
23736fb12b70Safresh1Perl's new copy-on-write mechanism  (which is now enabled by default),
23746fb12b70Safresh1allows any C<SvPOK> scalar to be automatically upgraded to a copy-on-write
23756fb12b70Safresh1scalar when copied. A reference count on the string buffer is stored in
23766fb12b70Safresh1the string buffer itself.
23776fb12b70Safresh1
23786fb12b70Safresh1For example:
23796fb12b70Safresh1
23806fb12b70Safresh1    $ perl -MDevel::Peek -e'$a="abc"; $b = $a; Dump $a; Dump $b'
23816fb12b70Safresh1    SV = PV(0x260cd80) at 0x2620ad8
23826fb12b70Safresh1      REFCNT = 1
23836fb12b70Safresh1      FLAGS = (POK,IsCOW,pPOK)
23846fb12b70Safresh1      PV = 0x2619bc0 "abc"\0
23856fb12b70Safresh1      CUR = 3
23866fb12b70Safresh1      LEN = 16
23876fb12b70Safresh1      COW_REFCNT = 1
23886fb12b70Safresh1    SV = PV(0x260ce30) at 0x2620b20
23896fb12b70Safresh1      REFCNT = 1
23906fb12b70Safresh1      FLAGS = (POK,IsCOW,pPOK)
23916fb12b70Safresh1      PV = 0x2619bc0 "abc"\0
23926fb12b70Safresh1      CUR = 3
23936fb12b70Safresh1      LEN = 16
23946fb12b70Safresh1      COW_REFCNT = 1
23956fb12b70Safresh1
23966fb12b70Safresh1Note that both scalars share the same PV buffer and have a COW_REFCNT
23976fb12b70Safresh1greater than zero.
23986fb12b70Safresh1
23996fb12b70Safresh1This means that XS code which wishes to modify the C<SvPVX()> buffer of an
24006fb12b70Safresh1SV should call C<SvPV_force()> or similar first, to ensure a valid (and
24016fb12b70Safresh1unshared) buffer, and to call C<SvSETMAGIC()> afterwards. This in fact has
24026fb12b70Safresh1always been the case (for example hash keys were already copy-on-write);
24036fb12b70Safresh1this change just spreads the COW behaviour to a wider variety of SVs.
24046fb12b70Safresh1
24056fb12b70Safresh1One important difference is that before 5.18.0, shared hash-key scalars
24066fb12b70Safresh1used to have the C<SvREADONLY> flag set; this is no longer the case.
24076fb12b70Safresh1
24086fb12b70Safresh1This new behaviour can still be disabled by running F<Configure> with
24096fb12b70Safresh1B<-Accflags=-DPERL_NO_COW>.  This option will probably be removed in Perl
24106fb12b70Safresh15.22.
24116fb12b70Safresh1
24126fb12b70Safresh1=item *
24136fb12b70Safresh1
24146fb12b70Safresh1C<PL_sawampersand> is now a constant.  The switch this variable provided
24156fb12b70Safresh1(to enable/disable the pre-match copy depending on whether C<$&> had been
24166fb12b70Safresh1seen) has been removed and replaced with copy-on-write, eliminating a few
24176fb12b70Safresh1bugs.
24186fb12b70Safresh1
24196fb12b70Safresh1The previous behaviour can still be enabled by running F<Configure> with
24206fb12b70Safresh1B<-Accflags=-DPERL_SAWAMPERSAND>.
24216fb12b70Safresh1
24226fb12b70Safresh1=item *
24236fb12b70Safresh1
24246fb12b70Safresh1The functions C<my_swap>, C<my_htonl> and C<my_ntohl> have been removed.
24256fb12b70Safresh1It is unclear why these functions were ever marked as I<A>, part of the
24266fb12b70Safresh1API. XS code can't call them directly, as it can't rely on them being
24276fb12b70Safresh1compiled. Unsurprisingly, no code on CPAN references them.
24286fb12b70Safresh1
24296fb12b70Safresh1=item *
24306fb12b70Safresh1
24316fb12b70Safresh1The signature of the C<Perl_re_intuit_start()> regex function has changed;
24326fb12b70Safresh1the function pointer C<intuit> in the regex engine plugin structure
24336fb12b70Safresh1has also changed accordingly. A new parameter, C<strbeg> has been added;
24346fb12b70Safresh1this has the same meaning as the same-named parameter in
24356fb12b70Safresh1C<Perl_regexec_flags>. Previously intuit would try to guess the start of
24366fb12b70Safresh1the string from the passed SV (if any), and would sometimes get it wrong
24376fb12b70Safresh1(e.g. with an overloaded SV).
24386fb12b70Safresh1
24396fb12b70Safresh1=item *
24406fb12b70Safresh1
24416fb12b70Safresh1The signature of the C<Perl_regexec_flags()> regex function has
24426fb12b70Safresh1changed; the function pointer C<exec> in the regex engine plugin
24436fb12b70Safresh1structure has also changed to match.  The C<minend> parameter now has
24446fb12b70Safresh1type C<SSize_t> to better support 64-bit systems.
24456fb12b70Safresh1
24466fb12b70Safresh1=item *
24476fb12b70Safresh1
24486fb12b70Safresh1XS code may use various macros to change the case of a character or code
24496fb12b70Safresh1point (for example C<toLOWER_utf8()>).  Only a couple of these were
24506fb12b70Safresh1documented until now;
24516fb12b70Safresh1and now they should be used in preference to calling the underlying
24526fb12b70Safresh1functions.  See L<perlapi/Character case changing>.
24536fb12b70Safresh1
24546fb12b70Safresh1=item *
24556fb12b70Safresh1
24566fb12b70Safresh1The code dealt rather inconsistently with uids and gids. Some
24576fb12b70Safresh1places assumed that they could be safely stored in UVs, others
24586fb12b70Safresh1in IVs, others in ints. Four new macros are introduced:
24596fb12b70Safresh1SvUID(), sv_setuid(), SvGID(), and sv_setgid()
24606fb12b70Safresh1
24616fb12b70Safresh1=item *
24626fb12b70Safresh1
24636fb12b70Safresh1C<sv_pos_b2u_flags> has been added to the API.  It is similar to C<sv_pos_b2u>,
24646fb12b70Safresh1but supports long strings on 64-bit platforms.
24656fb12b70Safresh1
24666fb12b70Safresh1=item *
24676fb12b70Safresh1
24686fb12b70Safresh1C<PL_exit_flags> can now be used by perl embedders or other XS code to have
24696fb12b70Safresh1perl C<warn> or C<abort> on an attempted exit. [perl #52000]
24706fb12b70Safresh1
24716fb12b70Safresh1=item *
24726fb12b70Safresh1
24736fb12b70Safresh1Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
24746fb12b70Safresh1compilers to emulate the aliasing of C<bool> to C<char> that perl does for
24756fb12b70Safresh1C89 compilers.  [perl #120314]
24766fb12b70Safresh1
24776fb12b70Safresh1=item *
24786fb12b70Safresh1
24796fb12b70Safresh1The C<sv> argument in L<perlapi/sv_2pv_flags>, L<perlapi/sv_2iv_flags>,
24806fb12b70Safresh1L<perlapi/sv_2uv_flags>, and L<perlapi/sv_2nv_flags> and their older wrappers
24816fb12b70Safresh1sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now non-NULL. Passing NULL now will crash.
24826fb12b70Safresh1When the non-NULL marker was introduced en masse in 5.9.3 the functions
24836fb12b70Safresh1were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if
24846fb12b70Safresh1NULL was passed, the functions returned 0 or false-type values. The code that
24856fb12b70Safresh1supports C<sv> argument being non-NULL dates to 5.0 alpha 2 directly, and
24866fb12b70Safresh1indirectly to Perl 1.0 (pre 5.0 api). The lack of documentation that the
24876fb12b70Safresh1functions accepted a NULL C<sv> was corrected in 5.11.0 and between 5.11.0
24886fb12b70Safresh1and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code
24896fb12b70Safresh1has now been removed, and the functions became non-NULL marked again, because
24906fb12b70Safresh1core getter-type macros never pass NULL to these functions and would crash
24916fb12b70Safresh1before ever passing NULL.
24926fb12b70Safresh1
24936fb12b70Safresh1The only way a NULL C<sv> can be passed to sv_2*v* functions is if XS code
24946fb12b70Safresh1directly calls sv_2*v*. This is unlikely as XS code uses Sv*V* macros to get
24956fb12b70Safresh1the underlying value out of the SV. One possible situation which leads to
24966fb12b70Safresh1a NULL C<sv> being passed to sv_2*v* functions, is if XS code defines its own
24976fb12b70Safresh1getter type Sv*V* macros, which check for NULL B<before> dereferencing and
24986fb12b70Safresh1checking the SV's flags through public API Sv*OK* macros or directly using
24996fb12b70Safresh1private API C<SvFLAGS>, and if C<sv> is NULL, then calling the sv_2*v functions
2500eac174f2Safresh1with a NULL literal or passing the C<sv> containing a NULL value.
25016fb12b70Safresh1
25026fb12b70Safresh1=item *
25036fb12b70Safresh1
25046fb12b70Safresh1newATTRSUB is now a macro
25056fb12b70Safresh1
25066fb12b70Safresh1The public API newATTRSUB was previously a macro to the private
25076fb12b70Safresh1function Perl_newATTRSUB. Function Perl_newATTRSUB has been removed. newATTRSUB
25086fb12b70Safresh1is now macro to a different internal function.
25096fb12b70Safresh1
25106fb12b70Safresh1=item *
25116fb12b70Safresh1
25126fb12b70Safresh1Changes in warnings raised by C<utf8n_to_uvchr()>
25136fb12b70Safresh1
25146fb12b70Safresh1This bottom level function decodes the first character of a UTF-8 string
25156fb12b70Safresh1into a code point.  It is accessible to C<XS> level code, but it's
25166fb12b70Safresh1discouraged from using it directly.  There are higher level functions
25176fb12b70Safresh1that call this that should be used instead, such as
25186fb12b70Safresh1L<perlapi/utf8_to_uvchr_buf>.  For completeness though, this documents
25196fb12b70Safresh1some changes to it.  Now, tests for malformations are done before any
25206fb12b70Safresh1tests for other potential issues.  One of those issues involves code
25216fb12b70Safresh1points so large that they have never appeared in any official standard
25226fb12b70Safresh1(the current standard has scaled back the highest acceptable code point
25236fb12b70Safresh1from earlier versions).  It is possible (though not done in CPAN) to
25246fb12b70Safresh1warn and/or forbid these code points, while accepting smaller code
25256fb12b70Safresh1points that are still above the legal Unicode maximum.  The warning
25266fb12b70Safresh1message for this now includes the code point if representable on the
25276fb12b70Safresh1machine.  Previously it always displayed raw bytes, which is what it
25286fb12b70Safresh1still does for non-representable code points.
25296fb12b70Safresh1
25306fb12b70Safresh1=item *
25316fb12b70Safresh1
25326fb12b70Safresh1Regexp engine changes that affect the pluggable regex engine interface
25336fb12b70Safresh1
25346fb12b70Safresh1Many flags that used to be exposed via regexp.h and used to populate the
25356fb12b70Safresh1extflags member of struct regexp have been removed. These fields were
25366fb12b70Safresh1technically private to Perl's own regexp engine and should not have been
25376fb12b70Safresh1exposed there in the first place.
25386fb12b70Safresh1
25396fb12b70Safresh1The affected flags are:
25406fb12b70Safresh1
25416fb12b70Safresh1    RXf_NOSCAN
25426fb12b70Safresh1    RXf_CANY_SEEN
25436fb12b70Safresh1    RXf_GPOS_SEEN
25446fb12b70Safresh1    RXf_GPOS_FLOAT
25456fb12b70Safresh1    RXf_ANCH_BOL
25466fb12b70Safresh1    RXf_ANCH_MBOL
25476fb12b70Safresh1    RXf_ANCH_SBOL
25486fb12b70Safresh1    RXf_ANCH_GPOS
25496fb12b70Safresh1
25506fb12b70Safresh1As well as the follow flag masks:
25516fb12b70Safresh1
25526fb12b70Safresh1    RXf_ANCH_SINGLE
25536fb12b70Safresh1    RXf_ANCH
25546fb12b70Safresh1
25556fb12b70Safresh1All have been renamed to PREGf_ equivalents and moved to regcomp.h.
25566fb12b70Safresh1
25576fb12b70Safresh1The behavior previously achieved by setting one or more of the RXf_ANCH_
25586fb12b70Safresh1flags (via the RXf_ANCH mask) have now been replaced by a *single* flag bit
25596fb12b70Safresh1in extflags:
25606fb12b70Safresh1
25616fb12b70Safresh1    RXf_IS_ANCHORED
25626fb12b70Safresh1
25636fb12b70Safresh1pluggable regex engines which previously used to set these flags should
25646fb12b70Safresh1now set this flag ALONE.
25656fb12b70Safresh1
25666fb12b70Safresh1=item *
25676fb12b70Safresh1
25686fb12b70Safresh1The Perl core now consistently uses C<av_tindex()> ("the top index of an
25696fb12b70Safresh1array") as a more clearly-named synonym for C<av_len()>.
25706fb12b70Safresh1
25716fb12b70Safresh1=item *
25726fb12b70Safresh1
25736fb12b70Safresh1The obscure interpreter variable C<PL_timesbuf> is expected to be removed
25746fb12b70Safresh1early in the 5.21.x development series, so that Perl 5.22.0 will not provide
25756fb12b70Safresh1it to XS authors.  While the variable still exists in 5.20.0, we hope that
25766fb12b70Safresh1this advance warning of the deprecation will help anyone who is using that
25776fb12b70Safresh1variable.
25786fb12b70Safresh1
25796fb12b70Safresh1=back
25806fb12b70Safresh1
25816fb12b70Safresh1=head1 Selected Bug Fixes
25826fb12b70Safresh1
25836fb12b70Safresh1=head2 Regular Expressions
25846fb12b70Safresh1
25856fb12b70Safresh1=over 4
25866fb12b70Safresh1
25876fb12b70Safresh1=item *
25886fb12b70Safresh1
25896fb12b70Safresh1Fixed a small number of regexp constructions that could either fail to
25906fb12b70Safresh1match or crash perl when the string being matched against was
25916fb12b70Safresh1allocated above the 2GB line on 32-bit systems. [RT #118175]
25926fb12b70Safresh1
25936fb12b70Safresh1=item *
25946fb12b70Safresh1
25956fb12b70Safresh1Various memory leaks involving the parsing of the C<(?[...])> regular
25966fb12b70Safresh1expression construct have been fixed.
25976fb12b70Safresh1
25986fb12b70Safresh1=item *
25996fb12b70Safresh1
26006fb12b70Safresh1C<(?[...])> now allows interpolation of precompiled patterns consisting of
26016fb12b70Safresh1C<(?[...])> with bracketed character classes inside (C<$pat =
26026fb12b70Safresh1S<qr/(?[ [a] ])/;> S</(?[ $pat ])/>>).  Formerly, the brackets would
26036fb12b70Safresh1confuse the regular expression parser.
26046fb12b70Safresh1
26056fb12b70Safresh1=item *
26066fb12b70Safresh1
26076fb12b70Safresh1The "Quantifier unexpected on zero-length expression" warning message could
26086fb12b70Safresh1appear twice starting in Perl v5.10 for a regular expression also
26096fb12b70Safresh1containing alternations (e.g., "a|b") triggering the trie optimisation.
26106fb12b70Safresh1
26116fb12b70Safresh1=item *
26126fb12b70Safresh1
26136fb12b70Safresh1Perl v5.18 inadvertently introduced a bug whereby interpolating mixed up-
26146fb12b70Safresh1and down-graded UTF-8 strings in a regex could result in malformed UTF-8
26156fb12b70Safresh1in the pattern: specifically if a downgraded character in the range
26166fb12b70Safresh1C<\x80..\xff> followed a UTF-8 string, e.g.
26176fb12b70Safresh1
26186fb12b70Safresh1    utf8::upgrade(  my $u = "\x{e5}");
26196fb12b70Safresh1    utf8::downgrade(my $d = "\x{e5}");
26206fb12b70Safresh1    /$u$d/
26216fb12b70Safresh1
26226fb12b70Safresh1[RT #118297]
26236fb12b70Safresh1
26246fb12b70Safresh1=item *
26256fb12b70Safresh1
26266fb12b70Safresh1In regular expressions containing multiple code blocks, the values of
26276fb12b70Safresh1C<$1>, C<$2>, etc., set by nested regular expression calls would leak from
26286fb12b70Safresh1one block to the next.  Now these variables always refer to the outer
26296fb12b70Safresh1regular expression at the start of an embedded block [perl #117917].
26306fb12b70Safresh1
26316fb12b70Safresh1=item *
26326fb12b70Safresh1
26336fb12b70Safresh1C</$qr/p> was broken in Perl 5.18.0; the C</p> flag was ignored.  This has been
26346fb12b70Safresh1fixed. [perl #118213]
26356fb12b70Safresh1
26366fb12b70Safresh1=item *
26376fb12b70Safresh1
26386fb12b70Safresh1Starting in Perl 5.18.0, a construct like C</[#](?{})/x> would have its C<#>
26396fb12b70Safresh1incorrectly interpreted as a comment.  The code block would be skipped,
26406fb12b70Safresh1unparsed.  This has been corrected.
26416fb12b70Safresh1
26426fb12b70Safresh1=item *
26436fb12b70Safresh1
26446fb12b70Safresh1Starting in Perl 5.001, a regular expression like C</[#$a]/x> or C</[#]$a/x>
26456fb12b70Safresh1would have its C<#> incorrectly interpreted as a comment, so the variable would
26466fb12b70Safresh1not interpolate.  This has been corrected. [perl #45667]
26476fb12b70Safresh1
26486fb12b70Safresh1=item *
26496fb12b70Safresh1
26506fb12b70Safresh1Perl 5.18.0 inadvertently made dereferenced regular expressions
26516fb12b70Safresh1S<(C<${ qr// }>)> false as booleans.  This has been fixed.
26526fb12b70Safresh1
26536fb12b70Safresh1=item *
26546fb12b70Safresh1
26556fb12b70Safresh1The use of C<\G> in regular expressions, where it's not at the start of the
26566fb12b70Safresh1pattern, is now slightly less buggy (although it is still somewhat
26576fb12b70Safresh1problematic).
26586fb12b70Safresh1
26596fb12b70Safresh1=item *
26606fb12b70Safresh1
26616fb12b70Safresh1Where a regular expression included code blocks (C</(?{...})/>), and where the
26626fb12b70Safresh1use of constant overloading triggered a re-compilation of the code block, the
26636fb12b70Safresh1second compilation didn't see its outer lexical scope.  This was a regression
26646fb12b70Safresh1in Perl 5.18.0.
26656fb12b70Safresh1
26666fb12b70Safresh1=item *
26676fb12b70Safresh1
26686fb12b70Safresh1The string position set by C<pos> could shift if the string changed
26696fb12b70Safresh1representation internally to or from utf8.  This could happen, e.g., with
26706fb12b70Safresh1references to objects with string overloading.
26716fb12b70Safresh1
26726fb12b70Safresh1=item *
26736fb12b70Safresh1
26746fb12b70Safresh1Taking references to the return values of two C<pos> calls with the same
26756fb12b70Safresh1argument, and then assigning a reference to one and C<undef> to the other,
26766fb12b70Safresh1could result in assertion failures or memory leaks.
26776fb12b70Safresh1
26786fb12b70Safresh1=item *
26796fb12b70Safresh1
26806fb12b70Safresh1Elements of @- and @+ now update correctly when they refer to non-existent
26816fb12b70Safresh1captures.  Previously, a referenced element (C<$ref = \$-[1]>) could refer to
26826fb12b70Safresh1the wrong match after subsequent matches.
26836fb12b70Safresh1
26846fb12b70Safresh1=item *
26856fb12b70Safresh1
26866fb12b70Safresh1The code that parses regex backrefs (or ambiguous backref/octals) such as \123
26876fb12b70Safresh1did a simple atoi(), which could wrap round to negative values on long digit
26886fb12b70Safresh1strings and cause segmentation faults.  This has now been fixed.  [perl
26896fb12b70Safresh1#119505]
26906fb12b70Safresh1
26916fb12b70Safresh1=item *
26926fb12b70Safresh1
26936fb12b70Safresh1Assigning another typeglob to C<*^R> no longer makes the regular expression
26946fb12b70Safresh1engine crash.
26956fb12b70Safresh1
26966fb12b70Safresh1=item *
26976fb12b70Safresh1
26986fb12b70Safresh1The C<\N> regular expression escape, when used without the curly braces (to
26996fb12b70Safresh1mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
27006fb12b70Safresh1under /x.  It had been this way since C<\N> to mean C<[^\n]> was introduced
27016fb12b70Safresh1in 5.12.0.
27026fb12b70Safresh1
27036fb12b70Safresh1=item *
27046fb12b70Safresh1
27056fb12b70Safresh1C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
27066fb12b70Safresh1delimiter.  [perl #120463]
27076fb12b70Safresh1
27086fb12b70Safresh1=item *
27096fb12b70Safresh1
27106fb12b70Safresh1Some cases of unterminated (?...) sequences in regular expressions (e.g.,
27116fb12b70Safresh1C</(?</>) have been fixed to produce the proper error message instead of
27126fb12b70Safresh1"panic: memory wrap".  Other cases (e.g., C</(?(/>) have yet to be fixed.
27136fb12b70Safresh1
27146fb12b70Safresh1=item *
27156fb12b70Safresh1
27166fb12b70Safresh1When a reference to a reference to an overloaded object was returned from
27176fb12b70Safresh1a regular expression C<(??{...})> code block, an incorrect implicit
27186fb12b70Safresh1dereference could take place if the inner reference had been returned by
27196fb12b70Safresh1a code block previously.
27206fb12b70Safresh1
27216fb12b70Safresh1=item *
27226fb12b70Safresh1
27236fb12b70Safresh1A tied variable returned from C<(??{...})> sees the inner values of match
27246fb12b70Safresh1variables (i.e., the $1 etc. from any matches inside the block) in its
27256fb12b70Safresh1FETCH method.  This was not the case if a reference to an overloaded object
27266fb12b70Safresh1was the last thing assigned to the tied variable.  Instead, the match
27276fb12b70Safresh1variables referred to the outer pattern during the FETCH call.
27286fb12b70Safresh1
27296fb12b70Safresh1=item *
27306fb12b70Safresh1
27316fb12b70Safresh1Fix unexpected tainting via regexp using locale. Previously, under certain
27326fb12b70Safresh1conditions, the use of character classes could cause tainting when it
27336fb12b70Safresh1shouldn't. Some character classes are locale-dependent, but before this
27346fb12b70Safresh1patch, sometimes tainting was happening even for character classes that
27356fb12b70Safresh1don't depend on the locale. [perl #120675]
27366fb12b70Safresh1
27376fb12b70Safresh1=item *
27386fb12b70Safresh1
27399f11ffb7Safresh1Under certain conditions, Perl would throw an error if in a lookbehind
27406fb12b70Safresh1assertion in a regexp, the assertion referred to a named subpattern,
27416fb12b70Safresh1complaining the lookbehind was variable when it wasn't. This has been
27426fb12b70Safresh1fixed. [perl #120600], [perl #120618]. The current fix may be improved
27436fb12b70Safresh1on in the future.
27446fb12b70Safresh1
27456fb12b70Safresh1=item *
27466fb12b70Safresh1
27476fb12b70Safresh1C<$^R> wasn't available outside of the regular expression that
27486fb12b70Safresh1initialized it.  [perl #121070]
27496fb12b70Safresh1
27506fb12b70Safresh1=item *
27516fb12b70Safresh1
27526fb12b70Safresh1A large set of fixes and refactoring for re_intuit_start() was merged,
27536fb12b70Safresh1the highlights are:
27546fb12b70Safresh1
27556fb12b70Safresh1=over
27566fb12b70Safresh1
27576fb12b70Safresh1=item *
27586fb12b70Safresh1
27596fb12b70Safresh1Fixed a panic when compiling the regular expression
27606fb12b70Safresh1C</\x{100}[xy]\x{100}{2}/>.
27616fb12b70Safresh1
27626fb12b70Safresh1=item *
27636fb12b70Safresh1
27646fb12b70Safresh1Fixed a performance regression when performing a global pattern match
27656fb12b70Safresh1against a UTF-8 string.  [perl #120692]
27666fb12b70Safresh1
27676fb12b70Safresh1=item *
27686fb12b70Safresh1
27696fb12b70Safresh1Fixed another performance issue where matching a regular expression
27706fb12b70Safresh1like C</ab.{1,2}x/> against a long UTF-8 string would unnecessarily
27716fb12b70Safresh1calculate byte offsets for a large portion of the string. [perl
27726fb12b70Safresh1#120692]
27736fb12b70Safresh1
27746fb12b70Safresh1=back
27756fb12b70Safresh1
27766fb12b70Safresh1=item *
27776fb12b70Safresh1
27786fb12b70Safresh1Fixed an alignment error when compiling regular expressions when built
27796fb12b70Safresh1with GCC on HP-UX 64-bit.
27806fb12b70Safresh1
27816fb12b70Safresh1=item *
27826fb12b70Safresh1
27836fb12b70Safresh1On 64-bit platforms C<pos> can now be set to a value higher than 2**31-1.
27846fb12b70Safresh1[perl #72766]
27856fb12b70Safresh1
27866fb12b70Safresh1=back
27876fb12b70Safresh1
27886fb12b70Safresh1=head2 Perl 5 Debugger and -d
27896fb12b70Safresh1
27906fb12b70Safresh1=over 4
27916fb12b70Safresh1
27926fb12b70Safresh1=item *
27936fb12b70Safresh1
27946fb12b70Safresh1The debugger's C<man> command been fixed. It was broken in the v5.18.0
27956fb12b70Safresh1release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
27966fb12b70Safresh1all now work again.
27976fb12b70Safresh1
27986fb12b70Safresh1=item *
27996fb12b70Safresh1
28006fb12b70Safresh1C<@_> is now correctly visible in the debugger, fixing a regression
28016fb12b70Safresh1introduced in v5.18.0's debugger. [RT #118169]
28026fb12b70Safresh1
28036fb12b70Safresh1=item *
28046fb12b70Safresh1
28056fb12b70Safresh1Under copy-on-write builds (the default as of 5.20.0) C<< ${'_<-e'}[0] >>
28066fb12b70Safresh1no longer gets mangled.  This is the first line of input saved for the
28076fb12b70Safresh1debugger's use for one-liners [perl #118627].
28086fb12b70Safresh1
28096fb12b70Safresh1=item *
28106fb12b70Safresh1
28116fb12b70Safresh1On non-threaded builds, setting C<${"_E<lt>filename"}> to a reference or
28126fb12b70Safresh1typeglob no longer causes C<__FILE__> and some error messages to produce a
28136fb12b70Safresh1corrupt string, and no longer prevents C<#line> directives in string evals from
28146fb12b70Safresh1providing the source lines to the debugger.  Threaded builds were unaffected.
28156fb12b70Safresh1
28166fb12b70Safresh1=item *
28176fb12b70Safresh1
28186fb12b70Safresh1Starting with Perl 5.12, line numbers were off by one if the B<-d> switch was
28196fb12b70Safresh1used on the #! line.  Now they are correct.
28206fb12b70Safresh1
28216fb12b70Safresh1=item *
28226fb12b70Safresh1
28236fb12b70Safresh1C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
28246fb12b70Safresh1C<DB::DB> subs declared thereafter.
28256fb12b70Safresh1
28266fb12b70Safresh1=item *
28276fb12b70Safresh1
28286fb12b70Safresh1C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
28296fb12b70Safresh1rather than whichever array C<@DB::dbline> is aliased to.  [perl #119799]
28306fb12b70Safresh1
28316fb12b70Safresh1=item *
28326fb12b70Safresh1
28336fb12b70Safresh1Call set-magic when setting $DB::sub.  [perl #121255]
28346fb12b70Safresh1
28356fb12b70Safresh1=item *
28366fb12b70Safresh1
28376fb12b70Safresh1The debugger's "n" command now respects lvalue subroutines and steps over
28386fb12b70Safresh1them [perl #118839].
28396fb12b70Safresh1
28406fb12b70Safresh1=back
28416fb12b70Safresh1
28426fb12b70Safresh1=head2 Lexical Subroutines
28436fb12b70Safresh1
28446fb12b70Safresh1=over 4
28456fb12b70Safresh1
28466fb12b70Safresh1=item *
28476fb12b70Safresh1
28486fb12b70Safresh1Lexical constants (C<my sub a() { 42 }>) no longer crash when inlined.
28496fb12b70Safresh1
28506fb12b70Safresh1=item *
28516fb12b70Safresh1
28526fb12b70Safresh1Parameter prototypes attached to lexical subroutines are now respected when
28536fb12b70Safresh1compiling sub calls without parentheses.  Previously, the prototypes were
28546fb12b70Safresh1honoured only for calls I<with> parentheses. [RT #116735]
28556fb12b70Safresh1
28566fb12b70Safresh1=item *
28576fb12b70Safresh1
28586fb12b70Safresh1Syntax errors in lexical subroutines in combination with calls to the same
28596fb12b70Safresh1subroutines no longer cause crashes at compile time.
28606fb12b70Safresh1
28616fb12b70Safresh1=item *
28626fb12b70Safresh1
28636fb12b70Safresh1Deep recursion warnings no longer crash lexical subroutines. [RT #118521]
28646fb12b70Safresh1
28656fb12b70Safresh1=item *
28666fb12b70Safresh1
28676fb12b70Safresh1The dtrace sub-entry probe now works with lexical subs, instead of
28686fb12b70Safresh1crashing [perl #118305].
28696fb12b70Safresh1
28706fb12b70Safresh1=item *
28716fb12b70Safresh1
28726fb12b70Safresh1Undefining an inlinable lexical subroutine (C<my sub foo() { 42 } undef
28736fb12b70Safresh1&foo>) would result in a crash if warnings were turned on.
28746fb12b70Safresh1
28756fb12b70Safresh1=item *
28766fb12b70Safresh1
28776fb12b70Safresh1An undefined lexical sub used as an inherited method no longer crashes.
28786fb12b70Safresh1
28796fb12b70Safresh1=item *
28806fb12b70Safresh1
28816fb12b70Safresh1The presence of a lexical sub named "CORE" no longer stops the CORE::
28826fb12b70Safresh1prefix from working.
28836fb12b70Safresh1
28846fb12b70Safresh1=back
28856fb12b70Safresh1
28866fb12b70Safresh1=head2 Everything Else
28876fb12b70Safresh1
28886fb12b70Safresh1=over 4
28896fb12b70Safresh1
28906fb12b70Safresh1=item *
28916fb12b70Safresh1
28926fb12b70Safresh1The OP allocation code now returns correctly aligned memory in all cases
28936fb12b70Safresh1for C<struct pmop>. Previously it could return memory only aligned to a
28946fb12b70Safresh14-byte boundary, which is not correct for an ithreads build with 64 bit IVs
28956fb12b70Safresh1on some 32 bit platforms. Notably, this caused the build to fail completely
28966fb12b70Safresh1on sparc GNU/Linux. [RT #118055]
28976fb12b70Safresh1
28986fb12b70Safresh1=item *
28996fb12b70Safresh1
29006fb12b70Safresh1Evaluating large hashes in scalar context is now much faster, as the number
29016fb12b70Safresh1of used chains in the hash is now cached for larger hashes. Smaller hashes
29026fb12b70Safresh1continue not to store it and calculate it when needed, as this saves one IV.
29036fb12b70Safresh1That would be 1 IV overhead for every object built from a hash. [RT #114576]
29046fb12b70Safresh1
29056fb12b70Safresh1=item *
29066fb12b70Safresh1
29076fb12b70Safresh1Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs that were
29086fb12b70Safresh1not visible at compile time were treated as lvalues and could be assigned
29096fb12b70Safresh1to, even when the subroutine was not an lvalue sub.  This has been fixed.
29106fb12b70Safresh1[RT #117947]
29116fb12b70Safresh1
29126fb12b70Safresh1=item *
29136fb12b70Safresh1
29146fb12b70Safresh1In Perl v5.18.0 dualvars that had an empty string for the string part but a
29156fb12b70Safresh1non-zero number for the number part starting being treated as true.  In
29166fb12b70Safresh1previous versions they were treated as false, the string representation
2917eac174f2Safresh1taking precedence.  The old behaviour has been restored. [RT #118159]
29186fb12b70Safresh1
29196fb12b70Safresh1=item *
29206fb12b70Safresh1
29216fb12b70Safresh1Since Perl v5.12, inlining of constants that override built-in keywords of
29226fb12b70Safresh1the same name had countermanded C<use subs>, causing subsequent mentions of
29236fb12b70Safresh1the constant to use the built-in keyword instead.  This has been fixed.
29246fb12b70Safresh1
29256fb12b70Safresh1=item *
29266fb12b70Safresh1
29276fb12b70Safresh1The warning produced by C<-l $handle> now applies to IO refs and globs, not
29286fb12b70Safresh1just to glob refs.  That warning is also now UTF8-clean. [RT #117595]
29296fb12b70Safresh1
29306fb12b70Safresh1=item *
29316fb12b70Safresh1
29326fb12b70Safresh1C<delete local $ENV{nonexistent_env_var}> no longer leaks memory.
29336fb12b70Safresh1
29346fb12b70Safresh1=item *
29356fb12b70Safresh1
29366fb12b70Safresh1C<sort> and C<require> followed by a keyword prefixed with C<CORE::> now
29376fb12b70Safresh1treat it as a keyword, and not as a subroutine or module name. [RT #24482]
29386fb12b70Safresh1
29396fb12b70Safresh1=item *
29406fb12b70Safresh1
29416fb12b70Safresh1Through certain conundrums, it is possible to cause the current package to
29426fb12b70Safresh1be freed.  Certain operators (C<bless>, C<reset>, C<open>, C<eval>) could
29436fb12b70Safresh1not cope and would crash.  They have been made more resilient. [RT #117941]
29446fb12b70Safresh1
29456fb12b70Safresh1=item *
29466fb12b70Safresh1
29476fb12b70Safresh1Aliasing filehandles through glob-to-glob assignment would not update
29486fb12b70Safresh1internal method caches properly if a package of the same name as the
29496fb12b70Safresh1filehandle existed, resulting in filehandle method calls going to the
29506fb12b70Safresh1package instead.  This has been fixed.
29516fb12b70Safresh1
29526fb12b70Safresh1=item *
29536fb12b70Safresh1
29546fb12b70Safresh1C<./Configure -de -Dusevendorprefix> didn't default. [RT #64126]
29556fb12b70Safresh1
29566fb12b70Safresh1=item *
29576fb12b70Safresh1
29586fb12b70Safresh1The C<Statement unlikely to be reached> warning was listed in
29596fb12b70Safresh1L<perldiag> as an C<exec>-category warning, but was enabled and disabled
29606fb12b70Safresh1by the C<syntax> category.  On the other hand, the C<exec> category
29616fb12b70Safresh1controlled its fatal-ness.  It is now entirely handled by the C<exec>
29626fb12b70Safresh1category.
29636fb12b70Safresh1
29646fb12b70Safresh1=item *
29656fb12b70Safresh1
29666fb12b70Safresh1The "Replacement list is longer that search list" warning for C<tr///> and
29676fb12b70Safresh1C<y///> no longer occurs in the presence of the C</c> flag. [RT #118047]
29686fb12b70Safresh1
29696fb12b70Safresh1=item *
29706fb12b70Safresh1
29716fb12b70Safresh1Stringification of NVs are not cached so that the lexical locale controls
29726fb12b70Safresh1stringification of the decimal point. [perl #108378] [perl #115800]
29736fb12b70Safresh1
29746fb12b70Safresh1=item *
29756fb12b70Safresh1
29766fb12b70Safresh1There have been several fixes related to Perl's handling of locales.  perl
29776fb12b70Safresh1#38193 was described above in L</Internal Changes>.
29786fb12b70Safresh1Also fixed is
29796fb12b70Safresh1#118197, where the radix (decimal point) character had to be an ASCII
29806fb12b70Safresh1character (which doesn't work for some non-Western languages);
29816fb12b70Safresh1and #115808, in which C<POSIX::setlocale()> on failure returned an
29826fb12b70Safresh1C<undef> which didn't warn about not being defined even if those
29836fb12b70Safresh1warnings were enabled.
29846fb12b70Safresh1
29856fb12b70Safresh1=item *
29866fb12b70Safresh1
29876fb12b70Safresh1Compiling a C<split> operator whose third argument is a named constant
2988b8851fccSafresh1evaluating to 0 no longer causes the constant's value to change.
29896fb12b70Safresh1
29906fb12b70Safresh1=item *
29916fb12b70Safresh1
29926fb12b70Safresh1A named constant used as the second argument to C<index> no longer gets
29936fb12b70Safresh1coerced to a string if it is a reference, regular expression, dualvar, etc.
29946fb12b70Safresh1
29956fb12b70Safresh1=item *
29966fb12b70Safresh1
29976fb12b70Safresh1A named constant evaluating to the undefined value used as the second
29986fb12b70Safresh1argument to C<index> no longer produces "uninitialized" warnings at compile
29996fb12b70Safresh1time.  It will still produce them at run time.
30006fb12b70Safresh1
30016fb12b70Safresh1=item *
30026fb12b70Safresh1
30036fb12b70Safresh1When a scalar was returned from a subroutine in @INC, the referenced scalar
30046fb12b70Safresh1was magically converted into an IO thingy, possibly resulting in "Bizarre
30056fb12b70Safresh1copy" errors if that scalar continued to be used elsewhere.  Now Perl uses
30066fb12b70Safresh1an internal copy of the scalar instead.
30076fb12b70Safresh1
30086fb12b70Safresh1=item *
30096fb12b70Safresh1
30106fb12b70Safresh1Certain uses of the C<sort> operator are optimised to modify an array in
30116fb12b70Safresh1place, such as C<@a = sort @a>.  During the sorting, the array is made
30126fb12b70Safresh1read-only.  If a sort block should happen to die, then the array remained
30136fb12b70Safresh1read-only even outside the C<sort>.  This has been fixed.
30146fb12b70Safresh1
30156fb12b70Safresh1=item *
30166fb12b70Safresh1
30176fb12b70Safresh1C<$a> and C<$b> inside a sort block are aliased to the actual arguments to
30186fb12b70Safresh1C<sort>, so they can be modified through those two variables.  This did not
30196fb12b70Safresh1always work, e.g., for lvalue subs and C<$#ary>, and probably many other
30206fb12b70Safresh1operators.  It works now.
30216fb12b70Safresh1
30226fb12b70Safresh1=item *
30236fb12b70Safresh1
30246fb12b70Safresh1The arguments to C<sort> are now all in list context.  If the C<sort>
30256fb12b70Safresh1itself were called in void or scalar context, then I<some>, but not all, of
30266fb12b70Safresh1the arguments used to be in void or scalar context.
30276fb12b70Safresh1
30286fb12b70Safresh1=item *
30296fb12b70Safresh1
30306fb12b70Safresh1Subroutine prototypes with Unicode characters above U+00FF were getting
30316fb12b70Safresh1mangled during closure cloning.  This would happen with subroutines closing
30326fb12b70Safresh1over lexical variables declared outside, and with lexical subs.
30336fb12b70Safresh1
30346fb12b70Safresh1=item *
30356fb12b70Safresh1
30366fb12b70Safresh1C<UNIVERSAL::can> now treats its first argument the same way that method
30376fb12b70Safresh1calls do: Typeglobs and glob references with non-empty IO slots are treated
30386fb12b70Safresh1as handles, and strings are treated as filehandles, rather than packages,
30396fb12b70Safresh1if a handle with that name exists [perl #113932].
30406fb12b70Safresh1
30416fb12b70Safresh1=item *
30426fb12b70Safresh1
30436fb12b70Safresh1Method calls on typeglobs (e.g., C<< *ARGV->getline >>) used to stringify
30446fb12b70Safresh1the typeglob and then look it up again.  Combined with changes in Perl
30456fb12b70Safresh15.18.0, this allowed C<< *foo->bar >> to call methods on the "foo" package
30466fb12b70Safresh1(like C<< foo->bar >>).  In some cases it could cause the method to be
30476fb12b70Safresh1called on the wrong handle.  Now a typeglob argument is treated as a
30486fb12b70Safresh1handle (just like C<< (\*foo)->bar >>), or, if its IO slot is empty, an
30496fb12b70Safresh1error is raised.
30506fb12b70Safresh1
30516fb12b70Safresh1=item *
30526fb12b70Safresh1
30536fb12b70Safresh1Assigning a vstring to a tied variable or to a subroutine argument aliased
30546fb12b70Safresh1to a nonexistent hash or array element now works, without flattening the
30556fb12b70Safresh1vstring into a regular string.
30566fb12b70Safresh1
30576fb12b70Safresh1=item *
30586fb12b70Safresh1
30596fb12b70Safresh1C<pos>, C<tie>, C<tied> and C<untie> did not work
30606fb12b70Safresh1properly on subroutine arguments aliased to nonexistent
30616fb12b70Safresh1hash and array elements [perl #77814, #27010].
30626fb12b70Safresh1
30636fb12b70Safresh1=item *
30646fb12b70Safresh1
30656fb12b70Safresh1The C<< => >> fat arrow operator can now quote built-in keywords even if it
30666fb12b70Safresh1occurs on the next line, making it consistent with how it treats other
30676fb12b70Safresh1barewords.
30686fb12b70Safresh1
30696fb12b70Safresh1=item *
30706fb12b70Safresh1
30716fb12b70Safresh1Autovivifying a subroutine stub via C<\&$glob> started causing crashes in Perl
30726fb12b70Safresh15.18.0 if the $glob was merely a copy of a real glob, i.e., a scalar that had
30736fb12b70Safresh1had a glob assigned to it.  This has been fixed. [perl #119051]
30746fb12b70Safresh1
30756fb12b70Safresh1=item *
30766fb12b70Safresh1
30776fb12b70Safresh1Perl used to leak an implementation detail when it came to referencing the
30786fb12b70Safresh1return values of certain operators.  C<for ($a+$b) { warn \$_; warn \$_ }> used
30796fb12b70Safresh1to display two different memory addresses, because the C<\> operator was
30806fb12b70Safresh1copying the variable.  Under threaded builds, it would also happen for
30816fb12b70Safresh1constants (C<for(1) { ... }>).  This has been fixed. [perl #21979, #78194,
30826fb12b70Safresh1#89188, #109746, #114838, #115388]
30836fb12b70Safresh1
30846fb12b70Safresh1=item *
30856fb12b70Safresh1
30866fb12b70Safresh1The range operator C<..> was returning the same modifiable scalars with each
30876fb12b70Safresh1call, unless it was the only thing in a C<foreach> loop header.  This meant
30886fb12b70Safresh1that changes to values within the list returned would be visible the next time
30896fb12b70Safresh1the operator was executed. [perl #3105]
30906fb12b70Safresh1
30916fb12b70Safresh1=item *
30926fb12b70Safresh1
30936fb12b70Safresh1Constant folding and subroutine inlining no longer cause operations that would
30946fb12b70Safresh1normally return new modifiable scalars to return read-only values instead.
30956fb12b70Safresh1
30966fb12b70Safresh1=item *
30976fb12b70Safresh1
30986fb12b70Safresh1Closures of the form C<sub () { $some_variable }> are no longer inlined,
30996fb12b70Safresh1causing changes to the variable to be ignored by callers of the subroutine.
31006fb12b70Safresh1[perl #79908]
31016fb12b70Safresh1
31026fb12b70Safresh1=item *
31036fb12b70Safresh1
31046fb12b70Safresh1Return values of certain operators such as C<ref> would sometimes be shared
31056fb12b70Safresh1between recursive calls to the same subroutine, causing the inner call to
31066fb12b70Safresh1modify the value returned by C<ref> in the outer call.  This has been fixed.
31076fb12b70Safresh1
31086fb12b70Safresh1=item *
31096fb12b70Safresh1
31106fb12b70Safresh1C<__PACKAGE__> and constants returning a package name or hash key are now
31116fb12b70Safresh1consistently read-only.  In various previous Perl releases, they have become
31126fb12b70Safresh1mutable under certain circumstances.
31136fb12b70Safresh1
31146fb12b70Safresh1=item *
31156fb12b70Safresh1
31166fb12b70Safresh1Enabling "used once" warnings no longer causes crashes on stash circularities
31176fb12b70Safresh1created at compile time (C<*Foo::Bar::Foo:: = *Foo::>).
31186fb12b70Safresh1
31196fb12b70Safresh1=item *
31206fb12b70Safresh1
31216fb12b70Safresh1Undef constants used in hash keys (C<use constant u =E<gt> undef; $h{+u}>) no
31226fb12b70Safresh1longer produce "uninitialized" warnings at compile time.
31236fb12b70Safresh1
31246fb12b70Safresh1=item *
31256fb12b70Safresh1
31266fb12b70Safresh1Modifying a substitution target inside the substitution replacement no longer
31276fb12b70Safresh1causes crashes.
31286fb12b70Safresh1
31296fb12b70Safresh1=item *
31306fb12b70Safresh1
31316fb12b70Safresh1The first statement inside a string eval used to use the wrong pragma setting
31326fb12b70Safresh1sometimes during constant folding.  C<eval 'uc chr 0xe0'> would randomly choose
31336fb12b70Safresh1between Unicode, byte, and locale semantics.  This has been fixed.
31346fb12b70Safresh1
31356fb12b70Safresh1=item *
31366fb12b70Safresh1
31376fb12b70Safresh1The handling of return values of @INC filters (subroutines returned by
31386fb12b70Safresh1subroutines in @INC) has been fixed in various ways.  Previously tied variables
31396fb12b70Safresh1were mishandled, and setting $_ to a reference or typeglob could result in
31406fb12b70Safresh1crashes.
31416fb12b70Safresh1
31426fb12b70Safresh1=item *
31436fb12b70Safresh1
31446fb12b70Safresh1The C<SvPVbyte> XS function has been fixed to work with tied scalars returning
31456fb12b70Safresh1something other than a string.  It used to return utf8 in those cases where
31466fb12b70Safresh1C<SvPV> would.
31476fb12b70Safresh1
31486fb12b70Safresh1=item *
31496fb12b70Safresh1
31506fb12b70Safresh1Perl 5.18.0 inadvertently made C<--> and C<++> crash on dereferenced regular
31516fb12b70Safresh1expressions, and stopped C<++> from flattening vstrings.
31526fb12b70Safresh1
31536fb12b70Safresh1=item *
31546fb12b70Safresh1
31556fb12b70Safresh1C<bless> no longer dies with "Can't bless non-reference value" if its first
31566fb12b70Safresh1argument is a tied reference.
31576fb12b70Safresh1
31586fb12b70Safresh1=item *
31596fb12b70Safresh1
31606fb12b70Safresh1C<reset> with an argument no longer skips copy-on-write scalars, regular
31616fb12b70Safresh1expressions, typeglob copies, and vstrings.  Also, when encountering those or
31626fb12b70Safresh1read-only values, it no longer skips any array or hash with the same name.
31636fb12b70Safresh1
31646fb12b70Safresh1=item *
31656fb12b70Safresh1
31666fb12b70Safresh1C<reset> with an argument now skips scalars aliased to typeglobs
31676fb12b70Safresh1(C<for $z (*foo) { reset "z" }>).  Previously it would corrupt memory or crash.
31686fb12b70Safresh1
31696fb12b70Safresh1=item *
31706fb12b70Safresh1
31716fb12b70Safresh1C<ucfirst> and C<lcfirst> were not respecting the bytes pragma.  This was a
31726fb12b70Safresh1regression from Perl 5.12. [perl #117355]
31736fb12b70Safresh1
31746fb12b70Safresh1=item *
31756fb12b70Safresh1
31766fb12b70Safresh1Changes to C<UNIVERSAL::DESTROY> now update DESTROY caches in all classes,
31776fb12b70Safresh1instead of causing classes that have already had objects destroyed to continue
31786fb12b70Safresh1using the old sub.  This was a regression in Perl 5.18. [perl #114864]
31796fb12b70Safresh1
31806fb12b70Safresh1=item *
31816fb12b70Safresh1
31826fb12b70Safresh1All known false-positive occurrences of the deprecation warning "Useless use of
31836fb12b70Safresh1'\'; doesn't escape metacharacter '%c'", added in Perl 5.18.0, have been
31846fb12b70Safresh1removed. [perl #119101]
31856fb12b70Safresh1
31866fb12b70Safresh1=item *
31876fb12b70Safresh1
31886fb12b70Safresh1The value of $^E is now saved across signal handlers on Windows.  [perl #85104]
31896fb12b70Safresh1
31906fb12b70Safresh1=item *
31916fb12b70Safresh1
31926fb12b70Safresh1A lexical filehandle (as in C<open my $fh...>) is usually given a name based on
31936fb12b70Safresh1the current package and the name of the variable, e.g. "main::$fh".  Under
31946fb12b70Safresh1recursion, the filehandle was losing the "$fh" part of the name.  This has been
31956fb12b70Safresh1fixed.
31966fb12b70Safresh1
31976fb12b70Safresh1=item *
31986fb12b70Safresh1
31996fb12b70Safresh1Uninitialized values returned by XSUBs are no longer exempt from uninitialized
32006fb12b70Safresh1warnings.  [perl #118693]
32016fb12b70Safresh1
32026fb12b70Safresh1=item *
32036fb12b70Safresh1
32046fb12b70Safresh1C<elsif ("")> no longer erroneously produces a warning about void context.
32056fb12b70Safresh1[perl #118753]
32066fb12b70Safresh1
32076fb12b70Safresh1=item *
32086fb12b70Safresh1
32096fb12b70Safresh1Passing C<undef> to a subroutine now causes @_ to contain the same read-only
32106fb12b70Safresh1undefined scalar that C<undef> returns.  Furthermore, C<exists $_[0]> will now
32116fb12b70Safresh1return true if C<undef> was the first argument.  [perl #7508, #109726]
32126fb12b70Safresh1
32136fb12b70Safresh1=item *
32146fb12b70Safresh1
32156fb12b70Safresh1Passing a non-existent array element to a subroutine does not usually
32166fb12b70Safresh1autovivify it unless the subroutine modifies its argument.  This did not work
32176fb12b70Safresh1correctly with negative indices and with non-existent elements within the
32186fb12b70Safresh1array.  The element would be vivified immediately.  The delayed vivification
32196fb12b70Safresh1has been extended to work with those.  [perl #118691]
32206fb12b70Safresh1
32216fb12b70Safresh1=item *
32226fb12b70Safresh1
32236fb12b70Safresh1Assigning references or globs to the scalar returned by $#foo after the @foo
32246fb12b70Safresh1array has been freed no longer causes assertion failures on debugging builds
32256fb12b70Safresh1and memory leaks on regular builds.
32266fb12b70Safresh1
32276fb12b70Safresh1=item *
32286fb12b70Safresh1
32296fb12b70Safresh1On 64-bit platforms, large ranges like 1..1000000000000 no longer crash, but
32306fb12b70Safresh1eat up all your memory instead.  [perl #119161]
32316fb12b70Safresh1
32326fb12b70Safresh1=item *
32336fb12b70Safresh1
32346fb12b70Safresh1C<__DATA__> now puts the C<DATA> handle in the right package, even if the
32356fb12b70Safresh1current package has been renamed through glob assignment.
32366fb12b70Safresh1
32376fb12b70Safresh1=item *
32386fb12b70Safresh1
32396fb12b70Safresh1When C<die>, C<last>, C<next>, C<redo>, C<goto> and C<exit> unwind the scope,
32406fb12b70Safresh1it is possible for C<DESTROY> recursively to call a subroutine or format that
32416fb12b70Safresh1is currently being exited.  It that case, sometimes the lexical variables
32426fb12b70Safresh1inside the sub would start out having values from the outer call, instead of
32436fb12b70Safresh1being undefined as they should.  This has been fixed.  [perl #119311]
32446fb12b70Safresh1
32456fb12b70Safresh1=item *
32466fb12b70Safresh1
32476fb12b70Safresh1${^MPEN} is no longer treated as a synonym for ${^MATCH}.
32486fb12b70Safresh1
32496fb12b70Safresh1=item *
32506fb12b70Safresh1
32516fb12b70Safresh1Perl now tries a little harder to return the correct line number in
32526fb12b70Safresh1C<(caller)[2]>.  [perl #115768]
32536fb12b70Safresh1
32546fb12b70Safresh1=item *
32556fb12b70Safresh1
32566fb12b70Safresh1Line numbers inside multiline quote-like operators are now reported correctly.
32576fb12b70Safresh1[perl #3643]
32586fb12b70Safresh1
32596fb12b70Safresh1=item *
32606fb12b70Safresh1
32616fb12b70Safresh1C<#line> directives inside code embedded in quote-like operators are now
32626fb12b70Safresh1respected.
32636fb12b70Safresh1
32646fb12b70Safresh1=item *
32656fb12b70Safresh1
32666fb12b70Safresh1Line numbers are now correct inside the second here-doc when two here-doc
32676fb12b70Safresh1markers occur on the same line.
32686fb12b70Safresh1
32696fb12b70Safresh1=item *
32706fb12b70Safresh1
32716fb12b70Safresh1An optimization in Perl 5.18 made incorrect assumptions causing a bad
32726fb12b70Safresh1interaction with the L<Devel::CallParser> CPAN module.  If the module was
32736fb12b70Safresh1loaded then lexical variables declared in separate statements following a
32746fb12b70Safresh1C<my(...)> list might fail to be cleared on scope exit.
32756fb12b70Safresh1
32766fb12b70Safresh1=item *
32776fb12b70Safresh1
32786fb12b70Safresh1C<&xsub> and C<goto &xsub> calls now allow the called subroutine to autovivify
32796fb12b70Safresh1elements of @_.
32806fb12b70Safresh1
32816fb12b70Safresh1=item *
32826fb12b70Safresh1
32836fb12b70Safresh1C<&xsub> and C<goto &xsub> no longer crash if *_ has been undefined and has no
32846fb12b70Safresh1ARRAY entry (i.e. @_ does not exist).
32856fb12b70Safresh1
32866fb12b70Safresh1=item *
32876fb12b70Safresh1
32886fb12b70Safresh1C<&xsub> and C<goto &xsub> now work with tied @_.
32896fb12b70Safresh1
32906fb12b70Safresh1=item *
32916fb12b70Safresh1
32926fb12b70Safresh1Overlong identifiers no longer cause a buffer overflow (and a crash).  They
32936fb12b70Safresh1started doing so in Perl 5.18.
32946fb12b70Safresh1
32956fb12b70Safresh1=item *
32966fb12b70Safresh1
32976fb12b70Safresh1The warning "Scalar value @hash{foo} better written as $hash{foo}" now produces
32986fb12b70Safresh1far fewer false positives.  In particular, C<@hash{+function_returning_a_list}>
32996fb12b70Safresh1and C<@hash{ qw "foo bar baz" }> no longer warn.  The same applies to array
33006fb12b70Safresh1slices.  [perl #28380, #114024]
33016fb12b70Safresh1
33026fb12b70Safresh1=item *
33036fb12b70Safresh1
33046fb12b70Safresh1C<$! = EINVAL; waitpid(0, WNOHANG);> no longer goes into an internal infinite
33056fb12b70Safresh1loop.  [perl #85228]
33066fb12b70Safresh1
33076fb12b70Safresh1=item *
33086fb12b70Safresh1
33096fb12b70Safresh1A possible segmentation fault in filehandle duplication has been fixed.
33106fb12b70Safresh1
33116fb12b70Safresh1=item *
33126fb12b70Safresh1
33136fb12b70Safresh1A subroutine in @INC can return a reference to a scalar containing the initial
33146fb12b70Safresh1contents of the file.  However, that scalar was freed prematurely if not
33156fb12b70Safresh1referenced elsewhere, giving random results.
33166fb12b70Safresh1
33176fb12b70Safresh1=item *
33186fb12b70Safresh1
33196fb12b70Safresh1C<last> no longer returns values that the same statement has accumulated so
33206fb12b70Safresh1far, fixing amongst other things the long-standing bug that C<push @a, last>
33216fb12b70Safresh1would try to return the @a, copying it like a scalar in the process and
33226fb12b70Safresh1resulting in the error, "Bizarre copy of ARRAY in last."  [perl #3112]
33236fb12b70Safresh1
33246fb12b70Safresh1=item *
33256fb12b70Safresh1
33266fb12b70Safresh1In some cases, closing file handles opened to pipe to or from a process, which
33276fb12b70Safresh1had been duplicated into a standard handle, would call perl's internal waitpid
33286fb12b70Safresh1wrapper with a pid of zero.  With the fix for [perl #85228] this zero pid was
33296fb12b70Safresh1passed to C<waitpid>, possibly blocking the process.  This wait for process
33306fb12b70Safresh1zero no longer occurs.  [perl #119893]
33316fb12b70Safresh1
33326fb12b70Safresh1=item *
33336fb12b70Safresh1
33346fb12b70Safresh1C<select> used to ignore magic on the fourth (timeout) argument, leading to
33356fb12b70Safresh1effects such as C<select> blocking indefinitely rather than the expected sleep
33366fb12b70Safresh1time.  This has now been fixed.  [perl #120102]
33376fb12b70Safresh1
33386fb12b70Safresh1=item *
33396fb12b70Safresh1
33406fb12b70Safresh1The class name in C<for my class $foo> is now parsed correctly.  In the case of
33416fb12b70Safresh1the second character of the class name being followed by a digit (e.g. 'a1b')
33426fb12b70Safresh1this used to give the error "Missing $ on loop variable".  [perl #120112]
33436fb12b70Safresh1
33446fb12b70Safresh1=item *
33456fb12b70Safresh1
33466fb12b70Safresh1Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
33476fb12b70Safresh1C<use integer>.  This has been fixed.  [perl #120288]
33486fb12b70Safresh1
33496fb12b70Safresh1=item *
33506fb12b70Safresh1
33516fb12b70Safresh1C<-a> at the start of a line (or a hyphen with any single letter that is
33526fb12b70Safresh1not a filetest operator) no longer produces an erroneous 'Use of "-a"
33536fb12b70Safresh1without parentheses is ambiguous' warning.  [perl #120288]
33546fb12b70Safresh1
33556fb12b70Safresh1=item *
33566fb12b70Safresh1
33576fb12b70Safresh1Lvalue context is now properly propagated into bare blocks and C<if> and
33586fb12b70Safresh1C<else> blocks in lvalue subroutines.  Previously, arrays and hashes would
33596fb12b70Safresh1sometimes incorrectly be flattened when returned in lvalue list context, or
33606fb12b70Safresh1"Bizarre copy" errors could occur.  [perl #119797]
33616fb12b70Safresh1
33626fb12b70Safresh1=item *
33636fb12b70Safresh1
33646fb12b70Safresh1Lvalue context is now propagated to the branches of C<||> and C<&&> (and
33656fb12b70Safresh1their alphabetic equivalents, C<or> and C<and>).  This means
33666fb12b70Safresh1C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
33676fb12b70Safresh1through $_.
33686fb12b70Safresh1
33696fb12b70Safresh1=item *
33706fb12b70Safresh1
33716fb12b70Safresh1C<stat> and C<readline> remember the last handle used; the former
33726fb12b70Safresh1for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
33736fb12b70Safresh1C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
33746fb12b70Safresh1or C<readline> could cause that handle to be forgotten if the
33756fb12b70Safresh1handle were not opened yet.  This has been fixed.
33766fb12b70Safresh1
33776fb12b70Safresh1=item *
33786fb12b70Safresh1
33796fb12b70Safresh1Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
33806fb12b70Safresh1have been fixed.  [perl #54044]
33816fb12b70Safresh1
33826fb12b70Safresh1=item *
33836fb12b70Safresh1
33846fb12b70Safresh1Setting C<$!> to EACCESS before calling C<require> could affect
33856fb12b70Safresh1C<require>'s behaviour.  This has been fixed.
33866fb12b70Safresh1
33876fb12b70Safresh1=item *
33886fb12b70Safresh1
33896fb12b70Safresh1The "Can't use \1 to mean $1 in expression" warning message now only occurs
33906fb12b70Safresh1on the right-hand (replacement) part of a substitution.  Formerly it could
33916fb12b70Safresh1happen in code embedded in the left-hand side, or in any other quote-like
33926fb12b70Safresh1operator.
33936fb12b70Safresh1
33946fb12b70Safresh1=item *
33956fb12b70Safresh1
33966fb12b70Safresh1Blessing into a reference (C<bless $thisref, $thatref>) has long been
33976fb12b70Safresh1disallowed, but magical scalars for the second like C<$/> and those tied
33986fb12b70Safresh1were exempt.  They no longer are.  [perl #119809]
33996fb12b70Safresh1
34006fb12b70Safresh1=item *
34016fb12b70Safresh1
34026fb12b70Safresh1Blessing into a reference was accidentally allowed in 5.18 if the class
34036fb12b70Safresh1argument were a blessed reference with stale method caches (i.e., whose
34046fb12b70Safresh1class had had subs defined since the last method call).  They are
34056fb12b70Safresh1disallowed once more, as in 5.16.
34066fb12b70Safresh1
34076fb12b70Safresh1=item *
34086fb12b70Safresh1
34096fb12b70Safresh1C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
34106fb12b70Safresh1if a Class::FIELDS subroutine stub has been declared.
34116fb12b70Safresh1
34126fb12b70Safresh1=item *
34136fb12b70Safresh1
34146fb12b70Safresh1C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
34156fb12b70Safresh1field checking ("No such class field"; see L<fields>) but no longer are.
34166fb12b70Safresh1
34176fb12b70Safresh1=item *
34186fb12b70Safresh1
34196fb12b70Safresh1A nonexistent array element with a large index passed to a subroutine that
34206fb12b70Safresh1ties the array and then tries to access the element no longer results in a
34216fb12b70Safresh1crash.
34226fb12b70Safresh1
34236fb12b70Safresh1=item *
34246fb12b70Safresh1
34256fb12b70Safresh1Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
34266fb12b70Safresh1array indices crash when the current package is a tied array class.
34276fb12b70Safresh1
34286fb12b70Safresh1=item *
34296fb12b70Safresh1
34306fb12b70Safresh1Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
34316fb12b70Safresh1CORE::GLOBAL:: package no longer makes compilation of calls to the
34326fb12b70Safresh1corresponding functions crash.
34336fb12b70Safresh1
34346fb12b70Safresh1=item *
34356fb12b70Safresh1
34366fb12b70Safresh1Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
34376fb12b70Safresh1but has now been fixed.
34386fb12b70Safresh1
34396fb12b70Safresh1=item *
34406fb12b70Safresh1
34416fb12b70Safresh1When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
34426fb12b70Safresh1interpolation now happens, as is the case when there is no override.
34436fb12b70Safresh1Previously, the presence of an override would make these quote-like
34446fb12b70Safresh1operators act like C<q{}>, suppressing interpolation.  [perl #115330]
34456fb12b70Safresh1
34466fb12b70Safresh1=item *
34476fb12b70Safresh1
34486fb12b70Safresh1C<<<<`...`> here-docs (with backticks as the delimiters) now call
34496fb12b70Safresh1C<readpipe> overrides.  [perl #119827]
34506fb12b70Safresh1
34516fb12b70Safresh1=item *
34526fb12b70Safresh1
34536fb12b70Safresh1C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
34546fb12b70Safresh1
34556fb12b70Safresh1=item *
34566fb12b70Safresh1
34576fb12b70Safresh1Undefining a glob that triggers a DESTROY method that undefines the same
34586fb12b70Safresh1glob is now safe.  It used to produce "Attempt to free unreferenced glob
34596fb12b70Safresh1pointer" warnings and leak memory.
34606fb12b70Safresh1
34616fb12b70Safresh1=item *
34626fb12b70Safresh1
34636fb12b70Safresh1If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
34646fb12b70Safresh1triggers a DESTROY method on the sub that is being redefined, and that
34656fb12b70Safresh1method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
34666fb12b70Safresh1is no longer left pointing to a freed scalar.  Now DESTROY is delayed until
34676fb12b70Safresh1the new subroutine has been installed.
34686fb12b70Safresh1
34696fb12b70Safresh1=item *
34706fb12b70Safresh1
34716fb12b70Safresh1On Windows, perl no longer calls CloseHandle() on a socket handle.  This makes
34726fb12b70Safresh1debugging easier on Windows by removing certain irrelevant bad handle
34736fb12b70Safresh1exceptions.  It also fixes a race condition that made socket functions randomly
34746fb12b70Safresh1fail in a Perl process with multiple OS threads, and possible test failures in
34756fb12b70Safresh1F<dist/IO/t/cachepropagate-tcp.t>.  [perl #120091/118059]
34766fb12b70Safresh1
34776fb12b70Safresh1=item *
34786fb12b70Safresh1
34796fb12b70Safresh1Formats involving UTF-8 encoded strings, or strange vars like ties,
34806fb12b70Safresh1overloads, or stringified refs (and in recent
34816fb12b70Safresh1perls, pure NOK vars) would generally do the wrong thing in formats
34826fb12b70Safresh1when the var is treated as a string and repeatedly chopped, as in
34836fb12b70Safresh1C<< ^<<<~~ >> and similar. This has now been resolved.
34846fb12b70Safresh1[perl #33832/45325/113868/119847/119849/119851]
34856fb12b70Safresh1
34866fb12b70Safresh1=item *
34876fb12b70Safresh1
34886fb12b70Safresh1C<< semctl(..., SETVAL, ...) >> would set the semaphore to the top
34896fb12b70Safresh132-bits of the supplied integer instead of the bottom 32-bits on
34906fb12b70Safresh164-bit big-endian systems. [perl #120635]
34916fb12b70Safresh1
34926fb12b70Safresh1=item *
34936fb12b70Safresh1
34946fb12b70Safresh1C<< readdir() >> now only sets C<$!> on error.  C<$!> is no longer set
34956fb12b70Safresh1to C<EBADF> when then terminating C<undef> is read from the directory
34966fb12b70Safresh1unless the system call sets C<$!>. [perl #118651]
34976fb12b70Safresh1
34986fb12b70Safresh1=item *
34996fb12b70Safresh1
35006fb12b70Safresh1C<&CORE::glob> no longer causes an intermittent crash due to perl's stack
35016fb12b70Safresh1getting corrupted. [perl #119993]
35026fb12b70Safresh1
35036fb12b70Safresh1=item *
35046fb12b70Safresh1
35056fb12b70Safresh1C<open> with layers that load modules (e.g., "<:encoding(utf8)") no longer
35066fb12b70Safresh1runs the risk of crashing due to stack corruption.
35076fb12b70Safresh1
35086fb12b70Safresh1=item *
35096fb12b70Safresh1
35106fb12b70Safresh1Perl 5.18 broke autoloading via C<< ->SUPER::foo >> method calls by looking
35116fb12b70Safresh1up AUTOLOAD from the current package rather than the current package's
35126fb12b70Safresh1superclass.  This has been fixed. [perl #120694]
35136fb12b70Safresh1
35146fb12b70Safresh1=item *
35156fb12b70Safresh1
35166fb12b70Safresh1A longstanding bug causing C<do {} until CONSTANT>, where the constant
35176fb12b70Safresh1holds a true value, to read unallocated memory has been resolved.  This
35186fb12b70Safresh1would usually happen after a syntax error.  In past versions of Perl it has
35196fb12b70Safresh1crashed intermittently. [perl #72406]
35206fb12b70Safresh1
35216fb12b70Safresh1=item *
35226fb12b70Safresh1
35236fb12b70Safresh1Fix HP-UX C<$!> failure. HP-UX strerror() returns an empty string for an
35246fb12b70Safresh1unknown error code.  This caused an assertion to fail under DEBUGGING
35256fb12b70Safresh1builds.  Now instead, the returned string for C<"$!"> contains text
35266fb12b70Safresh1indicating the code is for an unknown error.
35276fb12b70Safresh1
35286fb12b70Safresh1=item *
35296fb12b70Safresh1
35306fb12b70Safresh1Individually-tied elements of @INC (as in C<tie $INC[0]...>) are now
35316fb12b70Safresh1handled correctly.  Formerly, whether a sub returned by such a tied element
35326fb12b70Safresh1would be treated as a sub depended on whether a FETCH had occurred
35336fb12b70Safresh1previously.
35346fb12b70Safresh1
35356fb12b70Safresh1=item *
35366fb12b70Safresh1
35376fb12b70Safresh1C<getc> on a byte-sized handle after the same C<getc> operator had been
35386fb12b70Safresh1used on a utf8 handle used to treat the bytes as utf8, resulting in erratic
35396fb12b70Safresh1behavior (e.g., malformed UTF-8 warnings).
35406fb12b70Safresh1
35416fb12b70Safresh1=item *
35426fb12b70Safresh1
35436fb12b70Safresh1An initial C<{> at the beginning of a format argument line was always
35446fb12b70Safresh1interpreted as the beginning of a block prior to v5.18.  In Perl v5.18, it
35456fb12b70Safresh1started being treated as an ambiguous token.  The parser would guess
35466fb12b70Safresh1whether it was supposed to be an anonymous hash constructor or a block
3547eac174f2Safresh1based on the contents.  Now the previous behaviour has been restored.
35486fb12b70Safresh1[perl #119973]
35496fb12b70Safresh1
35506fb12b70Safresh1=item *
35516fb12b70Safresh1
35526fb12b70Safresh1In Perl v5.18 C<undef *_; goto &sub> and C<local *_; goto &sub> started
35536fb12b70Safresh1crashing.  This has been fixed. [perl #119949]
35546fb12b70Safresh1
35556fb12b70Safresh1=item *
35566fb12b70Safresh1
35576fb12b70Safresh1Backticks (C< `` > or C< qx// >) combined with multiple threads on
35586fb12b70Safresh1Win32 could result in output sent to stdout on one thread being
35596fb12b70Safresh1captured by backticks of an external command in another thread.
35606fb12b70Safresh1
35616fb12b70Safresh1This could occur for pseudo-forked processes too, as Win32's
35626fb12b70Safresh1pseudo-fork is implemented in terms of threads.  [perl #77672]
35636fb12b70Safresh1
35646fb12b70Safresh1=item *
35656fb12b70Safresh1
35666fb12b70Safresh1C<< open $fh, ">+", undef >> no longer leaks memory when TMPDIR is set
35676fb12b70Safresh1but points to a directory a temporary file cannot be created in.  [perl
35686fb12b70Safresh1#120951]
35696fb12b70Safresh1
35706fb12b70Safresh1=item *
35716fb12b70Safresh1
35726fb12b70Safresh1C< for ( $h{k} || '' ) > no longer auto-vivifies C<$h{k}>.  [perl
35736fb12b70Safresh1#120374]
35746fb12b70Safresh1
35756fb12b70Safresh1=item *
35766fb12b70Safresh1
35776fb12b70Safresh1On Windows machines, Perl now emulates the POSIX use of the environment
35786fb12b70Safresh1for locale initialization.  Previously, the environment was ignored.
35796fb12b70Safresh1See L<perllocale/ENVIRONMENT>.
35806fb12b70Safresh1
35816fb12b70Safresh1=item *
35826fb12b70Safresh1
35836fb12b70Safresh1Fixed a crash when destroying a self-referencing GLOB.  [perl #121242]
35846fb12b70Safresh1
35856fb12b70Safresh1=back
35866fb12b70Safresh1
35876fb12b70Safresh1=head1 Known Problems
35886fb12b70Safresh1
35896fb12b70Safresh1=over 4
35906fb12b70Safresh1
35916fb12b70Safresh1=item *
35926fb12b70Safresh1
35936fb12b70Safresh1L<IO::Socket> is known to fail tests on AIX 5.3.  There is
3594eac174f2Safresh1L<a patch|https://github.com/Perl/perl5/issues/13484> in the request
35956fb12b70Safresh1tracker, #120835, which may be applied to future releases.
35966fb12b70Safresh1
35976fb12b70Safresh1=item *
35986fb12b70Safresh1
35996fb12b70Safresh1The following modules are known to have test failures with this version of
36006fb12b70Safresh1Perl.  Patches have been submitted, so there will hopefully be new releases
36016fb12b70Safresh1soon:
36026fb12b70Safresh1
36036fb12b70Safresh1=over
36046fb12b70Safresh1
36056fb12b70Safresh1=item *
36066fb12b70Safresh1
36076fb12b70Safresh1L<Data::Structure::Util> version 0.15
36086fb12b70Safresh1
36096fb12b70Safresh1=item *
36106fb12b70Safresh1
36116fb12b70Safresh1L<HTML::StripScripts> version 1.05
36126fb12b70Safresh1
36136fb12b70Safresh1=item *
36146fb12b70Safresh1
36156fb12b70Safresh1L<List::Gather> version 0.08.
36166fb12b70Safresh1
36176fb12b70Safresh1=back
36186fb12b70Safresh1
36196fb12b70Safresh1=back
36206fb12b70Safresh1
36216fb12b70Safresh1=head1 Obituary
36226fb12b70Safresh1
36236fb12b70Safresh1Diana Rosa, 27, of Rio de Janeiro, went to her long rest on May 10,
36246fb12b70Safresh12014, along with the plush camel she kept hanging on her computer screen
36256fb12b70Safresh1all the time. She was a passionate Perl hacker who loved the language and its
36266fb12b70Safresh1community, and who never missed a Rio.pm event. She was a true artist, an
36276fb12b70Safresh1enthusiast about writing code, singing arias and graffiting walls. We'll never
36286fb12b70Safresh1forget you.
36296fb12b70Safresh1
36306fb12b70Safresh1Greg McCarroll died on August 28, 2013.
36316fb12b70Safresh1
36326fb12b70Safresh1Greg was well known for many good reasons. He was one of the organisers of
36336fb12b70Safresh1the first YAPC::Europe, which concluded with an unscheduled auction where he
36346fb12b70Safresh1frantically tried to raise extra money to avoid the conference making a
36356fb12b70Safresh1loss. It was Greg who mistakenly arrived for a london.pm meeting a week
36366fb12b70Safresh1late; some years later he was the one who sold the choice of official
36376fb12b70Safresh1meeting date at a YAPC::Europe auction, and eventually as glorious leader of
36386fb12b70Safresh1london.pm he got to inherit the irreverent confusion that he had created.
36396fb12b70Safresh1
36406fb12b70Safresh1Always helpful, friendly and cheerfully optimistic, you will be missed, but
36416fb12b70Safresh1never forgotten.
36426fb12b70Safresh1
36436fb12b70Safresh1=head1 Acknowledgements
36446fb12b70Safresh1
36456fb12b70Safresh1Perl 5.20.0 represents approximately 12 months of development since Perl 5.18.0
36466fb12b70Safresh1and contains approximately 470,000 lines of changes across 2,900 files from 124
36476fb12b70Safresh1authors.
36486fb12b70Safresh1
36496fb12b70Safresh1Excluding auto-generated files, documentation and release tools, there were
36506fb12b70Safresh1approximately 280,000 lines of changes to 1,800 .pm, .t, .c and .h files.
36516fb12b70Safresh1
36526fb12b70Safresh1Perl continues to flourish into its third decade thanks to a vibrant community
36536fb12b70Safresh1of users and developers. The following people are known to have contributed the
36546fb12b70Safresh1improvements that became Perl 5.20.0:
36556fb12b70Safresh1
36566fb12b70Safresh1Aaron Crane, Abhijit Menon-Sen, Abigail, Abir Viqar, Alan Haggai Alavi, Alan
36576fb12b70Safresh1Hourihane, Alexander Voronov, Alexandr Ciornii, Andy Dougherty, Anno Siegel,
36586fb12b70Safresh1Aristotle Pagaltzis, Arthur Axel 'fREW' Schmidt, Brad Gilbert, Brendan Byrd,
36596fb12b70Safresh1Brian Childs, Brian Fraser, Brian Gottreu, Chris 'BinGOs' Williams, Christian
36606fb12b70Safresh1Millour, Colin Kuskie, Craig A. Berry, Dabrien 'Dabe' Murphy, Dagfinn Ilmari
36616fb12b70Safresh1Mannsåker, Daniel Dragan, Darin McBride, David Golden, David Leadbeater, David
36626fb12b70Safresh1Mitchell, David Nicol, David Steinbrunner, Dennis Kaarsemaker, Dominic
36636fb12b70Safresh1Hargreaves, Ed Avis, Eric Brine, Evan Zacks, Father Chrysostomos, Florian
36646fb12b70Safresh1Ragwitz, François Perrad, Gavin Shelley, Gideon Israel Dsouza, Gisle Aas,
36656fb12b70Safresh1Graham Knop, H.Merijn Brand, Hauke D, Heiko Eissfeldt, Hiroo Hayashi, Hojung
36666fb12b70Safresh1Youn, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jess Robinson, Jesse
36676fb12b70Safresh1Luehrs, Johan Vromans, John Gardiner Myers, John Goodyear, John P. Linderman,
36686fb12b70Safresh1John Peacock, kafka, Kang-min Liu, Karen Etheridge, Karl Williamson, Keedi Kim,
36696fb12b70Safresh1Kent Fredric, kevin dawson, Kevin Falcone, Kevin Ryde, Leon Timmermans, Lukas
36706fb12b70Safresh1Mai, Marc Simpson, Marcel Grünauer, Marco Peereboom, Marcus Holland-Moritz,
36716fb12b70Safresh1Mark Jason Dominus, Martin McGrath, Matthew Horsfall, Max Maischein, Mike
36726fb12b70Safresh1Doherty, Moritz Lenz, Nathan Glenn, Nathan Trapuzzano, Neil Bowers, Neil
36736fb12b70Safresh1Williams, Nicholas Clark, Niels Thykier, Niko Tyni, Olivier Mengué, Owain G.
36746fb12b70Safresh1Ainsworth, Paul Green, Paul Johnson, Peter John Acklam, Peter Martini, Peter
36756fb12b70Safresh1Rabbitson, Petr Písař, Philip Boulain, Philip Guenther, Piotr Roszatycki,
36766fb12b70Safresh1Rafael Garcia-Suarez, Reini Urban, Reuben Thomas, Ricardo Signes, Ruslan
36776fb12b70Safresh1Zakirov, Sergey Alekseev, Shirakata Kentaro, Shlomi Fish, Slaven Rezic,
36786fb12b70Safresh1Smylers, Steffen Müller, Steve Hay, Sullivan Beck, Thomas Sibley, Tobias
36796fb12b70Safresh1Leich, Toby Inkster, Tokuhiro Matsuno, Tom Christiansen, Tom Hukins, Tony Cook,
36806fb12b70Safresh1Victor Efimov, Viktor Turskyi, Vladimir Timofeev, YAMASHINA Hio, Yves Orton,
36816fb12b70Safresh1Zefram, Zsbán Ambrus, Ævar Arnfjörð Bjarmason.
36826fb12b70Safresh1
36836fb12b70Safresh1The list above is almost certainly incomplete as it is automatically generated
36846fb12b70Safresh1from version control history. In particular, it does not include the names of
36856fb12b70Safresh1the (very much appreciated) contributors who reported issues to the Perl bug
36866fb12b70Safresh1tracker.
36876fb12b70Safresh1
36886fb12b70Safresh1Many of the changes included in this version originated in the CPAN modules
36896fb12b70Safresh1included in Perl's core. We're grateful to the entire CPAN community for
36906fb12b70Safresh1helping Perl to flourish.
36916fb12b70Safresh1
36926fb12b70Safresh1For a more complete list of all of Perl's historical contributors, please see
36936fb12b70Safresh1the F<AUTHORS> file in the Perl source distribution.
36946fb12b70Safresh1
36956fb12b70Safresh1=head1 Reporting Bugs
36966fb12b70Safresh1
36976fb12b70Safresh1If you find what you think is a bug, you might check the articles recently
36986fb12b70Safresh1posted to the comp.lang.perl.misc newsgroup and the perl bug database at
36996fb12b70Safresh1http://rt.perl.org/perlbug/ .  There may also be information at
37006fb12b70Safresh1http://www.perl.org/ , the Perl Home Page.
37016fb12b70Safresh1
37026fb12b70Safresh1If you believe you have an unreported bug, please run the L<perlbug> program
37036fb12b70Safresh1included with your release.  Be sure to trim your bug down to a tiny but
37046fb12b70Safresh1sufficient test case.  Your bug report, along with the output of C<perl -V>,
37056fb12b70Safresh1will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
37066fb12b70Safresh1
37076fb12b70Safresh1If the bug you are reporting has security implications, which make it
37086fb12b70Safresh1inappropriate to send to a publicly archived mailing list, then please send it
37096fb12b70Safresh1to perl5-security-report@perl.org.  This points to a closed subscription
37106fb12b70Safresh1unarchived mailing list, which includes all the core committers, who will be
37116fb12b70Safresh1able to help assess the impact of issues, figure out a resolution, and help
37126fb12b70Safresh1co-ordinate the release of patches to mitigate or fix the problem across all
37136fb12b70Safresh1platforms on which Perl is supported.  Please only use this address for
37146fb12b70Safresh1security issues in the Perl core, not for modules independently distributed on
37156fb12b70Safresh1CPAN.
37166fb12b70Safresh1
37176fb12b70Safresh1=head1 SEE ALSO
37186fb12b70Safresh1
37196fb12b70Safresh1The F<Changes> file for an explanation of how to view exhaustive details on
37206fb12b70Safresh1what changed.
37216fb12b70Safresh1
37226fb12b70Safresh1The F<INSTALL> file for how to build Perl.
37236fb12b70Safresh1
37246fb12b70Safresh1The F<README> file for general stuff.
37256fb12b70Safresh1
37266fb12b70Safresh1The F<Artistic> and F<Copying> files for copyright information.
37276fb12b70Safresh1
37286fb12b70Safresh1=cut
3729