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 | |
811a7589 |
28 | =head2 Naming fixes in Policy_sh.SH may invalidate Policy.sh |
29 | |
30 | Several long-standing typos and naming confusions in Policy_sh.SH have |
31 | been fixed, standardizing on the variable names used in config.sh. |
32 | |
33 | This will change the behavior of Policy.sh if you happen to have been |
34 | accidentally relying on the Policy.sh incorrect behavior. We'd appreciate |
35 | feedback from anyone using Policy.sh to be sure nothing is broken by |
36 | this change (c1bd23). |
37 | |
f83c51e5 |
38 | =head1 Core Enhancements |
39 | |
40 | XXX New core language features go here. Summarise user-visible core language |
41 | enhancements. Particularly prominent performance optimisations could go |
42 | here, but most should go in the L</Performance Enhancements> section. |
43 | |
c4a65341 |
44 | =head2 Non-destructive substitution |
45 | |
46 | The substitution operator now supports a C</r> option that |
47 | copies the input variable, carries out the substitution on |
48 | the copy and returns the result. The original remains unmodified. |
49 | |
50 | my $old = 'cat'; |
51 | my $new = $old =~ s/cat/dog/r; |
52 | # $old is 'cat' and $new is 'dog' |
53 | |
224aa572 |
54 | This is particularly useful with C<map>. See L<perlop> for more examples |
55 | (4f4d75, 000c65). |
c4a65341 |
56 | |
f5d8aca1 |
57 | =head2 package block syntax |
58 | |
59 | A package declaration can now contain a code block, in which case the |
60 | declaration is in scope only inside that block. So C<package Foo { ... }> |
61 | is precisely equivalent to C<{ package Foo; ... }>. It also works with |
62 | a version number in the declaration, as in C<package Foo 1.2 { ... }>. |
4baddafe |
63 | See L<perlfunc> (434da3..36f77d, 702646). |
f5d8aca1 |
64 | |
01f12797 |
65 | =head2 perl -h no longer recommends -w |
66 | |
67 | perl -h used to mark the -w option as recommended; since this option is |
68 | far less useful than it used to be due to lexical 'use warnings' and since |
69 | perl -h is primary a list and brief explanation of the command line switches, |
70 | the recommendation has now been removed (60eaec). |
71 | |
f83c51e5 |
72 | =head1 New Platforms |
73 | |
74 | XXX List any platforms that this version of perl compiles on, that previous |
75 | versions did not. These will either be enabled by new files in the F<hints/> |
76 | directories, or new subdirectories and F<README> files at the top level of the |
77 | source tree. |
78 | |
79 | =head1 Modules and Pragmata |
80 | |
81 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> |
82 | go here. If Module::CoreList is updated, generate an initial draft of the |
83 | following sections using F<Porting/corelist-perldelta.pl>, which prints stub |
84 | entries to STDOUT. Results can be pasted in place of the '=head2' entries |
85 | below. A paragraph summary for important changes should then be added by hand. |
86 | In an ideal world, dual-life modules would have a F<Changes> file that could be |
87 | cribbed. |
88 | |
89 | =head2 New Modules and Pragmata |
90 | |
91 | =head2 Pragmata Changes |
92 | |
93 | =head2 Updated Modules |
94 | |
c7e77c70 |
95 | =head2 Locale-Codes 3.13 |
96 | |
14b2fa3d |
97 | Locale::Country, Locale::Language and Locale::Currency were updated from |
98 | 3.12 to 3.13 of the Locale-Codes distribution to include locale code changes |
99 | (e1137b). |
100 | |
c7e77c70 |
101 | =head2 Thread-Semaphore 2.11 |
102 | |
103 | Added new methods ->down_nb() and ->down_force() at the suggestion of Rick |
104 | Garlick. |
105 | |
106 | Refactored methods to skip argument validation when no argument is supplied. |
107 | |
108 | (04febe, f06daa) |
109 | |
64525257 |
110 | =head2 CPAN.pm 1.94_57 |
111 | |
112 | * release 1.94_57 |
113 | |
114 | * bugfix: treat modules correctly that are deprecated in perl 5.12. |
115 | |
116 | * bugfix: RT #57482 and #57788 revealed that configure_requires |
117 | implicitly assumed build_requires instead of normal requires. (Reported |
118 | by Andrew Whatson and Father Chrysostomos respectively) |
119 | |
120 | * testfix: solaris should run the tests without expect because (some?) |
121 | solaris have a broken expect |
122 | |
123 | * testfix: run tests with cache_metadata off to prevent spill over |
124 | effects from previous test runs |
125 | |
126 | (742adb) |
127 | |
f83c51e5 |
128 | =head2 Removed Modules and Pragmata |
129 | |
130 | =head1 Utility Changes |
131 | |
132 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go |
133 | here. Most of these are built within the directories F<utils> and F<x2p>. |
134 | |
135 | =over 4 |
136 | |
137 | =item F<XXX> |
138 | |
139 | XXX |
140 | |
141 | =back |
142 | |
143 | =head1 New Documentation |
144 | |
145 | XXX Changes which create B<new> files in F<pod/> go here. |
146 | |
147 | =over 4 |
148 | |
149 | =item L<XXX> |
150 | |
151 | XXX |
152 | |
153 | =back |
154 | |
155 | =head1 Changes to Existing Documentation |
156 | |
157 | XXX Changes which significantly change existing files in F<pod/> go here. |
158 | Any changes to F<pod/perldiag.pod> should go in L</New or Changed Diagnostics>. |
159 | |
8e026cac |
160 | =head2 Replace wrong tr/// table in perlebcdic.pod |
161 | |
162 | perlebcdic.pod contains a helpful table to use in tr/// to convert |
163 | between EBCDIC and Latin1/ASCII. Unfortunately, the table was the |
164 | inverse of the one it describes, though the code that used the table |
165 | worked correctly for the specific example given. |
166 | |
167 | The table has been changed to its inverse, and the sample code changed |
168 | to correspond, as this is easier for the person trying to follow the |
169 | instructions since deriving the old table is somewhat more complicated. |
170 | |
171 | The table has also been changed to hex from octal, as that is more the norm |
172 | these days, and the recipes in the pod altered to print out leading |
173 | zeros to make all the values the same length, as the table that they can |
09954a6c |
174 | generate has them (5f26d5). |
f83c51e5 |
175 | |
14ae36e9 |
176 | =head2 Document tricks for user-defined casing |
177 | |
178 | perlunicode.pod now contains an explanation of how to override, mangle |
179 | and otherwise tweak the way perl handles upper, lower and other case |
180 | conversions on unicode data, and how to provide scoped changes to alter |
181 | one's own code's behaviour without stomping on anybody else (71648f). |
182 | |
cd0d4ee5 |
183 | =head2 Document $# and $* as removed and clarify $#array usage |
184 | |
185 | $# and $* were both disabled as of perl5 version 10; this release adds |
186 | documentation to that effect, a description of the results of continuing |
187 | to try and use them, and a note explaining that $# can also function as a |
c7e77c70 |
188 | sigil in the $#array form (7f315d2). |
cd0d4ee5 |
189 | |
1ed4d812 |
190 | =head2 INSTALL explicitly states the requirement for C89 |
191 | |
f68a1e6d |
192 | This was already true but it's now Officially Stated For The Record (51eec7). |
193 | |
194 | =head2 No longer advertise Math::TrulyRandom |
195 | |
196 | This module hasn't been updated since 1996 so we can't recommend it any more |
197 | (83918a). |
1ed4d812 |
198 | |
f83c51e5 |
199 | =head1 Performance Enhancements |
200 | |
77d7e37b |
201 | Only allocate entries for @_ on demand - this not only saves memory per |
202 | subroutine defined but should hopefully improve COW behaviour (77bac2). |
203 | |
2d157b07 |
204 | =head2 Multiple small improvements to threads |
bd0a6a63 |
205 | |
2d157b07 |
206 | The internal structures of threading now make fewer API calls and fewer |
207 | allocations, resulting in noticeably smaller object code. Additionally, |
208 | many thread context checks have been deferred so that they're only done |
209 | when required (although this is only possible for non-debugging builds). |
f83c51e5 |
210 | |
2d157b07 |
211 | =head2 Eliminated xhv_fill from struct xpvhv |
f83c51e5 |
212 | |
2d157b07 |
213 | This saves 1 IV per hash and on some systems will cause struct xpvhv to |
214 | become cache aligned. To avoid this memory saving causing a slowdown |
215 | elsewhere, boolean use of HvFILL now calls HvTOTALKEYS instead (which |
216 | is equivalent) - so while the fill data when actually required is now |
217 | calculated on demand, the cases when this needs to be done should be |
218 | few and far between (f4431c .. fcd245). |
f83c51e5 |
219 | |
2d157b07 |
220 | =head2 Optimisation of regexp engine string comparison work |
20566cce |
221 | |
8afd3607 |
222 | The foldEQ_utf8 API function for case-insensitive comparison of strings (which |
e454e0e8 |
223 | is used heavily by the regexp engine) was substantially refactored and |
8afd3607 |
224 | optimised - and its documentation much improved as a free bonus gift |
225 | (8b3587, e6226b). |
e454e0e8 |
226 | |
f83c51e5 |
227 | =head1 Installation and Configuration Improvements |
228 | |
229 | XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools |
230 | go here. |
231 | |
232 | =head2 Configuration improvements |
233 | |
234 | XXX |
235 | |
236 | =head2 Compilation improvements |
237 | |
738540bd |
238 | Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under |
239 | $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME). |
240 | |
241 | This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and |
242 | 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now |
243 | set correctly (23ae7f). |
f83c51e5 |
244 | |
245 | =head2 Platform Specific Changes |
246 | |
247 | =over 4 |
248 | |
249 | =item XXX-some-platform |
250 | |
251 | XXX |
252 | |
253 | =back |
254 | |
255 | =head1 Selected Bug Fixes |
256 | |
b9272e1a |
257 | Timely cleanup of SVs that are cloned into a new thread but then discovered |
258 | to be orphaned (i.e. their owners are -not- cloned) (e42956) |
259 | |
ee6b5366 |
260 | Don't accidentally clone lexicals in scope within active stack frames in |
261 | the parent when creating a child thread (RT #73086) (05d04d). |
262 | |
76125158 |
263 | Avoid loading feature.pm when 'no 5.13.2;' or similar is encountered (faee19). |
264 | |
5266dd11 |
265 | Trap invalid use of SvIVX on SVt_REGEXP when assertions are on (e77da3) |
266 | |
4ad89ae2 |
267 | Don't stamp on $DB::single, $DB::trace and $DB::signal if they already have |
268 | values when $^P is assigned to (RT #72422) (4c0f30). |
269 | |
34735175 |
270 | chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92) |
271 | |
6cabea21 |
272 | Defer signal handling when shared SV locks are held to avoid deadlocks |
273 | (RT #74868) (65c742). |
274 | |
2c690f30 |
275 | glob() no longer crashes when %File::Glob:: is empty and CORE::GLOBAL::glob |
276 | isn't present (4984aa). |
277 | |
8dd1f707 |
278 | perlbug now always permits the sender address to be changed before sending |
279 | - if you were having trouble sending bug reports before now, this should |
280 | fix it, we hope (e6eb90). |
281 | |
f83c51e5 |
282 | =over 4 |
283 | |
284 | =item * |
285 | |
ebe8e111 |
286 | Overloading now works properly in conjunction with tied variables. What |
287 | formerly happened was that most ops checked their arguments for overloading |
288 | I<before> checking for magic, so for example an overloaded object returned |
289 | by a tied array access would usually be treated as not overloaded |
f4541293 |
290 | (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f). |
f83c51e5 |
291 | |
292 | =back |
293 | |
968e95e0 |
294 | Independently, a bug was fixed that prevented $tied->() from always calling |
295 | FETCH correctly (RT #8438) (7c7501) |
296 | |
f83c51e5 |
297 | =head1 New or Changed Diagnostics |
298 | |
299 | XXX New or changed warnings emitted by the core's C<C> code go here. |
300 | |
301 | =over 4 |
302 | |
303 | =item C<XXX> |
304 | |
305 | XXX |
306 | |
307 | =back |
308 | |
309 | =head1 Changed Internals |
310 | |
311 | XXX Changes which affect the interface available to C<XS> code go here. |
312 | |
313 | =over 4 |
314 | |
315 | =item * |
316 | |
f4b91f50 |
317 | The C<find_rundefsvoffset> function has been deprecated. It appeared that |
03d5bcf8 |
318 | its design was insufficient to reliably get the lexical C<$_> at run-time. |
319 | |
320 | Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead. |
321 | They directly return the right SV representing C<$_>, whether it's lexical |
75b14b67 |
322 | or dynamic (789bd8 .. 03d5bc). |
03d5bcf8 |
323 | |
324 | =item * |
325 | |
ebe8e111 |
326 | The following new functions or macros have been added to the public API: |
789bd863 |
327 | C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>. |
f83c51e5 |
328 | |
483ce06a |
329 | =item * |
330 | |
331 | The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a |
332 | noop but should still be used to ensure past and future compatibility. |
333 | |
8afd3607 |
334 | =item * |
335 | |
336 | The ibcmp_* functions have been renamed and are now called foldEQ, |
337 | foldEQ_locale and foldEQ_utf8 (e6226b). |
338 | |
339 | =item * |
340 | |
341 | The ibcmp_* functions have been renamed and are now called foldEQ, |
342 | foldEQ_locale and foldEQ_utf8 (e6226b). |
343 | |
f83c51e5 |
344 | =back |
345 | |
346 | =head1 New Tests |
347 | |
348 | XXX Changes which create B<new> files in F<t/> go here. Changes to |
349 | existing files in F<t/> aren't worth summarising, although the bugs that |
350 | they represent may be. |
351 | |
352 | =over 4 |
353 | |
354 | =item F<XXX> |
355 | |
356 | XXX |
357 | |
358 | =back |
359 | |
360 | =head1 Known Problems |
361 | |
362 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any |
363 | tests that had to be C<TODO>ed for the release would be noted here, unless |
364 | they were specific to a particular platform (see below). |
365 | |
366 | This is a list of some significant unfixed bugs, which are regressions |
367 | from either 5.XXX.XXX or 5.XXX.XXX. |
368 | |
369 | =over 4 |
370 | |
371 | =item * |
372 | |
373 | XXX |
374 | |
375 | =back |
376 | |
377 | =head1 Deprecations |
378 | |
379 | XXX Add any new known deprecations here. |
380 | |
381 | The following items are now deprecated. |
382 | |
383 | =over 4 |
384 | |
385 | =item * |
386 | |
7c8a36d1 |
387 | Omitting a space between a regex pattern or pattern modifiers and the following |
388 | word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed |
389 | as C<< m/foo/s and $bar >> but will issue a warning. |
f83c51e5 |
390 | |
391 | =back |
392 | |
393 | =head1 Platform Specific Notes |
394 | |
ca700cb9 |
395 | =head2 Recent OpenBSDs now use perl's malloc |
396 | |
397 | OpenBSD > 3.7 has a new malloc implementation which is mmap based and as such |
398 | can release memory back to the OS; however for perl using this malloc causes |
399 | a substantial slowdown so we now default to using perl's malloc instead |
400 | (RT #75742) (9b58b5). |
f83c51e5 |
401 | |
402 | =head1 Obituary |
403 | |
404 | XXX If any significant core contributor has died, we've added a short obituary |
405 | here. |
406 | |
407 | =head1 Acknowledgements |
408 | |
409 | XXX The list of people to thank goes here. |
410 | |
d7fb9c4b |
411 | Your humble release manager would like to specifically call out |
412 | Karl Williamson for making the tests a better place to be, and Shlomi |
413 | Fish for a passel of tiny incremental docfixes of the sort that don't get |
414 | made often enough. |
f83c51e5 |
415 | |
416 | =head1 Reporting Bugs |
417 | |
418 | If you find what you think is a bug, you might check the articles |
419 | recently posted to the comp.lang.perl.misc newsgroup and the perl |
420 | bug database at http://rt.perl.org/perlbug/ . There may also be |
421 | information at http://www.perl.org/ , the Perl Home Page. |
422 | |
423 | If you believe you have an unreported bug, please run the B<perlbug> |
424 | program included with your release. Be sure to trim your bug down |
425 | to a tiny but sufficient test case. Your bug report, along with the |
426 | output of C<perl -V>, will be sent off to perlbug@perl.org to be |
427 | analysed by the Perl porting team. |
428 | |
429 | If the bug you are reporting has security implications, which make it |
430 | inappropriate to send to a publicly archived mailing list, then please send |
431 | it to perl5-security-report@perl.org. This points to a closed subscription |
432 | unarchived mailing list, which includes all the core committers, who be able |
433 | to help assess the impact of issues, figure out a resolution, and help |
434 | co-ordinate the release of patches to mitigate or fix the problem across all |
435 | platforms on which Perl is supported. Please only use this address for |
436 | security issues in the Perl core, not for modules independently |
437 | distributed on CPAN. |
438 | |
439 | =head1 SEE ALSO |
440 | |
441 | The F<Changes> file for an explanation of how to view exhaustive details |
442 | on what changed. |
443 | |
444 | The F<INSTALL> file for how to build Perl. |
445 | |
446 | The F<README> file for general stuff. |
447 | |
448 | The F<Artistic> and F<Copying> files for copyright information. |
449 | |
450 | =cut |