LOGONLY mark 5f26d5 DOCed
[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
f83c51e5 55=head1 New Platforms
56
57XXX List any platforms that this version of perl compiles on, that previous
58versions did not. These will either be enabled by new files in the F<hints/>
59directories, or new subdirectories and F<README> files at the top level of the
60source tree.
61
62=head1 Modules and Pragmata
63
64XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
65go here. If Module::CoreList is updated, generate an initial draft of the
66following sections using F<Porting/corelist-perldelta.pl>, which prints stub
67entries to STDOUT. Results can be pasted in place of the '=head2' entries
68below. A paragraph summary for important changes should then be added by hand.
69In an ideal world, dual-life modules would have a F<Changes> file that could be
70cribbed.
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
82XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
83here. Most of these are built within the directories F<utils> and F<x2p>.
84
85=over 4
86
87=item F<XXX>
88
89XXX
90
91=back
92
93=head1 New Documentation
94
95XXX Changes which create B<new> files in F<pod/> go here.
96
97=over 4
98
99=item L<XXX>
100
101XXX
102
103=back
104
105=head1 Changes to Existing Documentation
106
107XXX Changes which significantly change existing files in F<pod/> go here.
108Any 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
112perlebcdic.pod contains a helpful table to use in tr/// to convert
113between EBCDIC and Latin1/ASCII. Unfortunately, the table was the
114inverse of the one it describes, though the code that used the table
115worked correctly for the specific example given.
116
117The table has been changed to its inverse, and the sample code changed
118to correspond, as this is easier for the person trying to follow the
119instructions since deriving the old table is somewhat more complicated.
120
121The table has also been changed to hex from octal, as that is more the norm
122these days, and the recipes in the pod altered to print out leading
123zeros to make all the values the same length, as the table that they can
124generate has them.
f83c51e5 125
126=head1 Performance Enhancements
127
bd0a6a63 128Multiple small improvements to threads:
129
c60a130f 130=over 4
131
132=item *
133
bd0a6a63 134Change the internal structured of thread->params from an SV (RV) to an AV
135- so we now pass around and store the array directly, rather than creating,
136holding and dereferencing a reference to it (78b7eff).
137
c60a130f 138=item *
139
bd0a6a63 140Change S_ithread_create() params from a single AV* to a pair of SV** pointers.
141This saves creating, duplicating and freeing and AV, which is only ever used for
142an internal calling convention (4cf5ea).
143
c60a130f 144=item *
f83c51e5 145
c60a130f 146Remove redundant hv_exists() calls from ithread_create()'s spec parser (b1faab).
f83c51e5 147
148=item *
149
c60a130f 150Skip unnecessary newAV() in ithread_create() (39f3f7).
f83c51e5 151
5246c8d8 152=item *
153
154Avoid duping pads created for recursion since there's no point pre-allocating
155the same memory in the new thread (6de654).
156
f83c51e5 157=back
158
20566cce 159Eliminated xhv_fill from struct xpvhv: This saves 1 IV per hash and on some
160systems will cause struct xpvhv to become cache aligned. To avoid this
161memory saving causing a slowdown elsewhere, boolean use of HvFILL now
162calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when
163actually required is now calculated on demand, the cases when this needs to
164be done should be few and far between (f4431c .. fcd245).
165
f83c51e5 166=head1 Installation and Configuration Improvements
167
168XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
169go here.
170
171=head2 Configuration improvements
172
173XXX
174
175=head2 Compilation improvements
176
738540bd 177Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under
178$(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME).
179
180This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and
181'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now
182set correctly (23ae7f).
f83c51e5 183
184=head2 Platform Specific Changes
185
186=over 4
187
188=item XXX-some-platform
189
190XXX
191
192=back
193
194=head1 Selected Bug Fixes
195
b9272e1a 196Timely cleanup of SVs that are cloned into a new thread but then discovered
197to be orphaned (i.e. their owners are -not- cloned) (e42956)
198
ee6b5366 199Don't accidentally clone lexicals in scope within active stack frames in
200the parent when creating a child thread (RT #73086) (05d04d).
201
76125158 202Avoid loading feature.pm when 'no 5.13.2;' or similar is encountered (faee19).
203
5266dd11 204Trap invalid use of SvIVX on SVt_REGEXP when assertions are on (e77da3)
205
f83c51e5 206=over 4
207
208=item *
209
ebe8e111 210Overloading now works properly in conjunction with tied variables. What
211formerly happened was that most ops checked their arguments for overloading
212I<before> checking for magic, so for example an overloaded object returned
213by a tied array access would usually be treated as not overloaded
166aa1ed 214(RT #57012) (6f1401, ed3b9b).
f83c51e5 215
216=back
217
218=head1 New or Changed Diagnostics
219
220XXX New or changed warnings emitted by the core's C<C> code go here.
221
222=over 4
223
224=item C<XXX>
225
226XXX
227
228=back
229
230=head1 Changed Internals
231
232XXX Changes which affect the interface available to C<XS> code go here.
233
234=over 4
235
236=item *
237
f4b91f50 238The C<find_rundefsvoffset> function has been deprecated. It appeared that
03d5bcf8 239its design was insufficient to reliably get the lexical C<$_> at run-time.
240
241Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead.
242They directly return the right SV representing C<$_>, whether it's lexical
243or dynamic.
244
245=item *
246
ebe8e111 247The following new functions or macros have been added to the public API:
789bd863 248C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>.
f83c51e5 249
483ce06a 250=item *
251
252The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a
253noop but should still be used to ensure past and future compatibility.
254
f83c51e5 255=back
256
257=head1 New Tests
258
259XXX Changes which create B<new> files in F<t/> go here. Changes to
260existing files in F<t/> aren't worth summarising, although the bugs that
261they represent may be.
262
263=over 4
264
265=item F<XXX>
266
267XXX
268
269=back
270
271=head1 Known Problems
272
273XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
274tests that had to be C<TODO>ed for the release would be noted here, unless
275they were specific to a particular platform (see below).
276
277This is a list of some significant unfixed bugs, which are regressions
278from either 5.XXX.XXX or 5.XXX.XXX.
279
280=over 4
281
282=item *
283
284XXX
285
286=back
287
288=head1 Deprecations
289
290XXX Add any new known deprecations here.
291
292The following items are now deprecated.
293
294=over 4
295
296=item *
297
7c8a36d1 298Omitting a space between a regex pattern or pattern modifiers and the following
299word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed
300as C<< m/foo/s and $bar >> but will issue a warning.
f83c51e5 301
302=back
303
304=head1 Platform Specific Notes
305
306XXX Any changes specific to a particular platform. VMS and Win32 are the usual
307stars here. It's probably best to group changes under the same section layout
308as the main perldelta
309
310=head1 Obituary
311
312XXX If any significant core contributor has died, we've added a short obituary
313here.
314
315=head1 Acknowledgements
316
317XXX The list of people to thank goes here.
318
319
320=head1 Reporting Bugs
321
322If you find what you think is a bug, you might check the articles
323recently posted to the comp.lang.perl.misc newsgroup and the perl
324bug database at http://rt.perl.org/perlbug/ . There may also be
325information at http://www.perl.org/ , the Perl Home Page.
326
327If you believe you have an unreported bug, please run the B<perlbug>
328program included with your release. Be sure to trim your bug down
329to a tiny but sufficient test case. Your bug report, along with the
330output of C<perl -V>, will be sent off to perlbug@perl.org to be
331analysed by the Perl porting team.
332
333If the bug you are reporting has security implications, which make it
334inappropriate to send to a publicly archived mailing list, then please send
335it to perl5-security-report@perl.org. This points to a closed subscription
336unarchived mailing list, which includes all the core committers, who be able
337to help assess the impact of issues, figure out a resolution, and help
338co-ordinate the release of patches to mitigate or fix the problem across all
339platforms on which Perl is supported. Please only use this address for
340security issues in the Perl core, not for modules independently
341distributed on CPAN.
342
343=head1 SEE ALSO
344
345The F<Changes> file for an explanation of how to view exhaustive details
346on what changed.
347
348The F<INSTALL> file for how to build Perl.
349
350The F<README> file for general stuff.
351
352The F<Artistic> and F<Copying> files for copyright information.
353
354=cut