Commit | Line | Data |
---|---|---|
78684fb7 S |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | perl53510delta - what is new for perl v5.35.10 | |
6 | ||
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes differences between the 5.35.9 release and the 5.35.10 | |
10 | release. | |
11 | ||
12 | If you are upgrading from an earlier release such as 5.35.8, first read | |
13 | L<perl5359delta>, which describes differences between 5.35.8 and 5.35.9. | |
14 | ||
15 | =head1 Core Enhancements | |
16 | ||
17 | =head2 New function C<builtin::trim> | |
18 | ||
19 | This function treats its argument as a string, returning the result of | |
20 | removing all white space at its beginning and ending. See | |
21 | L<builtin/trim> | |
22 | ||
23 | =head2 Variable length lookbehind is mostly no longer considered experimental. | |
24 | ||
25 | Prior to this release any form of variable length lookbehind was | |
26 | considered experimental. With this release the experimental status has | |
27 | been reduced to cover only lookbehind that contains capturing parenthesis. | |
28 | This is because it is not clear if | |
29 | ||
30 | "aaz"=~/(?=z)(?<=(a|aa))/ | |
31 | ||
32 | should match and leave $1 equaling "a" or "aa". Currently it will match | |
33 | the longest possible alternative, "aa". We are confident that the overall | |
34 | construct will now match only when it should, we are not confident that we | |
35 | will keep the current "longest match" behavior. | |
36 | ||
37 | =head2 Added 'builtin::indexed' | |
38 | ||
39 | A new function has been added to the C<builtin> package, called C<indexed>. | |
40 | It returns a list twice as big as its argument list, where each item is | |
41 | preceded by its index within that list. This is primarily useful for using | |
42 | the new C<foreach> syntax with multiple iterator variables to iterate over | |
43 | an array or list, while also tracking the index of each item: | |
44 | ||
45 | use builtin 'indexed'; | |
46 | ||
47 | foreach my ($index, $val) (indexed @array) { | |
48 | ... | |
49 | } | |
50 | ||
51 | =head2 Added experimental feature 'extra_paired_delimiters' | |
52 | ||
53 | Perl traditionally has allowed just four pairs of string/pattern | |
54 | delimiters: S<C<( )>> S<C<{ }>> S<C<[ ]>> and S<C<< < > >>>, all in the | |
55 | ASCII range. Unicode has hundreds more possibilities, and using this | |
56 | feature enables many of them. When enabled, you can say S<C<qr« »>> for | |
278812ac | 57 | example, or S<C<use utf8; q𝄃string𝄂>>. See |
78684fb7 S |
58 | L<feature/The 'extra_paired_delimiters' feature> for |
59 | details. | |
60 | ||
61 | =head1 Performance Enhancements | |
62 | ||
63 | =over 4 | |
64 | ||
65 | =item * | |
66 | ||
67 | Large hashes no longer allocate their keys from the shared string table. | |
68 | ||
69 | The same internal datatype (C<PVHV>) is used for all of | |
70 | ||
71 | =over 4 | |
72 | ||
73 | =item * | |
74 | ||
75 | Symbol tables | |
76 | ||
77 | =item * | |
78 | ||
79 | Objects (by default) | |
80 | ||
81 | =item * | |
82 | ||
83 | Associative arrays | |
84 | ||
85 | =back | |
86 | ||
87 | The shared string table was originally added to improve performance for blessed | |
88 | hashes used as objects, because every object instance has the same keys, so it | |
89 | is an optimisation to share memory between them. It also makes sense for symbol | |
90 | tables, where derived classes will have the same keys (typically method names), | |
91 | and the OP trees built for method calls can also share memory. The shared | |
92 | string table behaves roughly like a cache for hash keys. | |
93 | ||
94 | But for hashes actually used as associative arrays - mapping keys to values - | |
95 | typically the keys are not re-used in other hashes. For example, "seen" hashes | |
96 | are keyed by object IDs (or addresses), and logically these keys won't repeat | |
97 | in other hashes. | |
98 | ||
99 | Storing these "used just once" keys in the shared string table increases CPU | |
100 | and RAM use for no gain. For such keys the shared string table behaves as a | |
101 | cache with a 0% hit rate. Storing all the keys there increases the total size | |
102 | of the shared string table, as well as increasing the number of times it is | |
103 | resized as it grows. B<Worse> - in any environment that has "copy on write" | |
104 | memory for child process (such as a pre-forking server), the memory pages used | |
105 | for the shared string table rapidly need to be copied as the child process | |
106 | manipulates hashes. Hence if most of the shared string table is such keys that | |
107 | are used only in one place, there is no benefit from re-use within the perl | |
108 | interpreter, but a high cost due to more pages for the OS to copy. | |
109 | ||
110 | The perl interpreter now disables shared hash keys for "large" hashes (that are | |
111 | neither objects nor symbol tables). "Large" is a heuristic - currently the | |
112 | heuristic is that sharing is disabled when adding a key to a hash triggers | |
113 | allocation of more storage, and the hash has more than 42 keys. | |
114 | ||
115 | This B<might> cause slightly increased memory usage for programs that create | |
116 | (unblessed) data structures that contain multiple large hashes that share the | |
117 | same keys. But generally our testing suggests that for the specific cases | |
118 | described it is a win, and other code is unaffected. | |
119 | ||
120 | =back | |
121 | ||
122 | =head1 Modules and Pragmata | |
123 | ||
124 | =head2 Updated Modules and Pragmata | |
125 | ||
126 | =over 4 | |
127 | ||
128 | =item * | |
129 | ||
130 | L<Attribute::Handlers> has been upgraded from version 1.01 to 1.02. | |
131 | ||
132 | =item * | |
133 | ||
134 | L<B::Deparse> has been upgraded from version 1.62 to 1.63. | |
135 | ||
136 | =item * | |
137 | ||
138 | L<DB_File> has been upgraded from version 1.856 to 1.857. | |
139 | ||
140 | =item * | |
141 | ||
142 | L<Devel::PPPort> has been upgraded from version 3.64 to 3.68. | |
143 | ||
144 | =item * | |
145 | ||
146 | L<experimental> has been upgraded from version 0.027 to 0.028. | |
147 | ||
148 | =item * | |
149 | ||
150 | L<ExtUtils::ParseXS> has been upgraded from version 3.44 to 3.45. | |
151 | ||
152 | =item * | |
153 | ||
154 | L<ExtUtils::Typemaps> has been upgraded from version 3.44 to 3.45. | |
155 | ||
156 | =item * | |
157 | ||
158 | L<feature> has been upgraded from version 1.70 to 1.71. | |
159 | ||
160 | =item * | |
161 | ||
162 | L<File::Spec> has been upgraded from version 3.83 to 3.84. | |
163 | ||
164 | =item * | |
165 | ||
166 | L<GDBM_File> has been upgraded from version 1.22 to 1.23. | |
167 | ||
168 | =item * | |
169 | ||
170 | L<Module::CoreList> has been upgraded from version 5.20220220 to 5.20220320. | |
171 | ||
172 | =item * | |
173 | ||
174 | L<Opcode> has been upgraded from version 1.56 to 1.57. | |
175 | ||
176 | =item * | |
177 | ||
178 | L<Scalar::Util> has been upgraded from version 1.61 to 1.62. | |
179 | ||
180 | =item * | |
181 | ||
182 | L<Test::Simple> has been upgraded from version 1.302188 to 1.302190. | |
183 | ||
184 | =item * | |
185 | ||
186 | L<warnings> has been upgraded from version 1.57 to 1.58. | |
187 | ||
188 | =item * | |
189 | ||
190 | L<XS::APItest> has been upgraded from version 1.21 to 1.22. | |
191 | ||
192 | =back | |
193 | ||
194 | =head1 Documentation | |
195 | ||
196 | =head2 Changes to Existing Documentation | |
197 | ||
198 | We have attempted to update the documentation to reflect the changes | |
199 | listed in this document. If you find any we have missed, open an issue | |
200 | at L<https://github.com/Perl/perl5/issues>. | |
201 | ||
202 | =head1 Diagnostics | |
203 | ||
204 | The following additions or changes have been made to diagnostic output, | |
205 | including warnings and fatal error messages. For the complete list of | |
206 | diagnostic messages, see L<perldiag>. | |
207 | ||
208 | =head2 New Diagnostics | |
209 | ||
210 | =head3 New Errors | |
211 | ||
212 | =over 4 | |
213 | ||
214 | =item * | |
215 | ||
216 | L<Wide character in $0|perldiag/"Wide character in %s"> | |
217 | ||
218 | Attempts to put wide characters into the program name (C<$0>) now | |
219 | provoke this warning. | |
220 | ||
221 | =back | |
222 | ||
223 | =head2 Changes to Existing Diagnostics | |
224 | ||
225 | =over 4 | |
226 | ||
227 | =item * New 'scalar' category for "Useless use of sort in scalar context" | |
228 | ||
229 | When C<sort> is used in scalar context, it provokes a warning that this is not | |
230 | useful. This warning used to be in the C<void> category. A new category for | |
231 | warnings about scalar context has now been added, called C<scalar>. | |
232 | ||
233 | =back | |
234 | ||
235 | =head1 Internal Changes | |
236 | ||
237 | =over 4 | |
238 | ||
239 | =item * | |
240 | ||
241 | C<sv_dump> (and L<Devel::Peek>’s C<Dump> function) now escapes high-bit | |
242 | octets in the PV as hex rather than octal. Since most folks understand hex | |
243 | more readily than octal, this should make these dumps a bit more legible. | |
244 | This does B<not> affect any other diagnostic interfaces like C<pv_display>. | |
245 | ||
246 | =back | |
247 | ||
248 | =head1 Acknowledgements | |
249 | ||
250 | Perl 5.35.10 represents approximately 4 weeks of development since Perl | |
251 | 5.35.9 and contains approximately 15,000 lines of changes across 300 files | |
252 | from 26 authors. | |
253 | ||
254 | Excluding auto-generated files, documentation and release tools, there were | |
255 | approximately 6,900 lines of changes to 190 .pm, .t, .c and .h files. | |
256 | ||
257 | Perl continues to flourish into its fourth decade thanks to a vibrant | |
258 | community of users and developers. The following people are known to have | |
259 | contributed the improvements that became Perl 5.35.10: | |
260 | ||
261 | Bernd, Brad Barden, Chad Granum, cuishuang, Curtis Poe, Dagfinn Ilmari | |
262 | Mannsåker, Daniel Laügt, Felipe Gasper, Graham Knop, Hugo van der Sanden, | |
263 | James E Keenan, Karl Williamson, Leon Timmermans, Matthew Horsfall, Michiel | |
264 | Beijen, Nicholas Clark, Nicolas R, Paul Evans, Renee Baecker, Ricardo | |
265 | Signes, Richard Leach, Sawyer X, Sisyphus, Steve Hay, TAKAI Kousuke, Yves | |
266 | Orton. | |
267 | ||
268 | The list above is almost certainly incomplete as it is automatically | |
269 | generated from version control history. In particular, it does not include | |
270 | the names of the (very much appreciated) contributors who reported issues to | |
271 | the Perl bug tracker. | |
272 | ||
273 | Many of the changes included in this version originated in the CPAN modules | |
274 | included in Perl's core. We're grateful to the entire CPAN community for | |
275 | helping Perl to flourish. | |
276 | ||
277 | For a more complete list of all of Perl's historical contributors, please | |
278 | see the F<AUTHORS> file in the Perl source distribution. | |
279 | ||
280 | =head1 Reporting Bugs | |
281 | ||
282 | If you find what you think is a bug, you might check the perl bug database | |
283 | at L<https://github.com/Perl/perl5/issues>. There may also be information at | |
284 | L<http://www.perl.org/>, the Perl Home Page. | |
285 | ||
286 | If you believe you have an unreported bug, please open an issue at | |
287 | L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a | |
288 | tiny but sufficient test case. | |
289 | ||
290 | If the bug you are reporting has security implications which make it | |
291 | inappropriate to send to a public issue tracker, then see | |
292 | L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> | |
293 | for details of how to report the issue. | |
294 | ||
295 | =head1 Give Thanks | |
296 | ||
297 | If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, | |
298 | you can do so by running the C<perlthanks> program: | |
299 | ||
300 | perlthanks | |
301 | ||
302 | This will send an email to the Perl 5 Porters list with your show of thanks. | |
303 | ||
304 | =head1 SEE ALSO | |
305 | ||
306 | The F<Changes> file for an explanation of how to view exhaustive details on | |
307 | what changed. | |
308 | ||
309 | The F<INSTALL> file for how to build Perl. | |
310 | ||
311 | The F<README> file for general stuff. | |
312 | ||
313 | The F<Artistic> and F<Copying> files for copyright information. | |
314 | ||
315 | =cut |