summaryrefslogtreecommitdiff
path: root/pod/perl5212delta.pod
blob: f31a7825c87a6de156180f588a187d11a10b0ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
=encoding utf8

=head1 NAME

perl5212delta - what is new for perl v5.21.2

=head1 DESCRIPTION

This document describes differences between the 5.21.1 release and the 5.21.2
release.

If you are upgrading from an earlier release such as 5.21.0, first read
L<perl5211delta>, which describes differences between 5.21.0 and 5.21.1.

=head1 Core Enhancements

=head2 Better heuristics on older platforms for determining locale UTF8ness

On platforms that implement neither the C99 standard nor the POSIX 2001
standard, determining if the current locale is UTF8 or not depends on
heuristics.  These are improved in this release.

=head1 Security

=head2 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available

The 'code hardening' option called C<_FORTIFY_SOURCE>, available in
gcc 4.*, is now always used for compiling Perl, if available.

Note that this isn't necessarily a huge step since in many platforms
the step had already been taken several years ago: many Linux
distributions (like Fedora) have been using this option for Perl,
and OS X has enforced the same for many years.


=head1 Deprecations

=head2 C<< /\C/ >> character class

This character class, which matches a single byte, even if it appears
in a multi-byte character has been deprecated. Matching single bytes
in a multi-byte character breaks encapsulation, and can corrupt utf8
strings.

=head1 Performance Enhancements

=over 4

=item *

Refactoring of C<< pp_tied >> and CC<< pp_ref >> for small improvements.

=item *

Pathtools don't try to load XS on miniperl.

=item *

A typo fix reduces the size of the C<< OP >> structure.

=item *

Hash lookups where the key is a constant is faster.

=back

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<arybase> has been upgraded from version 0.07 to 0.08.

=item *

L<B> has been upgraded from version 1.49 to 1.50.

=item *

L<Devel::Peek> has been upgraded from version 1.17 to 1.18.

=item *

L<experimental> has been upgraded from version 0.007 to 0.008.

=item *

L<ExtUtils::Manifest> has been upgraded from version 1.63 to 1.64.

=item *

L<File::Copy> has been upgraded from version 2.29 to 2.30.

=item *

The PathTools module collection (L<File::Spec> and friends) has been
upgraded from version 3.48 to 3.49.

=item *

L<Filter::Simple> has been upgraded from version 0.91 to 0.92.

=item *

L<Hash::Util> has been upgraded from version 0.17 to 0.18.

=item *

L<IO> has been upgraded from version 1.32 to 1.33.

=item *

L<IO::Socket::IP> has been upgraded from version 0.29 to 0.31.

A better fix for subclassing C<connect()>.
L<[cpan #95983]|https://rt.cpan.org/Ticket/Display.html?id=95983>
L<[cpan #97050]|https://rt.cpan.org/Ticket/Display.html?id=97050>

=item *

L<IPC::Open3> has been upgraded from version 1.16 to 1.17.

=item *

L<Math::BigInt> has been upgraded from version 1.9995 to 1.9996.

Correct handling of subclasses.
L<[cpan #96254]|https://rt.cpan.org/Ticket/Display.html?id=96254>
L<[cpan #96329]|https://rt.cpan.org/Ticket/Display.html?id=96329>

=item *

L<Module::CoreList> has been upgraded from version 5.021001_01 to 5.021002.

=item *

L<Pod::Usage> has been upgraded from version 1.63 to 1.64.

=item *

L<POSIX> has been upgraded from version 1.40 to 1.41.

=item *

L<threads> has been upgraded from version 1.94 to 1.95.

=item *

L<warnings> has been upgraded from version 1.24 to 1.26.

=back

=head1 Documentation

=head2 Changes to Existing Documentation

=head3 L<< perlpolicy >>

=over 4

=item *

We now have a code of conduct for the I<< p5p >> mailing list, as documented
in L<< perlpolicy/STANDARDS OF CONDUCT >>.

=back

=head3 L<< perlfunc >>

=over 4

=item *

Improve documentation of C<< our >>.

=back

=head3 L<< perlsyn >>

=over 4

=item *

The empty conditional in C<< for >> and C<< while >> is now documented
in L<< perlsyn >>.

=back

=head1 Diagnostics

=head2 New Diagnostics

=head3 New Warnings

=over 4

=item *

L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
as 0 in increment (++)">

(W numeric) The indicated string was fed as an argument to the C<++> operator
which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
See L<perlop/Auto-increment and Auto-decrement> for details.

=item *

L<Redundant argument in %s|perldiag/Redundant argument in %s>

(W redundant) You called a function with more arguments than other
arguments you supplied indicated would be needed. Currently only
emitted when a printf-type format required fewer arguments than were
supplied, but might be used in the future for e.g. L<perlfunc/pack>.

The warnings category C<< redundant >> is new. See also [RT #121025]

=back

=head1 Configuration and Compilation

=over 4

=item *

A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
see the discussion below at L<< /Internal Changes >>.

=back

=head1 Testing

=over 4

=item *

C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
more compatible with C<< Test::More >>.

=back

=head1 Platform Support

=head2 Platform-Specific Notes

=over 4

=item Solaris

Builds on Solaris 10 with C<-Dusedtrace> would fail early since make
didn't follow implied dependencies to build C<perldtrace.h>.  Added an
explicit dependency to C<depend>.
L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120>

=back

=head1 Internal Changes

=over 4

=item *

The following private API functions had their context parameter removed,
C<Perl_cast_ulong>,  C<Perl_cast_i32>, C<Perl_cast_iv>,    C<Perl_cast_uv>,
C<Perl_cv_const_sv>, C<Perl_mg_find>,  C<Perl_mg_findext>, C<Perl_mg_magical>,
C<Perl_mini_mktime>, C<Perl_my_dirfd>, C<Perl_sv_backoff>, C<Perl_utf8_hop>.

Users of the public API prefix-less calls remain unaffected.

=item *

Experimental support for ops in the optree to be able to locate their
parent, if any. A general-purpose function, C<< op_sibling_splice() >>
allows for general manipulating an C<< op_sibling >> chain. The last op
in such a chain is now marked with the field C<< op_lastsib >>.

A new build define, C<< -DPERL_OP_PARENT >> has been added; if
given, it forces the core to use C<< op_lastsib >> to detect the
last sibling in a chain, freeing the last C<< op_sibling >> pointer,
which then points back to the parent (instead of being C<< NULL >>).

A C-level C<< op_parent() >> function, and a C<< B >> C<< parent() >> method
have been added; under a default build, they return C<< NULL >>, but when
C<< -DPERL_OP_PARENT >> has been set, they return the parent of the current op.

=back

=head1 Selected Bug Fixes

=over 4

=item *

C<< s///e >> on tainted utf8 strings got C<< pos() >> messed up. This bug,
introduced in 5.20, is now fixed. [RT #122148]

=item *

A non-word boundary in a regular expression (C<< \B >>) did not always
match the end of the string; in particular C<< q{} =~ /\B/ >> did not
match. This bug, introduced in perl 5.14, is now fixed. [RT #122090]

=item *

C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed.
[RT #122171].

=back

=head1 Acknowledgements

Perl 5.21.2 represents approximately 4 weeks of development since Perl 5.21.1
and contains approximately 11,000 lines of changes across 220 files from 27
authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 5,700 lines of changes to 140 .pm, .t, .c and .h files.

Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.21.2:

Aaron Crane, Abhijit Menon-Sen, Abigail, Alexandr Ciornii, brian d foy, Brian
Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Golden,
David Mitchell, Dmitri Tikhonov, George Greer, H.Merijn Brand, James E Keenan,
Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Matthew Horsfall, Peter
John Acklam, Peter Martini, Reini Urban, Ricardo Signes, Steve Hay, Tony Cook,
Yves Orton, Ævar Arnfjörð Bjarmason.

The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.

Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.

=head1 Reporting Bugs

If you find what you think is a bug, you might check the articles recently
posted to the comp.lang.perl.misc newsgroup and the perl bug database at
https://rt.perl.org/ .  There may also be information at
http://www.perl.org/ , the Perl Home Page.

If you believe you have an unreported bug, please run the L<perlbug> program
included with your release.  Be sure to trim your bug down to a tiny but
sufficient test case.  Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

If the bug you are reporting has security implications, which make it
inappropriate to send to a publicly archived mailing list, then please send it
to perl5-security-report@perl.org.  This points to a closed subscription
unarchived mailing list, which includes all the core committers, who will be
able to help assess the impact of issues, figure out a resolution, and help
co-ordinate the release of patches to mitigate or fix the problem across all
platforms on which Perl is supported.  Please only use this address for
security issues in the Perl core, not for modules independently distributed on
CPAN.

=head1 SEE ALSO

The F<Changes> file for an explanation of how to view exhaustive details on
what changed.

The F<INSTALL> file for how to build Perl.

The F<README> file for general stuff.

The F<Artistic> and F<Copying> files for copyright information.

=cut