This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bumped B::Deparse version and added perldelta entry for it per a539498
[perl5.git] / pod / perldelta.pod
CommitLineData
4c793fe3
FR
1=encoding utf8
2
07d5f7aa 3=for comment
40eff326 4This has been logged up to 97a3247,
07d5f7aa 5except for:
07d5f7aa 6b2ea9a00b30eb5881b863d7239dd6a3721e73136
07d5f7aa
FC
7e4487e9b537f1be1e95aba1c87790c2a411788a7
868b590d93559da1f7a0d3956202180d507013365
07d5f7aa 9
4c793fe3
FR
10=head1 NAME
11
ee0887a9
SH
12[ this is a template for a new perldelta file. Any text flagged as
13XXX needs to be processed before release. ]
4c793fe3 14
ee0887a9 15perldelta - what is new for perl v5.13.6
4c793fe3 16
ee0887a9 17=head1 DESCRIPTION
0c692eed 18
ee0887a9
SH
19This document describes differences between the 5.13.5 release and
20the 5.13.6 release.
0c692eed 21
ee0887a9
SH
22If you are upgrading from an earlier release such as 5.13.4, first read
23L<perl5135delta>, which describes differences between 5.13.4 and
245.13.5.
0c692eed 25
ee0887a9 26=head1 Notice
0c692eed 27
ee0887a9 28XXX Any important notices here
4c793fe3 29
ee0887a9 30=head1 Core Enhancements
85318b69 31
ee0887a9
SH
32XXX New core language features go here. Summarise user-visible core language
33enhancements. Particularly prominent performance optimisations could go
34here, but most should go in the L</Performance Enhancements> section.
85318b69 35
ee0887a9 36[ List each enhancement as a =head2 entry ]
85318b69 37
fb85c044
KW
38=head2 C<(?^...)> regex construct added to signify default modifiers
39
40A caret (also called a "cirumflex accent") C<"^"> immediately following
41a C<"(?"> in a regular expression now means that the subexpression is to
42not inherit the surrounding modifiers such as C</i>, but to revert to the
43Perl defaults. Any modifiers following the caret override the defaults.
44
020fe755
AB
45The stringification of regular expressions now uses this
46notation. E.g., before, C<qr/hlagh/i> would be stringified as
47C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>.
48
49The main purpose of this is to allow tests that rely on the
50stringification to not have to change when new modifiers are added.
51See L<perlre/Extended Patterns>.
fb85c044 52
9de15fec
KW
53=head2 C<"d">, C<"l">, and C<"u"> regex modifiers added
54
55These modifiers are currently only available within a C<(?...)> construct.
56
57The C<"l"> modifier says to compile the regular expression as if it were
58in the scope of C<use locale>, even if it is not.
59
a12cf05f
KW
60The C<"u"> modifier says to compile the regular expression as if it were
61in the scope of a C<use feature "unicode_strings"> pragma.
9de15fec 62
a12cf05f
KW
63The C<"d"> modifier is used to override any C<use locale> and
64C<use feature "unicode_strings"> pragmas that are in effect at the time
65of compiling the regular expression.
66
67See just below and L<perlre/(?dlupimsx-imsx)>.
68
69=head2 C<use feature "unicode_strings"> now applies to some regex matching
70
71Another chunk of the L<perlunicode/The "Unicode Bug"> is fixed in this
72release. Now, regular expressions compiled within the scope of the
73"unicode_strings" feature will match the same whether or not the target
74string is encoded in utf8, with regard to C<\s>, C<\w>, C<\b>, and their
75complements. Work is underway to add the C<[[:posix:]]> character
76classes and case sensitive matching to the control of this feature, but
77was not complete in time for this dot release.
9de15fec 78
fb121860
KW
79=head2 C<\N{...}> now handles Unicode named character sequences
80
81Unicode has a number of named character sequences, in which particular sequences
82of code points are given names. C<\N{...}> now recognizes these.
83See L<charnames>.
84
85=head2 New function C<charnames::string_vianame()>
86
87This function is a run-time version of C<\N{...}>, returning the string
88of characters whose Unicode name is its parameter. It can handle
89Unicode named character sequences, whereas the pre-existing
90C<charnames::vianame()> cannot, as the latter returns a single code
91point.
92See L<charnames>.
93
eb32ee41
FC
94=head2 Reentrant regular expression engine
95
96It is now safe to use regular expressions within C<(?{...})> and
97C<(??{...})> code blocks inside regular expressions.
98
99These block are still experimental, however, and still have problems with
40eff326 100lexical (C<my>) variables, lexical pragmata and abnormal exiting.
eb32ee41 101
5e26bbbe
Z
102=head2 Custom per-subroutine check hooks
103
104XS code in an extension module can now annotate a subroutine (whether
105implemented in XS or in Perl) so that nominated XS code will be called
106at compile time (specifically as part of op checking) to change the op
107tree of that subroutine. The compile-time check function (supplied by
108the extension module) can implement argument processing that can't be
109expressed as a prototype, generate customised compile-time warnings,
110perform constant folding for a pure function, inline a subroutine
111consisting of sufficiently simple ops, replace the whole call with a
112custom op, and so on. This was previously all possible by hooking the
113C<entersub> op checker, but the new mechanism makes it easy to tie the
114hook to a specific subroutine. See L<perlapi/cv_set_call_checker>.
115
116To help in writing custom check hooks, several subtasks within standard
117C<entersub> op checking have been separated out and exposed in the API.
118
4f65bc30
FC
119=head2 Return value of C<delete $+{...}>
120
121Custom regular expression engines can now determine the return value of
122C<delete> on an entry of C<%+> or C<%->.
123
0eec0a4c
ZA
124=head2 C<keys>, C<values> work on arrays
125
126You can now use the C<keys>, C<values>, C<each> builtin functions on arrays
127(previously you could only use them on hashes). See L<perlfunc> for details.
128This is actually a change introduced in perl 5.12.0, but it was missed from
129that release's perldelta.
130
ee0887a9 131=head1 Security
85318b69 132
ee0887a9
SH
133XXX Any security-related notices go here. In particular, any security
134vulnerabilities closed should be noted here rather than in the
135L</Selected Bug Fixes> section.
85318b69 136
ee0887a9 137[ List each security issue as a =head2 entry ]
4c793fe3
FR
138
139=head1 Incompatible Changes
140
fb85c044
KW
141=head2 Stringification of regexes has changed
142
143Default regular expression modifiers are now notated by using
144C<(?^...)>. Code relying on the old stringification will fail. The
145purpose of this is so that when new modifiers are added, such code will
8477b9ba
KW
146not have to change (after this one time), as the stringification will
147automatically incorporate the new modifiers.
fb85c044
KW
148
149Code that needs to work properly with both old- and new-style regexes
e23837fb 150can avoid the whole issue by using (for Perls since 5.9.5):
8477b9ba
KW
151
152 use re qw(regexp_pattern);
153 my ($pat, $mods) = regexp_pattern($re_ref);
154
155where C<$re_ref> is a reference to a compiled regular expression. Upon
156return, C<$mods> will be a string containing all the non-default
157modifiers used when the regular expression was compiled, and C<$pattern>
158the actual pattern.
159
e23837fb
KW
160If the actual stringification is important, or older Perls need to be
161supported, you can use something like the following:
fb85c044
KW
162
163 # Accept both old and new-style stringification
164 my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
44428a46 165
fb85c044 166And then use C<$modifiers> instead of C<-xism>.
44428a46 167
9de15fec
KW
168=head2 Regular expressions retain their localeness when interpolated
169
170Regular expressions compiled under C<"use locale"> now retain this when
171interpolated into a new regular expression compiled outside a
172C<"use locale">, and vice-versa.
173
174Previously, a regular expression interpolated into another one inherited
175the localeness of the surrounding one, losing whatever state it
176originally had. This is considered a bug fix, but may trip up code that
177has come to rely on the incorrect behavior.
178
6904a83f
FC
179=head2 Directory handles not copied to threads
180
181On systems that do not have a C<fchdir> function, newly-created threads no
182longer inherit directory handles from their parent threads. Such programs
183would probably have crashed anyway
184L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>.
185
94824daa
FC
186=head2 Negation treats strings differently from before
187
188The unary negation operator C<-> now treats strings that look like numbers
189as numbers
190L<[perl #57706]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=57706>.
191
afa74577
FC
192=head2 Negative zero
193
194Negative zero (-0.0), when converted to a string, now becomes "0" on all
195platforms. It used to become "-0" on some, but "0" on others.
196
197If you still need to determine whether a zero is negative, use
198C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN.
199
4c793fe3
FR
200=head1 Deprecations
201
ee0887a9
SH
202XXX Any deprecated features, syntax, modules etc. should be listed here.
203In particular, deprecated modules should be listed here even if they are
204listed as an updated module in the L</Modules and Pragmata> section.
85318b69 205
ee0887a9 206[ List each deprecation as a =head2 entry ]
4c793fe3
FR
207
208=head1 Performance Enhancements
209
ee0887a9
SH
210XXX Changes which enhance performance without changing behaviour go here. There
211may well be none in a stable release.
4c793fe3 212
ee0887a9 213[ List each enhancement as a =item entry ]
4c793fe3 214
ee0887a9 215=over 4
4c793fe3 216
e2babdfb
FR
217=item *
218
40eff326
FC
219The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl
220core. It has now been moved to an XS module, to reduce the overhead for
221programs that do not use C<%+> or C<%->.
e2babdfb 222
4c793fe3
FR
223=back
224
225=head1 Modules and Pragmata
226
ee0887a9
SH
227XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
228go here. If Module::CoreList is updated, generate an initial draft of the
229following sections using F<Porting/corelist-perldelta.pl>, which prints stub
230entries to STDOUT. Results can be pasted in place of the '=head2' entries
231below. A paragraph summary for important changes should then be added by hand.
232In an ideal world, dual-life modules would have a F<Changes> file that could be
233cribbed.
fc1418b7 234
ee0887a9 235[ Within each section, list entries as a =item entry ]
df91fef1 236
ee0887a9 237=head2 New Modules and Pragmata
ccb45ef4 238
ee0887a9 239=over 4
df91fef1 240
ee0887a9 241=item *
df91fef1 242
ee0887a9 243XXX
e2babdfb 244
ee0887a9 245=back
e2babdfb 246
ee0887a9 247=head2 Updated Modules and Pragmata
fc1418b7 248
ee0887a9 249=over 4
fc1418b7 250
ee0887a9 251=item *
e2babdfb 252
a6696b92
CBW
253C<Archive::Extract> has been upgraded from version 0.42 to 0.44
254
255=item *
256
75484d6b
FC
257C<Carp> has been upgraded from version 1.18 to 1.19.
258
259It no longer autovivifies the C<*CORE::GLOBAL::caller> glob, something it
260started doing in 1.18, which was released with perl 5.13.4
261L<[perl #78082]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78082>
262
263=item *
264
daec2498
CBW
265C<Compress::Raw::Bzip2> has been upgraded from version 2.030 to 2.031
266
267Updated to use bzip2 1.0.6
268
269=item *
270
e2941eb0
FC
271C<Data::Dumper> has been upgraded from version 2.128 to 2.129.
272
273C<Dumpxs> no longer crashes with globs returned by C<*$io_ref>
274L<[perl #72332]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72332>.
275
276=item *
277
c059848d 278C<Digest::MD5> has been upgraded from version 2.40 to 2.51.
62d37bf0
FR
279
280It is now safe to use this module in combination with threads.
281
282=item *
283
f5b89942
FC
284C<File::DosGlob> has been upgraded from version 1.02 to 1.03.
285
286It allows patterns containing literal parentheses (they no longer need to
287be escaped). On Windows, it no longer adds an extra F<./> to the file names
288returned when the pattern is a relative glob with a drive specification,
6481ebaf
FC
289like F<c:*.pl>
290L<[perl #71712]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71712>.
f5b89942
FC
291
292=item *
293
4d1599c3
FC
294C<File::Find> has been upgraded from version 1.17 to 1.18.
295
296It improves handling of backslashes on Windows, so that paths such as
6481ebaf
FC
297F<c:\dir\/file> are no longer generated
298L<[perl #71710]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>.
4d1599c3
FC
299
300=item *
301
f1c82292
CBW
302C<if> has been upgraded from version 0.05 to 0.06
303
304=item *
305
25e68b8b
FC
306C<IPC::Open3> has been upgraded from version 1.06 to 1.07.
307
308The internal C<xclose> routine now knows how to handle file descriptors, as
309documented, so duplicating STDIN in a child process using its file
310descriptor now works
311L<[perl #76474]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>.
312
313=item *
314
eb32ee41
FC
315C<Locale::Codes> has been upgraded from version 3.13 to 3.14.
316
317=item *
318
9607a449
FC
319C<Locale::Maketext> has been upgraded from version 1.15 to 1.16.
320
321It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when
322working with tainted values
323(L<CPAN RT #40727|https://rt.cpan.org/Public/Bug/Display.html?id=40727>).
324
edf72ff9
FC
325C<< ->maketext >> calls will now backup and restore C<$@> so that error
326messages are not supressed
327(L<CPAN RT #34182|https://rt.cpan.org/Public/Bug/Display.html?id=34182>).
328
9607a449
FC
329=item *
330
45029d2d
FC
331C<Math::BigInt> has been upgraded from version 1.95 to 1.97.
332
333This prevents C<sqrt($int)> from crashing under C<use bigrat;>
334L<[perl #73534]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73534>.
733e2929
FR
335
336=item *
337
de0e3ce7
FR
338C<NEXT> has been upgraded from version 0.64 to 0.65.
339
340=item *
341
56f08af2
FC
342C<overload> has been upgraded from version 1.10 to 1.11.
343
344C<overload::Method> can now handle subroutines that are themselves blessed
345into overloaded classes
346L<[perl #71998]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71998>.
347
348=item *
349
f8a8dd49 350C<PathTools> has been upgraded from version 3.31_01 to 3.34.
1c2dcb3e
CBW
351
352=item *
353
463da0ac
CBW
354C<podlators> has been upgraded from version 2.3.1 to 2.4.0
355
356=item *
357
6481ebaf
FC
358C<sigtrap> has been upgraded from version 1.04 to 1.05.
359
360It no longer tries to modify read-only arguments when generating a
361backtrace
362L<[perl #72340]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72340>.
363
364=item *
365
97a3247a 366C<threads> has been upgraded from version 1.77_03 to 1.81_01.
ac4c9720
CBW
367
368=item *
369
370C<threads::shared> has been upgrade from version 1.33_03 to 1.34
dfa4c013
JH
371
372=item *
373
aa7758f7 374C<Unicode::Collate> has been upgraded from version 0.59 to 0.63
c02ee425 375
aa7758f7
CBW
376U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om,
377tn, vi, hr, ig, ru, sq, se, sr, to and uk
1393fe00
CBW
378
379=item *
380
1c2dcb3e 381C<Unicode::Normalize> has been upgraded from version 1.06 to 1.07
c9a84c8b 382
918184d1
TM
383=item *
384
385C<B::Deparse> has been upgraded from version 0.98 to 0.99
386
387B::Deparse now properly handles the code that applies a conditional
388pattern match against implicit C<$_> as it was fixed in
389L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>.
390
ee0887a9 391=back
c9a84c8b 392
ee0887a9 393=head2 Removed Modules and Pragmata
c9a84c8b 394
ee0887a9 395=over 4
4c793fe3 396
ee0887a9 397=item *
48c1efd2 398
ee0887a9 399XXX
4c793fe3
FR
400
401=back
402
403=head1 Documentation
404
ee0887a9
SH
405XXX Changes to files in F<pod/> go here. Consider grouping entries by
406file and be sure to link to the appropriate page, e.g. L<perlfunc>.
4c793fe3 407
ee0887a9 408=head2 New Documentation
4c793fe3 409
ee0887a9 410XXX Changes which create B<new> files in F<pod/> go here.
4c793fe3 411
ee0887a9 412=head3 L<XXX>
4c793fe3 413
ee0887a9 414XXX Description of the purpose of the new file here
4c793fe3 415
ee0887a9 416=head2 Changes to Existing Documentation
fc1418b7 417
ee0887a9
SH
418XXX Changes which significantly change existing files in F<pod/> go here.
419However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
420section.
fc1418b7 421
ee0887a9 422=head3 L<XXX>
e2babdfb 423
7bc3efda
SH
424=over 4
425
426=item *
427
a7e93501
FC
428The documentation for the C<SvTRUE> macro was simply wrong in stating that
429get-magic is not processed. It has been corrected.
7bc3efda
SH
430
431=back
e2babdfb 432
4c793fe3
FR
433=head1 Diagnostics
434
435The following additions or changes have been made to diagnostic output,
436including warnings and fatal error messages. For the complete list of
437diagnostic messages, see L<perldiag>.
438
ee0887a9
SH
439XXX New or changed warnings emitted by the core's C<C> code go here. Also
440include any changes in L<perldiag> that reconcile it to the C<C> code.
4c793fe3 441
ee0887a9 442[ Within each section, list entries as a =item entry ]
4c793fe3 443
ee0887a9 444=head2 New Diagnostics
4c793fe3 445
ee0887a9 446XXX Newly added diagnostic messages go here
fc1418b7 447
ee0887a9 448=over 4
fc1418b7
SH
449
450=item *
451
ee0887a9 452XXX
ebce6c40 453
4c793fe3
FR
454=back
455
ee0887a9 456=head2 Changes to Existing Diagnostics
4c793fe3 457
ee0887a9 458XXX Changes (i.e. rewording) of diagnostic messages go here
4c793fe3
FR
459
460=over 4
461
462=item *
463
dc08898c
FC
464The 'Layer does not match this perl' error message has been replaced with
465these more helpful messages:
466
467=over 4
468
469=item *
470
471PerlIO layer function table size (%d) does not match size expected by this
472perl (%d)
473
474=item *
475
476PerlIO layer instance size (%d) does not match size expected by this perl
477(%d)
478
479=back
480
481L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754>
4c793fe3
FR
482
483=back
484
ee0887a9 485=head1 Utility Changes
4c793fe3 486
ee0887a9
SH
487XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
488here. Most of these are built within the directories F<utils> and F<x2p>.
4c793fe3 489
ee0887a9
SH
490[ List utility changes as a =head3 entry for each utility and =item
491entries for each change
492Use L<XXX> with program names to get proper documentation linking. ]
fc1418b7 493
ee0887a9 494=head3 L<XXX>
fc1418b7 495
ee0887a9 496=over 4
4c793fe3 497
44428a46
FC
498=item *
499
ee0887a9 500XXX
44428a46 501
4c793fe3
FR
502=back
503
ee0887a9 504=head1 Configuration and Compilation
4c793fe3 505
ee0887a9
SH
506XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
507go here. Any other changes to the Perl build process should be listed here.
508However, any platform-specific changes should be listed in the
509L</Platform Support> section, instead.
4c793fe3 510
ee0887a9 511[ List changes as a =item entry ].
4c793fe3 512
0c692eed
FR
513=over 4
514
515=item *
516
ee0887a9 517XXX
0c692eed
FR
518
519=back
4c793fe3 520
ee0887a9 521=head1 Testing
0c692eed 522
ee0887a9
SH
523XXX Any significant changes to the testing of a freshly built perl should be
524listed here. Changes which create B<new> files in F<t/> go here as do any
525large changes to the testing harness (e.g. when parallel testing was added).
526Changes to existing files in F<t/> aren't worth summarising, although the bugs
527that they represent may be covered elsewhere.
0c692eed 528
ee0887a9 529[ List each test improvement as a =item entry ]
0c692eed 530
ee0887a9 531=over 4
0c692eed
FR
532
533=item *
534
bd6920d7
FC
535The script F<t/op/threads-dirh.t> has been added, which tests interaction
536of threads and directory handles.
4c793fe3
FR
537
538=back
539
ee0887a9 540=head1 Platform Support
4c793fe3 541
ee0887a9 542XXX Any changes to platform support should be listed in the sections below.
4c793fe3 543
ee0887a9
SH
544[ Within the sections, list each platform as a =item entry with specific
545changes as paragraphs below it. ]
4c793fe3 546
ee0887a9 547=head2 New Platforms
0c692eed 548
ee0887a9
SH
549XXX List any platforms that this version of perl compiles on, that previous
550versions did not. These will either be enabled by new files in the F<hints/>
551directories, or new subdirectories and F<README> files at the top level of the
552source tree.
0c692eed 553
ee0887a9 554=over 4
0c692eed 555
ee0887a9 556=item XXX-some-platform
0c692eed 557
ee0887a9 558XXX
0c692eed 559
ee0887a9 560=back
0c692eed 561
ee0887a9 562=head2 Discontinued Platforms
4c793fe3 563
ee0887a9 564XXX List any platforms that this version of perl no longer compiles on.
8ebb9810 565
ee0887a9 566=over 4
8ebb9810 567
ee0887a9 568=item XXX-some-platform
48c1efd2 569
ee0887a9 570XXX
48c1efd2 571
ee0887a9 572=back
44428a46 573
ee0887a9 574=head2 Platform-Specific Notes
44428a46 575
ee0887a9
SH
576XXX List any changes for specific platforms. This could include configuration
577and compilation changes or changes in portability/compatibility. However,
578changes within modules for platforms should generally be listed in the
579L</Modules and Pragmata> section.
f4beb78f 580
ee0887a9 581=over 4
f4beb78f 582
810f3b7c
FC
583=item IRIX
584
585Conversion of strings to floating-point numbers is now more accurate on
586IRIX systems
587L<[perl #32380]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=32380>.
588
6034bceb
FC
589=item Mac OS X
590
591Early versions of Mac OS X (Darwin) had buggy implementations of the
592C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl
593would pretend they did not exist.
594
595These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and
596higher, as they have been fixed
597L<[perl #72990]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72990>.
598
810f3b7c
FC
599=item OpenVOS
600
601perl now builds again with OpenVOS (formerly known as Stratus VOS)
602L<[perl #78132]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=78132>.
603
a9e68e41
CB
604=item VMS
605
606The shortening of symbols longer than 31 characters in the C sources is
607now done by the compiler rather than by xsubpp (which could only do so
608for generated symbols in XS code).
609
2ffefa5a 610=item Windows
ccb45ef4 611
2ffefa5a
FC
612C<$Config{gccversion}> is now set correctly when perl is built using the
613mingw64 compiler from L<http://mingw64.org>
614L<[perl #73754]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=73754>.
615
f8a8dd49
FC
616The build process proceeds more smoothly with mingw and dmake when
617F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix.
618
2ffefa5a 619=back
ccb45ef4 620
ee0887a9 621=head1 Internal Changes
85318b69 622
ee0887a9
SH
623XXX Changes which affect the interface available to C<XS> code go here.
624Other significant internal changes for future core maintainers should
625be noted as well.
85318b69 626
ee0887a9 627[ List each test improvement as a =item entry ]
80b6a949 628
ee0887a9 629=over 4
80b6a949 630
e2babdfb
FR
631=item *
632
a5763045
FC
633See L</Regular expressions retain their localeness when interpolated>,
634above.
e2babdfb 635
a7e93501
FC
636=item *
637
638The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and
639C<sv_collxfrm_flags> functions have been added. These are like their
640non-_flags counterparts, but allow one to specify whether get-magic is
641processed.
642
643The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have
644been replaced with wrappers around the new functions.
645
646=item *
647
648A new C<sv_2bool_flags> function has been added.
649
650This is like C<sv_2bool>, but it lets the calling code decide whether
651get-magic is handled. C<sv_2bool> is now a macro that calls the new
652function.
653
654=item *
655
656A new macro, C<SvTRUE_nomg>, has been added.
657
658This is like C<SvTRUE>, except that it does not process magic. It uses the
659new C<sv_2bool_flags> function.
660
661=item *
662
663C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the
664source string) if the flags passed to it do not include SV_GMAGIC. So it
07d5f7aa 665now matches the documentation.
a7e93501 666
5e26bbbe
Z
667=item *
668
669A new interface has been added for custom check hooks on subroutines. See
670L/Custom per-subroutine check hooks>, above.
671
a11a8547
Z
672=item *
673
674List op building functions have been added to the
675API. See L<op_append_elem|perlapi/op_append_elem>,
676L<op_append_list|perlapi/op_append_list>, and
677L<op_prepend_elem|perlapi/op_prepend_elem>.
678
679=item *
680
681The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that
682constructs the execution-order op chain, has been added to the API.
683
eb32ee41
FC
684=item *
685
686Many functions ending with pvn now have equivalent pv/pvs/sv versions.
687
9ae8c3d9
FC
688=item *
689
647a6853 690The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr>
9ae8c3d9
FC
691functions have been added to the API.
692
693=item *
694
695The new API function C<parse_stmtseq()> parses a sequence of statements, up
696to closing brace or EOF.
697
ee0887a9 698=back
e2babdfb 699
ee0887a9 700=head1 Selected Bug Fixes
e2babdfb 701
ee0887a9
SH
702XXX Important bug fixes in the core language are summarised here.
703Bug fixes in files in F<ext/> and F<lib/> are best summarised in
704L</Modules and Pragmata>.
e2babdfb 705
ee0887a9 706[ List each fix as a =item entry ]
346e4e56 707
ee0887a9 708=over 4
346e4e56 709
78846812
FR
710=item *
711
4e9f151b
FC
712A regular expression match in the right-hand side of a global substitution
713(C<s///g>) that is in the same scope will no longer cause match variables
714to have the wrong values on subsequent iterations. This can happen when an
e54f3f30
FC
715array or hash subscript is interpolated in the right-hand side, as in
716C<s|(.)|@a{ print($1), /./ }|g>
717L<[perl #19078]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=19078>.
718
719=item *
720
721Constant-folding used to cause
722
723 $text =~ ( 1 ? /phoo/ : /bear/)
724
725to turn into
726
727 $text =~ /phoo/
728
729at compile time. Now it correctly matches against C<$_>
730L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>.
78846812 731
a5763045
FC
732=item *
733
734Parsing Perl code (either with string C<eval> or by loading modules) from
735within a C<UNITCHECK> block no longer causes the interpreter to crash
736L<[perl #70614]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=70614>.
737
5a9a79a4
FC
738=item *
739
740When C<-d> is used on the shebang (C<#!>) line, the debugger now has access
741to the lines of the main program. In the past, this sometimes worked and
742sometimes did not, depending on what order things happened to be arranged
b45e2413
FC
743in memory
744L<[perl #71806]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71806>.
5a9a79a4 745
a7e93501
FC
746=item *
747
748The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH>
749method of a tie) on its left-hand side just once, not twice
750L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
751
752=item *
753
754String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and
755C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic
756(e.g., tie methods) twice on their operands
757L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
758
759This bug was introduced in an earlier 5.13 release, and does not affect
760perl 5.12.
761
762=item *
763
764When a tied (or other magic) variable is used as, or in, a regular
765expression, it no longer has its C<FETCH> method called twice
766L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
767
768This bug was introduced in an earlier 5.13 release, and does not affect
769perl 5.12.
770
d4a59e54
FC
771=item *
772
8420a925 773The C<-C> command line option can now be followed by other options
d4a59e54
FC
774L<[perl #72434]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72434>.
775
dc08898c
FC
776=item *
777
778Assigning a glob to a PVLV used to convert it to a plain string. Now it
779works correctly, and a PVLV can hold a glob. This would happen when a
780nonexistent hash or array element was passed to a subroutine:
781
782 sub { $_[0] = *foo }->($hash{key});
783 # $_[0] would have been the string "*main::foo"
784
785It also happened when a glob was assigned to, or returned from, an element
786of a tied array or hash
787L<[perl #36051]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=36051>.
788
6904a83f
FC
789=item *
790
791Creating a new thread when directory handles were open used to cause a
792crash, because the handles were not cloned, but simply passed to the new
793thread, resulting in a double free.
794
07d5f7aa 795Now directory handles are cloned properly, on systems that have a C<fchdir>
6904a83f
FC
796function. On other systems, new threads simply do not inherit directory
797handles from their parent threads
798L<[perl #75154]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75154>.
799
cffb3698
FC
800=item *
801
ab4c2c27
FC
802The regular expression parser no longer hangs when parsing C<\18> and
803C<\88>.
804
805This bug was introduced in version 5.13.5 and did not affect earlier
806versions
807L<[perl #78058]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78058>.
808
be1cc451
FC
809=item *
810
811Subroutine redefinition works once more in the debugger
812L<[perl #48332]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48332>.
813
b20c4ee1
FC
814=item *
815
816The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments
817L<[perl #20661]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=20661>.
818
afa74577
FC
819=item *
820
821Stringifying a scalar containing -0.0 no longer has the affect of turning
822false into true
823L<[perl #45133]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=45133>.
824
c8bbf675
FC
825=item *
826
827Aliasing packages by assigning to globs or deleting packages by deleting
828their containing stash elements used to have erratic effects on method
829resolution, because the internal 'isa' caches were not reset. This has been
830fixed.
831
07d5f7aa
FC
832=item *
833
834C<sort> with a custom sort routine could crash if too many nested
835subroutine calls occurrred from within the sort routine
836L<[perl #77930]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77930>.
837
838This bug was introduced in an earlier 5.13 release, and did not affect
839perl 5.12.
840
9ae8c3d9
FC
841=item *
842
843The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when
844there is a syntax error and no C<G_KEEPERR> flag, and never set it if the
845C<G_KEEPERR> flag is present
846L<[perl #3719]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=3719>.
847
825563b9
FC
848=item *
849
850Nested C<map> and C<grep> blocks no longer leak memory when processing
851large lists
852L<[perl #48004]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=48004>.
853
854=item *
855
856Malformed C<version> objects no longer cause crashes
857L<[perl #78286]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78286>.
858
859=item *
860
861The interpreter no longer crashes when freeing deeply-nested arrays of
862arrays. Hashes have not been fixed yet
863L<[perl #44225]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=44225>.
864
020fe755
AB
865=item *
866
867The mechanism for freeing objects in globs used to leave dangling
868pointers to freed SVs, meaning Perl users could see corrupted state
869during destruction.
870
871Perl now only frees the affected slots of the GV, rather than freeing
872the GV itself. This makes sure that there are no dangling refs or
873corrupted state during destruction.
874
875=item *
876
877Perl no longer leaks C<PL_main_cv> or C<PL_defstash> during
878destruction L<[perl #40388]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=40388>.
879
4c793fe3
FR
880=back
881
962fbe1d
SH
882=head1 Known Problems
883
ee0887a9
SH
884XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
885tests that had to be C<TODO>ed for the release would be noted here, unless
886they were specific to a particular platform (see below).
962fbe1d 887
ee0887a9
SH
888This is a list of some significant unfixed bugs, which are regressions
889from either 5.XXX.XXX or 5.XXX.XXX.
962fbe1d 890
ee0887a9
SH
891[ List each fix as a =item entry ]
892
893=over 4
08d032c0
SH
894
895=item *
896
ee0887a9 897XXX
962fbe1d
SH
898
899=back
900
ee0887a9 901=head1 Obituary
4c793fe3 902
ee0887a9
SH
903XXX If any significant core contributor has died, we've added a short obituary
904here.
0195fb5f 905
405fd67e
DG
906=head1 Errata
907
908=over 4
909
910=item *
911
912Fixed a typo in L<perl5135delta> regarding array slices and smart matching
913
914=back
915
ee0887a9 916=head1 Acknowledgements
0195fb5f 917
ee0887a9 918XXX The list of people to thank goes here.
4c793fe3
FR
919
920=head1 Reporting Bugs
921
922If you find what you think is a bug, you might check the articles
923recently posted to the comp.lang.perl.misc newsgroup and the perl
924bug database at http://rt.perl.org/perlbug/ . There may also be
925information at http://www.perl.org/ , the Perl Home Page.
926
927If you believe you have an unreported bug, please run the B<perlbug>
928program included with your release. Be sure to trim your bug down
929to a tiny but sufficient test case. Your bug report, along with the
930output of C<perl -V>, will be sent off to perlbug@perl.org to be
931analysed by the Perl porting team.
932
933If the bug you are reporting has security implications, which make it
934inappropriate to send to a publicly archived mailing list, then please send
ee0887a9 935it to perl5-security-report@perl.org. This points to a closed subscription
4c793fe3
FR
936unarchived mailing list, which includes all the core committers, who be able
937to help assess the impact of issues, figure out a resolution, and help
938co-ordinate the release of patches to mitigate or fix the problem across all
ee0887a9 939platforms on which Perl is supported. Please only use this address for
4c793fe3
FR
940security issues in the Perl core, not for modules independently
941distributed on CPAN.
942
943=head1 SEE ALSO
944
945The F<Changes> file for an explanation of how to view exhaustive details
946on what changed.
947
948The F<INSTALL> file for how to build Perl.
949
950The F<README> file for general stuff.
951
952The F<Artistic> and F<Copying> files for copyright information.
953
954=cut