This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 2384afee9 / #123553
[perl5.git] / pod / perl5212delta.pod
CommitLineData
13900f93
A
1=encoding utf8
2
3=head1 NAME
4
5perl5212delta - what is new for perl v5.21.2
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.21.1 release and the 5.21.2
10release.
11
12If you are upgrading from an earlier release such as 5.21.0, first read
13L<perl5211delta>, which describes differences between 5.21.0 and 5.21.1.
14
15=head1 Core Enhancements
16
17=head2 Better heuristics on older platforms for determining locale UTF8ness
18
19On platforms that implement neither the C99 standard nor the POSIX 2001
20standard, determining if the current locale is UTF8 or not depends on
21heuristics. These are improved in this release.
22
23=head1 Security
24
25=head2 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available
26
27The 'code hardening' option called C<_FORTIFY_SOURCE>, available in
28gcc 4.*, is now always used for compiling Perl, if available.
29
30Note that this isn't necessarily a huge step since in many platforms
31the step had already been taken several years ago: many Linux
32distributions (like Fedora) have been using this option for Perl,
33and OS X has enforced the same for many years.
34
35
36=head1 Deprecations
37
38=head2 C<< /\C/ >> character class
39
40This character class, which matches a single byte, even if it appears
41in a multi-byte character has been deprecated. Matching single bytes
42in a multi-byte character breaks encapsulation, and can corrupt utf8
43strings.
44
45=head1 Performance Enhancements
46
47=over 4
48
49=item *
50
51Refactoring of C<< pp_tied >> and CC<< pp_ref >> for small improvements.
52
53=item *
54
55Pathtools don't try to load XS on miniperl.
56
57=item *
58
59A typo fix reduces the size of the C<< OP >> structure.
60
61=item *
62
63Hash lookups where the key is a constant is faster.
64
65=back
66
67=head1 Modules and Pragmata
68
69=head2 Updated Modules and Pragmata
70
71=over 4
72
73=item *
74
75L<arybase> has been upgraded from version 0.07 to 0.08.
76
77=item *
78
79L<B> has been upgraded from version 1.49 to 1.50.
80
81=item *
82
83L<Devel::Peek> has been upgraded from version 1.17 to 1.18.
84
85=item *
86
87L<experimental> has been upgraded from version 0.007 to 0.008.
88
89=item *
90
91L<ExtUtils::Manifest> has been upgraded from version 1.63 to 1.64.
92
93=item *
94
95L<File::Copy> has been upgraded from version 2.29 to 2.30.
96
97=item *
98
99The PathTools module collection (L<File::Spec> and friends) has been
100upgraded from version 3.48 to 3.49.
101
102=item *
103
104L<Filter::Simple> has been upgraded from version 0.91 to 0.92.
105
106=item *
107
108L<Hash::Util> has been upgraded from version 0.17 to 0.18.
109
110=item *
111
112L<IO> has been upgraded from version 1.32 to 1.33.
113
114=item *
115
116L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31.
117
118A better fix for subclassing C<connect()>.
119L<[cpan #95983]|https://rt.cpan.org/Ticket/Display.html?id=95983>
120L<[cpan #97050]|https://rt.cpan.org/Ticket/Display.html?id=97050>
121
122=item *
123
124L<IPC::Open3> has been upgraded from version 1.16 to 1.17.
125
126=item *
127
128L<Math::BigInt> has been upgraded from version 1.9995 to 1.9996.
129
130Correct handling of subclasses.
131L<[cpan #96254]|https://rt.cpan.org/Ticket/Display.html?id=96254>
132L<[cpan #96329]|https://rt.cpan.org/Ticket/Display.html?id=96329>
133
134=item *
135
136L<Module::CoreList> has been upgraded from version 5.021001_01 to 5.021002.
137
138=item *
139
140L<Pod::Usage> has been upgraded from version 1.63 to 1.64.
141
142=item *
143
144L<POSIX> has been upgraded from version 1.40 to 1.41.
145
146=item *
147
148L<threads> has been upgraded from version 1.94 to 1.95.
149
150=item *
151
152L<warnings> has been upgraded from version 1.24 to 1.26.
153
154=back
155
156=head1 Documentation
157
158=head2 Changes to Existing Documentation
159
160=head3 L<< perlpolicy >>
161
162=over 4
163
164=item *
165
166We now have a code of conduct for the I<< p5p >> mailing list, as documented
167in L<< perlpolicy/STANDARDS OF CONDUCT >>.
168
169=back
170
171=head3 L<< perlfunc >>
172
173=over 4
174
175=item *
176
177Improve documentation of C<< our >>.
178
179=back
180
181=head3 L<< perlsyn >>
182
183=over 4
184
185=item *
186
187The empty conditional in C<< for >> and C<< while >> is now documented
188in L<< perlsyn >>.
189
190=back
191
192=head1 Diagnostics
193
194=head2 New Diagnostics
195
196=head3 New Warnings
197
198=over 4
199
200=item *
201
202L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
203as 0 in increment (++)">
204
205(W numeric) The indicated string was fed as an argument to the C<++> operator
206which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
207See L<perlop/Auto-increment and Auto-decrement> for details.
208
209=item *
210
211L<Redundant argument in %s|perldiag/Redundant argument in %s>
212
213(W redundant) You called a function with more arguments than other
214arguments you supplied indicated would be needed. Currently only
215emitted when a printf-type format required fewer arguments than were
216supplied, but might be used in the future for e.g. L<perlfunc/pack>.
217
218The warnings category C<< redundant >> is new. See also [RT #121025]
219
220=back
221
222=head1 Configuration and Compilation
223
224=over 4
225
226=item *
227
228A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
229see the discussion below at L<< /Internal Changes >>.
230
231=back
232
233=head1 Testing
234
235=over 4
236
237=item *
238
239C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
240more compatible with C<< Test::More >>.
241
242=back
243
244=head1 Platform Support
245
246=head2 Platform-Specific Notes
247
248=over 4
249
250=item Solaris
251
252Builds on Solaris 10 with C<-Dusedtrace> would fail early since make
253didn't follow implied dependencies to build C<perldtrace.h>. Added an
254explicit dependency to C<depend>.
255L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120>
256
257=back
258
259=head1 Internal Changes
260
261=over 4
262
263=item *
264
265The following private API functions had their context parameter removed,
266C<Perl_cast_ulong>, C<Perl_cast_i32>, C<Perl_cast_iv>, C<Perl_cast_uv>,
267C<Perl_cv_const_sv>, C<Perl_mg_find>, C<Perl_mg_findext>, C<Perl_mg_magical>,
268C<Perl_mini_mktime>, C<Perl_my_dirfd>, C<Perl_sv_backoff>, C<Perl_utf8_hop>.
269
270Users of the public API prefix-less calls remain unaffected.
271
272=item *
273
274Experimental support for ops in the optree to be able to locate their
275parent, if any. A general-purpose function, C<< op_sibling_splice() >>
276allows for general manipulating an C<< op_sibling >> chain. The last op
277in such a chain is now marked with the field C<< op_lastsib >>.
278
279A new build define, C<< -DPERL_OP_PARENT >> has been added; if
280given, it forces the core to use C<< op_lastsib >> to detect the
281last sibling in a chain, freeing the last C<< op_sibling >> pointer,
282which then points back to the parent (instead of being C<< NULL >>).
283
284A C-level C<< op_parent() >> function, and a C<< B >> C<< parent() >> method
285have been added; under a default build, they return C<< NULL >>, but when
286C<< -DPERL_OP_PARENT >> has been set, they return the parent of the current op.
287
288=back
289
290=head1 Selected Bug Fixes
291
292=over 4
293
294=item *
295
296C<< s///e >> on tainted utf8 strings got C<< pos() >> messed up. This bug,
297introduced in 5.20, is now fixed. [RT #122148]
298
299=item *
300
301A non-word boundary in a regular expression (C<< \B >>) did not always
302match the end of the string; in particular C<< q{} =~ /\B/ >> did not
303match. This bug, introduced in perl 5.14, is now fixed. [RT #122090]
304
305=item *
306
307C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed.
308[RT #122171].
309
310=back
311
312=head1 Acknowledgements
313
314Perl 5.21.2 represents approximately 4 weeks of development since Perl 5.21.1
315and contains approximately 11,000 lines of changes across 220 files from 27
316authors.
317
318Excluding auto-generated files, documentation and release tools, there were
319approximately 5,700 lines of changes to 140 .pm, .t, .c and .h files.
320
321Perl continues to flourish into its third decade thanks to a vibrant community
322of users and developers. The following people are known to have contributed the
323improvements that became Perl 5.21.2:
324
325Aaron Crane, Abhijit Menon-Sen, Abigail, Alexandr Ciornii, brian d foy, Brian
326Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Golden,
327David Mitchell, Dmitri Tikhonov, George Greer, H.Merijn Brand, James E Keenan,
328Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Matthew Horsfall, Peter
329John Acklam, Peter Martini, Reini Urban, Ricardo Signes, Steve Hay, Tony Cook,
330Yves Orton, Ævar Arnfjörð Bjarmason.
331
332The list above is almost certainly incomplete as it is automatically generated
333from version control history. In particular, it does not include the names of
334the (very much appreciated) contributors who reported issues to the Perl bug
335tracker.
336
337Many of the changes included in this version originated in the CPAN modules
338included in Perl's core. We're grateful to the entire CPAN community for
339helping Perl to flourish.
340
341For a more complete list of all of Perl's historical contributors, please see
342the F<AUTHORS> file in the Perl source distribution.
343
344=head1 Reporting Bugs
345
346If you find what you think is a bug, you might check the articles recently
347posted to the comp.lang.perl.misc newsgroup and the perl bug database at
348https://rt.perl.org/ . There may also be information at
349http://www.perl.org/ , the Perl Home Page.
350
351If you believe you have an unreported bug, please run the L<perlbug> program
352included with your release. Be sure to trim your bug down to a tiny but
353sufficient test case. Your bug report, along with the output of C<perl -V>,
354will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
355
356If the bug you are reporting has security implications, which make it
357inappropriate to send to a publicly archived mailing list, then please send it
358to perl5-security-report@perl.org. This points to a closed subscription
359unarchived mailing list, which includes all the core committers, who will be
360able to help assess the impact of issues, figure out a resolution, and help
361co-ordinate the release of patches to mitigate or fix the problem across all
362platforms on which Perl is supported. Please only use this address for
363security issues in the Perl core, not for modules independently distributed on
364CPAN.
365
366=head1 SEE ALSO
367
368The F<Changes> file for an explanation of how to view exhaustive details on
369what changed.
370
371The F<INSTALL> file for how to build Perl.
372
373The F<README> file for general stuff.
374
375The F<Artistic> and F<Copying> files for copyright information.
376
377=cut