NAME
perl5238delta - what is new for perl v5.23.8
DESCRIPTION
This document describes differences between the 5.23.7 release and the 5.23.8 release.
If you are upgrading from an earlier release such as 5.23.6, first read perl5237delta, which describes differences between 5.23.6 and 5.23.7.
Core Enhancements
More fields provided to sigaction
callback with SA_SIGINFO
When passing the SA_SIGINFO
flag to sigaction, the errno
, status
, uid
, pid
, addr
and band
fields are now included in the hash passed to the handler, if supported by the platform.
Security
Set proper umask before calling mkstemp(3)
In 5.22 perl started setting umask to 0600 before calling mkstemp(3)
and restoring it afterwards. This wrongfully tells open(2) to strip the owner read and write bits from the given mode before applying it, rather than the intended negation of leaving only those bits in place.
Systems that use mode 0666 in mkstemp(3)
(like old versions of glibc) create a file with permissions 0066, leaving world read and write permissions regardless of current umask.
This has been fixed by using umask 0177 instead. [perl #127322]
Incompatible Changes
qr/\N{}/
now disallowed under use re "strict"
An empty \N{}
makes no sense, but for backwards compatibility is silently accepted as doing nothing. But now this is a fatal error under the experimental feature "'strict' mode" in re.
Performance Enhancements
The overhead of scope entry and exit has been considerably reduced, so for example subroutine calls, loops and basic blocks are all faster now. This empty function call now takes about a third less time to execute:
sub f{} f();
On Win32,
stat
ing or-X
ing a path, if the file or directory does not exist, is now 3.5x faster on a SSD (or any drive) than before.
Modules and Pragmata
Updated Modules and Pragmata
cpan/podlators/ has been upgraded from version 4.04 to 4.06.
The PathTools module collection has been upgraded from version 3.62 to 3.63.
DynaLoader has been upgraded from version 1.37 to 1.38.
DynaLoader now always looks for bootstrap files having the same base name as the module for which the bootstrap code is being run. Previously, and only on platforms that use
mod2fname
to produce unique loadable library names, DynaLoader would look for the bootstrap file using a base name that matched the loadable library and not find it.Encode has been upgraded from version 2.78 to 2.80.
ExtUtils::CBuilder has been upgraded from version 0.280224 to 0.280225.
ExtUtils::MakeMaker has been upgraded from version 7.10 to 7.10_01.
File::Spec has been upgraded from version 3.62 to 3.63.
IPC::SysV has been upgraded from version 2.04 to 2.05.
Module::CoreList has been upgraded from version 5.20160120 to 5.20160121.
ODBM_File has been upgraded from version 1.12 to 1.13.
PerlIO::encoding has been upgraded from version 0.23 to 0.24.
POSIX has been upgraded from version 1.59 to 1.63.
It can now export constants for the
code
value in the hash passed to the sigaction handler when using theSA_SIGINFO
flag.These previously deprecated functions are now removed:
isalnum
,isalpha
,iscntrl
,isdigit
,isgraph
,islower
,isprint
,ispunct
,isspace
,isupper
, andisxdigit
.Storable has been upgraded from version 2.54 to 2.55.
Time::HiRes has been upgraded from version 1.9728 to 1.9730.
It can now export Linux-specific and FreeBSD-specific
clock_gettime()
constants. It also now has emulation for OS Xclock_nanosleep()
,clock_gettime()
, andclock_getres()
.
Documentation
Changes to Existing Documentation
perlguts
A new section has been added, "Dynamic Scope and the Context Stack" in perlguts, which explains how the perl context stack works.
perlmodlib
We now recommend contacting the module-authors list or PAUSE in seeking guidance on the naming of modules.
Diagnostics
The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.
New Diagnostics
New Errors
Sequence (?P<... not terminated in regex; marked by <-- HERE in m/%s/
Sequence (?P>... not terminated in regex; marked by <-- HERE in m/%s/
New Warnings
Configuration and Compilation
The GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
Bison 3.0 is now supported.
Platform Support
Platform-Specific Notes
- VMS
-
For those
%ENV
elements based on the CRTL environ array, we've always preserved case when setting them but did look-ups only after upcasing the key first, which made lower- or mixed-case entries go missing. This problem has been corrected by making%ENV
elements derived from the environ array case-sensitive on look-up as well as case-preserving on store.Environment look-ups for
PERL5LIB
andPERLLIB
previously only considered logical names, but now consider all sources of%ENV
as determined byPERL_ENV_TABLES
and as documented in "%ENV" in perlvms.
- Win32
-
Builds using Microsoft Visual C++ 2003 and earlier no longer produce an "INTERNAL COMPILER ERROR" message. [perl #126045]
Internal Changes
The implementation of perl's context stack system, and its internal API, have been heavily reworked. Note that no significant changes have been made to any external APIs, but XS code which relies on such internal details may need to be fixed. The main changes are:
The
PUSHBLOCK()
,POPSUB()
etc. macros have been replaced with static inline functions such ascx_pushblock()
,cx_popsub()
etc. These use function args rather than implicitly relying on local vars such asgimme
andnewsp
being available. Also their functionality has changed: in particular,cx_popblock()
no longer decrementscxstack_ix
. The ordering of the steps in thepp_leave*
functions involvingcx_popblock()
,cx_popsub()
etc. has changed. See the new documentation, "Dynamic Scope and the Context Stack" in perlguts, for details on how to use them.Various macros, which now consistently have a CX_ prefix, have been added:
CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
or renamed:
CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
cx_pushblock()
now savesPL_savestack_ix
andPL_tmps_floor
, sopp_enter*
andpp_leave*
no longer doENTER; SAVETMPS; ....; LEAVE
cx_popblock()
now also restoresPL_curpm
.In
dounwind()
for every context type, the current savestack frame is now processed before each context is popped; formerly this was only done for sub-like context frames. This action has been removed fromcx_popsub()
and placed into its own macro,CX_LEAVE_SCOPE(cx)
, which must be called beforecx_popsub()
etc.dounwind()
now also does acx_popblock()
on the last popped frame (formerly it only did thecx_popsub()
etc. actions on each frame).The temps stack is now freed on scope exit; previously, temps created during the last statement of a block wouldn't be freed until the next
nextstate
following the block (apart from an existing hack that did this for recursive subs in scalar context); and in something likef(g())
, the temps created by the last statement ing()
would formerly not be freed until the statement following the return fromf()
.Most values that were saved on the savestack on scope entry are now saved in suitable new fields in the context struct, and saved and restored directly by
cx_pushfoo()
andcx_popfoo()
, which is much faster.Various context struct fields have been added, removed or modified.
The handling of
@_
incx_pushsub()
andcx_popsub()
has been considerably tidied up, including removing theargarray
field from the context struct, and extracting out some common (but rarely used) code into a separate function,clear_defarray()
. Also, useful subsets ofcx_popsub()
which had been unrolled in places likepp_goto
have been gathered into the new functionscx_popsub_args()
andcx_popsub_common()
.pp_leavesub
andpp_leavesublv
now use the same function as the rest of thepp_leave*
's to process return args.CXp_FOR_PAD
andCXp_FOR_GV
flags have been added, andCXt_LOOP_FOR
has been split intoCXt_LOOP_LIST
,CXt_LOOP_ARY
.Some variables formerly declared by
dMULTICALL
(but not documented) have been removed.
Selected Bug Fixes
Line numbers larger than 2**31-1 but less than 2**32 are no longer returned by caller() as negative numbers. [perl #126991]
unless ( assignment )
now properly warns when syntax warnings are enabled. [perl #127122]Setting an
ISA
glob to an array reference now properly addsisaelem
magic to any existing elements. Previously modifying such an element would not update the ISA cache, so method calls would call the wrong function. Perl would also crash if theISA
glob was destroyed, since new code added in 5.23.7 would try to release theisaelem
magic from the elements. [perl #127351]If a here-doc was found while parsing another operator, the parser had already read end of file, and the here-doc was not terminated, perl could produce an assertion or a segmentation fault. This now reliably complains about the unterminated here-doc. [perl #125540]
untie() would sometimes return the last value returned by the UNTIE() handler as well as it's normal value, messing up the stack. [perl #126621]
Fixed an operator precedence problem when
castflags & 2
is true. [perl #127474]Caching of DESTROY methods could result in a non-pointer or a non-STASH stored in the SvSTASH() slot of a stash, breaking the B STASH() method. The DESTROY method is now cached in the MRO metadata for the stash. [perl #126410]
The AUTOLOAD method is now called when searching for a DESTROY method, and correctly sets
$AUTOLOAD
too. [perl #124387] [perl #127494]Avoid parsing beyond the end of the buffer when processing a
#line
directive with no filename. [perl #127334]Perl now raises a warning when a regular expression pattern looks like it was supposed to contain a POSIX class, like
qr/[[:alpha:]]/
, but there was some slight defect in its specification which causes it to instead be treated as a regular bracketed character class. An example would be missing the second colon in the above like this:qr/[[:alpha]]/
. This compiles to match a sequence of two characters. The second is"]"
, and the first is any of:"["
,":"
,"a"
,"h"
,"l"
, or"p"
. This is unlikely to be the intended meaning, and now a warning is raised. No warning is raised unless the specification is very close to one of the 14 legal POSIX classes. (See "POSIX Character Classes" in perlrecharclass.) [perl #8904]Certain regex patterns involving a complemented POSIX class in an inverted bracketed character class, and matching something else optionally would improperly fail to match. An example of one that could fail is
/qr/_?[^\Wbar]\x{100}/
. This has been fixed. [perl #127537]Perl 5.22 added support to the C99 hexadecimal floating point notation, but sometimes misparses hex floats. This had been fixed. [perl #127183]
Acknowledgements
Perl 5.23.8 represents approximately 4 weeks of development since Perl 5.23.7 and contains approximately 30,000 lines of changes across 350 files from 23 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 14,000 lines of changes to 210 .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.8:
Aaron Crane, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Mitchell, Ed J, Herbert Breunung, H.Merijn Brand, James E Keenan, Jarkko Hietaniemi, Karl Williamson, Lukas Mai, Niko Tyni, Pip Cet, Ricardo Signes, Sawyer X, Sisyphus, Stevan Little, Steve Hay, Todd Rinaldo, Tom Hukins, Tony Cook.
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 AUTHORS file in the Perl source distribution.
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 https://rt.perl.org/ . There may also be information at http://www.perl.org/ , the Perl Home Page.
If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of 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.
SEE ALSO
The Changes file for an explanation of how to view exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.