This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Installing Inline no longer installs Inline::C.
[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
aac7f82f 69=head2 Updated Modules and Pragmata
2fc36bac 70
aac7f82f 71=over 4
2fc36bac 72
aac7f82f 73=item *
2fc36bac 74
aac7f82f 75L<arybase> has been upgraded from version 0.07 to 0.08.
24a38d90
RS
76
77=item *
78
aac7f82f 79L<B> has been upgraded from version 1.49 to 1.50.
7065301c 80
aac7f82f 81=item *
7065301c 82
aac7f82f 83L<Devel::Peek> has been upgraded from version 1.17 to 1.18.
7065301c 84
aac7f82f
A
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.
7065301c
RS
105
106=item *
107
aac7f82f
A
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.
6d9b7c7c
A
113
114=item *
115
116L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31.
7f55cec0
SH
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
aac7f82f
A
124L<IPC::Open3> has been upgraded from version 1.16 to 1.17.
125
126=item *
127
091fed7c
TC
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>
902c1f75 133
2901561d
MH
134=item *
135
aac7f82f 136L<Module::CoreList> has been upgraded from version 5.021001_01 to 5.021002.
2901561d 137
4594cf53
TC
138=item *
139
aac7f82f 140L<Pod::Usage> has been upgraded from version 1.63 to 1.64.
96dcbc37
DD
141
142=item *
143
aac7f82f 144L<POSIX> has been upgraded from version 1.40 to 1.41.
7065301c 145
aac7f82f 146=item *
58f25ac1 147
aac7f82f 148L<threads> has been upgraded from version 1.94 to 1.95.
58f25ac1
MH
149
150=item *
151
aac7f82f 152L<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
166We now have a code of conduct for the I<< p5p >> mailing list, as documented
167in 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 177Improve 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
187The empty conditional in C<< for >> and C<< while >> is now documented
188in 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
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.
28462159 208
28462159
MH
209=item *
210
6d9b7c7c 211L<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
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>.
b3211734 217
6d9b7c7c 218The 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
228A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
229see 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
239C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
240more 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
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>
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
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.
c9fcb674 271
a835cd47
KW
272=item *
273
6d9b7c7c
A
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 >>.
03ceeedf 278
6d9b7c7c
A
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 >>).
03ceeedf 283
6d9b7c7c
A
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.
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
296C<< s///e >> on tainted utf8 strings got C<< pos() >> messed up. This bug,
297introduced in 5.20, is now fixed. [RT #122148]
2884baee 298
6d9b7c7c 299=item *
5af51eb4 300
6d9b7c7c
A
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]
5af51eb4 304
412f55bb
KW
305=item *
306
6d9b7c7c
A
307C<< " 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
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.
f5b73711 343
44691e6f
AB
344=head1 Reporting Bugs
345
e08634c5
SH
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
238894db 348https://rt.perl.org/ . There may also be information at
7ef8b31d 349http://www.perl.org/ , the Perl Home Page.
44691e6f 350
e08634c5
SH
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.
44691e6f
AB
355
356If the bug you are reporting has security implications, which make it
e08634c5
SH
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
f9001595 361co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
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.
44691e6f
AB
365
366=head1 SEE ALSO
367
e08634c5
SH
368The F<Changes> file for an explanation of how to view exhaustive details on
369what changed.
44691e6f
AB
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