Commit | Line | Data |
f83c51e5 |
1 | =encoding utf8 |
2 | |
3 | =head1 NAME |
4 | |
5 | perldelta - what is new for perl v5.13.2 |
6 | |
7 | =head1 DESCRIPTION |
8 | |
9 | This document describes differences between the 5.13.2 release and |
10 | the 5.13.1 release. |
11 | |
12 | If you are upgrading from an earlier release such as 5.10, first read |
13 | L<perl5120delta>, which describes differences between 5.10 and |
14 | 5.12. |
15 | |
16 | =head1 Notice |
17 | |
18 | XXX Any important notices here |
19 | |
20 | =head1 Incompatible Changes |
21 | |
5f3e44b6 |
22 | =head2 localised tied scalars are tied again. |
f83c51e5 |
23 | |
5f3e44b6 |
24 | The change in behaviour in 5.13.1 of localising tied scalar values has |
25 | been reverted to the existing 5.12.0 and earlier behaviour (the change for |
26 | arrays and hashes remains). |
f83c51e5 |
27 | |
28 | =head1 Core Enhancements |
29 | |
30 | XXX New core language features go here. Summarise user-visible core language |
31 | enhancements. Particularly prominent performance optimisations could go |
32 | here, but most should go in the L</Performance Enhancements> section. |
33 | |
c4a65341 |
34 | =head2 Non-destructive substitution |
35 | |
36 | The substitution operator now supports a C</r> option that |
37 | copies the input variable, carries out the substitution on |
38 | the copy and returns the result. The original remains unmodified. |
39 | |
40 | my $old = 'cat'; |
41 | my $new = $old =~ s/cat/dog/r; |
42 | # $old is 'cat' and $new is 'dog' |
43 | |
224aa572 |
44 | This is particularly useful with C<map>. See L<perlop> for more examples |
45 | (4f4d75, 000c65). |
c4a65341 |
46 | |
f5d8aca1 |
47 | =head2 package block syntax |
48 | |
49 | A package declaration can now contain a code block, in which case the |
50 | declaration is in scope only inside that block. So C<package Foo { ... }> |
51 | is precisely equivalent to C<{ package Foo; ... }>. It also works with |
52 | a version number in the declaration, as in C<package Foo 1.2 { ... }>. |
4baddafe |
53 | See L<perlfunc> (434da3..36f77d, 702646). |
f5d8aca1 |
54 | |
f83c51e5 |
55 | =head1 New Platforms |
56 | |
57 | XXX List any platforms that this version of perl compiles on, that previous |
58 | versions did not. These will either be enabled by new files in the F<hints/> |
59 | directories, or new subdirectories and F<README> files at the top level of the |
60 | source tree. |
61 | |
62 | =head1 Modules and Pragmata |
63 | |
64 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
65 | go here. If Module::CoreList is updated, generate an initial draft of the |
66 | following sections using F<Porting/corelist-perldelta.pl>, which prints stub |
67 | entries to STDOUT. Results can be pasted in place of the '=head2' entries |
68 | below. A paragraph summary for important changes should then be added by hand. |
69 | In an ideal world, dual-life modules would have a F<Changes> file that could be |
70 | cribbed. |
71 | |
72 | =head2 New Modules and Pragmata |
73 | |
74 | =head2 Pragmata Changes |
75 | |
76 | =head2 Updated Modules |
77 | |
78 | =head2 Removed Modules and Pragmata |
79 | |
80 | =head1 Utility Changes |
81 | |
82 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go |
83 | here. Most of these are built within the directories F<utils> and F<x2p>. |
84 | |
85 | =over 4 |
86 | |
87 | =item F<XXX> |
88 | |
89 | XXX |
90 | |
91 | =back |
92 | |
93 | =head1 New Documentation |
94 | |
95 | XXX Changes which create B<new> files in F<pod/> go here. |
96 | |
97 | =over 4 |
98 | |
99 | =item L<XXX> |
100 | |
101 | XXX |
102 | |
103 | =back |
104 | |
105 | =head1 Changes to Existing Documentation |
106 | |
107 | XXX Changes which significantly change existing files in F<pod/> go here. |
108 | Any changes to F<pod/perldiag.pod> should go in L</New or Changed Diagnostics>. |
109 | |
8e026cac |
110 | =head2 Replace wrong tr/// table in perlebcdic.pod |
111 | |
112 | perlebcdic.pod contains a helpful table to use in tr/// to convert |
113 | between EBCDIC and Latin1/ASCII. Unfortunately, the table was the |
114 | inverse of the one it describes, though the code that used the table |
115 | worked correctly for the specific example given. |
116 | |
117 | The table has been changed to its inverse, and the sample code changed |
118 | to correspond, as this is easier for the person trying to follow the |
119 | instructions since deriving the old table is somewhat more complicated. |
120 | |
121 | The table has also been changed to hex from octal, as that is more the norm |
122 | these days, and the recipes in the pod altered to print out leading |
123 | zeros to make all the values the same length, as the table that they can |
09954a6c |
124 | generate has them (5f26d5). |
f83c51e5 |
125 | |
14ae36e9 |
126 | =head2 Document tricks for user-defined casing |
127 | |
128 | perlunicode.pod now contains an explanation of how to override, mangle |
129 | and otherwise tweak the way perl handles upper, lower and other case |
130 | conversions on unicode data, and how to provide scoped changes to alter |
131 | one's own code's behaviour without stomping on anybody else (71648f). |
132 | |
1ed4d812 |
133 | =head2 INSTALL explicitly states the requirement for C89 |
134 | |
f68a1e6d |
135 | This was already true but it's now Officially Stated For The Record (51eec7). |
136 | |
137 | =head2 No longer advertise Math::TrulyRandom |
138 | |
139 | This module hasn't been updated since 1996 so we can't recommend it any more |
140 | (83918a). |
1ed4d812 |
141 | |
f83c51e5 |
142 | =head1 Performance Enhancements |
143 | |
77d7e37b |
144 | Only allocate entries for @_ on demand - this not only saves memory per |
145 | subroutine defined but should hopefully improve COW behaviour (77bac2). |
146 | |
bd0a6a63 |
147 | Multiple small improvements to threads: |
148 | |
c60a130f |
149 | =over 4 |
150 | |
151 | =item * |
152 | |
bd0a6a63 |
153 | Change the internal structured of thread->params from an SV (RV) to an AV |
154 | - so we now pass around and store the array directly, rather than creating, |
155 | holding and dereferencing a reference to it (78b7eff). |
156 | |
c60a130f |
157 | =item * |
158 | |
bd0a6a63 |
159 | Change S_ithread_create() params from a single AV* to a pair of SV** pointers. |
160 | This saves creating, duplicating and freeing and AV, which is only ever used for |
161 | an internal calling convention (4cf5ea). |
162 | |
c60a130f |
163 | =item * |
f83c51e5 |
164 | |
c60a130f |
165 | Remove redundant hv_exists() calls from ithread_create()'s spec parser (b1faab). |
f83c51e5 |
166 | |
167 | =item * |
168 | |
c60a130f |
169 | Skip unnecessary newAV() in ithread_create() (39f3f7). |
f83c51e5 |
170 | |
5246c8d8 |
171 | =item * |
172 | |
173 | Avoid duping pads created for recursion since there's no point pre-allocating |
174 | the same memory in the new thread (6de654). |
175 | |
f83c51e5 |
176 | =back |
177 | |
20566cce |
178 | Eliminated xhv_fill from struct xpvhv: This saves 1 IV per hash and on some |
179 | systems will cause struct xpvhv to become cache aligned. To avoid this |
180 | memory saving causing a slowdown elsewhere, boolean use of HvFILL now |
181 | calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when |
182 | actually required is now calculated on demand, the cases when this needs to |
183 | be done should be few and far between (f4431c .. fcd245). |
184 | |
e454e0e8 |
185 | The ibcmp_utf8 API function for case-insensitive comparison of strings (which |
186 | is used heavily by the regexp engine) was substantially refactored and |
187 | optimised - and its documentation much improved as a free bonus gift (8b3587). |
188 | |
f83c51e5 |
189 | =head1 Installation and Configuration Improvements |
190 | |
191 | XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools |
192 | go here. |
193 | |
194 | =head2 Configuration improvements |
195 | |
196 | XXX |
197 | |
198 | =head2 Compilation improvements |
199 | |
738540bd |
200 | Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under |
201 | $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME). |
202 | |
203 | This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and |
204 | 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now |
205 | set correctly (23ae7f). |
f83c51e5 |
206 | |
207 | =head2 Platform Specific Changes |
208 | |
209 | =over 4 |
210 | |
211 | =item XXX-some-platform |
212 | |
213 | XXX |
214 | |
215 | =back |
216 | |
217 | =head1 Selected Bug Fixes |
218 | |
b9272e1a |
219 | Timely cleanup of SVs that are cloned into a new thread but then discovered |
220 | to be orphaned (i.e. their owners are -not- cloned) (e42956) |
221 | |
ee6b5366 |
222 | Don't accidentally clone lexicals in scope within active stack frames in |
223 | the parent when creating a child thread (RT #73086) (05d04d). |
224 | |
76125158 |
225 | Avoid loading feature.pm when 'no 5.13.2;' or similar is encountered (faee19). |
226 | |
5266dd11 |
227 | Trap invalid use of SvIVX on SVt_REGEXP when assertions are on (e77da3) |
228 | |
4ad89ae2 |
229 | Don't stamp on $DB::single, $DB::trace and $DB::signal if they already have |
230 | values when $^P is assigned to (RT #72422) (4c0f30). |
231 | |
34735175 |
232 | chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92) |
233 | |
6cabea21 |
234 | Defer signal handling when shared SV locks are held to avoid deadlocks |
235 | (RT #74868) (65c742). |
236 | |
f83c51e5 |
237 | =over 4 |
238 | |
239 | =item * |
240 | |
ebe8e111 |
241 | Overloading now works properly in conjunction with tied variables. What |
242 | formerly happened was that most ops checked their arguments for overloading |
243 | I<before> checking for magic, so for example an overloaded object returned |
244 | by a tied array access would usually be treated as not overloaded |
f4541293 |
245 | (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f). |
f83c51e5 |
246 | |
247 | =back |
248 | |
968e95e0 |
249 | Independently, a bug was fixed that prevented $tied->() from always calling |
250 | FETCH correctly (RT #8438) (7c7501) |
251 | |
f83c51e5 |
252 | =head1 New or Changed Diagnostics |
253 | |
254 | XXX New or changed warnings emitted by the core's C<C> code go here. |
255 | |
256 | =over 4 |
257 | |
258 | =item C<XXX> |
259 | |
260 | XXX |
261 | |
262 | =back |
263 | |
264 | =head1 Changed Internals |
265 | |
266 | XXX Changes which affect the interface available to C<XS> code go here. |
267 | |
268 | =over 4 |
269 | |
270 | =item * |
271 | |
f4b91f50 |
272 | The C<find_rundefsvoffset> function has been deprecated. It appeared that |
03d5bcf8 |
273 | its design was insufficient to reliably get the lexical C<$_> at run-time. |
274 | |
275 | Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead. |
276 | They directly return the right SV representing C<$_>, whether it's lexical |
75b14b67 |
277 | or dynamic (789bd8 .. 03d5bc). |
03d5bcf8 |
278 | |
279 | =item * |
280 | |
ebe8e111 |
281 | The following new functions or macros have been added to the public API: |
789bd863 |
282 | C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>. |
f83c51e5 |
283 | |
483ce06a |
284 | =item * |
285 | |
286 | The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a |
287 | noop but should still be used to ensure past and future compatibility. |
288 | |
f83c51e5 |
289 | =back |
290 | |
291 | =head1 New Tests |
292 | |
293 | XXX Changes which create B<new> files in F<t/> go here. Changes to |
294 | existing files in F<t/> aren't worth summarising, although the bugs that |
295 | they represent may be. |
296 | |
297 | =over 4 |
298 | |
299 | =item F<XXX> |
300 | |
301 | XXX |
302 | |
303 | =back |
304 | |
305 | =head1 Known Problems |
306 | |
307 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any |
308 | tests that had to be C<TODO>ed for the release would be noted here, unless |
309 | they were specific to a particular platform (see below). |
310 | |
311 | This is a list of some significant unfixed bugs, which are regressions |
312 | from either 5.XXX.XXX or 5.XXX.XXX. |
313 | |
314 | =over 4 |
315 | |
316 | =item * |
317 | |
318 | XXX |
319 | |
320 | =back |
321 | |
322 | =head1 Deprecations |
323 | |
324 | XXX Add any new known deprecations here. |
325 | |
326 | The following items are now deprecated. |
327 | |
328 | =over 4 |
329 | |
330 | =item * |
331 | |
7c8a36d1 |
332 | Omitting a space between a regex pattern or pattern modifiers and the following |
333 | word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed |
334 | as C<< m/foo/s and $bar >> but will issue a warning. |
f83c51e5 |
335 | |
336 | =back |
337 | |
338 | =head1 Platform Specific Notes |
339 | |
340 | XXX Any changes specific to a particular platform. VMS and Win32 are the usual |
341 | stars here. It's probably best to group changes under the same section layout |
342 | as the main perldelta |
343 | |
344 | =head1 Obituary |
345 | |
346 | XXX If any significant core contributor has died, we've added a short obituary |
347 | here. |
348 | |
349 | =head1 Acknowledgements |
350 | |
351 | XXX The list of people to thank goes here. |
352 | |
d7fb9c4b |
353 | Your humble release manager would like to specifically call out |
354 | Karl Williamson for making the tests a better place to be, and Shlomi |
355 | Fish for a passel of tiny incremental docfixes of the sort that don't get |
356 | made often enough. |
f83c51e5 |
357 | |
358 | =head1 Reporting Bugs |
359 | |
360 | If you find what you think is a bug, you might check the articles |
361 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
362 | bug database at http://rt.perl.org/perlbug/ . There may also be |
363 | information at http://www.perl.org/ , the Perl Home Page. |
364 | |
365 | If you believe you have an unreported bug, please run the B<perlbug> |
366 | program included with your release. Be sure to trim your bug down |
367 | to a tiny but sufficient test case. Your bug report, along with the |
368 | output of C<perl -V>, will be sent off to perlbug@perl.org to be |
369 | analysed by the Perl porting team. |
370 | |
371 | If the bug you are reporting has security implications, which make it |
372 | inappropriate to send to a publicly archived mailing list, then please send |
373 | it to perl5-security-report@perl.org. This points to a closed subscription |
374 | unarchived mailing list, which includes all the core committers, who be able |
375 | to help assess the impact of issues, figure out a resolution, and help |
376 | co-ordinate the release of patches to mitigate or fix the problem across all |
377 | platforms on which Perl is supported. Please only use this address for |
378 | security issues in the Perl core, not for modules independently |
379 | distributed on CPAN. |
380 | |
381 | =head1 SEE ALSO |
382 | |
383 | The F<Changes> file for an explanation of how to view exhaustive details |
384 | on what changed. |
385 | |
386 | The F<INSTALL> file for how to build Perl. |
387 | |
388 | The F<README> file for general stuff. |
389 | |
390 | The F<Artistic> and F<Copying> files for copyright information. |
391 | |
392 | =cut |