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