perl5172delta - what is new for perl v5.17.2
This document describes differences between the 5.17.1 release and the 5.17.2 release.
If you are upgrading from an earlier release such as 5.17.0, first read perl5171delta, which describes differences between 5.17.0 and 5.17.1.
kill
with negative signal nameskill
has always allowed a negative signal number,
which kills the process group instead of a single process.
It has also allowed signal names.
But it did not behave consistently,
because negative signal names were treated as 0.
Now negative signals names like -INT
are supported and treated the same way as -2 [perl #112990].
pack
is now constant folded.pack
with constant arguments is now constant folded in most cases [perl #113470].
Previously File::stat
's overloaded -x
and -X
operators did not give the correct results for directories or executable files when running as root.
They had been treating executable permissions for root just like for any other user,
performing group membership tests etc for files not owned by root.
They now follow the correct Unix behaviour - for a directory they are always true,
and for a file if any of the three execute permission bits are set then they report that root can execute the file.
Perl's builtin -x
and -X
operators have always been correct.
READ
now respects the offset argument to read
[perl #112826].
IO::Socket tries harder to cache or otherwise fetch socket information.
Restricted hashes were not always thawed correctly [perl #73972].
Storable would croak when freezing a blessed REF object with a STORABLE_freeze()
method [perl #113880].
autodie
now plays nicely with the 'open' pragma.
Added the 'file_default' option for URLs that do not have a file component.
our
.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.
This error has been added for (?&0)
,
which is invalid.
It used to produce an incomprehensible error message [perl #101666].
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) variables. It has now been restored. In the mean time, undef was treated as an empty string [perl #113576].
chr()
now warns when passed a negative value [perl #83048].
srand()
now warns when passed a value that doesn't fit in a UV
(since the value will be truncated rather than overflowing) [perl #40605].
Running perl with the -i
flag now warns if no input files are provided on the command line [perl #113410].
glob
operator (which uses the perlglob
program) deleting the PATH environment variable [perl #113798].Quotes are now removed from the command verb (but not the parameters) for commands spawned via system
,
backticks,
or a piped open
.
Previously,
quotes on the verb were passed through to DCL,
which would fail to recognize the command.
Also,
if the verb is actually a path to an image or command procedure on an ODS-5 volume,
quoting it now allows the path to contain spaces.
Configure now always adds -qlanglvl=extc99
to the CC flags on AIX when using xlC.
This will make it easier to compile a number of XS-based modules that assume C99 [perl #113778].
re
module would clobber $_
[perl #113750].do FILE
now always either sets or clears $@
,
even when the file can't be read.
This ensures that testing $@
first (as recommended by the documentation) always returns the correct result.each @array
construct is now correctly reset when @array
is cleared (RT #75596).
This happens for example when the array is globally assigned to,
as in @array = (...)
,
but not when its values are assigned to.
In terms of the XS API,
it means that av_clear()
will now reset the iterator.
This mirrors the behaviour of the hash iterator when the hash is cleared.
$class->can
,
$class->isa
,
and $class->DOES
now return correct results,
regardless of whether that package referred to by $class
exists [perl #47113].$@
[perl #45173].my ()
declarations with an empty variable list [perl #113554].qr//
expressions no longer crash with custom regular expression engines that do not set offs
at regular expression compilation time [perl #112962].delete local
no longer crashes with certain magical arrays and hashes [perl #112966].local
on elements of certain magical arrays and hashes used not to arrange to have the element deleted on scope exit,
even if the element did not exist before local
.scalar(write)
no longer returns multiple items [perl #73690].use locale
[perl #109318].@INC
filters that die no longer leak memory [perl #92252].<>
[perl #47119].fallback
key when calling use overload
now behaves properly [perl #113010].sub foo { my $a = 0; while ($a) { ...
} }
and sub foo { while (0) { ...
} }
now return the same thing [perl #73618].l
and M
commands,
and other debugger functionality which was broken in 5.17.0 [perl #113918].use integer;
as it does without [perl #113012].chr
now returns the Unicode replacement character (U+FFFD) for -1,
regardless of the internal representation.
-1 used to wrap if the argument was tied or a string internally.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.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.format
defined inside a closures,
which format references lexical variables from outside,
never really worked unless the write
call was directly inside the closure.
In 5.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.eval foo ()
as a syntax error if preceded by print;
[perl #16249].syscall
is no longer truncated on 64-bit platforms [perl #113980].print 1 ?
FOO : BAR
to print to the FOO handle [perl #78064].do subname
now calls the named subroutine and uses the file name it returns,
instead of opening a file named "subname".foo bar
should be the sub call foo(bar)
or the method call "bar"->foo
.CORE::foo::bar
is no longer treated specially,
allowing global overrides to be called directly via CORE::GLOBAL::uc(...)
[perl #113016].*ISA = *glob_without_array
and 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.$
with /m
to produce failed or incorrect matches [perl #114068].__SUB__
now works in a sort
block when the enclosing subroutine is predeclared with sub foo;
syntax [perl #113710].\w
and [:word;]
should not generate the warning,
as their definitions don't limit them to apply to only Unicode code points.
Now the message is only generated when matching against \p{}
and \P{}
.
There remains a bug,
[perl #114148],
for the very few properties in Unicode that match just a single code point.
The warning is not generated if they are matched against an above-Unicode code point.Perl 5.17.2 represents approximately 4 weeks of development since Perl 5.17.1 and contains approximately 15,000 lines of changes across 320 files from 34 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 5.17.2:
Aristotle Pagaltzis, Brian Fraser, Chip Salzenberg, Chris 'BinGOs' Williams, Colin Kuskie, Craig A. Berry, Daniel Dragan, Daniel Perrett, Darin McBride, David Golden, David Mitchell, Dominic Hargreaves, E. Choroba, Eric Brine, Father Chrysostomos, François Perrad, H.Merijn Brand, Jan Dubois, Jesse Luehrs, Karl Williamson, Lukas Mai, Matthew Horsfall, Nicholas Clark, Oleg Nesterov, Reini Urban, Ricardo Signes, Robin Barker, Shirakata Kentaro, Shlomi Fish, Steve Hay, Tony Cook, Vincent Pit, Walt Mankowski, 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 AUTHORS file in the Perl source distribution.
If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , the Perl Home Page.
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.
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.