=head1 DESCRIPTION
-This document describes differences between the 5.16.0 release and the 5.18.0
+This document describes differences between the v5.16.0 release and the v5.18.0
release.
-If you are upgrading from an earlier release such as 5.14.0, first read
-L<perl5160delta>, which describes differences between 5.14.0 and 5.16.0.
+If you are upgrading from an earlier release such as v5.14.0, first read
+L<perl5160delta>, which describes differences between v5.14.0 and v5.16.0.
=head1 Core Enhancements
=head2 Hash overhaul
-Changes to the implementation of hashes in perl 5.18.0 will be one of the most
+Changes to the implementation of hashes in perl v5.18.0 will be one of the most
visible changes to the behavior of existing code.
By default, two distinct hash variables with identical keys and values may now
=head3 New hash functions
-Perl 5.18 includes support for multiple hash functions, and changed
+Perl v5.18 includes support for multiple hash functions, and changed
the default (to ONE_AT_A_TIME_HARD), you can choose a different
algorithm by defining a symbol at compile time. For a current list,
-consult the F<INSTALL> document. Note that as of Perl 5.18 we can
+consult the F<INSTALL> document. Note that as of Perl v5.18 we can
only recommend use of the default or SIPHASH. All the others are
known to have security issues and are for research purposes only.
Poorly written perl code that allows an attacker to specify the count to perl's
C<x> string repeat operator can already cause a memory exhaustion
-denial-of-service attack. A flaw in versions of perl before 5.15.5 can escalate
+denial-of-service attack. A flaw in versions of perl before v5.15.5 can escalate
that into a heap buffer overrun; coupled with versions of glibc before 2.16, it
possibly allows the execution of arbitrary code.
=head2 Explicit rules for variable names and identifiers
-Due to an oversight, length-one variable names in 5.16 were completely
-unrestricted, and opened the door to several kinds of insanity. As of
-5.18, these now follow the rules of other identifiers, in addition
-to accepting characters that match the C<\p{POSIX_Punct}> property.
+Due to an oversight, single character variable names in v5.16 were
+completely unrestricted. This opened the door to several kinds of
+insanity. As of v5.18, these now follow the rules of other identifiers,
+in addition to accepting characters that match the C<\p{POSIX_Punct}>
+property.
There are no longer any differences in the parsing of identifiers
specified as C<$...> or C<${...}>; previously, they were dealt with in
=head2 Lexical C<$_> is now experimental
-Since it was introduced in Perl 5.10, it has caused much confusion with no
+Since it was introduced in Perl v5.10, it has caused much confusion with no
obvious solution:
=over
b c) {...}> that one might expect to be permitted never worked at all.
This side effect of C<qw> has now been abolished. It has been deprecated
-since Perl 5.13.11. It is now necessary to use real parentheses
+since Perl v5.13.11. It is now necessary to use real parentheses
everywhere that the grammar calls for them.
=head2 Interaction of lexical and default warnings
=head2 C<split>'s first argument is more consistently interpreted
-After some changes earlier in 5.17, C<split>'s behavior has been
+After some changes earlier in v5.17, C<split>'s behavior has been
simplified: if the PATTERN argument evaluates to a literal string
containing one space, it is treated the way that a I<literal> string
containing one space once was.
This interpreter-global variable used to track the total number of
Perl objects in the interpreter. It is no longer maintained and will
-be removed altogether in Perl 5.20.
+be removed altogether in Perl v5.20.
=head2 Five additional characters should be escaped in patterns with C</x>
compilers (e.g., gcc), compiling any file that uses any of these will
generate a warning. These were not intended for public use; there are
equivalent, faster, macros for most of them.
+
See L<perlapi/Character classes>. The complete list is:
+
C<is_uni_alnum>, C<is_uni_alnumc>, C<is_uni_alnumc_lc>,
C<is_uni_alnum_lc>, C<is_uni_alpha>, C<is_uni_alpha_lc>,
C<is_uni_ascii>, C<is_uni_ascii_lc>, C<is_uni_blank>,
the perl development effort know by emailing C<perl5-porters@perl.org>.
Some platforms that appear otherwise entirely dead are also on the short list
-for removal between now and 5.20.0:
+for removal between now and v5.20.0:
=over
=back
+We also think it likely that current versions of Perl will no longer
+build AmigaOS, DJGPP, NetWare (natively), OS/2 and Plan 9. If you
+are using Perl on such a platform and have an interest in ensuring
+Perl's future on them, please contact us.
+
+We believe that Perl has long been unable to build on mixed endian
+architectures (such as PDP-11s), and intend to remove any remain
+support code. Similarly, code supporting the long umaintained GNU
+dld will be removed soon if no-one makes themselves known as an
+active user.
+
=item *
Swapping of $< and $>
=head2 Updated Modules and Pragmata
-This is only an overview of selected module updates. For a complete
-list of updates, run:
+For a complete list of updates, run:
$ corelist --diff 5.16.0 5.18.0
-You can substitute your favorite version in place of 5.16.0, too.
-
-=over 4
-
-=item *
-
-L<XXX> has been upgraded from version A.xx to B.yy.
-
-=back
+You can substitute your favorite version in place of C<5.16.0>, too.
=head2 Removed Modules and Pragmata
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
-XXX New or changed warnings emitted by the core's C<C> code go here. Also
-include any changes in L<perldiag> that reconcile it to the C<C> code.
-
=head2 New Diagnostics
-XXX Newly added diagnostic messages go under here, separated into New Errors
-and New Warnings
-
=head3 New Errors
=over 4
Calling an undefined value as a subroutine now produces this error message.
It used to, but was accidentally disabled, first in Perl 5.004 for
-non-magical variables, and then in Perl 5.14 for magical (e.g., tied)
+non-magical variables, and then in Perl v5.14 for magical (e.g., tied)
variables. It has now been restored. In the mean time, undef was treated
as an empty string [perl #113576].
=item *
-XXX: This needs more detail.
-
Strings with code points over 0xFF may not be mapped into in-memory file
handles
Support code relating to UTS global has been removed. UTS was a mainframe
version of System V created by Amdahl, subsequently sold to UTS Global. The
-port has not been touched since before Perl 5.8.0, and UTS Global is now
+port has not been touched since before Perl v5.8.0, and UTS Global is now
defunct.
=item VM/ESA
=head3 clang++
There is now a workaround for a compiler bug that prevented compiling
-with clang++ since Perl 5.15.7 [perl #112786].
+with clang++ since Perl v5.15.7 [perl #112786].
=head3 C++
it to use 64-bit integers.
Machine code size reductions, already made to the DLLs of XS modules in
-Perl 5.17.2, have now been extended to the perl DLL itself.
+Perl v5.17.2, have now been extended to the perl DLL itself.
-Building with VC++ 6.0 was inadvertently broken in Perl 5.17.2 but has
+Building with VC++ 6.0 was inadvertently broken in Perl v5.17.2 but has
now been fixed again.
=back
Perl has a new copy-on-write mechanism that allows any SvPOK scalar to be
upgraded to a copy-on-write scalar. A reference count on the string buffer
-is stored in the string buffer itself.
+is stored in the string buffer itself. This feature is B<not enabled by
+default>.
-This breaks a few XS modules by allowing copy-on-write scalars to go
-through code paths that never encountered them before.
+It can be enabled in a perl build by running F<Configure> with
+B<-Accflags=-DPERL_NEW_COPY_ON_WRITE>, and we would encourage XS authors
+to try their code with such an enabled perl, and provide feedback.
+Unfortunately, there is not yet a good guide to updating XS code to cope
+with COW. Until such a document is available, consult the perl5-porters
+mailing list.
-This behaviour can still be disabled by running F<Configure> with
-B<-Accflags=-DPERL_NO_COW>. This option will probably be removed in Perl
-5.20.
+It breaks a few XS modules by allowing copy-on-write scalars to go
+through code paths that never encountered them before.
=item *
C<sv_len> now always returns a byte count and C<sv_len_utf8> a character
count. Previously, C<sv_len> and C<sv_len_utf8> were both buggy and would
sometimes returns bytes and sometimes characters. C<sv_len_utf8> no longer
-assumes that its argument is in UTF8. Neither of these creates UTF8 caches
+assumes that its argument is in UTF-8. Neither of these creates UTF-8 caches
for tied or overloaded values or for non-PVs any more.
=item *
=item *
-The C<study> function was made a no-op in 5.16. It was simply disabled via
+The C<study> function was made a no-op in v5.16. It was simply disabled via
a C<return> statement; the code was left in place. Now the code supporting
what C<study> used to do has been removed.
=item *
-A new function C<alloccoptash> has been added to the API, but is considered
+A new function C<alloccopstash> has been added to the API, but is considered
experimental. See L<perlapi>.
=item *
=item *
C<sort {undef} ...> under fatal warnings no longer crashes. It had
-begun crashing in Perl 5.16.
+begun crashing in Perl v5.16.
=item *
Stashes blessed into each other
(C<bless \%Foo::, 'Bar'; bless \%Bar::, 'Foo'>) no longer result in double
-frees. This bug started happening in Perl 5.16.
+frees. This bug started happening in Perl v5.16.
=item *
=item *
Defining a subroutine when its typeglob has been aliased no longer results
-in stale method caches. This bug was introduced in Perl 5.10.
+in stale method caches. This bug was introduced in Perl v5.10.
=item *
Localising a typeglob containing a subroutine when the typeglob's package
has been deleted from its parent stash no longer produces an error. This
-bug was introduced in Perl 5.14.
+bug was introduced in Perl v5.14.
=item *
=item *
C<v10> is now allowed as a label or package name. This was inadvertently
-broken when v-strings were added in Perl 5.6. [perl #56880]
+broken when v-strings were added in Perl v5.6. [perl #56880]
=item *
C<length>, C<pos>, C<substr> and C<sprintf> could be confused by ties,
overloading, references and typeglobs if the stringification of such
-changed the internal representation to or from UTF8. [perl #114410]
+changed the internal representation to or from UTF-8. [perl #114410]
=item *
C<$tied =~ s/$non_utf8/$utf8/> no longer loops infinitely if the tied
variable returns a Latin-1 string, shared hash key scalar, or reference or
typeglob that stringifies as ASCII or Latin-1. This was a regression from
-5.12.x.
+v5.12.
=item *
=item *
-The error "Can't localize through a reference" had disappeared in 5.16.0
+The error "Can't localize through a reference" had disappeared in v5.16.0
when C<local %$ref> appeared on the last line of an lvalue subroutine.
-This error disappeared for C<\local %$ref> in perl 5.8.1. It has now
+This error disappeared for C<\local %$ref> in perl v5.8.1. It has now
been restored.
=item *
=item *
-Reset the utf8 position cache when accessing magical variables to avoid the
-string buffer and the utf8 position cache getting out of sync
+Reset the UTF-8 position cache when accessing magical variables to avoid the
+string buffer and the UTF-8 position cache getting out of sync
[perl #114410].
=item *
-Various cases of get magic being called twice for magical utf8 strings have been
-fixed.
+Various cases of get magic being called twice for magical UTF-8
+strings have been fixed.
=item *
=item *
C<truncate FOO, $len> no longer falls back to treating "FOO" as a file name if
-the filehandle has been deleted. This was broken in Perl 5.16.0.
+the filehandle has been deleted. This was broken in Perl v5.16.0.
=item *
=item *
-The C<ref> operator started leaking memory on blessed objects in Perl 5.16.0.
+The C<ref> operator started leaking memory on blessed objects in Perl v5.16.0.
This has been fixed [perl #114340].
=item *
=item *
Under debugging builds, the B<-DA> command line option started crashing in Perl
-5.16.0. It has been fixed [perl #114368].
+v5.16.0. It has been fixed [perl #114368].
=item *
=item *
-In Perl 5.14, C<-'-10'> was fixed to return "10", not "+10". But magical
+In Perl v5.14, C<-'-10'> was fixed to return "10", not "+10". But magical
variables (C<$1>, ties) were not fixed till now [perl #57706].
=item *
=item *
Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
-stopped working properly in 5.16.0. It was causing the new handle to
+stopped working properly in v5.16.0. It was causing the new handle to
reference a different scalar variable. This has been fixed [perl #113764].
=item *
=item *
Using a C<format> after its enclosing sub was freed could crash as of
-perl 5.12.0, if the format referenced lexical variables from the outer sub.
+perl v5.12.0, if the format referenced lexical variables from the outer sub.
=item *
Using a C<format> after its enclosing sub was undefined could crash as of
-perl 5.10.0, if the format referenced lexical variables from the outer sub.
+perl v5.10.0, if the format referenced lexical variables from the outer sub.
=item *
Using a C<format> defined inside a closure, which format references
lexical variables from outside, never really worked unless the C<write>
-call was directly inside the closure. In 5.10.0 it even started crashing.
+call was directly inside the closure. In v5.10.0 it even started crashing.
Now the copy of that closure nearest the top of the call stack is used to
find those variables.
Two bugs involving @ISA have been fixed. C<*ISA = *glob_without_array> and
C<undef *ISA; @{*ISA}> would prevent future modifications to @ISA from
updating the internal caches used to look up methods. The
-*glob_without_array case was a regression from Perl 5.12.
+*glob_without_array case was a regression from Perl v5.12.
=item *
=item *
Assigning a regular expression to a magic variable no longer wipes away the
-magic. This was a regression from 5.10.
+magic. This was a regression from v5.10.
=item *
Assigning a regular expression to a blessed scalar no longer results in
-crashes. This was also a regression from 5.10.
+crashes. This was also a regression from v5.10.
=item *
=item *
Negative array indices no longer cause EXISTS methods of tied variables to
-be ignored. This was a regression from 5.12.
+be ignored. This was a regression from v5.12.
=item *
=item *
-C<$byte_overload .= $utf8> no longer results in doubly-encoded UTF8 if the
-left-hand scalar happened to have produced a UTF8 string the last time
+C<$byte_overload .= $utf8> no longer results in doubly-encoded UTF-8 if the
+left-hand scalar happened to have produced a UTF-8 string the last time
overloading was invoked.
=item *
=item *
-XXX: the imperfect behavior of the ** deprecation
+There are no known regressions. Please report any bugs you find!
=back
=head1 Acknowledgements
-XXX Generate this with:
-
- perl Porting/acknowledgements.pl v5.18.0..HEAD
+Perl v5.18.0 represents approximately 12 months of development since
+Perl v5.16.0 and contains approximately 400,000 lines of changes across
+2,100 files from 113 authors.
+
+Perl continues to flourish into its third decade thanks to a vibrant
+community of users and developers. The following people are known to
+have contributed the improvements that became Perl v5.18.0:
+
+Aaron Crane, Aaron Trevena, Abhijit Menon-Sen, Adrian M. Enache, Alan
+Haggai Alavi, Alexandr Ciornii, Andrew Tam, Andy Dougherty, Anton Nikishaev,
+Aristotle Pagaltzis, Augustina Blair, Bob Ernst, Brad Gilbert, Breno G. de
+Oliveira, Brian Carlson, Brian Fraser, Charlie Gonzalez, Chip Salzenberg, Chris
+'BinGOs' Williams, Christian Hansen, Colin Kuskie, Craig A. Berry, Dagfinn
+Ilmari Mannsåker, Daniel Dragan, Daniel Perrett, Darin McBride, Dave Rolsky,
+David Golden, David Leadbeater, David Mitchell, David Nicol, Dominic
+Hargreaves, E. Choroba, Eric Brine, Evan Miller, Father Chrysostomos, Florian
+Ragwitz, François Perrad, George Greer, Goro Fuji, H.Merijn Brand, Herbert
+Breunung, Hugo van der Sanden, Igor Zaytsev, James E Keenan, Jan Dubois,
+Jasmine Ahuja, Jerry D. Hedden, Jess Robinson, Jesse Luehrs, Joaquin Ferrero,
+Joel Berger, John Goodyear, John Peacock, Karen Etheridge, Karl Williamson,
+Karthik Rajagopalan, Kent Fredric, Leon Timmermans, Lucas Holt, Lukas Mai,
+Marcus Holland-Moritz, Markus Jansen, Martin Hasch, Matthew Horsfall, Max
+Maischein, Michael G Schwern, Michael Schroeder, Moritz Lenz, Nicholas Clark,
+Niko Tyni, Oleg Nesterov, Patrik Hägglund, Paul Green, Paul Johnson, Paul
+Marquess, Peter Martini, Rafael Garcia-Suarez, Reini Urban, Renee Baecker,
+Rhesa Rozendaal, Ricardo Signes, Robin Barker, Ronald J. Kimball, Ruslan
+Zakirov, Salvador Fandiño, Sawyer X, Scott Lanning, Sergey Alekseev, Shawn M
+Moore, Shirakata Kentaro, Shlomi Fish, Sisyphus, Smylers, Steffen Müller,
+Steve Hay, Steve Peters, Steven Schubiger, Sullivan Beck, Sven Strickroth,
+Sébastien Aperghis-Tramoni, Thomas Sibley, Tobias Leich, Tom Wyant, Tony Cook,
+Vadim Konovalov, Vincent Pit, Volker Schatz, Walt Mankowski, Yves Orton,
+Zefram.
+
+The list above is almost certainly incomplete as it is automatically generated
+from version control history. In particular, it does not include the names of
+the (very much appreciated) contributors who reported issues to the Perl bug
+tracker.
+
+Many of the changes included in this version originated in the CPAN modules
+included in Perl's core. We're grateful to the entire CPAN community for
+helping Perl to flourish.
+
+For a more complete list of all of Perl's historical contributors, please see
+the F<AUTHORS> file in the Perl source distribution.
=head1 Reporting Bugs