=encoding utf8

=head1 NAME

perldelta - what is new for perl v5.23.9

=head1 DESCRIPTION

This document describes differences between the 5.23.8 release and the 5.23.9
release.

If you are upgrading from an earlier release such as 5.23.7, first read
L<perl5238delta>, which describes differences between 5.23.7 and 5.23.8.

=head1 Core Enhancements

=head2 perl will now croak when closing an in-place output file fails

Until now, failure to close the output file for an in-place edit was not
detected, meaning that the input file could be clobbered without the edit being
successfully completed.  Now, when the output file cannot be closed
successfully, an exception is raised.

=head1 Security

=head2 Remove duplicate environment variables from C<environ>

Previously, if an environment variable appeared more than once in
C<environ[]>, C<%ENV> would contain the last entry for that name,
while a typical C<getenv()> would return the first entry. We now
make sure C<%ENV> contains the same as what C<getenv> returns.

Second, we remove duplicates from C<environ[]>, so if a setting
with that name is set in C<%ENV> we won't pass an unsafe value
to a child process.

[CVE-2016-2381]

=head1 Performance Enhancements

=over 4

=item *

The number of calls to C<add_cp_to_invlist> has been reduced. This
optimizes the compilation of inverted character classes.

=back

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<autouse> has been upgraded from version 1.08 to 1.11.

=item *

L<bytes> has been upgraded from version 1.04 to 1.05.

=item *

L<Carp> has been upgraded from version 1.38 to 1.40.

C<longmess> now returns the error in scalar context. [CPAN #107225]

=item *

L<Errno> has been upgraded from version 1.24 to 1.25.

It now exports Winsock error constants.

=item *

L<ExtUtils::Embed> has been upgraded from version 1.32 to 1.33.

=item *

L<File::Find> has been upgraded from version 1.33 to 1.34.

=item *

L<File::Glob> has been upgraded from version 1.25 to 1.26.

=item *

L<IPC::SysV> has been upgraded from version 2.05 to 2.06_01.

=item *

L<List::Util> has been upgraded from version 1.42_01 to 1.42_02.

=item *

L<Module::CoreList> has been upgraded from version 5.20160121 to
5.20160320.

=item *

L<Pod::Functions> has been upgraded from version 1.09 to 1.10.

=item *

L<POSIX> has been upgraded from version 1.63 to 1.64.

It now exports Winsock error constants.

=item *

L<Scalar::Util> has been upgraded from version 1.42_01 to 1.42_02.

=item *

L<SelfLoader> has been upgraded from version 1.22 to 1.23.

=item *

L<Socket> has been upgraded from version 2.020_02 to 2.020_03.

=item *

L<Storable> has been upgraded from version 2.55 to 2.56.

=item *

L<strict> has been upgraded from version 1.10 to 1.11.

Narrowed the filename check.

=item *

L<Thread::Queue> has been upgraded from version 3.07 to 3.08.

=item *

L<threads> has been upgraded from version 2.05 to 2.06.

=item *

L<Tie::File> has been upgraded from version 1.01 to 1.02.

=item *

L<Time::HiRes> has been upgraded from version 1.9730 to 1.9732.

=item *

L<version> has been upgraded from version 0.9909 to 0.9916.

=item *

L<warnings> has been upgraded from version 1.35 to 1.36.

Narrowed the filename check.

=item *

L<Win32API::File> has been upgraded from version 0.1202 to 0.1203.

=back

=head1 Documentation

=head2 Changes to Existing Documentation

=head3 L<perlfunc>

=over 4

=item *

The L<perlfunc> manual page got a cleanup: there's more consistency now
(in POD usage, grammar, code examples), better practices in code examples
(use of C<my>, removal of bareword filehandles, dropped usage of C<&>
when calling subroutines, ...), etc.

=back

=head1 Configuration and Compilation

=over 4

=item *

Dtrace builds now build successfully on systems with a newer dtrace
that require an input object file that uses the probes in the F<.d>
file.

Previously the probe would fail and cause a build failure. [perl
#122287]

=item *

F<installman> no longer warns if a module doesn't contain documentation,
as this isn't actually an error. Now missing documentation will only
be reported when using the B<--verbose> switch, and if it does, the
missing documentation will be reported on C<STDOUT> instead of C<STDERR>.

=item *

The B<u> option to the C<ar> command was removed. This was redundant
anyway, and on some systems, it caused a warning.

=item *

Added F<Configure> probes for C<newlocale>, C<freelocale>, and C<uselocale>.

=item *

Fix up dtrace compile/link for Solaris. [perl #127543]

=back

=head1 Platform Support

=head2 Platform-Specific Notes

=over 4

=item Win32

=over

=item *

Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would
result in an invalid C<$Config{archname}> for the resulting perl.
[perl #127584]

=item *

Errors set by Winsock functions are now put directly into C<$^E>, and the
relevant C<WSAE*> error codes are now exported from the L<Errno> and L<POSIX>
modules for testing this against.

The previous behaviour of putting the errors (converted to POSIX-style C<E*>
error codes since Perl 5.20.0) into C<$!> was buggy due to the non-equivalence
of like-named Winsock and POSIX error constants, a relationship between which
has unfortunately been established in one way or another since Perl 5.8.0.

The new behaviour provides a much more robust solution for checking Winsock
errors in portable software without accidentally matching POSIX tests that were
intended for other OSes and may have different meanings for Winsock.

The old behaviour is currently retained, warts and all, for backwards
compatibility, but users are encouraged to change any code that tests C<$!>
against C<E*> constants for Winsock errors to instead test C<$^E> against
C<WSAE*> constants.  After a suitable deprecation period, the old behaviour may
be removed, leaving C<$!> unchanged after Winsock function calls, to avoid any
possible confusion over which error variable to check.

=back

=back

=head1 Selected Bug Fixes

=over 4

=item *

It now works properly to specify a user-defined property, such as

 qr/\p{mypkg1::IsMyProperty}/i

with C</i> caseless matching, an explicit package name, and
I<IsMyProperty> not defined at the time of the pattern compilation.

=item *

Perl's memcpy(), memmove(), memset() and memcmp() fallbacks are now
more compatible with the originals.  [perl #127619]

=item *

The peak memory usage when compiling some regular expression patterns is
now significantly smaller. [perl #127392]

=item *

A case has been fixed in which malformed UTF-8 in the source of a Perl
script caused an assertion failure instead of an error message. [perl
#127262]

=item *

Fixed a buffer overrun issue in F<Socked.xs> which was reported by Coverity.
[CPAN #111707]

=item * 

Fixed a possible division by 0 error in C<Scalar::List::Utils::product>
(reported by Coverity). [CPAN #105415]

=item *

Fixed the issue where a C<< s///r >>) with B<< -DPERL_NO_COW >> attempts
to modify the source SV, resulting in the program dying. [perl #127635]

=item *

Fixed a spurious warning about posix character classes. [perl #127581]

=item *

Fixed an obscure case where a pattern could fail to match. This only 
occurred when matching characters from the set of C1 controls, when
the target matched string was in UTF-8, and only on EBCDIC platforms.

=item *

Fixed over eager warnings for C<< /[.foo.]/ >>.

This prevents Perl from warning about constructs like C<< /[.].*[.]/ >>.
[perl #127582, #127604]

=item *

Narrow the filename check in F<strict.pm> and F<warnings.pm>. Previously,
it assumed that if the filename (without the F<.pmc?> extension) differed
from the package name, if was a misspelled use statement (i.e. C<use Strict>
instead of C<use strict>). We now check whether there's really a 
miscapitalization happening, and not another issue.

=item *

Turn an assertion into a more user friendly failure when parsing
regexes. [perl #127599]

=item *

Correctly raise an error when trying to compile patterns with 
unterminated character classes while there are trailing backslashes.
[perl #126141].

=item *

Added a guard against malformed UTF-8. [perl #127262]

=item *

Only test C<semctl> if we have everything needed to use it. In a FreeBSD
the C<semctl> entry point may exist, but it can be disabled by policy.
[perl #127533]

=item *

Handle C<NOTHING> regops and C<EXACTFU_SS> regops in C<make_trie> properly.
[perl #126206]

=item *

Fix a Solaris optimiser bug which prevented certain regular expression
to be compiled. [perl #127455]

=item *

Improved the detection of infinite recursion in regular expressions.
Previously, perl would in certain cases slowly consume resources until
finally running out of memory. [perl #126182]


=back

=head1 Acknowledgements

Perl 5.23.9 represents approximately 4 weeks of development since Perl 5.23.8
and contains approximately 21,000 lines of changes across 230 files from 23
authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 8,500 lines of changes to 120 .pm, .t, .c and .h files.

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 5.23.9:

Abigail, Alex Vandiver, Andy Broad, Aristotle Pagaltzis, Chris 'BinGOs'
Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David
Mitchell, Father Chrysostomos, H.Merijn Brand, Jarkko Hietaniemi, John Peacock,
Karl Williamson, Leon Timmermans, Lukas Mai, Matthew Horsfall, Ricardo Signes,
Sawyer X, Shlomi Fish, Steve Hay, Tony Cook, Yves Orton.

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

If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
L<https://rt.perl.org/> .  There may also be information at
L<http://www.perl.org/> , the Perl Home Page.

If you believe you have an unreported bug, please run the L<perlbug> program
included with your release.  Be sure to trim your bug down to a tiny but
sufficient test case.  Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org.  This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported.  Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.

=head1 SEE ALSO

The F<Changes> file for an explanation of how to view exhaustive details on
what changed.

The F<INSTALL> file for how to build Perl.

The F<README> file for general stuff.

The F<Artistic> and F<Copying> files for copyright information.

=cut
