=encoding utf8 =head1 NAME perl5215delta - what is new for perl v5.21.5 =head1 DESCRIPTION This document describes differences between the 5.21.4 release and the 5.21.5 release. If you are upgrading from an earlier release such as 5.21.3, first read L, which describes differences between 5.21.3 and 5.21.4. =head1 Core Enhancements =head2 New double-diamond operator C<<< <<>> >>> is like C<< <> >> but uses three-argument C to open each file in @ARGV. So each element of @ARGV is an actual file name, and "|foo" won't be treated as a pipe open. =head2 Aliasing via reference Variables and subroutines can now be aliased by assigning to a reference: \$c = \$d; \&x = \&y; Or by using a backslash before a C iterator variable, which is perhaps the most useful idiom this feature provides: foreach \%hash (@array_of_hash_refs) { ... } This feature is experimental and must be enabled via C. It will warn unless the C warnings category is disabled. See L =head2 Perl now supports POSIX 2008 locale currency additions. On platforms that are able to handle POSIX.1-2008, the hash returned by L|perllocale/The localeconv function> includes the international currency fields added by that version of the POSIX standard. These are C, C, C, C, C, and C. =head2 Packing infinity or not-a-number into a character is now fatal Before, when trying to pack infinity or not-a-number into a (signed) character, Perl would warn, and assumed you tried to pack C<< 0xFF >>; if you gave it as an argument to C<< chr >>, C<< U+FFFD >> was returned. But now, all such actions (C<< pack >>, C<< chr >>, and C<< print '%c' >>) result in a fatal error. =head2 Inf and NaN Many small improvements, bug fixes and added test cases for dealing with math related to infinity and not-a-number. =head1 Security =head2 Perl is now compiled with -fstack-protector-strong if available Perl has been compiled with the anti-stack-smashing option C<-fstack-protector> since 5.10.1. Now Perl uses the newer variant called C<-fstack-protector-strong>, if available. (This was added already in 5.21.4.) =head1 Deprecations =head2 Use of multiple /x regexp modifiers It is now deprecated to say something like any of the following: qr/foo/xx; /(?xax:foo)/; use re qw(/amxx); That is, now C should only occur once in any string of contiguous regular expression pattern modifiers. We do not believe there are any occurrences of this in all of CPAN. This is in preparation for a future Perl release having C mean to allow white-space for readability in bracketed character classes (those enclosed in square brackets: C<[...]>). =head1 Performance Enhancements =over 4 =item * C is up to 20% faster for non-magical/non-tied scalars containing a string if it is a non-utf8 string or if C is in scope. =item * Non-magical/non-tied scalars that contain only a floating point value and are on most Perl builds with 64 bit integers now use 8-32 less bytes of memory depending on OS. =item * In C<@array = split>, the assignment can be optimized away with C writing directly to the array. This optimisation was happening only for package arrays other than @_ and only sometimes. Now this optimisation happens almost all the time. =item * C is now subject to constant folding. Moreover, C with a scalar or constant for the separator and a single-item list to join is simplified to a stringification. The separator doesn't even get evaluated. =item * C is implemented using two ops: a stringify op and a join op. If the qq contains nothing but a single array, the stringification is optimized away. =item * C and C in void context are no longer evaluated at run time. Even a whole sequence of C statements will simply be skipped over. The same applies to C variables. =back =head1 Modules and Pragmata =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 0.23 to 0.24. Avoid reading beyond the end of a buffer. [perl #122629] =item * L has been upgraded from version 1.51 to 1.52. =item * L has been upgraded from version 0.993 to 0.994. Null ops that are part of the execution chain are now given sequence numbers. Private flags for nulled ops are now dumped with mnemonics as they would be for the non-nulled counterparts. L has been upgraded from version 1.28 to 1.29. Parenthesised arrays in lists passed to C<\> are now correctly deparsed with parentheses (e.g., C<\(@a, (@b), @c)> now retains the parentheses around @b), this preserving the flattening behaviour of referenced parenthesised arrays. Formerly, it only worked for one array: C<\(@a)>. C is now deparsed correctly, with the C included. C was deparsed without the C (or C). This has been fixed. Core keywords that conflict with lexical subroutines are now deparsed with the C prefix. C now deparses correctly with C and not C. C now deparses correctly with C in those cases where the assignment is optimized away. =item * L has been upgraded from version 1.21 to 1.22. =item * L has been upgraded from version 1.28 to 1.29. =item * L has been upgraded from version 2.064 to 2.066. =item * L has been upgraded from version 2.065 to 2.066. =item * L has been upgraded from version 2.142060 to 2.142690. =item * L has been upgraded from version 1.26 to 1.27. Remove dl_nonlazy global if unused in Dynaloader. [perl #122926] =item * L has been upgraded from version 1.20_04 to 1.21. =item * L has been upgraded from version 0.010 to 0.012. =item * L has been upgraded from version 0.280219 to 0.280220. =item * L has been upgraded from version 1.02 to 1.03. =item * L has been upgraded from version 1.11 to 1.13. Add support for the Linux pipe buffer size fcntl() commands. =item * L has been upgraded from version 1.37 to 1.38. =item * L has been upgraded from version 1.28 to 1.29. Slightly faster module loading time. =item * L has been upgraded from version 3.50 to 3.51. =item * L has been upgraded from version 0.049 to 0.050. =item * The IO-Compress set of modules has been upgraded from version 2.064 to 2.066. =item * L has been upgraded from version 2.27203 to 2.27300. =item * The libnet collection of modules has been upgraded from version 1.27 to 3.02. Support for IPv6 and SSL to Net::FTP, Net::NNTP, Net::POP3 and Net::SMTP. Improvements in Net::SMTP authentication. =item * L has been upgraded from version 5.20140920 to 5.20141020. Updated to cover the latest releases of Perl. =item * L has been upgraded from version 1.28 to 1.29. =item * The PathTools module collection has been upgraded from version 3.50 to 3.51. Slightly faster module loading time. =item * L has been upgraded from version 5.0150045 to version 5.0150046. [perl #123008] =item * L has been upgraded from version 1.43 to 1.45. POSIX::tmpnam() now produces a deprecation warning. [perl #122005] =item * L has been upgraded from version 0.26 to 0.27. =item * L has been upgraded from version 2.015 to 2.016. =item * L has been upgraded from version 1.001006 to 1.001008. =item * L has been upgraded from version 1.46 to 1.47. =item * L has been upgraded from version 1.26 to 1.28. =item * L has been upgraded from version 0.17 to 0.18. Allow XSLoader to load modules from a different namespace. [perl #122455] =back =head1 Documentation =head2 Changes to Existing Documentation =head3 L =over 4 =item * Clarifications have been added to L to the effect that Perl guarantees that C<[A-Z]>, C<[a-z]>, C<[0-9]> and any subranges thereof in regular expression bracketed character classes are guaranteed to match exactly what a naive English speaker would expect them to match, even on platforms (such as EBCDIC) where special handling is required to accomplish this. =back =head1 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 L. =head2 New Diagnostics =head3 New Errors =over 4 =item * L =item * L =item * L =item * L =back =head2 Changes to Existing Diagnostics =over 4 =item * '"my" variable &foo::bar can't be in a package' has been reworded to say 'subroutine' instead of 'variable'. =back =head1 Testing =over 4 =item * Some regular expression tests are written in such a way that they will run very slowly if certain optimizations break. These tests have been moved into new files, F<< t/re/speed.t >> and F<< t/re/speed_thr.t >>, and are run with a C<< watchdog() >>. =back =head1 Platform Support =head2 Regained Platforms IRIX and Tru64 platforms are working again. (Some C failures remain.) =head2 Platform-Specific Notes =over 4 =item EBCDIC Special handling is required on EBCDIC platforms to get C to match only C<"i"> and C<"j">, since there are 7 characters between the code points for C<"i"> and C<"j">. This special handling had only been invoked when both ends of the range are literals. Now it is also invoked if any of the C<\N{...}> forms for specifying a character by name or Unicode code point is used instead of a literal. See L. =back =head1 Internal Changes =over 4 =item * SVs of type SVt_NV are now bodyless when a build configure and platform allow it, specifically C. The bodyless trick is the same one as for IVs since 5.9.2, but for NVs, unlike IVs, is not guaranteed on all platforms and build configurations. =item * The C<$DB::single>, C<$DB::signal> and C<$DB::trace> now have set and get magic that stores their values as IVs and those IVs are used when testing their values in C. This prevents perl from recursing infinity if an overloaded object is assigned to any of those variables. [perl #122445] =item * C which is marked as public API but undocumented has been removed from public API. If you use C macro in your XS code to preextend the mortal stack, you are unaffected by this change. =item * C, which was introduced in 5.21.4, has been changed incompatibly. It now has a flags field that allows the caller to specify whether the name should be fully qualified. See L. =item * Internally Perl no longer uses the C flag. C now returns a true value for anything not marked PADTMP. C is now defined as 0. =item * The macros SETsv and SETsvUN have been removed. They were no longer used in the core since commit 6f1401dc2a, and have not been found present on CPAN. =item * The C<< SvFAKE >> bit (unused on HVs) got informally reserved by David Mitchell for future work on vtables. =item * The C function accepts C and C flags, which specify whether the appended string is bytes or utf8, respectively. =item * A new opcode class, C<< METHOP >> has been introduced, which holds class/method related info needed at runtime to improve performance of class/object method calls. C<< OP_METHOD >> and C<< OP_METHOD_NAMED >> are moved from being C<< UNOP/SVOP >> to being C<< METHOP >>. =back =head1 Selected Bug Fixes =over 4 =item * Locking and unlocking values via L or C no longer has any effect on values that are read-only to begin. Previously, unlocking such values could result in crashes, hangs or other erratic behaviour. =item * The internal C function (which L provides access to) began erroneously to return true for "-e1" in 5.21.4, affecting also C<-'-e1'>. This has been fixed. =item * The flip-flop operator (C<..> in scalar context) would return the same scalar each time, unless the containing subroutine was called recursively. Now it always returns a new scalar. [perl #122829] =item * Some unterminated C<(?(...)...)> constructs in regular expressions would either crash or give erroneous error messages. C is one such example. =item * C no longer calls FETCH twice. =item * List assignments like C<($x, $z) = (1, $y)> now work correctly if $x and $y have been aliased by C. =item * Some patterns including code blocks with syntax errors, such as C, would hang or fail assertions on debugging builds. Now they produce errors. =item * An assertion failure when parsing C with debugging enabled has been fixed. [perl #122771] =item * C<*a = *b; @a = split //, $b[1]> could do a bad read and produce junk results. =item * In C<() = @array = split>, the C<() => at the beginning no longer confuses the optimizer, making it assume a limit of 1. =item * Fatal warnings no longer prevent the output of syntax errors. [perl #122966] =item * Fixed a NaN double to long double conversion error on VMS. For quiet NaNs (and only on Itanium, not Alpha) negative infinity instead of NaN was produced. =item * Fixed the issue that caused C<< make distclean >> to leave files behind that shouldn't. [perl #122820] =item * AIX now sets the length in C<< getsockopt >> correctly. [perl #120835], [rt #91183], [rt #85570]. =item * During the pattern optimization phase, we no longer recurse into GOSUB/GOSTART when not SCF_DO_SUBSTR. This prevents the optimizer to run "forever" and exhaust all memory. [perl #122283] =item * F<< t/op/crypt.t >> now performs SHA-256 algorithm if the default one is disabled. [perl #121591] =item * Fixed an off-by-one error when setting the size of shared array. [perl #122950] =item * Fixed a bug that could cause perl to execute an infinite loop during compilation. [perl #122995] =back =head1 Acknowledgements Perl 5.21.5 represents approximately 4 weeks of development since Perl 5.21.4 and contains approximately 40,000 lines of changes across 530 files from 33 authors. Excluding auto-generated files, documentation and release tools, there were approximately 29,000 lines of changes to 390 .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.21.5: Aaron Crane, Abigail, Alberto Simões, Andrew Fresh, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Mitchell, Doug Bell, Ed J, Father Chrysostomos, George Greer, Graham Knop, James E Keenan, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Niko Tyni, Peter Martini, Petr Písař, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Shlomi Fish, Steve Hay, syber, Tony Cook, Vincent Pit, Yves Orton, Ævar Arnfjörð Bjarmason. 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 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 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 L 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, 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 file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut