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
1 =encoding utf8
2
3 =head1 NAME
4
5 perl5212delta - what is new for perl v5.21.2
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.21.1 release and the 5.21.2
10 release.
11
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.
14
15 =head1 Core Enhancements
16
17 =head2 Better heuristics on older platforms for determining locale UTF8ness
18
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.
22
23 =head1 Security
24
25 =head2 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available
26
27 The 'code hardening' option called C<_FORTIFY_SOURCE>, available in
28 gcc 4.*, is now always used for compiling Perl, if available.
29
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.
34
35
36 =head1 Deprecations
37
38 =head2 C<< /\C/ >> character class
39
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
43 strings.
44
45 =head1 Performance Enhancements
46
47 =over 4
48
49 =item *
50
51 Refactoring of C<< pp_tied >> and CC<< pp_ref >> for small improvements.
52
53 =item *
54
55 Pathtools don't try to load XS on miniperl.
56
57 =item *
58
59 A typo fix reduces the size of the C<< OP >> structure.
60
61 =item *
62
63 Hash 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
75 L<arybase> has been upgraded from version 0.07 to 0.08.
76
77 =item *
78
79 L<B> has been upgraded from version 1.49 to 1.50.
80
81 =item *
82
83 L<Devel::Peek> has been upgraded from version 1.17 to 1.18.
84
85 =item *
86
87 L<experimental> has been upgraded from version 0.007 to 0.008.
88
89 =item *
90
91 L<ExtUtils::Manifest> has been upgraded from version 1.63 to 1.64.
92
93 =item *
94
95 L<File::Copy> has been upgraded from version 2.29 to 2.30.
96
97 =item *
98
99 The PathTools module collection (L<File::Spec> and friends) has been
100 upgraded from version 3.48 to 3.49.
101
102 =item *
103
104 L<Filter::Simple> has been upgraded from version 0.91 to 0.92.
105
106 =item *
107
108 L<Hash::Util> has been upgraded from version 0.17 to 0.18.
109
110 =item *
111
112 L<IO> has been upgraded from version 1.32 to 1.33.
113
114 =item *
115
116 L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31.
117
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>
121
122 =item *
123
124 L<IPC::Open3> has been upgraded from version 1.16 to 1.17.
125
126 =item *
127
128 L<Math::BigInt> has been upgraded from version 1.9995 to 1.9996.
129
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>
133
134 =item *
135
136 L<Module::CoreList> has been upgraded from version 5.021001_01 to 5.021002.
137
138 =item *
139
140 L<Pod::Usage> has been upgraded from version 1.63 to 1.64.
141
142 =item *
143
144 L<POSIX> has been upgraded from version 1.40 to 1.41.
145
146 =item *
147
148 L<threads> has been upgraded from version 1.94 to 1.95.
149
150 =item *
151
152 L<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
166 We now have a code of conduct for the I<< p5p >> mailing list, as documented
167 in L<< perlpolicy/STANDARDS OF CONDUCT >>.
168
169 =back
170
171 =head3 L<< perlfunc >>
172
173 =over 4
174
175 =item *
176
177 Improve documentation of C<< our >>.
178
179 =back
180
181 =head3 L<< perlsyn >>
182
183 =over 4
184
185 =item *
186
187 The empty conditional in C<< for >> and C<< while >> is now documented
188 in 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
202 L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
203 as 0 in increment (++)">
204
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.
208
209 =item *
210
211 L<Redundant argument in %s|perldiag/Redundant argument in %s>
212
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>.
217
218 The 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
228 A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
229 see the discussion below at L<< /Internal Changes >>.
230
231 =back
232
233 =head1 Testing
234
235 =over 4
236
237 =item *
238
239 C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
240 more 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
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>
256
257 =back
258
259 =head1 Internal Changes
260
261 =over 4
262
263 =item *
264
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>.
269
270 Users of the public API prefix-less calls remain unaffected.
271
272 =item *
273
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 >>.
278
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 >>).
283
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.
287
288 =back
289
290 =head1 Selected Bug Fixes
291
292 =over 4
293
294 =item *
295
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]
298
299 =item *
300
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]
304
305 =item *
306
307 C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed.
308 [RT #122171].
309
310 =back
311
312 =head1 Acknowledgements
313
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
316 authors.
317
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.
320
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:
324
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.
331
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
335 tracker.
336
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.
340
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.
343
344 =head1 Reporting Bugs
345
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.
350
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.
355
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
364 CPAN.
365
366 =head1 SEE ALSO
367
368 The F<Changes> file for an explanation of how to view exhaustive details on
369 what changed.
370
371 The F<INSTALL> file for how to build Perl.
372
373 The F<README> file for general stuff.
374
375 The F<Artistic> and F<Copying> files for copyright information.
376
377 =cut