xref: /openbsd/gnu/usr.bin/perl/pod/perl5180delta.pod (revision 256a93a4)
191f110e0Safresh1=encoding utf8
291f110e0Safresh1
391f110e0Safresh1=head1 NAME
491f110e0Safresh1
591f110e0Safresh1perl5180delta - what is new for perl v5.18.0
691f110e0Safresh1
791f110e0Safresh1=head1 DESCRIPTION
891f110e0Safresh1
991f110e0Safresh1This document describes differences between the v5.16.0 release and the v5.18.0
1091f110e0Safresh1release.
1191f110e0Safresh1
1291f110e0Safresh1If you are upgrading from an earlier release such as v5.14.0, first read
1391f110e0Safresh1L<perl5160delta>, which describes differences between v5.14.0 and v5.16.0.
1491f110e0Safresh1
1591f110e0Safresh1=head1 Core Enhancements
1691f110e0Safresh1
1791f110e0Safresh1=head2 New mechanism for experimental features
1891f110e0Safresh1
1991f110e0Safresh1Newly-added experimental features will now require this incantation:
2091f110e0Safresh1
2191f110e0Safresh1    no warnings "experimental::feature_name";
2291f110e0Safresh1    use feature "feature_name";  # would warn without the prev line
2391f110e0Safresh1
2491f110e0Safresh1There is a new warnings category, called "experimental", containing
2591f110e0Safresh1warnings that the L<feature> pragma emits when enabling experimental
2691f110e0Safresh1features.
2791f110e0Safresh1
2891f110e0Safresh1Newly-added experimental features will also be given special warning IDs,
2991f110e0Safresh1which consist of "experimental::" followed by the name of the feature.  (The
3091f110e0Safresh1plan is to extend this mechanism eventually to all warnings, to allow them
3191f110e0Safresh1to be enabled or disabled individually, and not just by category.)
3291f110e0Safresh1
3391f110e0Safresh1By saying
3491f110e0Safresh1
3591f110e0Safresh1    no warnings "experimental::feature_name";
3691f110e0Safresh1
3791f110e0Safresh1you are taking responsibility for any breakage that future changes to, or
3891f110e0Safresh1removal of, the feature may cause.
3991f110e0Safresh1
4091f110e0Safresh1Since some features (like C<~~> or C<my $_>) now emit experimental warnings,
4191f110e0Safresh1and you may want to disable them in code that is also run on perls that do not
4291f110e0Safresh1recognize these warning categories, consider using the C<if> pragma like this:
4391f110e0Safresh1
4491f110e0Safresh1    no if $] >= 5.018, warnings => "experimental::feature_name";
4591f110e0Safresh1
4691f110e0Safresh1Existing experimental features may begin emitting these warnings, too.  Please
4791f110e0Safresh1consult L<perlexperiment> for information on which features are considered
4891f110e0Safresh1experimental.
4991f110e0Safresh1
5091f110e0Safresh1=head2 Hash overhaul
5191f110e0Safresh1
5291f110e0Safresh1Changes to the implementation of hashes in perl v5.18.0 will be one of the most
5391f110e0Safresh1visible changes to the behavior of existing code.
5491f110e0Safresh1
5591f110e0Safresh1By default, two distinct hash variables with identical keys and values may now
5691f110e0Safresh1provide their contents in a different order where it was previously identical.
5791f110e0Safresh1
5891f110e0Safresh1When encountering these changes, the key to cleaning up from them is to accept
5991f110e0Safresh1that B<hashes are unordered collections> and to act accordingly.
6091f110e0Safresh1
6191f110e0Safresh1=head3 Hash randomization
6291f110e0Safresh1
6391f110e0Safresh1The seed used by Perl's hash function is now random.  This means that the
6491f110e0Safresh1order which keys/values will be returned from functions like C<keys()>,
6591f110e0Safresh1C<values()>, and C<each()> will differ from run to run.
6691f110e0Safresh1
6791f110e0Safresh1This change was introduced to make Perl's hashes more robust to algorithmic
6891f110e0Safresh1complexity attacks, and also because we discovered that it exposes hash
6991f110e0Safresh1ordering dependency bugs and makes them easier to track down.
7091f110e0Safresh1
7191f110e0Safresh1Toolchain maintainers might want to invest in additional infrastructure to
7291f110e0Safresh1test for things like this.  Running tests several times in a row and then
7391f110e0Safresh1comparing results will make it easier to spot hash order dependencies in
7491f110e0Safresh1code.  Authors are strongly encouraged not to expose the key order of
7591f110e0Safresh1Perl's hashes to insecure audiences.
7691f110e0Safresh1
7791f110e0Safresh1Further, every hash has its own iteration order, which should make it much
7891f110e0Safresh1more difficult to determine what the current hash seed is.
7991f110e0Safresh1
8091f110e0Safresh1=head3 New hash functions
8191f110e0Safresh1
8291f110e0Safresh1Perl v5.18 includes support for multiple hash functions, and changed
8391f110e0Safresh1the default (to ONE_AT_A_TIME_HARD), you can choose a different
8491f110e0Safresh1algorithm by defining a symbol at compile time.  For a current list,
8591f110e0Safresh1consult the F<INSTALL> document.  Note that as of Perl v5.18 we can
8691f110e0Safresh1only recommend use of the default or SIPHASH. All the others are
8791f110e0Safresh1known to have security issues and are for research purposes only.
8891f110e0Safresh1
8991f110e0Safresh1=head3 PERL_HASH_SEED environment variable now takes a hex value
9091f110e0Safresh1
9191f110e0Safresh1C<PERL_HASH_SEED> no longer accepts an integer as a parameter;
9291f110e0Safresh1instead the value is expected to be a binary value encoded in a hex
9391f110e0Safresh1string, such as "0xf5867c55039dc724".  This is to make the
9491f110e0Safresh1infrastructure support hash seeds of arbitrary lengths, which might
9591f110e0Safresh1exceed that of an integer.  (SipHash uses a 16 byte seed.)
9691f110e0Safresh1
9791f110e0Safresh1=head3 PERL_PERTURB_KEYS environment variable added
9891f110e0Safresh1
9991f110e0Safresh1The C<PERL_PERTURB_KEYS> environment variable allows one to control the level of
10091f110e0Safresh1randomization applied to C<keys> and friends.
10191f110e0Safresh1
10291f110e0Safresh1When C<PERL_PERTURB_KEYS> is 0, perl will not randomize the key order at all. The
10391f110e0Safresh1chance that C<keys> changes due to an insert will be the same as in previous
10491f110e0Safresh1perls, basically only when the bucket size is changed.
10591f110e0Safresh1
10691f110e0Safresh1When C<PERL_PERTURB_KEYS> is 1, perl will randomize keys in a non-repeatable
10791f110e0Safresh1way. The chance that C<keys> changes due to an insert will be very high.  This
10891f110e0Safresh1is the most secure and default mode.
10991f110e0Safresh1
11091f110e0Safresh1When C<PERL_PERTURB_KEYS> is 2, perl will randomize keys in a repeatable way.
11191f110e0Safresh1Repeated runs of the same program should produce the same output every time.
11291f110e0Safresh1
11391f110e0Safresh1C<PERL_HASH_SEED> implies a non-default C<PERL_PERTURB_KEYS> setting. Setting
11491f110e0Safresh1C<PERL_HASH_SEED=0> (exactly one 0) implies C<PERL_PERTURB_KEYS=0> (hash key
1156fb12b70Safresh1randomization disabled); setting C<PERL_HASH_SEED> to any other value implies
11691f110e0Safresh1C<PERL_PERTURB_KEYS=2> (deterministic and repeatable hash key randomization).
11791f110e0Safresh1Specifying C<PERL_PERTURB_KEYS> explicitly to a different level overrides this
11891f110e0Safresh1behavior.
11991f110e0Safresh1
12091f110e0Safresh1=head3 Hash::Util::hash_seed() now returns a string
12191f110e0Safresh1
12291f110e0Safresh1Hash::Util::hash_seed() now returns a string instead of an integer.  This
12391f110e0Safresh1is to make the infrastructure support hash seeds of arbitrary lengths
12491f110e0Safresh1which might exceed that of an integer.  (SipHash uses a 16 byte seed.)
12591f110e0Safresh1
12691f110e0Safresh1=head3 Output of PERL_HASH_SEED_DEBUG has been changed
12791f110e0Safresh1
12891f110e0Safresh1The environment variable PERL_HASH_SEED_DEBUG now makes perl show both the
12991f110e0Safresh1hash function perl was built with, I<and> the seed, in hex, in use for that
13091f110e0Safresh1process. Code parsing this output, should it exist, must change to accommodate
13191f110e0Safresh1the new format.  Example of the new format:
13291f110e0Safresh1
13391f110e0Safresh1    $ PERL_HASH_SEED_DEBUG=1 ./perl -e1
13491f110e0Safresh1    HASH_FUNCTION = MURMUR3 HASH_SEED = 0x1476bb9f
13591f110e0Safresh1
13691f110e0Safresh1=head2 Upgrade to Unicode 6.2
13791f110e0Safresh1
13891f110e0Safresh1Perl now supports Unicode 6.2.  A list of changes from Unicode
13991f110e0Safresh16.1 is at L<http://www.unicode.org/versions/Unicode6.2.0>.
14091f110e0Safresh1
14191f110e0Safresh1=head2 Character name aliases may now include non-Latin1-range characters
14291f110e0Safresh1
14391f110e0Safresh1It is possible to define your own names for characters for use in
14491f110e0Safresh1C<\N{...}>, C<charnames::vianame()>, etc.  These names can now be
14591f110e0Safresh1comprised of characters from the whole Unicode range.  This allows for
14691f110e0Safresh1names to be in your native language, and not just English.  Certain
14791f110e0Safresh1restrictions apply to the characters that may be used (you can't define
14891f110e0Safresh1a name that has punctuation in it, for example).  See L<charnames/CUSTOM
14991f110e0Safresh1ALIASES>.
15091f110e0Safresh1
15191f110e0Safresh1=head2 New DTrace probes
15291f110e0Safresh1
15391f110e0Safresh1The following new DTrace probes have been added:
15491f110e0Safresh1
15591f110e0Safresh1=over 4
15691f110e0Safresh1
15791f110e0Safresh1=item *
15891f110e0Safresh1
15991f110e0Safresh1C<op-entry>
16091f110e0Safresh1
16191f110e0Safresh1=item *
16291f110e0Safresh1
16391f110e0Safresh1C<loading-file>
16491f110e0Safresh1
16591f110e0Safresh1=item *
16691f110e0Safresh1
16791f110e0Safresh1C<loaded-file>
16891f110e0Safresh1
16991f110e0Safresh1=back
17091f110e0Safresh1
17191f110e0Safresh1=head2 C<${^LAST_FH}>
17291f110e0Safresh1
17391f110e0Safresh1This new variable provides access to the filehandle that was last read.
17491f110e0Safresh1This is the handle used by C<$.> and by C<tell> and C<eof> without
17591f110e0Safresh1arguments.
17691f110e0Safresh1
17791f110e0Safresh1=head2 Regular Expression Set Operations
17891f110e0Safresh1
17991f110e0Safresh1This is an B<experimental> feature to allow matching against the union,
18091f110e0Safresh1intersection, etc., of sets of code points, similar to
18191f110e0Safresh1L<Unicode::Regex::Set>.  It can also be used to extend C</x> processing
18291f110e0Safresh1to [bracketed] character classes, and as a replacement of user-defined
18391f110e0Safresh1properties, allowing more complex expressions than they do.  See
18491f110e0Safresh1L<perlrecharclass/Extended Bracketed Character Classes>.
18591f110e0Safresh1
18691f110e0Safresh1=head2 Lexical subroutines
18791f110e0Safresh1
18891f110e0Safresh1This new feature is still considered B<experimental>.  To enable it:
18991f110e0Safresh1
19091f110e0Safresh1    use 5.018;
19191f110e0Safresh1    no warnings "experimental::lexical_subs";
19291f110e0Safresh1    use feature "lexical_subs";
19391f110e0Safresh1
19491f110e0Safresh1You can now declare subroutines with C<state sub foo>, C<my sub foo>, and
19591f110e0Safresh1C<our sub foo>.  (C<state sub> requires that the "state" feature be
19691f110e0Safresh1enabled, unless you write it as C<CORE::state sub foo>.)
19791f110e0Safresh1
19891f110e0Safresh1C<state sub> creates a subroutine visible within the lexical scope in which
19991f110e0Safresh1it is declared.  The subroutine is shared between calls to the outer sub.
20091f110e0Safresh1
20191f110e0Safresh1C<my sub> declares a lexical subroutine that is created each time the
20291f110e0Safresh1enclosing block is entered.  C<state sub> is generally slightly faster than
20391f110e0Safresh1C<my sub>.
20491f110e0Safresh1
20591f110e0Safresh1C<our sub> declares a lexical alias to the package subroutine of the same
20691f110e0Safresh1name.
20791f110e0Safresh1
20891f110e0Safresh1For more information, see L<perlsub/Lexical Subroutines>.
20991f110e0Safresh1
21091f110e0Safresh1=head2 Computed Labels
21191f110e0Safresh1
21291f110e0Safresh1The loop controls C<next>, C<last> and C<redo>, and the special C<dump>
21391f110e0Safresh1operator, now allow arbitrary expressions to be used to compute labels at run
21491f110e0Safresh1time.  Previously, any argument that was not a constant was treated as the
21591f110e0Safresh1empty string.
21691f110e0Safresh1
21791f110e0Safresh1=head2 More CORE:: subs
21891f110e0Safresh1
21991f110e0Safresh1Several more built-in functions have been added as subroutines to the
22091f110e0Safresh1CORE:: namespace - namely, those non-overridable keywords that can be
22191f110e0Safresh1implemented without custom parsers: C<defined>, C<delete>, C<exists>,
2226fb12b70Safresh1C<glob>, C<pos>, C<prototype>, C<scalar>, C<split>, C<study>, and C<undef>.
22391f110e0Safresh1
22491f110e0Safresh1As some of these have prototypes, C<prototype('CORE::...')> has been
22591f110e0Safresh1changed to not make a distinction between overridable and non-overridable
22691f110e0Safresh1keywords.  This is to make C<prototype('CORE::pos')> consistent with
22791f110e0Safresh1C<prototype(&CORE::pos)>.
22891f110e0Safresh1
22991f110e0Safresh1=head2 C<kill> with negative signal names
23091f110e0Safresh1
23191f110e0Safresh1C<kill> has always allowed a negative signal number, which kills the
23291f110e0Safresh1process group instead of a single process.  It has also allowed signal
23391f110e0Safresh1names.  But it did not behave consistently, because negative signal names
23491f110e0Safresh1were treated as 0.  Now negative signals names like C<-INT> are supported
23591f110e0Safresh1and treated the same way as -2 [perl #112990].
23691f110e0Safresh1
23791f110e0Safresh1=head1 Security
23891f110e0Safresh1
23991f110e0Safresh1=head2 See also: hash overhaul
24091f110e0Safresh1
24191f110e0Safresh1Some of the changes in the L<hash overhaul|/"Hash overhaul"> were made to
24291f110e0Safresh1enhance security.  Please read that section.
24391f110e0Safresh1
24491f110e0Safresh1=head2 C<Storable> security warning in documentation
24591f110e0Safresh1
24691f110e0Safresh1The documentation for C<Storable> now includes a section which warns readers
24791f110e0Safresh1of the danger of accepting Storable documents from untrusted sources. The
24891f110e0Safresh1short version is that deserializing certain types of data can lead to loading
24991f110e0Safresh1modules and other code execution. This is documented behavior and wanted
25091f110e0Safresh1behavior, but this opens an attack vector for malicious entities.
25191f110e0Safresh1
25291f110e0Safresh1=head2 C<Locale::Maketext> allowed code injection via a malicious template
25391f110e0Safresh1
25491f110e0Safresh1If users could provide a translation string to Locale::Maketext, this could be
25591f110e0Safresh1used to invoke arbitrary Perl subroutines available in the current process.
25691f110e0Safresh1
25791f110e0Safresh1This has been fixed, but it is still possible to invoke any method provided by
25891f110e0Safresh1C<Locale::Maketext> itself or a subclass that you are using. One of these
25991f110e0Safresh1methods in turn will invoke the Perl core's C<sprintf> subroutine.
26091f110e0Safresh1
26191f110e0Safresh1In summary, allowing users to provide translation strings without auditing
26291f110e0Safresh1them is a bad idea.
26391f110e0Safresh1
26491f110e0Safresh1This vulnerability is documented in CVE-2012-6329.
26591f110e0Safresh1
26691f110e0Safresh1=head2 Avoid calling memset with a negative count
26791f110e0Safresh1
26891f110e0Safresh1Poorly written perl code that allows an attacker to specify the count to perl's
26991f110e0Safresh1C<x> string repeat operator can already cause a memory exhaustion
27091f110e0Safresh1denial-of-service attack. A flaw in versions of perl before v5.15.5 can escalate
27191f110e0Safresh1that into a heap buffer overrun; coupled with versions of glibc before 2.16, it
27291f110e0Safresh1possibly allows the execution of arbitrary code.
27391f110e0Safresh1
27491f110e0Safresh1The flaw addressed to this commit has been assigned identifier CVE-2012-5195
27591f110e0Safresh1and was researched by Tim Brown.
27691f110e0Safresh1
27791f110e0Safresh1=head1 Incompatible Changes
27891f110e0Safresh1
27991f110e0Safresh1=head2 See also: hash overhaul
28091f110e0Safresh1
28191f110e0Safresh1Some of the changes in the L<hash overhaul|/"Hash overhaul"> are not fully
28291f110e0Safresh1compatible with previous versions of perl.  Please read that section.
28391f110e0Safresh1
28491f110e0Safresh1=head2 An unknown character name in C<\N{...}> is now a syntax error
28591f110e0Safresh1
28691f110e0Safresh1Previously, it warned, and the Unicode REPLACEMENT CHARACTER was
28791f110e0Safresh1substituted.  Unicode now recommends that this situation be a syntax
28891f110e0Safresh1error.  Also, the previous behavior led to some confusing warnings and
28991f110e0Safresh1behaviors, and since the REPLACEMENT CHARACTER has no use other than as
29091f110e0Safresh1a stand-in for some unknown character, any code that has this problem is
29191f110e0Safresh1buggy.
29291f110e0Safresh1
29391f110e0Safresh1=head2 Formerly deprecated characters in C<\N{}> character name aliases are now errors.
29491f110e0Safresh1
29591f110e0Safresh1Since v5.12.0, it has been deprecated to use certain characters in
29691f110e0Safresh1user-defined C<\N{...}> character names.  These now cause a syntax
29791f110e0Safresh1error.  For example, it is now an error to begin a name with a digit,
29891f110e0Safresh1such as in
29991f110e0Safresh1
30091f110e0Safresh1 my $undraftable = "\N{4F}";    # Syntax error!
30191f110e0Safresh1
30291f110e0Safresh1or to have commas anywhere in the name.  See L<charnames/CUSTOM ALIASES>.
30391f110e0Safresh1
30491f110e0Safresh1=head2 C<\N{BELL}> now refers to U+1F514 instead of U+0007
30591f110e0Safresh1
30691f110e0Safresh1Unicode 6.0 reused the name "BELL" for a different code point than it
30791f110e0Safresh1traditionally had meant.  Since Perl v5.14, use of this name still
30891f110e0Safresh1referred to U+0007, but would raise a deprecation warning.  Now, "BELL"
30991f110e0Safresh1refers to U+1F514, and the name for U+0007 is "ALERT".  All the
31091f110e0Safresh1functions in L<charnames> have been correspondingly updated.
31191f110e0Safresh1
31291f110e0Safresh1=head2 New Restrictions in Multi-Character Case-Insensitive Matching in Regular Expression Bracketed Character Classes
31391f110e0Safresh1
31491f110e0Safresh1Unicode has now withdrawn their previous recommendation for regular
31591f110e0Safresh1expressions to automatically handle cases where a single character can
31691f110e0Safresh1match multiple characters case-insensitively, for example, the letter
31791f110e0Safresh1LATIN SMALL LETTER SHARP S and the sequence C<ss>.  This is because
31891f110e0Safresh1it turns out to be impracticable to do this correctly in all
31991f110e0Safresh1circumstances.  Because Perl has tried to do this as best it can, it
32091f110e0Safresh1will continue to do so.  (We are considering an option to turn it off.)
32191f110e0Safresh1However, a new restriction is being added on such matches when they
32291f110e0Safresh1occur in [bracketed] character classes.  People were specifying
32391f110e0Safresh1things such as C</[\0-\xff]/i>, and being surprised that it matches the
32491f110e0Safresh1two character sequence C<ss> (since LATIN SMALL LETTER SHARP S occurs in
32591f110e0Safresh1this range).  This behavior is also inconsistent with using a
32691f110e0Safresh1property instead of a range:  C<\p{Block=Latin1}> also includes LATIN
32791f110e0Safresh1SMALL LETTER SHARP S, but C</[\p{Block=Latin1}]/i> does not match C<ss>.
32891f110e0Safresh1The new rule is that for there to be a multi-character case-insensitive
32991f110e0Safresh1match within a bracketed character class, the character must be
33091f110e0Safresh1explicitly listed, and not as an end point of a range.  This more
33191f110e0Safresh1closely obeys the Principle of Least Astonishment.  See
33291f110e0Safresh1L<perlrecharclass/Bracketed Character Classes>.  Note that a bug [perl
33391f110e0Safresh1#89774], now fixed as part of this change, prevented the previous
33491f110e0Safresh1behavior from working fully.
33591f110e0Safresh1
33691f110e0Safresh1=head2 Explicit rules for variable names and identifiers
33791f110e0Safresh1
33891f110e0Safresh1Due to an oversight, single character variable names in v5.16 were
33991f110e0Safresh1completely unrestricted.  This opened the door to several kinds of
34091f110e0Safresh1insanity.  As of v5.18, these now follow the rules of other identifiers,
34191f110e0Safresh1in addition to accepting characters that match the C<\p{POSIX_Punct}>
34291f110e0Safresh1property.
34391f110e0Safresh1
34491f110e0Safresh1There is no longer any difference in the parsing of identifiers
34591f110e0Safresh1specified by using braces versus without braces.  For instance, perl
34691f110e0Safresh1used to allow C<${foo:bar}> (with a single colon) but not C<$foo:bar>.
34791f110e0Safresh1Now that both are handled by a single code path, they are both treated
34891f110e0Safresh1the same way: both are forbidden.  Note that this change is about the
34991f110e0Safresh1range of permissible literal identifiers, not other expressions.
35091f110e0Safresh1
35191f110e0Safresh1=head2 Vertical tabs are now whitespace
35291f110e0Safresh1
35391f110e0Safresh1No one could recall why C<\s> didn't match C<\cK>, the vertical tab.
35491f110e0Safresh1Now it does.  Given the extreme rarity of that character, very little
35591f110e0Safresh1breakage is expected.  That said, here's what it means:
35691f110e0Safresh1
35791f110e0Safresh1C<\s> in a regex now matches a vertical tab in all circumstances.
35891f110e0Safresh1
35991f110e0Safresh1Literal vertical tabs in a regex literal are ignored when the C</x>
36091f110e0Safresh1modifier is used.
36191f110e0Safresh1
36291f110e0Safresh1Leading vertical tabs, alone or mixed with other whitespace, are now
36391f110e0Safresh1ignored when interpreting a string as a number.  For example:
36491f110e0Safresh1
36591f110e0Safresh1  $dec = " \cK \t 123";
36691f110e0Safresh1  $hex = " \cK \t 0xF";
36791f110e0Safresh1
36891f110e0Safresh1  say 0 + $dec;   # was 0 with warning, now 123
36991f110e0Safresh1  say int $dec;   # was 0, now 123
37091f110e0Safresh1  say oct $hex;   # was 0, now  15
37191f110e0Safresh1
37291f110e0Safresh1=head2 C</(?{})/> and C</(??{})/> have been heavily reworked
37391f110e0Safresh1
37491f110e0Safresh1The implementation of this feature has been almost completely rewritten.
37591f110e0Safresh1Although its main intent is to fix bugs, some behaviors, especially
37691f110e0Safresh1related to the scope of lexical variables, will have changed.  This is
37791f110e0Safresh1described more fully in the L</Selected Bug Fixes> section.
37891f110e0Safresh1
37991f110e0Safresh1=head2 Stricter parsing of substitution replacement
38091f110e0Safresh1
38191f110e0Safresh1It is no longer possible to abuse the way the parser parses C<s///e> like
38291f110e0Safresh1this:
38391f110e0Safresh1
38491f110e0Safresh1    %_=(_,"Just another ");
38591f110e0Safresh1    $_="Perl hacker,\n";
38691f110e0Safresh1    s//_}->{_/e;print
38791f110e0Safresh1
38891f110e0Safresh1=head2 C<given> now aliases the global C<$_>
38991f110e0Safresh1
39091f110e0Safresh1Instead of assigning to an implicit lexical C<$_>, C<given> now makes the
39191f110e0Safresh1global C<$_> an alias for its argument, just like C<foreach>.  However, it
39291f110e0Safresh1still uses lexical C<$_> if there is lexical C<$_> in scope (again, just like
39391f110e0Safresh1C<foreach>) [perl #114020].
39491f110e0Safresh1
39591f110e0Safresh1=head2 The smartmatch family of features are now experimental
39691f110e0Safresh1
39791f110e0Safresh1Smart match, added in v5.10.0 and significantly revised in v5.10.1, has been
39891f110e0Safresh1a regular point of complaint.  Although there are a number of ways in which
39991f110e0Safresh1it is useful, it has also proven problematic and confusing for both users and
40091f110e0Safresh1implementors of Perl.  There have been a number of proposals on how to best
40191f110e0Safresh1address the problem.  It is clear that smartmatch is almost certainly either
40291f110e0Safresh1going to change or go away in the future.  Relying on its current behavior
40391f110e0Safresh1is not recommended.
40491f110e0Safresh1
40591f110e0Safresh1Warnings will now be issued when the parser sees C<~~>, C<given>, or C<when>.
40691f110e0Safresh1To disable these warnings, you can add this line to the appropriate scope:
40791f110e0Safresh1
40891f110e0Safresh1  no if $] >= 5.018, warnings => "experimental::smartmatch";
40991f110e0Safresh1
41091f110e0Safresh1Consider, though, replacing the use of these features, as they may change
41191f110e0Safresh1behavior again before becoming stable.
41291f110e0Safresh1
41391f110e0Safresh1=head2 Lexical C<$_> is now experimental
41491f110e0Safresh1
41591f110e0Safresh1Since it was introduced in Perl v5.10, it has caused much confusion with no
41691f110e0Safresh1obvious solution:
41791f110e0Safresh1
41891f110e0Safresh1=over
41991f110e0Safresh1
42091f110e0Safresh1=item *
42191f110e0Safresh1
42291f110e0Safresh1Various modules (e.g., List::Util) expect callback routines to use the
42391f110e0Safresh1global C<$_>.  C<use List::Util 'first'; my $_; first { $_ == 1 } @list>
42491f110e0Safresh1does not work as one would expect.
42591f110e0Safresh1
42691f110e0Safresh1=item *
42791f110e0Safresh1
42891f110e0Safresh1A C<my $_> declaration earlier in the same file can cause confusing closure
42991f110e0Safresh1warnings.
43091f110e0Safresh1
43191f110e0Safresh1=item *
43291f110e0Safresh1
43391f110e0Safresh1The "_" subroutine prototype character allows called subroutines to access
43491f110e0Safresh1your lexical C<$_>, so it is not really private after all.
43591f110e0Safresh1
43691f110e0Safresh1=item *
43791f110e0Safresh1
43891f110e0Safresh1Nevertheless, subroutines with a "(@)" prototype and methods cannot access
43991f110e0Safresh1the caller's lexical C<$_>, unless they are written in XS.
44091f110e0Safresh1
44191f110e0Safresh1=item *
44291f110e0Safresh1
44391f110e0Safresh1But even XS routines cannot access a lexical C<$_> declared, not in the
44491f110e0Safresh1calling subroutine, but in an outer scope, iff that subroutine happened not
44591f110e0Safresh1to mention C<$_> or use any operators that default to C<$_>.
44691f110e0Safresh1
44791f110e0Safresh1=back
44891f110e0Safresh1
44991f110e0Safresh1It is our hope that lexical C<$_> can be rehabilitated, but this may
45091f110e0Safresh1cause changes in its behavior.  Please use it with caution until it
45191f110e0Safresh1becomes stable.
45291f110e0Safresh1
45391f110e0Safresh1=head2 readline() with C<$/ = \N> now reads N characters, not N bytes
45491f110e0Safresh1
45591f110e0Safresh1Previously, when reading from a stream with I/O layers such as
45691f110e0Safresh1C<encoding>, the readline() function, otherwise known as the C<< <> >>
45791f110e0Safresh1operator, would read I<N> bytes from the top-most layer. [perl #79960]
45891f110e0Safresh1
45991f110e0Safresh1Now, I<N> characters are read instead.
46091f110e0Safresh1
46191f110e0Safresh1There is no change in behaviour when reading from streams with no
46291f110e0Safresh1extra layers, since bytes map exactly to characters.
46391f110e0Safresh1
46491f110e0Safresh1=head2 Overridden C<glob> is now passed one argument
46591f110e0Safresh1
46691f110e0Safresh1C<glob> overrides used to be passed a magical undocumented second argument
46791f110e0Safresh1that identified the caller.  Nothing on CPAN was using this, and it got in
46891f110e0Safresh1the way of a bug fix, so it was removed.  If you really need to identify
46991f110e0Safresh1the caller, see L<Devel::Callsite> on CPAN.
47091f110e0Safresh1
47191f110e0Safresh1=head2 Here doc parsing
47291f110e0Safresh1
47391f110e0Safresh1The body of a here document inside a quote-like operator now always begins
47491f110e0Safresh1on the line after the "<<foo" marker.  Previously, it was documented to
47591f110e0Safresh1begin on the line following the containing quote-like operator, but that
47691f110e0Safresh1was only sometimes the case [perl #114040].
47791f110e0Safresh1
47891f110e0Safresh1=head2 Alphanumeric operators must now be separated from the closing
47991f110e0Safresh1delimiter of regular expressions
48091f110e0Safresh1
48191f110e0Safresh1You may no longer write something like:
48291f110e0Safresh1
48391f110e0Safresh1 m/a/and 1
48491f110e0Safresh1
48591f110e0Safresh1Instead you must write
48691f110e0Safresh1
48791f110e0Safresh1 m/a/ and 1
48891f110e0Safresh1
48991f110e0Safresh1with whitespace separating the operator from the closing delimiter of
49091f110e0Safresh1the regular expression.  Not having whitespace has resulted in a
49191f110e0Safresh1deprecation warning since Perl v5.14.0.
49291f110e0Safresh1
49391f110e0Safresh1=head2 qw(...) can no longer be used as parentheses
49491f110e0Safresh1
49591f110e0Safresh1C<qw> lists used to fool the parser into thinking they were always
49691f110e0Safresh1surrounded by parentheses.  This permitted some surprising constructions
49791f110e0Safresh1such as C<foreach $x qw(a b c) {...}>, which should really be written
49891f110e0Safresh1C<foreach $x (qw(a b c)) {...}>.  These would sometimes get the lexer into
49991f110e0Safresh1the wrong state, so they didn't fully work, and the similar C<foreach qw(a
50091f110e0Safresh1b c) {...}> that one might expect to be permitted never worked at all.
50191f110e0Safresh1
50291f110e0Safresh1This side effect of C<qw> has now been abolished.  It has been deprecated
50391f110e0Safresh1since Perl v5.13.11.  It is now necessary to use real parentheses
50491f110e0Safresh1everywhere that the grammar calls for them.
50591f110e0Safresh1
50691f110e0Safresh1=head2 Interaction of lexical and default warnings
50791f110e0Safresh1
50891f110e0Safresh1Turning on any lexical warnings used first to disable all default warnings
50991f110e0Safresh1if lexical warnings were not already enabled:
51091f110e0Safresh1
51191f110e0Safresh1    $*; # deprecation warning
51291f110e0Safresh1    use warnings "void";
51391f110e0Safresh1    $#; # void warning; no deprecation warning
51491f110e0Safresh1
51591f110e0Safresh1Now, the C<debugging>, C<deprecated>, C<glob>, C<inplace> and C<malloc> warnings
51691f110e0Safresh1categories are left on when turning on lexical warnings (unless they are
51791f110e0Safresh1turned off by C<no warnings>, of course).
51891f110e0Safresh1
51991f110e0Safresh1This may cause deprecation warnings to occur in code that used to be free
52091f110e0Safresh1of warnings.
52191f110e0Safresh1
52291f110e0Safresh1Those are the only categories consisting only of default warnings.  Default
52391f110e0Safresh1warnings in other categories are still disabled by C<< use warnings "category" >>,
52491f110e0Safresh1as we do not yet have the infrastructure for controlling
52591f110e0Safresh1individual warnings.
52691f110e0Safresh1
52791f110e0Safresh1=head2 C<state sub> and C<our sub>
52891f110e0Safresh1
52991f110e0Safresh1Due to an accident of history, C<state sub> and C<our sub> were equivalent
53091f110e0Safresh1to a plain C<sub>, so one could even create an anonymous sub with
53191f110e0Safresh1C<our sub { ... }>.  These are now disallowed outside of the "lexical_subs"
53291f110e0Safresh1feature.  Under the "lexical_subs" feature they have new meanings described
53391f110e0Safresh1in L<perlsub/Lexical Subroutines>.
53491f110e0Safresh1
53591f110e0Safresh1=head2 Defined values stored in environment are forced to byte strings
53691f110e0Safresh1
5376fb12b70Safresh1A value stored in an environment variable has always been stringified when
5386fb12b70Safresh1inherited by child processes.
5396fb12b70Safresh1
5406fb12b70Safresh1In this release, when assigning to C<%ENV>, values are immediately stringified,
5416fb12b70Safresh1and converted to be only a byte string.
5426fb12b70Safresh1
5435759b3d2Safresh1First, it is forced to be only a string.  Then if the string is utf8 and the
5446fb12b70Safresh1equivalent of C<utf8::downgrade()> works, that result is used; otherwise, the
5456fb12b70Safresh1equivalent of C<utf8::encode()> is used, and a warning is issued about wide
5466fb12b70Safresh1characters (L</Diagnostics>).
54791f110e0Safresh1
54891f110e0Safresh1=head2 C<require> dies for unreadable files
54991f110e0Safresh1
55091f110e0Safresh1When C<require> encounters an unreadable file, it now dies.  It used to
55191f110e0Safresh1ignore the file and continue searching the directories in C<@INC>
55291f110e0Safresh1[perl #113422].
55391f110e0Safresh1
55491f110e0Safresh1=head2 C<gv_fetchmeth_*> and SUPER
55591f110e0Safresh1
55691f110e0Safresh1The various C<gv_fetchmeth_*> XS functions used to treat a package whose
55791f110e0Safresh1named ended with C<::SUPER> specially.  A method lookup on the C<Foo::SUPER>
55891f110e0Safresh1package would be treated as a C<SUPER> method lookup on the C<Foo> package.  This
55991f110e0Safresh1is no longer the case.  To do a C<SUPER> lookup, pass the C<Foo> stash and the
56091f110e0Safresh1C<GV_SUPER> flag.
56191f110e0Safresh1
56291f110e0Safresh1=head2 C<split>'s first argument is more consistently interpreted
56391f110e0Safresh1
56491f110e0Safresh1After some changes earlier in v5.17, C<split>'s behavior has been
56591f110e0Safresh1simplified: if the PATTERN argument evaluates to a string
56691f110e0Safresh1containing one space, it is treated the way that a I<literal> string
56791f110e0Safresh1containing one space once was.
56891f110e0Safresh1
56991f110e0Safresh1=head1 Deprecations
57091f110e0Safresh1
57191f110e0Safresh1=head2 Module removals
57291f110e0Safresh1
57391f110e0Safresh1The following modules will be removed from the core distribution in a future
57491f110e0Safresh1release, and will at that time need to be installed from CPAN. Distributions
57591f110e0Safresh1on CPAN which require these modules will need to list them as prerequisites.
57691f110e0Safresh1
57791f110e0Safresh1The core versions of these modules will now issue C<"deprecated">-category
57891f110e0Safresh1warnings to alert you to this fact. To silence these deprecation warnings,
57991f110e0Safresh1install the modules in question from CPAN.
58091f110e0Safresh1
58191f110e0Safresh1Note that these are (with rare exceptions) fine modules that you are encouraged
58291f110e0Safresh1to continue to use. Their disinclusion from core primarily hinges on their
58391f110e0Safresh1necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
58491f110e0Safresh1not usually on concerns over their design.
58591f110e0Safresh1
58691f110e0Safresh1=over
58791f110e0Safresh1
58891f110e0Safresh1=item L<encoding>
58991f110e0Safresh1
59091f110e0Safresh1The use of this pragma is now strongly discouraged. It conflates the encoding
59191f110e0Safresh1of source text with the encoding of I/O data, reinterprets escape sequences in
59291f110e0Safresh1source text (a questionable choice), and introduces the UTF-8 bug to all runtime
59391f110e0Safresh1handling of character strings. It is broken as designed and beyond repair.
59491f110e0Safresh1
59591f110e0Safresh1For using non-ASCII literal characters in source text, please refer to L<utf8>.
59691f110e0Safresh1For dealing with textual I/O data, please refer to L<Encode> and L<open>.
59791f110e0Safresh1
59891f110e0Safresh1=item L<Archive::Extract>
59991f110e0Safresh1
60091f110e0Safresh1=item L<B::Lint>
60191f110e0Safresh1
60291f110e0Safresh1=item L<B::Lint::Debug>
60391f110e0Safresh1
60491f110e0Safresh1=item L<CPANPLUS> and all included C<CPANPLUS::*> modules
60591f110e0Safresh1
60691f110e0Safresh1=item L<Devel::InnerPackage>
60791f110e0Safresh1
60891f110e0Safresh1=item L<Log::Message>
60991f110e0Safresh1
61091f110e0Safresh1=item L<Log::Message::Config>
61191f110e0Safresh1
61291f110e0Safresh1=item L<Log::Message::Handlers>
61391f110e0Safresh1
61491f110e0Safresh1=item L<Log::Message::Item>
61591f110e0Safresh1
61691f110e0Safresh1=item L<Log::Message::Simple>
61791f110e0Safresh1
61891f110e0Safresh1=item L<Module::Pluggable>
61991f110e0Safresh1
62091f110e0Safresh1=item L<Module::Pluggable::Object>
62191f110e0Safresh1
62291f110e0Safresh1=item L<Object::Accessor>
62391f110e0Safresh1
62491f110e0Safresh1=item L<Pod::LaTeX>
62591f110e0Safresh1
62691f110e0Safresh1=item L<Term::UI>
62791f110e0Safresh1
62891f110e0Safresh1=item L<Term::UI::History>
62991f110e0Safresh1
63091f110e0Safresh1=back
63191f110e0Safresh1
63291f110e0Safresh1=head2 Deprecated Utilities
63391f110e0Safresh1
63491f110e0Safresh1The following utilities will be removed from the core distribution in a
63591f110e0Safresh1future release as their associated modules have been deprecated. They
63691f110e0Safresh1will remain available with the applicable CPAN distribution.
63791f110e0Safresh1
63891f110e0Safresh1=over
63991f110e0Safresh1
64091f110e0Safresh1=item L<cpanp>
64191f110e0Safresh1
64291f110e0Safresh1=item C<cpanp-run-perl>
64391f110e0Safresh1
64491f110e0Safresh1=item L<cpan2dist>
64591f110e0Safresh1
64691f110e0Safresh1These items are part of the C<CPANPLUS> distribution.
64791f110e0Safresh1
64891f110e0Safresh1=item L<pod2latex>
64991f110e0Safresh1
65091f110e0Safresh1This item is part of the C<Pod::LaTeX> distribution.
65191f110e0Safresh1
65291f110e0Safresh1=back
65391f110e0Safresh1
65491f110e0Safresh1=head2 PL_sv_objcount
65591f110e0Safresh1
65691f110e0Safresh1This interpreter-global variable used to track the total number of
65791f110e0Safresh1Perl objects in the interpreter. It is no longer maintained and will
65891f110e0Safresh1be removed altogether in Perl v5.20.
65991f110e0Safresh1
66091f110e0Safresh1=head2 Five additional characters should be escaped in patterns with C</x>
66191f110e0Safresh1
66291f110e0Safresh1When a regular expression pattern is compiled with C</x>, Perl treats 6
66391f110e0Safresh1characters as white space to ignore, such as SPACE and TAB.  However,
66491f110e0Safresh1Unicode recommends 11 characters be treated thusly.  We will conform
66591f110e0Safresh1with this in a future Perl version.  In the meantime, use of any of the
66691f110e0Safresh1missing characters will raise a deprecation warning, unless turned off.
66791f110e0Safresh1The five characters are:
66891f110e0Safresh1
66991f110e0Safresh1    U+0085 NEXT LINE
67091f110e0Safresh1    U+200E LEFT-TO-RIGHT MARK
67191f110e0Safresh1    U+200F RIGHT-TO-LEFT MARK
67291f110e0Safresh1    U+2028 LINE SEPARATOR
67391f110e0Safresh1    U+2029 PARAGRAPH SEPARATOR
67491f110e0Safresh1
67591f110e0Safresh1=head2 User-defined charnames with surprising whitespace
67691f110e0Safresh1
67791f110e0Safresh1A user-defined character name with trailing or multiple spaces in a row is
67891f110e0Safresh1likely a typo.  This now generates a warning when defined, on the assumption
67991f110e0Safresh1that uses of it will be unlikely to include the excess whitespace.
68091f110e0Safresh1
68191f110e0Safresh1=head2 Various XS-callable functions are now deprecated
68291f110e0Safresh1
68391f110e0Safresh1All the functions used to classify characters will be removed from a
68491f110e0Safresh1future version of Perl, and should not be used.  With participating C
68591f110e0Safresh1compilers (e.g., gcc), compiling any file that uses any of these will
68691f110e0Safresh1generate a warning.  These were not intended for public use; there are
68791f110e0Safresh1equivalent, faster, macros for most of them.
68891f110e0Safresh1
68991f110e0Safresh1See L<perlapi/Character classes>.  The complete list is:
69091f110e0Safresh1
69191f110e0Safresh1C<is_uni_alnum>, C<is_uni_alnumc>, C<is_uni_alnumc_lc>,
69291f110e0Safresh1C<is_uni_alnum_lc>, C<is_uni_alpha>, C<is_uni_alpha_lc>,
69391f110e0Safresh1C<is_uni_ascii>, C<is_uni_ascii_lc>, C<is_uni_blank>,
69491f110e0Safresh1C<is_uni_blank_lc>, C<is_uni_cntrl>, C<is_uni_cntrl_lc>,
69591f110e0Safresh1C<is_uni_digit>, C<is_uni_digit_lc>, C<is_uni_graph>,
69691f110e0Safresh1C<is_uni_graph_lc>, C<is_uni_idfirst>, C<is_uni_idfirst_lc>,
69791f110e0Safresh1C<is_uni_lower>, C<is_uni_lower_lc>, C<is_uni_print>,
69891f110e0Safresh1C<is_uni_print_lc>, C<is_uni_punct>, C<is_uni_punct_lc>,
69991f110e0Safresh1C<is_uni_space>, C<is_uni_space_lc>, C<is_uni_upper>,
70091f110e0Safresh1C<is_uni_upper_lc>, C<is_uni_xdigit>, C<is_uni_xdigit_lc>,
70191f110e0Safresh1C<is_utf8_alnum>, C<is_utf8_alnumc>, C<is_utf8_alpha>,
70291f110e0Safresh1C<is_utf8_ascii>, C<is_utf8_blank>, C<is_utf8_char>,
70391f110e0Safresh1C<is_utf8_cntrl>, C<is_utf8_digit>, C<is_utf8_graph>,
70491f110e0Safresh1C<is_utf8_idcont>, C<is_utf8_idfirst>, C<is_utf8_lower>,
70591f110e0Safresh1C<is_utf8_mark>, C<is_utf8_perl_space>, C<is_utf8_perl_word>,
70691f110e0Safresh1C<is_utf8_posix_digit>, C<is_utf8_print>, C<is_utf8_punct>,
70791f110e0Safresh1C<is_utf8_space>, C<is_utf8_upper>, C<is_utf8_xdigit>,
70891f110e0Safresh1C<is_utf8_xidcont>, C<is_utf8_xidfirst>.
70991f110e0Safresh1
71091f110e0Safresh1In addition these three functions that have never worked properly are
71191f110e0Safresh1deprecated:
71291f110e0Safresh1C<to_uni_lower_lc>, C<to_uni_title_lc>, and C<to_uni_upper_lc>.
71391f110e0Safresh1
71491f110e0Safresh1=head2 Certain rare uses of backslashes within regexes are now deprecated
71591f110e0Safresh1
71691f110e0Safresh1There are three pairs of characters that Perl recognizes as
71791f110e0Safresh1metacharacters in regular expression patterns: C<{}>, C<[]>, and C<()>.
71891f110e0Safresh1These can be used as well to delimit patterns, as in:
71991f110e0Safresh1
72091f110e0Safresh1  m{foo}
72191f110e0Safresh1  s(foo)(bar)
72291f110e0Safresh1
72391f110e0Safresh1Since they are metacharacters, they have special meaning to regular
72491f110e0Safresh1expression patterns, and it turns out that you can't turn off that
72591f110e0Safresh1special meaning by the normal means of preceding them with a backslash,
72691f110e0Safresh1if you use them, paired, within a pattern delimited by them.  For
72791f110e0Safresh1example, in
72891f110e0Safresh1
72991f110e0Safresh1  m{foo\{1,3\}}
73091f110e0Safresh1
73191f110e0Safresh1the backslashes do not change the behavior, and this matches
73291f110e0Safresh1S<C<"f o">> followed by one to three more occurrences of C<"o">.
73391f110e0Safresh1
73491f110e0Safresh1Usages like this, where they are interpreted as metacharacters, are
73591f110e0Safresh1exceedingly rare; we think there are none, for example, in all of CPAN.
73691f110e0Safresh1Hence, this deprecation should affect very little code.  It does give
73791f110e0Safresh1notice, however, that any such code needs to change, which will in turn
73891f110e0Safresh1allow us to change the behavior in future Perl versions so that the
73991f110e0Safresh1backslashes do have an effect, and without fear that we are silently
74091f110e0Safresh1breaking any existing code.
74191f110e0Safresh1
74291f110e0Safresh1=head2 Splitting the tokens C<(?> and C<(*> in regular expressions
74391f110e0Safresh1
74491f110e0Safresh1A deprecation warning is now raised if the C<(> and C<?> are separated
74591f110e0Safresh1by white space or comments in C<(?...)> regular expression constructs.
74691f110e0Safresh1Similarly, if the C<(> and C<*> are separated in C<(*VERB...)>
74791f110e0Safresh1constructs.
74891f110e0Safresh1
74991f110e0Safresh1=head2 Pre-PerlIO IO implementations
75091f110e0Safresh1
75191f110e0Safresh1In theory, you can currently build perl without PerlIO.  Instead, you'd use a
75291f110e0Safresh1wrapper around stdio or sfio.  In practice, this isn't very useful.  It's not
75391f110e0Safresh1well tested, and without any support for IO layers or (thus) Unicode, it's not
75491f110e0Safresh1much of a perl.  Building without PerlIO will most likely be removed in the
75591f110e0Safresh1next version of perl.
75691f110e0Safresh1
75791f110e0Safresh1PerlIO supports a C<stdio> layer if stdio use is desired.  Similarly a
75891f110e0Safresh1sfio layer could be produced in the future, if needed.
75991f110e0Safresh1
76091f110e0Safresh1=head1 Future Deprecations
76191f110e0Safresh1
76291f110e0Safresh1=over
76391f110e0Safresh1
76491f110e0Safresh1=item *
76591f110e0Safresh1
76691f110e0Safresh1Platforms without support infrastructure
76791f110e0Safresh1
76891f110e0Safresh1Both Windows CE and z/OS have been historically under-maintained, and are
76991f110e0Safresh1currently neither successfully building nor regularly being smoke tested.
77091f110e0Safresh1Efforts are underway to change this situation, but it should not be taken for
77191f110e0Safresh1granted that the platforms are safe and supported.  If they do not become
77291f110e0Safresh1buildable and regularly smoked, support for them may be actively removed in
77391f110e0Safresh1future releases.  If you have an interest in these platforms and you can lend
77491f110e0Safresh1your time, expertise, or hardware to help support these platforms, please let
77591f110e0Safresh1the perl development effort know by emailing C<perl5-porters@perl.org>.
77691f110e0Safresh1
77791f110e0Safresh1Some platforms that appear otherwise entirely dead are also on the short list
77891f110e0Safresh1for removal between now and v5.20.0:
77991f110e0Safresh1
78091f110e0Safresh1=over
78191f110e0Safresh1
78291f110e0Safresh1=item DG/UX
78391f110e0Safresh1
78491f110e0Safresh1=item NeXT
78591f110e0Safresh1
78691f110e0Safresh1=back
78791f110e0Safresh1
78891f110e0Safresh1We also think it likely that current versions of Perl will no longer
78991f110e0Safresh1build AmigaOS, DJGPP, NetWare (natively), OS/2 and Plan 9. If you
79091f110e0Safresh1are using Perl on such a platform and have an interest in ensuring
79191f110e0Safresh1Perl's future on them, please contact us.
79291f110e0Safresh1
79391f110e0Safresh1We believe that Perl has long been unable to build on mixed endian
79491f110e0Safresh1architectures (such as PDP-11s), and intend to remove any remaining
795*256a93a4Safresh1support code. Similarly, code supporting the long unmaintained GNU
79691f110e0Safresh1dld will be removed soon if no-one makes themselves known as an
79791f110e0Safresh1active user.
79891f110e0Safresh1
79991f110e0Safresh1=item *
80091f110e0Safresh1
80191f110e0Safresh1Swapping of $< and $>
80291f110e0Safresh1
80391f110e0Safresh1Perl has supported the idiom of swapping $< and $> (and likewise $( and
80491f110e0Safresh1$)) to temporarily drop permissions since 5.0, like this:
80591f110e0Safresh1
80691f110e0Safresh1    ($<, $>) = ($>, $<);
80791f110e0Safresh1
80891f110e0Safresh1However, this idiom modifies the real user/group id, which can have
80991f110e0Safresh1undesirable side-effects, is no longer useful on any platform perl
81091f110e0Safresh1supports and complicates the implementation of these variables and list
81191f110e0Safresh1assignment in general.
81291f110e0Safresh1
81391f110e0Safresh1As an alternative, assignment only to C<< $> >> is recommended:
81491f110e0Safresh1
81591f110e0Safresh1    local $> = $<;
81691f110e0Safresh1
81791f110e0Safresh1See also: L<Setuid Demystified|http://www.cs.berkeley.edu/~daw/papers/setuid-usenix02.pdf>.
81891f110e0Safresh1
81991f110e0Safresh1=item *
82091f110e0Safresh1
82191f110e0Safresh1C<microperl>, long broken and of unclear present purpose, will be removed.
82291f110e0Safresh1
82391f110e0Safresh1=item *
82491f110e0Safresh1
82591f110e0Safresh1Revamping C<< "\Q" >> semantics in double-quotish strings when combined with
82691f110e0Safresh1other escapes.
82791f110e0Safresh1
82891f110e0Safresh1There are several bugs and inconsistencies involving combinations
82991f110e0Safresh1of C<\Q> and escapes like C<\x>, C<\L>, etc., within a C<\Q...\E> pair.
83091f110e0Safresh1These need to be fixed, and doing so will necessarily change current
83191f110e0Safresh1behavior.  The changes have not yet been settled.
83291f110e0Safresh1
83391f110e0Safresh1=item *
83491f110e0Safresh1
83591f110e0Safresh1Use of C<$x>, where C<x> stands for any actual (non-printing) C0 control
83691f110e0Safresh1character will be disallowed in a future Perl version.  Use C<${x}>
83791f110e0Safresh1instead (where again C<x> stands for a control character),
83891f110e0Safresh1or better, C<$^A> , where C<^> is a caret (CIRCUMFLEX ACCENT),
83991f110e0Safresh1and C<A> stands for any of the characters listed at the end of
84091f110e0Safresh1L<perlebcdic/OPERATOR DIFFERENCES>.
84191f110e0Safresh1
84291f110e0Safresh1=back
84391f110e0Safresh1
84491f110e0Safresh1=head1 Performance Enhancements
84591f110e0Safresh1
84691f110e0Safresh1=over 4
84791f110e0Safresh1
84891f110e0Safresh1=item *
84991f110e0Safresh1
85091f110e0Safresh1Lists of lexical variable declarations (C<my($x, $y)>) are now optimised
85191f110e0Safresh1down to a single op and are hence faster than before.
85291f110e0Safresh1
85391f110e0Safresh1=item *
85491f110e0Safresh1
85591f110e0Safresh1A new C preprocessor define C<NO_TAINT_SUPPORT> was added that, if set,
85691f110e0Safresh1disables Perl's taint support altogether.  Using the -T or -t command
85791f110e0Safresh1line flags will cause a fatal error.  Beware that both core tests as
85891f110e0Safresh1well as many a CPAN distribution's tests will fail with this change.  On
85991f110e0Safresh1the upside, it provides a small performance benefit due to reduced
86091f110e0Safresh1branching.
86191f110e0Safresh1
86291f110e0Safresh1B<Do not enable this unless you know exactly what you are getting yourself
86391f110e0Safresh1into.>
86491f110e0Safresh1
86591f110e0Safresh1=item *
86691f110e0Safresh1
86791f110e0Safresh1C<pack> with constant arguments is now constant folded in most cases
86891f110e0Safresh1[perl #113470].
86991f110e0Safresh1
87091f110e0Safresh1=item *
87191f110e0Safresh1
87291f110e0Safresh1Speed up in regular expression matching against Unicode properties.  The
87391f110e0Safresh1largest gain is for C<\X>, the Unicode "extended grapheme cluster."  The
87491f110e0Safresh1gain for it is about 35% - 40%.  Bracketed character classes, e.g.,
87591f110e0Safresh1C<[0-9\x{100}]> containing code points above 255 are also now faster.
87691f110e0Safresh1
87791f110e0Safresh1=item *
87891f110e0Safresh1
87991f110e0Safresh1On platforms supporting it, several former macros are now implemented as static
88091f110e0Safresh1inline functions. This should speed things up slightly on non-GCC platforms.
88191f110e0Safresh1
88291f110e0Safresh1=item *
88391f110e0Safresh1
88491f110e0Safresh1The optimisation of hashes in boolean context has been extended to
88591f110e0Safresh1affect C<scalar(%hash)>, C<%hash ? ... : ...>, and C<sub { %hash || ... }>.
88691f110e0Safresh1
88791f110e0Safresh1=item *
88891f110e0Safresh1
88991f110e0Safresh1Filetest operators manage the stack in a fractionally more efficient manner.
89091f110e0Safresh1
89191f110e0Safresh1=item *
89291f110e0Safresh1
89391f110e0Safresh1Globs used in a numeric context are now numified directly in most cases,
89491f110e0Safresh1rather than being numified via stringification.
89591f110e0Safresh1
89691f110e0Safresh1=item *
89791f110e0Safresh1
89891f110e0Safresh1The C<x> repetition operator is now folded to a single constant at compile
89991f110e0Safresh1time if called in scalar context with constant operands and no parentheses
90091f110e0Safresh1around the left operand.
90191f110e0Safresh1
90291f110e0Safresh1=back
90391f110e0Safresh1
90491f110e0Safresh1=head1 Modules and Pragmata
90591f110e0Safresh1
90691f110e0Safresh1=head2 New Modules and Pragmata
90791f110e0Safresh1
90891f110e0Safresh1=over 4
90991f110e0Safresh1
91091f110e0Safresh1=item *
91191f110e0Safresh1
91291f110e0Safresh1L<Config::Perl::V> version 0.16 has been added as a dual-lifed module.
91391f110e0Safresh1It provides structured data retrieval of C<perl -V> output including
91491f110e0Safresh1information only known to the C<perl> binary and not available via L<Config>.
91591f110e0Safresh1
91691f110e0Safresh1=back
91791f110e0Safresh1
91891f110e0Safresh1=head2 Updated Modules and Pragmata
91991f110e0Safresh1
92091f110e0Safresh1For a complete list of updates, run:
92191f110e0Safresh1
92291f110e0Safresh1  $ corelist --diff 5.16.0 5.18.0
92391f110e0Safresh1
92491f110e0Safresh1You can substitute your favorite version in place of C<5.16.0>, too.
92591f110e0Safresh1
92691f110e0Safresh1=over
92791f110e0Safresh1
92891f110e0Safresh1=item *
92991f110e0Safresh1
93091f110e0Safresh1L<Archive::Extract> has been upgraded to 0.68.
93191f110e0Safresh1
93291f110e0Safresh1Work around an edge case on Linux with Busybox's unzip.
93391f110e0Safresh1
93491f110e0Safresh1=item *
93591f110e0Safresh1
93691f110e0Safresh1L<Archive::Tar> has been upgraded to 1.90.
93791f110e0Safresh1
93891f110e0Safresh1ptar now supports the -T option as well as dashless options
93991f110e0Safresh1[rt.cpan.org #75473], [rt.cpan.org #75475].
94091f110e0Safresh1
94191f110e0Safresh1Auto-encode filenames marked as UTF-8 [rt.cpan.org #75474].
94291f110e0Safresh1
94391f110e0Safresh1Don't use C<tell> on L<IO::Zlib> handles [rt.cpan.org #64339].
94491f110e0Safresh1
94591f110e0Safresh1Don't try to C<chown> on symlinks.
94691f110e0Safresh1
94791f110e0Safresh1=item *
94891f110e0Safresh1
94991f110e0Safresh1L<autodie> has been upgraded to 2.13.
95091f110e0Safresh1
95191f110e0Safresh1C<autodie> now plays nicely with the 'open' pragma.
95291f110e0Safresh1
95391f110e0Safresh1=item *
95491f110e0Safresh1
95591f110e0Safresh1L<B> has been upgraded to 1.42.
95691f110e0Safresh1
95791f110e0Safresh1The C<stashoff> method of COPs has been added.   This provides access to an
95891f110e0Safresh1internal field added in perl 5.16 under threaded builds [perl #113034].
95991f110e0Safresh1
96091f110e0Safresh1C<B::COP::stashpv> now supports UTF-8 package names and embedded NULs.
96191f110e0Safresh1
96291f110e0Safresh1All C<CVf_*> and C<GVf_*>
96391f110e0Safresh1and more SV-related flag values are now provided as constants in the C<B::>
96491f110e0Safresh1namespace and available for export.  The default export list has not changed.
96591f110e0Safresh1
96691f110e0Safresh1This makes the module work with the new pad API.
96791f110e0Safresh1
96891f110e0Safresh1=item *
96991f110e0Safresh1
97091f110e0Safresh1L<B::Concise> has been upgraded to 0.95.
97191f110e0Safresh1
97291f110e0Safresh1The C<-nobanner> option has been fixed, and C<format>s can now be dumped.
97391f110e0Safresh1When passed a sub name to dump, it will check also to see whether it
97491f110e0Safresh1is the name of a format.  If a sub and a format share the same name,
97591f110e0Safresh1it will dump both.
97691f110e0Safresh1
97791f110e0Safresh1This adds support for the new C<OpMAYBE_TRUEBOOL> and C<OPpTRUEBOOL> flags.
97891f110e0Safresh1
97991f110e0Safresh1=item *
98091f110e0Safresh1
98191f110e0Safresh1L<B::Debug> has been upgraded to 1.18.
98291f110e0Safresh1
98391f110e0Safresh1This adds support (experimentally) for C<B::PADLIST>, which was
98491f110e0Safresh1added in Perl 5.17.4.
98591f110e0Safresh1
98691f110e0Safresh1=item *
98791f110e0Safresh1
98891f110e0Safresh1L<B::Deparse> has been upgraded to 1.20.
98991f110e0Safresh1
99091f110e0Safresh1Avoid warning when run under C<perl -w>.
99191f110e0Safresh1
99291f110e0Safresh1It now deparses
99391f110e0Safresh1loop controls with the correct precedence, and multiple statements in a
99491f110e0Safresh1C<format> line are also now deparsed correctly.
99591f110e0Safresh1
99691f110e0Safresh1This release suppresses trailing semicolons in formats.
99791f110e0Safresh1
99891f110e0Safresh1This release adds stub deparsing for lexical subroutines.
99991f110e0Safresh1
100091f110e0Safresh1It no longer dies when deparsing C<sort> without arguments.  It now
100191f110e0Safresh1correctly omits the comma for C<system $prog @args> and C<exec $prog
100291f110e0Safresh1@args>.
100391f110e0Safresh1
100491f110e0Safresh1=item *
100591f110e0Safresh1
100691f110e0Safresh1L<bignum>, L<bigint> and L<bigrat> have been upgraded to 0.33.
100791f110e0Safresh1
100891f110e0Safresh1The overrides for C<hex> and C<oct> have been rewritten, eliminating
100991f110e0Safresh1several problems, and making one incompatible change:
101091f110e0Safresh1
101191f110e0Safresh1=over
101291f110e0Safresh1
101391f110e0Safresh1=item *
101491f110e0Safresh1
101591f110e0Safresh1Formerly, whichever of C<use bigint> or C<use bigrat> was compiled later
101691f110e0Safresh1would take precedence over the other, causing C<hex> and C<oct> not to
101791f110e0Safresh1respect the other pragma when in scope.
101891f110e0Safresh1
101991f110e0Safresh1=item *
102091f110e0Safresh1
102191f110e0Safresh1Using any of these three pragmata would cause C<hex> and C<oct> anywhere
10226fb12b70Safresh1else in the program to evaluate their arguments in list context and prevent
102391f110e0Safresh1them from inferring $_ when called without arguments.
102491f110e0Safresh1
102591f110e0Safresh1=item *
102691f110e0Safresh1
102791f110e0Safresh1Using any of these three pragmata would make C<oct("1234")> return 1234
102891f110e0Safresh1(for any number not beginning with 0) anywhere in the program.  Now "1234"
102991f110e0Safresh1is translated from octal to decimal, whether within the pragma's scope or
103091f110e0Safresh1not.
103191f110e0Safresh1
103291f110e0Safresh1=item *
103391f110e0Safresh1
103491f110e0Safresh1The global overrides that facilitate lexical use of C<hex> and C<oct> now
103591f110e0Safresh1respect any existing overrides that were in place before the new overrides
103691f110e0Safresh1were installed, falling back to them outside of the scope of C<use bignum>.
103791f110e0Safresh1
103891f110e0Safresh1=item *
103991f110e0Safresh1
104091f110e0Safresh1C<use bignum "hex">, C<use bignum "oct"> and similar invocations for bigint
104191f110e0Safresh1and bigrat now export a C<hex> or C<oct> function, instead of providing a
104291f110e0Safresh1global override.
104391f110e0Safresh1
104491f110e0Safresh1=back
104591f110e0Safresh1
104691f110e0Safresh1=item *
104791f110e0Safresh1
104891f110e0Safresh1L<Carp> has been upgraded to 1.29.
104991f110e0Safresh1
105091f110e0Safresh1Carp is no longer confused when C<caller> returns undef for a package that
105191f110e0Safresh1has been deleted.
105291f110e0Safresh1
105391f110e0Safresh1The C<longmess()> and C<shortmess()> functions are now documented.
105491f110e0Safresh1
105591f110e0Safresh1=item *
105691f110e0Safresh1
105791f110e0Safresh1L<CGI> has been upgraded to 3.63.
105891f110e0Safresh1
105991f110e0Safresh1Unrecognized HTML escape sequences are now handled better, problematic
106091f110e0Safresh1trailing newlines are no longer inserted after E<lt>formE<gt> tags
106191f110e0Safresh1by C<startform()> or C<start_form()>, and bogus "Insecure Dependency"
106291f110e0Safresh1warnings appearing with some versions of perl are now worked around.
106391f110e0Safresh1
106491f110e0Safresh1=item *
106591f110e0Safresh1
106691f110e0Safresh1L<Class::Struct> has been upgraded to 0.64.
106791f110e0Safresh1
106891f110e0Safresh1The constructor now respects overridden accessor methods [perl #29230].
106991f110e0Safresh1
107091f110e0Safresh1=item *
107191f110e0Safresh1
107291f110e0Safresh1L<Compress::Raw::Bzip2> has been upgraded to 2.060.
107391f110e0Safresh1
107491f110e0Safresh1The misuse of Perl's "magic" API has been fixed.
107591f110e0Safresh1
107691f110e0Safresh1=item *
107791f110e0Safresh1
107891f110e0Safresh1L<Compress::Raw::Zlib> has been upgraded to 2.060.
107991f110e0Safresh1
108091f110e0Safresh1Upgrade bundled zlib to version 1.2.7.
108191f110e0Safresh1
108291f110e0Safresh1Fix build failures on Irix, Solaris, and Win32, and also when building as C++
108391f110e0Safresh1[rt.cpan.org #69985], [rt.cpan.org #77030], [rt.cpan.org #75222].
108491f110e0Safresh1
108591f110e0Safresh1The misuse of Perl's "magic" API has been fixed.
108691f110e0Safresh1
108791f110e0Safresh1C<compress()>, C<uncompress()>, C<memGzip()> and C<memGunzip()> have
108891f110e0Safresh1been speeded up by making parameter validation more efficient.
108991f110e0Safresh1
109091f110e0Safresh1=item *
109191f110e0Safresh1
109291f110e0Safresh1L<CPAN::Meta::Requirements> has been upgraded to 2.122.
109391f110e0Safresh1
109491f110e0Safresh1Treat undef requirements to C<from_string_hash> as 0 (with a warning).
109591f110e0Safresh1
109691f110e0Safresh1Added C<requirements_for_module> method.
109791f110e0Safresh1
109891f110e0Safresh1=item *
109991f110e0Safresh1
110091f110e0Safresh1L<CPANPLUS> has been upgraded to 0.9135.
110191f110e0Safresh1
110291f110e0Safresh1Allow adding F<blib/script> to PATH.
110391f110e0Safresh1
110491f110e0Safresh1Save the history between invocations of the shell.
110591f110e0Safresh1
110691f110e0Safresh1Handle multiple C<makemakerargs> and C<makeflags> arguments better.
110791f110e0Safresh1
110891f110e0Safresh1This resolves issues with the SQLite source engine.
110991f110e0Safresh1
111091f110e0Safresh1=item *
111191f110e0Safresh1
111291f110e0Safresh1L<Data::Dumper> has been upgraded to 2.145.
111391f110e0Safresh1
111491f110e0Safresh1It has been optimized to only build a seen-scalar hash as necessary,
111591f110e0Safresh1thereby speeding up serialization drastically.
111691f110e0Safresh1
111791f110e0Safresh1Additional tests were added in order to improve statement, branch, condition
111891f110e0Safresh1and subroutine coverage.  On the basis of the coverage analysis, some of the
111991f110e0Safresh1internals of Dumper.pm were refactored.  Almost all methods are now
112091f110e0Safresh1documented.
112191f110e0Safresh1
112291f110e0Safresh1=item *
112391f110e0Safresh1
112491f110e0Safresh1L<DB_File> has been upgraded to 1.827.
112591f110e0Safresh1
112691f110e0Safresh1The main Perl module no longer uses the C<"@_"> construct.
112791f110e0Safresh1
112891f110e0Safresh1=item *
112991f110e0Safresh1
113091f110e0Safresh1L<Devel::Peek> has been upgraded to 1.11.
113191f110e0Safresh1
113291f110e0Safresh1This fixes compilation with C++ compilers and makes the module work with
113391f110e0Safresh1the new pad API.
113491f110e0Safresh1
113591f110e0Safresh1=item *
113691f110e0Safresh1
113791f110e0Safresh1L<Digest::MD5> has been upgraded to 2.52.
113891f110e0Safresh1
113991f110e0Safresh1Fix C<Digest::Perl::MD5> OO fallback [rt.cpan.org #66634].
114091f110e0Safresh1
114191f110e0Safresh1=item *
114291f110e0Safresh1
114391f110e0Safresh1L<Digest::SHA> has been upgraded to 5.84.
114491f110e0Safresh1
114591f110e0Safresh1This fixes a double-free bug, which might have caused vulnerabilities
114691f110e0Safresh1in some cases.
114791f110e0Safresh1
114891f110e0Safresh1=item *
114991f110e0Safresh1
115091f110e0Safresh1L<DynaLoader> has been upgraded to 1.18.
115191f110e0Safresh1
115291f110e0Safresh1This is due to a minor code change in the XS for the VMS implementation.
115391f110e0Safresh1
115491f110e0Safresh1This fixes warnings about using C<CODE> sections without an C<OUTPUT>
115591f110e0Safresh1section.
115691f110e0Safresh1
115791f110e0Safresh1=item *
115891f110e0Safresh1
115991f110e0Safresh1L<Encode> has been upgraded to 2.49.
116091f110e0Safresh1
116191f110e0Safresh1The Mac alias x-mac-ce has been added, and various bugs have been fixed
116291f110e0Safresh1in Encode::Unicode, Encode::UTF7 and Encode::GSM0338.
116391f110e0Safresh1
116491f110e0Safresh1=item *
116591f110e0Safresh1
116691f110e0Safresh1L<Env> has been upgraded to 1.04.
116791f110e0Safresh1
116891f110e0Safresh1Its SPLICE implementation no longer misbehaves in list context.
116991f110e0Safresh1
117091f110e0Safresh1=item *
117191f110e0Safresh1
117291f110e0Safresh1L<ExtUtils::CBuilder> has been upgraded to 0.280210.
117391f110e0Safresh1
117491f110e0Safresh1Manifest files are now correctly embedded for those versions of VC++ which
117591f110e0Safresh1make use of them. [perl #111782, #111798].
117691f110e0Safresh1
117791f110e0Safresh1A list of symbols to export can now be passed to C<link()> when on
117891f110e0Safresh1Windows, as on other OSes [perl #115100].
117991f110e0Safresh1
118091f110e0Safresh1=item *
118191f110e0Safresh1
118291f110e0Safresh1L<ExtUtils::ParseXS> has been upgraded to 3.18.
118391f110e0Safresh1
118491f110e0Safresh1The generated C code now avoids unnecessarily incrementing
118591f110e0Safresh1C<PL_amagic_generation> on Perl versions where it's done automatically
118691f110e0Safresh1(or on current Perl where the variable no longer exists).
118791f110e0Safresh1
118891f110e0Safresh1This avoids a bogus warning for initialised XSUB non-parameters [perl
118991f110e0Safresh1#112776].
119091f110e0Safresh1
119191f110e0Safresh1=item *
119291f110e0Safresh1
119391f110e0Safresh1L<File::Copy> has been upgraded to 2.26.
119491f110e0Safresh1
119591f110e0Safresh1C<copy()> no longer zeros files when copying into the same directory,
119691f110e0Safresh1and also now fails (as it has long been documented to do) when attempting
119791f110e0Safresh1to copy a file over itself.
119891f110e0Safresh1
119991f110e0Safresh1=item *
120091f110e0Safresh1
120191f110e0Safresh1L<File::DosGlob> has been upgraded to 1.10.
120291f110e0Safresh1
120391f110e0Safresh1The internal cache of file names that it keeps for each caller is now
120491f110e0Safresh1freed when that caller is freed.  This means
120591f110e0Safresh1C<< use File::DosGlob 'glob'; eval 'scalar <*>' >> no longer leaks memory.
120691f110e0Safresh1
120791f110e0Safresh1=item *
120891f110e0Safresh1
120991f110e0Safresh1L<File::Fetch> has been upgraded to 0.38.
121091f110e0Safresh1
121191f110e0Safresh1Added the 'file_default' option for URLs that do not have a file
121291f110e0Safresh1component.
121391f110e0Safresh1
121491f110e0Safresh1Use C<File::HomeDir> when available, and provide C<PERL5_CPANPLUS_HOME> to
121591f110e0Safresh1override the autodetection.
121691f110e0Safresh1
121791f110e0Safresh1Always re-fetch F<CHECKSUMS> if C<fetchdir> is set.
121891f110e0Safresh1
121991f110e0Safresh1=item *
122091f110e0Safresh1
122191f110e0Safresh1L<File::Find> has been upgraded to 1.23.
122291f110e0Safresh1
122391f110e0Safresh1This fixes inconsistent unixy path handling on VMS.
122491f110e0Safresh1
122591f110e0Safresh1Individual files may now appear in list of directories to be searched
122691f110e0Safresh1[perl #59750].
122791f110e0Safresh1
122891f110e0Safresh1=item *
122991f110e0Safresh1
123091f110e0Safresh1L<File::Glob> has been upgraded to 1.20.
123191f110e0Safresh1
123291f110e0Safresh1File::Glob has had exactly the same fix as File::DosGlob.  Since it is
123391f110e0Safresh1what Perl's own C<glob> operator itself uses (except on VMS), this means
123491f110e0Safresh1C<< eval 'scalar <*>' >> no longer leaks.
123591f110e0Safresh1
123691f110e0Safresh1A space-separated list of patterns return long lists of results no longer
123791f110e0Safresh1results in memory corruption or crashes.  This bug was introduced in
123891f110e0Safresh1Perl 5.16.0.  [perl #114984]
123991f110e0Safresh1
124091f110e0Safresh1=item *
124191f110e0Safresh1
124291f110e0Safresh1L<File::Spec::Unix> has been upgraded to 3.40.
124391f110e0Safresh1
124491f110e0Safresh1C<abs2rel> could produce incorrect results when given two relative paths or
124591f110e0Safresh1the root directory twice [perl #111510].
124691f110e0Safresh1
124791f110e0Safresh1=item *
124891f110e0Safresh1
124991f110e0Safresh1L<File::stat> has been upgraded to 1.07.
125091f110e0Safresh1
125191f110e0Safresh1C<File::stat> ignores the L<filetest> pragma, and warns when used in
125291f110e0Safresh1combination therewith.  But it was not warning for C<-r>.  This has been
125391f110e0Safresh1fixed [perl #111640].
125491f110e0Safresh1
125591f110e0Safresh1C<-p> now works, and does not return false for pipes [perl #111638].
125691f110e0Safresh1
125791f110e0Safresh1Previously C<File::stat>'s overloaded C<-x> and C<-X> operators did not give
125891f110e0Safresh1the correct results for directories or executable files when running as
125991f110e0Safresh1root. They had been treating executable permissions for root just like for
126091f110e0Safresh1any other user, performing group membership tests I<etc> for files not owned
126191f110e0Safresh1by root. They now follow the correct Unix behaviour - for a directory they
126291f110e0Safresh1are always true, and for a file if any of the three execute permission bits
126391f110e0Safresh1are set then they report that root can execute the file. Perl's builtin
126491f110e0Safresh1C<-x> and C<-X> operators have always been correct.
126591f110e0Safresh1
126691f110e0Safresh1=item *
126791f110e0Safresh1
126891f110e0Safresh1L<File::Temp> has been upgraded to 0.23
126991f110e0Safresh1
127091f110e0Safresh1Fixes various bugs involving directory removal.  Defers unlinking tempfiles if
127191f110e0Safresh1the initial unlink fails, which fixes problems on NFS.
127291f110e0Safresh1
127391f110e0Safresh1=item *
127491f110e0Safresh1
127591f110e0Safresh1L<GDBM_File> has been upgraded to 1.15.
127691f110e0Safresh1
127791f110e0Safresh1The undocumented optional fifth parameter to C<TIEHASH> has been
127891f110e0Safresh1removed. This was intended to provide control of the callback used by
127991f110e0Safresh1C<gdbm*> functions in case of fatal errors (such as filesystem problems),
128091f110e0Safresh1but did not work (and could never have worked). No code on CPAN even
128191f110e0Safresh1attempted to use it. The callback is now always the previous default,
128291f110e0Safresh1C<croak>. Problems on some platforms with how the C<C> C<croak> function
128391f110e0Safresh1is called have also been resolved.
128491f110e0Safresh1
128591f110e0Safresh1=item *
128691f110e0Safresh1
128791f110e0Safresh1L<Hash::Util> has been upgraded to 0.15.
128891f110e0Safresh1
128991f110e0Safresh1C<hash_unlocked> and C<hashref_unlocked> now returns true if the hash is
129091f110e0Safresh1unlocked, instead of always returning false [perl #112126].
129191f110e0Safresh1
129291f110e0Safresh1C<hash_unlocked>, C<hashref_unlocked>, C<lock_hash_recurse> and
129391f110e0Safresh1C<unlock_hash_recurse> are now exportable [perl #112126].
129491f110e0Safresh1
129591f110e0Safresh1Two new functions, C<hash_locked> and C<hashref_locked>, have been added.
129691f110e0Safresh1Oddly enough, these two functions were already exported, even though they
129791f110e0Safresh1did not exist [perl #112126].
129891f110e0Safresh1
129991f110e0Safresh1=item *
130091f110e0Safresh1
130191f110e0Safresh1L<HTTP::Tiny> has been upgraded to 0.025.
130291f110e0Safresh1
130391f110e0Safresh1Add SSL verification features [github #6], [github #9].
130491f110e0Safresh1
130591f110e0Safresh1Include the final URL in the response hashref.
130691f110e0Safresh1
130791f110e0Safresh1Add C<local_address> option.
130891f110e0Safresh1
130991f110e0Safresh1This improves SSL support.
131091f110e0Safresh1
131191f110e0Safresh1=item *
131291f110e0Safresh1
131391f110e0Safresh1L<IO> has been upgraded to 1.28.
131491f110e0Safresh1
131591f110e0Safresh1C<sync()> can now be called on read-only file handles [perl #64772].
131691f110e0Safresh1
131791f110e0Safresh1L<IO::Socket> tries harder to cache or otherwise fetch socket
131891f110e0Safresh1information.
131991f110e0Safresh1
132091f110e0Safresh1=item *
132191f110e0Safresh1
132291f110e0Safresh1L<IPC::Cmd> has been upgraded to 0.80.
132391f110e0Safresh1
132491f110e0Safresh1Use C<POSIX::_exit> instead of C<exit> in C<run_forked> [rt.cpan.org #76901].
132591f110e0Safresh1
132691f110e0Safresh1=item *
132791f110e0Safresh1
132891f110e0Safresh1L<IPC::Open3> has been upgraded to 1.13.
132991f110e0Safresh1
133091f110e0Safresh1The C<open3()> function no longer uses C<POSIX::close()> to close file
133191f110e0Safresh1descriptors since that breaks the ref-counting of file descriptors done by
133291f110e0Safresh1PerlIO in cases where the file descriptors are shared by PerlIO streams,
133391f110e0Safresh1leading to attempts to close the file descriptors a second time when
133491f110e0Safresh1any such PerlIO streams are closed later on.
133591f110e0Safresh1
133691f110e0Safresh1=item *
133791f110e0Safresh1
133891f110e0Safresh1L<Locale::Codes> has been upgraded to 3.25.
133991f110e0Safresh1
134091f110e0Safresh1It includes some new codes.
134191f110e0Safresh1
134291f110e0Safresh1=item *
134391f110e0Safresh1
134491f110e0Safresh1L<Memoize> has been upgraded to 1.03.
134591f110e0Safresh1
134691f110e0Safresh1Fix the C<MERGE> cache option.
134791f110e0Safresh1
134891f110e0Safresh1=item *
134991f110e0Safresh1
135091f110e0Safresh1L<Module::Build> has been upgraded to 0.4003.
135191f110e0Safresh1
135291f110e0Safresh1Fixed bug where modules without C<$VERSION> might have a version of '0' listed
135391f110e0Safresh1in 'provides' metadata, which will be rejected by PAUSE.
135491f110e0Safresh1
135591f110e0Safresh1Fixed bug in PodParser to allow numerals in module names.
135691f110e0Safresh1
135791f110e0Safresh1Fixed bug where giving arguments twice led to them becoming arrays, resulting
135891f110e0Safresh1in install paths like F<ARRAY(0xdeadbeef)/lib/Foo.pm>.
135991f110e0Safresh1
136091f110e0Safresh1A minor bug fix allows markup to be used around the leading "Name" in
136191f110e0Safresh1a POD "abstract" line, and some documentation improvements have been made.
136291f110e0Safresh1
136391f110e0Safresh1=item *
136491f110e0Safresh1
136591f110e0Safresh1L<Module::CoreList> has been upgraded to 2.90
136691f110e0Safresh1
136791f110e0Safresh1Version information is now stored as a delta, which greatly reduces the
136891f110e0Safresh1size of the F<CoreList.pm> file.
136991f110e0Safresh1
137091f110e0Safresh1This restores compatibility with older versions of perl and cleans up
137191f110e0Safresh1the corelist data for various modules.
137291f110e0Safresh1
137391f110e0Safresh1=item *
137491f110e0Safresh1
137591f110e0Safresh1L<Module::Load::Conditional> has been upgraded to 0.54.
137691f110e0Safresh1
137791f110e0Safresh1Fix use of C<requires> on perls installed to a path with spaces.
137891f110e0Safresh1
137991f110e0Safresh1Various enhancements include the new use of Module::Metadata.
138091f110e0Safresh1
138191f110e0Safresh1=item *
138291f110e0Safresh1
138391f110e0Safresh1L<Module::Metadata> has been upgraded to 1.000011.
138491f110e0Safresh1
138591f110e0Safresh1The creation of a Module::Metadata object for a typical module file has
138691f110e0Safresh1been sped up by about 40%, and some spurious warnings about C<$VERSION>s
138791f110e0Safresh1have been suppressed.
138891f110e0Safresh1
138991f110e0Safresh1=item *
139091f110e0Safresh1
139191f110e0Safresh1L<Module::Pluggable> has been upgraded to 4.7.
139291f110e0Safresh1
139391f110e0Safresh1Amongst other changes, triggers are now allowed on events, which gives
139491f110e0Safresh1a powerful way to modify behaviour.
139591f110e0Safresh1
139691f110e0Safresh1=item *
139791f110e0Safresh1
139891f110e0Safresh1L<Net::Ping> has been upgraded to 2.41.
139991f110e0Safresh1
140091f110e0Safresh1This fixes some test failures on Windows.
140191f110e0Safresh1
140291f110e0Safresh1=item *
140391f110e0Safresh1
140491f110e0Safresh1L<Opcode> has been upgraded to 1.25.
140591f110e0Safresh1
140691f110e0Safresh1Reflect the removal of the boolkeys opcode and the addition of the
140791f110e0Safresh1clonecv, introcv and padcv opcodes.
140891f110e0Safresh1
140991f110e0Safresh1=item *
141091f110e0Safresh1
141191f110e0Safresh1L<overload> has been upgraded to 1.22.
141291f110e0Safresh1
141391f110e0Safresh1C<no overload> now warns for invalid arguments, just like C<use overload>.
141491f110e0Safresh1
141591f110e0Safresh1=item *
141691f110e0Safresh1
141791f110e0Safresh1L<PerlIO::encoding> has been upgraded to 0.16.
141891f110e0Safresh1
141991f110e0Safresh1This is the module implementing the ":encoding(...)" I/O layer.  It no
142091f110e0Safresh1longer corrupts memory or crashes when the encoding back-end reallocates
142191f110e0Safresh1the buffer or gives it a typeglob or shared hash key scalar.
142291f110e0Safresh1
142391f110e0Safresh1=item *
142491f110e0Safresh1
142591f110e0Safresh1L<PerlIO::scalar> has been upgraded to 0.16.
142691f110e0Safresh1
14276fb12b70Safresh1The buffer scalar supplied may now only contain code points 0xFF or
142891f110e0Safresh1lower. [perl #109828]
142991f110e0Safresh1
143091f110e0Safresh1=item *
143191f110e0Safresh1
143291f110e0Safresh1L<Perl::OSType> has been upgraded to 1.003.
143391f110e0Safresh1
143491f110e0Safresh1This fixes a bug detecting the VOS operating system.
143591f110e0Safresh1
143691f110e0Safresh1=item *
143791f110e0Safresh1
143891f110e0Safresh1L<Pod::Html> has been upgraded to 1.18.
143991f110e0Safresh1
144091f110e0Safresh1The option C<--libpods> has been reinstated. It is deprecated, and its use
144191f110e0Safresh1does nothing other than issue a warning that it is no longer supported.
144291f110e0Safresh1
144391f110e0Safresh1Since the HTML files generated by pod2html claim to have a UTF-8 charset,
144491f110e0Safresh1actually write the files out using UTF-8 [perl #111446].
144591f110e0Safresh1
144691f110e0Safresh1=item *
144791f110e0Safresh1
144891f110e0Safresh1L<Pod::Simple> has been upgraded to 3.28.
144991f110e0Safresh1
145091f110e0Safresh1Numerous improvements have been made, mostly to Pod::Simple::XHTML,
145191f110e0Safresh1which also has a compatibility change: the C<codes_in_verbatim> option
145291f110e0Safresh1is now disabled by default.  See F<cpan/Pod-Simple/ChangeLog> for the
145391f110e0Safresh1full details.
145491f110e0Safresh1
145591f110e0Safresh1=item *
145691f110e0Safresh1
145791f110e0Safresh1L<re> has been upgraded to 0.23
145891f110e0Safresh1
145991f110e0Safresh1Single character [class]es like C</[s]/> or C</[s]/i> are now optimized
146091f110e0Safresh1as if they did not have the brackets, i.e. C</s/> or C</s/i>.
146191f110e0Safresh1
146291f110e0Safresh1See note about C<op_comp> in the L</Internal Changes> section below.
146391f110e0Safresh1
146491f110e0Safresh1=item *
146591f110e0Safresh1
146691f110e0Safresh1L<Safe> has been upgraded to 2.35.
146791f110e0Safresh1
146891f110e0Safresh1Fix interactions with C<Devel::Cover>.
146991f110e0Safresh1
147091f110e0Safresh1Don't eval code under C<no strict>.
147191f110e0Safresh1
147291f110e0Safresh1=item *
147391f110e0Safresh1
147491f110e0Safresh1L<Scalar::Util> has been upgraded to version 1.27.
147591f110e0Safresh1
147691f110e0Safresh1Fix an overloading issue with C<sum>.
147791f110e0Safresh1
147891f110e0Safresh1C<first> and C<reduce> now check the callback first (so C<&first(1)> is
147991f110e0Safresh1disallowed).
148091f110e0Safresh1
148191f110e0Safresh1Fix C<tainted> on magical values [rt.cpan.org #55763].
148291f110e0Safresh1
148391f110e0Safresh1Fix C<sum> on previously magical values [rt.cpan.org #61118].
148491f110e0Safresh1
148591f110e0Safresh1Fix reading past the end of a fixed buffer [rt.cpan.org #72700].
148691f110e0Safresh1
148791f110e0Safresh1=item *
148891f110e0Safresh1
148991f110e0Safresh1L<Search::Dict> has been upgraded to 1.07.
149091f110e0Safresh1
149191f110e0Safresh1No longer require C<stat> on filehandles.
149291f110e0Safresh1
149391f110e0Safresh1Use C<fc> for casefolding.
149491f110e0Safresh1
149591f110e0Safresh1=item *
149691f110e0Safresh1
149791f110e0Safresh1L<Socket> has been upgraded to 2.009.
149891f110e0Safresh1
149991f110e0Safresh1Constants and functions required for IP multicast source group membership
150091f110e0Safresh1have been added.
150191f110e0Safresh1
150291f110e0Safresh1C<unpack_sockaddr_in()> and C<unpack_sockaddr_in6()> now return just the IP
150391f110e0Safresh1address in scalar context, and C<inet_ntop()> now guards against incorrect
150491f110e0Safresh1length scalars being passed in.
150591f110e0Safresh1
150691f110e0Safresh1This fixes an uninitialized memory read.
150791f110e0Safresh1
150891f110e0Safresh1=item *
150991f110e0Safresh1
151091f110e0Safresh1L<Storable> has been upgraded to 2.41.
151191f110e0Safresh1
151291f110e0Safresh1Modifying C<$_[0]> within C<STORABLE_freeze> no longer results in crashes
151391f110e0Safresh1[perl #112358].
151491f110e0Safresh1
151591f110e0Safresh1An object whose class implements C<STORABLE_attach> is now thawed only once
151691f110e0Safresh1when there are multiple references to it in the structure being thawed
151791f110e0Safresh1[perl #111918].
151891f110e0Safresh1
151991f110e0Safresh1Restricted hashes were not always thawed correctly [perl #73972].
152091f110e0Safresh1
152191f110e0Safresh1Storable would croak when freezing a blessed REF object with a
152291f110e0Safresh1C<STORABLE_freeze()> method [perl #113880].
152391f110e0Safresh1
152491f110e0Safresh1It can now freeze and thaw vstrings correctly.  This causes a slight
152591f110e0Safresh1incompatible change in the storage format, so the format version has
152691f110e0Safresh1increased to 2.9.
152791f110e0Safresh1
152891f110e0Safresh1This contains various bugfixes, including compatibility fixes for older
152991f110e0Safresh1versions of Perl and vstring handling.
153091f110e0Safresh1
153191f110e0Safresh1=item *
153291f110e0Safresh1
153391f110e0Safresh1L<Sys::Syslog> has been upgraded to 0.32.
153491f110e0Safresh1
153591f110e0Safresh1This contains several bug fixes relating to C<getservbyname()>,
153691f110e0Safresh1C<setlogsock()>and log levels in C<syslog()>, together with fixes for
153791f110e0Safresh1Windows, Haiku-OS and GNU/kFreeBSD.  See F<cpan/Sys-Syslog/Changes>
153891f110e0Safresh1for the full details.
153991f110e0Safresh1
154091f110e0Safresh1=item *
154191f110e0Safresh1
154291f110e0Safresh1L<Term::ANSIColor> has been upgraded to 4.02.
154391f110e0Safresh1
154491f110e0Safresh1Add support for italics.
154591f110e0Safresh1
154691f110e0Safresh1Improve error handling.
154791f110e0Safresh1
154891f110e0Safresh1=item *
154991f110e0Safresh1
155091f110e0Safresh1L<Term::ReadLine> has been upgraded to 1.10.  This fixes the
155191f110e0Safresh1use of the B<cpan> and B<cpanp> shells on Windows in the event that the current
155291f110e0Safresh1drive happens to contain a F<\dev\tty> file.
155391f110e0Safresh1
155491f110e0Safresh1=item *
155591f110e0Safresh1
155691f110e0Safresh1L<Test::Harness> has been upgraded to 3.26.
155791f110e0Safresh1
155891f110e0Safresh1Fix glob semantics on Win32 [rt.cpan.org #49732].
155991f110e0Safresh1
156091f110e0Safresh1Don't use C<Win32::GetShortPathName> when calling perl [rt.cpan.org #47890].
156191f110e0Safresh1
156291f110e0Safresh1Ignore -T when reading shebang [rt.cpan.org #64404].
156391f110e0Safresh1
156491f110e0Safresh1Handle the case where we don't know the wait status of the test more
156591f110e0Safresh1gracefully.
156691f110e0Safresh1
156791f110e0Safresh1Make the test summary 'ok' line overridable so that it can be changed to a
156891f110e0Safresh1plugin to make the output of prove idempotent.
156991f110e0Safresh1
157091f110e0Safresh1Don't run world-writable files.
157191f110e0Safresh1
157291f110e0Safresh1=item *
157391f110e0Safresh1
157491f110e0Safresh1L<Text::Tabs> and L<Text::Wrap> have been upgraded to
157591f110e0Safresh12012.0818.  Support for Unicode combining characters has been added to them
157691f110e0Safresh1both.
157791f110e0Safresh1
157891f110e0Safresh1=item *
157991f110e0Safresh1
158091f110e0Safresh1L<threads::shared> has been upgraded to 1.31.
158191f110e0Safresh1
158291f110e0Safresh1This adds the option to warn about or ignore attempts to clone structures
158391f110e0Safresh1that can't be cloned, as opposed to just unconditionally dying in
158491f110e0Safresh1that case.
158591f110e0Safresh1
158691f110e0Safresh1This adds support for dual-valued values as created by
158791f110e0Safresh1L<Scalar::Util::dualvar|Scalar::Util/"dualvar NUM, STRING">.
158891f110e0Safresh1
158991f110e0Safresh1=item *
159091f110e0Safresh1
159191f110e0Safresh1L<Tie::StdHandle> has been upgraded to 4.3.
159291f110e0Safresh1
159391f110e0Safresh1C<READ> now respects the offset argument to C<read> [perl #112826].
159491f110e0Safresh1
159591f110e0Safresh1=item *
159691f110e0Safresh1
159791f110e0Safresh1L<Time::Local> has been upgraded to 1.2300.
159891f110e0Safresh1
159991f110e0Safresh1Seconds values greater than 59 but less than 60 no longer cause
160091f110e0Safresh1C<timegm()> and C<timelocal()> to croak.
160191f110e0Safresh1
160291f110e0Safresh1=item *
160391f110e0Safresh1
160491f110e0Safresh1L<Unicode::UCD> has been upgraded to 0.53.
160591f110e0Safresh1
160691f110e0Safresh1This adds a function L<all_casefolds()|Unicode::UCD/all_casefolds()>
160791f110e0Safresh1that returns all the casefolds.
160891f110e0Safresh1
160991f110e0Safresh1=item *
161091f110e0Safresh1
161191f110e0Safresh1L<Win32> has been upgraded to 0.47.
161291f110e0Safresh1
161391f110e0Safresh1New APIs have been added for getting and setting the current code page.
161491f110e0Safresh1
161591f110e0Safresh1=back
161691f110e0Safresh1
161791f110e0Safresh1
161891f110e0Safresh1=head2 Removed Modules and Pragmata
161991f110e0Safresh1
162091f110e0Safresh1=over
162191f110e0Safresh1
162291f110e0Safresh1=item *
162391f110e0Safresh1
162491f110e0Safresh1L<Version::Requirements> has been removed from the core distribution.  It is
162591f110e0Safresh1available under a different name: L<CPAN::Meta::Requirements>.
162691f110e0Safresh1
162791f110e0Safresh1=back
162891f110e0Safresh1
162991f110e0Safresh1=head1 Documentation
163091f110e0Safresh1
163191f110e0Safresh1=head2 Changes to Existing Documentation
163291f110e0Safresh1
163391f110e0Safresh1=head3 L<perlcheat>
163491f110e0Safresh1
163591f110e0Safresh1=over 4
163691f110e0Safresh1
163791f110e0Safresh1=item *
163891f110e0Safresh1
163991f110e0Safresh1L<perlcheat> has been reorganized, and a few new sections were added.
164091f110e0Safresh1
164191f110e0Safresh1=back
164291f110e0Safresh1
164391f110e0Safresh1=head3 L<perldata>
164491f110e0Safresh1
164591f110e0Safresh1=over 4
164691f110e0Safresh1
164791f110e0Safresh1=item *
164891f110e0Safresh1
164991f110e0Safresh1Now explicitly documents the behaviour of hash initializer lists that
165091f110e0Safresh1contain duplicate keys.
165191f110e0Safresh1
165291f110e0Safresh1=back
165391f110e0Safresh1
165491f110e0Safresh1=head3 L<perldiag>
165591f110e0Safresh1
165691f110e0Safresh1=over 4
165791f110e0Safresh1
165891f110e0Safresh1=item *
165991f110e0Safresh1
166091f110e0Safresh1The explanation of symbolic references being prevented by "strict refs"
166191f110e0Safresh1now doesn't assume that the reader knows what symbolic references are.
166291f110e0Safresh1
166391f110e0Safresh1=back
166491f110e0Safresh1
166591f110e0Safresh1=head3 L<perlfaq>
166691f110e0Safresh1
166791f110e0Safresh1=over 4
166891f110e0Safresh1
166991f110e0Safresh1=item *
167091f110e0Safresh1
167191f110e0Safresh1L<perlfaq> has been synchronized with version 5.0150040 from CPAN.
167291f110e0Safresh1
167391f110e0Safresh1=back
167491f110e0Safresh1
167591f110e0Safresh1=head3 L<perlfunc>
167691f110e0Safresh1
167791f110e0Safresh1=over 4
167891f110e0Safresh1
167991f110e0Safresh1=item *
168091f110e0Safresh1
168191f110e0Safresh1The return value of C<pipe> is now documented.
168291f110e0Safresh1
168391f110e0Safresh1=item *
168491f110e0Safresh1
168591f110e0Safresh1Clarified documentation of C<our>.
168691f110e0Safresh1
168791f110e0Safresh1=back
168891f110e0Safresh1
168991f110e0Safresh1=head3 L<perlop>
169091f110e0Safresh1
169191f110e0Safresh1=over 4
169291f110e0Safresh1
169391f110e0Safresh1=item *
169491f110e0Safresh1
169591f110e0Safresh1Loop control verbs (C<dump>, C<goto>, C<next>, C<last> and C<redo>) have always
169691f110e0Safresh1had the same precedence as assignment operators, but this was not documented
169791f110e0Safresh1until now.
169891f110e0Safresh1
169991f110e0Safresh1=back
170091f110e0Safresh1
170191f110e0Safresh1=head3 Diagnostics
170291f110e0Safresh1
170391f110e0Safresh1The following additions or changes have been made to diagnostic output,
170491f110e0Safresh1including warnings and fatal error messages.  For the complete list of
170591f110e0Safresh1diagnostic messages, see L<perldiag>.
170691f110e0Safresh1
170791f110e0Safresh1=head2 New Diagnostics
170891f110e0Safresh1
170991f110e0Safresh1=head3 New Errors
171091f110e0Safresh1
171191f110e0Safresh1=over 4
171291f110e0Safresh1
171391f110e0Safresh1=item *
171491f110e0Safresh1
171591f110e0Safresh1L<Unterminated delimiter for here document|perldiag/"Unterminated delimiter for here document">
171691f110e0Safresh1
171791f110e0Safresh1This message now occurs when a here document label has an initial quotation
171891f110e0Safresh1mark but the final quotation mark is missing.
171991f110e0Safresh1
172091f110e0Safresh1This replaces a bogus and misleading error message about not finding the label
172191f110e0Safresh1itself [perl #114104].
172291f110e0Safresh1
172391f110e0Safresh1=item *
172491f110e0Safresh1
172591f110e0Safresh1L<panic: child pseudo-process was never scheduled|perldiag/"panic: child pseudo-process was never scheduled">
172691f110e0Safresh1
172791f110e0Safresh1This error is thrown when a child pseudo-process in the ithreads implementation
172891f110e0Safresh1on Windows was not scheduled within the time period allowed and therefore was
172991f110e0Safresh1not able to initialize properly [perl #88840].
173091f110e0Safresh1
173191f110e0Safresh1=item *
173291f110e0Safresh1
173391f110e0Safresh1L<Group name must start with a non-digit word character in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Group name must start with a non-digit word character in regex; marked by <-- HERE in m/%s/">
173491f110e0Safresh1
173591f110e0Safresh1This error has been added for C<(?&0)>, which is invalid.  It used to
173691f110e0Safresh1produce an incomprehensible error message [perl #101666].
173791f110e0Safresh1
173891f110e0Safresh1=item *
173991f110e0Safresh1
174091f110e0Safresh1L<Can't use an undefined value as a subroutine reference|perldiag/"Can't use an undefined value as %s reference">
174191f110e0Safresh1
174291f110e0Safresh1Calling an undefined value as a subroutine now produces this error message.
174391f110e0Safresh1It used to, but was accidentally disabled, first in Perl 5.004 for
174491f110e0Safresh1non-magical variables, and then in Perl v5.14 for magical (e.g., tied)
174591f110e0Safresh1variables.  It has now been restored.  In the mean time, undef was treated
174691f110e0Safresh1as an empty string [perl #113576].
174791f110e0Safresh1
174891f110e0Safresh1=item *
174991f110e0Safresh1
175091f110e0Safresh1L<Experimental "%s" subs not enabled|perldiag/"Experimental "%s" subs not enabled">
175191f110e0Safresh1
175291f110e0Safresh1To use lexical subs, you must first enable them:
175391f110e0Safresh1
175491f110e0Safresh1    no warnings 'experimental::lexical_subs';
175591f110e0Safresh1    use feature 'lexical_subs';
175691f110e0Safresh1    my sub foo { ... }
175791f110e0Safresh1
175891f110e0Safresh1=back
175991f110e0Safresh1
176091f110e0Safresh1=head3 New Warnings
176191f110e0Safresh1
176291f110e0Safresh1=over 4
176391f110e0Safresh1
176491f110e0Safresh1=item *
176591f110e0Safresh1
176691f110e0Safresh1L<'Strings with code points over 0xFF may not be mapped into in-memory file handles'|perldiag/"Strings with code points over 0xFF may not be mapped into in-memory file handles">
176791f110e0Safresh1
176891f110e0Safresh1=item *
176991f110e0Safresh1
177091f110e0Safresh1L<'%s' resolved to '\o{%s}%d'|perldiag/"'%s' resolved to '\o{%s}%d'">
177191f110e0Safresh1
177291f110e0Safresh1=item *
177391f110e0Safresh1
177491f110e0Safresh1L<'Trailing white-space in a charnames alias definition is deprecated'|perldiag/"Trailing white-space in a charnames alias definition is deprecated">
177591f110e0Safresh1
177691f110e0Safresh1=item *
177791f110e0Safresh1
177891f110e0Safresh1L<'A sequence of multiple spaces in a charnames alias definition is deprecated'|perldiag/"A sequence of multiple spaces in a charnames alias definition is deprecated">
177991f110e0Safresh1
178091f110e0Safresh1=item *
178191f110e0Safresh1
178291f110e0Safresh1L<'Passing malformed UTF-8 to "%s" is deprecated'|perldiag/"Passing malformed UTF-8 to "%s" is deprecated">
178391f110e0Safresh1
178491f110e0Safresh1=item *
178591f110e0Safresh1
178691f110e0Safresh1L<Subroutine "&%s" is not available|perldiag/"Subroutine "&%s" is not available">
178791f110e0Safresh1
178891f110e0Safresh1(W closure) During compilation, an inner named subroutine or eval is
178991f110e0Safresh1attempting to capture an outer lexical subroutine that is not currently
179091f110e0Safresh1available.  This can happen for one of two reasons.  First, the lexical
179191f110e0Safresh1subroutine may be declared in an outer anonymous subroutine that has not
179291f110e0Safresh1yet been created.  (Remember that named subs are created at compile time,
179391f110e0Safresh1while anonymous subs are created at run-time.)  For example,
179491f110e0Safresh1
179591f110e0Safresh1    sub { my sub a {...} sub f { \&a } }
179691f110e0Safresh1
179791f110e0Safresh1At the time that f is created, it can't capture the current the "a" sub,
179891f110e0Safresh1since the anonymous subroutine hasn't been created yet.  Conversely, the
179991f110e0Safresh1following won't give a warning since the anonymous subroutine has by now
180091f110e0Safresh1been created and is live:
180191f110e0Safresh1
180291f110e0Safresh1    sub { my sub a {...} eval 'sub f { \&a }' }->();
180391f110e0Safresh1
180491f110e0Safresh1The second situation is caused by an eval accessing a variable that has
180591f110e0Safresh1gone out of scope, for example,
180691f110e0Safresh1
180791f110e0Safresh1    sub f {
180891f110e0Safresh1        my sub a {...}
180991f110e0Safresh1        sub { eval '\&a' }
181091f110e0Safresh1    }
181191f110e0Safresh1    f()->();
181291f110e0Safresh1
181391f110e0Safresh1Here, when the '\&a' in the eval is being compiled, f() is not currently
181491f110e0Safresh1being executed, so its &a is not available for capture.
181591f110e0Safresh1
181691f110e0Safresh1=item *
181791f110e0Safresh1
181891f110e0Safresh1L<"%s" subroutine &%s masks earlier declaration in same %s|perldiag/"%s" subroutine &%s masks earlier declaration in same %s>
181991f110e0Safresh1
182091f110e0Safresh1(W misc) A "my" or "state" subroutine has been redeclared in the
182191f110e0Safresh1current scope or statement, effectively eliminating all access to
182291f110e0Safresh1the previous instance.  This is almost always a typographical error.
182391f110e0Safresh1Note that the earlier subroutine will still exist until the end of
182491f110e0Safresh1the scope or until all closure references to it are destroyed.
182591f110e0Safresh1
182691f110e0Safresh1=item *
182791f110e0Safresh1
182891f110e0Safresh1L<The %s feature is experimental|perldiag/"The %s feature is experimental">
182991f110e0Safresh1
183091f110e0Safresh1(S experimental) This warning is emitted if you enable an experimental
183191f110e0Safresh1feature via C<use feature>.  Simply suppress the warning if you want
183291f110e0Safresh1to use the feature, but know that in doing so you are taking the risk
183391f110e0Safresh1of using an experimental feature which may change or be removed in a
183491f110e0Safresh1future Perl version:
183591f110e0Safresh1
183691f110e0Safresh1    no warnings "experimental::lexical_subs";
183791f110e0Safresh1    use feature "lexical_subs";
183891f110e0Safresh1
183991f110e0Safresh1=item *
184091f110e0Safresh1
184191f110e0Safresh1L<sleep(%u) too large|perldiag/"sleep(%u) too large">
184291f110e0Safresh1
184391f110e0Safresh1(W overflow) You called C<sleep> with a number that was larger than it can
184491f110e0Safresh1reliably handle and C<sleep> probably slept for less time than requested.
184591f110e0Safresh1
184691f110e0Safresh1=item *
184791f110e0Safresh1
184891f110e0Safresh1L<Wide character in setenv|perldiag/"Wide character in %s">
184991f110e0Safresh1
185091f110e0Safresh1Attempts to put wide characters into environment variables via C<%ENV> now
185191f110e0Safresh1provoke this warning.
185291f110e0Safresh1
185391f110e0Safresh1=item *
185491f110e0Safresh1
185591f110e0Safresh1"L<Invalid negative number (%s) in chr|perldiag/"Invalid negative number (%s) in chr">"
185691f110e0Safresh1
185791f110e0Safresh1C<chr()> now warns when passed a negative value [perl #83048].
185891f110e0Safresh1
185991f110e0Safresh1=item *
186091f110e0Safresh1
186191f110e0Safresh1"L<Integer overflow in srand|perldiag/"Integer overflow in srand">"
186291f110e0Safresh1
186391f110e0Safresh1C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
186491f110e0Safresh1value will be truncated rather than overflowing) [perl #40605].
186591f110e0Safresh1
186691f110e0Safresh1=item *
186791f110e0Safresh1
186891f110e0Safresh1"L<-i used with no filenames on the command line, reading from STDIN|perldiag/"-i used with no filenames on the command line, reading from STDIN">"
186991f110e0Safresh1
187091f110e0Safresh1Running perl with the C<-i> flag now warns if no input files are provided on
187191f110e0Safresh1the command line [perl #113410].
187291f110e0Safresh1
187391f110e0Safresh1=back
187491f110e0Safresh1
187591f110e0Safresh1=head2 Changes to Existing Diagnostics
187691f110e0Safresh1
187791f110e0Safresh1=over 4
187891f110e0Safresh1
187991f110e0Safresh1=item *
188091f110e0Safresh1
188191f110e0Safresh1L<$* is no longer supported|perldiag/"$* is no longer supported">
188291f110e0Safresh1
188391f110e0Safresh1The warning that use of C<$*> and C<$#> is no longer supported is now
188491f110e0Safresh1generated for every location that references them.  Previously it would fail
188591f110e0Safresh1to be generated if another variable using the same typeglob was seen first
188691f110e0Safresh1(e.g. C<@*> before C<$*>), and would not be generated for the second and
188791f110e0Safresh1subsequent uses.  (It's hard to fix the failure to generate warnings at all
188891f110e0Safresh1without also generating them every time, and warning every time is
188991f110e0Safresh1consistent with the warnings that C<$[> used to generate.)
189091f110e0Safresh1
189191f110e0Safresh1=item *
189291f110e0Safresh1
189391f110e0Safresh1The warnings for C<\b{> and C<\B{> were added.  They are a deprecation
189491f110e0Safresh1warning which should be turned off by that category.  One should not
189591f110e0Safresh1have to turn off regular regexp warnings as well to get rid of these.
189691f110e0Safresh1
189791f110e0Safresh1=item *
189891f110e0Safresh1
189991f110e0Safresh1L<Constant(%s): Call to &{$^H{%s}} did not return a defined value|perldiag/Constant(%s): Call to &{$^H{%s}} did not return a defined value>
190091f110e0Safresh1
190191f110e0Safresh1Constant overloading that returns C<undef> results in this error message.
190291f110e0Safresh1For numeric constants, it used to say "Constant(undef)".  "undef" has been
190391f110e0Safresh1replaced with the number itself.
190491f110e0Safresh1
190591f110e0Safresh1=item *
190691f110e0Safresh1
190791f110e0Safresh1The error produced when a module cannot be loaded now includes a hint that
190891f110e0Safresh1the module may need to be installed: "Can't locate hopping.pm in @INC (you
190991f110e0Safresh1may need to install the hopping module) (@INC contains: ...)"
191091f110e0Safresh1
191191f110e0Safresh1=item *
191291f110e0Safresh1
191391f110e0Safresh1L<vector argument not supported with alpha versions|perldiag/vector argument not supported with alpha versions>
191491f110e0Safresh1
19156fb12b70Safresh1This warning was not suppressible, even with C<no warnings>.  Now it is
191691f110e0Safresh1suppressible, and has been moved from the "internal" category to the
191791f110e0Safresh1"printf" category.
191891f110e0Safresh1
191991f110e0Safresh1=item *
192091f110e0Safresh1
192191f110e0Safresh1C<< Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/ >>
192291f110e0Safresh1
192391f110e0Safresh1This fatal error has been turned into a warning that reads:
192491f110e0Safresh1
192591f110e0Safresh1L<< Quantifier {n,m} with n > m can't match in regex | perldiag/Quantifier {n,m} with n > m can't match in regex >>
192691f110e0Safresh1
192791f110e0Safresh1(W regexp) Minima should be less than or equal to maxima.  If you really want
192891f110e0Safresh1your regexp to match something 0 times, just put {0}.
192991f110e0Safresh1
193091f110e0Safresh1=item *
193191f110e0Safresh1
193291f110e0Safresh1The "Runaway prototype" warning that occurs in bizarre cases has been
193391f110e0Safresh1removed as being unhelpful and inconsistent.
193491f110e0Safresh1
193591f110e0Safresh1=item *
193691f110e0Safresh1
193791f110e0Safresh1The "Not a format reference" error has been removed, as the only case in
193891f110e0Safresh1which it could be triggered was a bug.
193991f110e0Safresh1
194091f110e0Safresh1=item *
194191f110e0Safresh1
194291f110e0Safresh1The "Unable to create sub named %s" error has been removed for the same
194391f110e0Safresh1reason.
194491f110e0Safresh1
194591f110e0Safresh1=item *
194691f110e0Safresh1
194791f110e0Safresh1The 'Can't use "my %s" in sort comparison' error has been downgraded to a
194891f110e0Safresh1warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
194991f110e0Safresh1for state variables).  In addition, the heuristics for guessing whether
195091f110e0Safresh1lexical $a or $b has been misused have been improved to generate fewer
195191f110e0Safresh1false positives.  Lexical $a and $b are no longer disallowed if they are
195291f110e0Safresh1outside the sort block.  Also, a named unary or list operator inside the
195391f110e0Safresh1sort block no longer causes the $a or $b to be ignored [perl #86136].
195491f110e0Safresh1
195591f110e0Safresh1=back
195691f110e0Safresh1
195791f110e0Safresh1=head1 Utility Changes
195891f110e0Safresh1
195991f110e0Safresh1=head3 L<h2xs>
196091f110e0Safresh1
196191f110e0Safresh1=over 4
196291f110e0Safresh1
196391f110e0Safresh1=item *
196491f110e0Safresh1
196591f110e0Safresh1F<h2xs> no longer produces invalid code for empty defines.  [perl #20636]
196691f110e0Safresh1
196791f110e0Safresh1=back
196891f110e0Safresh1
196991f110e0Safresh1=head1 Configuration and Compilation
197091f110e0Safresh1
197191f110e0Safresh1=over 4
197291f110e0Safresh1
197391f110e0Safresh1=item *
197491f110e0Safresh1
197591f110e0Safresh1Added C<useversionedarchname> option to Configure
197691f110e0Safresh1
197791f110e0Safresh1When set, it includes 'api_versionstring' in 'archname'. E.g.
197891f110e0Safresh1x86_64-linux-5.13.6-thread-multi.  It is unset by default.
197991f110e0Safresh1
198091f110e0Safresh1This feature was requested by Tim Bunce, who observed that
198191f110e0Safresh1C<INSTALL_BASE> creates a library structure that does not
198291f110e0Safresh1differentiate by perl version.  Instead, it places architecture
198391f110e0Safresh1specific files in "$install_base/lib/perl5/$archname".  This makes
198491f110e0Safresh1it difficult to use a common C<INSTALL_BASE> library path with
198591f110e0Safresh1multiple versions of perl.
198691f110e0Safresh1
198791f110e0Safresh1By setting C<-Duseversionedarchname>, the $archname will be
198891f110e0Safresh1distinct for architecture I<and> API version, allowing mixed use of
198991f110e0Safresh1C<INSTALL_BASE>.
199091f110e0Safresh1
199191f110e0Safresh1=item *
199291f110e0Safresh1
199391f110e0Safresh1Add a C<PERL_NO_INLINE_FUNCTIONS> option
199491f110e0Safresh1
199591f110e0Safresh1If C<PERL_NO_INLINE_FUNCTIONS> is defined, don't include "inline.h"
199691f110e0Safresh1
199791f110e0Safresh1This permits test code to include the perl headers for definitions without
199891f110e0Safresh1creating a link dependency on the perl library (which may not exist yet).
199991f110e0Safresh1
200091f110e0Safresh1=item *
200191f110e0Safresh1
200291f110e0Safresh1Configure will honour the external C<MAILDOMAIN> environment variable, if set.
200391f110e0Safresh1
200491f110e0Safresh1=item *
200591f110e0Safresh1
200691f110e0Safresh1C<installman> no longer ignores the silent option
200791f110e0Safresh1
200891f110e0Safresh1=item *
200991f110e0Safresh1
201091f110e0Safresh1Both C<META.yml> and C<META.json> files are now included in the distribution.
201191f110e0Safresh1
201291f110e0Safresh1=item *
201391f110e0Safresh1
201491f110e0Safresh1F<Configure> will now correctly detect C<isblank()> when compiling with a C++
201591f110e0Safresh1compiler.
201691f110e0Safresh1
201791f110e0Safresh1=item *
201891f110e0Safresh1
201991f110e0Safresh1The pager detection in F<Configure> has been improved to allow responses which
202091f110e0Safresh1specify options after the program name, e.g. B</usr/bin/less -R>, if the user
202191f110e0Safresh1accepts the default value.  This helps B<perldoc> when handling ANSI escapes
202291f110e0Safresh1[perl #72156].
202391f110e0Safresh1
202491f110e0Safresh1=back
202591f110e0Safresh1
202691f110e0Safresh1=head1 Testing
202791f110e0Safresh1
202891f110e0Safresh1=over 4
202991f110e0Safresh1
203091f110e0Safresh1=item *
203191f110e0Safresh1
203291f110e0Safresh1The test suite now has a section for tests that require very large amounts
203391f110e0Safresh1of memory.  These tests won't run by default; they can be enabled by
203491f110e0Safresh1setting the C<PERL_TEST_MEMORY> environment variable to the number of
203591f110e0Safresh1gibibytes of memory that may be safely used.
203691f110e0Safresh1
203791f110e0Safresh1=back
203891f110e0Safresh1
203991f110e0Safresh1=head1 Platform Support
204091f110e0Safresh1
204191f110e0Safresh1=head2 Discontinued Platforms
204291f110e0Safresh1
204391f110e0Safresh1=over 4
204491f110e0Safresh1
204591f110e0Safresh1=item BeOS
204691f110e0Safresh1
204791f110e0Safresh1BeOS was an operating system for personal computers developed by Be Inc,
204891f110e0Safresh1initially for their BeBox hardware. The OS Haiku was written as an open
204991f110e0Safresh1source replacement for/continuation of BeOS, and its perl port is current and
205091f110e0Safresh1actively maintained.
205191f110e0Safresh1
205291f110e0Safresh1=item UTS Global
205391f110e0Safresh1
205491f110e0Safresh1Support code relating to UTS global has been removed.  UTS was a mainframe
205591f110e0Safresh1version of System V created by Amdahl, subsequently sold to UTS Global.  The
205691f110e0Safresh1port has not been touched since before Perl v5.8.0, and UTS Global is now
205791f110e0Safresh1defunct.
205891f110e0Safresh1
205991f110e0Safresh1=item VM/ESA
206091f110e0Safresh1
206191f110e0Safresh1Support for VM/ESA has been removed. The port was tested on 2.3.0, which
206291f110e0Safresh1IBM ended service on in March 2002. 2.4.0 ended service in June 2003, and
206391f110e0Safresh1was superseded by Z/VM. The current version of Z/VM is V6.2.0, and scheduled
206491f110e0Safresh1for end of service on 2015/04/30.
206591f110e0Safresh1
206691f110e0Safresh1=item MPE/IX
206791f110e0Safresh1
206891f110e0Safresh1Support for MPE/IX has been removed.
206991f110e0Safresh1
207091f110e0Safresh1=item EPOC
207191f110e0Safresh1
207291f110e0Safresh1Support code relating to EPOC has been removed.  EPOC was a family of
207391f110e0Safresh1operating systems developed by Psion for mobile devices.  It was the
207491f110e0Safresh1predecessor of Symbian.  The port was last updated in April 2002.
207591f110e0Safresh1
207691f110e0Safresh1=item Rhapsody
207791f110e0Safresh1
207891f110e0Safresh1Support for Rhapsody has been removed.
207991f110e0Safresh1
208091f110e0Safresh1=back
208191f110e0Safresh1
208291f110e0Safresh1=head2 Platform-Specific Notes
208391f110e0Safresh1
208491f110e0Safresh1=head3 AIX
208591f110e0Safresh1
208691f110e0Safresh1Configure now always adds C<-qlanglvl=extc99> to the CC flags on AIX when
208791f110e0Safresh1using xlC.  This will make it easier to compile a number of XS-based modules
208891f110e0Safresh1that assume C99 [perl #113778].
208991f110e0Safresh1
209091f110e0Safresh1=head3 clang++
209191f110e0Safresh1
209291f110e0Safresh1There is now a workaround for a compiler bug that prevented compiling
209391f110e0Safresh1with clang++ since Perl v5.15.7 [perl #112786].
209491f110e0Safresh1
209591f110e0Safresh1=head3 C++
209691f110e0Safresh1
209791f110e0Safresh1When compiling the Perl core as C++ (which is only semi-supported), the
209891f110e0Safresh1mathom functions are now compiled as C<extern "C">, to ensure proper
209991f110e0Safresh1binary compatibility.  (However, binary compatibility isn't generally
210091f110e0Safresh1guaranteed anyway in the situations where this would matter.)
210191f110e0Safresh1
210291f110e0Safresh1=head3 Darwin
210391f110e0Safresh1
210491f110e0Safresh1Stop hardcoding an alignment on 8 byte boundaries to fix builds using
210591f110e0Safresh1-Dusemorebits.
210691f110e0Safresh1
210791f110e0Safresh1=head3 Haiku
210891f110e0Safresh1
210991f110e0Safresh1Perl should now work out of the box on Haiku R1 Alpha 4.
211091f110e0Safresh1
211191f110e0Safresh1=head3 MidnightBSD
211291f110e0Safresh1
211391f110e0Safresh1C<libc_r> was removed from recent versions of MidnightBSD and older versions
211491f110e0Safresh1work better with C<pthread>. Threading is now enabled using C<pthread> which
211591f110e0Safresh1corrects build errors with threading enabled on 0.4-CURRENT.
211691f110e0Safresh1
211791f110e0Safresh1=head3 Solaris
211891f110e0Safresh1
211991f110e0Safresh1In Configure, avoid running sed commands with flags not supported on Solaris.
212091f110e0Safresh1
212191f110e0Safresh1=head3 VMS
212291f110e0Safresh1
212391f110e0Safresh1=over
212491f110e0Safresh1
212591f110e0Safresh1=item *
212691f110e0Safresh1
212791f110e0Safresh1Where possible, the case of filenames and command-line arguments is now
212891f110e0Safresh1preserved by enabling the CRTL features C<DECC$EFS_CASE_PRESERVE> and
212991f110e0Safresh1C<DECC$ARGV_PARSE_STYLE> at start-up time.  The latter only takes effect
213091f110e0Safresh1when extended parse is enabled in the process from which Perl is run.
213191f110e0Safresh1
213291f110e0Safresh1=item *
213391f110e0Safresh1
213491f110e0Safresh1The character set for Extended Filename Syntax (EFS) is now enabled by default
213591f110e0Safresh1on VMS.  Among other things, this provides better handling of dots in directory
213691f110e0Safresh1names, multiple dots in filenames, and spaces in filenames.  To obtain the old
213791f110e0Safresh1behavior, set the logical name C<DECC$EFS_CHARSET> to C<DISABLE>.
213891f110e0Safresh1
213991f110e0Safresh1=item *
214091f110e0Safresh1
214191f110e0Safresh1Fixed linking on builds configured with C<-Dusemymalloc=y>.
214291f110e0Safresh1
214391f110e0Safresh1=item *
214491f110e0Safresh1
214591f110e0Safresh1Experimental support for building Perl with the HP C++ compiler is available
214691f110e0Safresh1by configuring with C<-Dusecxx>.
214791f110e0Safresh1
214891f110e0Safresh1=item *
214991f110e0Safresh1
215091f110e0Safresh1All C header files from the top-level directory of the distribution are now
215191f110e0Safresh1installed on VMS, providing consistency with a long-standing practice on other
215291f110e0Safresh1platforms. Previously only a subset were installed, which broke non-core
215391f110e0Safresh1extension builds for extensions that depended on the missing include files.
215491f110e0Safresh1
215591f110e0Safresh1=item *
215691f110e0Safresh1
215791f110e0Safresh1Quotes are now removed from the command verb (but not the parameters) for
215891f110e0Safresh1commands spawned via C<system>, backticks, or a piped C<open>.  Previously,
215991f110e0Safresh1quotes on the verb were passed through to DCL, which would fail to recognize
216091f110e0Safresh1the command.  Also, if the verb is actually a path to an image or command
216191f110e0Safresh1procedure on an ODS-5 volume, quoting it now allows the path to contain spaces.
216291f110e0Safresh1
216391f110e0Safresh1=item *
216491f110e0Safresh1
216591f110e0Safresh1The B<a2p> build has been fixed for the HP C++ compiler on OpenVMS.
216691f110e0Safresh1
216791f110e0Safresh1=back
216891f110e0Safresh1
216991f110e0Safresh1=head3 Win32
217091f110e0Safresh1
217191f110e0Safresh1=over
217291f110e0Safresh1
217391f110e0Safresh1=item *
217491f110e0Safresh1
217591f110e0Safresh1Perl can now be built using Microsoft's Visual C++ 2012 compiler by specifying
217691f110e0Safresh1CCTYPE=MSVC110 (or MSVC110FREE if you are using the free Express edition for
217791f110e0Safresh1Windows Desktop) in F<win32/Makefile>.
217891f110e0Safresh1
217991f110e0Safresh1=item *
218091f110e0Safresh1
218191f110e0Safresh1The option to build without C<USE_SOCKETS_AS_HANDLES> has been removed.
218291f110e0Safresh1
218391f110e0Safresh1=item *
218491f110e0Safresh1
218591f110e0Safresh1Fixed a problem where perl could crash while cleaning up threads (including the
218691f110e0Safresh1main thread) in threaded debugging builds on Win32 and possibly other platforms
218791f110e0Safresh1[perl #114496].
218891f110e0Safresh1
218991f110e0Safresh1=item *
219091f110e0Safresh1
219191f110e0Safresh1A rare race condition that would lead to L<sleep|perlfunc/sleep> taking more
219291f110e0Safresh1time than requested, and possibly even hanging, has been fixed [perl #33096].
219391f110e0Safresh1
219491f110e0Safresh1=item *
219591f110e0Safresh1
219691f110e0Safresh1C<link> on Win32 now attempts to set C<$!> to more appropriate values
219791f110e0Safresh1based on the Win32 API error code. [perl #112272]
219891f110e0Safresh1
219991f110e0Safresh1Perl no longer mangles the environment block, e.g. when launching a new
220091f110e0Safresh1sub-process, when the environment contains non-ASCII characters. Known
220191f110e0Safresh1problems still remain, however, when the environment contains characters
220291f110e0Safresh1outside of the current ANSI codepage (e.g. see the item about Unicode in
220391f110e0Safresh1C<%ENV> in L<http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/todo.pod>).
220491f110e0Safresh1[perl #113536]
220591f110e0Safresh1
220691f110e0Safresh1=item *
220791f110e0Safresh1
220891f110e0Safresh1Building perl with some Windows compilers used to fail due to a problem
220991f110e0Safresh1with miniperl's C<glob> operator (which uses the C<perlglob> program)
221091f110e0Safresh1deleting the PATH environment variable [perl #113798].
221191f110e0Safresh1
221291f110e0Safresh1=item *
221391f110e0Safresh1
221491f110e0Safresh1A new makefile option, C<USE_64_BIT_INT>, has been added to the Windows
221591f110e0Safresh1makefiles.  Set this to "define" when building a 32-bit perl if you want
221691f110e0Safresh1it to use 64-bit integers.
221791f110e0Safresh1
221891f110e0Safresh1Machine code size reductions, already made to the DLLs of XS modules in
221991f110e0Safresh1Perl v5.17.2, have now been extended to the perl DLL itself.
222091f110e0Safresh1
222191f110e0Safresh1Building with VC++ 6.0 was inadvertently broken in Perl v5.17.2 but has
222291f110e0Safresh1now been fixed again.
222391f110e0Safresh1
222491f110e0Safresh1=back
222591f110e0Safresh1
222691f110e0Safresh1=head3 WinCE
222791f110e0Safresh1
222891f110e0Safresh1Building on WinCE is now possible once again, although more work is required
222991f110e0Safresh1to fully restore a clean build.
223091f110e0Safresh1
223191f110e0Safresh1=head1 Internal Changes
223291f110e0Safresh1
223391f110e0Safresh1=over
223491f110e0Safresh1
223591f110e0Safresh1=item *
223691f110e0Safresh1
223791f110e0Safresh1Synonyms for the misleadingly named C<av_len()> have been created:
223891f110e0Safresh1C<av_top_index()> and C<av_tindex>.  All three of these return the
223991f110e0Safresh1number of the highest index in the array, not the number of elements it
224091f110e0Safresh1contains.
224191f110e0Safresh1
224291f110e0Safresh1=item *
224391f110e0Safresh1
224491f110e0Safresh1SvUPGRADE() is no longer an expression. Originally this macro (and its
224591f110e0Safresh1underlying function, sv_upgrade()) were documented as boolean, although
224691f110e0Safresh1in reality they always croaked on error and never returned false. In 2005
224791f110e0Safresh1the documentation was updated to specify a void return value, but
224891f110e0Safresh1SvUPGRADE() was left always returning 1 for backwards compatibility. This
224991f110e0Safresh1has now been removed, and SvUPGRADE() is now a statement with no return
225091f110e0Safresh1value.
225191f110e0Safresh1
225291f110e0Safresh1So this is now a syntax error:
225391f110e0Safresh1
225491f110e0Safresh1    if (!SvUPGRADE(sv)) { croak(...); }
225591f110e0Safresh1
225691f110e0Safresh1If you have code like that, simply replace it with
225791f110e0Safresh1
225891f110e0Safresh1    SvUPGRADE(sv);
225991f110e0Safresh1
226091f110e0Safresh1or to avoid compiler warnings with older perls, possibly
226191f110e0Safresh1
226291f110e0Safresh1    (void)SvUPGRADE(sv);
226391f110e0Safresh1
226491f110e0Safresh1=item *
226591f110e0Safresh1
226691f110e0Safresh1Perl has a new copy-on-write mechanism that allows any SvPOK scalar to be
226791f110e0Safresh1upgraded to a copy-on-write scalar.  A reference count on the string buffer
226891f110e0Safresh1is stored in the string buffer itself.  This feature is B<not enabled by
226991f110e0Safresh1default>.
227091f110e0Safresh1
227191f110e0Safresh1It can be enabled in a perl build by running F<Configure> with
227291f110e0Safresh1B<-Accflags=-DPERL_NEW_COPY_ON_WRITE>, and we would encourage XS authors
227391f110e0Safresh1to try their code with such an enabled perl, and provide feedback.
227491f110e0Safresh1Unfortunately, there is not yet a good guide to updating XS code to cope
227591f110e0Safresh1with COW.  Until such a document is available, consult the perl5-porters
227691f110e0Safresh1mailing list.
227791f110e0Safresh1
227891f110e0Safresh1It breaks a few XS modules by allowing copy-on-write scalars to go
227991f110e0Safresh1through code paths that never encountered them before.
228091f110e0Safresh1
228191f110e0Safresh1=item *
228291f110e0Safresh1
228391f110e0Safresh1Copy-on-write no longer uses the SvFAKE and SvREADONLY flags.  Hence,
228491f110e0Safresh1SvREADONLY indicates a true read-only SV.
228591f110e0Safresh1
228691f110e0Safresh1Use the SvIsCOW macro (as before) to identify a copy-on-write scalar.
228791f110e0Safresh1
228891f110e0Safresh1=item *
228991f110e0Safresh1
229091f110e0Safresh1C<PL_glob_index> is gone.
229191f110e0Safresh1
229291f110e0Safresh1=item *
229391f110e0Safresh1
229491f110e0Safresh1The private Perl_croak_no_modify has had its context parameter removed.  It is
229591f110e0Safresh1now has a void prototype.  Users of the public API croak_no_modify remain
229691f110e0Safresh1unaffected.
229791f110e0Safresh1
229891f110e0Safresh1=item *
229991f110e0Safresh1
230091f110e0Safresh1Copy-on-write (shared hash key) scalars are no longer marked read-only.
230191f110e0Safresh1C<SvREADONLY> returns false on such an SV, but C<SvIsCOW> still returns
230291f110e0Safresh1true.
230391f110e0Safresh1
230491f110e0Safresh1=item *
230591f110e0Safresh1
230691f110e0Safresh1A new op type, C<OP_PADRANGE> has been introduced.  The perl peephole
230791f110e0Safresh1optimiser will, where possible, substitute a single padrange op for a
230891f110e0Safresh1pushmark followed by one or more pad ops, and possibly also skipping list
230991f110e0Safresh1and nextstate ops.  In addition, the op can carry out the tasks associated
231091f110e0Safresh1with the RHS of a C<< my(...) = @_ >> assignment, so those ops may be optimised
231191f110e0Safresh1away too.
231291f110e0Safresh1
231391f110e0Safresh1=item *
231491f110e0Safresh1
231591f110e0Safresh1Case-insensitive matching inside a [bracketed] character class with a
231691f110e0Safresh1multi-character fold no longer excludes one of the possibilities in the
231791f110e0Safresh1circumstances that it used to. [perl #89774].
231891f110e0Safresh1
231991f110e0Safresh1=item *
232091f110e0Safresh1
232191f110e0Safresh1C<PL_formfeed> has been removed.
232291f110e0Safresh1
232391f110e0Safresh1=item *
232491f110e0Safresh1
232591f110e0Safresh1The regular expression engine no longer reads one byte past the end of the
232691f110e0Safresh1target string.  While for all internally well-formed scalars this should
232791f110e0Safresh1never have been a problem, this change facilitates clever tricks with
232891f110e0Safresh1string buffers in CPAN modules.  [perl #73542]
232991f110e0Safresh1
233091f110e0Safresh1=item *
233191f110e0Safresh1
233291f110e0Safresh1Inside a BEGIN block, C<PL_compcv> now points to the currently-compiling
233391f110e0Safresh1subroutine, rather than the BEGIN block itself.
233491f110e0Safresh1
233591f110e0Safresh1=item *
233691f110e0Safresh1
233791f110e0Safresh1C<mg_length> has been deprecated.
233891f110e0Safresh1
233991f110e0Safresh1=item *
234091f110e0Safresh1
234191f110e0Safresh1C<sv_len> now always returns a byte count and C<sv_len_utf8> a character
234291f110e0Safresh1count.  Previously, C<sv_len> and C<sv_len_utf8> were both buggy and would
234391f110e0Safresh1sometimes returns bytes and sometimes characters.  C<sv_len_utf8> no longer
234491f110e0Safresh1assumes that its argument is in UTF-8.  Neither of these creates UTF-8 caches
234591f110e0Safresh1for tied or overloaded values or for non-PVs any more.
234691f110e0Safresh1
234791f110e0Safresh1=item *
234891f110e0Safresh1
234991f110e0Safresh1C<sv_mortalcopy> now copies string buffers of shared hash key scalars when
235091f110e0Safresh1called from XS modules [perl #79824].
235191f110e0Safresh1
235291f110e0Safresh1=item *
235391f110e0Safresh1
235491f110e0Safresh1The new C<RXf_MODIFIES_VARS> flag can be set by custom regular expression
235591f110e0Safresh1engines to indicate that the execution of the regular expression may cause
235691f110e0Safresh1variables to be modified.  This lets C<s///> know to skip certain
235791f110e0Safresh1optimisations.  Perl's own regular expression engine sets this flag for the
235891f110e0Safresh1special backtracking verbs that set $REGMARK and $REGERROR.
235991f110e0Safresh1
236091f110e0Safresh1=item *
236191f110e0Safresh1
236291f110e0Safresh1The APIs for accessing lexical pads have changed considerably.
236391f110e0Safresh1
236491f110e0Safresh1C<PADLIST>s are now longer C<AV>s, but their own type instead.
236591f110e0Safresh1C<PADLIST>s now contain a C<PAD> and a C<PADNAMELIST> of C<PADNAME>s,
236691f110e0Safresh1rather than C<AV>s for the pad and the list of pad names.  C<PAD>s,
236791f110e0Safresh1C<PADNAMELIST>s, and C<PADNAME>s are to be accessed as such through the
236891f110e0Safresh1newly added pad API instead of the plain C<AV> and C<SV> APIs.  See
236991f110e0Safresh1L<perlapi> for details.
237091f110e0Safresh1
237191f110e0Safresh1=item *
237291f110e0Safresh1
237391f110e0Safresh1In the regex API, the numbered capture callbacks are passed an index
237491f110e0Safresh1indicating what match variable is being accessed. There are special
237591f110e0Safresh1index values for the C<$`, $&, $&> variables. Previously the same three
237691f110e0Safresh1values were used to retrieve C<${^PREMATCH}, ${^MATCH}, ${^POSTMATCH}>
237791f110e0Safresh1too, but these have now been assigned three separate values. See
237891f110e0Safresh1L<perlreapi/Numbered capture callbacks>.
237991f110e0Safresh1
238091f110e0Safresh1=item *
238191f110e0Safresh1
238291f110e0Safresh1C<PL_sawampersand> was previously a boolean indicating that any of
238391f110e0Safresh1C<$`, $&, $&> had been seen; it now contains three one-bit flags
238491f110e0Safresh1indicating the presence of each of the variables individually.
238591f110e0Safresh1
238691f110e0Safresh1=item *
238791f110e0Safresh1
238891f110e0Safresh1The C<CV *> typemap entry now supports C<&{}> overloading and typeglobs,
238991f110e0Safresh1just like C<&{...}> [perl #96872].
239091f110e0Safresh1
239191f110e0Safresh1=item *
239291f110e0Safresh1
239391f110e0Safresh1The C<SVf_AMAGIC> flag to indicate overloading is now on the stash, not the
239491f110e0Safresh1object.  It is now set automatically whenever a method or @ISA changes, so
239591f110e0Safresh1its meaning has changed, too.  It now means "potentially overloaded".  When
239691f110e0Safresh1the overload table is calculated, the flag is automatically turned off if
239791f110e0Safresh1there is no overloading, so there should be no noticeable slowdown.
239891f110e0Safresh1
239991f110e0Safresh1The staleness of the overload tables is now checked when overload methods
240091f110e0Safresh1are invoked, rather than during C<bless>.
240191f110e0Safresh1
240291f110e0Safresh1"A" magic is gone.  The changes to the handling of the C<SVf_AMAGIC> flag
240391f110e0Safresh1eliminate the need for it.
240491f110e0Safresh1
240591f110e0Safresh1C<PL_amagic_generation> has been removed as no longer necessary.  For XS
240691f110e0Safresh1modules, it is now a macro alias to C<PL_na>.
240791f110e0Safresh1
240891f110e0Safresh1The fallback overload setting is now stored in a stash entry separate from
240991f110e0Safresh1overloadedness itself.
241091f110e0Safresh1
241191f110e0Safresh1=item *
241291f110e0Safresh1
241391f110e0Safresh1The character-processing code has been cleaned up in places.  The changes
241491f110e0Safresh1should be operationally invisible.
241591f110e0Safresh1
241691f110e0Safresh1=item *
241791f110e0Safresh1
241891f110e0Safresh1The C<study> function was made a no-op in v5.16.  It was simply disabled via
241991f110e0Safresh1a C<return> statement; the code was left in place.  Now the code supporting
242091f110e0Safresh1what C<study> used to do has been removed.
242191f110e0Safresh1
242291f110e0Safresh1=item *
242391f110e0Safresh1
242491f110e0Safresh1Under threaded perls, there is no longer a separate PV allocated for every
242591f110e0Safresh1COP to store its package name (C<< cop->stashpv >>).  Instead, there is an
242691f110e0Safresh1offset (C<< cop->stashoff >>) into the new C<PL_stashpad> array, which
242791f110e0Safresh1holds stash pointers.
242891f110e0Safresh1
242991f110e0Safresh1=item *
243091f110e0Safresh1
243191f110e0Safresh1In the pluggable regex API, the C<regexp_engine> struct has acquired a new
243291f110e0Safresh1field C<op_comp>, which is currently just for perl's internal use, and
243391f110e0Safresh1should be initialized to NULL by other regex plugin modules.
243491f110e0Safresh1
243591f110e0Safresh1=item *
243691f110e0Safresh1
243791f110e0Safresh1A new function C<alloccopstash> has been added to the API, but is considered
243891f110e0Safresh1experimental.  See L<perlapi>.
243991f110e0Safresh1
244091f110e0Safresh1=item *
244191f110e0Safresh1
244291f110e0Safresh1Perl used to implement get magic in a way that would sometimes hide bugs in
244391f110e0Safresh1code that could call mg_get() too many times on magical values.  This hiding of
244491f110e0Safresh1errors no longer occurs, so long-standing bugs may become visible now.  If
244591f110e0Safresh1you see magic-related errors in XS code, check to make sure it, together
244691f110e0Safresh1with the Perl API functions it uses, calls mg_get() only once on SvGMAGICAL()
244791f110e0Safresh1values.
244891f110e0Safresh1
244991f110e0Safresh1=item *
245091f110e0Safresh1
245191f110e0Safresh1OP allocation for CVs now uses a slab allocator.  This simplifies
245291f110e0Safresh1memory management for OPs allocated to a CV, so cleaning up after a
245391f110e0Safresh1compilation error is simpler and safer [perl #111462][perl #112312].
245491f110e0Safresh1
245591f110e0Safresh1=item *
245691f110e0Safresh1
245791f110e0Safresh1C<PERL_DEBUG_READONLY_OPS> has been rewritten to work with the new slab
245891f110e0Safresh1allocator, allowing it to catch more violations than before.
245991f110e0Safresh1
246091f110e0Safresh1=item *
246191f110e0Safresh1
246291f110e0Safresh1The old slab allocator for ops, which was only enabled for C<PERL_IMPLICIT_SYS>
246391f110e0Safresh1and C<PERL_DEBUG_READONLY_OPS>, has been retired.
246491f110e0Safresh1
246591f110e0Safresh1=back
246691f110e0Safresh1
246791f110e0Safresh1=head1 Selected Bug Fixes
246891f110e0Safresh1
246991f110e0Safresh1=over 4
247091f110e0Safresh1
247191f110e0Safresh1=item *
247291f110e0Safresh1
247391f110e0Safresh1Here document terminators no longer require a terminating newline character when
247491f110e0Safresh1they occur at the end of a file.  This was already the case at the end of a
247591f110e0Safresh1string eval [perl #65838].
247691f110e0Safresh1
247791f110e0Safresh1=item *
247891f110e0Safresh1
247991f110e0Safresh1C<-DPERL_GLOBAL_STRUCT> builds now free the global struct B<after>
248091f110e0Safresh1they've finished using it.
248191f110e0Safresh1
248291f110e0Safresh1=item *
248391f110e0Safresh1
248491f110e0Safresh1A trailing '/' on a path in @INC will no longer have an additional '/'
248591f110e0Safresh1appended.
248691f110e0Safresh1
248791f110e0Safresh1=item *
248891f110e0Safresh1
248991f110e0Safresh1The C<:crlf> layer now works when unread data doesn't fit into its own
249091f110e0Safresh1buffer. [perl #112244].
249191f110e0Safresh1
249291f110e0Safresh1=item *
249391f110e0Safresh1
249491f110e0Safresh1C<ungetc()> now handles UTF-8 encoded data. [perl #116322].
249591f110e0Safresh1
249691f110e0Safresh1=item *
249791f110e0Safresh1
249891f110e0Safresh1A bug in the core typemap caused any C types that map to the T_BOOL core
249991f110e0Safresh1typemap entry to not be set, updated, or modified when the T_BOOL variable was
250091f110e0Safresh1used in an OUTPUT: section with an exception for RETVAL. T_BOOL in an INPUT:
250191f110e0Safresh1section was not affected. Using a T_BOOL return type for an XSUB (RETVAL)
250291f110e0Safresh1was not affected. A side effect of fixing this bug is, if a T_BOOL is specified
250391f110e0Safresh1in the OUTPUT: section (which previous did nothing to the SV), and a read only
250491f110e0Safresh1SV (literal) is passed to the XSUB, croaks like "Modification of a read-only
250591f110e0Safresh1value attempted" will happen. [perl #115796]
250691f110e0Safresh1
250791f110e0Safresh1=item *
250891f110e0Safresh1
250991f110e0Safresh1On many platforms, providing a directory name as the script name caused perl
251091f110e0Safresh1to do nothing and report success.  It should now universally report an error
251191f110e0Safresh1and exit nonzero. [perl #61362]
251291f110e0Safresh1
251391f110e0Safresh1=item *
251491f110e0Safresh1
251591f110e0Safresh1C<sort {undef} ...> under fatal warnings no longer crashes.  It had
251691f110e0Safresh1begun crashing in Perl v5.16.
251791f110e0Safresh1
251891f110e0Safresh1=item *
251991f110e0Safresh1
252091f110e0Safresh1Stashes blessed into each other
252191f110e0Safresh1(C<bless \%Foo::, 'Bar'; bless \%Bar::, 'Foo'>) no longer result in double
252291f110e0Safresh1frees.  This bug started happening in Perl v5.16.
252391f110e0Safresh1
252491f110e0Safresh1=item *
252591f110e0Safresh1
252691f110e0Safresh1Numerous memory leaks have been fixed, mostly involving fatal warnings and
252791f110e0Safresh1syntax errors.
252891f110e0Safresh1
252991f110e0Safresh1=item *
253091f110e0Safresh1
253191f110e0Safresh1Some failed regular expression matches such as C<'f' =~ /../g> were not
253291f110e0Safresh1resetting C<pos>.  Also, "match-once" patterns (C<m?...?g>) failed to reset
253391f110e0Safresh1it, too, when invoked a second time [perl #23180].
253491f110e0Safresh1
253591f110e0Safresh1=item *
253691f110e0Safresh1
253791f110e0Safresh1Several bugs involving C<local *ISA> and C<local *Foo::> causing stale
253891f110e0Safresh1MRO caches have been fixed.
253991f110e0Safresh1
254091f110e0Safresh1=item *
254191f110e0Safresh1
254291f110e0Safresh1Defining a subroutine when its typeglob has been aliased no longer results
254391f110e0Safresh1in stale method caches.  This bug was introduced in Perl v5.10.
254491f110e0Safresh1
254591f110e0Safresh1=item *
254691f110e0Safresh1
254791f110e0Safresh1Localising a typeglob containing a subroutine when the typeglob's package
254891f110e0Safresh1has been deleted from its parent stash no longer produces an error.  This
254991f110e0Safresh1bug was introduced in Perl v5.14.
255091f110e0Safresh1
255191f110e0Safresh1=item *
255291f110e0Safresh1
255391f110e0Safresh1Under some circumstances, C<local *method=...> would fail to reset method
255491f110e0Safresh1caches upon scope exit.
255591f110e0Safresh1
255691f110e0Safresh1=item *
255791f110e0Safresh1
255891f110e0Safresh1C</[.foo.]/> is no longer an error, but produces a warning (as before) and
255991f110e0Safresh1is treated as C</[.fo]/> [perl #115818].
256091f110e0Safresh1
256191f110e0Safresh1=item *
256291f110e0Safresh1
256391f110e0Safresh1C<goto $tied_var> now calls FETCH before deciding what type of goto
256491f110e0Safresh1(subroutine or label) this is.
256591f110e0Safresh1
256691f110e0Safresh1=item *
256791f110e0Safresh1
256891f110e0Safresh1Renaming packages through glob assignment
256991f110e0Safresh1(C<*Foo:: = *Bar::; *Bar:: = *Baz::>) in combination with C<m?...?> and
257091f110e0Safresh1C<reset> no longer makes threaded builds crash.
257191f110e0Safresh1
257291f110e0Safresh1=item *
257391f110e0Safresh1
257491f110e0Safresh1A number of bugs related to assigning a list to hash have been fixed. Many of
257591f110e0Safresh1these involve lists with repeated keys like C<(1, 1, 1, 1)>.
257691f110e0Safresh1
257791f110e0Safresh1=over 4
257891f110e0Safresh1
257991f110e0Safresh1=item *
258091f110e0Safresh1
258191f110e0Safresh1The expression C<scalar(%h = (1, 1, 1, 1))> now returns C<4>, not C<2>.
258291f110e0Safresh1
258391f110e0Safresh1=item *
258491f110e0Safresh1
258591f110e0Safresh1The return value of C<%h = (1, 1, 1)> in list context was wrong. Previously
258691f110e0Safresh1this would return C<(1, undef, 1)>, now it returns C<(1, undef)>.
258791f110e0Safresh1
258891f110e0Safresh1=item *
258991f110e0Safresh1
259091f110e0Safresh1Perl now issues the same warning on C<($s, %h) = (1, {})> as it does for
259191f110e0Safresh1C<(%h) = ({})>, "Reference found where even-sized list expected".
259291f110e0Safresh1
259391f110e0Safresh1=item *
259491f110e0Safresh1
259591f110e0Safresh1A number of additional edge cases in list assignment to hashes were
259691f110e0Safresh1corrected. For more details see commit 23b7025ebc.
259791f110e0Safresh1
259891f110e0Safresh1=back
259991f110e0Safresh1
260091f110e0Safresh1=item *
260191f110e0Safresh1
260291f110e0Safresh1Attributes applied to lexical variables no longer leak memory.
260391f110e0Safresh1[perl #114764]
260491f110e0Safresh1
260591f110e0Safresh1=item *
260691f110e0Safresh1
260791f110e0Safresh1C<dump>, C<goto>, C<last>, C<next>, C<redo> or C<require> followed by a
260891f110e0Safresh1bareword (or version) and then an infix operator is no longer a syntax
260991f110e0Safresh1error.  It used to be for those infix operators (like C<+>) that have a
261091f110e0Safresh1different meaning where a term is expected.  [perl #105924]
261191f110e0Safresh1
261291f110e0Safresh1=item *
261391f110e0Safresh1
261491f110e0Safresh1C<require a::b . 1> and C<require a::b + 1> no longer produce erroneous
261591f110e0Safresh1ambiguity warnings.  [perl #107002]
261691f110e0Safresh1
261791f110e0Safresh1=item *
261891f110e0Safresh1
261991f110e0Safresh1Class method calls are now allowed on any string, and not just strings
262091f110e0Safresh1beginning with an alphanumeric character.  [perl #105922]
262191f110e0Safresh1
262291f110e0Safresh1=item *
262391f110e0Safresh1
262491f110e0Safresh1An empty pattern created with C<qr//> used in C<m///> no longer triggers
262591f110e0Safresh1the "empty pattern reuses last pattern" behaviour.  [perl #96230]
262691f110e0Safresh1
262791f110e0Safresh1=item *
262891f110e0Safresh1
262991f110e0Safresh1Tying a hash during iteration no longer results in a memory leak.
263091f110e0Safresh1
263191f110e0Safresh1=item *
263291f110e0Safresh1
263391f110e0Safresh1Freeing a tied hash during iteration no longer results in a memory leak.
263491f110e0Safresh1
263591f110e0Safresh1=item *
263691f110e0Safresh1
263791f110e0Safresh1List assignment to a tied array or hash that dies on STORE no longer
263891f110e0Safresh1results in a memory leak.
263991f110e0Safresh1
264091f110e0Safresh1=item *
264191f110e0Safresh1
264291f110e0Safresh1If the hint hash (C<%^H>) is tied, compile-time scope entry (which copies
264391f110e0Safresh1the hint hash) no longer leaks memory if FETCH dies.  [perl #107000]
264491f110e0Safresh1
264591f110e0Safresh1=item *
264691f110e0Safresh1
264791f110e0Safresh1Constant folding no longer inappropriately triggers the special
264891f110e0Safresh1C<split " "> behaviour.  [perl #94490]
264991f110e0Safresh1
265091f110e0Safresh1=item *
265191f110e0Safresh1
265291f110e0Safresh1C<defined scalar(@array)>, C<defined do { &foo }>, and similar constructs
265391f110e0Safresh1now treat the argument to C<defined> as a simple scalar.  [perl #97466]
265491f110e0Safresh1
265591f110e0Safresh1=item *
265691f110e0Safresh1
265791f110e0Safresh1Running a custom debugging that defines no C<*DB::DB> glob or provides a
265891f110e0Safresh1subroutine stub for C<&DB::DB> no longer results in a crash, but an error
265991f110e0Safresh1instead.  [perl #114990]
266091f110e0Safresh1
266191f110e0Safresh1=item *
266291f110e0Safresh1
266391f110e0Safresh1C<reset ""> now matches its documentation.  C<reset> only resets C<m?...?>
266491f110e0Safresh1patterns when called with no argument.  An empty string for an argument now
266591f110e0Safresh1does nothing.  (It used to be treated as no argument.)  [perl #97958]
266691f110e0Safresh1
266791f110e0Safresh1=item *
266891f110e0Safresh1
266991f110e0Safresh1C<printf> with an argument returning an empty list no longer reads past the
267091f110e0Safresh1end of the stack, resulting in erratic behaviour.  [perl #77094]
267191f110e0Safresh1
267291f110e0Safresh1=item *
267391f110e0Safresh1
267491f110e0Safresh1C<--subname> no longer produces erroneous ambiguity warnings.
267591f110e0Safresh1[perl #77240]
267691f110e0Safresh1
267791f110e0Safresh1=item *
267891f110e0Safresh1
267991f110e0Safresh1C<v10> is now allowed as a label or package name.  This was inadvertently
268091f110e0Safresh1broken when v-strings were added in Perl v5.6.  [perl #56880]
268191f110e0Safresh1
268291f110e0Safresh1=item *
268391f110e0Safresh1
268491f110e0Safresh1C<length>, C<pos>, C<substr> and C<sprintf> could be confused by ties,
268591f110e0Safresh1overloading, references and typeglobs if the stringification of such
268691f110e0Safresh1changed the internal representation to or from UTF-8.  [perl #114410]
268791f110e0Safresh1
268891f110e0Safresh1=item *
268991f110e0Safresh1
269091f110e0Safresh1utf8::encode now calls FETCH and STORE on tied variables.  utf8::decode now
269191f110e0Safresh1calls STORE (it was already calling FETCH).
269291f110e0Safresh1
269391f110e0Safresh1=item *
269491f110e0Safresh1
269591f110e0Safresh1C<$tied =~ s/$non_utf8/$utf8/> no longer loops infinitely if the tied
269691f110e0Safresh1variable returns a Latin-1 string, shared hash key scalar, or reference or
269791f110e0Safresh1typeglob that stringifies as ASCII or Latin-1.  This was a regression from
269891f110e0Safresh1v5.12.
269991f110e0Safresh1
270091f110e0Safresh1=item *
270191f110e0Safresh1
270291f110e0Safresh1C<s///> without /e is now better at detecting when it needs to forego
270391f110e0Safresh1certain optimisations, fixing some buggy cases:
270491f110e0Safresh1
270591f110e0Safresh1=over
270691f110e0Safresh1
270791f110e0Safresh1=item *
270891f110e0Safresh1
270991f110e0Safresh1Match variables in certain constructs (C<&&>, C<||>, C<..> and others) in
271091f110e0Safresh1the replacement part; e.g., C<s/(.)/$l{$a||$1}/g>.  [perl #26986]
271191f110e0Safresh1
271291f110e0Safresh1=item *
271391f110e0Safresh1
271491f110e0Safresh1Aliases to match variables in the replacement.
271591f110e0Safresh1
271691f110e0Safresh1=item *
271791f110e0Safresh1
271891f110e0Safresh1C<$REGERROR> or C<$REGMARK> in the replacement.  [perl #49190]
271991f110e0Safresh1
272091f110e0Safresh1=item *
272191f110e0Safresh1
272291f110e0Safresh1An empty pattern (C<s//$foo/>) that causes the last-successful pattern to
272391f110e0Safresh1be used, when that pattern contains code blocks that modify the variables
272491f110e0Safresh1in the replacement.
272591f110e0Safresh1
272691f110e0Safresh1=back
272791f110e0Safresh1
272891f110e0Safresh1=item *
272991f110e0Safresh1
273091f110e0Safresh1The taintedness of the replacement string no longer affects the taintedness
273191f110e0Safresh1of the return value of C<s///e>.
273291f110e0Safresh1
273391f110e0Safresh1=item *
273491f110e0Safresh1
273591f110e0Safresh1The C<$|> autoflush variable is created on-the-fly when needed.  If this
273691f110e0Safresh1happened (e.g., if it was mentioned in a module or eval) when the
273791f110e0Safresh1currently-selected filehandle was a typeglob with an empty IO slot, it used
273891f110e0Safresh1to crash.  [perl #115206]
273991f110e0Safresh1
274091f110e0Safresh1=item *
274191f110e0Safresh1
274291f110e0Safresh1Line numbers at the end of a string eval are no longer off by one.
274391f110e0Safresh1[perl #114658]
274491f110e0Safresh1
274591f110e0Safresh1=item *
274691f110e0Safresh1
274791f110e0Safresh1@INC filters (subroutines returned by subroutines in @INC) that set $_ to a
274891f110e0Safresh1copy-on-write scalar no longer cause the parser to modify that string
274991f110e0Safresh1buffer in place.
275091f110e0Safresh1
275191f110e0Safresh1=item *
275291f110e0Safresh1
275391f110e0Safresh1C<length($object)> no longer returns the undefined value if the object has
275491f110e0Safresh1string overloading that returns undef.  [perl #115260]
275591f110e0Safresh1
275691f110e0Safresh1=item *
275791f110e0Safresh1
275891f110e0Safresh1The use of C<PL_stashcache>, the stash name lookup cache for method calls, has
275991f110e0Safresh1been restored,
276091f110e0Safresh1
276191f110e0Safresh1Commit da6b625f78f5f133 in August 2011 inadvertently broke the code that looks
27625759b3d2Safresh1up values in C<PL_stashcache>. As it's only a cache, quite correctly everything
276391f110e0Safresh1carried on working without it.
276491f110e0Safresh1
276591f110e0Safresh1=item *
276691f110e0Safresh1
276791f110e0Safresh1The error "Can't localize through a reference" had disappeared in v5.16.0
276891f110e0Safresh1when C<local %$ref> appeared on the last line of an lvalue subroutine.
276991f110e0Safresh1This error disappeared for C<\local %$ref> in perl v5.8.1.  It has now
277091f110e0Safresh1been restored.
277191f110e0Safresh1
277291f110e0Safresh1=item *
277391f110e0Safresh1
277491f110e0Safresh1The parsing of here-docs has been improved significantly, fixing several
277591f110e0Safresh1parsing bugs and crashes and one memory leak, and correcting wrong
277691f110e0Safresh1subsequent line numbers under certain conditions.
277791f110e0Safresh1
277891f110e0Safresh1=item *
277991f110e0Safresh1
278091f110e0Safresh1Inside an eval, the error message for an unterminated here-doc no longer
278191f110e0Safresh1has a newline in the middle of it [perl #70836].
278291f110e0Safresh1
278391f110e0Safresh1=item *
278491f110e0Safresh1
278591f110e0Safresh1A substitution inside a substitution pattern (C<s/${s|||}//>) no longer
278691f110e0Safresh1confuses the parser.
278791f110e0Safresh1
278891f110e0Safresh1=item *
278991f110e0Safresh1
279091f110e0Safresh1It may be an odd place to allow comments, but C<s//"" # hello/e> has
279191f110e0Safresh1always worked, I<unless> there happens to be a null character before the
279291f110e0Safresh1first #.  Now it works even in the presence of nulls.
279391f110e0Safresh1
279491f110e0Safresh1=item *
279591f110e0Safresh1
279691f110e0Safresh1An invalid range in C<tr///> or C<y///> no longer results in a memory leak.
279791f110e0Safresh1
279891f110e0Safresh1=item *
279991f110e0Safresh1
280091f110e0Safresh1String eval no longer treats a semicolon-delimited quote-like operator at
280191f110e0Safresh1the very end (C<eval 'q;;'>) as a syntax error.
280291f110e0Safresh1
280391f110e0Safresh1=item *
280491f110e0Safresh1
280591f110e0Safresh1C<< warn {$_ => 1} + 1 >> is no longer a syntax error.  The parser used to
280691f110e0Safresh1get confused with certain list operators followed by an anonymous hash and
280791f110e0Safresh1then an infix operator that shares its form with a unary operator.
280891f110e0Safresh1
280991f110e0Safresh1=item *
281091f110e0Safresh1
281191f110e0Safresh1C<(caller $n)[6]> (which gives the text of the eval) used to return the
281291f110e0Safresh1actual parser buffer.  Modifying it could result in crashes.  Now it always
281391f110e0Safresh1returns a copy.  The string returned no longer has "\n;" tacked on to the
281491f110e0Safresh1end.  The returned text also includes here-doc bodies, which used to be
281591f110e0Safresh1omitted.
281691f110e0Safresh1
281791f110e0Safresh1=item *
281891f110e0Safresh1
281991f110e0Safresh1The UTF-8 position cache is now reset when accessing magical variables, to
282091f110e0Safresh1avoid the string buffer and the UTF-8 position cache getting out of sync
282191f110e0Safresh1[perl #114410].
282291f110e0Safresh1
282391f110e0Safresh1=item *
282491f110e0Safresh1
282591f110e0Safresh1Various cases of get magic being called twice for magical UTF-8
282691f110e0Safresh1strings have been fixed.
282791f110e0Safresh1
282891f110e0Safresh1=item *
282991f110e0Safresh1
283091f110e0Safresh1This code (when not in the presence of C<$&> etc)
283191f110e0Safresh1
283291f110e0Safresh1    $_ = 'x' x 1_000_000;
283391f110e0Safresh1    1 while /(.)/;
283491f110e0Safresh1
283591f110e0Safresh1used to skip the buffer copy for performance reasons, but suffered from C<$1>
283691f110e0Safresh1etc changing if the original string changed.  That's now been fixed.
283791f110e0Safresh1
283891f110e0Safresh1=item *
283991f110e0Safresh1
284091f110e0Safresh1Perl doesn't use PerlIO anymore to report out of memory messages, as PerlIO
284191f110e0Safresh1might attempt to allocate more memory.
284291f110e0Safresh1
284391f110e0Safresh1=item *
284491f110e0Safresh1
284591f110e0Safresh1In a regular expression, if something is quantified with C<{n,m}> where
284691f110e0Safresh1C<S<n E<gt> m>>, it can't possibly match.  Previously this was a fatal
284791f110e0Safresh1error, but now is merely a warning (and that something won't match).
284891f110e0Safresh1[perl #82954].
284991f110e0Safresh1
285091f110e0Safresh1=item *
285191f110e0Safresh1
285291f110e0Safresh1It used to be possible for formats defined in subroutines that have
285391f110e0Safresh1subsequently been undefined and redefined to close over variables in the
285491f110e0Safresh1wrong pad (the newly-defined enclosing sub), resulting in crashes or
285591f110e0Safresh1"Bizarre copy" errors.
285691f110e0Safresh1
285791f110e0Safresh1=item *
285891f110e0Safresh1
285991f110e0Safresh1Redefinition of XSUBs at run time could produce warnings with the wrong
286091f110e0Safresh1line number.
286191f110e0Safresh1
286291f110e0Safresh1=item *
286391f110e0Safresh1
286491f110e0Safresh1The %vd sprintf format does not support version objects for alpha versions.
286591f110e0Safresh1It used to output the format itself (%vd) when passed an alpha version, and
286691f110e0Safresh1also emit an "Invalid conversion in printf" warning.  It no longer does,
286791f110e0Safresh1but produces the empty string in the output.  It also no longer leaks
286891f110e0Safresh1memory in this case.
286991f110e0Safresh1
287091f110e0Safresh1=item *
287191f110e0Safresh1
287291f110e0Safresh1C<< $obj->SUPER::method >> calls in the main package could fail if the
287391f110e0Safresh1SUPER package had already been accessed by other means.
287491f110e0Safresh1
287591f110e0Safresh1=item *
287691f110e0Safresh1
287791f110e0Safresh1Stash aliasing (C<< *foo:: = *bar:: >>) no longer causes SUPER calls to ignore
287891f110e0Safresh1changes to methods or @ISA or use the wrong package.
287991f110e0Safresh1
288091f110e0Safresh1=item *
288191f110e0Safresh1
288291f110e0Safresh1Method calls on packages whose names end in ::SUPER are no longer treated
288391f110e0Safresh1as SUPER method calls, resulting in failure to find the method.
288491f110e0Safresh1Furthermore, defining subroutines in such packages no longer causes them to
288591f110e0Safresh1be found by SUPER method calls on the containing package [perl #114924].
288691f110e0Safresh1
288791f110e0Safresh1=item *
288891f110e0Safresh1
288991f110e0Safresh1C<\w> now matches the code points U+200C (ZERO WIDTH NON-JOINER) and U+200D
289091f110e0Safresh1(ZERO WIDTH JOINER).  C<\W> no longer matches these.  This change is because
289191f110e0Safresh1Unicode corrected their definition of what C<\w> should match.
289291f110e0Safresh1
289391f110e0Safresh1=item *
289491f110e0Safresh1
289591f110e0Safresh1C<dump LABEL> no longer leaks its label.
289691f110e0Safresh1
289791f110e0Safresh1=item *
289891f110e0Safresh1
289991f110e0Safresh1Constant folding no longer changes the behaviour of functions like C<stat()>
290091f110e0Safresh1and C<truncate()> that can take either filenames or handles.
290191f110e0Safresh1C<stat 1 ? foo : bar> nows treats its argument as a file name (since it is an
290291f110e0Safresh1arbitrary expression), rather than the handle "foo".
290391f110e0Safresh1
290491f110e0Safresh1=item *
290591f110e0Safresh1
290691f110e0Safresh1C<truncate FOO, $len> no longer falls back to treating "FOO" as a file name if
290791f110e0Safresh1the filehandle has been deleted.  This was broken in Perl v5.16.0.
290891f110e0Safresh1
290991f110e0Safresh1=item *
291091f110e0Safresh1
291191f110e0Safresh1Subroutine redefinitions after sub-to-glob and glob-to-glob assignments no
291291f110e0Safresh1longer cause double frees or panic messages.
291391f110e0Safresh1
291491f110e0Safresh1=item *
291591f110e0Safresh1
291691f110e0Safresh1C<s///> now turns vstrings into plain strings when performing a substitution,
291791f110e0Safresh1even if the resulting string is the same (C<s/a/a/>).
291891f110e0Safresh1
291991f110e0Safresh1=item *
292091f110e0Safresh1
292191f110e0Safresh1Prototype mismatch warnings no longer erroneously treat constant subs as having
292291f110e0Safresh1no prototype when they actually have "".
292391f110e0Safresh1
292491f110e0Safresh1=item *
292591f110e0Safresh1
292691f110e0Safresh1Constant subroutines and forward declarations no longer prevent prototype
292791f110e0Safresh1mismatch warnings from omitting the sub name.
292891f110e0Safresh1
292991f110e0Safresh1=item *
293091f110e0Safresh1
293191f110e0Safresh1C<undef> on a subroutine now clears call checkers.
293291f110e0Safresh1
293391f110e0Safresh1=item *
293491f110e0Safresh1
293591f110e0Safresh1The C<ref> operator started leaking memory on blessed objects in Perl v5.16.0.
293691f110e0Safresh1This has been fixed [perl #114340].
293791f110e0Safresh1
293891f110e0Safresh1=item *
293991f110e0Safresh1
294091f110e0Safresh1C<use> no longer tries to parse its arguments as a statement, making
294191f110e0Safresh1C<use constant { () };> a syntax error [perl #114222].
294291f110e0Safresh1
294391f110e0Safresh1=item *
294491f110e0Safresh1
294591f110e0Safresh1On debugging builds, "uninitialized" warnings inside formats no longer cause
294691f110e0Safresh1assertion failures.
294791f110e0Safresh1
294891f110e0Safresh1=item *
294991f110e0Safresh1
295091f110e0Safresh1On debugging builds, subroutines nested inside formats no longer cause
295191f110e0Safresh1assertion failures [perl #78550].
295291f110e0Safresh1
295391f110e0Safresh1=item *
295491f110e0Safresh1
295591f110e0Safresh1Formats and C<use> statements are now permitted inside formats.
295691f110e0Safresh1
295791f110e0Safresh1=item *
295891f110e0Safresh1
295991f110e0Safresh1C<print $x> and C<sub { print $x }-E<gt>()> now always produce the same output.
296091f110e0Safresh1It was possible for the latter to refuse to close over $x if the variable was
296191f110e0Safresh1not active; e.g., if it was defined outside a currently-running named
296291f110e0Safresh1subroutine.
296391f110e0Safresh1
296491f110e0Safresh1=item *
296591f110e0Safresh1
296691f110e0Safresh1Similarly, C<print $x> and C<print eval '$x'> now produce the same output.
296791f110e0Safresh1This also allows "my $x if 0" variables to be seen in the debugger [perl
296891f110e0Safresh1#114018].
296991f110e0Safresh1
297091f110e0Safresh1=item *
297191f110e0Safresh1
297291f110e0Safresh1Formats called recursively no longer stomp on their own lexical variables, but
297391f110e0Safresh1each recursive call has its own set of lexicals.
297491f110e0Safresh1
297591f110e0Safresh1=item *
297691f110e0Safresh1
297791f110e0Safresh1Attempting to free an active format or the handle associated with it no longer
297891f110e0Safresh1results in a crash.
297991f110e0Safresh1
298091f110e0Safresh1=item *
298191f110e0Safresh1
298291f110e0Safresh1Format parsing no longer gets confused by braces, semicolons and low-precedence
298391f110e0Safresh1operators.  It used to be possible to use braces as format delimiters (instead
298491f110e0Safresh1of C<=> and C<.>), but only sometimes.  Semicolons and low-precedence operators
298591f110e0Safresh1in format argument lines no longer confuse the parser into ignoring the line's
298691f110e0Safresh1return value.  In format argument lines, braces can now be used for anonymous
298791f110e0Safresh1hashes, instead of being treated always as C<do> blocks.
298891f110e0Safresh1
298991f110e0Safresh1=item *
299091f110e0Safresh1
299191f110e0Safresh1Formats can now be nested inside code blocks in regular expressions and other
299291f110e0Safresh1quoted constructs (C</(?{...})/> and C<qq/${...}/>) [perl #114040].
299391f110e0Safresh1
299491f110e0Safresh1=item *
299591f110e0Safresh1
299691f110e0Safresh1Formats are no longer created after compilation errors.
299791f110e0Safresh1
299891f110e0Safresh1=item *
299991f110e0Safresh1
300091f110e0Safresh1Under debugging builds, the B<-DA> command line option started crashing in Perl
300191f110e0Safresh1v5.16.0.  It has been fixed [perl #114368].
300291f110e0Safresh1
300391f110e0Safresh1=item *
300491f110e0Safresh1
300591f110e0Safresh1A potential deadlock scenario involving the premature termination of a pseudo-
300691f110e0Safresh1forked child in a Windows build with ithreads enabled has been fixed.  This
300791f110e0Safresh1resolves the common problem of the F<t/op/fork.t> test hanging on Windows [perl
300891f110e0Safresh1#88840].
300991f110e0Safresh1
301091f110e0Safresh1=item *
301191f110e0Safresh1
301291f110e0Safresh1The code which generates errors from C<require()> could potentially read one or
301391f110e0Safresh1two bytes before the start of the filename for filenames less than three bytes
301491f110e0Safresh1long and ending C</\.p?\z/>.  This has now been fixed.  Note that it could
301591f110e0Safresh1never have happened with module names given to C<use()> or C<require()> anyway.
301691f110e0Safresh1
301791f110e0Safresh1=item *
301891f110e0Safresh1
301991f110e0Safresh1The handling of pathnames of modules given to C<require()> has been made
302091f110e0Safresh1thread-safe on VMS.
302191f110e0Safresh1
302291f110e0Safresh1=item *
302391f110e0Safresh1
302491f110e0Safresh1Non-blocking sockets have been fixed on VMS.
302591f110e0Safresh1
302691f110e0Safresh1=item *
302791f110e0Safresh1
302891f110e0Safresh1Pod can now be nested in code inside a quoted construct outside of a string
302991f110e0Safresh1eval.  This used to work only within string evals [perl #114040].
303091f110e0Safresh1
303191f110e0Safresh1=item *
303291f110e0Safresh1
303391f110e0Safresh1C<goto ''> now looks for an empty label, producing the "goto must have
303491f110e0Safresh1label" error message, instead of exiting the program [perl #111794].
303591f110e0Safresh1
303691f110e0Safresh1=item *
303791f110e0Safresh1
303891f110e0Safresh1C<goto "\0"> now dies with "Can't find label" instead of "goto must have
303991f110e0Safresh1label".
304091f110e0Safresh1
304191f110e0Safresh1=item *
304291f110e0Safresh1
304391f110e0Safresh1The C function C<hv_store> used to result in crashes when used on C<%^H>
304491f110e0Safresh1[perl #111000].
304591f110e0Safresh1
304691f110e0Safresh1=item *
304791f110e0Safresh1
304891f110e0Safresh1A call checker attached to a closure prototype via C<cv_set_call_checker>
304991f110e0Safresh1is now copied to closures cloned from it.  So C<cv_set_call_checker> now
305091f110e0Safresh1works inside an attribute handler for a closure.
305191f110e0Safresh1
305291f110e0Safresh1=item *
305391f110e0Safresh1
305491f110e0Safresh1Writing to C<$^N> used to have no effect.  Now it croaks with "Modification
305591f110e0Safresh1of a read-only value" by default, but that can be overridden by a custom
305691f110e0Safresh1regular expression engine, as with C<$1> [perl #112184].
305791f110e0Safresh1
305891f110e0Safresh1=item *
305991f110e0Safresh1
306091f110e0Safresh1C<undef> on a control character glob (C<undef *^H>) no longer emits an
306191f110e0Safresh1erroneous warning about ambiguity [perl #112456].
306291f110e0Safresh1
306391f110e0Safresh1=item *
306491f110e0Safresh1
306591f110e0Safresh1For efficiency's sake, many operators and built-in functions return the
306691f110e0Safresh1same scalar each time.  Lvalue subroutines and subroutines in the CORE::
306791f110e0Safresh1namespace were allowing this implementation detail to leak through.
306891f110e0Safresh1C<print &CORE::uc("a"), &CORE::uc("b")> used to print "BB".  The same thing
306991f110e0Safresh1would happen with an lvalue subroutine returning the return value of C<uc>.
307091f110e0Safresh1Now the value is copied in such cases.
307191f110e0Safresh1
307291f110e0Safresh1=item *
307391f110e0Safresh1
307491f110e0Safresh1C<method {}> syntax with an empty block or a block returning an empty list
307591f110e0Safresh1used to crash or use some random value left on the stack as its invocant.
307691f110e0Safresh1Now it produces an error.
307791f110e0Safresh1
307891f110e0Safresh1=item *
307991f110e0Safresh1
308091f110e0Safresh1C<vec> now works with extremely large offsets (E<gt>2 GB) [perl #111730].
308191f110e0Safresh1
308291f110e0Safresh1=item *
308391f110e0Safresh1
308491f110e0Safresh1Changes to overload settings now take effect immediately, as do changes to
308591f110e0Safresh1inheritance that affect overloading.  They used to take effect only after
308691f110e0Safresh1C<bless>.
308791f110e0Safresh1
308891f110e0Safresh1Objects that were created before a class had any overloading used to remain
308991f110e0Safresh1non-overloaded even if the class gained overloading through C<use overload>
309091f110e0Safresh1or @ISA changes, and even after C<bless>.  This has been fixed
309191f110e0Safresh1[perl #112708].
309291f110e0Safresh1
309391f110e0Safresh1=item *
309491f110e0Safresh1
309591f110e0Safresh1Classes with overloading can now inherit fallback values.
309691f110e0Safresh1
309791f110e0Safresh1=item *
309891f110e0Safresh1
309991f110e0Safresh1Overloading was not respecting a fallback value of 0 if there were
310091f110e0Safresh1overloaded objects on both sides of an assignment operator like C<+=>
310191f110e0Safresh1[perl #111856].
310291f110e0Safresh1
310391f110e0Safresh1=item *
310491f110e0Safresh1
310591f110e0Safresh1C<pos> now croaks with hash and array arguments, instead of producing
310691f110e0Safresh1erroneous warnings.
310791f110e0Safresh1
310891f110e0Safresh1=item *
310991f110e0Safresh1
311091f110e0Safresh1C<while(each %h)> now implies C<while(defined($_ = each %h))>, like
311191f110e0Safresh1C<readline> and C<readdir>.
311291f110e0Safresh1
311391f110e0Safresh1=item *
311491f110e0Safresh1
311591f110e0Safresh1Subs in the CORE:: namespace no longer crash after C<undef *_> when called
311691f110e0Safresh1with no argument list (C<&CORE::time> with no parentheses).
311791f110e0Safresh1
311891f110e0Safresh1=item *
311991f110e0Safresh1
312091f110e0Safresh1C<unpack> no longer produces the "'/' must follow a numeric type in unpack"
312191f110e0Safresh1error when it is the data that are at fault [perl #60204].
312291f110e0Safresh1
312391f110e0Safresh1=item *
312491f110e0Safresh1
312591f110e0Safresh1C<join> and C<"@array"> now call FETCH only once on a tied C<$">
312691f110e0Safresh1[perl #8931].
312791f110e0Safresh1
312891f110e0Safresh1=item *
312991f110e0Safresh1
313091f110e0Safresh1Some subroutine calls generated by compiling core ops affected by a
313191f110e0Safresh1C<CORE::GLOBAL> override had op checking performed twice.  The checking
313291f110e0Safresh1is always idempotent for pure Perl code, but the double checking can
313391f110e0Safresh1matter when custom call checkers are involved.
313491f110e0Safresh1
313591f110e0Safresh1=item *
313691f110e0Safresh1
313791f110e0Safresh1A race condition used to exist around fork that could cause a signal sent to
313891f110e0Safresh1the parent to be handled by both parent and child. Signals are now blocked
313991f110e0Safresh1briefly around fork to prevent this from happening [perl #82580].
314091f110e0Safresh1
314191f110e0Safresh1=item *
314291f110e0Safresh1
314391f110e0Safresh1The implementation of code blocks in regular expressions, such as C<(?{})>
314491f110e0Safresh1and C<(??{})>, has been heavily reworked to eliminate a whole slew of bugs.
314591f110e0Safresh1The main user-visible changes are:
314691f110e0Safresh1
314791f110e0Safresh1=over 4
314891f110e0Safresh1
314991f110e0Safresh1=item *
315091f110e0Safresh1
315191f110e0Safresh1Code blocks within patterns are now parsed in the same pass as the
315291f110e0Safresh1surrounding code; in particular it is no longer necessary to have balanced
315391f110e0Safresh1braces: this now works:
315491f110e0Safresh1
315591f110e0Safresh1    /(?{  $x='{'  })/
315691f110e0Safresh1
315791f110e0Safresh1This means that this error message is no longer generated:
315891f110e0Safresh1
315991f110e0Safresh1    Sequence (?{...}) not terminated or not {}-balanced in regex
316091f110e0Safresh1
316191f110e0Safresh1but a new error may be seen:
316291f110e0Safresh1
316391f110e0Safresh1    Sequence (?{...}) not terminated with ')'
316491f110e0Safresh1
316591f110e0Safresh1In addition, literal code blocks within run-time patterns are only
316691f110e0Safresh1compiled once, at perl compile-time:
316791f110e0Safresh1
316891f110e0Safresh1    for my $p (...) {
316991f110e0Safresh1        # this 'FOO' block of code is compiled once,
317091f110e0Safresh1	# at the same time as the surrounding 'for' loop
317191f110e0Safresh1        /$p{(?{FOO;})/;
317291f110e0Safresh1    }
317391f110e0Safresh1
317491f110e0Safresh1=item *
317591f110e0Safresh1
317691f110e0Safresh1Lexical variables are now sane as regards scope, recursion and closure
317791f110e0Safresh1behavior. In particular, C</A(?{B})C/> behaves (from a closure viewpoint)
317891f110e0Safresh1exactly like C</A/ && do { B } && /C/>, while  C<qr/A(?{B})C/> is like
317991f110e0Safresh1C<sub {/A/ && do { B } && /C/}>. So this code now works how you might
318091f110e0Safresh1expect, creating three regexes that match 0, 1, and 2:
318191f110e0Safresh1
318291f110e0Safresh1    for my $i (0..2) {
318391f110e0Safresh1        push @r, qr/^(??{$i})$/;
318491f110e0Safresh1    }
318591f110e0Safresh1    "1" =~ $r[1]; # matches
318691f110e0Safresh1
318791f110e0Safresh1=item *
318891f110e0Safresh1
318991f110e0Safresh1The C<use re 'eval'> pragma is now only required for code blocks defined
319091f110e0Safresh1at runtime; in particular in the following, the text of the C<$r> pattern is
319191f110e0Safresh1still interpolated into the new pattern and recompiled, but the individual
319291f110e0Safresh1compiled code-blocks within C<$r> are reused rather than being recompiled,
319391f110e0Safresh1and C<use re 'eval'> isn't needed any more:
319491f110e0Safresh1
319591f110e0Safresh1    my $r = qr/abc(?{....})def/;
319691f110e0Safresh1    /xyz$r/;
319791f110e0Safresh1
319891f110e0Safresh1=item *
319991f110e0Safresh1
320091f110e0Safresh1Flow control operators no longer crash. Each code block runs in a new
320191f110e0Safresh1dynamic scope, so C<next> etc. will not see
320291f110e0Safresh1any enclosing loops. C<return> returns a value
320391f110e0Safresh1from the code block, not from any enclosing subroutine.
320491f110e0Safresh1
320591f110e0Safresh1=item *
320691f110e0Safresh1
320791f110e0Safresh1Perl normally caches the compilation of run-time patterns, and doesn't
320891f110e0Safresh1recompile if the pattern hasn't changed, but this is now disabled if
320991f110e0Safresh1required for the correct behavior of closures. For example:
321091f110e0Safresh1
321191f110e0Safresh1    my $code = '(??{$x})';
321291f110e0Safresh1    for my $x (1..3) {
321391f110e0Safresh1	# recompile to see fresh value of $x each time
321491f110e0Safresh1        $x =~ /$code/;
321591f110e0Safresh1    }
321691f110e0Safresh1
321791f110e0Safresh1=item *
321891f110e0Safresh1
321991f110e0Safresh1The C</msix> and C<(?msix)> etc. flags are now propagated into the return
322091f110e0Safresh1value from C<(??{})>; this now works:
322191f110e0Safresh1
322291f110e0Safresh1    "AB" =~ /a(??{'b'})/i;
322391f110e0Safresh1
322491f110e0Safresh1=item *
322591f110e0Safresh1
322691f110e0Safresh1Warnings and errors will appear to come from the surrounding code (or for
322791f110e0Safresh1run-time code blocks, from an eval) rather than from an C<re_eval>:
322891f110e0Safresh1
322991f110e0Safresh1    use re 'eval'; $c = '(?{ warn "foo" })'; /$c/;
323091f110e0Safresh1    /(?{ warn "foo" })/;
323191f110e0Safresh1
323291f110e0Safresh1formerly gave:
323391f110e0Safresh1
323491f110e0Safresh1    foo at (re_eval 1) line 1.
323591f110e0Safresh1    foo at (re_eval 2) line 1.
323691f110e0Safresh1
323791f110e0Safresh1and now gives:
323891f110e0Safresh1
323991f110e0Safresh1    foo at (eval 1) line 1.
324091f110e0Safresh1    foo at /some/prog line 2.
324191f110e0Safresh1
324291f110e0Safresh1=back
324391f110e0Safresh1
324491f110e0Safresh1=item *
324591f110e0Safresh1
324691f110e0Safresh1Perl now can be recompiled to use any Unicode version.  In v5.16, it
324791f110e0Safresh1worked on Unicodes 6.0 and 6.1, but there were various bugs if earlier
324891f110e0Safresh1releases were used; the older the release the more problems.
324991f110e0Safresh1
325091f110e0Safresh1=item *
325191f110e0Safresh1
325291f110e0Safresh1C<vec> no longer produces "uninitialized" warnings in lvalue context
325391f110e0Safresh1[perl #9423].
325491f110e0Safresh1
325591f110e0Safresh1=item *
325691f110e0Safresh1
325791f110e0Safresh1An optimization involving fixed strings in regular expressions could cause
325891f110e0Safresh1a severe performance penalty in edge cases.  This has been fixed
325991f110e0Safresh1[perl #76546].
326091f110e0Safresh1
326191f110e0Safresh1=item *
326291f110e0Safresh1
326391f110e0Safresh1In certain cases, including empty subpatterns within a regular expression (such
326491f110e0Safresh1as C<(?:)> or C<(?:|)>) could disable some optimizations. This has been fixed.
326591f110e0Safresh1
326691f110e0Safresh1=item *
326791f110e0Safresh1
326891f110e0Safresh1The "Can't find an opnumber" message that C<prototype> produces when passed
326991f110e0Safresh1a string like "CORE::nonexistent_keyword" now passes UTF-8 and embedded
327091f110e0Safresh1NULs through unchanged [perl #97478].
327191f110e0Safresh1
327291f110e0Safresh1=item *
327391f110e0Safresh1
327491f110e0Safresh1C<prototype> now treats magical variables like C<$1> the same way as
327591f110e0Safresh1non-magical variables when checking for the CORE:: prefix, instead of
327691f110e0Safresh1treating them as subroutine names.
327791f110e0Safresh1
327891f110e0Safresh1=item *
327991f110e0Safresh1
328091f110e0Safresh1Under threaded perls, a runtime code block in a regular expression could
328191f110e0Safresh1corrupt the package name stored in the op tree, resulting in bad reads
328291f110e0Safresh1in C<caller>, and possibly crashes [perl #113060].
328391f110e0Safresh1
328491f110e0Safresh1=item *
328591f110e0Safresh1
328691f110e0Safresh1Referencing a closure prototype (C<\&{$_[1]}> in an attribute handler for a
328791f110e0Safresh1closure) no longer results in a copy of the subroutine (or assertion
328891f110e0Safresh1failures on debugging builds).
328991f110e0Safresh1
329091f110e0Safresh1=item *
329191f110e0Safresh1
329291f110e0Safresh1C<eval '__PACKAGE__'> now returns the right answer on threaded builds if
329391f110e0Safresh1the current package has been assigned over (as in
329491f110e0Safresh1C<*ThisPackage:: = *ThatPackage::>) [perl #78742].
329591f110e0Safresh1
329691f110e0Safresh1=item *
329791f110e0Safresh1
329891f110e0Safresh1If a package is deleted by code that it calls, it is possible for C<caller>
329991f110e0Safresh1to see a stack frame belonging to that deleted package.  C<caller> could
330091f110e0Safresh1crash if the stash's memory address was reused for a scalar and a
330191f110e0Safresh1substitution was performed on the same scalar [perl #113486].
330291f110e0Safresh1
330391f110e0Safresh1=item *
330491f110e0Safresh1
330591f110e0Safresh1C<UNIVERSAL::can> no longer treats its first argument differently
330691f110e0Safresh1depending on whether it is a string or number internally.
330791f110e0Safresh1
330891f110e0Safresh1=item *
330991f110e0Safresh1
331091f110e0Safresh1C<open> with C<< <& >> for the mode checks to see whether the third argument is
331191f110e0Safresh1a number, in determining whether to treat it as a file descriptor or a handle
331291f110e0Safresh1name.  Magical variables like C<$1> were always failing the numeric check and
331391f110e0Safresh1being treated as handle names.
331491f110e0Safresh1
331591f110e0Safresh1=item *
331691f110e0Safresh1
331791f110e0Safresh1C<warn>'s handling of magical variables (C<$1>, ties) has undergone several
331891f110e0Safresh1fixes.  C<FETCH> is only called once now on a tied argument or a tied C<$@>
331991f110e0Safresh1[perl #97480].  Tied variables returning objects that stringify as "" are
332091f110e0Safresh1no longer ignored.  A tied C<$@> that happened to return a reference the
332191f110e0Safresh1I<previous> time it was used is no longer ignored.
332291f110e0Safresh1
332391f110e0Safresh1=item *
332491f110e0Safresh1
332591f110e0Safresh1C<warn ""> now treats C<$@> with a number in it the same way, regardless of
332691f110e0Safresh1whether it happened via C<$@=3> or C<$@="3">.  It used to ignore the
332791f110e0Safresh1former.  Now it appends "\t...caught", as it has always done with
332891f110e0Safresh1C<$@="3">.
332991f110e0Safresh1
333091f110e0Safresh1=item *
333191f110e0Safresh1
333291f110e0Safresh1Numeric operators on magical variables (e.g., S<C<$1 + 1>>) used to use
333391f110e0Safresh1floating point operations even where integer operations were more appropriate,
333491f110e0Safresh1resulting in loss of accuracy on 64-bit platforms [perl #109542].
333591f110e0Safresh1
333691f110e0Safresh1=item *
333791f110e0Safresh1
333891f110e0Safresh1Unary negation no longer treats a string as a number if the string happened
333991f110e0Safresh1to be used as a number at some point.  So, if C<$x> contains the string "dogs",
334091f110e0Safresh1C<-$x> returns "-dogs" even if C<$y=0+$x> has happened at some point.
334191f110e0Safresh1
334291f110e0Safresh1=item *
334391f110e0Safresh1
334491f110e0Safresh1In Perl v5.14, C<-'-10'> was fixed to return "10", not "+10".  But magical
334591f110e0Safresh1variables (C<$1>, ties) were not fixed till now [perl #57706].
334691f110e0Safresh1
334791f110e0Safresh1=item *
334891f110e0Safresh1
334991f110e0Safresh1Unary negation now treats strings consistently, regardless of the internal
335091f110e0Safresh1C<UTF8> flag.
335191f110e0Safresh1
335291f110e0Safresh1=item *
335391f110e0Safresh1
335491f110e0Safresh1A regression introduced in Perl v5.16.0 involving
335591f110e0Safresh1C<tr/I<SEARCHLIST>/I<REPLACEMENTLIST>/> has been fixed.  Only the first
335691f110e0Safresh1instance is supposed to be meaningful if a character appears more than
335791f110e0Safresh1once in C<I<SEARCHLIST>>.  Under some circumstances, the final instance
335891f110e0Safresh1was overriding all earlier ones.  [perl #113584]
335991f110e0Safresh1
336091f110e0Safresh1=item *
336191f110e0Safresh1
336291f110e0Safresh1Regular expressions like C<qr/\87/> previously silently inserted a NUL
336391f110e0Safresh1character, thus matching as if it had been written C<qr/\00087/>.  Now it
336491f110e0Safresh1matches as if it had been written as C<qr/87/>, with a message that the
336591f110e0Safresh1sequence C<"\8"> is unrecognized.
336691f110e0Safresh1
336791f110e0Safresh1=item *
336891f110e0Safresh1
336991f110e0Safresh1C<__SUB__> now works in special blocks (C<BEGIN>, C<END>, etc.).
337091f110e0Safresh1
337191f110e0Safresh1=item *
337291f110e0Safresh1
337391f110e0Safresh1Thread creation on Windows could theoretically result in a crash if done
337491f110e0Safresh1inside a C<BEGIN> block.  It still does not work properly, but it no longer
337591f110e0Safresh1crashes [perl #111610].
337691f110e0Safresh1
337791f110e0Safresh1=item *
337891f110e0Safresh1
337991f110e0Safresh1C<\&{''}> (with the empty string) now autovivifies a stub like any other
338091f110e0Safresh1sub name, and no longer produces the "Unable to create sub" error
338191f110e0Safresh1[perl #94476].
338291f110e0Safresh1
338391f110e0Safresh1=item *
338491f110e0Safresh1
338591f110e0Safresh1A regression introduced in v5.14.0 has been fixed, in which some calls
338691f110e0Safresh1to the C<re> module would clobber C<$_> [perl #113750].
338791f110e0Safresh1
338891f110e0Safresh1=item *
338991f110e0Safresh1
339091f110e0Safresh1C<do FILE> now always either sets or clears C<$@>, even when the file can't be
339191f110e0Safresh1read. This ensures that testing C<$@> first (as recommended by the
339291f110e0Safresh1documentation) always returns the correct result.
339391f110e0Safresh1
339491f110e0Safresh1=item *
339591f110e0Safresh1
339691f110e0Safresh1The array iterator used for the C<each @array> construct is now correctly
339791f110e0Safresh1reset when C<@array> is cleared [perl #75596]. This happens, for example, when
339891f110e0Safresh1the array is globally assigned to, as in C<@array = (...)>, but not when its
339991f110e0Safresh1B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
340091f110e0Safresh1will now reset the iterator.
340191f110e0Safresh1
340291f110e0Safresh1This mirrors the behaviour of the hash iterator when the hash is cleared.
340391f110e0Safresh1
340491f110e0Safresh1=item *
340591f110e0Safresh1
340691f110e0Safresh1C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
340791f110e0Safresh1correct results, regardless of whether that package referred to by C<$class>
340891f110e0Safresh1exists [perl #47113].
340991f110e0Safresh1
341091f110e0Safresh1=item *
341191f110e0Safresh1
341291f110e0Safresh1Arriving signals no longer clear C<$@> [perl #45173].
341391f110e0Safresh1
341491f110e0Safresh1=item *
341591f110e0Safresh1
341691f110e0Safresh1Allow C<my ()> declarations with an empty variable list [perl #113554].
341791f110e0Safresh1
341891f110e0Safresh1=item *
341991f110e0Safresh1
342091f110e0Safresh1During parsing, subs declared after errors no longer leave stubs
342191f110e0Safresh1[perl #113712].
342291f110e0Safresh1
342391f110e0Safresh1=item *
342491f110e0Safresh1
342591f110e0Safresh1Closures containing no string evals no longer hang on to their containing
342691f110e0Safresh1subroutines, allowing variables closed over by outer subroutines to be
342791f110e0Safresh1freed when the outer sub is freed, even if the inner sub still exists
342891f110e0Safresh1[perl #89544].
342991f110e0Safresh1
343091f110e0Safresh1=item *
343191f110e0Safresh1
343291f110e0Safresh1Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
343391f110e0Safresh1stopped working properly in v5.16.0.  It was causing the new handle to
343491f110e0Safresh1reference a different scalar variable.  This has been fixed [perl #113764].
343591f110e0Safresh1
343691f110e0Safresh1=item *
343791f110e0Safresh1
343891f110e0Safresh1C<qr//> expressions no longer crash with custom regular expression engines
343991f110e0Safresh1that do not set C<offs> at regular expression compilation time
344091f110e0Safresh1[perl #112962].
344191f110e0Safresh1
344291f110e0Safresh1=item *
344391f110e0Safresh1
344491f110e0Safresh1C<delete local> no longer crashes with certain magical arrays and hashes
344591f110e0Safresh1[perl #112966].
344691f110e0Safresh1
344791f110e0Safresh1=item *
344891f110e0Safresh1
344991f110e0Safresh1C<local> on elements of certain magical arrays and hashes used not to
345091f110e0Safresh1arrange to have the element deleted on scope exit, even if the element did
345191f110e0Safresh1not exist before C<local>.
345291f110e0Safresh1
345391f110e0Safresh1=item *
345491f110e0Safresh1
345591f110e0Safresh1C<scalar(write)> no longer returns multiple items [perl #73690].
345691f110e0Safresh1
345791f110e0Safresh1=item *
345891f110e0Safresh1
345991f110e0Safresh1String to floating point conversions no longer misparse certain strings under
346091f110e0Safresh1C<use locale> [perl #109318].
346191f110e0Safresh1
346291f110e0Safresh1=item *
346391f110e0Safresh1
346491f110e0Safresh1C<@INC> filters that die no longer leak memory [perl #92252].
346591f110e0Safresh1
346691f110e0Safresh1=item *
346791f110e0Safresh1
346891f110e0Safresh1The implementations of overloaded operations are now called in the correct
346991f110e0Safresh1context. This allows, among other things, being able to properly override
347091f110e0Safresh1C<< <> >> [perl #47119].
347191f110e0Safresh1
347291f110e0Safresh1=item *
347391f110e0Safresh1
347491f110e0Safresh1Specifying only the C<fallback> key when calling C<use overload> now behaves
347591f110e0Safresh1properly [perl #113010].
347691f110e0Safresh1
347791f110e0Safresh1=item *
347891f110e0Safresh1
347991f110e0Safresh1C<< sub foo { my $a = 0; while ($a) { ... } } >> and
348091f110e0Safresh1C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
348191f110e0Safresh1
348291f110e0Safresh1=item *
348391f110e0Safresh1
348491f110e0Safresh1String negation now behaves the same under C<use integer;> as it does
348591f110e0Safresh1without [perl #113012].
348691f110e0Safresh1
348791f110e0Safresh1=item *
348891f110e0Safresh1
348991f110e0Safresh1C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
349091f110e0Safresh1regardless of the internal representation.  -1 used to wrap if the argument
349191f110e0Safresh1was tied or a string internally.
349291f110e0Safresh1
349391f110e0Safresh1=item *
349491f110e0Safresh1
349591f110e0Safresh1Using a C<format> after its enclosing sub was freed could crash as of
349691f110e0Safresh1perl v5.12.0, if the format referenced lexical variables from the outer sub.
349791f110e0Safresh1
349891f110e0Safresh1=item *
349991f110e0Safresh1
350091f110e0Safresh1Using a C<format> after its enclosing sub was undefined could crash as of
350191f110e0Safresh1perl v5.10.0, if the format referenced lexical variables from the outer sub.
350291f110e0Safresh1
350391f110e0Safresh1=item *
350491f110e0Safresh1
350591f110e0Safresh1Using a C<format> defined inside a closure, which format references
350691f110e0Safresh1lexical variables from outside, never really worked unless the C<write>
350791f110e0Safresh1call was directly inside the closure.  In v5.10.0 it even started crashing.
350891f110e0Safresh1Now the copy of that closure nearest the top of the call stack is used to
350991f110e0Safresh1find those variables.
351091f110e0Safresh1
351191f110e0Safresh1=item *
351291f110e0Safresh1
351391f110e0Safresh1Formats that close over variables in special blocks no longer crash if a
351491f110e0Safresh1stub exists with the same name as the special block before the special
351591f110e0Safresh1block is compiled.
351691f110e0Safresh1
351791f110e0Safresh1=item *
351891f110e0Safresh1
351991f110e0Safresh1The parser no longer gets confused, treating C<eval foo ()> as a syntax
352091f110e0Safresh1error if preceded by C<print;> [perl #16249].
352191f110e0Safresh1
352291f110e0Safresh1=item *
352391f110e0Safresh1
352491f110e0Safresh1The return value of C<syscall> is no longer truncated on 64-bit platforms
352591f110e0Safresh1[perl #113980].
352691f110e0Safresh1
352791f110e0Safresh1=item *
352891f110e0Safresh1
352991f110e0Safresh1Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
353091f110e0Safresh1FOO handle [perl #78064].
353191f110e0Safresh1
353291f110e0Safresh1=item *
353391f110e0Safresh1
353491f110e0Safresh1C<do subname> now calls the named subroutine and uses the file name it
353591f110e0Safresh1returns, instead of opening a file named "subname".
353691f110e0Safresh1
353791f110e0Safresh1=item *
353891f110e0Safresh1
353991f110e0Safresh1Subroutines looked up by rv2cv check hooks (registered by XS modules) are
354091f110e0Safresh1now taken into consideration when determining whether C<foo bar> should be
354191f110e0Safresh1the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
354291f110e0Safresh1
354391f110e0Safresh1=item *
354491f110e0Safresh1
354591f110e0Safresh1C<CORE::foo::bar> is no longer treated specially, allowing global overrides
354691f110e0Safresh1to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
354791f110e0Safresh1
354891f110e0Safresh1=item *
354991f110e0Safresh1
355091f110e0Safresh1Calling an undefined sub whose typeglob has been undefined now produces the
355191f110e0Safresh1customary "Undefined subroutine called" error, instead of "Not a CODE
355291f110e0Safresh1reference".
355391f110e0Safresh1
355491f110e0Safresh1=item *
355591f110e0Safresh1
355691f110e0Safresh1Two bugs involving @ISA have been fixed.  C<*ISA = *glob_without_array> and
355791f110e0Safresh1C<undef *ISA; @{*ISA}> would prevent future modifications to @ISA from
355891f110e0Safresh1updating the internal caches used to look up methods.  The
355991f110e0Safresh1*glob_without_array case was a regression from Perl v5.12.
356091f110e0Safresh1
356191f110e0Safresh1=item *
356291f110e0Safresh1
356391f110e0Safresh1Regular expression optimisations sometimes caused C<$> with C</m> to
356491f110e0Safresh1produce failed or incorrect matches [perl #114068].
356591f110e0Safresh1
356691f110e0Safresh1=item *
356791f110e0Safresh1
356891f110e0Safresh1C<__SUB__> now works in a C<sort> block when the enclosing subroutine is
356991f110e0Safresh1predeclared with C<sub foo;> syntax [perl #113710].
357091f110e0Safresh1
357191f110e0Safresh1=item *
357291f110e0Safresh1
357391f110e0Safresh1Unicode properties only apply to Unicode code points, which leads to
357491f110e0Safresh1some subtleties when regular expressions are matched against
357591f110e0Safresh1above-Unicode code points.  There is a warning generated to draw your
357691f110e0Safresh1attention to this.  However, this warning was being generated
357791f110e0Safresh1inappropriately in some cases, such as when a program was being parsed.
357891f110e0Safresh1Non-Unicode matches such as C<\w> and C<[:word:]> should not generate the
357991f110e0Safresh1warning, as their definitions don't limit them to apply to only Unicode
358091f110e0Safresh1code points.  Now the message is only generated when matching against
358191f110e0Safresh1C<\p{}> and C<\P{}>.  There remains a bug, [perl #114148], for the very
358291f110e0Safresh1few properties in Unicode that match just a single code point.  The
358391f110e0Safresh1warning is not generated if they are matched against an above-Unicode
358491f110e0Safresh1code point.
358591f110e0Safresh1
358691f110e0Safresh1=item *
358791f110e0Safresh1
358891f110e0Safresh1Uninitialized warnings mentioning hash elements would only mention the
358991f110e0Safresh1element name if it was not in the first bucket of the hash, due to an
359091f110e0Safresh1off-by-one error.
359191f110e0Safresh1
359291f110e0Safresh1=item *
359391f110e0Safresh1
359491f110e0Safresh1A regular expression optimizer bug could cause multiline "^" to behave
359591f110e0Safresh1incorrectly in the presence of line breaks, such that
359691f110e0Safresh1C<"/\n\n" =~ m#\A(?:^/$)#im> would not match [perl #115242].
359791f110e0Safresh1
359891f110e0Safresh1=item *
359991f110e0Safresh1
360091f110e0Safresh1Failed C<fork> in list context no longer corrupts the stack.
360191f110e0Safresh1C<@a = (1, 2, fork, 3)> used to gobble up the 2 and assign C<(1, undef, 3)>
360291f110e0Safresh1if the C<fork> call failed.
360391f110e0Safresh1
360491f110e0Safresh1=item *
360591f110e0Safresh1
360691f110e0Safresh1Numerous memory leaks have been fixed, mostly involving tied variables that
360791f110e0Safresh1die, regular expression character classes and code blocks, and syntax
360891f110e0Safresh1errors.
360991f110e0Safresh1
361091f110e0Safresh1=item *
361191f110e0Safresh1
361291f110e0Safresh1Assigning a regular expression (C<${qr//}>) to a variable that happens to
361391f110e0Safresh1hold a floating point number no longer causes assertion failures on
361491f110e0Safresh1debugging builds.
361591f110e0Safresh1
361691f110e0Safresh1=item *
361791f110e0Safresh1
361891f110e0Safresh1Assigning a regular expression to a scalar containing a number no longer
361991f110e0Safresh1causes subsequent numification to produce random numbers.
362091f110e0Safresh1
362191f110e0Safresh1=item *
362291f110e0Safresh1
362391f110e0Safresh1Assigning a regular expression to a magic variable no longer wipes away the
362491f110e0Safresh1magic.  This was a regression from v5.10.
362591f110e0Safresh1
362691f110e0Safresh1=item *
362791f110e0Safresh1
362891f110e0Safresh1Assigning a regular expression to a blessed scalar no longer results in
362991f110e0Safresh1crashes.  This was also a regression from v5.10.
363091f110e0Safresh1
363191f110e0Safresh1=item *
363291f110e0Safresh1
363391f110e0Safresh1Regular expression can now be assigned to tied hash and array elements with
363491f110e0Safresh1flattening into strings.
363591f110e0Safresh1
363691f110e0Safresh1=item *
363791f110e0Safresh1
363891f110e0Safresh1Numifying a regular expression no longer results in an uninitialized
363991f110e0Safresh1warning.
364091f110e0Safresh1
364191f110e0Safresh1=item *
364291f110e0Safresh1
364391f110e0Safresh1Negative array indices no longer cause EXISTS methods of tied variables to
364491f110e0Safresh1be ignored.  This was a regression from v5.12.
364591f110e0Safresh1
364691f110e0Safresh1=item *
364791f110e0Safresh1
364891f110e0Safresh1Negative array indices no longer result in crashes on arrays tied to
364991f110e0Safresh1non-objects.
365091f110e0Safresh1
365191f110e0Safresh1=item *
365291f110e0Safresh1
365391f110e0Safresh1C<$byte_overload .= $utf8> no longer results in doubly-encoded UTF-8 if the
365491f110e0Safresh1left-hand scalar happened to have produced a UTF-8 string the last time
365591f110e0Safresh1overloading was invoked.
365691f110e0Safresh1
365791f110e0Safresh1=item *
365891f110e0Safresh1
365991f110e0Safresh1C<goto &sub> now uses the current value of @_, instead of using the array
366091f110e0Safresh1the subroutine was originally called with.  This means
366191f110e0Safresh1C<local @_ = (...); goto &sub> now works [perl #43077].
366291f110e0Safresh1
366391f110e0Safresh1=item *
366491f110e0Safresh1
366591f110e0Safresh1If a debugger is invoked recursively, it no longer stomps on its own
366691f110e0Safresh1lexical variables.  Formerly under recursion all calls would share the same
366791f110e0Safresh1set of lexical variables [perl #115742].
366891f110e0Safresh1
366991f110e0Safresh1=item *
367091f110e0Safresh1
367191f110e0Safresh1C<*_{ARRAY}> returned from a subroutine no longer spontaneously
367291f110e0Safresh1becomes empty.
367391f110e0Safresh1
367491f110e0Safresh1=item *
367591f110e0Safresh1
367691f110e0Safresh1When using C<say> to print to a tied filehandle, the value of C<$\> is
367791f110e0Safresh1correctly localized, even if it was previously undef.  [perl #119927]
367891f110e0Safresh1
367991f110e0Safresh1=back
368091f110e0Safresh1
368191f110e0Safresh1=head1 Known Problems
368291f110e0Safresh1
368391f110e0Safresh1=over 4
368491f110e0Safresh1
368591f110e0Safresh1=item *
368691f110e0Safresh1
368791f110e0Safresh1UTF8-flagged strings in C<%ENV> on HP-UX 11.00 are buggy
368891f110e0Safresh1
368991f110e0Safresh1The interaction of UTF8-flagged strings and C<%ENV> on HP-UX 11.00 is
369091f110e0Safresh1currently dodgy in some not-yet-fully-diagnosed way.  Expect test
369191f110e0Safresh1failures in F<t/op/magic.t>, followed by unknown behavior when storing
369291f110e0Safresh1wide characters in the environment.
369391f110e0Safresh1
369491f110e0Safresh1=back
369591f110e0Safresh1
369691f110e0Safresh1=head1 Obituary
369791f110e0Safresh1
369891f110e0Safresh1Hojung Yoon (AMORETTE), 24, of Seoul, South Korea, went to his long rest
369991f110e0Safresh1on May 8, 2013 with llama figurine and autographed TIMTOADY card.  He
370091f110e0Safresh1was a brilliant young Perl 5 & 6 hacker and a devoted member of
370191f110e0Safresh1Seoul.pm.  He programmed Perl, talked Perl, ate Perl, and loved Perl.  We
370291f110e0Safresh1believe that he is still programming in Perl with his broken IBM laptop
370391f110e0Safresh1somewhere.  He will be missed.
370491f110e0Safresh1
370591f110e0Safresh1=head1 Acknowledgements
370691f110e0Safresh1
370791f110e0Safresh1Perl v5.18.0 represents approximately 12 months of development since
370891f110e0Safresh1Perl v5.16.0 and contains approximately 400,000 lines of changes across
370991f110e0Safresh12,100 files from 113 authors.
371091f110e0Safresh1
371191f110e0Safresh1Perl continues to flourish into its third decade thanks to a vibrant
371291f110e0Safresh1community of users and developers. The following people are known to
371391f110e0Safresh1have contributed the improvements that became Perl v5.18.0:
371491f110e0Safresh1
371591f110e0Safresh1Aaron Crane, Aaron Trevena, Abhijit Menon-Sen, Adrian M. Enache, Alan
371691f110e0Safresh1Haggai Alavi, Alexandr Ciornii, Andrew Tam, Andy Dougherty, Anton Nikishaev,
371791f110e0Safresh1Aristotle Pagaltzis, Augustina Blair, Bob Ernst, Brad Gilbert, Breno G. de
371891f110e0Safresh1Oliveira, Brian Carlson, Brian Fraser, Charlie Gonzalez, Chip Salzenberg, Chris
371991f110e0Safresh1'BinGOs' Williams, Christian Hansen, Colin Kuskie, Craig A. Berry, Dagfinn
372091f110e0Safresh1Ilmari Mannsåker, Daniel Dragan, Daniel Perrett, Darin McBride, Dave Rolsky,
372191f110e0Safresh1David Golden, David Leadbeater, David Mitchell, David Nicol, Dominic
372291f110e0Safresh1Hargreaves, E. Choroba, Eric Brine, Evan Miller, Father Chrysostomos, Florian
372391f110e0Safresh1Ragwitz, François Perrad, George Greer, Goro Fuji, H.Merijn Brand, Herbert
372491f110e0Safresh1Breunung, Hugo van der Sanden, Igor Zaytsev, James E Keenan, Jan Dubois,
372591f110e0Safresh1Jasmine Ahuja, Jerry D. Hedden, Jess Robinson, Jesse Luehrs, Joaquin Ferrero,
372691f110e0Safresh1Joel Berger, John Goodyear, John Peacock, Karen Etheridge, Karl Williamson,
372791f110e0Safresh1Karthik Rajagopalan, Kent Fredric, Leon Timmermans, Lucas Holt, Lukas Mai,
372891f110e0Safresh1Marcus Holland-Moritz, Markus Jansen, Martin Hasch, Matthew Horsfall, Max
372991f110e0Safresh1Maischein, Michael G Schwern, Michael Schroeder, Moritz Lenz, Nicholas Clark,
373091f110e0Safresh1Niko Tyni, Oleg Nesterov, Patrik Hägglund, Paul Green, Paul Johnson, Paul
373191f110e0Safresh1Marquess, Peter Martini, Rafael Garcia-Suarez, Reini Urban, Renee Baecker,
373291f110e0Safresh1Rhesa Rozendaal, Ricardo Signes, Robin Barker, Ronald J. Kimball, Ruslan
373391f110e0Safresh1Zakirov, Salvador Fandiño, Sawyer X, Scott Lanning, Sergey Alekseev, Shawn M
373491f110e0Safresh1Moore, Shirakata Kentaro, Shlomi Fish, Sisyphus, Smylers, Steffen Müller,
373591f110e0Safresh1Steve Hay, Steve Peters, Steven Schubiger, Sullivan Beck, Sven Strickroth,
373691f110e0Safresh1Sébastien Aperghis-Tramoni, Thomas Sibley, Tobias Leich, Tom Wyant, Tony Cook,
373791f110e0Safresh1Vadim Konovalov, Vincent Pit, Volker Schatz, Walt Mankowski, Yves Orton,
373891f110e0Safresh1Zefram.
373991f110e0Safresh1
374091f110e0Safresh1The list above is almost certainly incomplete as it is automatically generated
374191f110e0Safresh1from version control history. In particular, it does not include the names of
374291f110e0Safresh1the (very much appreciated) contributors who reported issues to the Perl bug
374391f110e0Safresh1tracker.
374491f110e0Safresh1
374591f110e0Safresh1Many of the changes included in this version originated in the CPAN modules
374691f110e0Safresh1included in Perl's core. We're grateful to the entire CPAN community for
374791f110e0Safresh1helping Perl to flourish.
374891f110e0Safresh1
374991f110e0Safresh1For a more complete list of all of Perl's historical contributors, please see
375091f110e0Safresh1the F<AUTHORS> file in the Perl source distribution.
375191f110e0Safresh1
375291f110e0Safresh1=head1 Reporting Bugs
375391f110e0Safresh1
375491f110e0Safresh1If you find what you think is a bug, you might check the articles recently
375591f110e0Safresh1posted to the comp.lang.perl.misc newsgroup and the perl bug database at
375691f110e0Safresh1http://rt.perl.org/perlbug/ .  There may also be information at
375791f110e0Safresh1http://www.perl.org/ , the Perl Home Page.
375891f110e0Safresh1
375991f110e0Safresh1If you believe you have an unreported bug, please run the L<perlbug> program
376091f110e0Safresh1included with your release.  Be sure to trim your bug down to a tiny but
376191f110e0Safresh1sufficient test case.  Your bug report, along with the output of C<perl -V>,
376291f110e0Safresh1will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
376391f110e0Safresh1
376491f110e0Safresh1If the bug you are reporting has security implications, which make it
376591f110e0Safresh1inappropriate to send to a publicly archived mailing list, then please send it
376691f110e0Safresh1to perl5-security-report@perl.org.  This points to a closed subscription
376791f110e0Safresh1unarchived mailing list, which includes all the core committers, who will be
376891f110e0Safresh1able to help assess the impact of issues, figure out a resolution, and help
376991f110e0Safresh1co-ordinate the release of patches to mitigate or fix the problem across all
377091f110e0Safresh1platforms on which Perl is supported.  Please only use this address for
377191f110e0Safresh1security issues in the Perl core, not for modules independently distributed on
377291f110e0Safresh1CPAN.
377391f110e0Safresh1
377491f110e0Safresh1=head1 SEE ALSO
377591f110e0Safresh1
377691f110e0Safresh1The F<Changes> file for an explanation of how to view exhaustive details on
377791f110e0Safresh1what changed.
377891f110e0Safresh1
377991f110e0Safresh1The F<INSTALL> file for how to build Perl.
378091f110e0Safresh1
378191f110e0Safresh1The F<README> file for general stuff.
378291f110e0Safresh1
378391f110e0Safresh1The F<Artistic> and F<Copying> files for copyright information.
378491f110e0Safresh1
378591f110e0Safresh1=cut
3786