This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Fix comment
[perl5.git] / pod / perl5232delta.pod
CommitLineData
a43707ab
MH
1=encoding utf8
2
3=head1 NAME
4
5perl5232delta - what is new for perl v5.23.2
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.23.1 release and the 5.23.2
10release.
11
12If you are upgrading from an earlier release such as 5.23.0, first read
13L<perl5231delta>, which describes differences between 5.23.0 and 5.23.1.
14
15=head1 Incompatible Changes
16
17=head2 Nested declarations are now disallowed
18
19A C<my>, C<our>, or C<state> declaration is no longer allowed inside
20of another C<my>, C<our>, or C<state> declaration.
21
22For example, these are now fatal:
23
24 my ($x, my($y));
25 our (my $x);
26
27L<[perl #125587]|https://rt.perl.org/Ticket/Display.html?id=125587>
28
29L<[perl #121058]|https://rt.perl.org/Ticket/Display.html?id=121058>
30
31=head1 Deprecations
32
33=head2 sysread(), syswrite(), recv() and send() are deprecated on
34:utf8 handles
35
36The sysread(), recv(), syswrite() and send() operators
37are deprecated on handles that have the C<:utf8> layer, either
38explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
39
40Both sysread() and recv() currently use only the C<:utf8> flag for the
41stream, ignoring the actual layers. Since sysread() and recv() do no
42UTF-8 validation they can end up creating invalidly encoded scalars.
43
44Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise
45ignoring any layers. If the flag is set, both write the value UTF-8
46encoded, even if the layer is some different encoding, such as the
47example above.
48
49Ideally, all of these operators would completely ignore the C<:utf8>
50state, working only with bytes, but this would result in silently
51breaking existing code. To avoid this a future version of perl will
52throw an exception when any of sysread(), recv(), syswrite() or send()
53are called on handle with the C<:utf8> layer.
54
55=head1 Performance Enhancements
56
57=over 4
58
59=item *
60
61Creating Perl debugger data structures (see L<perldebguts/"Debugger Internals">)
62for XSUBs and const subs has been removed. This removed one glob/scalar combo
63for each unique C<.c> file that XSUBs and const subs came from. On startup
64(C<perl -e"0">) about half a dozen glob/scalar debugger combos were created.
65Loading XS modules created more glob/scalar combos. These things were created
66regardless if the perl debugger was being used or not, unlike for pure perl
67subs, and ignores that the perl debugger can not debug C code.
68
69=item *
70
71Single arguments in list assign are now slightly faster:
72
73 ($x) = (...);
74 (...) = ($x);
75
76=back
77
78=head1 Modules and Pragmata
79
80=head2 Updated Modules and Pragmata
81
82=over 4
83
84=item *
85
86The PathTools module collection has been upgraded from version 3.55 to
873.56.
88
89Minor optimizations.
90L<[perl #125712]|https://rt.perl.org/Ticket/Display.html?id=125712>
91
92=item *
93
94L<Attribute::Handlers> has been upgraded from version 0.97 to 0.99.
95
96=item *
97
98L<CPAN::Meta::YAML> has been upgraded from version 0.016 to 0.017.
99
100=item *
101
102L<Encode> has been upgraded from version 2.75 to 2.76.
103
104=item *
105
106L<ExtUtils::ParseXS> has been upgraded from version 3.28 to 3.29.
107
108=item *
109
110L<ExtUtils::Typemaps> has been upgraded from version 3.28 to 3.29.
111
112=item *
113
114L<File::Find> has been upgraded from version 1.29 to 1.30.
115
116=item *
117
118L<File::Spec> has been upgraded from version 3.56 to 3.57.
119
120=item *
121
122L<Filter::Util::Call> has been upgraded from version 1.54 to 1.55.
123
124=item *
125
126L<Hash::Util> has been upgraded from version 0.18 to 0.19.
127
128C<unlock_hashref_recurse> and C<unlock_hash_recurse> didn't
129actually unlock parts of the data structures...
130
131...now they do.
132
133=item *
134
135L<Module::CoreList> has been upgraded from version 5.20150720 to 5.20150820.
136
137=item *
138
139L<perlfaq> has been upgraded from version 5.021009 to 5.021010.
140
141=item *
142
143L<POSIX> has been upgraded from version 1.55 to 1.56.
144
145=item *
146
147L<Term::Cap> has been upgraded from version 1.15 to 1.17.
148
149=item *
150
151L<Unicode::UCD> has been upgraded from version 0.61 to 0.62.
152
153=back
154
155=head1 Documentation
156
157=head2 Changes to Existing Documentation
158
159=head3 L<perlpolicy>
160
161=over 4
162
163=item *
164
165This note has been added to perlpolicy:
166
167 While civility is required, kindness is encouraged; if you have any doubt
168 about whether you are being civil, simply ask yourself, "Am I being kind?"
169 and aspire to that.
170
171=back
172
173=head3 L<perlvar>
174
175=over 4
176
177=item *
178
179Use of C<$OLD_PERL_VERSION> is now discouraged.
180
181=back
182
183=head1 Diagnostics
184
185The following additions or changes have been made to diagnostic output,
186including warnings and fatal error messages. For the complete list of
187diagnostic messages, see L<perldiag>.
188
189=head2 New Diagnostics
190
191=head3 New Errors
192
193=over 4
194
195=item *
196
197L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s"">
198
199(F) A "my", "our" or "state" declaration was found within another declaration,
200such as C<my ($x, my($y), $z)> or C<our (my $x)>.
201
202=back
203
204=head3 New Warnings
205
206=over 4
207
208=item *
209
210L<%s() is deprecated on :utf8 handles|perldiag/"%s() is deprecated on :utf8 handles">
211
212(W deprecated) The sysread(), recv(), syswrite() and send() operators
213are deprecated on handles that have the C<:utf8> layer, either
214explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
215
216Both sysread() and recv() currently use only the C<:utf8> flag for the
217stream, ignoring the actual layers. Since sysread() and recv() do no
218UTF-8 validation they can end up creating invalidly encoded scalars.
219
220Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise
221ignoring any layers. If the flag is set, both write the value UTF-8
222encoded, even if the layer is some different encoding, such as the
223example above.
224
225Ideally, all of these operators would completely ignore the C<:utf8>
226state, working only with bytes, but this would result in silently
227breaking existing code. To avoid this a future version of perl will
228throw an exception when any of sysread(), recv(), syswrite() or send()
229are called on handle with the C<:utf8> layer.
230
231=back
232
233=head2 Changes to Existing Diagnostics
234
235=over 4
236
237=item *
238
239The diagnostic C<< Hexadecimal float: internal error >> has been changed to
240C<< Hexadecimal float: internal error (%s) >> to include more information.
241
242=back
243
244=head1 Configuration and Compilation
245
246=over 4
247
248=item *
249
250F<Configure> should handle spaces in paths a little better.
251
252=back
253
254=head1 Testing
255
256=over 4
257
258=item *
259
260A new test (F<t/op/aassign.t>) has been added to test the list assignment operator
261C<OP_AASSIGN>.
262
263=back
264
265=head1 Internal Changes
266
267=over 4
268
269=item *
270
271C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed.
272
273=item *
274
275C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed.
276
277=back
278
279=head1 Selected Bug Fixes
280
281=over 4
282
283=item *
284
285Perl can again be compiled with any Unicode version. This used to
286(mostly) work, but was lost in v5.18 through v5.20. The property
287C<Name_Alias> did not exist prior to Unicode 5.0. L<Unicode::UCD>
288incorrectly said it did. This has been fixed.
289
290=item *
291
292Very large code-points (beyond Unicode) in regular expressions no
293longer cause a buffer overflow in some cases when converted to UTF-8.
294L<[perl #125826]|https://rt.perl.org/Ticket/Display.html?id=125826>
295
296=item *
297
298The integer overflow check for the range operator (...) in list
299context now correctly handles the case where the size of the range is
300larger than the address space. This could happen on 32-bits with
301-Duse64bitint.
302L<[perl #125781]|https://rt.perl.org/Ticket/Display.html?id=125781>
303
304=item *
305
306A crash with C<< %::=(); J->${\"::"} >> has been fixed.
307L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541>
308
309=back
310
311=head1 Acknowledgements
312
313Perl 5.23.2 represents approximately 4 weeks of development since Perl 5.23.1
314and contains approximately 22,000 lines of changes across 240 files from 23
315authors.
316
317Excluding auto-generated files, documentation and release tools, there were
318approximately 17,000 lines of changes to 140 .pm, .t, .c and .h files.
319
320Perl continues to flourish into its third decade thanks to a vibrant community
321of users and developers. The following people are known to have contributed the
322improvements that became Perl 5.23.2:
323
324Aaron Priven, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry,
325Dagfinn Ilmari Mannsåker, Daniel Dragan, David Mitchell, Ed J, Father
326Chrysostomos, H.Merijn Brand, Ivan Pozdeev, James E Keenan, Jarkko Hietaniemi,
327Karen Etheridge, Karl Williamson, Ludovic E. R. Tolhurst-Cleaver, Lukas Mai,
328Matthew Horsfall, Reini Urban, Ricardo Signes, Sisyphus, Steve Hay, Tony Cook.
329
330The list above is almost certainly incomplete as it is automatically generated
331from version control history. In particular, it does not include the names of
332the (very much appreciated) contributors who reported issues to the Perl bug
333tracker.
334
335Many of the changes included in this version originated in the CPAN modules
336included in Perl's core. We're grateful to the entire CPAN community for
337helping Perl to flourish.
338
339For a more complete list of all of Perl's historical contributors, please see
340the F<AUTHORS> file in the Perl source distribution.
341
342=head1 Reporting Bugs
343
344If you find what you think is a bug, you might check the articles recently
345posted to the comp.lang.perl.misc newsgroup and the perl bug database at
346L<https://rt.perl.org/> . There may also be information at
347L<http://www.perl.org/> , the Perl Home Page.
348
349If you believe you have an unreported bug, please run the L<perlbug> program
350included with your release. Be sure to trim your bug down to a tiny but
351sufficient test case. Your bug report, along with the output of C<perl -V>,
352will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
353
354If the bug you are reporting has security implications, which make it
355inappropriate to send to a publicly archived mailing list, then please send it
356to perl5-security-report@perl.org. This points to a closed subscription
357unarchived mailing list, which includes all the core committers, who will be
358able to help assess the impact of issues, figure out a resolution, and help
359co-ordinate the release of patches to mitigate or fix the problem across all
360platforms on which Perl is supported. Please only use this address for
361security issues in the Perl core, not for modules independently distributed on
362CPAN.
363
364=head1 SEE ALSO
365
366The F<Changes> file for an explanation of how to view exhaustive details on
367what changed.
368
369The F<INSTALL> file for how to build Perl.
370
371The F<README> file for general stuff.
372
373The F<Artistic> and F<Copying> files for copyright information.
374
375=cut