5 perl5212delta - what is new for perl v5.21.2
9 This document describes differences between the 5.21.1 release and the 5.21.2
12 If you are upgrading from an earlier release such as 5.21.0, first read
13 L<perl5211delta>, which describes differences between 5.21.0 and 5.21.1.
15 =head1 Core Enhancements
17 =head2 Better heuristics on older platforms for determining locale UTF8ness
19 On platforms that implement neither the C99 standard nor the POSIX 2001
20 standard, determining if the current locale is UTF8 or not depends on
21 heuristics. These are improved in this release.
25 =head2 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available
27 The 'code hardening' option called C<_FORTIFY_SOURCE>, available in
28 gcc 4.*, is now always used for compiling Perl, if available.
30 Note that this isn't necessarily a huge step since in many platforms
31 the step had already been taken several years ago: many Linux
32 distributions (like Fedora) have been using this option for Perl,
33 and OS X has enforced the same for many years.
38 =head2 C<< /\C/ >> character class
40 This character class, which matches a single byte, even if it appears
41 in a multi-byte character has been deprecated. Matching single bytes
42 in a multi-byte character breaks encapsulation, and can corrupt utf8
45 =head1 Performance Enhancements
51 Refactoring of C<< pp_tied >> and CC<< pp_ref >> for small improvements.
55 Pathtools don't try to load XS on miniperl.
59 A typo fix reduces the size of the C<< OP >> structure.
63 Hash lookups where the key is a constant is faster.
67 =head1 Modules and Pragmata
69 =head2 Updated Modules and Pragmata
75 L<arybase> has been upgraded from version 0.07 to 0.08.
79 L<B> has been upgraded from version 1.49 to 1.50.
83 L<Devel::Peek> has been upgraded from version 1.17 to 1.18.
87 L<experimental> has been upgraded from version 0.007 to 0.008.
91 L<ExtUtils::Manifest> has been upgraded from version 1.63 to 1.64.
95 L<File::Copy> has been upgraded from version 2.29 to 2.30.
99 The PathTools module collection (L<File::Spec> and friends) has been
100 upgraded from version 3.48 to 3.49.
104 L<Filter::Simple> has been upgraded from version 0.91 to 0.92.
108 L<Hash::Util> has been upgraded from version 0.17 to 0.18.
112 L<IO> has been upgraded from version 1.32 to 1.33.
116 L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31.
118 A better fix for subclassing C<connect()>.
119 L<[cpan #95983]|https://rt.cpan.org/Ticket/Display.html?id=95983>
120 L<[cpan #97050]|https://rt.cpan.org/Ticket/Display.html?id=97050>
124 L<IPC::Open3> has been upgraded from version 1.16 to 1.17.
128 L<Math::BigInt> has been upgraded from version 1.9995 to 1.9996.
130 Correct handling of subclasses.
131 L<[cpan #96254]|https://rt.cpan.org/Ticket/Display.html?id=96254>
132 L<[cpan #96329]|https://rt.cpan.org/Ticket/Display.html?id=96329>
136 L<Module::CoreList> has been upgraded from version 5.021001_01 to 5.021002.
140 L<Pod::Usage> has been upgraded from version 1.63 to 1.64.
144 L<POSIX> has been upgraded from version 1.40 to 1.41.
148 L<threads> has been upgraded from version 1.94 to 1.95.
152 L<warnings> has been upgraded from version 1.24 to 1.26.
158 =head2 Changes to Existing Documentation
160 =head3 L<< perlpolicy >>
166 We now have a code of conduct for the I<< p5p >> mailing list, as documented
167 in L<< perlpolicy/STANDARDS OF CONDUCT >>.
171 =head3 L<< perlfunc >>
177 Improve documentation of C<< our >>.
181 =head3 L<< perlsyn >>
187 The empty conditional in C<< for >> and C<< while >> is now documented
194 =head2 New Diagnostics
202 L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
203 as 0 in increment (++)">
205 (W numeric) The indicated string was fed as an argument to the C<++> operator
206 which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
207 See L<perlop/Auto-increment and Auto-decrement> for details.
211 L<Redundant argument in %s|perldiag/Redundant argument in %s>
213 (W redundant) You called a function with more arguments than other
214 arguments you supplied indicated would be needed. Currently only
215 emitted when a printf-type format required fewer arguments than were
216 supplied, but might be used in the future for e.g. L<perlfunc/pack>.
218 The warnings category C<< redundant >> is new. See also [RT #121025]
222 =head1 Configuration and Compilation
228 A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
229 see the discussion below at L<< /Internal Changes >>.
239 C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
240 more compatible with C<< Test::More >>.
244 =head1 Platform Support
246 =head2 Platform-Specific Notes
252 Builds on Solaris 10 with C<-Dusedtrace> would fail early since make
253 didn't follow implied dependencies to build C<perldtrace.h>. Added an
254 explicit dependency to C<depend>.
255 L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120>
259 =head1 Internal Changes
265 The following private API functions had their context parameter removed,
266 C<Perl_cast_ulong>, C<Perl_cast_i32>, C<Perl_cast_iv>, C<Perl_cast_uv>,
267 C<Perl_cv_const_sv>, C<Perl_mg_find>, C<Perl_mg_findext>, C<Perl_mg_magical>,
268 C<Perl_mini_mktime>, C<Perl_my_dirfd>, C<Perl_sv_backoff>, C<Perl_utf8_hop>.
270 Users of the public API prefix-less calls remain unaffected.
274 Experimental support for ops in the optree to be able to locate their
275 parent, if any. A general-purpose function, C<< op_sibling_splice() >>
276 allows for general manipulating an C<< op_sibling >> chain. The last op
277 in such a chain is now marked with the field C<< op_lastsib >>.
279 A new build define, C<< -DPERL_OP_PARENT >> has been added; if
280 given, it forces the core to use C<< op_lastsib >> to detect the
281 last sibling in a chain, freeing the last C<< op_sibling >> pointer,
282 which then points back to the parent (instead of being C<< NULL >>).
284 A C-level C<< op_parent() >> function, and a C<< B >> C<< parent() >> method
285 have been added; under a default build, they return C<< NULL >>, but when
286 C<< -DPERL_OP_PARENT >> has been set, they return the parent of the current op.
290 =head1 Selected Bug Fixes
296 C<< s///e >> on tainted utf8 strings got C<< pos() >> messed up. This bug,
297 introduced in 5.20, is now fixed. [RT #122148]
301 A non-word boundary in a regular expression (C<< \B >>) did not always
302 match the end of the string; in particular C<< q{} =~ /\B/ >> did not
303 match. This bug, introduced in perl 5.14, is now fixed. [RT #122090]
307 C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed.
312 =head1 Acknowledgements
314 Perl 5.21.2 represents approximately 4 weeks of development since Perl 5.21.1
315 and contains approximately 11,000 lines of changes across 220 files from 27
318 Excluding auto-generated files, documentation and release tools, there were
319 approximately 5,700 lines of changes to 140 .pm, .t, .c and .h files.
321 Perl continues to flourish into its third decade thanks to a vibrant community
322 of users and developers. The following people are known to have contributed the
323 improvements that became Perl 5.21.2:
325 Aaron Crane, Abhijit Menon-Sen, Abigail, Alexandr Ciornii, brian d foy, Brian
326 Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Golden,
327 David Mitchell, Dmitri Tikhonov, George Greer, H.Merijn Brand, James E Keenan,
328 Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Matthew Horsfall, Peter
329 John Acklam, Peter Martini, Reini Urban, Ricardo Signes, Steve Hay, Tony Cook,
330 Yves Orton, Ævar Arnfjörð Bjarmason.
332 The list above is almost certainly incomplete as it is automatically generated
333 from version control history. In particular, it does not include the names of
334 the (very much appreciated) contributors who reported issues to the Perl bug
337 Many of the changes included in this version originated in the CPAN modules
338 included in Perl's core. We're grateful to the entire CPAN community for
339 helping Perl to flourish.
341 For a more complete list of all of Perl's historical contributors, please see
342 the F<AUTHORS> file in the Perl source distribution.
344 =head1 Reporting Bugs
346 If you find what you think is a bug, you might check the articles recently
347 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
348 https://rt.perl.org/ . There may also be information at
349 http://www.perl.org/ , the Perl Home Page.
351 If you believe you have an unreported bug, please run the L<perlbug> program
352 included with your release. Be sure to trim your bug down to a tiny but
353 sufficient test case. Your bug report, along with the output of C<perl -V>,
354 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
356 If the bug you are reporting has security implications, which make it
357 inappropriate to send to a publicly archived mailing list, then please send it
358 to perl5-security-report@perl.org. This points to a closed subscription
359 unarchived mailing list, which includes all the core committers, who will be
360 able to help assess the impact of issues, figure out a resolution, and help
361 co-ordinate the release of patches to mitigate or fix the problem across all
362 platforms on which Perl is supported. Please only use this address for
363 security issues in the Perl core, not for modules independently distributed on
368 The F<Changes> file for an explanation of how to view exhaustive details on
371 The F<INSTALL> file for how to build Perl.
373 The F<README> file for general stuff.
375 The F<Artistic> and F<Copying> files for copyright information.