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