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