This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta entry for 8c8488cd4fce90cb5c03fb3f89e89c05e5275498.
[perl5.git] / pod / perldelta.pod
CommitLineData
4c793fe3
FR
1=encoding utf8
2
c39f7439 3=for comment
38dbd939 4This has been completed up to 518a985, except for:
48ea5431
FC
504777d295957ad270188e4debf51b523e07cc5b0
6c565ab54dc649bb62cd4d57149d7b2abb21df5f3
a5e71717 71c8d11ca3d0ce8bc11562f159b94c2c7e62dea6c
38dbd939 81830b3d9c87f8b1473b0a80759846f7a5dccae5a
ca60ecf2 9I may have missed a few module version bumps.
c39f7439 10
4c793fe3
FR
11=head1 NAME
12
8f97a47a
TM
13[ this is a template for a new perldelta file. Any text flagged as
14XXX needs to be processed before release. ]
4c793fe3 15
8f97a47a 16perldelta - what is new for perl v5.13.7
a12cf05f 17
8f97a47a 18=head1 DESCRIPTION
fb121860 19
8f97a47a
TM
20This document describes differences between the 5.13.6 release and
21the 5.13.7 release.
eb32ee41 22
8f97a47a
TM
23If you are upgrading from an earlier release such as 5.13.5, first read
24L<perl5136delta>, which describes differences between 5.13.5 and
255.13.6.
eb32ee41 26
8f97a47a 27=head1 Notice
eb32ee41 28
8f97a47a 29XXX Any important notices here
5e26bbbe 30
8f97a47a 31=head1 Core Enhancements
5e26bbbe 32
8f97a47a
TM
33XXX New core language features go here. Summarise user-visible core language
34enhancements. Particularly prominent performance optimisations could go
35here, but most should go in the L</Performance Enhancements> section.
5e26bbbe 36
8f97a47a 37[ List each enhancement as a =head2 entry ]
4f65bc30 38
c035a075
DG
39=head2 Single term prototype
40
41The C<+> prototype is a special alternative to C<$> that will act like
42C<\[@%]> when given a literal array or hash variable, but will otherwise
43force scalar context on the argument. This is useful for functions which
44should accept either a literal array or an array reference as the argument:
45
46 sub smartpush (+@) {
47 my $aref = shift;
48 die "Not an array or arrayref" unless ref $aref eq 'ARRAY';
49 push @$aref, @_;
50 }
51
52When using the C<+> prototype, your function must check that the argument
53is of an acceptable type.
54
b7bd32cc
FC
55=head2 C<use re '/flags';>
56
57The C<re> pragma now has the ability to turn on regular expression flags
58till the end of the lexical scope:
59
60 use re '/x';
61 "foo" =~ / (.+) /; # /x implied
62
63See L<re/'/flags' mode> for details.
64
a5e71717
FC
65=head2 Statement labels can appear in more places
66
67Statement labels can now occur before any type of statement or declaration,
68such as C<package>.
69
9b7c43ba
KW
70=head2 C<use feature "unicode_strings"> now applies to more regex matching
71
72Another chunk of the L<perlunicode/The "Unicode Bug"> is fixed in this
73release. Now, regular expressions compiled within the scope of the
74"unicode_strings" feature (or under the "u" regex modifier (specifiable
75currently only with infix notation C<(?u:...)> or via C<use re '/u'>)
76will match the same whether or not the target string is encoded in utf8,
77with regard to C<[[:posix:]]> character classes
78
79Work is underway to add the case sensitive matching to the control of
80this feature, but was not complete in time for this dot release.
81
cba5a3b0
DG
82=head2 Array and hash container functions accept references
83
84All built-in functions that operate directly on array or hash
85containers now also accept hard references to arrays or hashes:
86
87 |----------------------------+---------------------------|
88 | Traditional syntax | Terse syntax |
89 |----------------------------+---------------------------|
90 | push @$arrayref, @stuff | push $arrayref, @stuff |
91 | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
92 | pop @$arrayref | pop $arrayref |
93 | shift @$arrayref | shift $arrayref |
94 | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 |
95 | keys %$hashref | keys $hashref |
96 | keys @$arrayref | keys $arrayref |
97 | values %$hashref | values $hashref |
98 | values @$arrayref | values $arrayref |
99 | ($k,$v) = each %$hashref | ($k,$v) = each $hashref |
100 | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref |
101 |----------------------------+---------------------------|
102
103This allows these built-in functions to act on long dereferencing chains
104or on the return value of subroutines without needing to wrap them in
105C<@{}> or C<%{}>:
106
107 push @{$obj->tags}, $new_tag; # old way
108 push $obj->tags, $new_tag; # new way
109
110 for ( keys %{$hoh->{genres}{artists}} ) {...} # old way
111 for ( keys $hoh->{genres}{artists} ) {...} # new way
112
113For C<push>, C<unshift> and C<splice>, the reference will auto-vivify
114if it is not defined, just as if it were wrapped with C<@{}>.
115
116Calling C<keys> or C<values> directly on a reference gives a substantial
117performance improvement over explicit dereferencing.
118
119For C<keys>, C<values>, C<each>, when overloaded dereferencing is
120present, the overloaded dereference is used instead of dereferencing the
121underlying reftype. Warnings are issued about assumptions made in the
122following three ambiguous cases:
123
124 (a) If both %{} and @{} overloading exists, %{} is used
125 (b) If %{} overloading exists on a blessed arrayref, %{} is used
126 (c) If @{} overloading exists on a blessed hashref, @{} is used
127
15bc3b4f
FC
128=head2 y///r
129
130The C</r> flag, which was added to C<s///> in 5.13.2, has been extended to
131the C<y///> operator.
132
133It causes it to perform the substitution on a I<copy> of its operand,
134returning that copy instead of a character count.
135
d29ae9fc
FR
136=head2 New global variable C<${^GLOBAL_PHASE}>
137
138A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow
139introspection of the current phase of the perl interpreter. It's explained in
140detail in L<perlvar/"${^GLOBAL_PHASE}"> and
141L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">.
142
8f97a47a 143=head1 Security
4f65bc30 144
8f97a47a
TM
145XXX Any security-related notices go here. In particular, any security
146vulnerabilities closed should be noted here rather than in the
147L</Selected Bug Fixes> section.
0eec0a4c 148
8f97a47a 149[ List each security issue as a =head2 entry ]
0eec0a4c 150
4c793fe3
FR
151=head1 Incompatible Changes
152
8f97a47a 153XXX For a release on a stable branch, this section aspires to be:
9de15fec 154
8f97a47a
TM
155 There are no changes intentionally incompatible with 5.XXX.XXX. If any
156 exist, they are bugs and reports are welcome.
9de15fec 157
8f97a47a 158[ List each incompatible change as a =head2 entry ]
9de15fec 159
a638ba6f
FC
160=head2 Dereferencing typeglobs
161
162If you assign a typeglob to a scalar variable:
163
164 $glob = *foo;
165
166the glob that is copied to C<$glob> is marked with a special flag
167indicating that the glob is just a copy. This allows subsequent assignments
168to C<$glob> to overwrite the glob. The original glob, however, is
169immutable.
170
171Many Perl operators did not distinguish between these two types of globs.
172This would result in strange behaviour in edge cases: C<untie $scalar>
173would do nothing if the last thing assigned to the scalar was a glob
174(because it treated it as C<untie *$scalar>, which unties a handle).
0b6a3b5a 175Assignment to a glob slot (e.g., C<(*$glob) = \@some_array>) would simply
a638ba6f
FC
176assign C<\@some_array> to C<$glob>.
177
178To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms)
179has been modified to make a new immutable glob if its operand is a glob
180copy. Various operators that make a distinction between globs and scalars
181have been modified to treat only immutable globs as globs.
182
183This causes an incompatible change in code that assigns a glob to the
184return value of C<*{}> when that operator was passed a glob copy. Take the
185following code, for instance:
186
187 $glob = *foo;
188 *$glob = *bar;
189
190The C<*$glob> on the second line returns a new immutable glob. That new
15bc3b4f
FC
191glob is made an alias to C<*bar>. Then it is discarded. So the second
192assignment has no effect.
a638ba6f
FC
193
194The upside to this incompatible change is that bugs
195L<[perl #77496]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77496>,
196L<[perl #77502]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77502>,
197L<[perl #77508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77508>,
198L<[perl #77688]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77688>,
199and
200L<[perl #77812]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77812>,
201and maybe others, too, have been fixed.
202
0b6a3b5a
FC
203See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even
204more detail.
a638ba6f 205
e437e8d7
FC
206=head2 Clearing stashes
207
208Stash list assignment C<%foo:: = ()> used to make the stash anonymous
209temporarily while it was being emptied. Consequently, any of its
210subroutines referenced elsewhere would become anonymous (showing up as
211"(unknown)" in C<caller>). Now they retain their package names, such that
212C<caller> will return the original sub name if there is still a reference
a9fd1744
FC
213to its typeglob, or "foo::__ANON__" otherwise
214L<[perl #79208]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79208>.
e437e8d7 215
8f97a47a 216=head1 Deprecations
6904a83f 217
8f97a47a
TM
218XXX Any deprecated features, syntax, modules etc. should be listed here.
219In particular, deprecated modules should be listed here even if they are
220listed as an updated module in the L</Modules and Pragmata> section.
6904a83f 221
8f97a47a 222[ List each deprecation as a =head2 entry ]
afa74577 223
4c793fe3
FR
224=head1 Performance Enhancements
225
8f97a47a
TM
226XXX Changes which enhance performance without changing behaviour go here. There
227may well be none in a stable release.
4c793fe3 228
8f97a47a 229[ List each enhancement as a =item entry ]
e2babdfb 230
8f97a47a 231=over 4
e2babdfb 232
b141c43c
FR
233=item *
234
6d07abef
CBW
235When an object has many weak references to it, freeing that object
236can under some some circumstances take O(N^2) time to free (where N is the
237number of references). The number of circumstances has been reduced.
238L<[perl #75254]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75254>.
b141c43c 239
4c793fe3
FR
240=back
241
242=head1 Modules and Pragmata
243
8f97a47a
TM
244XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
245go here. If Module::CoreList is updated, generate an initial draft of the
246following sections using F<Porting/corelist-perldelta.pl>, which prints stub
247entries to STDOUT. Results can be pasted in place of the '=head2' entries
248below. A paragraph summary for important changes should then be added by hand.
249In an ideal world, dual-life modules would have a F<Changes> file that could be
250cribbed.
e2941eb0 251
8f97a47a 252[ Within each section, list entries as a =item entry ]
e2941eb0 253
8f97a47a 254=head2 New Modules and Pragmata
25e68b8b 255
8f97a47a 256=over 4
463da0ac
CBW
257
258=item *
259
028d3bfa 260The following modules were added by the C<Unicode::Collate>
b5d9a953 261upgrade from 0.63 to 0.67. See below for details.
028d3bfa 262
584e761d 263C<Unicode::Collate::CJK::Big5>
028d3bfa
CBW
264
265C<Unicode::Collate::CJK::GB2312>
266
584e761d
CBW
267C<Unicode::Collate::CJK::JISX0208>
268
269C<Unicode::Collate::CJK::Korean>
028d3bfa
CBW
270
271C<Unicode::Collate::CJK::Pinyin>
272
273C<Unicode::Collate::CJK::Stroke>
6481ebaf 274
8f97a47a 275=back
6481ebaf 276
8f97a47a 277=head2 Updated Modules and Pragmata
6481ebaf 278
8f97a47a 279=over 4
ac4c9720
CBW
280
281=item *
282
9f1eb87f
CBW
283C<Archive::Extract> has been upgraded from 0.44 to 0.46
284
285Resolves an issue with NetBSD-current and its new unzip
286executable.
287
288=item *
289
deabda19
CBW
290C<Archive::Tar> has been upgraded from 1.68 to 1.70
291
292This adds the ptargrep utility for using regular expressions against
293the contents of files in a tar archive.
294
295=item *
296
8770f09e 297C<B> has been upgraded from 1.24 to 1.26.
a5e71717 298
ca60ecf2
FC
299It no longer crashes when taking apart a C<y///> containing characters
300outside the octet range or compiled in a C<use utf8> scope.
301
a5e71717
FC
302=item *
303
b293762b 304C<B::Deparse> has been upgraded from 0.99 to 1.01.
b7bd32cc
FC
305
306It fixes deparsing of C<our> followed by a variable with funny characters
307(as permitted under the C<utf8> pragma)
308L<[perl #33752]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=33752>.
309
310=item *
311
84601d63
CBW
312C<CGI> has been upgraded from 3.49 to 3.50
313
314This provides the following security fixes: the MIME boundary in
315multipart_init is now random and improvements to the handling of
316newlines embedded in header values.
317
318The documentation for param_fetch() has been corrected and clarified.
319
320=item *
321
07be2ace
CBW
322C<CPAN> has been upgraded from 1.94_61 to 1.94_62
323
324=item *
325
59af3f66
CBW
326C<CPANPLUS> has been upgraded from 0.9007 to 0.9010
327
328Fixes for the SQLite source engine and resolving of issues with the
329testsuite when run under local::lib and/or cpanminus
330
331=item *
332
f5c34353
CBW
333C<CPANPLUS::Dist::Build> has been upgraded from 0.48 to 0.50
334
335=item *
336
ca60ecf2
FC
337C<Data::Dumper> has been upgraded from 2.129 to 2.130.
338
339=item *
340
9e2ac5d4
FC
341C<DynaLoader> has been upgraded from 1.10 to 1.11.
342
343It fixes a buffer overflow when passed a very long file name.
344
345=item *
346
48ea5431
FC
347C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23.
348
349=item *
350
351C<Fcntl> has been upgraded from 1.09 to 1.10.
352
353=item *
354
6d3bcdd8 355C<File::Fetch> has been upgraded from 0.24 to 0.28
0df024e2
CBW
356
357C<HTTP::Lite> is now supported for 'http' scheme.
358
6d3bcdd8
CBW
359The C<fetch> utility is supported on FreeBSD, NetBSD and
360Dragonfly BSD for the C<http> and C<ftp> schemes.
361
0df024e2
CBW
362=item *
363
48ea5431
FC
364C<File::Glob> has been upgraded from 1.09 to 1.10.
365
366=item *
367
ca60ecf2
FC
368C<File::stat> has been upgraded from 1.03 to 1.04.
369
370The C<-x> and C<-X> file test operators now work correctly under the root
371user.
372
373=item *
374
c39f7439
FC
375C<GDBM_File> has been upgraded from 1.11 to 1.12.
376
377This fixes a memory leak when DBM filters are used.
378
379=item *
380
48ea5431
FC
381C<Hash::Util> has been upgraded from 0.09 to 0.10.
382
b293762b
FC
383=item *
384
385C<Hash::Util::FieldHash> has been upgraded from 1.05 to 1.06.
48ea5431
FC
386
387=item *
388
389C<I18N::Langinfo> has been upgraded from 0.06 to 0.07.
390
391=item *
392
b22271be
FR
393C<Locale::Maketext> has been upgraded from 1.16 to 1.17.
394
395=item *
396
8dc9e180 397C<Math::BigInt> has been upgraded from 1.97 to 1.99.
e1be28b4
TR
398
399=item *
400
a0b94c24 401C<Math::BigInt::FastCalc> has been upgraded from 0.22 to 0.24.
b293762b
FC
402
403=item *
404
46787c0e
CBW
405C<MIME::Base64> has been upgraded from 3.09 to 3.10
406
407Includes new functions to calculate the length of encoded and decoded
408base64 strings.
409
410=item *
411
8ff01ef0
FC
412C<mro> has been upgraded from 1.04 to 1.05.
413
414=item *
415
c39f7439
FC
416C<NDBM_File> has been upgraded from 1.09 to 1.10.
417
418This fixes a memory leak when DBM filters are used.
419
420=item *
421
422C<ODBM_File> has been upgraded from 1.08 to 1.09.
423
424This fixes a memory leak when DBM filters are used.
425
426=item *
427
ca60ecf2
FC
428C<Opcode> has been upgraded from 1.16 to 1.17.
429
430=item *
431
a9aeb2f1
CBW
432C<parent> has been upgraded from 0.223 to 0.224
433
434=item *
435
40fcdb56
CBW
436C<Pod::Simple> has been upgraded from 3.14 to 3.15
437
438Includes various fixes to C<HTML> and C<XHTML> handling.
439
440=item *
441
48ea5431
FC
442C<POSIX> has been upgraded from 1.21 to 1.22.
443
444=item *
445
b7bd32cc
FC
446C<re> has been upgraded from 0.13 to 0.14, for the sake of the new
447C<use re "/flags"> pragma.
dfa4c013 448
48ea5431
FC
449=item *
450
8ff01ef0
FC
451C<Safe> has been upgraded from 2.28 to 2.29.
452
453It adds C<&version::vxs::VCMP> to the default share.
454
455=item *
456
48ea5431
FC
457C<SDBM_File> has been upgraded from 1.07 to 1.08.
458
459=item *
460
a5e71717
FC
461C<SelfLoader> has been upgraded from 1.17 to 1.18.
462
463It now works in taint mode
464L<[perl #72062]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72062>.
465
466=item *
467
48ea5431
FC
468C<Socket> has been upgraded from 1.90 to 1.91.
469
a5e71717
FC
470=item *
471
fd0eba19
CBW
472C<Storable> has been upgraded from 2.22 to 2.24
473
474Includes performance improvement for overloaded classes.
475
476=item *
477
a5e71717
FC
478C<Sys::Hostname> has been upgraded from 1.13 to 1.14.
479
539ce3d8
CBW
480=item *
481
b5d9a953 482C<Unicode::Collate> has been upgraded from 0.63 to 0.67
028d3bfa 483
584e761d 484This release newly adds locales C<ja> C<ko> and C<zh> and its variants
028d3bfa
CBW
485( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ).
486
b5d9a953
CBW
487Supported UCA_Version 22 for Unicode 6.0.0.
488
028d3bfa 489The following modules have been added:
539ce3d8 490
028d3bfa
CBW
491C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes
492tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering.
493
494C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes
495tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering.
496
584e761d
CBW
497C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji
498(CJK Unified Ideographs) in the JIS X 0208 order.
499
500C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs
501in the order of CLDR's Korean ordering.
502
028d3bfa
CBW
503C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes
504tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering.
505
506C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes
507tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
508
8f97a47a 509=back
dfa4c013 510
8f97a47a 511=head2 Removed Modules and Pragmata
c02ee425 512
8f97a47a 513=over 4
1393fe00
CBW
514
515=item *
516
8f97a47a 517XXX
c9a84c8b 518
8f97a47a 519=back
918184d1 520
8f97a47a 521=head1 Documentation
918184d1 522
8f97a47a
TM
523XXX Changes to files in F<pod/> go here. Consider grouping entries by
524file and be sure to link to the appropriate page, e.g. L<perlfunc>.
918184d1 525
570c3caa 526L<perlvar> reorders the variables and groups them by topic. Each variable
527introduced after Perl 5.000 notes the first version in which it is
528available. L<perlvar> also has a new section for deprecated variables to
529note when they were removed.
530
8f97a47a 531=head2 New Documentation
dca41e57 532
8f97a47a 533XXX Changes which create B<new> files in F<pod/> go here.
dca41e57 534
8f97a47a 535=head3 L<XXX>
c9a84c8b 536
8f97a47a 537XXX Description of the purpose of the new file here
4c793fe3 538
ee0887a9 539=head2 Changes to Existing Documentation
fc1418b7 540
8f97a47a
TM
541XXX Changes which significantly change existing files in F<pod/> go here.
542However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
543section.
544
7eb82171
DG
545=over
546
48ea5431
FC
547=item *
548
a5e71717 549Array and hash slices in scalar context are now documented in L<perldata>.
48ea5431 550
b293762b
FC
551=item *
552
553L<perlform> and L<perllocale> have been corrected to state that
554C<use locale> affects formats.
555
7eb82171
DG
556=back
557
8f97a47a 558=head3 L<XXX>
e2babdfb 559
7bc3efda
SH
560=over 4
561
562=item *
563
8f97a47a 564XXX Description of the change here
7bc3efda
SH
565
566=back
e2babdfb 567
4c793fe3
FR
568=head1 Diagnostics
569
570The following additions or changes have been made to diagnostic output,
571including warnings and fatal error messages. For the complete list of
572diagnostic messages, see L<perldiag>.
573
8f97a47a
TM
574XXX New or changed warnings emitted by the core's C<C> code go here. Also
575include any changes in L<perldiag> that reconcile it to the C<C> code.
4c793fe3 576
8f97a47a 577[ Within each section, list entries as a =item entry ]
4c793fe3 578
8f97a47a 579=head2 New Diagnostics
4c793fe3 580
8f97a47a 581XXX Newly added diagnostic messages go here
dc08898c
FC
582
583=over 4
584
585=item *
586
15bc3b4f
FC
587"Using !~ with %s doesn't make sense": This message was actually added in
5885.13.2, but was omitted from perldelta. It now applies also to the C<y///>
589operator, and has been documented.
dc08898c
FC
590
591=back
592
8f97a47a 593=head2 Changes to Existing Diagnostics
4c793fe3 594
8f97a47a 595XXX Changes (i.e. rewording) of diagnostic messages go here
0c692eed 596
ee0887a9 597=over 4
0c692eed
FR
598
599=item *
600
8f97a47a 601XXX
4c793fe3
FR
602
603=back
604
8f97a47a 605=head1 Utility Changes
810f3b7c 606
8f97a47a
TM
607XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
608here. Most of these are built within the directories F<utils> and F<x2p>.
a9e68e41 609
8f97a47a
TM
610[ List utility changes as a =head3 entry for each utility and =item
611entries for each change
612Use L<XXX> with program names to get proper documentation linking. ]
a9e68e41 613
deabda19 614=head3 L<ptargrep>
85318b69 615
ee0887a9 616=over 4
80b6a949 617
e2babdfb
FR
618=item *
619
deabda19
CBW
620L<ptargrep> is a utility to apply pattern matching to the contents of files
621in a tar archive. It comes with C<Archive::Tar>.
9ae8c3d9 622
ee0887a9 623=back
e2babdfb 624
8f97a47a 625=head1 Configuration and Compilation
e2babdfb 626
8f97a47a
TM
627XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
628go here. Any other changes to the Perl build process should be listed here.
629However, any platform-specific changes should be listed in the
630L</Platform Support> section, instead.
346e4e56 631
8f97a47a 632[ List changes as a =item entry ].
78846812 633
8f97a47a 634=over 4
e54f3f30
FC
635
636=item *
637
8f97a47a 638XXX
e54f3f30 639
8f97a47a 640=back
a5763045 641
8f97a47a 642=head1 Testing
5a9a79a4 643
8f97a47a
TM
644XXX Any significant changes to the testing of a freshly built perl should be
645listed here. Changes which create B<new> files in F<t/> go here as do any
646large changes to the testing harness (e.g. when parallel testing was added).
647Changes to existing files in F<t/> aren't worth summarising, although the bugs
648that they represent may be covered elsewhere.
5a9a79a4 649
8f97a47a 650[ List each test improvement as a =item entry ]
a7e93501 651
8f97a47a 652=over 4
a7e93501
FC
653
654=item *
655
a9fd1744
FC
656The new F<t/mro/isa_aliases.t> has been added, which tests that
657C<*Foo::ISA = *Bar::ISA> works properly.
658
659=item *
660
15bc3b4f
FC
661F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible
662at the Perl level via C<mro::get_isarev>) is updated properly.
663
a9fd1744 664=item *
15bc3b4f
FC
665
666F<t/run/switchd-78586.t> has been added, which tests that
667L<[perl #78586]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78586>
668has been fixed (related to line numbers in the debbuger).
a7e93501 669
8f97a47a 670=back
a7e93501 671
8f97a47a 672=head1 Platform Support
a7e93501 673
8f97a47a 674XXX Any changes to platform support should be listed in the sections below.
a7e93501 675
8f97a47a
TM
676[ Within the sections, list each platform as a =item entry with specific
677changes as paragraphs below it. ]
a7e93501 678
8f97a47a 679=head2 New Platforms
d4a59e54 680
8f97a47a
TM
681XXX List any platforms that this version of perl compiles on, that previous
682versions did not. These will either be enabled by new files in the F<hints/>
683directories, or new subdirectories and F<README> files at the top level of the
684source tree.
d4a59e54 685
8f97a47a 686=over 4
dc08898c 687
8f97a47a 688=item XXX-some-platform
dc08898c 689
8f97a47a 690XXX
dc08898c 691
8f97a47a 692=back
6904a83f 693
8f97a47a 694=head2 Discontinued Platforms
6904a83f 695
8f97a47a 696XXX List any platforms that this version of perl no longer compiles on.
6904a83f 697
8f97a47a 698=over 4
cffb3698 699
8f97a47a 700=item XXX-some-platform
ab4c2c27 701
8f97a47a 702XXX
ab4c2c27 703
8f97a47a 704=back
be1cc451 705
8f97a47a 706=head2 Platform-Specific Notes
be1cc451 707
8f97a47a
TM
708XXX List any changes for specific platforms. This could include configuration
709and compilation changes or changes in portability/compatibility. However,
710changes within modules for platforms should generally be listed in the
711L</Modules and Pragmata> section.
b20c4ee1 712
8f97a47a 713=over 4
b20c4ee1 714
b293762b 715=item Windows
afa74577 716
b293762b
FC
717Directory handles are now properly cloned when threads are created. In perl
7185.13.6, child threads simply stopped inheriting directory handles. In
719previous versions, threads would share handles, resulting in crashes.
afa74577 720
360f7568
CBW
721Building with Visual C++ 2010 is now supported.
722
cd67cda5
CB
723=item VMS
724
725Record-oriented files (record format variable or variable wih fixed control)
726opened for write by the perlio layer will now be line buffered to prevent the
727introduction of spurious line breaks whenever the perlio buffer fills up.
728
8f97a47a 729=back
c8bbf675 730
8f97a47a 731=head1 Internal Changes
c8bbf675 732
8f97a47a
TM
733XXX Changes which affect the interface available to C<XS> code go here.
734Other significant internal changes for future core maintainers should
735be noted as well.
07d5f7aa 736
8f97a47a 737[ List each test improvement as a =item entry ]
07d5f7aa 738
8f97a47a 739=over 4
07d5f7aa 740
9ae8c3d9
FC
741=item *
742
b7bd32cc
FC
743C<lex_start> has been added to the API, but is considered experimental.
744
745=item *
746
747A new C<parse_block> function has been added to the API
748L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>.
749
750=item *
751
c678e617 752A new, experimental API has been added for accessing the internal
b7bd32cc
FC
753structure that Perl uses for C<%^H>. See the functions beginning with
754C<cophh_> in L<perlapi>.
9ae8c3d9 755
a5e71717
FC
756=item *
757
758A stash can now have a list of effective names in addition to its usual
8ff01ef0
FC
759name. The first effective name can be accessed via the C<HvENAME> macro,
760which is now the recommended name to use in MRO linearisations (C<HvNAME>
761being a fallback if there is no C<HvENAME>).
762
763These names are added and deleted via C<hv_ename_add> and
764C<hv_ename_delete>. These two functions are I<not> part of the API.
a5e71717 765
b293762b
FC
766=item *
767
768The way the parser handles labels has been cleaned up and refactored. As a
769result, the C<newFOROP()> constructor function no longer takes a parameter
770stating what label is to go in the state op.
771
772=item *
773
774The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line
775number as a parameter.
776
777=item *
778
779A new C<parse_barestmt()> function has been added, for parsing a statement
780without a label.
781
782=item *
783
784A new C<parse_label()> function has been added, that parses a statement
46c4051f 785label, separate from statements.
b293762b
FC
786
787=item *
788
789The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()>
790has been added to replace assignment to C<CvSTASH()>. This is to ensure
791that backreferences are handled properly. These macros are not part of the
792API.
793
794=item *
795
796The C<op_scope()> and C<op_lvalue()> functions have been added to the API,
797but are considered experimental.
798
8f97a47a 799=back
825563b9 800
8f97a47a 801=head1 Selected Bug Fixes
825563b9 802
8f97a47a
TM
803XXX Important bug fixes in the core language are summarised here.
804Bug fixes in files in F<ext/> and F<lib/> are best summarised in
805L</Modules and Pragmata>.
825563b9 806
8f97a47a 807[ List each fix as a =item entry ]
825563b9 808
8f97a47a 809=over 4
825563b9 810
020fe755
AB
811=item *
812
b7bd32cc
FC
813The C<parse_stmt> C function added in earlier in the 5.13.x series has been
814fixed to work with statements ending with C<}>
815L<[perl #78222]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78222>.
816
817=item *
818
819The C<parse_fullstmt> C function added in 5.13.5 has been fixed to work
820when called while an expression is being parsed.
821
822=item *
823
824Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match
825themselves if the string happened to be UTF8-encoded internally, the
826regular expression was not, and the character in the regular expression was
827inside a repeated group (e.g.,
c678e617 828C<Encode::decode_utf8("\303\200") =~ /(\xc0)+/>)
b7bd32cc
FC
829L<[perl #78464]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78464>.
830
831=item *
832
833The C<(?d)> regular expression construct now overrides a previous C<(?u)>
834or C<use feature "unicode_string">
835L<[perl #78508]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78508>.
836
837=item *
838
839A memory leak in C<do "file">, introduced in perl 5.13.6, has been fixed
840L<[perl #78488]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78488>.
020fe755 841
b293762b
FC
842=item *
843
844Various bugs related to typeglob dereferencing have been fixed. See
845L</Dereferencing typeglobs>, above.
846
847=item *
848
849The C<SvPVbyte> function available to XS modules now calls magic before
850downgrading the SV, to avoid warnings about wide characters
851L<[perl #72398]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72398>.
852
853=item *
854
855The C<=> operator used to ignore magic (e.g., tie methods) on its
856right-hand side if the scalar happened to hold a typeglob. This could
857happen if a typeglob was the last thing returned from or assigned to a tied
858scalar
859L<[perl #77498]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77498>.
860
861=item *
862
863C<sprintf> was ignoring locales when called with constant arguments
864L<[perl #78632]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78632>.
865
9b7c43ba
KW
866=item *
867
868A non-ASCII character in the Latin-1 range could match both a Posix
869class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is
870now fixed for regular expressions compiled under the C<"u"> modifier.
871See L</C<use feature "unicode_strings"> now applies to more regex matching>.
872L<[perl #18281]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=18281>.
873
8ff01ef0
FC
874=item *
875
876Concatenating long strings under C<use encoding> no longer causes perl to
877crash
878L<[perl #78674]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78674>.
879
880=item *
881
e55e5103
FC
882Typeglob assignments would crash if the glob's stash no longer existed, so
883long as the glob assigned to was named 'ISA' or the glob on either side of
884the assignment contained a subroutine.
8ff01ef0
FC
885
886=item *
887
888Calling C<< ->import >> on a class lacking an import method could corrupt the stack result in strange behaviour. For instance,
889
890 push @a, "foo", $b = bar->import;
891
892would assign 'foo' to C<$b>
893L<[perl #63790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=63790>.
894
895=item *
896
897Creating an alias to a package when that package had been detached from the
898symbol table would result in corrupted isa caches
899L<[perl #77358]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77358>.
900
901=item *
902
903C<.=> followed by C<< <> >> or C<readline> would leak memory if C<$/>
904contained characters beyond the octet range and the scalar assigned to
905happened to be encoded as UTF8 internally
906L<[perl #72246]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=72246>.
907
908=item *
909
910The C<recv> function could crash when called with the MSG_TRUNC flag
911L<[perl #75082]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75082>.
912
9e2ac5d4
FC
913=item *
914
915Evaluating a simple glob (like C<*a>) was calling get-magic on the glob,
916even when its contents were not being used
917L<[perl #78580]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78580>.
918
919This bug was introduced in 5.13.2 and did not affect earlier perl versions.
920
15bc3b4f
FC
921=item *
922
923Matching a Unicode character against an alternation containing characters
924that happened to match continuation bytes in the former's UTF8
925representation (C<qq{\x{30ab}} =~ /\xab|\xa9/>) would cause erroneous
926warnings
927L<[perl #70998]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=70998>.
928
929=item *
930
931C<s///r> (added in 5.13.2) no longer leaks.
932
ca60ecf2
FC
933=item *
934
935The trie optimisation was not taking empty groups into account, preventing
936'foo' from matching C</\A(?:(?:)foo|bar|zot)\z/>
937L<[perl #78356]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78356>.
938
939=item *
940
941A pattern containing a C<+> inside a lookahead would sometimes cause an
942incorrect match failure in a global match (e.g., C</(?=(\S+))/g>)
943L<[perl #68564]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=68564>.
944
945=item *
946
947Iterating with C<foreach> over an array returned by an lvalue sub now works
948L<[perl #23790]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=23790>.
949
950=item *
951
952C<$@> is now localised during calls to C<binmode> to prevent action at a
953distance
954L<[perl #78844]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=78844>.
955
956=item *
957
958C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now
959updated properly when packages are deleted or removed from the C<@ISA> of
960other classes. This allows many packages to be created and deleted without
961causing a memory leak
962L<[perl #75176]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75176>.
963
964=item *
965
518a9858
FC
966C<undef *Foo::> and C<undef *Foo::ISA> and C<delete $package::{ISA}>
967used not to update the internal isa caches if the
968stash or C<@ISA> array had a reference elsewhere. In
ca60ecf2 969fact, C<undef *Foo::ISA> would stop a new C<@Foo::ISA> array from updating
7683cad7 970caches.
ca60ecf2 971
38dbd939
FC
972=item *
973
974C<@ISA> arrays can now be shared between classes via
975C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA>
976L<[perl #77238]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=77238>.
977
978=item *
979
980The parser no longer hangs when encountering certain Unicode characters,
981such as U+387
982L<[perl #74022]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=74022>.
983
984=item *
985
b4bbb350
FC
986C<formline> no longer crashes when passed a tainted format picture. It also
987taints C<$^A> now if its arguments are tainted
38dbd939
FC
988L<[perl #79138]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=79138>.
989
6d07abef
CBW
990=item *
991
992A signal handler called within a signal handler could cause leaks or
993double-frees. Now fixed.
994L<[perl #76248]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=76248>.
995
8f97a47a 996=back
020fe755 997
8f97a47a 998=head1 Known Problems
020fe755 999
8f97a47a
TM
1000XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
1001tests that had to be C<TODO>ed for the release would be noted here, unless
1002they were specific to a particular platform (see below).
62ff64ce 1003
8f97a47a
TM
1004This is a list of some significant unfixed bugs, which are regressions
1005from either 5.XXX.XXX or 5.XXX.XXX.
62ff64ce 1006
8f97a47a 1007[ List each fix as a =item entry ]
62ff64ce 1008
8f97a47a 1009=over 4
62ff64ce
FC
1010
1011=item *
1012
8f97a47a 1013XXX
62ff64ce 1014
4c793fe3
FR
1015=back
1016
8f97a47a 1017=head1 Obituary
405fd67e 1018
8f97a47a
TM
1019XXX If any significant core contributor has died, we've added a short obituary
1020here.
405fd67e 1021
dd56ec38
DG
1022Randy Kobes, creator of the kobesearch alternative to search.cpan.org and
1023contributor/maintainer to several core Perl toolchain modules, passed away
67fa491b 1024on September 18, 2010 after a battle with lung cancer. His contributions
dd56ec38
DG
1025to the Perl community will be missed.
1026
ee0887a9 1027=head1 Acknowledgements
0195fb5f 1028
8f97a47a 1029XXX The list of people to thank goes here.
4c793fe3
FR
1030
1031=head1 Reporting Bugs
1032
1033If you find what you think is a bug, you might check the articles
1034recently posted to the comp.lang.perl.misc newsgroup and the perl
1035bug database at http://rt.perl.org/perlbug/ . There may also be
1036information at http://www.perl.org/ , the Perl Home Page.
1037
1038If you believe you have an unreported bug, please run the B<perlbug>
1039program included with your release. Be sure to trim your bug down
1040to a tiny but sufficient test case. Your bug report, along with the
1041output of C<perl -V>, will be sent off to perlbug@perl.org to be
1042analysed by the Perl porting team.
1043
1044If the bug you are reporting has security implications, which make it
1045inappropriate to send to a publicly archived mailing list, then please send
ee0887a9 1046it to perl5-security-report@perl.org. This points to a closed subscription
4c793fe3
FR
1047unarchived mailing list, which includes all the core committers, who be able
1048to help assess the impact of issues, figure out a resolution, and help
1049co-ordinate the release of patches to mitigate or fix the problem across all
ee0887a9 1050platforms on which Perl is supported. Please only use this address for
4c793fe3
FR
1051security issues in the Perl core, not for modules independently
1052distributed on CPAN.
1053
1054=head1 SEE ALSO
1055
1056The F<Changes> file for an explanation of how to view exhaustive details
1057on what changed.
1058
1059The F<INSTALL> file for how to build Perl.
1060
1061The F<README> file for general stuff.
1062
1063The F<Artistic> and F<Copying> files for copyright information.
1064
1065=cut