This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module::CoreList for 5.21.2
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
0346c3a9 5perldelta - what is new for perl v5.21.2
c68523cb 6
238894db 7=head1 DESCRIPTION
c68523cb 8
0346c3a9 9This document describes differences between the 5.21.1 release and the 5.21.2
238894db 10release.
c68523cb 11
0346c3a9
MH
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.
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
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.
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
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
cd209d9d 35
0346c3a9 36=head1 Deprecations
5320b60d 37
6d9b7c7c 38=head2 C<< /\C/ >> character class
36304e49 39
6d9b7c7c
A
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.
7065301c 44
6d9b7c7c 45=head1 Performance Enhancements
df758df2 46
6d9b7c7c 47=over 4
df758df2 48
6d9b7c7c 49=item *
412f55bb 50
6d9b7c7c 51Refactoring of C<< pp_tied >> and CC<< pp_ref >> for small improvements.
412f55bb 52
6d9b7c7c 53=item *
7065301c 54
6d9b7c7c 55Pathtools don't try to load XS on miniperl.
7065301c 56
6d9b7c7c 57=item *
d133a3dd 58
6d9b7c7c 59A typo fix reduces the size of the C<< OP >> structure.
7065301c 60
6bb82be0
MH
61=item *
62
6d9b7c7c 63Hash lookups where the key is a constant is faster.
6bb82be0 64
7065301c
RS
65=back
66
7ef8b31d 67=head1 Modules and Pragmata
f6f3144e 68
0346c3a9
MH
69XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
70go here. If Module::CoreList is updated, generate an initial draft of the
71following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
72for important changes should then be added by hand. In an ideal world,
73dual-life modules would have a F<Changes> file that could be cribbed.
2fc36bac 74
0346c3a9 75[ Within each section, list entries as a =item entry ]
2fc36bac 76
0346c3a9 77=head2 New Modules and Pragmata
2fc36bac 78
0346c3a9 79=over 4
24a38d90
RS
80
81=item *
82
0346c3a9 83XXX
7065301c
RS
84
85=back
86
0346c3a9 87=head2 Updated Modules and Pragmata
7065301c
RS
88
89=over 4
90
91=item *
92
6d9b7c7c
A
93L<ExtUtils::Manifest> has been upgraded to 1.64.
94
95=item *
96
97L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31.
7f55cec0
SH
98
99A better fix for subclassing C<connect()>.
100L<[cpan #95983]|https://rt.cpan.org/Ticket/Display.html?id=95983>
101L<[cpan #97050]|https://rt.cpan.org/Ticket/Display.html?id=97050>
102
103=item *
104
091fed7c
TC
105L<Math::BigInt> has been upgraded from version 1.9995 to 1.9996.
106
107Correct handling of subclasses.
108L<[cpan #96254]|https://rt.cpan.org/Ticket/Display.html?id=96254>
109L<[cpan #96329]|https://rt.cpan.org/Ticket/Display.html?id=96329>
902c1f75 110
2901561d
MH
111=item *
112
113L<Module::CoreList> has been upgraded from version 5.021001_1 to 5.021002.
114
4594cf53
TC
115=item *
116
96dcbc37
DD
117The PathTools module collection has been upgraded from version 3.48 to
1183.49.
119
120=item *
121
4594cf53
TC
122L<threads> has been upgraded from version 1.94 to 1.95.
123
7065301c
RS
124=back
125
0346c3a9 126=head2 Removed Modules and Pragmata
58f25ac1
MH
127
128=over 4
129
130=item *
131
0346c3a9 132XXX
5bafdaa4 133
58f25ac1
MH
134=back
135
0346c3a9 136=head1 Documentation
12042f24 137
0346c3a9 138=head2 Changes to Existing Documentation
2705070b 139
6d9b7c7c 140=head3 L<< perlpolicy >>
b10906fb
MH
141
142=over 4
143
144=item *
145
6d9b7c7c
A
146We now have a code of conduct for the I<< p5p >> mailing list, as documented
147in L<< perlpolicy/STANDARDS OF CONDUCT >>.
b10906fb
MH
148
149=back
150
6d9b7c7c 151=head3 L<< perlfunc >>
7065301c 152
6d9b7c7c 153=over 4
7065301c 154
6d9b7c7c 155=item *
0346c3a9 156
6d9b7c7c 157Improve documentation of C<< our >>.
7065301c 158
6d9b7c7c 159=back
0346c3a9 160
6d9b7c7c 161=head3 L<< perlsyn >>
7065301c
RS
162
163=over 4
24a38d90
RS
164
165=item *
166
6d9b7c7c
A
167The empty conditional in C<< for >> and C<< while >> is now documented
168in L<< perlsyn >>.
7065301c
RS
169
170=back
171
6d9b7c7c
A
172=head1 Diagnostics
173
174=head2 New Diagnostics
175
7065301c
RS
176=head3 New Warnings
177
178=over 4
24a38d90
RS
179
180=item *
181
48867f3d
TC
182L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
183as 0 in increment (++)">
184
185(W numeric) The indicated string was fed as an argument to the C<++> operator
186which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
187See L<perlop/Auto-increment and Auto-decrement> for details.
28462159 188
28462159
MH
189=item *
190
6d9b7c7c 191L<Redundant argument in %s|perldiag/Redundant argument in %s>
097675bf 192
6d9b7c7c
A
193(W redundant) You called a function with more arguments than other
194arguments you supplied indicated would be needed. Currently only
195emitted when a printf-type format required fewer arguments than were
196supplied, but might be used in the future for e.g. L<perlfunc/pack>.
b3211734 197
6d9b7c7c 198The warnings category C<< redundant >> is new. See also [RT #121025]
b3211734 199
238894db 200=back
24a38d90 201
0346c3a9 202=head1 Configuration and Compilation
b08d439a 203
0346c3a9 204=over 4
747b6130
MH
205
206=item *
207
6d9b7c7c
A
208A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
209see the discussion below at L<< /Internal Changes >>.
7065301c
RS
210
211=back
212
0346c3a9
MH
213=head1 Testing
214
7065301c
RS
215=over 4
216
217=item *
24a38d90 218
6d9b7c7c
A
219C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
220more compatible with C<< Test::More >>.
7065301c
RS
221
222=back
223
0346c3a9 224=head1 Platform Support
12042f24 225
7065301c
RS
226=head2 Platform-Specific Notes
227
0346c3a9 228=over 4
7d0ccdba 229
44bb6bf0 230=item Solaris
7d0ccdba 231
44bb6bf0
TC
232Builds on Solaris 10 with C<-Dusedtrace> would fail early since make
233didn't follow implied dependencies to build C<perldtrace.h>. Added an
234explicit dependency to C<depend>.
235L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120>
7d0ccdba 236
7065301c
RS
237=back
238
239=head1 Internal Changes
240
0346c3a9 241=over 4
4c28b29c 242
c9fcb674
KW
243=item *
244
ddeaf645
DD
245The following private API functions had their context parameter removed,
246C<Perl_cast_ulong>, C<Perl_cast_i32>, C<Perl_cast_iv>, C<Perl_cast_uv>,
247C<Perl_cv_const_sv>, C<Perl_mg_find>, C<Perl_mg_findext>, C<Perl_mg_magical>,
248C<Perl_mini_mktime>, C<Perl_my_dirfd>, C<Perl_sv_backoff>, C<Perl_utf8_hop>.
249
250Users of the public API prefix-less calls remain unaffected.
c9fcb674 251
a835cd47
KW
252=item *
253
6d9b7c7c
A
254Experimental support for ops in the optree to be able to locate their
255parent, if any. A general-purpose function, C<< op_sibling_splice() >>
256allows for general manipulating an C<< op_sibling >> chain. The last op
257in such a chain is now marked with the field C<< op_lastsib >>.
03ceeedf 258
6d9b7c7c
A
259A new build define, C<< -DPERL_OP_PARENT >> has been added; if
260given, it forces the core to use C<< op_lastsib >> to detect the
261last sibling in a chain, freeing the last C<< op_sibling >> pointer,
262which then points back to the parent (instead of being C<< NULL >>).
03ceeedf 263
6d9b7c7c
A
264A C-level C<< op_parent() >> function, and a C<< B >> C<< parent() >> method
265have been added; under a default build, they return C<< NULL >>, but when
266C<< -DPERL_OP_PARENT >> has been set, they return the parent of the current op.
c1284011 267
6d9b7c7c 268=back
c1284011 269
6d9b7c7c 270=head1 Selected Bug Fixes
375f5f06 271
0346c3a9 272=over 4
375f5f06 273
2884baee
MH
274=item *
275
6d9b7c7c
A
276C<< s///e >> on tainted utf8 strings got C<< pos() >> messed up. This bug,
277introduced in 5.20, is now fixed. [RT #122148]
2884baee 278
6d9b7c7c 279=item *
5af51eb4 280
6d9b7c7c
A
281A non-word boundary in a regular expression (C<< \B >>) did not always
282match the end of the string; in particular C<< q{} =~ /\B/ >> did not
283match. This bug, introduced in perl 5.14, is now fixed. [RT #122090]
5af51eb4 284
412f55bb
KW
285=item *
286
6d9b7c7c
A
287C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed.
288[RT #122171].
412f55bb 289
7065301c
RS
290=back
291
7065301c 292=head1 Acknowledgements
24a38d90 293
0346c3a9
MH
294XXX Generate this with:
295
296 perl Porting/acknowledgements.pl v5.21.1..HEAD
f5b73711 297
44691e6f
AB
298=head1 Reporting Bugs
299
e08634c5
SH
300If you find what you think is a bug, you might check the articles recently
301posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 302https://rt.perl.org/ . There may also be information at
7ef8b31d 303http://www.perl.org/ , the Perl Home Page.
44691e6f 304
e08634c5
SH
305If you believe you have an unreported bug, please run the L<perlbug> program
306included with your release. Be sure to trim your bug down to a tiny but
307sufficient test case. Your bug report, along with the output of C<perl -V>,
308will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
309
310If the bug you are reporting has security implications, which make it
e08634c5
SH
311inappropriate to send to a publicly archived mailing list, then please send it
312to perl5-security-report@perl.org. This points to a closed subscription
313unarchived mailing list, which includes all the core committers, who will be
314able to help assess the impact of issues, figure out a resolution, and help
f9001595 315co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
316platforms on which Perl is supported. Please only use this address for
317security issues in the Perl core, not for modules independently distributed on
318CPAN.
44691e6f
AB
319
320=head1 SEE ALSO
321
e08634c5
SH
322The F<Changes> file for an explanation of how to view exhaustive details on
323what changed.
44691e6f
AB
324
325The F<INSTALL> file for how to build Perl.
326
327The F<README> file for general stuff.
328
329The F<Artistic> and F<Copying> files for copyright information.
330
331=cut