perl5192delta - what is new for perl v5.19.2
This document describes differences between the 5.19.1 release and the 5.19.2 release.
If you are upgrading from an earlier release such as 5.19.0, first read perl5191delta, which describes differences between 5.19.0 and 5.19.1.
Multiple semicolons in subroutine prototypes have long been tolerated and treated as a single semicolon. There was one case where this did not happen. A subroutine whose prototype begins with "*" or ";*" can affect whether a bareword is considered a method name or sub call. This now applies also to ";;;*".
Whitespace has long been allowed inside subroutine prototypes,
so sub( $ $ )
is equivalent to sub($$)
,
but until now it was stripped when the subroutine was parsed.
Hence,
whitespace was not allowed in prototypes set by Scalar::Util::set_prototype
.
Now it is permitted,
and the parser no longer strips whitespace.
This means prototype &mysub
returns the original prototype,
whitespace and all.
The generated C
code now incorporates bug fixes present in miniperlmain.c,
and has whitespace changes.
It now uses #include "..."
for header files instead of #include <...>
.
This should not make any difference,
unless programs embedding libperl
happen to have local and incompatible files named EXTERN.h,
XSUB.h or perl.h,
as these will now be picked up instead of the installed Perl headers.
The canon()
function now correctly handles packages with multiple ::
separators when the $as parameter is not /.
Given that it used to generate strings which would likely be syntax errors or pathnames instead of filenames,
we infer that from the complete lack of bug reports no-one was using this functionality.
(ExtUtils::Miniperl
is now using it.)
writemain()
now takes an optional first argument.
A reference to a scalar is treated as a filename to be opened and written to.
Any other reference is used as the filehandle to write to.
Otherwise the existing default remains,
to write to STDOUT
.
writemain()
has been refactored to use functions from ExtUtils::Embed,
reducing code size and duplication.
The internal function canon()
has been deleted.
POSIX::AUTOLOAD
will no longer infinitely recurse if the shared object fails to load.
Calling STORABLE_attach
hooks no longer leaks memory.
[perl #118829]
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.
(W illegalproto) A grouping was started with [
but never closed with ]
.
This message is now only in the regexp category, and not in the deprecated category. It is still a default (i.e., severe) warning [perl #89648].
install
targets,
and are not installed,
so these changes are only likely to affect custom installation scripts.
--help
option to display the usage message.The behaviour for all valid documented invocations is unchanged.
objformat
was removed from version 0.4-RELEASE of MidnightBSD and had been deprecated on earlier versions.
This caused the build environment to be erroneously configured for a.out
rather than elf
.
This has been now been corrected.
check.third check.utf16 check.utf8 coretest minitest.prep minitest.utf16 perl.config.dashg perl.config.dashpg perl.config.gcov perl.gcov perl.gprof perl.gprof.config perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix perl.third perl.third.config perl.valgrind.config purecovperl pureperl quantperl test.deparse test.taintwarn test.third test.torture test.utf16 test.utf8 test_notty.deparse test_notty.third test_notty.valgrind test_prep.third test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16 ucheck.valgrind utest utest.third utest.utf16 utest.valgrind
It's still possible to run the relevant commands by "hand" - no underlying functionality has been removed.
PERL_SKIP_LOCALE_INIT
is set at the time Perl is started, this initialization step is skipped. Prior to this, on Windows platforms, the only workaround for this deficiency was to use a hacked-up copy of internal Perl code. Applications that need to use older Perls can discover if the embedded Perl they are using needs the workaround by testing that the C preprocessor symbol HAS_SKIP_LOCALE_INIT
is not defined. (RT #38193)BmRARE
and BmPREVIOUS
have been removed. They were not used anywhere and are not part of the API. For XS modules, they are now #defined as 0.sv_force_normal
, which usually croaks on read-only values, used to allow read-only values to be modified at compile time. This has been changed to croak on read-only values regardless. This change uncovered several core bugs.$!
displayed as garbage in many UTF-8 locales; #118197, where the radix (decimal point) character had to be an ASCII character (which doesn't work for some non-Western languages); and #115808, in which POSIX::setlocale()
on failure returned an undef
which didn't warn about not being defined even if those warnings were enabled.split
operator whose third argument is a named constant evaulating to 0 no longer causes the constant's value to change.index
no longer gets coerced to a string if it is a reference, regular expression, dualvar, etc.index
no longer produces "uninitialized" warnings at compile time. It will still produce them at run time.my sub foo() { 42 } undef &foo
) would result in a crash if warnings were turned on.sort
operator are optimised to modify an array in place, such as @a = sort @a
. During the sorting, the array is made read-only. If a sort block should happen to die, then the array remained read-only even outside the sort
. This has been fixed.$a
and $b
inside a sort block are aliased to the actual arguments to sort
, so they can be modified through those two variables. This did not always work, e.g., for lvalue subs and $#ary
, and probably many other operators. It works now.sort
are now all in list context. If the sort
itself were called in void or scalar context, then some, but not all, of the arguments used to be in void or scalar context.$1
, $2
, etc., set by nested regular expression calls would leak from one block to the next. Now these variables always refer to the outer regular expression at the start of an embedded block [perl #117917].UNIVERSAL::can
now treats its first argument the same way that method calls do: Typeglobs and glob references with non-empty IO slots are treated as handles, and strings are treated as filehandles, rather than packages, if a handle with that name exists [perl #113932].*ARGV->getline
) used to stringify the typeglob and then look it up again. Combined with changes in Perl 5.18.0, this allowed *foo->bar
to call methods on the "foo" package (like foo->bar
). In some cases it could cause the method to be called on the wrong handle. Now a typeglob argument is treated as a handle (just like (\*foo)->bar
), or, if its IO slot is empty, an error is raised.${'_<-e'}[0]
no longer gets mangled. This is the first line of input saved for the debugger's use for one-liners [perl #118627].pos
, tie
, tied
and untie
did not work properly on subroutine arguments aliased to nonexistent hash and array elements [perl #77814, #27010].=>
fat arrow operator can now quote built-in keywords even if it occurs on the next line, making it consistent with how it treats other barewords.Perl 5.19.2 represents approximately 4 weeks of development since Perl 5.19.1 and contains approximately 15,000 lines of changes across 400 files from 40 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.19.2:
Abhijit Menon-Sen, Alexandr Ciornii, Andy Dougherty, Aristotle Pagaltzis, Brian Fraser, Brian Gottreu, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Golden, David Mitchell, Ed Avis, Father Chrysostomos, Graham Knop, H.Merijn Brand, Hojung Youn, James E Keenan, Johan Vromans, Karl Williamson, Keedi Kim, Kent Fredric, Lukas Mai, Moritz Lenz, Nathan Trapuzzano, Neil Bowers, Nicholas Clark, Niels Thykier, Niko Tyni, Olivier Mengué, Peter Martini, Petr Písař, Reini Urban, Ricardo Signes, Ruslan Zakirov, Slaven Rezic, Steffen Müller, Tony Cook, Vladimir Timofeev, 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.