From fc22b3d6507c6745911b9dfcc68f1e665ae13dbc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:43:11 +0200 Subject: Adding upstream version 4.22.0. Signed-off-by: Daniel Baumann --- upstream/mageia-cauldron/man1/perl5180delta.1 | 3014 +++++++++++++++++++++++++ 1 file changed, 3014 insertions(+) create mode 100644 upstream/mageia-cauldron/man1/perl5180delta.1 (limited to 'upstream/mageia-cauldron/man1/perl5180delta.1') diff --git a/upstream/mageia-cauldron/man1/perl5180delta.1 b/upstream/mageia-cauldron/man1/perl5180delta.1 new file mode 100644 index 00000000..59292314 --- /dev/null +++ b/upstream/mageia-cauldron/man1/perl5180delta.1 @@ -0,0 +1,3014 @@ +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. +.ie n \{\ +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" ======================================================================== +.\" +.IX Title "PERL5180DELTA 1" +.TH PERL5180DELTA 1 2023-11-28 "perl v5.38.2" "Perl Programmers Reference Guide" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH NAME +perl5180delta \- what is new for perl v5.18.0 +.SH DESCRIPTION +.IX Header "DESCRIPTION" +This document describes differences between the v5.16.0 release and the v5.18.0 +release. +.PP +If you are upgrading from an earlier release such as v5.14.0, first read +perl5160delta, which describes differences between v5.14.0 and v5.16.0. +.SH "Core Enhancements" +.IX Header "Core Enhancements" +.SS "New mechanism for experimental features" +.IX Subsection "New mechanism for experimental features" +Newly-added experimental features will now require this incantation: +.PP +.Vb 2 +\& no warnings "experimental::feature_name"; +\& use feature "feature_name"; # would warn without the prev line +.Ve +.PP +There is a new warnings category, called "experimental", containing +warnings that the feature pragma emits when enabling experimental +features. +.PP +Newly-added experimental features will also be given special warning IDs, +which consist of "experimental::" followed by the name of the feature. (The +plan is to extend this mechanism eventually to all warnings, to allow them +to be enabled or disabled individually, and not just by category.) +.PP +By saying +.PP +.Vb 1 +\& no warnings "experimental::feature_name"; +.Ve +.PP +you are taking responsibility for any breakage that future changes to, or +removal of, the feature may cause. +.PP +Since some features (like \f(CW\*(C`~~\*(C'\fR or \f(CW\*(C`my $_\*(C'\fR) now emit experimental warnings, +and you may want to disable them in code that is also run on perls that do not +recognize these warning categories, consider using the \f(CW\*(C`if\*(C'\fR pragma like this: +.PP +.Vb 1 +\& no if $] >= 5.018, warnings => "experimental::feature_name"; +.Ve +.PP +Existing experimental features may begin emitting these warnings, too. Please +consult perlexperiment for information on which features are considered +experimental. +.SS "Hash overhaul" +.IX Subsection "Hash overhaul" +Changes to the implementation of hashes in perl v5.18.0 will be one of the most +visible changes to the behavior of existing code. +.PP +By default, two distinct hash variables with identical keys and values may now +provide their contents in a different order where it was previously identical. +.PP +When encountering these changes, the key to cleaning up from them is to accept +that \fBhashes are unordered collections\fR and to act accordingly. +.PP +\fIHash randomization\fR +.IX Subsection "Hash randomization" +.PP +The seed used by Perl's hash function is now random. This means that the +order which keys/values will be returned from functions like \f(CWkeys()\fR, +\&\f(CWvalues()\fR, and \f(CWeach()\fR will differ from run to run. +.PP +This change was introduced to make Perl's hashes more robust to algorithmic +complexity attacks, and also because we discovered that it exposes hash +ordering dependency bugs and makes them easier to track down. +.PP +Toolchain maintainers might want to invest in additional infrastructure to +test for things like this. Running tests several times in a row and then +comparing results will make it easier to spot hash order dependencies in +code. Authors are strongly encouraged not to expose the key order of +Perl's hashes to insecure audiences. +.PP +Further, every hash has its own iteration order, which should make it much +more difficult to determine what the current hash seed is. +.PP +\fINew hash functions\fR +.IX Subsection "New hash functions" +.PP +Perl v5.18 includes support for multiple hash functions, and changed +the default (to ONE_AT_A_TIME_HARD), you can choose a different +algorithm by defining a symbol at compile time. For a current list, +consult the \fIINSTALL\fR document. Note that as of Perl v5.18 we can +only recommend use of the default or SIPHASH. All the others are +known to have security issues and are for research purposes only. +.PP +\fIPERL_HASH_SEED environment variable now takes a hex value\fR +.IX Subsection "PERL_HASH_SEED environment variable now takes a hex value" +.PP +\&\f(CW\*(C`PERL_HASH_SEED\*(C'\fR no longer accepts an integer as a parameter; +instead the value is expected to be a binary value encoded in a hex +string, such as "0xf5867c55039dc724". This is to make the +infrastructure support hash seeds of arbitrary lengths, which might +exceed that of an integer. (SipHash uses a 16 byte seed.) +.PP +\fIPERL_PERTURB_KEYS environment variable added\fR +.IX Subsection "PERL_PERTURB_KEYS environment variable added" +.PP +The \f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR environment variable allows one to control the level of +randomization applied to \f(CW\*(C`keys\*(C'\fR and friends. +.PP +When \f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR is 0, perl will not randomize the key order at all. The +chance that \f(CW\*(C`keys\*(C'\fR changes due to an insert will be the same as in previous +perls, basically only when the bucket size is changed. +.PP +When \f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR is 1, perl will randomize keys in a non-repeatable +way. The chance that \f(CW\*(C`keys\*(C'\fR changes due to an insert will be very high. This +is the most secure and default mode. +.PP +When \f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR is 2, perl will randomize keys in a repeatable way. +Repeated runs of the same program should produce the same output every time. +.PP +\&\f(CW\*(C`PERL_HASH_SEED\*(C'\fR implies a non-default \f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR setting. Setting +\&\f(CW\*(C`PERL_HASH_SEED=0\*(C'\fR (exactly one 0) implies \f(CW\*(C`PERL_PERTURB_KEYS=0\*(C'\fR (hash key +randomization disabled); setting \f(CW\*(C`PERL_HASH_SEED\*(C'\fR to any other value implies +\&\f(CW\*(C`PERL_PERTURB_KEYS=2\*(C'\fR (deterministic and repeatable hash key randomization). +Specifying \f(CW\*(C`PERL_PERTURB_KEYS\*(C'\fR explicitly to a different level overrides this +behavior. +.PP +\fR\f(BIHash::Util::hash_seed()\fR\fI now returns a string\fR +.IX Subsection "Hash::Util::hash_seed() now returns a string" +.PP +\&\fBHash::Util::hash_seed()\fR now returns a string instead of an integer. This +is to make the infrastructure support hash seeds of arbitrary lengths +which might exceed that of an integer. (SipHash uses a 16 byte seed.) +.PP +\fIOutput of PERL_HASH_SEED_DEBUG has been changed\fR +.IX Subsection "Output of PERL_HASH_SEED_DEBUG has been changed" +.PP +The environment variable PERL_HASH_SEED_DEBUG now makes perl show both the +hash function perl was built with, \fIand\fR the seed, in hex, in use for that +process. Code parsing this output, should it exist, must change to accommodate +the new format. Example of the new format: +.PP +.Vb 2 +\& $ PERL_HASH_SEED_DEBUG=1 ./perl \-e1 +\& HASH_FUNCTION = MURMUR3 HASH_SEED = 0x1476bb9f +.Ve +.SS "Upgrade to Unicode 6.2" +.IX Subsection "Upgrade to Unicode 6.2" +Perl now supports Unicode 6.2. A list of changes from Unicode +6.1 is at . +.SS "Character name aliases may now include non\-Latin1\-range characters" +.IX Subsection "Character name aliases may now include non-Latin1-range characters" +It is possible to define your own names for characters for use in +\&\f(CW\*(C`\eN{...}\*(C'\fR, \f(CWcharnames::vianame()\fR, etc. These names can now be +comprised of characters from the whole Unicode range. This allows for +names to be in your native language, and not just English. Certain +restrictions apply to the characters that may be used (you can't define +a name that has punctuation in it, for example). See "CUSTOM +ALIASES" in charnames. +.SS "New DTrace probes" +.IX Subsection "New DTrace probes" +The following new DTrace probes have been added: +.IP \(bu 4 +\&\f(CW\*(C`op\-entry\*(C'\fR +.IP \(bu 4 +\&\f(CW\*(C`loading\-file\*(C'\fR +.IP \(bu 4 +\&\f(CW\*(C`loaded\-file\*(C'\fR +.ie n .SS """${^LAST_FH}""" +.el .SS \f(CW${^LAST_FH}\fP +.IX Subsection "${^LAST_FH}" +This new variable provides access to the filehandle that was last read. +This is the handle used by \f(CW$.\fR and by \f(CW\*(C`tell\*(C'\fR and \f(CW\*(C`eof\*(C'\fR without +arguments. +.SS "Regular Expression Set Operations" +.IX Subsection "Regular Expression Set Operations" +This is an \fBexperimental\fR feature to allow matching against the union, +intersection, etc., of sets of code points, similar to +Unicode::Regex::Set. It can also be used to extend \f(CW\*(C`/x\*(C'\fR processing +to [bracketed] character classes, and as a replacement of user-defined +properties, allowing more complex expressions than they do. See +"Extended Bracketed Character Classes" in perlrecharclass. +.SS "Lexical subroutines" +.IX Subsection "Lexical subroutines" +This new feature is still considered \fBexperimental\fR. To enable it: +.PP +.Vb 3 +\& use 5.018; +\& no warnings "experimental::lexical_subs"; +\& use feature "lexical_subs"; +.Ve +.PP +You can now declare subroutines with \f(CW\*(C`state sub foo\*(C'\fR, \f(CW\*(C`my sub foo\*(C'\fR, and +\&\f(CW\*(C`our sub foo\*(C'\fR. (\f(CW\*(C`state sub\*(C'\fR requires that the "state" feature be +enabled, unless you write it as \f(CW\*(C`CORE::state sub foo\*(C'\fR.) +.PP +\&\f(CW\*(C`state sub\*(C'\fR creates a subroutine visible within the lexical scope in which +it is declared. The subroutine is shared between calls to the outer sub. +.PP +\&\f(CW\*(C`my sub\*(C'\fR declares a lexical subroutine that is created each time the +enclosing block is entered. \f(CW\*(C`state sub\*(C'\fR is generally slightly faster than +\&\f(CW\*(C`my sub\*(C'\fR. +.PP +\&\f(CW\*(C`our sub\*(C'\fR declares a lexical alias to the package subroutine of the same +name. +.PP +For more information, see "Lexical Subroutines" in perlsub. +.SS "Computed Labels" +.IX Subsection "Computed Labels" +The loop controls \f(CW\*(C`next\*(C'\fR, \f(CW\*(C`last\*(C'\fR and \f(CW\*(C`redo\*(C'\fR, and the special \f(CW\*(C`dump\*(C'\fR +operator, now allow arbitrary expressions to be used to compute labels at run +time. Previously, any argument that was not a constant was treated as the +empty string. +.SS "More CORE:: subs" +.IX Subsection "More CORE:: subs" +Several more built-in functions have been added as subroutines to the +CORE:: namespace \- namely, those non-overridable keywords that can be +implemented without custom parsers: \f(CW\*(C`defined\*(C'\fR, \f(CW\*(C`delete\*(C'\fR, \f(CW\*(C`exists\*(C'\fR, +\&\f(CW\*(C`glob\*(C'\fR, \f(CW\*(C`pos\*(C'\fR, \f(CW\*(C`prototype\*(C'\fR, \f(CW\*(C`scalar\*(C'\fR, \f(CW\*(C`split\*(C'\fR, \f(CW\*(C`study\*(C'\fR, and \f(CW\*(C`undef\*(C'\fR. +.PP +As some of these have prototypes, \f(CWprototype(\*(AqCORE::...\*(Aq)\fR has been +changed to not make a distinction between overridable and non-overridable +keywords. This is to make \f(CWprototype(\*(AqCORE::pos\*(Aq)\fR consistent with +\&\f(CWprototype(&CORE::pos)\fR. +.ie n .SS """kill"" with negative signal names" +.el .SS "\f(CWkill\fP with negative signal names" +.IX Subsection "kill with negative signal names" +\&\f(CW\*(C`kill\*(C'\fR has always allowed a negative signal number, which kills the +process group instead of a single process. It has also allowed signal +names. But it did not behave consistently, because negative signal names +were treated as 0. Now negative signals names like \f(CW\*(C`\-INT\*(C'\fR are supported +and treated the same way as \-2 [perl #112990]. +.SH Security +.IX Header "Security" +.SS "See also: hash overhaul" +.IX Subsection "See also: hash overhaul" +Some of the changes in the hash overhaul were made to +enhance security. Please read that section. +.ie n .SS """Storable"" security warning in documentation" +.el .SS "\f(CWStorable\fP security warning in documentation" +.IX Subsection "Storable security warning in documentation" +The documentation for \f(CW\*(C`Storable\*(C'\fR now includes a section which warns readers +of the danger of accepting Storable documents from untrusted sources. The +short version is that deserializing certain types of data can lead to loading +modules and other code execution. This is documented behavior and wanted +behavior, but this opens an attack vector for malicious entities. +.ie n .SS """Locale::Maketext"" allowed code injection via a malicious template" +.el .SS "\f(CWLocale::Maketext\fP allowed code injection via a malicious template" +.IX Subsection "Locale::Maketext allowed code injection via a malicious template" +If users could provide a translation string to Locale::Maketext, this could be +used to invoke arbitrary Perl subroutines available in the current process. +.PP +This has been fixed, but it is still possible to invoke any method provided by +\&\f(CW\*(C`Locale::Maketext\*(C'\fR itself or a subclass that you are using. One of these +methods in turn will invoke the Perl core's \f(CW\*(C`sprintf\*(C'\fR subroutine. +.PP +In summary, allowing users to provide translation strings without auditing +them is a bad idea. +.PP +This vulnerability is documented in CVE\-2012\-6329. +.SS "Avoid calling memset with a negative count" +.IX Subsection "Avoid calling memset with a negative count" +Poorly written perl code that allows an attacker to specify the count to perl's +\&\f(CW\*(C`x\*(C'\fR string repeat operator can already cause a memory exhaustion +denial-of-service attack. A flaw in versions of perl before v5.15.5 can escalate +that into a heap buffer overrun; coupled with versions of glibc before 2.16, it +possibly allows the execution of arbitrary code. +.PP +The flaw addressed to this commit has been assigned identifier CVE\-2012\-5195 +and was researched by Tim Brown. +.SH "Incompatible Changes" +.IX Header "Incompatible Changes" +.SS "See also: hash overhaul" +.IX Subsection "See also: hash overhaul" +Some of the changes in the hash overhaul are not fully +compatible with previous versions of perl. Please read that section. +.ie n .SS "An unknown character name in ""\eN{...}"" is now a syntax error" +.el .SS "An unknown character name in \f(CW\eN{...}\fP is now a syntax error" +.IX Subsection "An unknown character name in N{...} is now a syntax error" +Previously, it warned, and the Unicode REPLACEMENT CHARACTER was +substituted. Unicode now recommends that this situation be a syntax +error. Also, the previous behavior led to some confusing warnings and +behaviors, and since the REPLACEMENT CHARACTER has no use other than as +a stand-in for some unknown character, any code that has this problem is +buggy. +.ie n .SS "Formerly deprecated characters in ""\eN{}"" character name aliases are now errors." +.el .SS "Formerly deprecated characters in \f(CW\eN{}\fP character name aliases are now errors." +.IX Subsection "Formerly deprecated characters in N{} character name aliases are now errors." +Since v5.12.0, it has been deprecated to use certain characters in +user-defined \f(CW\*(C`\eN{...}\*(C'\fR character names. These now cause a syntax +error. For example, it is now an error to begin a name with a digit, +such as in +.PP +.Vb 1 +\& my $undraftable = "\eN{4F}"; # Syntax error! +.Ve +.PP +or to have commas anywhere in the name. See "CUSTOM ALIASES" in charnames. +.ie n .SS """\eN{BELL}"" now refers to U+1F514 instead of U+0007" +.el .SS "\f(CW\eN{BELL}\fP now refers to U+1F514 instead of U+0007" +.IX Subsection "N{BELL} now refers to U+1F514 instead of U+0007" +Unicode 6.0 reused the name "BELL" for a different code point than it +traditionally had meant. Since Perl v5.14, use of this name still +referred to U+0007, but would raise a deprecation warning. Now, "BELL" +refers to U+1F514, and the name for U+0007 is "ALERT". All the +functions in charnames have been correspondingly updated. +.SS "New Restrictions in Multi-Character Case-Insensitive Matching in Regular Expression Bracketed Character Classes" +.IX Subsection "New Restrictions in Multi-Character Case-Insensitive Matching in Regular Expression Bracketed Character Classes" +Unicode has now withdrawn their previous recommendation for regular +expressions to automatically handle cases where a single character can +match multiple characters case-insensitively, for example, the letter +LATIN SMALL LETTER SHARP S and the sequence \f(CW\*(C`ss\*(C'\fR. This is because +it turns out to be impracticable to do this correctly in all +circumstances. Because Perl has tried to do this as best it can, it +will continue to do so. (We are considering an option to turn it off.) +However, a new restriction is being added on such matches when they +occur in [bracketed] character classes. People were specifying +things such as \f(CW\*(C`/[\e0\-\exff]/i\*(C'\fR, and being surprised that it matches the +two character sequence \f(CW\*(C`ss\*(C'\fR (since LATIN SMALL LETTER SHARP S occurs in +this range). This behavior is also inconsistent with using a +property instead of a range: \f(CW\*(C`\ep{Block=Latin1}\*(C'\fR also includes LATIN +SMALL LETTER SHARP S, but \f(CW\*(C`/[\ep{Block=Latin1}]/i\*(C'\fR does not match \f(CW\*(C`ss\*(C'\fR. +The new rule is that for there to be a multi-character case-insensitive +match within a bracketed character class, the character must be +explicitly listed, and not as an end point of a range. This more +closely obeys the Principle of Least Astonishment. See +"Bracketed Character Classes" in perlrecharclass. Note that a bug [perl +#89774], now fixed as part of this change, prevented the previous +behavior from working fully. +.SS "Explicit rules for variable names and identifiers" +.IX Subsection "Explicit rules for variable names and identifiers" +Due to an oversight, single character variable names in v5.16 were +completely unrestricted. This opened the door to several kinds of +insanity. As of v5.18, these now follow the rules of other identifiers, +in addition to accepting characters that match the \f(CW\*(C`\ep{POSIX_Punct}\*(C'\fR +property. +.PP +There is no longer any difference in the parsing of identifiers +specified by using braces versus without braces. For instance, perl +used to allow \f(CW\*(C`${foo:bar}\*(C'\fR (with a single colon) but not \f(CW$foo:bar\fR. +Now that both are handled by a single code path, they are both treated +the same way: both are forbidden. Note that this change is about the +range of permissible literal identifiers, not other expressions. +.SS "Vertical tabs are now whitespace" +.IX Subsection "Vertical tabs are now whitespace" +No one could recall why \f(CW\*(C`\es\*(C'\fR didn't match \f(CW\*(C`\ecK\*(C'\fR, the vertical tab. +Now it does. Given the extreme rarity of that character, very little +breakage is expected. That said, here's what it means: +.PP +\&\f(CW\*(C`\es\*(C'\fR in a regex now matches a vertical tab in all circumstances. +.PP +Literal vertical tabs in a regex literal are ignored when the \f(CW\*(C`/x\*(C'\fR +modifier is used. +.PP +Leading vertical tabs, alone or mixed with other whitespace, are now +ignored when interpreting a string as a number. For example: +.PP +.Vb 2 +\& $dec = " \ecK \et 123"; +\& $hex = " \ecK \et 0xF"; +\& +\& say 0 + $dec; # was 0 with warning, now 123 +\& say int $dec; # was 0, now 123 +\& say oct $hex; # was 0, now 15 +.Ve +.ie n .SS """/(?{})/"" and ""/(??{})/"" have been heavily reworked" +.el .SS "\f(CW/(?{})/\fP and \f(CW/(??{})/\fP have been heavily reworked" +.IX Subsection "/(?{})/ and /(??{})/ have been heavily reworked" +The implementation of this feature has been almost completely rewritten. +Although its main intent is to fix bugs, some behaviors, especially +related to the scope of lexical variables, will have changed. This is +described more fully in the "Selected Bug Fixes" section. +.SS "Stricter parsing of substitution replacement" +.IX Subsection "Stricter parsing of substitution replacement" +It is no longer possible to abuse the way the parser parses \f(CW\*(C`s///e\*(C'\fR like +this: +.PP +.Vb 3 +\& %_=(_,"Just another "); +\& $_="Perl hacker,\en"; +\& s//_}\->{_/e;print +.Ve +.ie n .SS """given"" now aliases the global $_" +.el .SS "\f(CWgiven\fP now aliases the global \f(CW$_\fP" +.IX Subsection "given now aliases the global $_" +Instead of assigning to an implicit lexical \f(CW$_\fR, \f(CW\*(C`given\*(C'\fR now makes the +global \f(CW$_\fR an alias for its argument, just like \f(CW\*(C`foreach\*(C'\fR. However, it +still uses lexical \f(CW$_\fR if there is lexical \f(CW$_\fR in scope (again, just like +\&\f(CW\*(C`foreach\*(C'\fR) [perl #114020]. +.SS "The smartmatch family of features are now experimental" +.IX Subsection "The smartmatch family of features are now experimental" +Smart match, added in v5.10.0 and significantly revised in v5.10.1, has been +a regular point of complaint. Although there are a number of ways in which +it is useful, it has also proven problematic and confusing for both users and +implementors of Perl. There have been a number of proposals on how to best +address the problem. It is clear that smartmatch is almost certainly either +going to change or go away in the future. Relying on its current behavior +is not recommended. +.PP +Warnings will now be issued when the parser sees \f(CW\*(C`~~\*(C'\fR, \f(CW\*(C`given\*(C'\fR, or \f(CW\*(C`when\*(C'\fR. +To disable these warnings, you can add this line to the appropriate scope: +.PP +.Vb 1 +\& no if $] >= 5.018, warnings => "experimental::smartmatch"; +.Ve +.PP +Consider, though, replacing the use of these features, as they may change +behavior again before becoming stable. +.ie n .SS "Lexical $_ is now experimental" +.el .SS "Lexical \f(CW$_\fP is now experimental" +.IX Subsection "Lexical $_ is now experimental" +Since it was introduced in Perl v5.10, it has caused much confusion with no +obvious solution: +.IP \(bu 4 +Various modules (e.g., List::Util) expect callback routines to use the +global \f(CW$_\fR. \f(CW\*(C`use List::Util \*(Aqfirst\*(Aq; my $_; first { $_ == 1 } @list\*(C'\fR +does not work as one would expect. +.IP \(bu 4 +A \f(CW\*(C`my $_\*(C'\fR declaration earlier in the same file can cause confusing closure +warnings. +.IP \(bu 4 +The "_" subroutine prototype character allows called subroutines to access +your lexical \f(CW$_\fR, so it is not really private after all. +.IP \(bu 4 +Nevertheless, subroutines with a "(@)" prototype and methods cannot access +the caller's lexical \f(CW$_\fR, unless they are written in XS. +.IP \(bu 4 +But even XS routines cannot access a lexical \f(CW$_\fR declared, not in the +calling subroutine, but in an outer scope, iff that subroutine happened not +to mention \f(CW$_\fR or use any operators that default to \f(CW$_\fR. +.PP +It is our hope that lexical \f(CW$_\fR can be rehabilitated, but this may +cause changes in its behavior. Please use it with caution until it +becomes stable. +.ie n .SS "\fBreadline()\fP with ""$/ = \eN"" now reads N characters, not N bytes" +.el .SS "\fBreadline()\fP with \f(CW$/ = \eN\fP now reads N characters, not N bytes" +.IX Subsection "readline() with $/ = N now reads N characters, not N bytes" +Previously, when reading from a stream with I/O layers such as +\&\f(CW\*(C`encoding\*(C'\fR, the \fBreadline()\fR function, otherwise known as the \f(CW\*(C`<>\*(C'\fR +operator, would read \fIN\fR bytes from the top-most layer. [perl #79960] +.PP +Now, \fIN\fR characters are read instead. +.PP +There is no change in behaviour when reading from streams with no +extra layers, since bytes map exactly to characters. +.ie n .SS "Overridden ""glob"" is now passed one argument" +.el .SS "Overridden \f(CWglob\fP is now passed one argument" +.IX Subsection "Overridden glob is now passed one argument" +\&\f(CW\*(C`glob\*(C'\fR overrides used to be passed a magical undocumented second argument +that identified the caller. Nothing on CPAN was using this, and it got in +the way of a bug fix, so it was removed. If you really need to identify +the caller, see Devel::Callsite on CPAN. +.SS "Here doc parsing" +.IX Subsection "Here doc parsing" +The body of a here document inside a quote-like operator now always begins +on the line after the "< +.Sp +Perl has supported the idiom of swapping $< and $> (and likewise $( and +$)) to temporarily drop permissions since 5.0, like this: +.Sp +.Vb 1 +\& ($<, $>) = ($>, $<); +.Ve +.Sp +However, this idiom modifies the real user/group id, which can have +undesirable side-effects, is no longer useful on any platform perl +supports and complicates the implementation of these variables and list +assignment in general. +.Sp +As an alternative, assignment only to \f(CW$>\fR is recommended: +.Sp +.Vb 1 +\& local $> = $<; +.Ve +.Sp +See also: Setuid Demystified . +.IP \(bu 4 +\&\f(CW\*(C`microperl\*(C'\fR, long broken and of unclear present purpose, will be removed. +.IP \(bu 4 +Revamping \f(CW"\eQ"\fR semantics in double-quotish strings when combined with +other escapes. +.Sp +There are several bugs and inconsistencies involving combinations +of \f(CW\*(C`\eQ\*(C'\fR and escapes like \f(CW\*(C`\ex\*(C'\fR, \f(CW\*(C`\eL\*(C'\fR, etc., within a \f(CW\*(C`\eQ...\eE\*(C'\fR pair. +These need to be fixed, and doing so will necessarily change current +behavior. The changes have not yet been settled. +.IP \(bu 4 +Use of \f(CW$x\fR, where \f(CW\*(C`x\*(C'\fR stands for any actual (non-printing) C0 control +character will be disallowed in a future Perl version. Use \f(CW\*(C`${x}\*(C'\fR +instead (where again \f(CW\*(C`x\*(C'\fR stands for a control character), +or better, \f(CW$^A\fR , where \f(CW\*(C`^\*(C'\fR is a caret (CIRCUMFLEX ACCENT), +and \f(CW\*(C`A\*(C'\fR stands for any of the characters listed at the end of +"OPERATOR DIFFERENCES" in perlebcdic. +.SH "Performance Enhancements" +.IX Header "Performance Enhancements" +.IP \(bu 4 +Lists of lexical variable declarations (\f(CW\*(C`my($x, $y)\*(C'\fR) are now optimised +down to a single op and are hence faster than before. +.IP \(bu 4 +A new C preprocessor define \f(CW\*(C`NO_TAINT_SUPPORT\*(C'\fR was added that, if set, +disables Perl's taint support altogether. Using the \-T or \-t command +line flags will cause a fatal error. Beware that both core tests as +well as many a CPAN distribution's tests will fail with this change. On +the upside, it provides a small performance benefit due to reduced +branching. +.Sp +\&\fBDo not enable this unless you know exactly what you are getting yourself +into.\fR +.IP \(bu 4 +\&\f(CW\*(C`pack\*(C'\fR with constant arguments is now constant folded in most cases +[perl #113470]. +.IP \(bu 4 +Speed up in regular expression matching against Unicode properties. The +largest gain is for \f(CW\*(C`\eX\*(C'\fR, the Unicode "extended grapheme cluster." The +gain for it is about 35% \- 40%. Bracketed character classes, e.g., +\&\f(CW\*(C`[0\-9\ex{100}]\*(C'\fR containing code points above 255 are also now faster. +.IP \(bu 4 +On platforms supporting it, several former macros are now implemented as static +inline functions. This should speed things up slightly on non-GCC platforms. +.IP \(bu 4 +The optimisation of hashes in boolean context has been extended to +affect \f(CWscalar(%hash)\fR, \f(CW\*(C`%hash ? ... : ...\*(C'\fR, and \f(CW\*(C`sub { %hash || ... }\*(C'\fR. +.IP \(bu 4 +Filetest operators manage the stack in a fractionally more efficient manner. +.IP \(bu 4 +Globs used in a numeric context are now numified directly in most cases, +rather than being numified via stringification. +.IP \(bu 4 +The \f(CW\*(C`x\*(C'\fR repetition operator is now folded to a single constant at compile +time if called in scalar context with constant operands and no parentheses +around the left operand. +.SH "Modules and Pragmata" +.IX Header "Modules and Pragmata" +.SS "New Modules and Pragmata" +.IX Subsection "New Modules and Pragmata" +.IP \(bu 4 +Config::Perl::V version 0.16 has been added as a dual-lifed module. +It provides structured data retrieval of \f(CW\*(C`perl \-V\*(C'\fR output including +information only known to the \f(CW\*(C`perl\*(C'\fR binary and not available via Config. +.SS "Updated Modules and Pragmata" +.IX Subsection "Updated Modules and Pragmata" +For a complete list of updates, run: +.PP +.Vb 1 +\& $ corelist \-\-diff 5.16.0 5.18.0 +.Ve +.PP +You can substitute your favorite version in place of \f(CW5.16.0\fR, too. +.IP \(bu 4 +Archive::Extract has been upgraded to 0.68. +.Sp +Work around an edge case on Linux with Busybox's unzip. +.IP \(bu 4 +Archive::Tar has been upgraded to 1.90. +.Sp +ptar now supports the \-T option as well as dashless options +[rt.cpan.org #75473], [rt.cpan.org #75475]. +.Sp +Auto-encode filenames marked as UTF\-8 [rt.cpan.org #75474]. +.Sp +Don't use \f(CW\*(C`tell\*(C'\fR on IO::Zlib handles [rt.cpan.org #64339]. +.Sp +Don't try to \f(CW\*(C`chown\*(C'\fR on symlinks. +.IP \(bu 4 +autodie has been upgraded to 2.13. +.Sp +\&\f(CW\*(C`autodie\*(C'\fR now plays nicely with the 'open' pragma. +.IP \(bu 4 +B has been upgraded to 1.42. +.Sp +The \f(CW\*(C`stashoff\*(C'\fR method of COPs has been added. This provides access to an +internal field added in perl 5.16 under threaded builds [perl #113034]. +.Sp +\&\f(CW\*(C`B::COP::stashpv\*(C'\fR now supports UTF\-8 package names and embedded NULs. +.Sp +All \f(CW\*(C`CVf_*\*(C'\fR and \f(CW\*(C`GVf_*\*(C'\fR +and more SV-related flag values are now provided as constants in the \f(CW\*(C`B::\*(C'\fR +namespace and available for export. The default export list has not changed. +.Sp +This makes the module work with the new pad API. +.IP \(bu 4 +B::Concise has been upgraded to 0.95. +.Sp +The \f(CW\*(C`\-nobanner\*(C'\fR option has been fixed, and \f(CW\*(C`format\*(C'\fRs can now be dumped. +When passed a sub name to dump, it will check also to see whether it +is the name of a format. If a sub and a format share the same name, +it will dump both. +.Sp +This adds support for the new \f(CW\*(C`OpMAYBE_TRUEBOOL\*(C'\fR and \f(CW\*(C`OPpTRUEBOOL\*(C'\fR flags. +.IP \(bu 4 +B::Debug has been upgraded to 1.18. +.Sp +This adds support (experimentally) for \f(CW\*(C`B::PADLIST\*(C'\fR, which was +added in Perl 5.17.4. +.IP \(bu 4 +B::Deparse has been upgraded to 1.20. +.Sp +Avoid warning when run under \f(CW\*(C`perl \-w\*(C'\fR. +.Sp +It now deparses +loop controls with the correct precedence, and multiple statements in a +\&\f(CW\*(C`format\*(C'\fR line are also now deparsed correctly. +.Sp +This release suppresses trailing semicolons in formats. +.Sp +This release adds stub deparsing for lexical subroutines. +.Sp +It no longer dies when deparsing \f(CW\*(C`sort\*(C'\fR without arguments. It now +correctly omits the comma for \f(CW\*(C`system $prog @args\*(C'\fR and \f(CWexec $prog +@args\fR. +.IP \(bu 4 +bignum, bigint and bigrat have been upgraded to 0.33. +.Sp +The overrides for \f(CW\*(C`hex\*(C'\fR and \f(CW\*(C`oct\*(C'\fR have been rewritten, eliminating +several problems, and making one incompatible change: +.RS 4 +.IP \(bu 4 +Formerly, whichever of \f(CW\*(C`use bigint\*(C'\fR or \f(CW\*(C`use bigrat\*(C'\fR was compiled later +would take precedence over the other, causing \f(CW\*(C`hex\*(C'\fR and \f(CW\*(C`oct\*(C'\fR not to +respect the other pragma when in scope. +.IP \(bu 4 +Using any of these three pragmata would cause \f(CW\*(C`hex\*(C'\fR and \f(CW\*(C`oct\*(C'\fR anywhere +else in the program to evaluate their arguments in list context and prevent +them from inferring \f(CW$_\fR when called without arguments. +.IP \(bu 4 +Using any of these three pragmata would make \f(CWoct("1234")\fR return 1234 +(for any number not beginning with 0) anywhere in the program. Now "1234" +is translated from octal to decimal, whether within the pragma's scope or +not. +.IP \(bu 4 +The global overrides that facilitate lexical use of \f(CW\*(C`hex\*(C'\fR and \f(CW\*(C`oct\*(C'\fR now +respect any existing overrides that were in place before the new overrides +were installed, falling back to them outside of the scope of \f(CW\*(C`use bignum\*(C'\fR. +.IP \(bu 4 +\&\f(CW\*(C`use bignum "hex"\*(C'\fR, \f(CW\*(C`use bignum "oct"\*(C'\fR and similar invocations for bigint +and bigrat now export a \f(CW\*(C`hex\*(C'\fR or \f(CW\*(C`oct\*(C'\fR function, instead of providing a +global override. +.RE +.RS 4 +.RE +.IP \(bu 4 +Carp has been upgraded to 1.29. +.Sp +Carp is no longer confused when \f(CW\*(C`caller\*(C'\fR returns undef for a package that +has been deleted. +.Sp +The \f(CWlongmess()\fR and \f(CWshortmess()\fR functions are now documented. +.IP \(bu 4 +CGI has been upgraded to 3.63. +.Sp +Unrecognized HTML escape sequences are now handled better, problematic +trailing newlines are no longer inserted after
tags +by \f(CWstartform()\fR or \f(CWstart_form()\fR, and bogus "Insecure Dependency" +warnings appearing with some versions of perl are now worked around. +.IP \(bu 4 +Class::Struct has been upgraded to 0.64. +.Sp +The constructor now respects overridden accessor methods [perl #29230]. +.IP \(bu 4 +Compress::Raw::Bzip2 has been upgraded to 2.060. +.Sp +The misuse of Perl's "magic" API has been fixed. +.IP \(bu 4 +Compress::Raw::Zlib has been upgraded to 2.060. +.Sp +Upgrade bundled zlib to version 1.2.7. +.Sp +Fix build failures on Irix, Solaris, and Win32, and also when building as C++ +[rt.cpan.org #69985], [rt.cpan.org #77030], [rt.cpan.org #75222]. +.Sp +The misuse of Perl's "magic" API has been fixed. +.Sp +\&\f(CWcompress()\fR, \f(CWuncompress()\fR, \f(CWmemGzip()\fR and \f(CWmemGunzip()\fR have +been speeded up by making parameter validation more efficient. +.IP \(bu 4 +CPAN::Meta::Requirements has been upgraded to 2.122. +.Sp +Treat undef requirements to \f(CW\*(C`from_string_hash\*(C'\fR as 0 (with a warning). +.Sp +Added \f(CW\*(C`requirements_for_module\*(C'\fR method. +.IP \(bu 4 +CPANPLUS has been upgraded to 0.9135. +.Sp +Allow adding \fIblib/script\fR to PATH. +.Sp +Save the history between invocations of the shell. +.Sp +Handle multiple \f(CW\*(C`makemakerargs\*(C'\fR and \f(CW\*(C`makeflags\*(C'\fR arguments better. +.Sp +This resolves issues with the SQLite source engine. +.IP \(bu 4 +Data::Dumper has been upgraded to 2.145. +.Sp +It has been optimized to only build a seen-scalar hash as necessary, +thereby speeding up serialization drastically. +.Sp +Additional tests were added in order to improve statement, branch, condition +and subroutine coverage. On the basis of the coverage analysis, some of the +internals of Dumper.pm were refactored. Almost all methods are now +documented. +.IP \(bu 4 +DB_File has been upgraded to 1.827. +.Sp +The main Perl module no longer uses the \f(CW"@_"\fR construct. +.IP \(bu 4 +Devel::Peek has been upgraded to 1.11. +.Sp +This fixes compilation with C++ compilers and makes the module work with +the new pad API. +.IP \(bu 4 +Digest::MD5 has been upgraded to 2.52. +.Sp +Fix \f(CW\*(C`Digest::Perl::MD5\*(C'\fR OO fallback [rt.cpan.org #66634]. +.IP \(bu 4 +Digest::SHA has been upgraded to 5.84. +.Sp +This fixes a double-free bug, which might have caused vulnerabilities +in some cases. +.IP \(bu 4 +DynaLoader has been upgraded to 1.18. +.Sp +This is due to a minor code change in the XS for the VMS implementation. +.Sp +This fixes warnings about using \f(CW\*(C`CODE\*(C'\fR sections without an \f(CW\*(C`OUTPUT\*(C'\fR +section. +.IP \(bu 4 +Encode has been upgraded to 2.49. +.Sp +The Mac alias x\-mac-ce has been added, and various bugs have been fixed +in Encode::Unicode, Encode::UTF7 and Encode::GSM0338. +.IP \(bu 4 +Env has been upgraded to 1.04. +.Sp +Its SPLICE implementation no longer misbehaves in list context. +.IP \(bu 4 +ExtUtils::CBuilder has been upgraded to 0.280210. +.Sp +Manifest files are now correctly embedded for those versions of VC++ which +make use of them. [perl #111782, #111798]. +.Sp +A list of symbols to export can now be passed to \f(CWlink()\fR when on +Windows, as on other OSes [perl #115100]. +.IP \(bu 4 +ExtUtils::ParseXS has been upgraded to 3.18. +.Sp +The generated C code now avoids unnecessarily incrementing +\&\f(CW\*(C`PL_amagic_generation\*(C'\fR on Perl versions where it's done automatically +(or on current Perl where the variable no longer exists). +.Sp +This avoids a bogus warning for initialised XSUB non-parameters [perl +#112776]. +.IP \(bu 4 +File::Copy has been upgraded to 2.26. +.Sp +\&\f(CWcopy()\fR no longer zeros files when copying into the same directory, +and also now fails (as it has long been documented to do) when attempting +to copy a file over itself. +.IP \(bu 4 +File::DosGlob has been upgraded to 1.10. +.Sp +The internal cache of file names that it keeps for each caller is now +freed when that caller is freed. This means +\&\f(CW\*(C`use File::DosGlob \*(Aqglob\*(Aq; eval \*(Aqscalar <*>\*(Aq\*(C'\fR no longer leaks memory. +.IP \(bu 4 +File::Fetch has been upgraded to 0.38. +.Sp +Added the 'file_default' option for URLs that do not have a file +component. +.Sp +Use \f(CW\*(C`File::HomeDir\*(C'\fR when available, and provide \f(CW\*(C`PERL5_CPANPLUS_HOME\*(C'\fR to +override the autodetection. +.Sp +Always re-fetch \fICHECKSUMS\fR if \f(CW\*(C`fetchdir\*(C'\fR is set. +.IP \(bu 4 +File::Find has been upgraded to 1.23. +.Sp +This fixes inconsistent unixy path handling on VMS. +.Sp +Individual files may now appear in list of directories to be searched +[perl #59750]. +.IP \(bu 4 +File::Glob has been upgraded to 1.20. +.Sp +File::Glob has had exactly the same fix as File::DosGlob. Since it is +what Perl's own \f(CW\*(C`glob\*(C'\fR operator itself uses (except on VMS), this means +\&\f(CW\*(C`eval \*(Aqscalar <*>\*(Aq\*(C'\fR no longer leaks. +.Sp +A space-separated list of patterns return long lists of results no longer +results in memory corruption or crashes. This bug was introduced in +Perl 5.16.0. [perl #114984] +.IP \(bu 4 +File::Spec::Unix has been upgraded to 3.40. +.Sp +\&\f(CW\*(C`abs2rel\*(C'\fR could produce incorrect results when given two relative paths or +the root directory twice [perl #111510]. +.IP \(bu 4 +File::stat has been upgraded to 1.07. +.Sp +\&\f(CW\*(C`File::stat\*(C'\fR ignores the filetest pragma, and warns when used in +combination therewith. But it was not warning for \f(CW\*(C`\-r\*(C'\fR. This has been +fixed [perl #111640]. +.Sp +\&\f(CW\*(C`\-p\*(C'\fR now works, and does not return false for pipes [perl #111638]. +.Sp +Previously \f(CW\*(C`File::stat\*(C'\fR's overloaded \f(CW\*(C`\-x\*(C'\fR and \f(CW\*(C`\-X\*(C'\fR operators did not give +the correct results for directories or executable files when running as +root. They had been treating executable permissions for root just like for +any other user, performing group membership tests \fIetc\fR for files not owned +by root. They now follow the correct Unix behaviour \- for a directory they +are always true, and for a file if any of the three execute permission bits +are set then they report that root can execute the file. Perl's builtin +\&\f(CW\*(C`\-x\*(C'\fR and \f(CW\*(C`\-X\*(C'\fR operators have always been correct. +.IP \(bu 4 +File::Temp has been upgraded to 0.23 +.Sp +Fixes various bugs involving directory removal. Defers unlinking tempfiles if +the initial unlink fails, which fixes problems on NFS. +.IP \(bu 4 +GDBM_File has been upgraded to 1.15. +.Sp +The undocumented optional fifth parameter to \f(CW\*(C`TIEHASH\*(C'\fR has been +removed. This was intended to provide control of the callback used by +\&\f(CW\*(C`gdbm*\*(C'\fR functions in case of fatal errors (such as filesystem problems), +but did not work (and could never have worked). No code on CPAN even +attempted to use it. The callback is now always the previous default, +\&\f(CW\*(C`croak\*(C'\fR. Problems on some platforms with how the \f(CW\*(C`C\*(C'\fR \f(CW\*(C`croak\*(C'\fR function +is called have also been resolved. +.IP \(bu 4 +Hash::Util has been upgraded to 0.15. +.Sp +\&\f(CW\*(C`hash_unlocked\*(C'\fR and \f(CW\*(C`hashref_unlocked\*(C'\fR now returns true if the hash is +unlocked, instead of always returning false [perl #112126]. +.Sp +\&\f(CW\*(C`hash_unlocked\*(C'\fR, \f(CW\*(C`hashref_unlocked\*(C'\fR, \f(CW\*(C`lock_hash_recurse\*(C'\fR and +\&\f(CW\*(C`unlock_hash_recurse\*(C'\fR are now exportable [perl #112126]. +.Sp +Two new functions, \f(CW\*(C`hash_locked\*(C'\fR and \f(CW\*(C`hashref_locked\*(C'\fR, have been added. +Oddly enough, these two functions were already exported, even though they +did not exist [perl #112126]. +.IP \(bu 4 +HTTP::Tiny has been upgraded to 0.025. +.Sp +Add SSL verification features [github #6], [github #9]. +.Sp +Include the final URL in the response hashref. +.Sp +Add \f(CW\*(C`local_address\*(C'\fR option. +.Sp +This improves SSL support. +.IP \(bu 4 +IO has been upgraded to 1.28. +.Sp +\&\f(CWsync()\fR can now be called on read-only file handles [perl #64772]. +.Sp +IO::Socket tries harder to cache or otherwise fetch socket +information. +.IP \(bu 4 +IPC::Cmd has been upgraded to 0.80. +.Sp +Use \f(CW\*(C`POSIX::_exit\*(C'\fR instead of \f(CW\*(C`exit\*(C'\fR in \f(CW\*(C`run_forked\*(C'\fR [rt.cpan.org #76901]. +.IP \(bu 4 +IPC::Open3 has been upgraded to 1.13. +.Sp +The \f(CWopen3()\fR function no longer uses \f(CWPOSIX::close()\fR to close file +descriptors since that breaks the ref-counting of file descriptors done by +PerlIO in cases where the file descriptors are shared by PerlIO streams, +leading to attempts to close the file descriptors a second time when +any such PerlIO streams are closed later on. +.IP \(bu 4 +Locale::Codes has been upgraded to 3.25. +.Sp +It includes some new codes. +.IP \(bu 4 +Memoize has been upgraded to 1.03. +.Sp +Fix the \f(CW\*(C`MERGE\*(C'\fR cache option. +.IP \(bu 4 +Module::Build has been upgraded to 0.4003. +.Sp +Fixed bug where modules without \f(CW$VERSION\fR might have a version of '0' listed +in 'provides' metadata, which will be rejected by PAUSE. +.Sp +Fixed bug in PodParser to allow numerals in module names. +.Sp +Fixed bug where giving arguments twice led to them becoming arrays, resulting +in install paths like \fR\f(BIARRAY\fR\fI\|(0xdeadbeef)/lib/Foo.pm\fR. +.Sp +A minor bug fix allows markup to be used around the leading "Name" in +a POD "abstract" line, and some documentation improvements have been made. +.IP \(bu 4 +Module::CoreList has been upgraded to 2.90 +.Sp +Version information is now stored as a delta, which greatly reduces the +size of the \fICoreList.pm\fR file. +.Sp +This restores compatibility with older versions of perl and cleans up +the corelist data for various modules. +.IP \(bu 4 +Module::Load::Conditional has been upgraded to 0.54. +.Sp +Fix use of \f(CW\*(C`requires\*(C'\fR on perls installed to a path with spaces. +.Sp +Various enhancements include the new use of Module::Metadata. +.IP \(bu 4 +Module::Metadata has been upgraded to 1.000011. +.Sp +The creation of a Module::Metadata object for a typical module file has +been sped up by about 40%, and some spurious warnings about \f(CW$VERSION\fRs +have been suppressed. +.IP \(bu 4 +Module::Pluggable has been upgraded to 4.7. +.Sp +Amongst other changes, triggers are now allowed on events, which gives +a powerful way to modify behaviour. +.IP \(bu 4 +Net::Ping has been upgraded to 2.41. +.Sp +This fixes some test failures on Windows. +.IP \(bu 4 +Opcode has been upgraded to 1.25. +.Sp +Reflect the removal of the boolkeys opcode and the addition of the +clonecv, introcv and padcv opcodes. +.IP \(bu 4 +overload has been upgraded to 1.22. +.Sp +\&\f(CW\*(C`no overload\*(C'\fR now warns for invalid arguments, just like \f(CW\*(C`use overload\*(C'\fR. +.IP \(bu 4 +PerlIO::encoding has been upgraded to 0.16. +.Sp +This is the module implementing the ":encoding(...)" I/O layer. It no +longer corrupts memory or crashes when the encoding back-end reallocates +the buffer or gives it a typeglob or shared hash key scalar. +.IP \(bu 4 +PerlIO::scalar has been upgraded to 0.16. +.Sp +The buffer scalar supplied may now only contain code points 0xFF or +lower. [perl #109828] +.IP \(bu 4 +Perl::OSType has been upgraded to 1.003. +.Sp +This fixes a bug detecting the VOS operating system. +.IP \(bu 4 +Pod::Html has been upgraded to 1.18. +.Sp +The option \f(CW\*(C`\-\-libpods\*(C'\fR has been reinstated. It is deprecated, and its use +does nothing other than issue a warning that it is no longer supported. +.Sp +Since the HTML files generated by pod2html claim to have a UTF\-8 charset, +actually write the files out using UTF\-8 [perl #111446]. +.IP \(bu 4 +Pod::Simple has been upgraded to 3.28. +.Sp +Numerous improvements have been made, mostly to Pod::Simple::XHTML, +which also has a compatibility change: the \f(CW\*(C`codes_in_verbatim\*(C'\fR option +is now disabled by default. See \fIcpan/Pod\-Simple/ChangeLog\fR for the +full details. +.IP \(bu 4 +re has been upgraded to 0.23 +.Sp +Single character [class]es like \f(CW\*(C`/[s]/\*(C'\fR or \f(CW\*(C`/[s]/i\*(C'\fR are now optimized +as if they did not have the brackets, i.e. \f(CW\*(C`/s/\*(C'\fR or \f(CW\*(C`/s/i\*(C'\fR. +.Sp +See note about \f(CW\*(C`op_comp\*(C'\fR in the "Internal Changes" section below. +.IP \(bu 4 +Safe has been upgraded to 2.35. +.Sp +Fix interactions with \f(CW\*(C`Devel::Cover\*(C'\fR. +.Sp +Don't eval code under \f(CW\*(C`no strict\*(C'\fR. +.IP \(bu 4 +Scalar::Util has been upgraded to version 1.27. +.Sp +Fix an overloading issue with \f(CW\*(C`sum\*(C'\fR. +.Sp +\&\f(CW\*(C`first\*(C'\fR and \f(CW\*(C`reduce\*(C'\fR now check the callback first (so \f(CW&first(1)\fR is +disallowed). +.Sp +Fix \f(CW\*(C`tainted\*(C'\fR on magical values [rt.cpan.org #55763]. +.Sp +Fix \f(CW\*(C`sum\*(C'\fR on previously magical values [rt.cpan.org #61118]. +.Sp +Fix reading past the end of a fixed buffer [rt.cpan.org #72700]. +.IP \(bu 4 +Search::Dict has been upgraded to 1.07. +.Sp +No longer require \f(CW\*(C`stat\*(C'\fR on filehandles. +.Sp +Use \f(CW\*(C`fc\*(C'\fR for casefolding. +.IP \(bu 4 +Socket has been upgraded to 2.009. +.Sp +Constants and functions required for IP multicast source group membership +have been added. +.Sp +\&\f(CWunpack_sockaddr_in()\fR and \f(CWunpack_sockaddr_in6()\fR now return just the IP +address in scalar context, and \f(CWinet_ntop()\fR now guards against incorrect +length scalars being passed in. +.Sp +This fixes an uninitialized memory read. +.IP \(bu 4 +Storable has been upgraded to 2.41. +.Sp +Modifying \f(CW$_[0]\fR within \f(CW\*(C`STORABLE_freeze\*(C'\fR no longer results in crashes +[perl #112358]. +.Sp +An object whose class implements \f(CW\*(C`STORABLE_attach\*(C'\fR is now thawed only once +when there are multiple references to it in the structure being thawed +[perl #111918]. +.Sp +Restricted hashes were not always thawed correctly [perl #73972]. +.Sp +Storable would croak when freezing a blessed REF object with a +\&\f(CWSTORABLE_freeze()\fR method [perl #113880]. +.Sp +It can now freeze and thaw vstrings correctly. This causes a slight +incompatible change in the storage format, so the format version has +increased to 2.9. +.Sp +This contains various bugfixes, including compatibility fixes for older +versions of Perl and vstring handling. +.IP \(bu 4 +Sys::Syslog has been upgraded to 0.32. +.Sp +This contains several bug fixes relating to \f(CWgetservbyname()\fR, +\&\f(CWsetlogsock()\fRand log levels in \f(CWsyslog()\fR, together with fixes for +Windows, Haiku-OS and GNU/kFreeBSD. See \fIcpan/Sys\-Syslog/Changes\fR +for the full details. +.IP \(bu 4 +Term::ANSIColor has been upgraded to 4.02. +.Sp +Add support for italics. +.Sp +Improve error handling. +.IP \(bu 4 +Term::ReadLine has been upgraded to 1.10. This fixes the +use of the \fBcpan\fR and \fBcpanp\fR shells on Windows in the event that the current +drive happens to contain a \fI\edev\etty\fR file. +.IP \(bu 4 +Test::Harness has been upgraded to 3.26. +.Sp +Fix glob semantics on Win32 [rt.cpan.org #49732]. +.Sp +Don't use \f(CW\*(C`Win32::GetShortPathName\*(C'\fR when calling perl [rt.cpan.org #47890]. +.Sp +Ignore \-T when reading shebang [rt.cpan.org #64404]. +.Sp +Handle the case where we don't know the wait status of the test more +gracefully. +.Sp +Make the test summary 'ok' line overridable so that it can be changed to a +plugin to make the output of prove idempotent. +.Sp +Don't run world-writable files. +.IP \(bu 4 +Text::Tabs and Text::Wrap have been upgraded to +2012.0818. Support for Unicode combining characters has been added to them +both. +.IP \(bu 4 +threads::shared has been upgraded to 1.31. +.Sp +This adds the option to warn about or ignore attempts to clone structures +that can't be cloned, as opposed to just unconditionally dying in +that case. +.Sp +This adds support for dual-valued values as created by +Scalar::Util::dualvar. +.IP \(bu 4 +Tie::StdHandle has been upgraded to 4.3. +.Sp +\&\f(CW\*(C`READ\*(C'\fR now respects the offset argument to \f(CW\*(C`read\*(C'\fR [perl #112826]. +.IP \(bu 4 +Time::Local has been upgraded to 1.2300. +.Sp +Seconds values greater than 59 but less than 60 no longer cause +\&\f(CWtimegm()\fR and \f(CWtimelocal()\fR to croak. +.IP \(bu 4 +Unicode::UCD has been upgraded to 0.53. +.Sp +This adds a function \fBall_casefolds()\fR +that returns all the casefolds. +.IP \(bu 4 +Win32 has been upgraded to 0.47. +.Sp +New APIs have been added for getting and setting the current code page. +.SS "Removed Modules and Pragmata" +.IX Subsection "Removed Modules and Pragmata" +.IP \(bu 4 +Version::Requirements has been removed from the core distribution. It is +available under a different name: CPAN::Meta::Requirements. +.SH Documentation +.IX Header "Documentation" +.SS "Changes to Existing Documentation" +.IX Subsection "Changes to Existing Documentation" +\fIperlcheat\fR +.IX Subsection "perlcheat" +.IP \(bu 4 +perlcheat has been reorganized, and a few new sections were added. +.PP +\fIperldata\fR +.IX Subsection "perldata" +.IP \(bu 4 +Now explicitly documents the behaviour of hash initializer lists that +contain duplicate keys. +.PP +\fIperldiag\fR +.IX Subsection "perldiag" +.IP \(bu 4 +The explanation of symbolic references being prevented by "strict refs" +now doesn't assume that the reader knows what symbolic references are. +.PP +\fIperlfaq\fR +.IX Subsection "perlfaq" +.IP \(bu 4 +perlfaq has been synchronized with version 5.0150040 from CPAN. +.PP +\fIperlfunc\fR +.IX Subsection "perlfunc" +.IP \(bu 4 +The return value of \f(CW\*(C`pipe\*(C'\fR is now documented. +.IP \(bu 4 +Clarified documentation of \f(CW\*(C`our\*(C'\fR. +.PP +\fIperlop\fR +.IX Subsection "perlop" +.IP \(bu 4 +Loop control verbs (\f(CW\*(C`dump\*(C'\fR, \f(CW\*(C`goto\*(C'\fR, \f(CW\*(C`next\*(C'\fR, \f(CW\*(C`last\*(C'\fR and \f(CW\*(C`redo\*(C'\fR) have always +had the same precedence as assignment operators, but this was not documented +until now. +.PP +\fIDiagnostics\fR +.IX Subsection "Diagnostics" +.PP +The following additions or changes have been made to diagnostic output, +including warnings and fatal error messages. For the complete list of +diagnostic messages, see perldiag. +.SS "New Diagnostics" +.IX Subsection "New Diagnostics" +\fINew Errors\fR +.IX Subsection "New Errors" +.IP \(bu 4 +Unterminated delimiter for here document +.Sp +This message now occurs when a here document label has an initial quotation +mark but the final quotation mark is missing. +.Sp +This replaces a bogus and misleading error message about not finding the label +itself [perl #114104]. +.IP \(bu 4 +panic: child pseudo-process was never scheduled +.Sp +This error is thrown when a child pseudo-process in the ithreads implementation +on Windows was not scheduled within the time period allowed and therefore was +not able to initialize properly [perl #88840]. +.IP \(bu 4 +Group name must start with a non-digit word character in regex; marked by <\-\- HERE in m/%s/ +.Sp +This error has been added for \f(CW\*(C`(?&0)\*(C'\fR, which is invalid. It used to +produce an incomprehensible error message [perl #101666]. +.IP \(bu 4 +Can't use an undefined value as a subroutine reference +.Sp +Calling an undefined value as a subroutine now produces this error message. +It used to, but was accidentally disabled, first in Perl 5.004 for +non-magical variables, and then in Perl v5.14 for magical (e.g., tied) +variables. It has now been restored. In the mean time, undef was treated +as an empty string [perl #113576]. +.IP \(bu 4 +Experimental "%s" subs not enabled +.Sp +To use lexical subs, you must first enable them: +.Sp +.Vb 3 +\& no warnings \*(Aqexperimental::lexical_subs\*(Aq; +\& use feature \*(Aqlexical_subs\*(Aq; +\& my sub foo { ... } +.Ve +.PP +\fINew Warnings\fR +.IX Subsection "New Warnings" +.IP \(bu 4 +\&'Strings with code points over 0xFF may not be mapped into in-memory file handles' +.IP \(bu 4 +\&'%s' resolved to '\eo{%s}%d' +.IP \(bu 4 +\&'Trailing white-space in a charnames alias definition is deprecated' +.IP \(bu 4 +\&'A sequence of multiple spaces in a charnames alias definition is deprecated' +.IP \(bu 4 +\&'Passing malformed UTF\-8 to "%s" is deprecated' +.IP \(bu 4 +Subroutine "&%s" is not available +.Sp +(W closure) During compilation, an inner named subroutine or eval is +attempting to capture an outer lexical subroutine that is not currently +available. This can happen for one of two reasons. First, the lexical +subroutine may be declared in an outer anonymous subroutine that has not +yet been created. (Remember that named subs are created at compile time, +while anonymous subs are created at run-time.) For example, +.Sp +.Vb 1 +\& sub { my sub a {...} sub f { \e&a } } +.Ve +.Sp +At the time that f is created, it can't capture the current the "a" sub, +since the anonymous subroutine hasn't been created yet. Conversely, the +following won't give a warning since the anonymous subroutine has by now +been created and is live: +.Sp +.Vb 1 +\& sub { my sub a {...} eval \*(Aqsub f { \e&a }\*(Aq }\->(); +.Ve +.Sp +The second situation is caused by an eval accessing a variable that has +gone out of scope, for example, +.Sp +.Vb 5 +\& sub f { +\& my sub a {...} +\& sub { eval \*(Aq\e&a\*(Aq } +\& } +\& f()\->(); +.Ve +.Sp +Here, when the '\e&a' in the eval is being compiled, f() is not currently +being executed, so its &a is not available for capture. +.IP \(bu 4 +"%s" subroutine &%s masks earlier declaration in same \f(CW%s\fR +.Sp +(W misc) A "my" or "state" subroutine has been redeclared in the +current scope or statement, effectively eliminating all access to +the previous instance. This is almost always a typographical error. +Note that the earlier subroutine will still exist until the end of +the scope or until all closure references to it are destroyed. +.IP \(bu 4 +The \f(CW%s\fR feature is experimental +.Sp +(S experimental) This warning is emitted if you enable an experimental +feature via \f(CW\*(C`use feature\*(C'\fR. Simply suppress the warning if you want +to use the feature, but know that in doing so you are taking the risk +of using an experimental feature which may change or be removed in a +future Perl version: +.Sp +.Vb 2 +\& no warnings "experimental::lexical_subs"; +\& use feature "lexical_subs"; +.Ve +.IP \(bu 4 +sleep(%u) too large +.Sp +(W overflow) You called \f(CW\*(C`sleep\*(C'\fR with a number that was larger than it can +reliably handle and \f(CW\*(C`sleep\*(C'\fR probably slept for less time than requested. +.IP \(bu 4 +Wide character in setenv +.Sp +Attempts to put wide characters into environment variables via \f(CW%ENV\fR now +provoke this warning. +.IP \(bu 4 +"Invalid negative number (%s) in chr" +.Sp +\&\f(CWchr()\fR now warns when passed a negative value [perl #83048]. +.IP \(bu 4 +"Integer overflow in srand" +.Sp +\&\f(CWsrand()\fR now warns when passed a value that doesn't fit in a \f(CW\*(C`UV\*(C'\fR (since the +value will be truncated rather than overflowing) [perl #40605]. +.IP \(bu 4 +"\-i used with no filenames on the command line, reading from STDIN" +.Sp +Running perl with the \f(CW\*(C`\-i\*(C'\fR flag now warns if no input files are provided on +the command line [perl #113410]. +.SS "Changes to Existing Diagnostics" +.IX Subsection "Changes to Existing Diagnostics" +.IP \(bu 4 +$* is no longer supported +.Sp +The warning that use of \f(CW$*\fR and \f(CW$#\fR is no longer supported is now +generated for every location that references them. Previously it would fail +to be generated if another variable using the same typeglob was seen first +(e.g. \f(CW\*(C`@*\*(C'\fR before \f(CW$*\fR), and would not be generated for the second and +subsequent uses. (It's hard to fix the failure to generate warnings at all +without also generating them every time, and warning every time is +consistent with the warnings that \f(CW$[\fR used to generate.) +.IP \(bu 4 +The warnings for \f(CW\*(C`\eb{\*(C'\fR and \f(CW\*(C`\eB{\*(C'\fR were added. They are a deprecation +warning which should be turned off by that category. One should not +have to turn off regular regexp warnings as well to get rid of these. +.IP \(bu 4 +Constant(%s): Call to &{$^H{%s}} did not return a defined value +.Sp +Constant overloading that returns \f(CW\*(C`undef\*(C'\fR results in this error message. +For numeric constants, it used to say "Constant(undef)". "undef" has been +replaced with the number itself. +.IP \(bu 4 +The error produced when a module cannot be loaded now includes a hint that +the module may need to be installed: "Can't locate hopping.pm in \f(CW@INC\fR (you +may need to install the hopping module) (@INC contains: ...)" +.IP \(bu 4 +vector argument not supported with alpha versions +.Sp +This warning was not suppressible, even with \f(CW\*(C`no warnings\*(C'\fR. Now it is +suppressible, and has been moved from the "internal" category to the +"printf" category. +.IP \(bu 4 +\&\f(CW\*(C`Can\*(Aqt do {n,m} with n > m in regex; marked by <\-\- HERE in m/%s/\*(C'\fR +.Sp +This fatal error has been turned into a warning that reads: +.Sp +Quantifier {n,m} with n > m can't match in regex +.Sp +(W regexp) Minima should be less than or equal to maxima. If you really want +your regexp to match something 0 times, just put {0}. +.IP \(bu 4 +The "Runaway prototype" warning that occurs in bizarre cases has been +removed as being unhelpful and inconsistent. +.IP \(bu 4 +The "Not a format reference" error has been removed, as the only case in +which it could be triggered was a bug. +.IP \(bu 4 +The "Unable to create sub named \f(CW%s\fR" error has been removed for the same +reason. +.IP \(bu 4 +The 'Can't use "my \f(CW%s\fR" in sort comparison' error has been downgraded to a +warning, '"my \f(CW%s\fR" used in sort comparison' (with 'state' instead of 'my' +for state variables). In addition, the heuristics for guessing whether +lexical \f(CW$a\fR or \f(CW$b\fR has been misused have been improved to generate fewer +false positives. Lexical \f(CW$a\fR and \f(CW$b\fR are no longer disallowed if they are +outside the sort block. Also, a named unary or list operator inside the +sort block no longer causes the \f(CW$a\fR or \f(CW$b\fR to be ignored [perl #86136]. +.SH "Utility Changes" +.IX Header "Utility Changes" +\fIh2xs\fR +.IX Subsection "h2xs" +.IP \(bu 4 +\&\fIh2xs\fR no longer produces invalid code for empty defines. [perl #20636] +.SH "Configuration and Compilation" +.IX Header "Configuration and Compilation" +.IP \(bu 4 +Added \f(CW\*(C`useversionedarchname\*(C'\fR option to Configure +.Sp +When set, it includes 'api_versionstring' in 'archname'. E.g. +x86_64\-linux\-5.13.6\-thread\-multi. It is unset by default. +.Sp +This feature was requested by Tim Bunce, who observed that +\&\f(CW\*(C`INSTALL_BASE\*(C'\fR creates a library structure that does not +differentiate by perl version. Instead, it places architecture +specific files in "$install_base/lib/perl5/$archname". This makes +it difficult to use a common \f(CW\*(C`INSTALL_BASE\*(C'\fR library path with +multiple versions of perl. +.Sp +By setting \f(CW\*(C`\-Duseversionedarchname\*(C'\fR, the \f(CW$archname\fR will be +distinct for architecture \fIand\fR API version, allowing mixed use of +\&\f(CW\*(C`INSTALL_BASE\*(C'\fR. +.IP \(bu 4 +Add a \f(CW\*(C`PERL_NO_INLINE_FUNCTIONS\*(C'\fR option +.Sp +If \f(CW\*(C`PERL_NO_INLINE_FUNCTIONS\*(C'\fR is defined, don't include "inline.h" +.Sp +This permits test code to include the perl headers for definitions without +creating a link dependency on the perl library (which may not exist yet). +.IP \(bu 4 +Configure will honour the external \f(CW\*(C`MAILDOMAIN\*(C'\fR environment variable, if set. +.IP \(bu 4 +\&\f(CW\*(C`installman\*(C'\fR no longer ignores the silent option +.IP \(bu 4 +Both \f(CW\*(C`META.yml\*(C'\fR and \f(CW\*(C`META.json\*(C'\fR files are now included in the distribution. +.IP \(bu 4 +\&\fIConfigure\fR will now correctly detect \f(CWisblank()\fR when compiling with a C++ +compiler. +.IP \(bu 4 +The pager detection in \fIConfigure\fR has been improved to allow responses which +specify options after the program name, e.g. \fB/usr/bin/less \-R\fR, if the user +accepts the default value. This helps \fBperldoc\fR when handling ANSI escapes +[perl #72156]. +.SH Testing +.IX Header "Testing" +.IP \(bu 4 +The test suite now has a section for tests that require very large amounts +of memory. These tests won't run by default; they can be enabled by +setting the \f(CW\*(C`PERL_TEST_MEMORY\*(C'\fR environment variable to the number of +gibibytes of memory that may be safely used. +.SH "Platform Support" +.IX Header "Platform Support" +.SS "Discontinued Platforms" +.IX Subsection "Discontinued Platforms" +.IP BeOS 4 +.IX Item "BeOS" +BeOS was an operating system for personal computers developed by Be Inc, +initially for their BeBox hardware. The OS Haiku was written as an open +source replacement for/continuation of BeOS, and its perl port is current and +actively maintained. +.IP "UTS Global" 4 +.IX Item "UTS Global" +Support code relating to UTS global has been removed. UTS was a mainframe +version of System V created by Amdahl, subsequently sold to UTS Global. The +port has not been touched since before Perl v5.8.0, and UTS Global is now +defunct. +.IP VM/ESA 4 +.IX Item "VM/ESA" +Support for VM/ESA has been removed. The port was tested on 2.3.0, which +IBM ended service on in March 2002. 2.4.0 ended service in June 2003, and +was superseded by Z/VM. The current version of Z/VM is V6.2.0, and scheduled +for end of service on 2015/04/30. +.IP MPE/IX 4 +.IX Item "MPE/IX" +Support for MPE/IX has been removed. +.IP EPOC 4 +.IX Item "EPOC" +Support code relating to EPOC has been removed. EPOC was a family of +operating systems developed by Psion for mobile devices. It was the +predecessor of Symbian. The port was last updated in April 2002. +.IP Rhapsody 4 +.IX Item "Rhapsody" +Support for Rhapsody has been removed. +.SS "Platform-Specific Notes" +.IX Subsection "Platform-Specific Notes" +\fIAIX\fR +.IX Subsection "AIX" +.PP +Configure now always adds \f(CW\*(C`\-qlanglvl=extc99\*(C'\fR to the CC flags on AIX when +using xlC. This will make it easier to compile a number of XS-based modules +that assume C99 [perl #113778]. +.PP +\fIclang++\fR +.IX Subsection "clang++" +.PP +There is now a workaround for a compiler bug that prevented compiling +with clang++ since Perl v5.15.7 [perl #112786]. +.PP +\fIC++\fR +.IX Subsection "C++" +.PP +When compiling the Perl core as C++ (which is only semi-supported), the +mathom functions are now compiled as \f(CW\*(C`extern "C"\*(C'\fR, to ensure proper +binary compatibility. (However, binary compatibility isn't generally +guaranteed anyway in the situations where this would matter.) +.PP +\fIDarwin\fR +.IX Subsection "Darwin" +.PP +Stop hardcoding an alignment on 8 byte boundaries to fix builds using +\&\-Dusemorebits. +.PP +\fIHaiku\fR +.IX Subsection "Haiku" +.PP +Perl should now work out of the box on Haiku R1 Alpha 4. +.PP +\fIMidnightBSD\fR +.IX Subsection "MidnightBSD" +.PP +\&\f(CW\*(C`libc_r\*(C'\fR was removed from recent versions of MidnightBSD and older versions +work better with \f(CW\*(C`pthread\*(C'\fR. Threading is now enabled using \f(CW\*(C`pthread\*(C'\fR which +corrects build errors with threading enabled on 0.4\-CURRENT. +.PP +\fISolaris\fR +.IX Subsection "Solaris" +.PP +In Configure, avoid running sed commands with flags not supported on Solaris. +.PP +\fIVMS\fR +.IX Subsection "VMS" +.IP \(bu 4 +Where possible, the case of filenames and command-line arguments is now +preserved by enabling the CRTL features \f(CW\*(C`DECC$EFS_CASE_PRESERVE\*(C'\fR and +\&\f(CW\*(C`DECC$ARGV_PARSE_STYLE\*(C'\fR at start-up time. The latter only takes effect +when extended parse is enabled in the process from which Perl is run. +.IP \(bu 4 +The character set for Extended Filename Syntax (EFS) is now enabled by default +on VMS. Among other things, this provides better handling of dots in directory +names, multiple dots in filenames, and spaces in filenames. To obtain the old +behavior, set the logical name \f(CW\*(C`DECC$EFS_CHARSET\*(C'\fR to \f(CW\*(C`DISABLE\*(C'\fR. +.IP \(bu 4 +Fixed linking on builds configured with \f(CW\*(C`\-Dusemymalloc=y\*(C'\fR. +.IP \(bu 4 +Experimental support for building Perl with the HP C++ compiler is available +by configuring with \f(CW\*(C`\-Dusecxx\*(C'\fR. +.IP \(bu 4 +All C header files from the top-level directory of the distribution are now +installed on VMS, providing consistency with a long-standing practice on other +platforms. Previously only a subset were installed, which broke non-core +extension builds for extensions that depended on the missing include files. +.IP \(bu 4 +Quotes are now removed from the command verb (but not the parameters) for +commands spawned via \f(CW\*(C`system\*(C'\fR, backticks, or a piped \f(CW\*(C`open\*(C'\fR. Previously, +quotes on the verb were passed through to DCL, which would fail to recognize +the command. Also, if the verb is actually a path to an image or command +procedure on an ODS\-5 volume, quoting it now allows the path to contain spaces. +.IP \(bu 4 +The \fBa2p\fR build has been fixed for the HP C++ compiler on OpenVMS. +.PP +\fIWin32\fR +.IX Subsection "Win32" +.IP \(bu 4 +Perl can now be built using Microsoft's Visual C++ 2012 compiler by specifying +CCTYPE=MSVC110 (or MSVC110FREE if you are using the free Express edition for +Windows Desktop) in \fIwin32/Makefile\fR. +.IP \(bu 4 +The option to build without \f(CW\*(C`USE_SOCKETS_AS_HANDLES\*(C'\fR has been removed. +.IP \(bu 4 +Fixed a problem where perl could crash while cleaning up threads (including the +main thread) in threaded debugging builds on Win32 and possibly other platforms +[perl #114496]. +.IP \(bu 4 +A rare race condition that would lead to sleep taking more +time than requested, and possibly even hanging, has been fixed [perl #33096]. +.IP \(bu 4 +\&\f(CW\*(C`link\*(C'\fR on Win32 now attempts to set \f(CW$!\fR to more appropriate values +based on the Win32 API error code. [perl #112272] +.Sp +Perl no longer mangles the environment block, e.g. when launching a new +sub-process, when the environment contains non-ASCII characters. Known +problems still remain, however, when the environment contains characters +outside of the current ANSI codepage (e.g. see the item about Unicode in +\&\f(CW%ENV\fR in ). +[perl #113536] +.IP \(bu 4 +Building perl with some Windows compilers used to fail due to a problem +with miniperl's \f(CW\*(C`glob\*(C'\fR operator (which uses the \f(CW\*(C`perlglob\*(C'\fR program) +deleting the PATH environment variable [perl #113798]. +.IP \(bu 4 +A new makefile option, \f(CW\*(C`USE_64_BIT_INT\*(C'\fR, has been added to the Windows +makefiles. Set this to "define" when building a 32\-bit perl if you want +it to use 64\-bit integers. +.Sp +Machine code size reductions, already made to the DLLs of XS modules in +Perl v5.17.2, have now been extended to the perl DLL itself. +.Sp +Building with VC++ 6.0 was inadvertently broken in Perl v5.17.2 but has +now been fixed again. +.PP +\fIWinCE\fR +.IX Subsection "WinCE" +.PP +Building on WinCE is now possible once again, although more work is required +to fully restore a clean build. +.SH "Internal Changes" +.IX Header "Internal Changes" +.IP \(bu 4 +Synonyms for the misleadingly named \f(CWav_len()\fR have been created: +\&\f(CWav_top_index()\fR and \f(CW\*(C`av_tindex\*(C'\fR. All three of these return the +number of the highest index in the array, not the number of elements it +contains. +.IP \(bu 4 +\&\fBSvUPGRADE()\fR is no longer an expression. Originally this macro (and its +underlying function, \fBsv_upgrade()\fR) were documented as boolean, although +in reality they always croaked on error and never returned false. In 2005 +the documentation was updated to specify a void return value, but +\&\fBSvUPGRADE()\fR was left always returning 1 for backwards compatibility. This +has now been removed, and \fBSvUPGRADE()\fR is now a statement with no return +value. +.Sp +So this is now a syntax error: +.Sp +.Vb 1 +\& if (!SvUPGRADE(sv)) { croak(...); } +.Ve +.Sp +If you have code like that, simply replace it with +.Sp +.Vb 1 +\& SvUPGRADE(sv); +.Ve +.Sp +or to avoid compiler warnings with older perls, possibly +.Sp +.Vb 1 +\& (void)SvUPGRADE(sv); +.Ve +.IP \(bu 4 +Perl has a new copy-on-write mechanism that allows any SvPOK scalar to be +upgraded to a copy-on-write scalar. A reference count on the string buffer +is stored in the string buffer itself. This feature is \fBnot enabled by +default\fR. +.Sp +It can be enabled in a perl build by running \fIConfigure\fR with +\&\fB\-Accflags=\-DPERL_NEW_COPY_ON_WRITE\fR, and we would encourage XS authors +to try their code with such an enabled perl, and provide feedback. +Unfortunately, there is not yet a good guide to updating XS code to cope +with COW. Until such a document is available, consult the perl5\-porters +mailing list. +.Sp +It breaks a few XS modules by allowing copy-on-write scalars to go +through code paths that never encountered them before. +.IP \(bu 4 +Copy-on-write no longer uses the SvFAKE and SvREADONLY flags. Hence, +SvREADONLY indicates a true read-only SV. +.Sp +Use the SvIsCOW macro (as before) to identify a copy-on-write scalar. +.IP \(bu 4 +\&\f(CW\*(C`PL_glob_index\*(C'\fR is gone. +.IP \(bu 4 +The private Perl_croak_no_modify has had its context parameter removed. It is +now has a void prototype. Users of the public API croak_no_modify remain +unaffected. +.IP \(bu 4 +Copy-on-write (shared hash key) scalars are no longer marked read-only. +\&\f(CW\*(C`SvREADONLY\*(C'\fR returns false on such an SV, but \f(CW\*(C`SvIsCOW\*(C'\fR still returns +true. +.IP \(bu 4 +A new op type, \f(CW\*(C`OP_PADRANGE\*(C'\fR has been introduced. The perl peephole +optimiser will, where possible, substitute a single padrange op for a +pushmark followed by one or more pad ops, and possibly also skipping list +and nextstate ops. In addition, the op can carry out the tasks associated +with the RHS of a \f(CW\*(C`my(...) = @_\*(C'\fR assignment, so those ops may be optimised +away too. +.IP \(bu 4 +Case-insensitive matching inside a [bracketed] character class with a +multi-character fold no longer excludes one of the possibilities in the +circumstances that it used to. [perl #89774]. +.IP \(bu 4 +\&\f(CW\*(C`PL_formfeed\*(C'\fR has been removed. +.IP \(bu 4 +The regular expression engine no longer reads one byte past the end of the +target string. While for all internally well-formed scalars this should +never have been a problem, this change facilitates clever tricks with +string buffers in CPAN modules. [perl #73542] +.IP \(bu 4 +Inside a BEGIN block, \f(CW\*(C`PL_compcv\*(C'\fR now points to the currently-compiling +subroutine, rather than the BEGIN block itself. +.IP \(bu 4 +\&\f(CW\*(C`mg_length\*(C'\fR has been deprecated. +.IP \(bu 4 +\&\f(CW\*(C`sv_len\*(C'\fR now always returns a byte count and \f(CW\*(C`sv_len_utf8\*(C'\fR a character +count. Previously, \f(CW\*(C`sv_len\*(C'\fR and \f(CW\*(C`sv_len_utf8\*(C'\fR were both buggy and would +sometimes returns bytes and sometimes characters. \f(CW\*(C`sv_len_utf8\*(C'\fR no longer +assumes that its argument is in UTF\-8. Neither of these creates UTF\-8 caches +for tied or overloaded values or for non-PVs any more. +.IP \(bu 4 +\&\f(CW\*(C`sv_mortalcopy\*(C'\fR now copies string buffers of shared hash key scalars when +called from XS modules [perl #79824]. +.IP \(bu 4 +The new \f(CW\*(C`RXf_MODIFIES_VARS\*(C'\fR flag can be set by custom regular expression +engines to indicate that the execution of the regular expression may cause +variables to be modified. This lets \f(CW\*(C`s///\*(C'\fR know to skip certain +optimisations. Perl's own regular expression engine sets this flag for the +special backtracking verbs that set \f(CW$REGMARK\fR and \f(CW$REGERROR\fR. +.IP \(bu 4 +The APIs for accessing lexical pads have changed considerably. +.Sp +\&\f(CW\*(C`PADLIST\*(C'\fRs are now longer \f(CW\*(C`AV\*(C'\fRs, but their own type instead. +\&\f(CW\*(C`PADLIST\*(C'\fRs now contain a \f(CW\*(C`PAD\*(C'\fR and a \f(CW\*(C`PADNAMELIST\*(C'\fR of \f(CW\*(C`PADNAME\*(C'\fRs, +rather than \f(CW\*(C`AV\*(C'\fRs for the pad and the list of pad names. \f(CW\*(C`PAD\*(C'\fRs, +\&\f(CW\*(C`PADNAMELIST\*(C'\fRs, and \f(CW\*(C`PADNAME\*(C'\fRs are to be accessed as such through the +newly added pad API instead of the plain \f(CW\*(C`AV\*(C'\fR and \f(CW\*(C`SV\*(C'\fR APIs. See +perlapi for details. +.IP \(bu 4 +In the regex API, the numbered capture callbacks are passed an index +indicating what match variable is being accessed. There are special +index values for the \f(CW\*(C`$\`, $&, $&\*(C'\fR variables. Previously the same three +values were used to retrieve \f(CW\*(C`${^PREMATCH}, ${^MATCH}, ${^POSTMATCH}\*(C'\fR +too, but these have now been assigned three separate values. See +"Numbered capture callbacks" in perlreapi. +.IP \(bu 4 +\&\f(CW\*(C`PL_sawampersand\*(C'\fR was previously a boolean indicating that any of +\&\f(CW\*(C`$\`, $&, $&\*(C'\fR had been seen; it now contains three one-bit flags +indicating the presence of each of the variables individually. +.IP \(bu 4 +The \f(CW\*(C`CV *\*(C'\fR typemap entry now supports \f(CW\*(C`&{}\*(C'\fR overloading and typeglobs, +just like \f(CW\*(C`&{...}\*(C'\fR [perl #96872]. +.IP \(bu 4 +The \f(CW\*(C`SVf_AMAGIC\*(C'\fR flag to indicate overloading is now on the stash, not the +object. It is now set automatically whenever a method or \f(CW@ISA\fR changes, so +its meaning has changed, too. It now means "potentially overloaded". When +the overload table is calculated, the flag is automatically turned off if +there is no overloading, so there should be no noticeable slowdown. +.Sp +The staleness of the overload tables is now checked when overload methods +are invoked, rather than during \f(CW\*(C`bless\*(C'\fR. +.Sp +"A" magic is gone. The changes to the handling of the \f(CW\*(C`SVf_AMAGIC\*(C'\fR flag +eliminate the need for it. +.Sp +\&\f(CW\*(C`PL_amagic_generation\*(C'\fR has been removed as no longer necessary. For XS +modules, it is now a macro alias to \f(CW\*(C`PL_na\*(C'\fR. +.Sp +The fallback overload setting is now stored in a stash entry separate from +overloadedness itself. +.IP \(bu 4 +The character-processing code has been cleaned up in places. The changes +should be operationally invisible. +.IP \(bu 4 +The \f(CW\*(C`study\*(C'\fR function was made a no-op in v5.16. It was simply disabled via +a \f(CW\*(C`return\*(C'\fR statement; the code was left in place. Now the code supporting +what \f(CW\*(C`study\*(C'\fR used to do has been removed. +.IP \(bu 4 +Under threaded perls, there is no longer a separate PV allocated for every +COP to store its package name (\f(CW\*(C`cop\->stashpv\*(C'\fR). Instead, there is an +offset (\f(CW\*(C`cop\->stashoff\*(C'\fR) into the new \f(CW\*(C`PL_stashpad\*(C'\fR array, which +holds stash pointers. +.IP \(bu 4 +In the pluggable regex API, the \f(CW\*(C`regexp_engine\*(C'\fR struct has acquired a new +field \f(CW\*(C`op_comp\*(C'\fR, which is currently just for perl's internal use, and +should be initialized to NULL by other regex plugin modules. +.IP \(bu 4 +A new function \f(CW\*(C`alloccopstash\*(C'\fR has been added to the API, but is considered +experimental. See perlapi. +.IP \(bu 4 +Perl used to implement get magic in a way that would sometimes hide bugs in +code that could call \fBmg_get()\fR too many times on magical values. This hiding of +errors no longer occurs, so long-standing bugs may become visible now. If +you see magic-related errors in XS code, check to make sure it, together +with the Perl API functions it uses, calls \fBmg_get()\fR only once on \fBSvGMAGICAL()\fR +values. +.IP \(bu 4 +OP allocation for CVs now uses a slab allocator. This simplifies +memory management for OPs allocated to a CV, so cleaning up after a +compilation error is simpler and safer [perl #111462][perl #112312]. +.IP \(bu 4 +\&\f(CW\*(C`PERL_DEBUG_READONLY_OPS\*(C'\fR has been rewritten to work with the new slab +allocator, allowing it to catch more violations than before. +.IP \(bu 4 +The old slab allocator for ops, which was only enabled for \f(CW\*(C`PERL_IMPLICIT_SYS\*(C'\fR +and \f(CW\*(C`PERL_DEBUG_READONLY_OPS\*(C'\fR, has been retired. +.SH "Selected Bug Fixes" +.IX Header "Selected Bug Fixes" +.IP \(bu 4 +Here document terminators no longer require a terminating newline character when +they occur at the end of a file. This was already the case at the end of a +string eval [perl #65838]. +.IP \(bu 4 +\&\f(CW\*(C`\-DPERL_GLOBAL_STRUCT\*(C'\fR builds now free the global struct \fBafter\fR +they've finished using it. +.IP \(bu 4 +A trailing '/' on a path in \f(CW@INC\fR will no longer have an additional '/' +appended. +.IP \(bu 4 +The \f(CW\*(C`:crlf\*(C'\fR layer now works when unread data doesn't fit into its own +buffer. [perl #112244]. +.IP \(bu 4 +\&\f(CWungetc()\fR now handles UTF\-8 encoded data. [perl #116322]. +.IP \(bu 4 +A bug in the core typemap caused any C types that map to the T_BOOL core +typemap entry to not be set, updated, or modified when the T_BOOL variable was +used in an OUTPUT: section with an exception for RETVAL. T_BOOL in an INPUT: +section was not affected. Using a T_BOOL return type for an XSUB (RETVAL) +was not affected. A side effect of fixing this bug is, if a T_BOOL is specified +in the OUTPUT: section (which previous did nothing to the SV), and a read only +SV (literal) is passed to the XSUB, croaks like "Modification of a read-only +value attempted" will happen. [perl #115796] +.IP \(bu 4 +On many platforms, providing a directory name as the script name caused perl +to do nothing and report success. It should now universally report an error +and exit nonzero. [perl #61362] +.IP \(bu 4 +\&\f(CW\*(C`sort {undef} ...\*(C'\fR under fatal warnings no longer crashes. It had +begun crashing in Perl v5.16. +.IP \(bu 4 +Stashes blessed into each other +(\f(CW\*(C`bless \e%Foo::, \*(AqBar\*(Aq; bless \e%Bar::, \*(AqFoo\*(Aq\*(C'\fR) no longer result in double +frees. This bug started happening in Perl v5.16. +.IP \(bu 4 +Numerous memory leaks have been fixed, mostly involving fatal warnings and +syntax errors. +.IP \(bu 4 +Some failed regular expression matches such as \f(CW\*(C`\*(Aqf\*(Aq =~ /../g\*(C'\fR were not +resetting \f(CW\*(C`pos\*(C'\fR. Also, "match-once" patterns (\f(CW\*(C`m?...?g\*(C'\fR) failed to reset +it, too, when invoked a second time [perl #23180]. +.IP \(bu 4 +Several bugs involving \f(CW\*(C`local *ISA\*(C'\fR and \f(CW\*(C`local *Foo::\*(C'\fR causing stale +MRO caches have been fixed. +.IP \(bu 4 +Defining a subroutine when its typeglob has been aliased no longer results +in stale method caches. This bug was introduced in Perl v5.10. +.IP \(bu 4 +Localising a typeglob containing a subroutine when the typeglob's package +has been deleted from its parent stash no longer produces an error. This +bug was introduced in Perl v5.14. +.IP \(bu 4 +Under some circumstances, \f(CW\*(C`local *method=...\*(C'\fR would fail to reset method +caches upon scope exit. +.IP \(bu 4 +\&\f(CW\*(C`/[.foo.]/\*(C'\fR is no longer an error, but produces a warning (as before) and +is treated as \f(CW\*(C`/[.fo]/\*(C'\fR [perl #115818]. +.IP \(bu 4 +\&\f(CW\*(C`goto $tied_var\*(C'\fR now calls FETCH before deciding what type of goto +(subroutine or label) this is. +.IP \(bu 4 +Renaming packages through glob assignment +(\f(CW\*(C`*Foo:: = *Bar::; *Bar:: = *Baz::\*(C'\fR) in combination with \f(CW\*(C`m?...?\*(C'\fR and +\&\f(CW\*(C`reset\*(C'\fR no longer makes threaded builds crash. +.IP \(bu 4 +A number of bugs related to assigning a list to hash have been fixed. Many of +these involve lists with repeated keys like \f(CW\*(C`(1, 1, 1, 1)\*(C'\fR. +.RS 4 +.IP \(bu 4 +The expression \f(CW\*(C`scalar(%h = (1, 1, 1, 1))\*(C'\fR now returns \f(CW4\fR, not \f(CW2\fR. +.IP \(bu 4 +The return value of \f(CW\*(C`%h = (1, 1, 1)\*(C'\fR in list context was wrong. Previously +this would return \f(CW\*(C`(1, undef, 1)\*(C'\fR, now it returns \f(CW\*(C`(1, undef)\*(C'\fR. +.IP \(bu 4 +Perl now issues the same warning on \f(CW\*(C`($s, %h) = (1, {})\*(C'\fR as it does for +\&\f(CW\*(C`(%h) = ({})\*(C'\fR, "Reference found where even-sized list expected". +.IP \(bu 4 +A number of additional edge cases in list assignment to hashes were +corrected. For more details see commit 23b7025ebc. +.RE +.RS 4 +.RE +.IP \(bu 4 +Attributes applied to lexical variables no longer leak memory. +[perl #114764] +.IP \(bu 4 +\&\f(CW\*(C`dump\*(C'\fR, \f(CW\*(C`goto\*(C'\fR, \f(CW\*(C`last\*(C'\fR, \f(CW\*(C`next\*(C'\fR, \f(CW\*(C`redo\*(C'\fR or \f(CW\*(C`require\*(C'\fR followed by a +bareword (or version) and then an infix operator is no longer a syntax +error. It used to be for those infix operators (like \f(CW\*(C`+\*(C'\fR) that have a +different meaning where a term is expected. [perl #105924] +.IP \(bu 4 +\&\f(CW\*(C`require a::b . 1\*(C'\fR and \f(CW\*(C`require a::b + 1\*(C'\fR no longer produce erroneous +ambiguity warnings. [perl #107002] +.IP \(bu 4 +Class method calls are now allowed on any string, and not just strings +beginning with an alphanumeric character. [perl #105922] +.IP \(bu 4 +An empty pattern created with \f(CW\*(C`qr//\*(C'\fR used in \f(CW\*(C`m///\*(C'\fR no longer triggers +the "empty pattern reuses last pattern" behaviour. [perl #96230] +.IP \(bu 4 +Tying a hash during iteration no longer results in a memory leak. +.IP \(bu 4 +Freeing a tied hash during iteration no longer results in a memory leak. +.IP \(bu 4 +List assignment to a tied array or hash that dies on STORE no longer +results in a memory leak. +.IP \(bu 4 +If the hint hash (\f(CW\*(C`%^H\*(C'\fR) is tied, compile-time scope entry (which copies +the hint hash) no longer leaks memory if FETCH dies. [perl #107000] +.IP \(bu 4 +Constant folding no longer inappropriately triggers the special +\&\f(CW\*(C`split " "\*(C'\fR behaviour. [perl #94490] +.IP \(bu 4 +\&\f(CW\*(C`defined scalar(@array)\*(C'\fR, \f(CW\*(C`defined do { &foo }\*(C'\fR, and similar constructs +now treat the argument to \f(CW\*(C`defined\*(C'\fR as a simple scalar. [perl #97466] +.IP \(bu 4 +Running a custom debugging that defines no \f(CW*DB::DB\fR glob or provides a +subroutine stub for \f(CW&DB::DB\fR no longer results in a crash, but an error +instead. [perl #114990] +.IP \(bu 4 +\&\f(CW\*(C`reset ""\*(C'\fR now matches its documentation. \f(CW\*(C`reset\*(C'\fR only resets \f(CW\*(C`m?...?\*(C'\fR +patterns when called with no argument. An empty string for an argument now +does nothing. (It used to be treated as no argument.) [perl #97958] +.IP \(bu 4 +\&\f(CW\*(C`printf\*(C'\fR with an argument returning an empty list no longer reads past the +end of the stack, resulting in erratic behaviour. [perl #77094] +.IP \(bu 4 +\&\f(CW\*(C`\-\-subname\*(C'\fR no longer produces erroneous ambiguity warnings. +[perl #77240] +.IP \(bu 4 +\&\f(CW\*(C`v10\*(C'\fR is now allowed as a label or package name. This was inadvertently +broken when v\-strings were added in Perl v5.6. [perl #56880] +.IP \(bu 4 +\&\f(CW\*(C`length\*(C'\fR, \f(CW\*(C`pos\*(C'\fR, \f(CW\*(C`substr\*(C'\fR and \f(CW\*(C`sprintf\*(C'\fR could be confused by ties, +overloading, references and typeglobs if the stringification of such +changed the internal representation to or from UTF\-8. [perl #114410] +.IP \(bu 4 +utf8::encode now calls FETCH and STORE on tied variables. utf8::decode now +calls STORE (it was already calling FETCH). +.IP \(bu 4 +\&\f(CW\*(C`$tied =~ s/$non_utf8/$utf8/\*(C'\fR no longer loops infinitely if the tied +variable returns a Latin\-1 string, shared hash key scalar, or reference or +typeglob that stringifies as ASCII or Latin\-1. This was a regression from +v5.12. +.IP \(bu 4 +\&\f(CW\*(C`s///\*(C'\fR without /e is now better at detecting when it needs to forego +certain optimisations, fixing some buggy cases: +.RS 4 +.IP \(bu 4 +Match variables in certain constructs (\f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, \f(CW\*(C`..\*(C'\fR and others) in +the replacement part; e.g., \f(CW\*(C`s/(.)/$l{$a||$1}/g\*(C'\fR. [perl #26986] +.IP \(bu 4 +Aliases to match variables in the replacement. +.IP \(bu 4 +\&\f(CW$REGERROR\fR or \f(CW$REGMARK\fR in the replacement. [perl #49190] +.IP \(bu 4 +An empty pattern (\f(CW\*(C`s//$foo/\*(C'\fR) that causes the last-successful pattern to +be used, when that pattern contains code blocks that modify the variables +in the replacement. +.RE +.RS 4 +.RE +.IP \(bu 4 +The taintedness of the replacement string no longer affects the taintedness +of the return value of \f(CW\*(C`s///e\*(C'\fR. +.IP \(bu 4 +The \f(CW$|\fR autoflush variable is created on-the-fly when needed. If this +happened (e.g., if it was mentioned in a module or eval) when the +currently-selected filehandle was a typeglob with an empty IO slot, it used +to crash. [perl #115206] +.IP \(bu 4 +Line numbers at the end of a string eval are no longer off by one. +[perl #114658] +.IP \(bu 4 +\&\f(CW@INC\fR filters (subroutines returned by subroutines in \f(CW@INC\fR) that set \f(CW$_\fR to a +copy-on-write scalar no longer cause the parser to modify that string +buffer in place. +.IP \(bu 4 +\&\f(CWlength($object)\fR no longer returns the undefined value if the object has +string overloading that returns undef. [perl #115260] +.IP \(bu 4 +The use of \f(CW\*(C`PL_stashcache\*(C'\fR, the stash name lookup cache for method calls, has +been restored, +.Sp +Commit da6b625f78f5f133 in August 2011 inadvertently broke the code that looks +up values in \f(CW\*(C`PL_stashcache\*(C'\fR. As it's only a cache, quite correctly everything +carried on working without it. +.IP \(bu 4 +The error "Can't localize through a reference" had disappeared in v5.16.0 +when \f(CW\*(C`local %$ref\*(C'\fR appeared on the last line of an lvalue subroutine. +This error disappeared for \f(CW\*(C`\elocal %$ref\*(C'\fR in perl v5.8.1. It has now +been restored. +.IP \(bu 4 +The parsing of here-docs has been improved significantly, fixing several +parsing bugs and crashes and one memory leak, and correcting wrong +subsequent line numbers under certain conditions. +.IP \(bu 4 +Inside an eval, the error message for an unterminated here-doc no longer +has a newline in the middle of it [perl #70836]. +.IP \(bu 4 +A substitution inside a substitution pattern (\f(CW\*(C`s/${s|||}//\*(C'\fR) no longer +confuses the parser. +.IP \(bu 4 +It may be an odd place to allow comments, but \f(CW\*(C`s//"" # hello/e\*(C'\fR has +always worked, \fIunless\fR there happens to be a null character before the +first #. Now it works even in the presence of nulls. +.IP \(bu 4 +An invalid range in \f(CW\*(C`tr///\*(C'\fR or \f(CW\*(C`y///\*(C'\fR no longer results in a memory leak. +.IP \(bu 4 +String eval no longer treats a semicolon-delimited quote-like operator at +the very end (\f(CW\*(C`eval \*(Aqq;;\*(Aq\*(C'\fR) as a syntax error. +.IP \(bu 4 +\&\f(CW\*(C`warn {$_ => 1} + 1\*(C'\fR is no longer a syntax error. The parser used to +get confused with certain list operators followed by an anonymous hash and +then an infix operator that shares its form with a unary operator. +.IP \(bu 4 +\&\f(CW\*(C`(caller $n)[6]\*(C'\fR (which gives the text of the eval) used to return the +actual parser buffer. Modifying it could result in crashes. Now it always +returns a copy. The string returned no longer has "\en;" tacked on to the +end. The returned text also includes here-doc bodies, which used to be +omitted. +.IP \(bu 4 +The UTF\-8 position cache is now reset when accessing magical variables, to +avoid the string buffer and the UTF\-8 position cache getting out of sync +[perl #114410]. +.IP \(bu 4 +Various cases of get magic being called twice for magical UTF\-8 +strings have been fixed. +.IP \(bu 4 +This code (when not in the presence of \f(CW$&\fR etc) +.Sp +.Vb 2 +\& $_ = \*(Aqx\*(Aq x 1_000_000; +\& 1 while /(.)/; +.Ve +.Sp +used to skip the buffer copy for performance reasons, but suffered from \f(CW$1\fR +etc changing if the original string changed. That's now been fixed. +.IP \(bu 4 +Perl doesn't use PerlIO anymore to report out of memory messages, as PerlIO +might attempt to allocate more memory. +.IP \(bu 4 +In a regular expression, if something is quantified with \f(CW\*(C`{n,m}\*(C'\fR where +\&\f(CW\*(C`n\ >\ m\*(C'\fR, it can't possibly match. Previously this was a fatal +error, but now is merely a warning (and that something won't match). +[perl #82954]. +.IP \(bu 4 +It used to be possible for formats defined in subroutines that have +subsequently been undefined and redefined to close over variables in the +wrong pad (the newly-defined enclosing sub), resulting in crashes or +"Bizarre copy" errors. +.IP \(bu 4 +Redefinition of XSUBs at run time could produce warnings with the wrong +line number. +.IP \(bu 4 +The \f(CW%vd\fR sprintf format does not support version objects for alpha versions. +It used to output the format itself (%vd) when passed an alpha version, and +also emit an "Invalid conversion in printf" warning. It no longer does, +but produces the empty string in the output. It also no longer leaks +memory in this case. +.IP \(bu 4 +\&\f(CW\*(C`$obj\->SUPER::method\*(C'\fR calls in the main package could fail if the +SUPER package had already been accessed by other means. +.IP \(bu 4 +Stash aliasing (\f(CW\*(C`*foo:: = *bar::\*(C'\fR) no longer causes SUPER calls to ignore +changes to methods or \f(CW@ISA\fR or use the wrong package. +.IP \(bu 4 +Method calls on packages whose names end in ::SUPER are no longer treated +as SUPER method calls, resulting in failure to find the method. +Furthermore, defining subroutines in such packages no longer causes them to +be found by SUPER method calls on the containing package [perl #114924]. +.IP \(bu 4 +\&\f(CW\*(C`\ew\*(C'\fR now matches the code points U+200C (ZERO WIDTH NON-JOINER) and U+200D +(ZERO WIDTH JOINER). \f(CW\*(C`\eW\*(C'\fR no longer matches these. This change is because +Unicode corrected their definition of what \f(CW\*(C`\ew\*(C'\fR should match. +.IP \(bu 4 +\&\f(CW\*(C`dump LABEL\*(C'\fR no longer leaks its label. +.IP \(bu 4 +Constant folding no longer changes the behaviour of functions like \f(CWstat()\fR +and \f(CWtruncate()\fR that can take either filenames or handles. +\&\f(CW\*(C`stat 1 ? foo : bar\*(C'\fR nows treats its argument as a file name (since it is an +arbitrary expression), rather than the handle "foo". +.IP \(bu 4 +\&\f(CW\*(C`truncate FOO, $len\*(C'\fR no longer falls back to treating "FOO" as a file name if +the filehandle has been deleted. This was broken in Perl v5.16.0. +.IP \(bu 4 +Subroutine redefinitions after sub-to-glob and glob-to-glob assignments no +longer cause double frees or panic messages. +.IP \(bu 4 +\&\f(CW\*(C`s///\*(C'\fR now turns vstrings into plain strings when performing a substitution, +even if the resulting string is the same (\f(CW\*(C`s/a/a/\*(C'\fR). +.IP \(bu 4 +Prototype mismatch warnings no longer erroneously treat constant subs as having +no prototype when they actually have "". +.IP \(bu 4 +Constant subroutines and forward declarations no longer prevent prototype +mismatch warnings from omitting the sub name. +.IP \(bu 4 +\&\f(CW\*(C`undef\*(C'\fR on a subroutine now clears call checkers. +.IP \(bu 4 +The \f(CW\*(C`ref\*(C'\fR operator started leaking memory on blessed objects in Perl v5.16.0. +This has been fixed [perl #114340]. +.IP \(bu 4 +\&\f(CW\*(C`use\*(C'\fR no longer tries to parse its arguments as a statement, making +\&\f(CW\*(C`use constant { () };\*(C'\fR a syntax error [perl #114222]. +.IP \(bu 4 +On debugging builds, "uninitialized" warnings inside formats no longer cause +assertion failures. +.IP \(bu 4 +On debugging builds, subroutines nested inside formats no longer cause +assertion failures [perl #78550]. +.IP \(bu 4 +Formats and \f(CW\*(C`use\*(C'\fR statements are now permitted inside formats. +.IP \(bu 4 +\&\f(CW\*(C`print $x\*(C'\fR and \f(CW\*(C`sub { print $x }\->()\*(C'\fR now always produce the same output. +It was possible for the latter to refuse to close over \f(CW$x\fR if the variable was +not active; e.g., if it was defined outside a currently-running named +subroutine. +.IP \(bu 4 +Similarly, \f(CW\*(C`print $x\*(C'\fR and \f(CW\*(C`print eval \*(Aq$x\*(Aq\*(C'\fR now produce the same output. +This also allows "my \f(CW$x\fR if 0" variables to be seen in the debugger [perl +#114018]. +.IP \(bu 4 +Formats called recursively no longer stomp on their own lexical variables, but +each recursive call has its own set of lexicals. +.IP \(bu 4 +Attempting to free an active format or the handle associated with it no longer +results in a crash. +.IP \(bu 4 +Format parsing no longer gets confused by braces, semicolons and low-precedence +operators. It used to be possible to use braces as format delimiters (instead +of \f(CW\*(C`=\*(C'\fR and \f(CW\*(C`.\*(C'\fR), but only sometimes. Semicolons and low-precedence operators +in format argument lines no longer confuse the parser into ignoring the line's +return value. In format argument lines, braces can now be used for anonymous +hashes, instead of being treated always as \f(CW\*(C`do\*(C'\fR blocks. +.IP \(bu 4 +Formats can now be nested inside code blocks in regular expressions and other +quoted constructs (\f(CW\*(C`/(?{...})/\*(C'\fR and \f(CW\*(C`qq/${...}/\*(C'\fR) [perl #114040]. +.IP \(bu 4 +Formats are no longer created after compilation errors. +.IP \(bu 4 +Under debugging builds, the \fB\-DA\fR command line option started crashing in Perl +v5.16.0. It has been fixed [perl #114368]. +.IP \(bu 4 +A potential deadlock scenario involving the premature termination of a pseudo\- +forked child in a Windows build with ithreads enabled has been fixed. This +resolves the common problem of the \fIt/op/fork.t\fR test hanging on Windows [perl +#88840]. +.IP \(bu 4 +The code which generates errors from \f(CWrequire()\fR could potentially read one or +two bytes before the start of the filename for filenames less than three bytes +long and ending \f(CW\*(C`/\e.p?\ez/\*(C'\fR. This has now been fixed. Note that it could +never have happened with module names given to \f(CWuse()\fR or \f(CWrequire()\fR anyway. +.IP \(bu 4 +The handling of pathnames of modules given to \f(CWrequire()\fR has been made +thread-safe on VMS. +.IP \(bu 4 +Non-blocking sockets have been fixed on VMS. +.IP \(bu 4 +Pod can now be nested in code inside a quoted construct outside of a string +eval. This used to work only within string evals [perl #114040]. +.IP \(bu 4 +\&\f(CW\*(C`goto \*(Aq\*(Aq\*(C'\fR now looks for an empty label, producing the "goto must have +label" error message, instead of exiting the program [perl #111794]. +.IP \(bu 4 +\&\f(CW\*(C`goto "\e0"\*(C'\fR now dies with "Can't find label" instead of "goto must have +label". +.IP \(bu 4 +The C function \f(CW\*(C`hv_store\*(C'\fR used to result in crashes when used on \f(CW\*(C`%^H\*(C'\fR +[perl #111000]. +.IP \(bu 4 +A call checker attached to a closure prototype via \f(CW\*(C`cv_set_call_checker\*(C'\fR +is now copied to closures cloned from it. So \f(CW\*(C`cv_set_call_checker\*(C'\fR now +works inside an attribute handler for a closure. +.IP \(bu 4 +Writing to \f(CW$^N\fR used to have no effect. Now it croaks with "Modification +of a read-only value" by default, but that can be overridden by a custom +regular expression engine, as with \f(CW$1\fR [perl #112184]. +.IP \(bu 4 +\&\f(CW\*(C`undef\*(C'\fR on a control character glob (\f(CW\*(C`undef *^H\*(C'\fR) no longer emits an +erroneous warning about ambiguity [perl #112456]. +.IP \(bu 4 +For efficiency's sake, many operators and built-in functions return the +same scalar each time. Lvalue subroutines and subroutines in the CORE:: +namespace were allowing this implementation detail to leak through. +\&\f(CW\*(C`print &CORE::uc("a"), &CORE::uc("b")\*(C'\fR used to print "BB". The same thing +would happen with an lvalue subroutine returning the return value of \f(CW\*(C`uc\*(C'\fR. +Now the value is copied in such cases. +.IP \(bu 4 +\&\f(CW\*(C`method {}\*(C'\fR syntax with an empty block or a block returning an empty list +used to crash or use some random value left on the stack as its invocant. +Now it produces an error. +.IP \(bu 4 +\&\f(CW\*(C`vec\*(C'\fR now works with extremely large offsets (>2 GB) [perl #111730]. +.IP \(bu 4 +Changes to overload settings now take effect immediately, as do changes to +inheritance that affect overloading. They used to take effect only after +\&\f(CW\*(C`bless\*(C'\fR. +.Sp +Objects that were created before a class had any overloading used to remain +non-overloaded even if the class gained overloading through \f(CW\*(C`use overload\*(C'\fR +or \f(CW@ISA\fR changes, and even after \f(CW\*(C`bless\*(C'\fR. This has been fixed +[perl #112708]. +.IP \(bu 4 +Classes with overloading can now inherit fallback values. +.IP \(bu 4 +Overloading was not respecting a fallback value of 0 if there were +overloaded objects on both sides of an assignment operator like \f(CW\*(C`+=\*(C'\fR +[perl #111856]. +.IP \(bu 4 +\&\f(CW\*(C`pos\*(C'\fR now croaks with hash and array arguments, instead of producing +erroneous warnings. +.IP \(bu 4 +\&\f(CW\*(C`while(each %h)\*(C'\fR now implies \f(CW\*(C`while(defined($_ = each %h))\*(C'\fR, like +\&\f(CW\*(C`readline\*(C'\fR and \f(CW\*(C`readdir\*(C'\fR. +.IP \(bu 4 +Subs in the CORE:: namespace no longer crash after \f(CW\*(C`undef *_\*(C'\fR when called +with no argument list (\f(CW&CORE::time\fR with no parentheses). +.IP \(bu 4 +\&\f(CW\*(C`unpack\*(C'\fR no longer produces the "'/' must follow a numeric type in unpack" +error when it is the data that are at fault [perl #60204]. +.IP \(bu 4 +\&\f(CW\*(C`join\*(C'\fR and \f(CW"@array"\fR now call FETCH only once on a tied \f(CW$"\fR +[perl #8931]. +.IP \(bu 4 +Some subroutine calls generated by compiling core ops affected by a +\&\f(CW\*(C`CORE::GLOBAL\*(C'\fR override had op checking performed twice. The checking +is always idempotent for pure Perl code, but the double checking can +matter when custom call checkers are involved. +.IP \(bu 4 +A race condition used to exist around fork that could cause a signal sent to +the parent to be handled by both parent and child. Signals are now blocked +briefly around fork to prevent this from happening [perl #82580]. +.IP \(bu 4 +The implementation of code blocks in regular expressions, such as \f(CW\*(C`(?{})\*(C'\fR +and \f(CW\*(C`(??{})\*(C'\fR, has been heavily reworked to eliminate a whole slew of bugs. +The main user-visible changes are: +.RS 4 +.IP \(bu 4 +Code blocks within patterns are now parsed in the same pass as the +surrounding code; in particular it is no longer necessary to have balanced +braces: this now works: +.Sp +.Vb 1 +\& /(?{ $x=\*(Aq{\*(Aq })/ +.Ve +.Sp +This means that this error message is no longer generated: +.Sp +.Vb 1 +\& Sequence (?{...}) not terminated or not {}\-balanced in regex +.Ve +.Sp +but a new error may be seen: +.Sp +.Vb 1 +\& Sequence (?{...}) not terminated with \*(Aq)\*(Aq +.Ve +.Sp +In addition, literal code blocks within run-time patterns are only +compiled once, at perl compile-time: +.Sp +.Vb 5 +\& for my $p (...) { +\& # this \*(AqFOO\*(Aq block of code is compiled once, +\& # at the same time as the surrounding \*(Aqfor\*(Aq loop +\& /$p{(?{FOO;})/; +\& } +.Ve +.IP \(bu 4 +Lexical variables are now sane as regards scope, recursion and closure +behavior. In particular, \f(CW\*(C`/A(?{B})C/\*(C'\fR behaves (from a closure viewpoint) +exactly like \f(CW\*(C`/A/ && do { B } && /C/\*(C'\fR, while \f(CW\*(C`qr/A(?{B})C/\*(C'\fR is like +\&\f(CW\*(C`sub {/A/ && do { B } && /C/}\*(C'\fR. So this code now works how you might +expect, creating three regexes that match 0, 1, and 2: +.Sp +.Vb 4 +\& for my $i (0..2) { +\& push @r, qr/^(??{$i})$/; +\& } +\& "1" =~ $r[1]; # matches +.Ve +.IP \(bu 4 +The \f(CW\*(C`use re \*(Aqeval\*(Aq\*(C'\fR pragma is now only required for code blocks defined +at runtime; in particular in the following, the text of the \f(CW$r\fR pattern is +still interpolated into the new pattern and recompiled, but the individual +compiled code-blocks within \f(CW$r\fR are reused rather than being recompiled, +and \f(CW\*(C`use re \*(Aqeval\*(Aq\*(C'\fR isn't needed any more: +.Sp +.Vb 2 +\& my $r = qr/abc(?{....})def/; +\& /xyz$r/; +.Ve +.IP \(bu 4 +Flow control operators no longer crash. Each code block runs in a new +dynamic scope, so \f(CW\*(C`next\*(C'\fR etc. will not see +any enclosing loops. \f(CW\*(C`return\*(C'\fR returns a value +from the code block, not from any enclosing subroutine. +.IP \(bu 4 +Perl normally caches the compilation of run-time patterns, and doesn't +recompile if the pattern hasn't changed, but this is now disabled if +required for the correct behavior of closures. For example: +.Sp +.Vb 5 +\& my $code = \*(Aq(??{$x})\*(Aq; +\& for my $x (1..3) { +\& # recompile to see fresh value of $x each time +\& $x =~ /$code/; +\& } +.Ve +.IP \(bu 4 +The \f(CW\*(C`/msix\*(C'\fR and \f(CW\*(C`(?msix)\*(C'\fR etc. flags are now propagated into the return +value from \f(CW\*(C`(??{})\*(C'\fR; this now works: +.Sp +.Vb 1 +\& "AB" =~ /a(??{\*(Aqb\*(Aq})/i; +.Ve +.IP \(bu 4 +Warnings and errors will appear to come from the surrounding code (or for +run-time code blocks, from an eval) rather than from an \f(CW\*(C`re_eval\*(C'\fR: +.Sp +.Vb 2 +\& use re \*(Aqeval\*(Aq; $c = \*(Aq(?{ warn "foo" })\*(Aq; /$c/; +\& /(?{ warn "foo" })/; +.Ve +.Sp +formerly gave: +.Sp +.Vb 2 +\& foo at (re_eval 1) line 1. +\& foo at (re_eval 2) line 1. +.Ve +.Sp +and now gives: +.Sp +.Vb 2 +\& foo at (eval 1) line 1. +\& foo at /some/prog line 2. +.Ve +.RE +.RS 4 +.RE +.IP \(bu 4 +Perl now can be recompiled to use any Unicode version. In v5.16, it +worked on Unicodes 6.0 and 6.1, but there were various bugs if earlier +releases were used; the older the release the more problems. +.IP \(bu 4 +\&\f(CW\*(C`vec\*(C'\fR no longer produces "uninitialized" warnings in lvalue context +[perl #9423]. +.IP \(bu 4 +An optimization involving fixed strings in regular expressions could cause +a severe performance penalty in edge cases. This has been fixed +[perl #76546]. +.IP \(bu 4 +In certain cases, including empty subpatterns within a regular expression (such +as \f(CW\*(C`(?:)\*(C'\fR or \f(CW\*(C`(?:|)\*(C'\fR) could disable some optimizations. This has been fixed. +.IP \(bu 4 +The "Can't find an opnumber" message that \f(CW\*(C`prototype\*(C'\fR produces when passed +a string like "CORE::nonexistent_keyword" now passes UTF\-8 and embedded +NULs through unchanged [perl #97478]. +.IP \(bu 4 +\&\f(CW\*(C`prototype\*(C'\fR now treats magical variables like \f(CW$1\fR the same way as +non-magical variables when checking for the CORE:: prefix, instead of +treating them as subroutine names. +.IP \(bu 4 +Under threaded perls, a runtime code block in a regular expression could +corrupt the package name stored in the op tree, resulting in bad reads +in \f(CW\*(C`caller\*(C'\fR, and possibly crashes [perl #113060]. +.IP \(bu 4 +Referencing a closure prototype (\f(CW\*(C`\e&{$_[1]}\*(C'\fR in an attribute handler for a +closure) no longer results in a copy of the subroutine (or assertion +failures on debugging builds). +.IP \(bu 4 +\&\f(CW\*(C`eval \*(Aq_\|_PACKAGE_\|_\*(Aq\*(C'\fR now returns the right answer on threaded builds if +the current package has been assigned over (as in +\&\f(CW\*(C`*ThisPackage:: = *ThatPackage::\*(C'\fR) [perl #78742]. +.IP \(bu 4 +If a package is deleted by code that it calls, it is possible for \f(CW\*(C`caller\*(C'\fR +to see a stack frame belonging to that deleted package. \f(CW\*(C`caller\*(C'\fR could +crash if the stash's memory address was reused for a scalar and a +substitution was performed on the same scalar [perl #113486]. +.IP \(bu 4 +\&\f(CW\*(C`UNIVERSAL::can\*(C'\fR no longer treats its first argument differently +depending on whether it is a string or number internally. +.IP \(bu 4 +\&\f(CW\*(C`open\*(C'\fR with \f(CW\*(C`<&\*(C'\fR for the mode checks to see whether the third argument is +a number, in determining whether to treat it as a file descriptor or a handle +name. Magical variables like \f(CW$1\fR were always failing the numeric check and +being treated as handle names. +.IP \(bu 4 +\&\f(CW\*(C`warn\*(C'\fR's handling of magical variables (\f(CW$1\fR, ties) has undergone several +fixes. \f(CW\*(C`FETCH\*(C'\fR is only called once now on a tied argument or a tied \f(CW$@\fR +[perl #97480]. Tied variables returning objects that stringify as "" are +no longer ignored. A tied \f(CW$@\fR that happened to return a reference the +\&\fIprevious\fR time it was used is no longer ignored. +.IP \(bu 4 +\&\f(CW\*(C`warn ""\*(C'\fR now treats \f(CW$@\fR with a number in it the same way, regardless of +whether it happened via \f(CW\*(C`$@=3\*(C'\fR or \f(CW\*(C`$@="3"\*(C'\fR. It used to ignore the +former. Now it appends "\et...caught", as it has always done with +\&\f(CW\*(C`$@="3"\*(C'\fR. +.IP \(bu 4 +Numeric operators on magical variables (e.g., \f(CW\*(C`$1\ +\ 1\*(C'\fR) used to use +floating point operations even where integer operations were more appropriate, +resulting in loss of accuracy on 64\-bit platforms [perl #109542]. +.IP \(bu 4 +Unary negation no longer treats a string as a number if the string happened +to be used as a number at some point. So, if \f(CW$x\fR contains the string "dogs", +\&\f(CW\*(C`\-$x\*(C'\fR returns "\-dogs" even if \f(CW\*(C`$y=0+$x\*(C'\fR has happened at some point. +.IP \(bu 4 +In Perl v5.14, \f(CW\*(C`\-\*(Aq\-10\*(Aq\*(C'\fR was fixed to return "10", not "+10". But magical +variables (\f(CW$1\fR, ties) were not fixed till now [perl #57706]. +.IP \(bu 4 +Unary negation now treats strings consistently, regardless of the internal +\&\f(CW\*(C`UTF8\*(C'\fR flag. +.IP \(bu 4 +A regression introduced in Perl v5.16.0 involving +\&\f(CW\*(C`tr/\fR\f(CISEARCHLIST\fR\f(CW/\fR\f(CIREPLACEMENTLIST\fR\f(CW/\*(C'\fR has been fixed. Only the first +instance is supposed to be meaningful if a character appears more than +once in \f(CW\*(C`\fR\f(CISEARCHLIST\fR\f(CW\*(C'\fR. Under some circumstances, the final instance +was overriding all earlier ones. [perl #113584] +.IP \(bu 4 +Regular expressions like \f(CW\*(C`qr/\e87/\*(C'\fR previously silently inserted a NUL +character, thus matching as if it had been written \f(CW\*(C`qr/\e00087/\*(C'\fR. Now it +matches as if it had been written as \f(CW\*(C`qr/87/\*(C'\fR, with a message that the +sequence \f(CW"\e8"\fR is unrecognized. +.IP \(bu 4 +\&\f(CW\*(C`_\|_SUB_\|_\*(C'\fR now works in special blocks (\f(CW\*(C`BEGIN\*(C'\fR, \f(CW\*(C`END\*(C'\fR, etc.). +.IP \(bu 4 +Thread creation on Windows could theoretically result in a crash if done +inside a \f(CW\*(C`BEGIN\*(C'\fR block. It still does not work properly, but it no longer +crashes [perl #111610]. +.IP \(bu 4 +\&\f(CW\*(C`\e&{\*(Aq\*(Aq}\*(C'\fR (with the empty string) now autovivifies a stub like any other +sub name, and no longer produces the "Unable to create sub" error +[perl #94476]. +.IP \(bu 4 +A regression introduced in v5.14.0 has been fixed, in which some calls +to the \f(CW\*(C`re\*(C'\fR module would clobber \f(CW$_\fR [perl #113750]. +.IP \(bu 4 +\&\f(CW\*(C`do FILE\*(C'\fR now always either sets or clears \f(CW$@\fR, even when the file can't be +read. This ensures that testing \f(CW$@\fR first (as recommended by the +documentation) always returns the correct result. +.IP \(bu 4 +The array iterator used for the \f(CW\*(C`each @array\*(C'\fR construct is now correctly +reset when \f(CW@array\fR is cleared [perl #75596]. This happens, for example, when +the array is globally assigned to, as in \f(CW\*(C`@array = (...)\*(C'\fR, but not when its +\&\fBvalues\fR are assigned to. In terms of the XS API, it means that \f(CWav_clear()\fR +will now reset the iterator. +.Sp +This mirrors the behaviour of the hash iterator when the hash is cleared. +.IP \(bu 4 +\&\f(CW\*(C`$class\->can\*(C'\fR, \f(CW\*(C`$class\->isa\*(C'\fR, and \f(CW\*(C`$class\->DOES\*(C'\fR now return +correct results, regardless of whether that package referred to by \f(CW$class\fR +exists [perl #47113]. +.IP \(bu 4 +Arriving signals no longer clear \f(CW$@\fR [perl #45173]. +.IP \(bu 4 +Allow \f(CW\*(C`my ()\*(C'\fR declarations with an empty variable list [perl #113554]. +.IP \(bu 4 +During parsing, subs declared after errors no longer leave stubs +[perl #113712]. +.IP \(bu 4 +Closures containing no string evals no longer hang on to their containing +subroutines, allowing variables closed over by outer subroutines to be +freed when the outer sub is freed, even if the inner sub still exists +[perl #89544]. +.IP \(bu 4 +Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode +stopped working properly in v5.16.0. It was causing the new handle to +reference a different scalar variable. This has been fixed [perl #113764]. +.IP \(bu 4 +\&\f(CW\*(C`qr//\*(C'\fR expressions no longer crash with custom regular expression engines +that do not set \f(CW\*(C`offs\*(C'\fR at regular expression compilation time +[perl #112962]. +.IP \(bu 4 +\&\f(CW\*(C`delete local\*(C'\fR no longer crashes with certain magical arrays and hashes +[perl #112966]. +.IP \(bu 4 +\&\f(CW\*(C`local\*(C'\fR on elements of certain magical arrays and hashes used not to +arrange to have the element deleted on scope exit, even if the element did +not exist before \f(CW\*(C`local\*(C'\fR. +.IP \(bu 4 +\&\f(CWscalar(write)\fR no longer returns multiple items [perl #73690]. +.IP \(bu 4 +String to floating point conversions no longer misparse certain strings under +\&\f(CW\*(C`use locale\*(C'\fR [perl #109318]. +.IP \(bu 4 +\&\f(CW@INC\fR filters that die no longer leak memory [perl #92252]. +.IP \(bu 4 +The implementations of overloaded operations are now called in the correct +context. This allows, among other things, being able to properly override +\&\f(CW\*(C`<>\*(C'\fR [perl #47119]. +.IP \(bu 4 +Specifying only the \f(CW\*(C`fallback\*(C'\fR key when calling \f(CW\*(C`use overload\*(C'\fR now behaves +properly [perl #113010]. +.IP \(bu 4 +\&\f(CW\*(C`sub foo { my $a = 0; while ($a) { ... } }\*(C'\fR and +\&\f(CW\*(C`sub foo { while (0) { ... } }\*(C'\fR now return the same thing [perl #73618]. +.IP \(bu 4 +String negation now behaves the same under \f(CW\*(C`use integer;\*(C'\fR as it does +without [perl #113012]. +.IP \(bu 4 +\&\f(CW\*(C`chr\*(C'\fR now returns the Unicode replacement character (U+FFFD) for \-1, +regardless of the internal representation. \-1 used to wrap if the argument +was tied or a string internally. +.IP \(bu 4 +Using a \f(CW\*(C`format\*(C'\fR after its enclosing sub was freed could crash as of +perl v5.12.0, if the format referenced lexical variables from the outer sub. +.IP \(bu 4 +Using a \f(CW\*(C`format\*(C'\fR after its enclosing sub was undefined could crash as of +perl v5.10.0, if the format referenced lexical variables from the outer sub. +.IP \(bu 4 +Using a \f(CW\*(C`format\*(C'\fR defined inside a closure, which format references +lexical variables from outside, never really worked unless the \f(CW\*(C`write\*(C'\fR +call was directly inside the closure. In v5.10.0 it even started crashing. +Now the copy of that closure nearest the top of the call stack is used to +find those variables. +.IP \(bu 4 +Formats that close over variables in special blocks no longer crash if a +stub exists with the same name as the special block before the special +block is compiled. +.IP \(bu 4 +The parser no longer gets confused, treating \f(CW\*(C`eval foo ()\*(C'\fR as a syntax +error if preceded by \f(CW\*(C`print;\*(C'\fR [perl #16249]. +.IP \(bu 4 +The return value of \f(CW\*(C`syscall\*(C'\fR is no longer truncated on 64\-bit platforms +[perl #113980]. +.IP \(bu 4 +Constant folding no longer causes \f(CW\*(C`print 1 ? FOO : BAR\*(C'\fR to print to the +FOO handle [perl #78064]. +.IP \(bu 4 +\&\f(CW\*(C`do subname\*(C'\fR now calls the named subroutine and uses the file name it +returns, instead of opening a file named "subname". +.IP \(bu 4 +Subroutines looked up by rv2cv check hooks (registered by XS modules) are +now taken into consideration when determining whether \f(CW\*(C`foo bar\*(C'\fR should be +the sub call \f(CWfoo(bar)\fR or the method call \f(CW\*(C`"bar"\->foo\*(C'\fR. +.IP \(bu 4 +\&\f(CW\*(C`CORE::foo::bar\*(C'\fR is no longer treated specially, allowing global overrides +to be called directly via \f(CWCORE::GLOBAL::uc(...)\fR [perl #113016]. +.IP \(bu 4 +Calling an undefined sub whose typeglob has been undefined now produces the +customary "Undefined subroutine called" error, instead of "Not a CODE +reference". +.IP \(bu 4 +Two bugs involving \f(CW@ISA\fR have been fixed. \f(CW\*(C`*ISA = *glob_without_array\*(C'\fR and +\&\f(CW\*(C`undef *ISA; @{*ISA}\*(C'\fR would prevent future modifications to \f(CW@ISA\fR from +updating the internal caches used to look up methods. The +*glob_without_array case was a regression from Perl v5.12. +.IP \(bu 4 +Regular expression optimisations sometimes caused \f(CW\*(C`$\*(C'\fR with \f(CW\*(C`/m\*(C'\fR to +produce failed or incorrect matches [perl #114068]. +.IP \(bu 4 +\&\f(CW\*(C`_\|_SUB_\|_\*(C'\fR now works in a \f(CW\*(C`sort\*(C'\fR block when the enclosing subroutine is +predeclared with \f(CW\*(C`sub foo;\*(C'\fR syntax [perl #113710]. +.IP \(bu 4 +Unicode properties only apply to Unicode code points, which leads to +some subtleties when regular expressions are matched against +above-Unicode code points. There is a warning generated to draw your +attention to this. However, this warning was being generated +inappropriately in some cases, such as when a program was being parsed. +Non-Unicode matches such as \f(CW\*(C`\ew\*(C'\fR and \f(CW\*(C`[:word:]\*(C'\fR should not generate the +warning, as their definitions don't limit them to apply to only Unicode +code points. Now the message is only generated when matching against +\&\f(CW\*(C`\ep{}\*(C'\fR and \f(CW\*(C`\eP{}\*(C'\fR. There remains a bug, [perl #114148], for the very +few properties in Unicode that match just a single code point. The +warning is not generated if they are matched against an above-Unicode +code point. +.IP \(bu 4 +Uninitialized warnings mentioning hash elements would only mention the +element name if it was not in the first bucket of the hash, due to an +off-by-one error. +.IP \(bu 4 +A regular expression optimizer bug could cause multiline "^" to behave +incorrectly in the presence of line breaks, such that +\&\f(CW\*(C`"/\en\en" =~ m#\eA(?:^/$)#im\*(C'\fR would not match [perl #115242]. +.IP \(bu 4 +Failed \f(CW\*(C`fork\*(C'\fR in list context no longer corrupts the stack. +\&\f(CW\*(C`@a = (1, 2, fork, 3)\*(C'\fR used to gobble up the 2 and assign \f(CW\*(C`(1, undef, 3)\*(C'\fR +if the \f(CW\*(C`fork\*(C'\fR call failed. +.IP \(bu 4 +Numerous memory leaks have been fixed, mostly involving tied variables that +die, regular expression character classes and code blocks, and syntax +errors. +.IP \(bu 4 +Assigning a regular expression (\f(CW\*(C`${qr//}\*(C'\fR) to a variable that happens to +hold a floating point number no longer causes assertion failures on +debugging builds. +.IP \(bu 4 +Assigning a regular expression to a scalar containing a number no longer +causes subsequent numification to produce random numbers. +.IP \(bu 4 +Assigning a regular expression to a magic variable no longer wipes away the +magic. This was a regression from v5.10. +.IP \(bu 4 +Assigning a regular expression to a blessed scalar no longer results in +crashes. This was also a regression from v5.10. +.IP \(bu 4 +Regular expression can now be assigned to tied hash and array elements with +flattening into strings. +.IP \(bu 4 +Numifying a regular expression no longer results in an uninitialized +warning. +.IP \(bu 4 +Negative array indices no longer cause EXISTS methods of tied variables to +be ignored. This was a regression from v5.12. +.IP \(bu 4 +Negative array indices no longer result in crashes on arrays tied to +non-objects. +.IP \(bu 4 +\&\f(CW\*(C`$byte_overload .= $utf8\*(C'\fR no longer results in doubly-encoded UTF\-8 if the +left-hand scalar happened to have produced a UTF\-8 string the last time +overloading was invoked. +.IP \(bu 4 +\&\f(CW\*(C`goto &sub\*(C'\fR now uses the current value of \f(CW@_\fR, instead of using the array +the subroutine was originally called with. This means +\&\f(CW\*(C`local @_ = (...); goto &sub\*(C'\fR now works [perl #43077]. +.IP \(bu 4 +If a debugger is invoked recursively, it no longer stomps on its own +lexical variables. Formerly under recursion all calls would share the same +set of lexical variables [perl #115742]. +.IP \(bu 4 +\&\f(CW*_{ARRAY}\fR returned from a subroutine no longer spontaneously +becomes empty. +.IP \(bu 4 +When using \f(CW\*(C`say\*(C'\fR to print to a tied filehandle, the value of \f(CW\*(C`$\e\*(C'\fR is +correctly localized, even if it was previously undef. [perl #119927] +.SH "Known Problems" +.IX Header "Known Problems" +.IP \(bu 4 +UTF8\-flagged strings in \f(CW%ENV\fR on HP-UX 11.00 are buggy +.Sp +The interaction of UTF8\-flagged strings and \f(CW%ENV\fR on HP-UX 11.00 is +currently dodgy in some not-yet-fully-diagnosed way. Expect test +failures in \fIt/op/magic.t\fR, followed by unknown behavior when storing +wide characters in the environment. +.SH Obituary +.IX Header "Obituary" +Hojung Yoon (AMORETTE), 24, of Seoul, South Korea, went to his long rest +on May 8, 2013 with llama figurine and autographed TIMTOADY card. He +was a brilliant young Perl 5 & 6 hacker and a devoted member of +Seoul.pm. He programmed Perl, talked Perl, ate Perl, and loved Perl. We +believe that he is still programming in Perl with his broken IBM laptop +somewhere. He will be missed. +.SH Acknowledgements +.IX Header "Acknowledgements" +Perl v5.18.0 represents approximately 12 months of development since +Perl v5.16.0 and contains approximately 400,000 lines of changes across +2,100 files from 113 authors. +.PP +Perl continues to flourish into its third decade thanks to a vibrant +community of users and developers. The following people are known to +have contributed the improvements that became Perl v5.18.0: +.PP +Aaron Crane, Aaron Trevena, Abhijit Menon-Sen, Adrian M. Enache, Alan +Haggai Alavi, Alexandr Ciornii, Andrew Tam, Andy Dougherty, Anton Nikishaev, +Aristotle Pagaltzis, Augustina Blair, Bob Ernst, Brad Gilbert, Breno G. de +Oliveira, Brian Carlson, Brian Fraser, Charlie Gonzalez, Chip Salzenberg, Chris +\&'BinGOs' Williams, Christian Hansen, Colin Kuskie, Craig A. Berry, Dagfinn +Ilmari Mannsåker, Daniel Dragan, Daniel Perrett, Darin McBride, Dave Rolsky, +David Golden, David Leadbeater, David Mitchell, David Nicol, Dominic +Hargreaves, E. Choroba, Eric Brine, Evan Miller, Father Chrysostomos, Florian +Ragwitz, François Perrad, George Greer, Goro Fuji, H.Merijn Brand, Herbert +Breunung, Hugo van der Sanden, Igor Zaytsev, James E Keenan, Jan Dubois, +Jasmine Ahuja, Jerry D. Hedden, Jess Robinson, Jesse Luehrs, Joaquin Ferrero, +Joel Berger, John Goodyear, John Peacock, Karen Etheridge, Karl Williamson, +Karthik Rajagopalan, Kent Fredric, Leon Timmermans, Lucas Holt, Lukas Mai, +Marcus Holland-Moritz, Markus Jansen, Martin Hasch, Matthew Horsfall, Max +Maischein, Michael G Schwern, Michael Schroeder, Moritz Lenz, Nicholas Clark, +Niko Tyni, Oleg Nesterov, Patrik Hägglund, Paul Green, Paul Johnson, Paul +Marquess, Peter Martini, Rafael Garcia-Suarez, Reini Urban, Renee Baecker, +Rhesa Rozendaal, Ricardo Signes, Robin Barker, Ronald J. Kimball, Ruslan +Zakirov, Salvador Fandiño, Sawyer X, Scott Lanning, Sergey Alekseev, Shawn M +Moore, Shirakata Kentaro, Shlomi Fish, Sisyphus, Smylers, Steffen Müller, +Steve Hay, Steve Peters, Steven Schubiger, Sullivan Beck, Sven Strickroth, +Sébastien Aperghis-Tramoni, Thomas Sibley, Tobias Leich, Tom Wyant, Tony Cook, +Vadim Konovalov, Vincent Pit, Volker Schatz, Walt Mankowski, Yves Orton, +Zefram. +.PP +The list above is almost certainly incomplete as it is automatically generated +from version control history. In particular, it does not include the names of +the (very much appreciated) contributors who reported issues to the Perl bug +tracker. +.PP +Many of the changes included in this version originated in the CPAN modules +included in Perl's core. We're grateful to the entire CPAN community for +helping Perl to flourish. +.PP +For a more complete list of all of Perl's historical contributors, please see +the \fIAUTHORS\fR file in the Perl source distribution. +.SH "Reporting Bugs" +.IX Header "Reporting Bugs" +If you find what you think is a bug, you might check the articles recently +posted to the comp.lang.perl.misc newsgroup and the perl bug database at +http://rt.perl.org/perlbug/ . There may also be information at +http://www.perl.org/ , the Perl Home Page. +.PP +If you believe you have an unreported bug, please run the perlbug program +included with your release. Be sure to trim your bug down to a tiny but +sufficient test case. Your bug report, along with the output of \f(CW\*(C`perl \-V\*(C'\fR, +will be sent off to perlbug@perl.org to be analysed by the Perl porting team. +.PP +If the bug you are reporting has security implications, which make it +inappropriate to send to a publicly archived mailing list, then please send it +to perl5\-security\-report@perl.org. This points to a closed subscription +unarchived mailing list, which includes all the core committers, who will be +able to help assess the impact of issues, figure out a resolution, and help +co-ordinate the release of patches to mitigate or fix the problem across all +platforms on which Perl is supported. Please only use this address for +security issues in the Perl core, not for modules independently distributed on +CPAN. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +The \fIChanges\fR file for an explanation of how to view exhaustive details on +what changed. +.PP +The \fIINSTALL\fR file for how to build Perl. +.PP +The \fIREADME\fR file for general stuff. +.PP +The \fIArtistic\fR and \fICopying\fR files for copyright information. -- cgit v1.2.3