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