Commit | Line | Data |
---|---|---|
44691e6f AB |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
0346c3a9 | 5 | perldelta - what is new for perl v5.21.2 |
c68523cb | 6 | |
238894db | 7 | =head1 DESCRIPTION |
c68523cb | 8 | |
0346c3a9 | 9 | This document describes differences between the 5.21.1 release and the 5.21.2 |
238894db | 10 | release. |
c68523cb | 11 | |
0346c3a9 MH |
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. | |
7065301c | 14 | |
7065301c RS |
15 | =head1 Core Enhancements |
16 | ||
6d9b7c7c | 17 | =head2 Better heuristics on older platforms for determining locale UTF8ness |
7e957246 | 18 | |
6d9b7c7c A |
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. | |
7e957246 | 22 | |
0346c3a9 | 23 | =head1 Security |
7e957246 | 24 | |
8bdb3f93 JH |
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 | ||
cd209d9d | 35 | |
0346c3a9 | 36 | =head1 Deprecations |
5320b60d | 37 | |
6d9b7c7c | 38 | =head2 C<< /\C/ >> character class |
36304e49 | 39 | |
6d9b7c7c A |
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. | |
7065301c | 44 | |
6d9b7c7c | 45 | =head1 Performance Enhancements |
df758df2 | 46 | |
6d9b7c7c | 47 | =over 4 |
df758df2 | 48 | |
6d9b7c7c | 49 | =item * |
412f55bb | 50 | |
6d9b7c7c | 51 | Refactoring of C<< pp_tied >> and CC<< pp_ref >> for small improvements. |
412f55bb | 52 | |
6d9b7c7c | 53 | =item * |
7065301c | 54 | |
6d9b7c7c | 55 | Pathtools don't try to load XS on miniperl. |
7065301c | 56 | |
6d9b7c7c | 57 | =item * |
d133a3dd | 58 | |
6d9b7c7c | 59 | A typo fix reduces the size of the C<< OP >> structure. |
7065301c | 60 | |
6bb82be0 MH |
61 | =item * |
62 | ||
6d9b7c7c | 63 | Hash lookups where the key is a constant is faster. |
6bb82be0 | 64 | |
7065301c RS |
65 | =back |
66 | ||
7ef8b31d | 67 | =head1 Modules and Pragmata |
f6f3144e | 68 | |
aac7f82f | 69 | =head2 Updated Modules and Pragmata |
2fc36bac | 70 | |
aac7f82f | 71 | =over 4 |
2fc36bac | 72 | |
aac7f82f | 73 | =item * |
2fc36bac | 74 | |
aac7f82f | 75 | L<arybase> has been upgraded from version 0.07 to 0.08. |
24a38d90 RS |
76 | |
77 | =item * | |
78 | ||
aac7f82f | 79 | L<B> has been upgraded from version 1.49 to 1.50. |
7065301c | 80 | |
aac7f82f | 81 | =item * |
7065301c | 82 | |
aac7f82f | 83 | L<Devel::Peek> has been upgraded from version 1.17 to 1.18. |
7065301c | 84 | |
aac7f82f A |
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. | |
7065301c RS |
105 | |
106 | =item * | |
107 | ||
aac7f82f A |
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. | |
6d9b7c7c A |
113 | |
114 | =item * | |
115 | ||
116 | L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31. | |
7f55cec0 SH |
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 | ||
aac7f82f A |
124 | L<IPC::Open3> has been upgraded from version 1.16 to 1.17. |
125 | ||
126 | =item * | |
127 | ||
091fed7c TC |
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> | |
902c1f75 | 133 | |
2901561d MH |
134 | =item * |
135 | ||
aac7f82f | 136 | L<Module::CoreList> has been upgraded from version 5.021001_01 to 5.021002. |
2901561d | 137 | |
4594cf53 TC |
138 | =item * |
139 | ||
aac7f82f | 140 | L<Pod::Usage> has been upgraded from version 1.63 to 1.64. |
96dcbc37 DD |
141 | |
142 | =item * | |
143 | ||
aac7f82f | 144 | L<POSIX> has been upgraded from version 1.40 to 1.41. |
7065301c | 145 | |
aac7f82f | 146 | =item * |
58f25ac1 | 147 | |
aac7f82f | 148 | L<threads> has been upgraded from version 1.94 to 1.95. |
58f25ac1 MH |
149 | |
150 | =item * | |
151 | ||
aac7f82f | 152 | L<warnings> has been upgraded from version 1.24 to 1.26. |
5bafdaa4 | 153 | |
58f25ac1 MH |
154 | =back |
155 | ||
0346c3a9 | 156 | =head1 Documentation |
12042f24 | 157 | |
0346c3a9 | 158 | =head2 Changes to Existing Documentation |
2705070b | 159 | |
6d9b7c7c | 160 | =head3 L<< perlpolicy >> |
b10906fb MH |
161 | |
162 | =over 4 | |
163 | ||
164 | =item * | |
165 | ||
6d9b7c7c A |
166 | We now have a code of conduct for the I<< p5p >> mailing list, as documented |
167 | in L<< perlpolicy/STANDARDS OF CONDUCT >>. | |
b10906fb MH |
168 | |
169 | =back | |
170 | ||
6d9b7c7c | 171 | =head3 L<< perlfunc >> |
7065301c | 172 | |
6d9b7c7c | 173 | =over 4 |
7065301c | 174 | |
6d9b7c7c | 175 | =item * |
0346c3a9 | 176 | |
6d9b7c7c | 177 | Improve documentation of C<< our >>. |
7065301c | 178 | |
6d9b7c7c | 179 | =back |
0346c3a9 | 180 | |
6d9b7c7c | 181 | =head3 L<< perlsyn >> |
7065301c RS |
182 | |
183 | =over 4 | |
24a38d90 RS |
184 | |
185 | =item * | |
186 | ||
6d9b7c7c A |
187 | The empty conditional in C<< for >> and C<< while >> is now documented |
188 | in L<< perlsyn >>. | |
7065301c RS |
189 | |
190 | =back | |
191 | ||
6d9b7c7c A |
192 | =head1 Diagnostics |
193 | ||
194 | =head2 New Diagnostics | |
195 | ||
7065301c RS |
196 | =head3 New Warnings |
197 | ||
198 | =over 4 | |
24a38d90 RS |
199 | |
200 | =item * | |
201 | ||
48867f3d TC |
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. | |
28462159 | 208 | |
28462159 MH |
209 | =item * |
210 | ||
6d9b7c7c | 211 | L<Redundant argument in %s|perldiag/Redundant argument in %s> |
097675bf | 212 | |
6d9b7c7c A |
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>. | |
b3211734 | 217 | |
6d9b7c7c | 218 | The warnings category C<< redundant >> is new. See also [RT #121025] |
b3211734 | 219 | |
238894db | 220 | =back |
24a38d90 | 221 | |
0346c3a9 | 222 | =head1 Configuration and Compilation |
b08d439a | 223 | |
0346c3a9 | 224 | =over 4 |
747b6130 MH |
225 | |
226 | =item * | |
227 | ||
6d9b7c7c A |
228 | A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details, |
229 | see the discussion below at L<< /Internal Changes >>. | |
7065301c RS |
230 | |
231 | =back | |
232 | ||
0346c3a9 MH |
233 | =head1 Testing |
234 | ||
7065301c RS |
235 | =over 4 |
236 | ||
237 | =item * | |
24a38d90 | 238 | |
6d9b7c7c A |
239 | C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it |
240 | more compatible with C<< Test::More >>. | |
7065301c RS |
241 | |
242 | =back | |
243 | ||
0346c3a9 | 244 | =head1 Platform Support |
12042f24 | 245 | |
7065301c RS |
246 | =head2 Platform-Specific Notes |
247 | ||
0346c3a9 | 248 | =over 4 |
7d0ccdba | 249 | |
44bb6bf0 | 250 | =item Solaris |
7d0ccdba | 251 | |
44bb6bf0 TC |
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> | |
7d0ccdba | 256 | |
7065301c RS |
257 | =back |
258 | ||
259 | =head1 Internal Changes | |
260 | ||
0346c3a9 | 261 | =over 4 |
4c28b29c | 262 | |
c9fcb674 KW |
263 | =item * |
264 | ||
ddeaf645 DD |
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. | |
c9fcb674 | 271 | |
a835cd47 KW |
272 | =item * |
273 | ||
6d9b7c7c A |
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 >>. | |
03ceeedf | 278 | |
6d9b7c7c A |
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 >>). | |
03ceeedf | 283 | |
6d9b7c7c A |
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. | |
c1284011 | 287 | |
6d9b7c7c | 288 | =back |
c1284011 | 289 | |
6d9b7c7c | 290 | =head1 Selected Bug Fixes |
375f5f06 | 291 | |
0346c3a9 | 292 | =over 4 |
375f5f06 | 293 | |
2884baee MH |
294 | =item * |
295 | ||
6d9b7c7c A |
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] | |
2884baee | 298 | |
6d9b7c7c | 299 | =item * |
5af51eb4 | 300 | |
6d9b7c7c A |
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] | |
5af51eb4 | 304 | |
412f55bb KW |
305 | =item * |
306 | ||
6d9b7c7c A |
307 | C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed. |
308 | [RT #122171]. | |
412f55bb | 309 | |
7065301c RS |
310 | =back |
311 | ||
7065301c | 312 | =head1 Acknowledgements |
24a38d90 | 313 | |
e831f11a A |
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. | |
f5b73711 | 343 | |
44691e6f AB |
344 | =head1 Reporting Bugs |
345 | ||
e08634c5 SH |
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 | |
238894db | 348 | https://rt.perl.org/ . There may also be information at |
7ef8b31d | 349 | http://www.perl.org/ , the Perl Home Page. |
44691e6f | 350 | |
e08634c5 SH |
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. | |
44691e6f AB |
355 | |
356 | If the bug you are reporting has security implications, which make it | |
e08634c5 SH |
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 | |
f9001595 | 361 | co-ordinate the release of patches to mitigate or fix the problem across all |
e08634c5 SH |
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. | |
44691e6f AB |
365 | |
366 | =head1 SEE ALSO | |
367 | ||
e08634c5 SH |
368 | The F<Changes> file for an explanation of how to view exhaustive details on |
369 | what changed. | |
44691e6f AB |
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 |