This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: Cull uninteresting upgrades from the module list
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
5076a392 5perldelta - what is new for perl v5.14.0
c71a852f 6
5076a392
FC
7=head1 DESCRIPTION
8
9This document describes differences between the 5.12.0 release and
10the 5.14.0 release.
11
12Some of the bug fixes in this release have been backported to subsequent
13releases of 5.12.x. Those are indicated with the 5.12.x version in
14parentheses.
15
16XXX Go through the perl512*delta files and do that.
17
18=head1 Notice
19
20XXX Any important notices here
21
22=head1 Core Enhancements
23
1f539a1a 24=head2 Unicode
5076a392 25
1f539a1a 26=head3 Unicode Version 6.0 is now supported (mostly)
5076a392 27
1f539a1a
FC
28Perl comes with the Unicode 6.0 data base updated with
29L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>,
30with one exception noted below.
31See L<http://unicode.org/versions/Unicode6.0.0> for details on the new
32release. Perl does not support any Unicode provisional properties,
33including the new ones for this release, but their database files are
34packaged with Perl.
5076a392 35
1f539a1a 36Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514,
e1b1739f 37which is a symbol that looks like a bell, and is used in Japanese cell
1f539a1a
FC
38phones. This conflicts with the long-standing Perl usage of having
39C<BELL> mean the ASCII C<BEL> character, U+0007. In Perl 5.14,
40C<\N{BELL}> will continue to mean U+0007, but its use will generate a
41deprecated warning message, unless such warnings are turned off. The
42new name for U+0007 in Perl will be C<ALERT>, which corresponds nicely
43with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> will
44mean U+0007, with no warning given. The character at U+1F514 will not
45have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan
46is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code
47that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>,
48C<\N{BEL}>, or C<"\a"> instead.
5076a392 49
1f539a1a 50=head3 Full functionality for C<use feature 'unicode_strings'>
5076a392 51
1f539a1a
FC
52This release provides full functionality for C<use feature
53'unicode_strings'>. Under its scope, all string operations executed and
54regular expressions compiled (even if executed outside its scope) have
55Unicode semantics. See L<feature>.
5076a392 56
1f539a1a
FC
57This feature avoids most forms of the "Unicode Bug" (See
58L<perlunicode/The "Unicode Bug"> for details.) If there is a
59possibility that your code will process Unicode strings, you are
60B<strongly> encouraged to use this subpragma to avoid nasty surprises.
5076a392 61
1f539a1a 62=head3 C<\N{I<name>}> and C<charnames> enhancements
5076a392 63
1f539a1a 64=over
5076a392 65
1f539a1a 66=item *
5076a392
FC
67
68C<\N{}> and C<charnames::vianame> now know about the abbreviated
e1b1739f
FC
69character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., all
70the customary abbreviations for the C0 and C1 control characters (such as
71ACK, BEL, CAN, etc.), and a few new variants of some C1 full names that
72are in common usage.
5076a392 73
1f539a1a
FC
74=item *
75
959ad7d5
FC
76Unicode has a number of named character sequences, in which particular sequences
77of code points are given names. C<\N{...}> now recognizes these.
78
1f539a1a
FC
79=item *
80
959ad7d5
FC
81C<\N{}>, C<charnames::vianame>, C<charnames::viacode> now know about every
82character in Unicode. Previously, they didn't know about the Hangul syllables
83nor a number of CJK (Chinese/Japanese/Korean) characters.
84
1f539a1a
FC
85=item *
86
5076a392
FC
87In the past, it was ineffective to override one of Perl's abbreviations
88with your own custom alias. Now it works.
89
1f539a1a
FC
90=item *
91
e1b1739f 92You can also create a custom alias of the ordinal of a
5076a392
FC
93character, known by C<\N{...}>, C<charnames::vianame()>, and
94C<charnames::viacode()>. Previously, an alias had to be to an official
95Unicode character name. This made it impossible to create an alias for
e1b1739f
FC
96a code point that had no name, such as those reserved for private
97use.
5076a392 98
1f539a1a
FC
99=item *
100
959ad7d5
FC
101A new function, C<charnames::string_vianame()>, has been added.
102This function is a run-time version of C<\N{...}>, returning the string
103of characters whose Unicode name is its parameter. It can handle
104Unicode named character sequences, whereas the pre-existing
105C<charnames::vianame()> cannot, as the latter returns a single code
106point.
107
1f539a1a
FC
108=back
109
5076a392
FC
110See L<charnames> for details on all these changes.
111
1f539a1a 112=head3 Any unsigned value can be encoded as a character
5076a392 113
1f539a1a
FC
114With this release, Perl is adopting a model that any unsigned value can
115be treated as a code point and encoded internally (as utf8) without
54c7bb16 116warnings - not just the code points that are legal in Unicode.
1f539a1a
FC
117However, unless utf8 warnings have been
118explicitly lexically turned off, outputting or performing a
119Unicode-defined operation (such as upper-casing) on such a code point
120will generate a warning. Attempting to input these using strict rules
121(such as with the C<:encoding('UTF-8')> layer) will continue to fail.
122Prior to this release the handling was very inconsistent, and incorrect
123in places. Also, the Unicode non-characters, some of which previously were
124erroneously considered illegal in places by Perl, contrary to the Unicode
125standard, are now always legal internally. But inputting or outputting
126them will work the same as for the non-legal Unicode code points, as the
127Unicode standard says they are illegal for "open interchange".
5076a392 128
1f539a1a 129=head3 New warnings categories for problematic (non-)Unicode code points.
5076a392 130
e1b1739f
FC
131Three new warnings subcategories of "utf8" have been added. These
132allow you to turn off some "utf8" warnings, while allowing
133others warnings to remain on. The three categories are:
1f539a1a
FC
134C<surrogate> when UTF-16 surrogates are encountered;
135C<nonchar> when Unicode non-character code points are encountered;
136and C<non_unicode> when code points that are above the legal Unicode
137maximum of 0x10FFFF are encountered.
5076a392 138
1f539a1a 139=head2 Regular Expressions
5076a392 140
1f539a1a 141=head3 C<(?^...)> construct to signify default modifiers
5076a392 142
e1b1739f
FC
143An ASCII caret (also called a "circumflex accent") C<"^">
144immediately following a C<"(?"> in a regular expression
145now means that the subexpression does not inherit the
146surrounding modifiers such as C</i>, but reverts to the
5076a392
FC
147Perl defaults. Any modifiers following the caret override the defaults.
148
149The stringification of regular expressions now uses this
150notation. E.g., before, C<qr/hlagh/i> would be stringified as
151C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>.
152
153The main purpose of this is to allow tests that rely on the
e1b1739f 154stringification not to have to change when new modifiers are added.
5076a392
FC
155See L<perlre/Extended Patterns>.
156
1f539a1a 157=head3 C</d>, C</l>, C</u>, C</a>, and C</aa> modifiers
5076a392 158
959ad7d5
FC
159Four new regular expression modifiers have been added. These are mutually
160exclusive; one only can be turned on at a time.
5076a392 161
959ad7d5 162The C</l> modifier says to compile the regular expression as if it were
5076a392
FC
163in the scope of C<use locale>, even if it is not.
164
959ad7d5 165The C</u> modifier says to compile the regular expression as if it were
5076a392
FC
166in the scope of a C<use feature "unicode_strings"> pragma.
167
e1b1739f 168The C</d> (default) modifier is used to override any C<use locale> and
5076a392
FC
169C<use feature "unicode_strings"> pragmas that are in effect at the time
170of compiling the regular expression.
171
959ad7d5
FC
172The C</a> regular expression modifier restricts C<\s>, C<\d> and C<\w> and
173the Posix (C<[[:posix:]]>) character classes to the ASCII range. The
174complements and C<\b> and C<\B> are correspondingly
175affected. Otherwise, C</a> behaves like the C</u> modifier, in that
e1b1739f 176case-insensitive matching uses Unicode semantics.
5076a392 177
959ad7d5
FC
178The C</aa> modifier is like C</a>, except that, in case-insensitive matching, no ASCII character will match a
179non-ASCII character. For example,
5076a392 180
959ad7d5 181 'k' =~ /\N{KELVIN SIGN}/ai
5076a392 182
959ad7d5 183will match; it won't under C</aa>.
5076a392 184
959ad7d5 185See L<perlre/Modifiers> for more detail.
5076a392 186
1f539a1a 187=head3 Non-destructive substitution
5076a392 188
1f539a1a
FC
189The substitution (C<s///>) and transliteration
190(C<y///>) operators now support an C</r> option that
191copies the input variable, carries out the substitution on
192the copy and returns the result. The original remains unmodified.
5076a392 193
1f539a1a
FC
194 my $old = 'cat';
195 my $new = $old =~ s/cat/dog/r;
196 # $old is 'cat' and $new is 'dog'
5076a392 197
1f539a1a 198This is particularly useful with C<map>. See L<perlop> for more examples.
5076a392 199
1f539a1a 200=head3 Reentrant regular expression engine
5076a392 201
1f539a1a
FC
202It is now safe to use regular expressions within C<(?{...})> and
203C<(??{...})> code blocks inside regular expressions.
5076a392 204
1f539a1a 205These block are still experimental, however, and still have problems with
e1b1739f 206lexical (C<my>) variables and abnormal exiting.
5076a392 207
1f539a1a 208=head3 C<use re '/flags';>
5076a392
FC
209
210The C<re> pragma now has the ability to turn on regular expression flags
211till the end of the lexical scope:
212
213 use re '/x';
214 "foo" =~ / (.+) /; # /x implied
215
216See L<re/"'/flags' mode"> for details.
217
1f539a1a 218=head3 \o{...} for octals
5076a392 219
e1b1739f
FC
220There is a new octal escape sequence, C<"\o">, in double-quote-like
221contexts. This construct allows large octal ordinals beyond the
1f539a1a
FC
222current max of 0777 to be represented. It also allows you to specify a
223character in octal which can safely be concatenated with other regex
224snippets and which won't be confused with being a backreference to
225a regex capture group. See L<perlre/Capture groups>.
226
227=head3 Add C<\p{Titlecase}> as a synonym for C<\p{Title}>
228
229This synonym is added for symmetry with the Unicode property names
230C<\p{Uppercase}> and C<\p{Lowercase}>.
5076a392 231
1f539a1a
FC
232=head3 Regular expression debugging output improvement
233
234Regular expression debugging output (turned on by C<use re 'debug';>) now
235uses hexadecimal when escaping non-ASCII characters, instead of octal.
236
237=head2 Syntactical Enhancements
238
239=head3 Array and hash container functions accept references
5076a392
FC
240
241All built-in functions that operate directly on array or hash
242containers now also accept hard references to arrays or hashes:
243
244 |----------------------------+---------------------------|
245 | Traditional syntax | Terse syntax |
246 |----------------------------+---------------------------|
247 | push @$arrayref, @stuff | push $arrayref, @stuff |
248 | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
249 | pop @$arrayref | pop $arrayref |
250 | shift @$arrayref | shift $arrayref |
251 | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 |
252 | keys %$hashref | keys $hashref |
253 | keys @$arrayref | keys $arrayref |
254 | values %$hashref | values $hashref |
255 | values @$arrayref | values $arrayref |
256 | ($k,$v) = each %$hashref | ($k,$v) = each $hashref |
257 | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref |
258 |----------------------------+---------------------------|
259
260This allows these built-in functions to act on long dereferencing chains
261or on the return value of subroutines without needing to wrap them in
262C<@{}> or C<%{}>:
263
264 push @{$obj->tags}, $new_tag; # old way
265 push $obj->tags, $new_tag; # new way
266
267 for ( keys %{$hoh->{genres}{artists}} ) {...} # old way
268 for ( keys $hoh->{genres}{artists} ) {...} # new way
269
270For C<push>, C<unshift> and C<splice>, the reference will auto-vivify
271if it is not defined, just as if it were wrapped with C<@{}>.
272
5076a392
FC
273For C<keys>, C<values>, C<each>, when overloaded dereferencing is
274present, the overloaded dereference is used instead of dereferencing the
e1b1739f
FC
275underlying reftype. Warnings are issued about assumptions made in
276ambiguous cases.
5076a392 277
1f539a1a
FC
278=head3 Single term prototype
279
280The C<+> prototype is a special alternative to C<$> that will act like
281C<\[@%]> when given a literal array or hash variable, but will otherwise
e1b1739f 282force scalar context on the argument. See L<perlsub/Prototypes>.
1f539a1a
FC
283
284=head3 C<package> block syntax
285
286A package declaration can now contain a code block, in which case the
287declaration is in scope only inside that block. So C<package Foo { ... }>
288is precisely equivalent to C<{ package Foo; ... }>. It also works with
289a version number in the declaration, as in C<package Foo 1.2 { ... }>.
e1b1739f 290See L<perlfunc>.
1f539a1a
FC
291
292=head3 Statement labels can appear in more places
293
294Statement labels can now occur before any type of statement or declaration,
295such as C<package>.
296
297=head3 Stacked labels
298
299Multiple statement labels can now appear before a single statement.
300
301=head3 Uppercase X/B allowed in hexadecimal/binary literals
302
303Literals may now use either upper case C<0X...> or C<0B...> prefixes,
304in addition to the already supported C<0x...> and C<0b...>
e1b1739f 305syntax [perl #76296].
1f539a1a
FC
306
307C, Ruby, Python and PHP already supported this syntax, and it makes
308Perl more internally consistent. A round-trip with C<eval sprintf
e1b1739f 309"%#X", 0x10> now returns C<16>, the way C<eval sprintf "%#x", 0x10> does.
1f539a1a
FC
310
311=head2 Exception Handling
312
313Several changes have been made to the way C<die>, C<warn>, and C<$@>
314behave, in order to make them more reliable and consistent.
315
316When an exception is thrown inside an C<eval>, the exception is no
317longer at risk of being clobbered by code running during unwinding
318(e.g., destructors). Previously, the exception was written into C<$@>
319early in the throwing process, and would be overwritten if C<eval> was
320used internally in the destructor for an object that had to be freed
321while exiting from the outer C<eval>. Now the exception is written
322into C<$@> last thing before exiting the outer C<eval>, so the code
323running immediately thereafter can rely on the value in C<$@> correctly
324corresponding to that C<eval>. (C<$@> is still also set before exiting the
325C<eval>, for the sake of destructors that rely on this.)
326
327Likewise, a C<local $@> inside an C<eval> will no longer clobber any
328exception thrown in its scope. Previously, the restoration of C<$@> upon
329unwinding would overwrite any exception being thrown. Now the exception
330gets to the C<eval> anyway. So C<local $@> is safe before a C<die>.
331
332Exceptions thrown from object destructors no longer modify the C<$@>
333of the surrounding context. (If the surrounding context was exception
334unwinding, this used to be another way to clobber the exception being
335thrown.) Previously such an exception was
336sometimes emitted as a warning, and then either was
337string-appended to the surrounding C<$@> or completely replaced the
338surrounding C<$@>, depending on whether that exception and the surrounding
339C<$@> were strings or objects. Now, an exception in this situation is
340always emitted as a warning, leaving the surrounding C<$@> untouched.
341In addition to object destructors, this also affects any function call
342performed by XS code using the C<G_KEEPERR> flag.
343
344Warnings for C<warn> can now be objects, in the same way as exceptions
345for C<die>. If an object-based warning gets the default handling,
346of writing to standard error, it is stringified as
347before, with the file and line number appended. But
348a C<$SIG{__WARN__}> handler will now receive an
349object-based warning as an object, where previously it was passed the
350result of stringifying the object.
351
352=head2 Other Enhancements
353
354=head3 Assignment to C<$0> sets the legacy process name with C<prctl()> on Linux
355
356On Linux the legacy process name will be set with L<prctl(2)>, in
357addition to altering the POSIX name via C<argv[0]> as perl has done
358since version 4.000. Now system utilities that read the legacy process
359name such as ps, top and killall will recognize the name you set when
360assigning to C<$0>. The string you supply will be cut off at 16 bytes,
361this is a limitation imposed by Linux.
362
363=head3 C<srand()> now returns the seed
364
e1b1739f
FC
365This allows programs that need to have repeatable results not to have to come
366up with their own seed-generating mechanism. Instead, they can use C<srand()>
367and stash the return value for future use. Typical is a test program which
1f539a1a 368has too many combinations to test comprehensively in the time available to it
e1b1739f 369each run. It can test a random subset each time and, should there be a failure,
1f539a1a 370log the seed used for that run so that it can later be used to reproduce the
e1b1739f 371same results.
1f539a1a
FC
372
373=head3 printf-like functions understand post-1980 size modifiers
374
375Perl's printf and sprintf operators, and Perl's internal printf replacement
376function, now understand the C90 size modifiers "hh" (C<char>), "z"
377(C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99
378compiler, Perl now understands the size modifier "j" (C<intmax_t>).
379
380So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'.
381
382=head3 New global variable C<${^GLOBAL_PHASE}>
5076a392
FC
383
384A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow
385introspection of the current phase of the perl interpreter. It's explained in
386detail in L<perlvar/"${^GLOBAL_PHASE}"> and
387L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">.
388
1f539a1a 389=head3 C<-d:-foo> calls C<Devel::foo::unimport>
5076a392
FC
390
391The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
392equivalent to C<-MDevel::foo=bar>, which expands
393internally to C<use Devel::foo 'bar';>.
394F<perl> now allows prefixing the module name with C<->, with the same
395semantics as C<-M>, I<i.e.>
396
397=over 4
398
399=item C<-d:-foo>
400
401Equivalent to C<-M-Devel::foo>, expands to
402C<no Devel::foo;>, calls C<< Devel::foo->unimport() >>
403if the method exists.
404
405=item C<-d:-foo=bar>
406
407Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>,
408calls C<< Devel::foo->unimport('bar') >> if the method exists.
409
410=back
411
e1b1739f 412This is particularly useful for suppressing the default actions of a
5076a392
FC
413C<Devel::*> module's C<import> method whilst still loading it for debugging.
414
1f539a1a 415=head3 Filehandle method calls load L<IO::File> on demand
5076a392
FC
416
417When a method call on a filehandle would die because the method cannot
418be resolved, and L<IO::File> has not been loaded, Perl now loads L<IO::File>
419via C<require> and attempts method resolution again:
420
421 open my $fh, ">", $file;
422 $fh->binmode(":raw"); # loads IO::File and succeeds
423
424This also works for globs like STDOUT, STDERR and STDIN:
425
426 STDOUT->autoflush(1);
427
428Because this on-demand load only happens if method resolution fails, the
429legacy approach of manually loading an L<IO::File> parent class for partial
430method support still works as expected:
431
432 use IO::Handle;
433 open my $fh, ">", $file;
434 $fh->autoflush(1); # IO::File not loaded
435
1f539a1a 436=head3 DTrace probes now include package name
5076a392
FC
437
438The DTrace probes now include an additional argument (C<arg3>) which contains
439the package the subroutine being entered or left was compiled in.
440
441For example using the following DTrace script:
442
443 perl$target:::sub-entry
444 {
445 printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
446 }
447
448and then running:
449
450 perl -e'sub test { }; test'
451
452DTrace will print:
453
454 main::test
455
9378886b
FC
456=head2 New C APIs
457
aa81da68
FC
458=head3 CLONE_PARAMS structure added to ease correct thread creation
459
460Modules that create threads should now create C<CLONE_PARAMS> structures
461by calling the new function C<Perl_clone_params_new()>, and free them with
462C<Perl_clone_params_del()>. This will ensure compatibility with any future
463changes to the internals of the C<CLONE_PARAMS> structure layout, and that
464it is correctly allocated and initialised.
465
466=head3 API function to parse statements
467
468The C<parse_fullstmt> function has been added to allow parsing of a single
469complete Perl statement. See L<perlapi> for details.
470
471=head3 API functions for accessing the runtime hinthash
472
473A new C API for introspecting the hinthash C<%^H> at runtime has been added.
474See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>,
475C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details.
476
477=head3 C interface to C<caller()>
478
479The C<caller_cx> function has been added as an XSUB-writer's equivalent of
480C<caller()>. See L<perlapi> for details.
481
482=head3 Custom per-subroutine check hooks
483
484XS code in an extension module can now annotate a subroutine (whether
485implemented in XS or in Perl) so that nominated XS code will be called
486at compile time (specifically as part of op checking) to change the op
487tree of that subroutine. The compile-time check function (supplied by
488the extension module) can implement argument processing that can't be
489expressed as a prototype, generate customised compile-time warnings,
490perform constant folding for a pure function, inline a subroutine
491consisting of sufficiently simple ops, replace the whole call with a
492custom op, and so on. This was previously all possible by hooking the
493C<entersub> op checker, but the new mechanism makes it easy to tie the
494hook to a specific subroutine. See L<perlapi/cv_set_call_checker>.
495
496To help in writing custom check hooks, several subtasks within standard
497C<entersub> op checking have been separated out and exposed in the API.
498
499=head3 Improved support for custom OPs
500
501Custom ops can now be registered with the new C<custom_op_register> C
502function and the C<XOP> structure. This will make it easier to add new
503properties of custom ops in the future. Two new properties have been added
504already, C<xop_class> and C<xop_peep>.
505
506C<xop_class> is one of the OA_*OP constants, and allows L<B> and other
507introspection mechanisms to work with custom ops that aren't BASEOPs.
508C<xop_peep> is a pointer to a function that will be called for ops of this
509type from C<Perl_rpeep>.
510
511See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
512detail.
513
514The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
515supported but discouraged.
516
517=head3 Return value of C<delete $+{...}>
518
519Custom regular expression engines can now determine the return value of
520C<delete> on an entry of C<%+> or C<%->.
521
522XXX Mention the actual API.
9378886b 523
5076a392
FC
524=head1 Security
525
948b8455 526=head2 User-defined regular expression properties
5076a392
FC
527
528In L<perlunicode/"User-Defined Character Properties">, it says you can
529create custom properties by defining subroutines whose names begin with
948b8455
FC
530"In" or "Is". However, Perl did not actually enforce that naming
531restriction, so \p{foo::bar} could call foo::bar() if it existed. Now this
532convention has been enforced.
5076a392 533
948b8455
FC
534Also, Perl no longer allows a tainted regular expression to invoke a
535user-defined. It simply dies instead [perl #82616].
5076a392
FC
536
537=head1 Incompatible Changes
538
61752d82
FC
539Perl 5.14.0 is not binary-compatible with any previous stable release.
540
541=head2 Regular Expressions and String Escapes
542
543=head3 C<\cI<X>>
5076a392
FC
544
545The backslash-c construct was designed as a way of specifying
546non-printable characters, but there were no restrictions (on ASCII
547platforms) on what the character following the C<c> could be. Now, that
548character must be one of the ASCII characters.
549
54c7bb16 550=head3 \400-\777
5076a392 551
54c7bb16 552Use of C<\400>-C<\777> in regexes in certain circumstances has given
5076a392
FC
553different, anomalous behavior than their use in all other
554double-quote-like contexts. Since 5.10.1, a deprecated warning message
555has been raised when this happens. Now, all double-quote-like contexts
556have the same behavior, namely to be equivalent to C<\x{100}> -
557C<\x{1FF}>, with no deprecation warning. Use of these values in the
558command line option C<"-0"> retains the current meaning to slurp input
559files whole; previously, this was documented only for C<"-0777">. It is
560recommended, however, because of various ambiguities, to use the new
561C<\o{...}> construct to represent characters in octal.
5076a392 562
61752d82 563=head3 Most C<\p{}> properties are now immune to case-insensitive matching
5076a392 564
61752d82
FC
565For most Unicode properties, it doesn't make sense to have them match
566differently under C</i> case-insensitive matching than not. And doing
567so leads to unexpected results and potential security holes. For
568example
5076a392 569
61752d82 570 m/\p{ASCII_Hex_Digit}+/i
5076a392 571
61752d82
FC
572could previously match non-ASCII characters because of the Unicode
573matching rules. There were a number of bugs in this feature until an
574earlier release in the 5.13 series. Now this release reverts, and
575removes the feature completely except for the few properties where
576people have come to expect it, namely the ones where casing is an
577integral part of their functionality, such as C<m/\p{Uppercase}/i> and
578C<m/\p{Lowercase}/i>, both of which match the exact same code points,
579namely those matched by C<m/\p{Cased}/i>. Details are in
580L<perlrecharclass/Unicode Properties>.
5076a392 581
61752d82
FC
582XXX The mention of ‘until an earlier release in the 5.13 series’ needs to
583change, but I do not fully understand what happened here.
5076a392 584
61752d82
FC
585User-defined property handlers that need to match differently under
586C</i> must change to read the new boolean parameter passed to it which is
587non-zero if case-insensitive matching is in effect or 0 otherwise. See
588L<perluniprops/User-Defined Character Properties>.
5076a392 589
61752d82 590=head3 \p{} implies Unicode semantics
5076a392 591
61752d82
FC
592Now, a Unicode property match specified in the pattern will indicate
593that the pattern is meant for matching according to Unicode rules, the way
594C<\x{}> does.
5076a392 595
61752d82 596=head3 Regular expressions retain their localeness when interpolated
5076a392 597
61752d82
FC
598Regular expressions compiled under C<"use locale"> now retain this when
599interpolated into a new regular expression compiled outside a
600C<"use locale">, and vice-versa.
5076a392 601
61752d82
FC
602Previously, a regular expression interpolated into another one inherited
603the localeness of the surrounding one, losing whatever state it
604originally had. This is considered a bug fix, but may trip up code that
605has come to rely on the incorrect behavior.
5076a392 606
61752d82 607=head3 Stringification of regexes has changed
5076a392
FC
608
609Default regular expression modifiers are now notated by using
610C<(?^...)>. Code relying on the old stringification will fail. The
611purpose of this is so that when new modifiers are added, such code will
612not have to change (after this one time), as the stringification will
613automatically incorporate the new modifiers.
614
615Code that needs to work properly with both old- and new-style regexes
f318e2e6 616can avoid the whole issue by using (for Perls since 5.9.5; see L<re>):
5076a392
FC
617
618 use re qw(regexp_pattern);
619 my ($pat, $mods) = regexp_pattern($re_ref);
620
5076a392
FC
621If the actual stringification is important, or older Perls need to be
622supported, you can use something like the following:
623
624 # Accept both old and new-style stringification
625 my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
626
627And then use C<$modifiers> instead of C<-xism>.
628
61752d82 629=head3 Run-time code blocks in regular expressions inherit pragmata
5076a392 630
61752d82
FC
631Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not
632to inherit any pragmata (strict, warnings, etc.) if the regular expression
633was compiled at run time as happens in cases like these two:
5076a392 634
61752d82
FC
635 use re 'eval';
636 $foo =~ $bar; # when $bar contains (?{...})
637 $foo =~ /$bar(?{ $finished = 1 })/;
638
639This was a bug, which has now been fixed. But it has the potential to break
640any code that was relying on it.
5076a392 641
61752d82 642=head2 Stashes and Package Variables
5076a392 643
61752d82 644=head3 Localised tied hashes and arrays are no longed tied
5076a392 645
61752d82 646In the following:
5076a392 647
61752d82
FC
648 tie @a, ...;
649 {
650 local @a;
651 # here, @a is a now a new, untied array
652 }
653 # here, @a refers again to the old, tied array
5076a392 654
61752d82
FC
655The new local array used to be made tied too, which was fairly pointless,
656and has now been fixed. This fix could however potentially cause a change
657in behaviour of some code.
5076a392 658
61752d82 659=head3 Stashes are now always defined
5076a392 660
61752d82
FC
661C<defined %Foo::> now always returns true, even when no symbols have yet been
662defined in that package.
5076a392 663
61752d82
FC
664This is a side effect of removing a special case kludge in the tokeniser,
665added for 5.10.0, to hide side effects of changes to the internal storage of
666hashes that drastically reduce their memory usage overhead.
667
668Calling defined on a stash has been deprecated since 5.6.0, warned on
669lexicals since 5.6.0, and warned for stashes (and other package
670variables) since 5.12.0. C<defined %hash> has always exposed an
671implementation detail - emptying a hash by deleting all entries from it does
672not make C<defined %hash> false, hence C<defined %hash> is not valid code to
673determine whether an arbitrary hash is empty. Instead, use the behaviour
674that an empty C<%hash> always returns false in a scalar context.
675
676=head3 Dereferencing typeglobs
5076a392
FC
677
678If you assign a typeglob to a scalar variable:
679
680 $glob = *foo;
681
682the glob that is copied to C<$glob> is marked with a special flag
683indicating that the glob is just a copy. This allows subsequent assignments
684to C<$glob> to overwrite the glob. The original glob, however, is
685immutable.
686
687Many Perl operators did not distinguish between these two types of globs.
688This would result in strange behaviour in edge cases: C<untie $scalar>
689would do nothing if the last thing assigned to the scalar was a glob
690(because it treated it as C<untie *$scalar>, which unties a handle).
f318e2e6 691Assignment to a glob slot (e.g., C<*$glob = \@some_array>) would simply
5076a392
FC
692assign C<\@some_array> to C<$glob>.
693
694To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms)
695has been modified to make a new immutable glob if its operand is a glob
696copy. Various operators that make a distinction between globs and scalars
61752d82
FC
697have been modified to treat only immutable globs as globs. (C<tie>,
698C<tied> and C<untie> has been left as they are for compatibility's sake,
699but will warn. See L</Deprecations>.)
5076a392
FC
700
701This causes an incompatible change in code that assigns a glob to the
702return value of C<*{}> when that operator was passed a glob copy. Take the
703following code, for instance:
704
705 $glob = *foo;
706 *$glob = *bar;
707
708The C<*$glob> on the second line returns a new immutable glob. That new
709glob is made an alias to C<*bar>. Then it is discarded. So the second
710assignment has no effect.
711
5076a392
FC
712The upside to this incompatible change is that bugs [perl #77496],
713[perl #77502], [perl #77508], [perl #77688], and [perl #77812],
714and maybe others, too, have been fixed.
715
716See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even
717more detail.
718
61752d82 719=head3 Clearing stashes
5076a392
FC
720
721Stash list assignment C<%foo:: = ()> used to make the stash anonymous
722temporarily while it was being emptied. Consequently, any of its
723subroutines referenced elsewhere would become anonymous (showing up as
724"(unknown)" in C<caller>). Now they retain their package names, such that
725C<caller> will return the original sub name if there is still a reference
726to its typeglob, or "foo::__ANON__" otherwise [perl #79208].
727
61752d82
FC
728=head3 Magic variables outside the main package
729
730In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would
731'leak' into other packages. So C<%foo::SIG> could be used to access signals,
732C<${"foo::!"}> (with strict mode off) to access C's C<errno>, etc.
733
734This was a bug, or an 'unintentional' feature, which caused various ill effects,
735such as signal handlers being wiped when modules were loaded, etc.
736
737This has been fixed (or the feature has been removed, depending on how you see
738it).
739
740=head2 Changes to Syntax or to Perl Operators
741
742=head3 C<given> return values
743
744C<given> blocks now return the last evaluated
745expression, or an empty list if the block was exited by C<break>. Thus you
746can now write:
747
748 my $type = do {
749 given ($num) {
750 break when undef;
751 'integer' when /^[+-]?[0-9]+$/;
752 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
753 'unknown';
754 }
755 };
756
757See L<perlsyn/Return value> for details.
758
759=head3 Change in the parsing of certain prototypes
760
761Functions declared with the following prototypes now behave correctly as unary
762functions:
763
764 *
765 \$ \% \@ \* \&
766 \[...]
767 ;$ ;*
768 ;\$ ;\% etc.
769 ;\[...]
770
771Due to this bug fix [perl #75904], functions
772using the C<(*)>, C<(;$)> and C<(;*)> prototypes
773are parsed with higher precedence than before. So in the following example:
774
775 sub foo($);
776 foo $a < $b;
777
778the second line is now parsed correctly as C<< foo($a) < $b >>, rather than
779C<< foo($a < $b) >>. This happens when one of these operators is used in
780an unparenthesised argument:
781
782 < > <= >= lt gt le ge
783 == != <=> eq ne cmp ~~
784 &
785 | ^
786 &&
787 || //
788 .. ...
789 ?:
790 = += -= *= etc.
791
792=head3 Smart-matching against array slices
793
794Previously, the following code resulted in a successful match:
795
796 my @a = qw(a y0 z);
797 my @b = qw(a x0 z);
798 @a[0 .. $#b] ~~ @b;
799
800This odd behaviour has now been fixed [perl #77468].
801
802=head3 Negation treats strings differently from before
803
804The unary negation operator C<-> now treats strings that look like numbers
805as numbers [perl #57706].
806
807=head3 Negative zero
808
809Negative zero (-0.0), when converted to a string, now becomes "0" on all
810platforms. It used to become "-0" on some, but "0" on others.
811
812If you still need to determine whether a zero is negative, use
813C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN.
814
815=head3 C<:=> is now a syntax error
5076a392
FC
816
817Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>,
818with the C<:> being treated as the start of an attribute list, ending before
819the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now
820a syntax error. This will allow the future use of C<:=> as a new token.
821
822We find no Perl 5 code on CPAN using this construction, outside the core's
823tests for it, so we believe that this change will have very little impact on
824real-world codebases.
825
826If it is absolutely necessary to have empty attribute lists (for example,
827because of a code generator) then avoid the error by adding a space before
828the C<=>.
829
61752d82 830=head2 Threads and Processes
5076a392 831
61752d82 832=head3 Directory handles not copied to threads
5076a392 833
61752d82
FC
834On systems other than Windows that do not have
835a C<fchdir> function, newly-created threads no
836longer inherit directory handles from their parent threads. Such programs
837would usually have crashed anyway [perl #75154].
5076a392 838
61752d82 839=head3 C<close> on shared pipes
5076a392 840
61752d82
FC
841The C<close> function no longer waits for the child process to exit if the
842underlying file descriptor is still in use by another thread, to avoid
843deadlocks. It returns true in such cases.
5076a392 844
61752d82 845=head2 Configuration
5076a392 846
61752d82 847=head3 Naming fixes in Policy_sh.SH may invalidate Policy.sh
5076a392 848
61752d82
FC
849Several long-standing typos and naming confusions in Policy_sh.SH have
850been fixed, standardizing on the variable names used in config.sh.
5076a392 851
61752d82
FC
852This will change the behavior of Policy.sh if you happen to have been
853accidentally relying on the Policy.sh incorrect behavior.
f318e2e6 854
61752d82 855=head2 C API changes
5076a392 856
61752d82 857=head3 Check API compatibility when loading XS modules
5076a392 858
61752d82
FC
859When perl's API changes in incompatible ways (which usually happens between
860major releases), XS modules compiled for previous versions of perl will not
861work anymore. They will need to be recompiled against the new perl.
862
863In order to ensure that modules are recompiled, and to prevent users from
864accidentally loading modules compiled for old perls into newer ones, the
865C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is called
866when loading every newly compiled extension, compares the API version of the
867running perl with the version a module has been compiled for and raises an
868exception if they don't match.
5076a392 869
61752d82
FC
870=head3 Perl_fetch_cop_label
871
872The first argument of the C API function C<Perl_fetch_cop_label> has changed
873from C<struct refcounted he *> to C<COP *>, to better insulate the user from
874implementation details.
875
876This API function was marked as "may change", and likely isn't in use outside
877the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other
878references to it.)
879
880=head3 GvCV() and GvGP() are no longer lvalues
f318e2e6
FC
881
882The new GvCV_set() and GvGP_set() macros are now provided to replace
883assignment to those two macros.
5076a392
FC
884
885This allows a future commit to eliminate some backref magic between GV
886and CVs, which will require complete control over assignment to the
887gp_cv slot.
888
5076a392
FC
889=head1 Deprecations
890
5076a392
FC
891=head2 Omitting a space between a regular expression and subsequent word
892
18139a1b
FC
893Omitting a space between a regular expression operator or
894its modifiers and the following word is deprecated. For
895example, C<< m/foo/sand $bar >> will still be parsed
896as C<< m/foo/s and $bar >> but will issue a warning.
5076a392
FC
897
898=head2 Deprecation warning added for deprecated-in-core .pl libs
899
900This is a mandatory warning, not obeying -X or lexical warning bits.
901The warning is modelled on that supplied by deprecate.pm for
902deprecated-in-core .pm libraries. It points to the specific CPAN
823d0e46
FC
903distribution that contains the .pl libraries. The CPAN version, of
904course, does not generate the warning.
5076a392
FC
905
906=head2 List assignment to C<$[>
907
823d0e46
FC
908Assignment to C<$[> was deprecated and started to give warnings in
909Perl version 5.12.0. This version of perl also starts to emit a warning when
910assigning to C<$[> in list context. This fixes an oversight in 5.12.0.
5076a392
FC
911
912=head2 Use of qw(...) as parentheses
913
914Historically the parser fooled itself into thinking that C<qw(...)> literals
915were always enclosed in parentheses, and as a result you could sometimes omit
916parentheses around them:
917
918 for $x qw(a b c) { ... }
919
920The parser no longer lies to itself in this way. Wrap the list literal in
823d0e46 921parentheses, like this:
5076a392
FC
922
923 for $x (qw(a b c)) { ... }
924
925=head2 C<\N{BELL}> is deprecated
926
927This is because Unicode is using that name for a different character.
928See L</Unicode Version 6.0 is now supported (mostly)> for more
929explanation.
930
931=head2 C<?PATTERN?> is deprecated
932
933C<?PATTERN?> (without the initial m) has been deprecated and now produces
934a warning. This is to allow future use of C<?> in new operators.
935The match-once functionality is still available in the form of C<m?PATTERN?>.
936
5076a392
FC
937=head2 Tie functions on scalars holding typeglobs
938
939Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
940acts on a file handle if the scalar happens to hold a typeglob.
941
942This is a long-standing bug that will be removed in Perl 5.16, as
943there is currently no way to tie the scalar itself when it holds
944a typeglob, and no way to untie a scalar that has had a typeglob
945assigned to it.
946
823d0e46 947Now there is a deprecation warning whenever a tie
5076a392
FC
948function is used on a handle without an explicit C<*>.
949
18139a1b 950=head2 User-defined case-mapping
5076a392 951
18139a1b
FC
952This feature is being deprecated due to its many issues, as documented in
953L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
954It is planned to remove this feature in Perl 5.16. A CPAN module
955providing improved functionality is being prepared for release by the
956time 5.14 is.
957
823d0e46
FC
958XXX What module is that?
959
18139a1b 960=head2 Deprecated modules
5076a392
FC
961
962The following modules will be removed from the core distribution in a
963future release, and should be installed from CPAN instead. Distributions
964on CPAN which require these should add them to their prerequisites. The
823d0e46 965core versions of these modules will issue a deprecation warning.
5076a392
FC
966
967If you ship a packaged version of Perl, either alone or as part of a
968larger system, then you should carefully consider the repercussions of
823d0e46 969core module deprecations. You may want to consider shipping your default
5076a392 970build of Perl with packages for some or all deprecated modules which
823d0e46 971install into C<vendor> or C<site> perl library directories. This will
5076a392
FC
972inhibit the deprecation warnings.
973
974Alternatively, you may want to consider patching F<lib/deprecate.pm>
975to provide deprecation warnings specific to your packaging system
976or distribution of Perl, consistent with how your packaging system
977or distribution manages a staged transition from a release where the
978installation of a single package provides the given functionality, to
979a later release where the system administrator needs to know to install
980multiple packages to get that same functionality.
981
982You can silence these deprecation warnings by installing the modules
983in question from CPAN. To install the latest version of all of them,
984just install C<Task::Deprecations::5_14>.
985
986=over
987
988=item L<Devel::DProf>
989
990We strongly recommend that you install and used L<Devel::NYTProf> in
991preference, as it offers significantly improved profiling and reporting.
992
993=back
994
18139a1b 995=head2 Deprecated C APIs
5076a392 996
18139a1b 997=over
5076a392 998
18139a1b
FC
999=item C<Perl_ptr_table_clear>
1000
1001C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it now
1002generates a deprecation warning, and it will be removed in a future
1003release.
1004
1005=item C<sv_compile_2op>
1006
1007The C<sv_compile_2op()> API function is now deprecated. Searches suggest
1008that nothing on CPAN is using it, so this should have zero impact.
1009
1010It attempted to provide an API to compile code down to an optree, but failed
1011to bind correctly to lexicals in the enclosing scope. It's not possible to
1012fix this problem within the constraints of its parameters and return value.
1013
1014=back
5076a392
FC
1015
1016=head1 Performance Enhancements
1017
54c7bb16 1018=head2 "Safe signals" optimisation
df91d470
FC
1019
1020Signal dispatch has been moved from the runloop into control ops. This
1021should give a few percent speed increase, and eliminates almost all of
1022the speed penalty caused by the introduction of "safe signals" in
10235.8.0. Signals should still be dispatched within the same statement as
1024they were previously - if this is not the case, or it is possible to
1025create uninterruptible loops, this is a bug, and reports are encouraged
1026of how to recreate such issues.
1027
54c7bb16 1028=head2 Optimisation of shift; and pop; calls without arguments
df91d470 1029
111b6aa7
FC
1030Two fewer OPs are used for shift and pop calls with no argument (with
1031implicit C<@_>). This change makes C<shift;> 5% faster than C<shift @_;>
1032on non-threaded perls and 25% faster on threaded.
df91d470 1033
fa232254 1034=head2 Optimisation of regexp engine string comparison work
df91d470 1035
fa232254
FC
1036The foldEQ_utf8 API function for case-insensitive comparison of strings (which
1037is used heavily by the regexp engine) was substantially refactored and
1038optimised - and its documentation much improved as a free bonus gift.
df91d470 1039
fa232254 1040=head2 Regular expression compilation speed-up
df91d470 1041
fa232254
FC
1042Compiling regular expressions has been made faster for the case where upgrading
1043the regex to utf8 is necessary but that isn't known when the compilation begins.
df91d470 1044
fa232254 1045=head2 String appending is 100 times faster
df91d470 1046
fa232254
FC
1047When doing a lot of string appending, perl could end up allocating a lot more
1048memory than needed in a very inefficient way, if perl was configured to use the
1049system's C<malloc> implementation instead of its own.
1050
1051C<sv_grow>, which is what's being used to allocate more memory if necessary
1052when appending to a string, has now been taught how to round up the memory
1053it requests to a certain geometric progression, making it much faster on
1054certain platforms and configurations. On Win32, it's now about 100 times
1055faster.
1056
1057=head2 Eliminate C<PL_*> accessor functions under ithreads
1058
1059When C<MULTIPLICITY> was first developed, and interpreter state moved into
1060an interpreter struct, thread and interpreter local C<PL_*> variables were
1061defined as macros that called accessor functions, returning the address of
1062the value, outside of the perl core. The intent was to allow members
1063within the interpreter struct to change size without breaking binary
1064compatibility, so that bug fixes could be merged to a maintenance branch
1065that necessitated such a size change.
1066
1067However, some non-core code defines C<PERL_CORE>, sometimes intentionally
1068to bypass this mechanism for speed reasons, sometimes for other reasons but
1069with the inadvertent side effect of bypassing this mechanism. As some of
1070this code is widespread in production use, the result is that the core
1071I<can't> change the size of members of the interpreter struct, as it will
1072break such modules compiled against a previous release on that maintenance
1073branch. The upshot is that this mechanism is redundant, and well-behaved
1074code is penalised by it. Hence it can and should be removed (and has
1075been).
1076
1077=head2 Freeing weak references
1078
1079When an object has many weak references to it, freeing that object
1080can under some some circumstances take O(N^2) time to free (where N is the
1081number of references). The number of circumstances has been reduced
1082[perl #75254]
1083
1084=head2 Lexical array and hash assignments
1085
1086An earlier optimisation to speed up C<my @array = ...> and
1087C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
1088
1089Now we have found another way to speed up these assignments [perl #82110].
df91d470 1090
111b6aa7 1091=head2 C<@_> uses less memory
df91d470 1092
111b6aa7
FC
1093Previously, C<@_> was allocated for every subroutine at compile time with
1094enough space for four entries. Now this allocation is done on demand when
1095the subroutine is called [perl #72416].
5076a392 1096
5076a392
FC
1097=head2 Size optimisations to SV and HV structures
1098
1099xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and
111b6aa7 1100on some systems will cause struct xpvhv to become cache-aligned. To avoid
5076a392
FC
1101this memory saving causing a slowdown elsewhere, boolean use of HvFILL
1102now calls HvTOTALKEYS instead (which is equivalent) - so while the fill
111b6aa7
FC
1103data when actually required are now calculated on demand, the cases when
1104this needs to be done should be few and far between.
5076a392 1105
111b6aa7
FC
1106The order of structure elements in SV bodies has changed. Effectively,
1107the NV slot has swapped location with STASH and MAGIC. As all access to
1108SV members is via macros, this should be completely transparent. This
5076a392
FC
1109change allows the space saving for PVHVs documented above, and may reduce
1110the memory allocation needed for PVIVs on some architectures.
1111
fa232254
FC
1112C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body
1113they actually use, saving some space.
5076a392 1114
fa232254
FC
1115Scalars containing regular expressions now only allocate the part of the C<SV>
1116body they actually use, saving some space.
5076a392
FC
1117
1118=head2 Memory consumption improvements to Exporter
1119
1120The @EXPORT_FAIL AV is no longer created unless required, hence neither is
111b6aa7
FC
1121the typeglob backing it. This saves about 200 bytes for every package that
1122uses Exporter but doesn't use this functionality.
5076a392 1123
111b6aa7 1124=head2 Memory savings for weak references
5076a392
FC
1125
1126For weak references, the common case of just a single weak reference per
1127referent has been optimised to reduce the storage required. In this case it
111b6aa7 1128saves the equivalent of one small Perl array per referent.
5076a392 1129
111b6aa7 1130=head2 C<%+> and C<%-> use less memory
5076a392
FC
1131
1132The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl
111b6aa7 1133core. It has now been moved to an XS module, to reduce the overhead for
5076a392
FC
1134programs that do not use C<%+> or C<%->.
1135
fa232254 1136=head2 Multiple small improvements to threads
5076a392 1137
fa232254
FC
1138The internal structures of threading now make fewer API calls and fewer
1139allocations, resulting in noticeably smaller object code. Additionally,
1140many thread context checks have been deferred so that they're only done
1141when required (although this is only possible for non-debugging builds).
5076a392 1142
fa232254 1143=head2 Adjacent pairs of nextstate opcodes are now optimized away
5076a392 1144
fa232254 1145Previously, in code such as
5076a392 1146
fa232254 1147 use constant DEBUG => 0;
5076a392 1148
fa232254
FC
1149 sub GAK {
1150 warn if DEBUG;
1151 print "stuff\n";
1152 }
5076a392 1153
fa232254
FC
1154the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), but
1155the C<nextstate> op would remain, resulting in a runtime op dispatch of
1156C<nextstate>, C<nextstate>, ....
5076a392 1157
fa232254
FC
1158The execution of a sequence of C<nextstate> ops is indistinguishable from just
1159the last C<nextstate> op so the peephole optimizer now eliminates the first of
1160a pair of C<nextstate> ops, except where the first carries a label, since labels
1161must not be eliminated by the optimizer and label usage isn't conclusively known
1162at compile time.
5076a392
FC
1163
1164=head1 Modules and Pragmata
1165
1166=head2 New Modules and Pragmata
1167
1168=over 4
1169
1170=item *
1171
1172C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a
1173subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files
1174included with CPAN distributions or generated by the module installation
1175toolchain. It should not be used for any other general YAML parsing or
1176generation task.
1177
1178=item *
1179
1180C<CPAN::Meta> version 2.110440 has been added as a dual-life module. It
1181provides a standard library to read, interpret and write CPAN distribution
1182metadata files (e.g. META.json and META.yml) which describes a
1183distribution, its contents, and the requirements for building it and
1184installing it. The latest CPAN distribution metadata specification is
1185included as C<CPAN::Meta::Spec> and notes on changes in the specification
1186over time are given in C<CPAN::Meta::History>.
1187
1188=item *
1189
1190C<HTTP::Tiny> 0.010 has been added as a dual-life module. It is a very
1191small, simple HTTP/1.1 client designed for simple GET requests and file
1192mirroring. It has has been added to enable CPAN.pm and CPANPLUS to
1193"bootstrap" HTTP access to CPAN using pure Perl without relying on external
1194binaries like F<curl> or F<wget>.
1195
1196=item *
1197
1198C<JSON::PP> 2.27105 has been added as a dual-life module, for the sake of
1199reading F<META.json> files in CPAN distributions.
1200
1201=item *
1202
1203C<Module::Metadata> 1.000003 has been added as a dual-life module. It gathers
1204package and POD information from Perl module files. It is a standalone module
1205based on Module::Build::ModuleInfo for use by other module installation
1206toolchain components. Module::Build::ModuleInfo has been deprecated in
1207favor of this module instead.
1208
1209=item *
1210
1211C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl
1212operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types
1213with standardized names (e.g. "Unix" or "Windows"). It has been refactored
1214out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into
1215a single location for easier maintenance.
1216
1217=item *
1218
1219The following modules were added by the C<Unicode::Collate>
1220upgrade. See below for details.
1221
1222C<Unicode::Collate::CJK::Big5>
1223
1224C<Unicode::Collate::CJK::GB2312>
1225
1226C<Unicode::Collate::CJK::JISX0208>
1227
1228C<Unicode::Collate::CJK::Korean>
1229
1230C<Unicode::Collate::CJK::Pinyin>
1231
1232C<Unicode::Collate::CJK::Stroke>
1233
1234=item *
1235
1236C<Version::Requirements> version 0.101020 has been added as a dual-life
1237module. It provides a standard library to model and manipulates module
1238prerequisites and version constraints as defined in the L<CPAN::Meta::Spec>.
1239
1240=back
1241
1242=head2 Updated Modules and Pragmata
1243
1244=over 4
1245
1246=item *
1247
5076a392
FC
1248C<Archive::Extract> has been upgraded from version 0.38 to 0.48.
1249
1250Updates since 0.38 include: a safe print method that guards
1251Archive::Extract from changes to $\; a fix to the tests when run in core
1252perl; support for TZ files; and a modification for the lzma logic to favour
1253IO::Uncompress::Unlzma
1254
1255Resolves an issue with NetBSD-current and its new unzip
1256executable.
1257
1258=item *
1259
1260C<Archive::Tar> has been upgraded from version 1.54 to 1.76.
1261
1262Important changes since 1.54 include: compatibility with busybox
1263implementations of tar; a fix so that C<write()> and C<create_archive()>
1264close only handles they opened; and a bug was fixed regarding the exit code
1265of extract_archive. (afabe0e)
1266
1267Among other things, the new version adds a new option to C<ptar> to allow safe
1268creation of tarballs without world-writable files on Windows, allowing those
1269archives to be uploaded to CPAN.
1270
1271This adds the ptargrep utility for using regular expressions against
1272the contents of files in a tar archive.
1273
1274Skip extracting pax extended headers.
1275
1276=item *
1277
5076a392
FC
1278C<B> has been upgraded from version 1.23 to 1.27.
1279
1280It no longer crashes when taking apart a C<y///> containing characters
1281outside the octet range or compiled in a C<use utf8> scope.
1282
1283The size of the shared object has been reduced by about 40%, with no
1284reduction in functionality.
1285
1286=item *
1287
1288C<B::Concise> has been upgraded from version 0.78 to 0.82.
1289
1290B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag
1291as "DREFed".
1292
1293It no longer produces mangled output with the C<-tree> option
1294[perl #80632].
1295
1296=item *
1297
5076a392
FC
1298C<B::Deparse> has been upgraded from version 0.96 to 1.02.
1299
1300A bug has been fixed when deparsing a nextstate op that has both a
1301change of package (relative to the previous nextstate), or a change of
1302C<%^H> or other state, and a label. Previously the label was emitted
1303first, leading to syntactically invalid output because a label is not
1304permitted immediately before a package declaration, B<BEGIN> block,
1305or some other things. Now the label is emitted last.
1306
1307The 'no 5.13.2' or similar form is now correctly handled by B::Deparse.
1308
1309B::Deparse now properly handles the code that applies a conditional
1310pattern match against implicit C<$_> as it was fixed in [perl #20444].
1311
1312It fixes deparsing of C<our> followed by a variable with funny characters
1313(as permitted under the C<utf8> pragma) [perl #33752].
1314
1315=item *
1316
5076a392
FC
1317C<Carp> has been upgraded from version 1.18 to 1.19.
1318
1319L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and
1320avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on
1321particular behaviour of the caller built-in. Carp now detects if other code has
1322overridden this with an incomplete implementation, and modifies its backtrace
1323accordingly. Previously incomplete overrides would cause incorrect values in
1324backtraces (best case), or obscure fatal errors (worst case)
1325
1326This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules
1327overriding C<caller()> incorrectly.
1328
1329It now avoids using regular expressions that cause perl to
1330load its Unicode tables, in order to avoid the 'BEGIN not safe after
1331errors' error that will ensue if there has been a syntax error
1332[perl #82854].
1333
1334=item *
1335
1336C<CGI> has been upgraded from version 3.48 to 3.51.
1337
1338This provides the following security fixes: the MIME boundary in
1339multipart_init is now random and improvements to the handling of
1340newlines embedded in header values.
1341
1342The documentation for param_fetch() has been corrected and clarified.
1343
1344=item *
1345
5076a392
FC
1346C<Compress::Raw::Bzip2> has been upgraded from version 2.024 to 2.033.
1347
1348Updated to use bzip2 1.0.6
1349
1350=item *
1351
bf05e2b3 1352C<CPAN> has been upgraded from version 1.94_56 to 1.9600.
5076a392
FC
1353
1354=over 4
1355
1356=item * release 1.94_57
1357
1358=item * bugfix: treat modules correctly that are deprecated in perl 5.12.
1359
1360=item * bugfix: RT #57482 and #57788 revealed that configure_requires
1361implicitly assumed build_requires instead of normal requires. (Reported
1362by Andrew Whatson and Father Chrysostomos respectively)
1363
1364=item * testfix: solaris should run the tests without expect because (some?)
1365solaris have a broken expect
1366
1367=item * testfix: run tests with cache_metadata off to prevent spill over
1368effects from previous test runs
1369
1370=back
1371
1372Includes support for META.json and MYMETA.json.
1373
1374=item *
1375
1376C<CPANPLUS> has been upgraded from version 0.90 to 0.9102.
1377
1378Fixed the shell test to skip if test is not being run under a terminal;
1379resolved the issue where a prereq on Config would not be recognised as a
1380core module.
1381
1382Includes support for META.json and MYMETA.json and a change to
1383using Digest::SHA for CPAN checksums.
1384
1385=item *
1386
5076a392
FC
1387C<Data::Dumper> has been upgraded from version 2.125 to 2.130_02.
1388
4ed2cea4
FC
1389The indentation used to be off when C<$Data::Dumper::Terse> was set. This
1390has been fixed [perl #73604].
1391
5076a392
FC
1392This fixes a crash when using custom sort functions that might cause the stack
1393to change.
1394
1395C<Dumpxs> no longer crashes with globs returned by C<*$io_ref>
1396[perl #72332].
1397
1398=item *
1399
5076a392
FC
1400C<Devel::DProf> has been upgraded from version 20080331.00 to 20110228.00.
1401
1402Merely loading C<Devel::DProf> now no longer triggers profiling to start.
1403C<use Devel::DProf> and C<perl -d:DProf ...> still behave as before and start
1404the profiler.
1405
1406NOTE: C<Devel::DProf> is deprecated and will be removed from a future
1407version of Perl. We strongly recommend that you install and use
1408L<Devel::NYTProf> instead, as it offers significantly improved
1409profiling and reporting.
1410
1411=item *
1412
5076a392
FC
1413C<diagnostics> has been upgraded from version 1.19 to 1.22.
1414
1415It now renders pod links slightly better, and has been taught to find
1416descriptions for messages that share their descriptions with other
1417messages.
1418
1419=item *
1420
1421C<Digest::MD5> has been upgraded from version 2.39 to 2.51.
1422
1423It is now safe to use this module in combination with threads.
1424
1425=item *
1426
1427C<Digest::SHA> has been upgraded from version 5.47 to 5.61.
1428
1429C<shasum> now more closely mimics C<sha1sum>/C<md5sum>.
1430
1431C<Addfile> accepts all POSIX filenames.
1432
1433New SHA-512/224 and SHA-512/256 transforms ref. NIST Draft FIPS 180-4 (February 2011)
1434
1435=item *
1436
5076a392
FC
1437C<DynaLoader> has been upgraded from version 1.10 to 1.12.
1438
1439It fixes a buffer overflow when passed a very long file name.
1440
1441It no longer inherits from AutoLoader; hence it no longer
1442produces weird error messages for unsuccessful method calls on classes that
1443inherit from DynaLoader [perl #84358].
1444
1445=item *
1446
1447C<Encode> has been upgraded from version 2.39 to 2.42.
1448
1449Now, all 66 Unicode non-characters are treated the same way U+FFFF has
1450always been treated; if it was disallowed, all 66 are disallowed; if it
1451warned, all 66 warn.
1452
1453=item *
1454
5076a392
FC
1455C<Errno> has been upgraded from version 1.11 to 1.13.
1456
1457The implementation of C<Errno> has been refactored to use about 55% less memory.
1458There should be no user-visible changes.
1459
1460On some platforms with unusual header files, like Win32/gcc using mingw64
1461headers, some constants which weren't actually error numbers have been exposed
1462by C<Errno>. This has been fixed [perl #77416].
1463
1464=item *
1465
1466C<Exporter> has been upgraded from version 5.64_01 to 5.64_03.
1467
1468Exporter no longer overrides C<$SIG{__WARN__}> [perl #74472]
1469
1470=item *
1471
5076a392
FC
1472C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23.
1473
1474The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs>
1475can now C<croak> for missing constants, or generate a complete C<AUTOLOAD>
1476subroutine in XS, allowing simplification of many modules that use it.
1477(C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, C<Socket>)
1478
1479C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all
1480constants onto the package's C{@EXPORT_OK}. This has been used to replace
1481less space-efficient code in C<B>, helping considerably shrink the size of its
1482shared object.
1483
1484=item *
1485
5076a392
FC
1486C<File::DosGlob> has been upgraded from version 1.01 to 1.03.
1487
1488It allows patterns containing literal parentheses (they no longer need to
1489be escaped). On Windows, it no longer adds an extra F<./> to the file names
1490returned when the pattern is a relative glob with a drive specification,
1491like F<c:*.pl> [perl #71712].
1492
1493=item *
1494
1495C<File::Fetch> has been upgraded from version 0.24 to 0.32.
1496
1497C<HTTP::Lite> is now supported for 'http' scheme.
1498
1499The C<fetch> utility is supported on FreeBSD, NetBSD and
1500Dragonfly BSD for the C<http> and C<ftp> schemes.
1501
1502=item *
1503
1504C<File::Find> has been upgraded from version 1.15 to 1.18.
1505
1506It improves handling of backslashes on Windows, so that paths such as
1507F<c:\dir\/file> are no longer generated [perl #71710].
1508
1509=item *
1510
5076a392
FC
1511C<File::stat> has been upgraded from 1.02 to 1.04.
1512
1513The C<-x> and C<-X> file test operators now work correctly under the root
1514user.
1515
1516=item *
1517
5076a392
FC
1518C<GDBM_File> has been upgraded from 1.10 to 1.13.
1519
1520This fixes a memory leak when DBM filters are used.
1521
1522=item *
1523
1524C<Hash::Util> has been upgraded from 0.07 to 0.10.
1525
1526Hash::Util now enables "no warnings 'uninitialized'" to suppress spurious
5334145a 1527warnings from undefined hash values [perl #74280].
5076a392
FC
1528
1529=item *
1530
1531C<I18N::Langinfo> has been upgraded from version 0.03 to 0.07.
1532
1533C<langinfo()> now defaults to using C<$_> if there is no argument given, just
5334145a 1534as the documentation has always claimed.
5076a392
FC
1535
1536=item *
1537
1538C<IO::Select> has been upgraded from version 1.17 to 1.18.
1539
1540It now allows IO::Handle objects (and objects in derived classes) to be
1541removed from an IO::Select set even if the underlying file descriptor is
1542closed or invalid.
1543
1544=item *
1545
5076a392
FC
1546C<IPC::Cmd> has been upgraded from version 0.54 to 0.68.
1547
1548Resolves an issue with splitting Win32 command lines.
1549
1550=item *
1551
1552C<IPC::Open3> has been upgraded from 1.05 to 1.08.
1553
4ed2cea4
FC
1554C<open3> now produces an error if the C<exec> call fails, allowing this
1555condition to be distinguished from a child process that exited with a
1556non-zero status [perl #72016].
1557
5076a392
FC
1558The internal C<xclose> routine now knows how to handle file descriptors, as
1559documented, so duplicating STDIN in a child process using its file
1560descriptor now works [perl #76474].
1561
1562=item *
1563
5076a392
FC
1564The Locale-Codes distribution has been upgraded from version 2.07 to 3.16.
1565
1566Locale::Country, Locale::Language and Locale::Currency were updated from
15673.12 to 3.13 of the Locale-Codes distribution to include locale code changes.
1568
1569Adds some codes.
1570
1571=item *
1572
1573C<Locale::Maketext> has been upgraded from version 1.14 to 1.17.
1574
1575Locale::Maketext guts have been merged back into the main module
1576and adds external cache support
1577
1578It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when
1579working with tainted values (CPAN RT #40727).
1580
1581C<< ->maketext >> calls will now backup and restore C<$@> so that error
1582messages are not suppressed (CPAN RT #34182).
1583
1584=item *
1585
5076a392
FC
1586C<Math::BigInt> has been upgraded from version 1.89_01 to 1.994.
1587
1588This fixes, among other things, incorrect results when computing binomial
1589coefficients [perl #77640].
1590
1591This prevents C<sqrt($int)> from crashing under C<use bigrat;>
1592[perl #73534].
1593
1594=item *
1595
5076a392
FC
1596C<MIME::Base64> has been upgraded from 3.08 to 3.13.
1597
1598Includes new functions to calculate the length of encoded and decoded
1599base64 strings.
1600
1601Now provides C<encode_base64url> and C<decode_base64url> functions to process
1602the base64 scheme for "URL applications".
1603
1604=item *
1605
1606C<Module::Build> has been upgraded from version 0.3603 to 0.3800.
1607
1608A notable change is the deprecation of several modules.
1609Module::Build::Version has been deprecated and Module::Build now relies
1610directly upon L<version>. Module::Build::ModuleInfo has been deprecated in
1611favor of a standalone copy of it called L<Module::Metadata>.
1612Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>.
1613
1614Module::Build now also generates META.json and MYMETA.json files
1615in accordance with version 2 of the CPAN distribution metadata specification,
1616L<CPAN::Meta::Spec>. The older format META.yml and MYMETA.yml files are
1617still generated, as well.
1618
1619=item *
1620
1621C<Module::CoreList> has been upgraded from version 2.29 to XXX.
1622
1623Besides listing the updated core modules of this release, it also stops listing
1624the C<Filespec> module. That module never existed in core. The scripts
1625generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually
1626is a core module, since the time of perl 5.8.7.
1627
1628=item *
1629
5076a392
FC
1630C<NDBM_File> has been upgraded from 1.08 to 1.11.
1631
1632This fixes a memory leak when DBM filters are used.
1633
1634=item *
1635
5076a392
FC
1636C<ODBM_File> has been upgraded from 1.08 to 1.09.
1637
1638This fixes a memory leak when DBM filters are used.
1639
1640=item *
1641
5076a392
FC
1642C<overload> has been upgraded from 1.11 to 1.12.
1643
1644C<overload::Method> can now handle subroutines that are themselves blessed
1645into overloaded classes [perl #71998].
1646
1647Avoid a taint problem in use of sprintf.
1648
1649The documentation has greatly improved. See L</Documentation> below.
1650
1651=item *
1652
5076a392
FC
1653C<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401.
1654
1655The latest Parse::CPAN::Meta can now read YAML or JSON files using
1656L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core.
1657
1658=item *
1659
5076a392
FC
1660C<PerlIO::scalar> has been upgraded from 0.07 to 0.11.
1661
1662A C<read> after a C<seek> beyond the end of the string no longer thinks it
1663has data to read [perl #78716].
1664
1665=item *
1666
5076a392
FC
1667C<POSIX> has been upgraded from 1.19 to 1.23.
1668
1669It now includes constants for POSIX signal constants.
1670
1671=item *
1672
1673C<re> has been upgraded from version 0.11 to 0.15.
1674
1675New C<use re "/flags"> pragma
1676
1677Enforce that C</d>, C</u>, and C</l> are mutually exclusive.
1678
1679C<re> has been upgraded from version 0.16 to 0.17.
1680
1681It now supports the double-a flag: C<use re '/aa';>
1682
1683The C<regmust> function used to crash when called on a regular expression
1684belonging to a pluggable engine. Now it has been disabled for those.
1685
1686C<regmust> no longer leaks memory.
1687
1688=item *
1689
1690C<Safe> has been upgraded from version 2.25 to 2.29.
1691
1692This fixes a possible infinite loop when looking for coderefs.
1693
1694It adds C<&version::vxs::VCMP> to the default share.
1695
1696=item *
1697
5076a392
FC
1698C<SelfLoader> has been upgraded from 1.17 to 1.18.
1699
1700It now works in taint mode [perl #72062].
1701
1702=item *
1703
1704C<sigtrap> has been upgraded from version 1.04 to 1.05.
1705
1706It no longer tries to modify read-only arguments when generating a
1707backtrace [perl #72340].
1708
1709=item *
1710
1711C<Socket> has been upgraded from version 1.87 to XXX.
1712
1713It has several new functions for handling IPv6 addresses. (from 5.13.8)
1714
1715It provides new affordances for IPv6,
1716including implementations of the C<Socket::getaddrinfo()> and
1717C<Socket::getnameinfo()> functions, along with related constants.
1718
1719=item *
1720
1721C<Storable> has been upgraded from version 2.22 to 2.27.
1722
1723Includes performance improvement for overloaded classes.
1724
5076a392
FC
1725This adds support for serialising code references that contain UTF-8 strings
1726correctly. The Storable minor version number changed as a result, meaning that
1727Storable users who set C<$Storable::accept_future_minor> to a C<FALSE> value
1728will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details).
1729
1730Freezing no longer gets confused if the Perl stack gets reallocated
1731during freezing [perl #80074].
1732
1733=item *
1734
5076a392
FC
1735C<Test::Harness> has been upgraded from version 3.17 to 3.23.
1736
1737The core update from Test-Harness 3.17 to 3.21 fixed some things, but
1738also L<introduced a known problem|/"Known Problems"> with argument
1739passing to non-Perl tests. (5.13.3)
1740
1741=item *
1742
1743C<Test::Simple> has been upgraded from version 0.94 to 0.98.
1744
1745Among many other things, subtests without a C<plan> or C<no_plan> now have an
1746implicit C<done_testing()> added to them.
1747
1748=item *
1749
5076a392
FC
1750C<Thread::Semaphore> has been upgraded from version 2.09 to 2.12.
1751
1752Added new methods -E<gt>down_nb() and -E<gt>down_force() at the suggestion
1753of Rick Garlick.
1754
1755Refactored methods to skip argument validation when no argument is supplied.
1756
1757=item *
1758
5076a392
FC
1759C<Tie::Hash> has been upgraded from version 1.03 to 1.04.
1760
1761Calling C<< Tie::Hash-E<gt>TIEHASH() >> used to loop forever. Now it C<croak>s.
1762
1763=item *
1764
5076a392
FC
1765C<Unicode::Collate> has been upgraded from version 0.52_01 to 0.73.
1766
1767Includes Unicode Collation Algorithm 18
1768
1769Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and
1770supports a couple of new locales.
1771
1772U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om,
1773tn, vi, hr, ig, ru, sq, se, sr, to and uk
1774
1775This release newly adds locales C<ja> C<ko> and C<zh> and its variants
1776( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ).
1777
1778Supported UCA_Version 22 for Unicode 6.0.0.
1779
1780The following modules have been added:
1781
1782C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes
1783tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering.
1784
1785C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes
1786tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering.
1787
1788C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji
1789(CJK Unified Ideographs) in the JIS X 0208 order.
1790
1791C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs
1792in the order of CLDR's Korean ordering.
1793
1794C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes
1795tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering.
1796
1797C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes
1798tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
1799
1800DUCET has been updated for Unicode 6.0.0 as Collate/allkeys.txt and
1801the default UCA_Version is 22.
1802
1803This also sees the switch from using the pure-perl version of this
1804module to the XS version.
1805
1806=item *
1807
5076a392
FC
1808C<Unicode::UCD> has been upgraded from version 0.27 to 0.32.
1809
1810Add info about named sequence alternatives.
1811
1812Don't use C<CompositionExclusions.txt>.
1813
1814This includes a number of bug fixes:
1815
1816=over 4
1817
1818=item charinfo()
1819
1820=over 4
1821
1822=item *
1823
1824It is now updated to Unicode Version 6 with Corrigendum #8, except,
1825as with Perl 5.14, the code point at U+1F514 has no name.
1826
1827=item *
1828
1829The Hangul syllable code points have the correct names, and their
1830decompositions are always output without requiring L<Lingua::KO::Hangul::Util>
1831to be installed.
1832
1833=item *
1834
54c7bb16
FC
1835The CJK (Chinese-Japanese-Korean) code points U+2A700 to U+2B734
1836and U+2B740 to U+2B81D are now properly handled.
5076a392
FC
1837
1838=item *
1839
1840The numeric values are now output for those CJK code points that have them.
1841
1842=item *
1843
1844The names that are output for code points with multiple aliases are now the
1845corrected ones.
1846
1847=back
1848
1849=item charscript()
1850
1851This now correctly returns "Unknown" instead of C<undef> for the script
1852of a code point that hasn't been assigned another one.
1853
1854=item charblock()
1855
1856This now correctly returns "No_Block" instead of C<undef> for the block
1857of a code point that hasn't been assigned to another one.
1858
1859=back
1860
1861Added new function C<Unicode::UCD::num()>. This function will return the
1862numeric value of the string passed it; C<undef> if the string in its
1863entirety has no safe numeric value.
1864
1865To be safe, a string must be a single character which has a numeric
1866value, or consist entirely of characters that match \d, coming from the
1867same Unicode block of digits. Thus, a mix of Bengali and Western
1868digits would be considered unsafe, as well as a mix of half- and
1869full-width digits, but strings consisting entirely of Devanagari digits
1870or of "Mathematical Bold" digits would would be safe.
1871
1872=item *
1873
1874C<version> has been upgraded from 0.82 to 0.88.
1875
1876Modify export logic for C<is_strict> and C<is_lax>.
1877
1878=item *
1879
1880C<warnings> and C<warnings::register> have been upgraded from version 1.09
1881to 1.11 and from version 1.01 to 1.02 respectively.
1882
1883Calling C<use warnings> without arguments is now significantly more efficient.
1884
1885It is now possible to register warning categories other than the names of
1886packages using C<warnings::register>. See L<perllexwarn> for more information.
1887
1888=item *
1889
1890C<VMS::DCLsym> has been upgraded from version 1.03 to 1.05.
1891
1892Two bugs have been fixed [perl #84086]:
1893
1894The symbol table name was lost when tying a hash, due to a thinko in
1895C<TIEHASH>. The result was that all tied hashes interacted with the
1896local symbol table.
1897
1898Unless a symbol table name had been explicitly specified in the call
1899to the constructor, querying the special key ':LOCAL' failed to
1900identify objects connected to the local symbol table.
1901
1902=item *
1903
1904C<Win32> has been upgraded from version 0.39 to 0.44.
1905
1906Add several functions. (5.13.8)
1907
1908Corrections to names returned by C<Win32::GetOSName> and
1909C<Win32::GetOSDisplayName>.
1910
5076a392
FC
1911=back
1912
1913=head2 Dual-life Modules and Pragmata
1914
1915These modules were formerly distributed only in the Perl core
1916distribution, and are now dual-lifed (meaning they are now also available
1917separately on CPAN):
1918
5334145a
FC
1919XXX I know there are a lot more than this!
1920
5076a392
FC
1921=over 4
1922
1923=item *
1924
1925C<autouse>
1926
1927=item *
1928
1929C<Devel::SelfStubber>
1930
1931=item *
1932
1933C<Dumpvalue>
1934
1935=item *
1936
1937C<Env>
1938
1939=item *
1940
1941C<File::CheckTree>
1942
1943=item *
1944
1945C<I18N::Collate>
1946
1947=back
1948
1949=head2 Removed Modules and Pragmata
1950
1951The following modules have been removed from the core distribution, and if
1952needed should be installed from CPAN instead.
1953
1954=over
1955
1956=item C<Class::ISA>
1957
1958=item C<Pod::Plainer>
1959
1960=item C<Switch>
1961
1962=back
1963
1964The removal of C<Shell> has been deferred until after 5.14, as the
1965implementation of C<Shell> shipped with 5.12.0 did not correctly issue the
1966warning that it was to be removed from core.
1967
1968=head1 Documentation
1969
1970XXX Changes to files in F<pod/> go here. Consider grouping entries by
1971file and be sure to link to the appropriate page, e.g. L<perlfunc>.
1972
1973=head2 New Documentation
1974
1975=head3 perlgpl
1976
1977L<perlgpl> has been updated to contain GPL version 1, as is included in the
1978F<README> distributed with perl.
1979
1980=head3 L<perl5121delta>
1981
1982The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
1983
1984=head3 L<perlpodstyle>
1985
1986New style guide for POD documentation,
1987split mostly from the NOTES section of the pod2man man page.
1988
1989( This was added to C<v5.13.6> but was not documented with that release ).
1990
1991=head2 Changes to Existing Documentation
1992
4ed2cea4
FC
1993=head3 L<perlmodlib>
1994
1995The perlmodlib page that came with Perl 5.12.0 was missing a lot of
1996modules, due to a bug in the script that generates the list. This has been
1997fixed [perl #74332].
1998
5076a392
FC
1999=head3 Replace wrong tr/// table in perlebcdic.pod
2000
2001perlebcdic.pod contains a helpful table to use in tr/// to convert
2002between EBCDIC and Latin1/ASCII. Unfortunately, the table was the
2003inverse of the one it describes, though the code that used the table
2004worked correctly for the specific example given.
2005
2006The table has been changed to its inverse, and the sample code changed
2007to correspond, as this is easier for the person trying to follow the
2008instructions since deriving the old table is somewhat more complicated.
2009
2010The table has also been changed to hex from octal, as that is more the norm
2011these days, and the recipes in the pod altered to print out leading
2012zeros to make all the values the same length, as the table that they can
2013generate has them (5f26d5).
2014
2015=head3 Document tricks for user-defined casing
2016
2017perlunicode.pod now contains an explanation of how to override, mangle
2018and otherwise tweak the way perl handles upper, lower and other case
2019conversions on unicode data, and how to provide scoped changes to alter
2020one's own code's behaviour without stomping on anybody else (71648f).
2021
2022=head3 Document $# and $* as removed and clarify $#array usage
2023
2024$# and $* were both disabled as of perl5 version 10; this release adds
2025documentation to that effect, a description of the results of continuing
2026to try and use them, and a note explaining that $# can also function as a
2027sigil in the $#array form (7f315d2).
2028
2029=head3 INSTALL explicitly states the requirement for C89
2030
2031This was already true but it's now Officially Stated For The Record (51eec7).
2032
2033=head3 No longer advertise Math::TrulyRandom
2034
2035This module hasn't been updated since 1996 so we can't recommend it any more
2036(83918a).
2037
2038=head3 perlfaq synchronised to upstream
2039
2040The FAQ has been updated to commit
204137550b8f812e591bcd0dd869d61677dac5bda92c from the perlfaq repository
2042at git@github.com:briandfoy/perlfaq.git
2043
2044=head3 General changes
2045
2046=over
2047
2048=item *
2049
2050Octal character escapes in documentation now prefer a three-digit octal
2051escape or the new C<\o{...}> escape as they have more consistent behavior
2052in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
2053
2054=item *
2055
2056Documentation now standardizes on the term 'capture group' over 'buffer'
2057in regular expression documentation (c27a5cf)
2058
2059=back
2060
2061=head3 L<perlfunc>
2062
2063=over
2064
2065=item *
2066
2067Added cautionary note about "no VERSION" (e0de7c2)
2068
2069=item *
2070
2071Added additional notes regarding srand when forking (d460397)
2072
2073=back
2074
2075=head3 L<perlop>
2076
2077=over 4
2078
2079=item *
2080
2081Improved documentation of unusual character escapes (4068718, 9644846)
2082
2083=item *
2084
2085Clarified how hexadecimal escapes are interpreted, with particular
2086attention to the treatment of invalid characters (9644846)
2087
2088=back
2089
2090=head3 L<perlrun>
2091
2092=over
2093
2094=item *
2095
2096Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
2097
2098=back
2099
2100=head3 L<perlpolicy>
2101
2102=over
2103
2104=item *
2105
2106Added the policy on compatibility and deprecation along with definitions of
2107terms like "deprecation" (70e4a83)
2108
2109=back
2110
2111=head3 L<perlre>
2112
2113=over
2114
2115=item *
2116
2117Added examples of the perils of not using \g{} when there are more
2118than nine back-references (9d86067)
2119
2120=back
2121
2122=head3 L<perltie>
2123
2124=over
2125
2126=item *
2127
2128Updated some examples for modern Perl style (67d00dd)
2129
2130=back
2131
2132=head3 L<perldiag>
2133
2134=over 4
2135
2136=item *
2137
2138The following existing diagnostics are now documented:
2139
2140=over 4
2141
2142=item *
2143
2144L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c">
2145
2146=item *
2147
2148L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s">
2149
2150=item *
2151
2152L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s">
2153
2154=item *
2155
2156L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()">
2157
2158=item *
2159
2160L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)">
2161
2162=item *
2163
2164L<Invalid version format (%s)|perldiag/"Invalid version format (%s)">
2165
2166=item *
2167
2168L<Invalid version object|perldiag/"Invalid version object">
2169
2170=back
2171
2172=back
2173
2174=head3 L<perlport>
2175
2176=over 4
2177
2178=item *
2179
2180Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS">
2181on Win32.
2182
2183=back
2184
2185=head3 L<perlre>
2186
2187=over 4
2188
2189=item *
2190
2191Minor fix to a multiple scalar match example.
2192
2193=back
2194
2195=head3 L<perlapi>
2196
2197=over 4
2198
2199=item *
2200
2201Many of the optree construction functions are now documented.
2202
2203=back
2204
2205=head3 L<perlbook>
2206
2207=over 4
2208
2209=item *
2210
2211Expanded to cover many more popular books.
2212
2213=back
2214
2215=head3 L<perlfaq>
2216
2217=over 4
2218
2219=item *
2220
2221L<perlfaq>, L<perlfaq2>, L<perlfaq4>, L<perlfaq5>, L<perlfaq6>, L<perlfaq8>, and
2222L<perlfaq9> have seen various updates and modernizations.
2223
2224=back
2225
2226=head3 L<perlapi>
2227
2228=over 4
2229
2230=item *
2231
2232The documentation for the C<SvTRUE> macro was simply wrong in stating that
2233get-magic is not processed. It has been corrected.
2234
2235=back
2236
2237=head3 L<perlvar>
2238
2239L<perlvar> reorders the variables and groups them by topic. Each variable
2240introduced after Perl 5.000 notes the first version in which it is
2241available. L<perlvar> also has a new section for deprecated variables to
2242note when they were removed.
2243
2244=head3 blah blah blah
2245
2246Array and hash slices in scalar context are now documented in L<perldata>.
2247
2248=head3 blah blah blah
2249
2250L<perlform> and L<perllocale> have been corrected to state that
2251C<use locale> affects formats.
2252
2253=head3 All documentation
2254
2255=over
2256
2257=item *
2258
2259Numerous POD warnings were fixed.
2260
2261=item *
2262
2263Many, many spelling errors and typographical mistakes were corrected throughout Perl's core.
2264
2265=back
2266
2267=head3 C<perlhack>
2268
2269=over 4
2270
2271=item *
2272
2273C<perlhack> was extensively reorganized.
2274
2275=back
2276
2277=head3 C<perlfunc>
2278
2279=over 4
2280
2281=item *
2282
2283It has now been documented that C<ord> returns 0 for an empty string.
2284
2285=back
2286
2287=head3 L<overload>
2288
2289=over 4
2290
2291=item *
2292
2293L<overload>'s documentation has practically undergone a rewrite. It
2294is now much more straightforward and clear.
2295
2296=back
2297
2298=head3 L<perlhack> and perlrepository
2299
2300=over 4
2301
2302=item *
2303
2304The L<perlhack> and perlrepository documents have been heavily edited and
2305split up into several new documents.
2306
2307The L<perlhack> document is now much shorter, and focuses on the Perl 5
2308development process and submitting patches to Perl. The technical content has
2309been moved to several new documents, L<perlsource>, L<perlinterp>,
2310L<perlhacktut>, and L<perlhacktips>. This technical content has only been
2311lightly edited.
2312
2313The perlrepository document has been renamed to L<perlgit>. This new document
2314is just a how-to on using git with the Perl source code. Any other content
2315that used to be in perlrepository has been moved to perlhack.
2316
2317=back
2318
2319=head3 L<perlfunc>
2320
2321=over 4
2322
2323=item *
2324
2325The documentation for the C<map> function now contains more examples,
2326see B<perldoc -f map> (f947627)
2327
2328=back
2329
2330=head3 L<perlfaq4>
2331
2332=over 4
2333
2334=item *
2335
2336Examples in L<perlfaq4> have been updated to show the use of
2337L<Time::Piece>. (9243591)
2338
2339=back
2340
2341=head3 Miscellaneous
2342
2343=over 4
2344
2345=item *
2346
2347Many POD related RT bugs and other issues which are too numerous to
2348enumerate have been solved by Michael Stevens.
2349
2350=back
2351
2352=head1 Diagnostics
2353
2354The following additions or changes have been made to diagnostic output,
2355including warnings and fatal error messages. For the complete list of
2356diagnostic messages, see L<perldiag>.
2357
2358=head2 New Diagnostics
2359
2360=over
2361
2362=item Parsing code internal error (%s)
2363
2364New fatal error produced when parsing code supplied by an extension violated the
2365parser's API in a detectable way.
2366
2367=item Use of qw(...) as parentheses is deprecated
2368
2369See L</"Use of qw(...) as parentheses"> for details.
2370
2371=item Using !~ with %s doesn't make sense
2372
2373This message was actually added in
23745.13.2, but was omitted from perldelta. It now applies also to the C<y///>
2375operator, and has been documented.
2376
2377=item Closure prototype called
2378
2379There is a new "Closure prototype called" error [perl #68560].
2380
2381=item Operation "%s" returns its argument for ...
2382
2383Performing an operation requiring Unicode semantics (such as case-folding)
2384on a Unicode surrogate or a non-Unicode character now triggers a warning:
2385'Operation "%s" returns its argument for ...'.
2386
2387=item "\b{" is deprecated; use "\b\{" instead
2388
2389=item "\B{" is deprecated; use "\B\{" instead
2390
2391Use of an unescaped "{" immediately following a C<\b> or C<\B> is now
2392deprecated so as to reserve its use for Perl itself in a future release.
2393
2394=item regcomp: Add warning if \p is used under locale. (fb2e24c)
2395
2396C<\p> implies Unicode matching rules, which are likely going to be
2397different than the locale's.
2398
2399=item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries
2400
2401This new error is triggered if a destructor called on an object in a
2402typeglob that is being freed creates a new typeglob entry containing an
2403object with a destructor that creates a new entry containing an object....
2404
2405=item refcnt: fd %d%s
2406
2407This new error only occurs if a internal consistency check fails when a
2408pipe is about to be closed.
2409
2410=item Regexp modifier "/%c" may not appear twice
2411
2412(F syntax) The regular expression pattern had one of the mutually exclusive
2413modifiers repeated. Remove all but one of the occurrences.
2414
2415=item Regexp modifiers "/%c" and "/%c" are mutually exclusive
2416
2417(F syntax) The regular expression pattern had more than one of the mutually
2418exclusive modifiers. Retain only the modifier that is supposed to be there.
2419
2420=item Insecure user-defined property %s
2421
2422(F) Perl detected tainted data when trying to compile a regular
2423expression that contains a call to a user-defined character property
2424function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>.
2425See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
2426
2427=back
2428
2429=head2 Changes to Existing Diagnostics
2430
2431=over 4
2432
2433=item *
2434
4ed2cea4
FC
2435The "Variable $foo is not imported" warning that precedes a
2436C<strict 'vars'> error has now been assigned the "misc" category, so that
2437C<no warnings> will suppress it [perl #73712].
2438
2439=item *
2440
5076a392
FC
2441C<warn> and C<die> now produce 'Wide character' warnings when fed a
2442character outside the byte range if STDERR is a byte-sized handle.
2443
2444=item *
2445
2446The 'Layer does not match this perl' error message has been replaced with
2447these more helpful messages:
2448
2449=over 4
2450
2451=item *
2452
2453PerlIO layer function table size (%d) does not match size expected by this
2454perl (%d)
2455
2456=item *
2457
2458PerlIO layer instance size (%d) does not match size expected by this perl
2459(%d)
2460
2461=back
2462
2463[perl #73754]
2464
2465=item *
2466
2467The "Found = in conditional" warning that is emitted when a constant is
2468assigned to a variable in a condition is now withheld if the constant is
2469actually a subroutine or one generated by C<use constant>, since the value
2470of the constant may not be known at the time the program is written
2471[perl #77762].
2472
2473=item *
2474
2475Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and
2476C<gethostent> functions were implemented on a given platform, they would
2477all die with the message 'Unsupported socket function "gethostent" called',
2478with analogous messages for C<getnet*> and C<getserv*>. This has been
2479corrected.
2480
2481=item *
2482
2483The warning message about regex unrecognized escapes passed through is
2484changed to include any literal '{' following the 2-char escape. e.g.,
2485"\q{" will include the { in the message as part of the escape
2486(216bfc0).
2487
2488=item *
2489
2490C<binmode $fh, ':scalar'> no longer warns (8250589)
2491
2492Perl will now no longer produce this warning:
2493
2494 $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"'
2495 Use of uninitialized value in binmode at -e line 1.
2496
2497=back
2498
2499=head1 Utility Changes
2500
2501=head3 L<perldb>
2502
2503=over
2504
2505=item *
2506
2507The remote terminal works after forking and spawns new sessions - one
2508for each forked process (11653f7)
2509
2510=item *
2511
2512Uses the less pager path from Config instead of searching for it (bf320d6)
2513
2514=back
2515
2516=head3 L<h2ph>
2517
2518=over 4
2519
2520=item *
2521
2522The use of a deprecated C<goto> construct has been removed [perl #74404].
2523
2524=back
2525
2526=head3 L<ptargrep>
2527
2528=over 4
2529
2530=item *
2531
2532L<ptargrep> is a utility to apply pattern matching to the contents of files
2533in a tar archive. It comes with C<Archive::Tar>.
2534
2535=back
2536
2537=head3 C<perlbug>
2538
2539=over 4
2540
2541=item *
2542
4ed2cea4
FC
2543C<perlbug> now looks in the EMAIL environment variable for a return address
2544if the REPLY-TO and REPLYTO variables are empty.
2545
2546=item *
2547
5076a392
FC
2548C<perlbug> did not previously generate a From: header, potentially
2549resulting in dropped mail. Now it does include that header.
2550
2551=back
2552
2553=head3 C<buildtoc>
2554
2555=over 4
2556
2557=item *
2558
2559F<pod/buildtoc> has been modernized and can now be used to test the
2560well-formedness of F<pod/perltoc.pod> automatically.
2561
2562=back
2563
2564=head3 L<perlbug>
2565
2566=over 4
2567
2568=item *
2569
2570[perl #82996] Use the user's from address as return-path in perlbug
2571
2572Many systems these days don't have a valid Internet domain name and
2573perlbug@perl.org does not accept email with a return-path that does
2574not resolve. Therefore pass the user's address to sendmail so it's
2575less likely to get stuck in a mail queue somewhere. (019cfd2)
2576
2577=back
2578
2579=head1 Configuration and Compilation
2580
61752d82
FC
2581See also L</"Naming fixes in Policy_sh.SH may invalidate Policy.sh">,
2582above.
2583
5076a392
FC
2584=over 4
2585
2586=item *
2587
2588Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under
2589$(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME).
2590
2591=item *
2592
2593This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and
2594'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now
2595set correctly (23ae7f).
2596
2597=item *
2598
2599Adjusted 'make test.valgrind' to account for cpan/dist/ext separation
2600(e07ce2e)
2601
2602=item *
2603
2604Compatibility with C<C++> compilers has been improved.
2605
2606=item *
2607
2608On compilers that support it, C<-Wwrite-strings> is now added to cflags by
2609default.
2610
2611=item *
2612
2613The C<Encode> module can now (once again) be included in a static Perl
2614build. The special-case handling for this situation got broken in Perl
26155.11.0, and has now been repaired.
2616
2617=back
2618
2619=head1 Testing
2620
2621XXX Any significant changes to the testing of a freshly built perl should be
2622listed here. Changes which create B<new> files in F<t/> go here as do any
2623large changes to the testing harness (e.g. when parallel testing was added).
2624Changes to existing files in F<t/> aren't worth summarising, although the bugs
2625that they represent may be covered elsewhere.
2626
2627=over 4
2628
2629=item *
2630
2631F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
2632
2633=item *
2634
2635Many common testing routines were refactored into t/lib/common.pl
2636
2637=item *
2638
2639Several test files have been modernized to use Test::More
2640
2641=item *
2642
2643F<t/op/print.t> has been added to test implicit printing of C<$_>.
2644
2645=item *
2646
2647F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when
2648leaving signal handlers.
2649
2650=item *
2651
2652F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once
2653on tied variables.
2654
2655=item *
2656
2657F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested,
2658L<Tie::ExtraHash> keeps working.
2659
2660=item *
2661
2662F<t/re/overload.t> has been added to test against string corruption in pattern
2663matches on overloaded objects. This is a TODO test.
2664
2665=item *
2666
2667The new F<t/lib/universal.t> script tests the Internal::* functions and other
2668things in F<universal.c>.
2669
2670=item *
2671
2672A rare race condition in F<t/op/while_readdir.t> has been fixed, stopping it
2673from failing randomly when running tests in parallel.
2674
2675=item *
2676
2677The new F<t/op/leaky-magic.t> script tests that magic applied to variables in
2678the main packages does not affect other packages.
2679
2680=item *
2681
2682The script F<t/op/threads-dirh.t> has been added, which tests interaction
2683of threads and directory handles.
2684
2685=item *
2686
2687The new F<t/mro/isa_aliases.t> has been added, which tests that
2688C<*Foo::ISA = *Bar::ISA> works properly.
2689
2690=item *
2691
2692F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible
2693at the Perl level via C<mro::get_isarev>) is updated properly.
2694
2695=item *
2696
2697F<t/run/switchd-78586.t> has been added, which tests that [perl #78586]
2698has been fixed (related to line numbers in the debugger).
2699
2700=item *
2701
2702C<lib/File/DosGlob.t> has been modernized and now uses C<Test::More>.
2703
2704=item *
2705
2706A new test script, C<t/porting/filenames.t>, makes sure that filenames and
2707paths are reasonably portable.
2708
2709=item *
2710
2711C<t/porting/diag.t> is now several orders of magnitude faster.
2712
2713=item *
2714
2715C<t/porting/buildtoc.t> now tests that the documentation TOC file is current and well-formed.
2716
2717=item *
2718
2719C<t/base/while.t> now tests the basics of a while loop with minimal dependencies.
2720
2721=item *
2722
2723C<t/cmd/while.t> now uses F<test.pl> for better maintainability.
2724
2725=item *
2726
2727C<t/op/split.t> now tests calls to C<split> without any pattern specified.
2728
2729=item *
2730
2731F<porting/FindExt.t> now skips all tests on a static (-Uusedl) build
2732of perl.
2733
2734=item *
2735
2736F<porting/FindExt.t> now passes on non-Win32 platforms when some
2737extensions are built statically.
2738
2739=item *
2740
2741The tests for C<split /\s/> and Unicode have been moved from
2742F<t/op/split.t> to the new F<t/op/split_unicode.t>.
2743
2744=item *
2745
2746F<t/re/re.t> has been moved to F<ext/re/t/re_funcs_u.t>.
2747
2748=item *
2749
2750The tests for [perl #72922] have been moved from F<t/re/qr.t> to the new
2751F<t/re/qr-72922.t>.
2752
2753=item *
2754
2755F<t/re/reg_unsafe.t> has been deleted and its only test moved to
2756F<t/re/pat_advanced.t>.
2757
2758=back
2759
2760=head1 Platform Support
2761
2762XXX Any changes to platform support should be listed in the sections below.
2763
2764[ Within the sections, list each platform as a =item entry with specific
2765changes as paragraphs below it. ]
2766
2767=head2 New Platforms
2768
2769XXX List any platforms that this version of perl compiles on, that previous
2770versions did not. These will either be enabled by new files in the F<hints/>
2771directories, or new subdirectories and F<README> files at the top level of the
2772source tree.
2773
2774=over 4
2775
2776=item AIX
2777
2778Perl now builds on AIX 4.2.
2779
2780=back
2781
2782=head2 Discontinued Platforms
2783
2784=over 4
2785
2786=item MacOS Classic
2787
2788Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
2789December 2004. Vestigial MacOS Classic specific code has now been removed
2790from other core modules as well (8f8c2a4..c457df0)
2791
2792=item Apollo DomainOS
2793
2794The last vestiges of support for this platform have been excised from the
2795Perl distribution. It was officially discontinued in version 5.12.0. It had
2796not worked for years before that.
2797
2798=item MacOS Classic
2799
2800The last vestiges of support for this platform have been excised from the
2801Perl distribution. It was officially discontinued in an earlier version.
2802
2803=back
2804
2805=head2 Platform-Specific Notes
2806
2807=head3 Recent OpenBSDs now use perl's malloc
2808
2809OpenBSD E<gt> 3.7 has a new malloc implementation which is mmap based
2810and as such can release memory back to the OS; however for perl using
2811this malloc causes a substantial slowdown so we now default to using
2812perl's malloc instead (RT #75742) (9b58b5).
2813
2814=head3 VMS
2815
2816=over 4
2817
2818=item *
2819
2820Make C<PerlIOUnix_open> honour default permissions on VMS.
2821
2822When C<perlio> became the default and C<unixio> became the default bottom layer,
2823the most common path for creating files from Perl became C<PerlIOUnix_open>,
2824which has always explicitly used C<0666> as the permission mask.
2825
2826To avoid this, C<0777> is now passed as the permissions to C<open()>. In the
2827VMS CRTL, C<0777> has a special meaning over and above intersecting with the
2828current umask; specifically, it allows Unix syscalls to preserve native default
2829permissions.
2830
2831=back
2832
2833=head3 Win32
2834
2835t/io/openpid.t now uses the alarm() watchdog strategy for more
2836robustness (5732108)
2837
2838=over 4
2839
2840=item *
2841
2842Fixed a possible hang in F<t/op/readline.t>.
2843
2844=item *
2845
2846Fixed build process for SDK2003SP1 compilers.
2847
2848=item *
2849
2850When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set
2851in C<$Config{ccflags}>. This improves portability when compiling XS extensions
2852using new compilers, but for a perl compiled with old 32-bit compilers.
2853
2854=back
2855
2856XXX A bunch of entries that need conversion to =head2 format (unless the
2857entries above change to =items):
2858
2859=over
2860
2861=item IRIX
2862
2863Conversion of strings to floating-point numbers is now more accurate on
2864IRIX systems [perl #32380].
2865
2866=item Mac OS X
2867
2868Early versions of Mac OS X (Darwin) had buggy implementations of the
2869C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl
2870would pretend they did not exist.
2871
2872These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and
2873higher, as they have been fixed [perl #72990].
2874
2875=item OpenVOS
2876
2877perl now builds again with OpenVOS (formerly known as Stratus VOS)
2878[perl #78132].
2879
2880=item VMS
2881
2882The shortening of symbols longer than 31 characters in the C sources is
2883now done by the compiler rather than by xsubpp (which could only do so
2884for generated symbols in XS code).
2885
2886=item Windows
2887
2888C<$Config{gccversion}> is now set correctly when perl is built using the
2889mingw64 compiler from L<http://mingw64.org> [perl #73754].
2890
2891The build process proceeds more smoothly with mingw and dmake when
2892F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix.
2893
2894=item Windows
2895
2896Directory handles are now properly cloned when threads are created. In perl
28975.13.6, child threads simply stopped inheriting directory handles. In
2898previous versions, threads would share handles, resulting in crashes.
2899
2900Support for building with Visual C++ 2010 is now underway, but is not yet
2901complete. See F<README.win32> for more details.
2902
2903=item VMS
2904
2905Record-oriented files (record format variable or variable with fixed control)
2906opened for write by the perlio layer will now be line buffered to prevent the
2907introduction of spurious line breaks whenever the perlio buffer fills up.
2908
2909=item NetBSD
2910
2911The NetBSD hints file has been changed to make the system's malloc the
2912default.
2913
2914=item Windows
2915
2916The option to use an externally-supplied C<crypt()>, or to build with no
2917C<crypt()> at all, has been removed. Perl supplies its own C<crypt()>
2918implementation for Windows, and the political situation that required
2919this part of the distribution to sometimes be omitted is long gone.
2920
2921=item Cygwin
2922
2923=over
2924
2925=item *
2926
2927Updated MakeMaker to build man pages on cygwin.
2928
2929=item *
2930
2931Improved rebase behaviour
2932
2933If a dll is updated on cygwin reuse the old imagebase address.
2934This solves most rebase errors, esp when updating on core dll's.
2935See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information.
2936
2937=item *
2938
2939Support the standard cyg dll prefix, which is e.g. needed for FFI's.
2940
2941=item *
2942
2943Updated build hints file
2944
2945=back
2946
2947
2948=item Solaris
2949
2950DTrace is now supported on Solaris. There used to be build failures, but
2951these have been fixed [perl #73630].
2952
2953=item Windows
2954
2955=over 4
2956
2957=item *
2958
2959The C<test-prep> build target now depends on F<pod/perltoc.pod> to allow the
2960F<t/porting/buildtoc.t> test to run successfully.
2961
2962=back
2963
2964=item MirBSD
2965
2966=over 4
2967
2968=item *
2969
2970[perl #82988] Skip hanging taint.t test on MirBSD 10 (1fb83d0)
2971
2972Skip a hanging test under MirBSD that was already being skipped under
2973OpenBSD.
2974
2975=item *
2976
2977Previously if you build perl with a shared libperl.so on MirBSD (the
2978default config), it will work up to the installation; however, once
2979installed, it will be unable to find libperl. Treat path handling
2980like in the other BSD dialects.
2981
2982=back
2983
2984=back
2985
2986=head1 Internal Changes
2987
aa81da68 2988See also L</New C APIs>, L</C API Changes> and L</Deprecated C APIs>, above.
f8e88449 2989
5076a392
FC
2990=over 4
2991
2992=item *
2993
2994The protocol for unwinding the C stack at the last stage of a C<die>
2995has changed how it identifies the target stack frame. This now uses
2996a separate variable C<PL_restartjmpenv>, where previously it relied on
2997the C<blk_eval.cur_top_env> pointer in the C<eval> context frame that
2998has nominally just been discarded. This change means that code running
2999during various stages of Perl-level unwinding no longer needs to take
3000care to avoid destroying the ghost frame.
3001
3002=item *
3003
3004The format of entries on the scope stack has been changed, resulting in a
3005reduction of memory usage of about 10%. In particular, the memory used by
3006the scope stack to record each active lexical variable has been halved.
3007
3008=item *
3009
3010Memory allocation for pointer tables has been changed. Previously
3011C<Perl_ptr_table_store> allocated memory from the same arena system as C<SV>
3012bodies and C<HE>s, with freed memory remaining bound to those arenas until
3013interpreter exit. Now it allocates memory from arenas private to the specific
3014pointer table, and that memory is returned to the system when
3015C<Perl_ptr_table_free> is called. Additionally, allocation and release are both
3016less CPU intensive.
3017
3018=item *
3019
3020A new function, Perl_magic_methcall has been added that wraps the setup needed
3021to call a magic method like FETCH (the existing S_magic_methcall function has
3022been renamed S_magic_methcall1).
3023
3024=item *
3025
3026The implementation of sv_dup_inc() has changed from a macro to a function.
3027
3028=item *
3029
3030The C<find_rundefsvoffset> function has been deprecated. It appeared that
3031its design was insufficient to reliably get the lexical C<$_> at run-time.
3032
3033Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead.
3034They directly return the right SV representing C<$_>, whether it's lexical
3035or dynamic (789bd8 .. 03d5bc).
3036
3037=item *
3038
3039The following new functions or macros have been added to the public API:
3040C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>.
3041
3042=item *
3043
3044The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a
3045noop but should still be used to ensure past and future compatibility.
3046
3047=item *
3048
3049The ibcmp_* functions have been renamed and are now called foldEQ,
3050foldEQ_locale and foldEQ_utf8 (e6226b).
3051
3052=item *
3053
3054Under some circumstances, the C<CvGV()> field of a CV is now reference
3055counted. To ensure consistent behaviour, direct assignment to it, for
3056example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
3057C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
3058Note that modification of this field is not part of of the public API,
3059regardless of this new macro. This change caused some
3060L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
3061field.
3062
3063=item *
3064
3065It is now possible for XS code to hook into Perl's lexical scope
3066mechanism at compile time, using the new C<Perl_blockhook_register>
3067function. See L<perlguts/"Compile-time scope hooks">.
3068
3069=item *
3070
3071Added C<Perl_croak_no_modify()> to implement
3072C<Perl_croak("%s", PL_no_modify)> (6ad8f25)
3073
3074=item *
3075
3076Added prototypes for C<tie()> and C<untie()> to allow overloading (RT#75902)
3077(1db4d19)
3078
3079=item *
3080
3081Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
3082C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
3083variants that allow us to control this. (0d7d409)
3084
3085=item *
3086
3087Removed C<PERL_POLLUTE>
3088
3089The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards
3090compatibility has been removed. It's use was always discouraged, and MakeMaker
3091contains a more specific escape hatch:
3092
3093 perl Makefile.PL POLLUTE=1
3094
3095This can be used for modules that have not been upgraded to 5.6 naming
3096conventions (and really should be completely obsolete by now).
3097
3098=item *
3099
3100Added C<PERL_STATIC_INLINE>
3101
3102The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
3103incantation to use for static inline functions, if the C compiler supports
3104C99-style static inline. If it doesn't, it'll give a plain C<static>.
3105
3106C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
3107inline functions.
3108
3109=item *
3110
3111C<CALL_FPTR> and C<CPERLscope> have been deprecated.
3112
3113Those are left from an old implementation of C<MULTIPLICITY> using C++ objects,
3114which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so
3115they shouldn't be used anymore.
3116
3117For compatibility, they are still defined for external C<XS> code. Only
3118extensions defining C<PERL_CORE> must be updated now.
3119
3120=item *
3121
3122C<lex_stuff_pvs()> has been added as a convenience macro wrapping
3123C<lex_stuff_pvn()> for literal strings.
3124
3125=item *
3126
3127The recursive part of the peephole optimizer is now hookable.
3128
3129In addition to C<PL_peepp>, for hooking into the toplevel peephole optimizer, a
3130C<PL_rpeepp> is now available to hook into the optimizer recursing into
3131side-chains of the optree.
3132
3133=item *
3134
3135See L</Regular expressions retain their localeness when interpolated>,
3136above.
3137
3138=item *
3139
3140The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and
3141C<sv_collxfrm_flags> functions have been added. These are like their
3142non-_flags counterparts, but allow one to specify whether get-magic is
3143processed.
3144
3145The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have
3146been replaced with wrappers around the new functions.
3147
3148=item *
3149
3150A new C<sv_2bool_flags> function has been added.
3151
3152This is like C<sv_2bool>, but it lets the calling code decide whether
3153get-magic is handled. C<sv_2bool> is now a macro that calls the new
3154function.
3155
3156=item *
3157
3158A new macro, C<SvTRUE_nomg>, has been added.
3159
3160This is like C<SvTRUE>, except that it does not process magic. It uses the
3161new C<sv_2bool_flags> function.
3162
3163=item *
3164
3165C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the
3166source string) if the flags passed to it do not include SV_GMAGIC. So it
3167now matches the documentation.
3168
3169=item *
3170
3171A new interface has been added for custom check hooks on subroutines. See
3172L</Custom per-subroutine check hooks>, above.
3173
3174=item *
3175
3176List op building functions have been added to the
3177API. See L<op_append_elem|perlapi/op_append_elem>,
3178L<op_append_list|perlapi/op_append_list>, and
3179L<op_prepend_elem|perlapi/op_prepend_elem>.
3180
3181=item *
3182
3183The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that
3184constructs the execution-order op chain, has been added to the API.
3185
3186=item *
3187
3188Many functions ending with pvn now have equivalent pv/pvs/sv versions.
3189
3190=item *
3191
3192The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr>
3193functions have been added to the API.
3194
3195=item *
3196
3197The new API function C<parse_stmtseq()> parses a sequence of statements, up
3198to closing brace or EOF.
3199
3200=item *
3201
3202C<lex_start> has been added to the API, but is considered experimental.
3203
3204=item *
3205
3206A new C<parse_block> function has been added to the API [perl #78222].
3207
3208=item *
3209
3210A new, experimental API has been added for accessing the internal
3211structure that Perl uses for C<%^H>. See the functions beginning with
3212C<cophh_> in L<perlapi>.
3213
3214=item *
3215
3216A stash can now have a list of effective names in addition to its usual
3217name. The first effective name can be accessed via the C<HvENAME> macro,
3218which is now the recommended name to use in MRO linearisations (C<HvNAME>
3219being a fallback if there is no C<HvENAME>).
3220
3221These names are added and deleted via C<hv_ename_add> and
3222C<hv_ename_delete>. These two functions are I<not> part of the API.
3223
3224=item *
3225
3226The way the parser handles labels has been cleaned up and refactored. As a
3227result, the C<newFOROP()> constructor function no longer takes a parameter
3228stating what label is to go in the state op.
3229
3230=item *
3231
3232The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line
3233number as a parameter.
3234
3235=item *
3236
3237A new C<parse_barestmt()> function has been added, for parsing a statement
3238without a label.
3239
3240=item *
3241
3242A new C<parse_label()> function has been added, that parses a statement
3243label, separate from statements.
3244
3245=item *
3246
3247The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()>
3248has been added to replace assignment to C<CvSTASH()>. This is to ensure
3249that backreferences are handled properly. These macros are not part of the
3250API.
3251
3252=item *
3253
3254The C<op_scope()> and C<op_lvalue()> functions have been added to the API,
3255but are considered experimental.
3256
3257=item *
3258
3259The L<C<mg_findext()>|perlapi/mg_findext> and
3260L<C<sv_unmagicext()>|perlapi/sv_unmagicext>
3261functions have been added to the API.
3262They allow extension authors to find and remove magic attached to
3263scalars based on both the magic type and the magic virtual table, similar to how
3264C<sv_magicext()> attaches magic of a certain type and with a given virtual table
3265to a scalar. This eliminates the need for extensions to walk the list of
3266C<MAGIC> pointers of an C<SV> to find the magic that belongs to them.
3267
3268=item *
3269
3270The
3271L<C<parse_fullexpr()>|perlapi/parse_fullexpr>,
3272L<C<parse_listexpr()>|perlapi/parse_listexpr>,
3273L<C<parse_termexpr()>|perlapi/parse_termexpr>, and
3274L<C<parse_arithexpr()>|perlapi/parse_arithexpr>
3275functions have been added to the API. They perform
3276recursive-descent parsing of expressions at various precedence levels.
3277They are expected to be used by syntax plugins.
3278
3279=item *
3280
3281The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> have
3282been merged. The implementation functions C<Perl_do_chop()> and
3283C<Perl_do_chomp()>, never part of the public API, have been merged and moved to
3284a static function in F<pp.c>. This shrinks the perl binary slightly, and should
3285not affect any code outside the core (unless it is relying on the order of side
3286effects when C<chomp> is passed a I<list> of values).
3287
3288=item *
3289
3290Some of the flags parameters to the uvuni_to_utf8_flags() and
3291utf8n_to_uvuni() have changed. This is a result of Perl now allowing
3292internal storage and manipulation of code points that are problematic
3293in some situations. Hence, the default actions for these functions has
3294been complemented to allow these code points. The new flags are
3295documented in L<perlapi>. Code that requires the problematic code
3296points to be rejected needs to change to use these flags. Some flag
3297names are retained for backward source compatibility, though they do
3298nothing, as they are now the default. However the flags
3299C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and
3300C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a
3301fundamentally broken model of how the Unicode non-character code points
3302should be handled, which is now described in
3303L<perlunicode/Non-character code points>. See also L</Selected Bug Fixes>.
3304
3305=item *
3306
3307Certain shared flags in the C<pmop.op_pmflags> and C<regexp.extflags>
3308structures have been removed. These are: C<Rxf_Pmf_LOCALE>,
3309C<Rxf_Pmf_UNICODE>, and C<PMf_LOCALE>. Instead there are encodes and
3310three static in-line functions for accessing the information:
3311C<get_regex_charset()>, C<set_regex_charset()>, and C<get_regex_charset_name()>,
3312which are defined in the places where the original flags were.
3313
3314=item *
3315
3316A new option has been added to C<pv_escape> to dump all characters above
3317ASCII in hexadecimal. Before, one could get all characters as hexadecimal
3318or the Latin1 non-ASCII as octal
3319
3320
3321=item *
3322
3323Generate pp_* prototypes in pp_proto.h, and remove pp.sym
3324
3325Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
3326locations that relied on them.
3327
3328regen/opcode.pl now generates prototypes for the PP functions directly, into
3329pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
3330this, removing the only ordering dependency in the regen scripts. opcode.pl
3331is now responsible for prototypes for pp_* functions. (embed.pl remains
3332responsible for ck_* functions, reading from regen/opcodes)
3333
3334=item *
3335
3336Fix harmless invalid read in Perl_re_compile() (f6d9469)
3337
3338[perl #2460] described a case where electric fence reported an invalid
3339read. This could be reproduced under valgrind with blead and -e'/x/',
3340but only on a non-debugging build.
3341
3342This was because it was checking for certain pairs of nodes (e.g. BOL + END)
3343and wasn't allowing for EXACT nodes, which have the string at the next
3344node position when using a naive NEXTOPER(first). In the non-debugging
3345build, the nodes aren't initialised to zero, and a 1-char EXACT node isn't
3346long enough to spill into the type field of the "next node".
3347
3348Fix this by only using NEXTOPER(first) when we know the first node is
3349kosher.
3350
3351=item *
3352
3353Break out the generated function Perl_keywords() into F<keywords.c>, a new file. (26ea9e1)
3354
3355As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is
3356no longer static, and the two macro definitions move from toke.c to perl.h
3357
3358Previously, one had to cut and paste the output of perl_keywords.pl into the
3359middle of toke.c, and it was not clear that it was generated code.
3360
3361=item *
3362
3363A lot of tests have been ported from Test to Test::More, e.g. in
33643842ad6.
3365
3366=item *
3367
3368Increase default PerlIO buffer size. (b83080d)
3369
3370The previous default size of a PerlIO buffer (4096 bytes) has been increased
3371to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling
3372this decade-old default increases read and write performance in the neighborhood
3373of 25% to 50% when using the default layers of perlio on top of unix. To choose
3374a non-default size, such as to get back the old value or to obtain and even
3375larger value, configure with:
3376
3377 ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N
3378
3379where N is the desired size in bytes; it should probably be a multiple of
3380your page size.
3381
3382=back
3383
3384=head1 Selected Bug Fixes
3385
3386=over 4
3387
3388=item *
3389
4ed2cea4
FC
3390C<when(scalar){...}> no longer crashes, but produces a syntax error
3391[perl #74114].
3392
3393=item *
3394
3395The C-level C<lex_stuff_pvn> function would sometimes cause a spurious
3396syntax error on the last line of the file if it lacked a final semicolon
3397[perl #74006].
3398
3399=item *
3400
3401The regular expression engine no longer loops when matching
3402C<"\N{LATIN SMALL LIGATURE FF}" =~ /f+/i> and similar expressions
3403[perl #72998].
3404
3405=item *
3406
3407A label right before a string eval (C<foo: eval $string>) no longer causes
3408the label to be associated also with the first statement inside the eval
3409[perl #74290] (5.12.1).
3410
3411=item *
3412
5076a392
FC
3413Naming a deprecated character in \N{...} will not leak memory.
3414
3415=item *
3416
3417FETCH is no longer called needlessly on some tied variables.
3418
3419=item *
3420
3421The trie runtime code should no longer allocate massive amounts of memory,
3422fixing #74484.
3423
3424=item *
3425
3426Timely cleanup of SVs that are cloned into a new thread but then
3427discovered to be orphaned (i.e. their owners are -not- cloned) (e42956)
3428
3429=item *
3430
3431Don't accidentally clone lexicals in scope within active stack frames in
3432the parent when creating a child thread (RT #73086) (05d04d).
3433
3434=item *
3435
3436Avoid loading feature.pm when 'no 5.13.2;' or similar is
3437encountered (faee19).
3438
3439=item *
3440
3441Trap invalid use of SvIVX on SVt_REGEXP when assertions are on
3442(e77da3)
3443
3444=item *
3445
3446Don't stamp on $DB::single, $DB::trace and $DB::signal if they
3447already have values when $^P is assigned to (RT #72422) (4c0f30).
3448
3449=item *
3450
3451chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92)
3452
3453=item *
3454
3455Defer signal handling when shared SV locks are held to avoid
3456deadlocks (RT #74868) (65c742).
3457
3458=item *
3459
3460glob() no longer crashes when %File::Glob:: is empty and
3461CORE::GLOBAL::glob isn't present (4984aa).
3462
3463=item *
3464
3465perlbug now always permits the sender address to be changed
3466before sending - if you were having trouble sending bug reports before
3467now, this should fix it, we hope (e6eb90).
3468
3469=item *
3470
3471Overloading now works properly in conjunction with tied
3472variables. What formerly happened was that most ops checked their
3473arguments for overloading I<before> checking for magic, so for example
3474an overloaded object returned by a tied array access would usually be
3475treated as not overloaded (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f).
3476
3477=item *
3478
3479Independently, a bug was fixed that prevented $tied-E<gt>() from
3480always calling FETCH correctly (RT #8438) (7c7501)
3481
3482=item *
3483
3484Some work has been done on the internal pointers that link between symbol
3485tables (stashes), typeglobs and subroutines. This has the effect that
3486various edge cases related to deleting stashes or stash entries (e.g.
3487<%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
3488longer crash the interpreter.
3489
3490=item *
3491
3492Fixed readline() when interrupted by signals so it no longer returns
3493the "same thing" as before or random memory
3494
3495=item *
3496
3497Fixed a regression of kill() when a match variable is used for the
3498process ID to kill (RT#75812) (8af710e)
3499
3500=item *
3501
3502Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
3503used for sorting (RT#72334) (8f443ca)
3504
3505=item *
3506
3507Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
3508
3509=item *
3510
3511Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
3512
3513=item *
3514
3515Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
3516
3517=item *
3518
3519Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12
3520(da8fb5d)
3521
3522=item *
3523
3524Avoids multiple FETCH/stringify on filetest ops (40c852d)
3525
3526=item *
3527
3528Fixed issue with string C<eval> not detecting taint of overloaded/tied
3529arguments (RT #75716) (895b760)
3530
3531=item *
3532
3533Fix potential crashes of string C<eval> when evaluating a object with
3534overloaded stringification by creating a stringified copy when necessary
3535(3e5c018)
3536
3537=item *
3538
3539Fixed bug where overloaded stringification could remove tainting
3540(RT #75716) (a02ec77)
3541
3542=item *
3543
3544Plugs more memory leaks in vms.c. (9e2bec0)
3545
3546=item *
3547
3548Fix pthread include error for Time::Piece (e9f284c)
3549
3550=item *
3551
3552A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
3553C<@DB::args> has been fixed.
3554
3555=item *
3556
3557Several memory leaks when loading XS modules were fixed.
3558
3559=item *
3560
3561A panic in the regular expression optimizer has been fixed (RT#75762).
3562
3563=item *
3564
3565Assignments to lvalue subroutines now honor copy-on-write behavior again, which
3566has been broken since version 5.10.0 (RT#75656).
3567
3568=item *
3569
3570Assignments to glob copies now behave just like assignments to regular globs
3571(RT#1804).
3572
3573=item *
3574
3575Within signal handlers, C<$!> is now implicitly localized.
3576
3577=item *
3578
3579L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
3580arguments.
3581
3582=item *
3583
3584L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
3585L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">,
3586and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination
3587with lvalues, result in leaking the scalar value they operate on, and cause its
3588destruction to happen too late. This has now been fixed.
3589
3590=item *
3591
3592Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in
35935.13.3, now works again.
3594
3595=item *
3596
3597A regression introduced in Perl 5.12.0, making
3598C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been
3599fixed. C<$x> will now be C<undef>.
3600
3601=item *
3602
3603A fatal error in regular expressions when processing UTF-8 data has been fixed [perl #75680].
3604
3605=item *
3606
54c7bb16 3607An erroneous regular expression engine optimisation that caused regex verbs like
5076a392
FC
3608C<*COMMIT> to sometimes be ignored has been removed.
3609
3610=item *
3611
3612The Perl debugger now also works in taint mode [perl #76872].
3613
3614=item *
3615
3616Several memory leaks in cloning and freeing threaded Perl interpreters have been
3617fixed [perl #77352].
3618
3619=item *
3620
3621A possible string corruption when doing regular expression matches on overloaded
3622objects has been fixed [perl #77084].
3623
3624=item *
3625
3626Magic applied to variables in the main package no longer affects other packages.
3627See L</Magic variables outside the main package> above [perl #76138].
3628
3629=item *
3630
3631Opening a glob reference via C<< open $fh, "E<gt>", \*glob >> will no longer
3632cause the glob to be corrupted when the filehandle is printed to. This would
3633cause perl to crash whenever the glob's contents were accessed
3634[perl #77492].
3635
3636=item *
3637
3638The postincrement and postdecrement operators, C<++> and C<-->, used to cause
3639leaks when being used on references. This has now been fixed.
3640
3641=item *
3642
3643A bug when replacing the glob of a loop variable within the loop has been fixed
3644[perl #21469]. This
3645means the following code will no longer crash:
3646
3647 for $x (...) {
3648 *x = *y;
3649 }
3650
3651=item *
3652
3653Perl would segfault if the undocumented C<Internals> functions that used
3654reference prototypes were called with the C<&foo()> syntax, e.g.
3655C<&Internals::SvREADONLY(undef)> [perl #77776].
3656
3657These functions now call C<SvROK> on their arguments before dereferencing them
3658with C<SvRV>, and we test for this case in F<t/lib/universal.t>.
3659
3660=item *
3661
3662When assigning a list with duplicated keys to a hash, the assignment used to
3663return garbage and/or freed values:
3664
3665 @a = %h = (list with some duplicate keys);
3666
3667This has now been fixed [perl #31865].
3668
3669=item *
3670
3671An earlier release of the 5.13 series of Perl changed the semantics of opening a
3672reference to a copy of a glob:
3673
3674 my $var = *STDOUT;
3675 open my $fh, '>', \$var;
3676
3677This was a mistake, and the previous behaviour from Perl 5.10 and 5.12, which is
3678to treat \$var as a scalar reference, has now been restored.
3679
3680=item *
3681
3682The regular expression bracketed character class C<[\8\9]> was effectively the
3683same as C<[89\000]>, incorrectly matching a NULL character. It also gave
3684incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the
3685same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are
3686unrecognized escape sequences, passed-through.
3687
3688=item *
3689
3690C<warn()> and C<die()> now respect utf8-encoded scalars [perl #45549].
3691
3692=item *
3693
3694A regular expression match in the right-hand side of a global substitution
3695(C<s///g>) that is in the same scope will no longer cause match variables
3696to have the wrong values on subsequent iterations. This can happen when an
3697array or hash subscript is interpolated in the right-hand side, as in
3698C<s|(.)|@a{ print($1), /./ }|g> [perl #19078].
3699
3700=item *
3701
3702Constant-folding used to cause
3703
3704 $text =~ ( 1 ? /phoo/ : /bear/)
3705
3706to turn into
3707
3708 $text =~ /phoo/
3709
3710at compile time. Now it correctly matches against C<$_> [perl #20444].
3711
3712=item *
3713
3714Parsing Perl code (either with string C<eval> or by loading modules) from
3715within a C<UNITCHECK> block no longer causes the interpreter to crash
3716[perl #70614].
3717
3718=item *
3719
3720When C<-d> is used on the shebang (C<#!>) line, the debugger now has access
3721to the lines of the main program. In the past, this sometimes worked and
3722sometimes did not, depending on what order things happened to be arranged
3723in memory [perl #71806].
3724
3725=item *
3726
3727The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH>
3728method of a tie) on its left-hand side just once, not twice [perl #76814].
3729
3730=item *
3731
3732String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and
3733C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic
3734(e.g., tie methods) twice on their operands [perl #76814].
3735
3736This bug was introduced in an earlier 5.13 release, and does not affect
3737perl 5.12.
3738
3739=item *
3740
3741When a tied (or other magic) variable is used as, or in, a regular
3742expression, it no longer has its C<FETCH> method called twice
3743[perl #76814].
3744
3745This bug was introduced in an earlier 5.13 release, and does not affect
3746perl 5.12.
3747
3748=item *
3749
3750The C<-C> command line option can now be followed by other options
3751[perl #72434].
3752
3753=item *
3754
3755Assigning a glob to a PVLV used to convert it to a plain string. Now it
3756works correctly, and a PVLV can hold a glob. This would happen when a
3757nonexistent hash or array element was passed to a subroutine:
3758
3759 sub { $_[0] = *foo }->($hash{key});
3760 # $_[0] would have been the string "*main::foo"
3761
3762It also happened when a glob was assigned to, or returned from, an element
3763of a tied array or hash [perl #36051].
3764
3765=item *
44691e6f 3766
5076a392
FC
3767Creating a new thread when directory handles were open used to cause a
3768crash, because the handles were not cloned, but simply passed to the new
3769thread, resulting in a double free.
44691e6f 3770
5076a392
FC
3771Now directory handles are cloned properly, on systems that have a C<fchdir>
3772function. On other systems, new threads simply do not inherit directory
3773handles from their parent threads [perl #75154].
44691e6f 3774
5076a392 3775=item *
44691e6f 3776
5076a392
FC
3777The regular expression parser no longer hangs when parsing C<\18> and
3778C<\88>.
44691e6f 3779
5076a392
FC
3780This bug was introduced in version 5.13.5 and did not affect earlier
3781versions [perl #78058].
b7188eb5 3782
5076a392 3783=item *
b7188eb5 3784
5076a392 3785Subroutine redefinition works once more in the debugger [perl #48332].
44691e6f 3786
5076a392 3787=item *
658a9f31 3788
5076a392
FC
3789The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments
3790[perl #20661].
658a9f31 3791
5076a392 3792=item *
658a9f31 3793
5076a392
FC
3794Stringifying a scalar containing -0.0 no longer has the affect of turning
3795false into true [perl #45133].
b7188eb5 3796
5076a392 3797=item *
b7188eb5 3798
5076a392
FC
3799Aliasing packages by assigning to globs or deleting packages by deleting
3800their containing stash elements used to have erratic effects on method
3801resolution, because the internal 'isa' caches were not reset. This has been
3802fixed.
b7188eb5 3803
5076a392 3804=item *
3aa0ac5a 3805
5076a392
FC
3806C<sort> with a custom sort routine could crash if too many nested
3807subroutine calls occurred from within the sort routine [perl #77930].
3aa0ac5a 3808
5076a392
FC
3809This bug was introduced in an earlier 5.13 release, and did not affect
3810perl 5.12.
3aa0ac5a 3811
5076a392 3812=item *
3aa0ac5a 3813
5076a392
FC
3814The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when
3815there is a syntax error and no C<G_KEEPERR> flag, and never set it if the
3816C<G_KEEPERR> flag is present [perl #3719].
270ca148 3817
5076a392 3818=item *
270ca148 3819
5076a392
FC
3820Nested C<map> and C<grep> blocks no longer leak memory when processing
3821large lists [perl #48004].
270ca148 3822
5076a392 3823=item *
44691e6f 3824
5076a392 3825Malformed C<version> objects no longer cause crashes [perl #78286].
44691e6f
AB
3826
3827=item *
3828
5076a392
FC
3829The interpreter no longer crashes when freeing deeply-nested arrays of
3830arrays. Hashes have not been fixed yet [perl #44225].
44691e6f 3831
5076a392 3832=item *
44691e6f 3833
5076a392
FC
3834The mechanism for freeing objects in globs used to leave dangling
3835pointers to freed SVs, meaning Perl users could see corrupted state
3836during destruction.
44691e6f 3837
5076a392
FC
3838Perl now only frees the affected slots of the GV, rather than freeing
3839the GV itself. This makes sure that there are no dangling refs or
3840corrupted state during destruction.
65484cb9 3841
5076a392 3842=item *
b7188eb5 3843
5076a392
FC
3844The typeglob C<*,>, which holds the scalar variable C<$,> (output field
3845separator), had the wrong reference count in child threads.
911a3729 3846
5076a392
FC
3847=item *
3848
3849C<splice> now calls set-magic. This means that, for instance, changes made
3850by C<splice @ISA> are respected by method calls [perl #78400].
452d0b70
DG
3851
3852=item *
3853
5076a392 3854C<use v5.8> no longer leaks memory [perl #78436].
911a3729 3855
5076a392 3856=item *
c8c13991 3857
5076a392
FC
3858The XS multicall API no longer causes subroutines to lose reference counts
3859if called via the multicall interface from within those very subroutines.
3860This affects modules like List::Util. Calling one of its functions with an
3861active subroutine as the first argument could cause a crash [perl #78070].
c8c13991 3862
5076a392
FC
3863=item *
3864
3865The C<parse_stmt> C function added in earlier in the 5.13.x series has been
3866fixed to work with statements ending with C<}> [perl #78222].
44691e6f 3867
f00d3350
BR
3868=item *
3869
5076a392
FC
3870The C<parse_fullstmt> C function added in 5.13.5 has been fixed to work
3871when called while an expression is being parsed.
fe3de278 3872
5076a392 3873=item *
35cdccfc 3874
5076a392
FC
3875Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match
3876themselves if the string happened to be UTF8-encoded internally, the
3877regular expression was not, and the character in the regular expression was
3878inside a repeated group (e.g.,
3879C<Encode::decode_utf8("\303\200") =~ /(\xc0)+/>) [perl #78464].
35cdccfc 3880
5076a392
FC
3881=item *
3882
3883The C<(?d)> regular expression construct now overrides a previous C<(?u)>
3884or C<use feature "unicode_string"> [perl #78508].
f5c40488
CBW
3885
3886=item *
3887
5076a392
FC
3888A memory leak in C<do "file">, introduced in perl 5.13.6, has been fixed
3889[perl #78488].
b7188eb5 3890
5076a392 3891=item *
b7188eb5 3892
5076a392
FC
3893Various bugs related to typeglob dereferencing have been fixed. See
3894L</Dereferencing typeglobs>, above.
0bb35765 3895
5076a392 3896=item *
911a3729 3897
5076a392
FC
3898The C<SvPVbyte> function available to XS modules now calls magic before
3899downgrading the SV, to avoid warnings about wide characters [perl #72398].
911a3729 3900
5076a392 3901=item *
58f55cb3 3902
5076a392
FC
3903The C<=> operator used to ignore magic (e.g., tie methods) on its
3904right-hand side if the scalar happened to hold a typeglob. This could
3905happen if a typeglob was the last thing returned from or assigned to a tied
3906scalar [perl #77498].
58f55cb3 3907
5076a392 3908=item *
6b3df227 3909
5076a392
FC
3910C<sprintf> was ignoring locales when called with constant arguments
3911[perl #78632].
6b3df227 3912
5076a392 3913=item *
c9989a74 3914
5076a392
FC
3915A non-ASCII character in the Latin-1 range could match both a Posix
3916class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is
3917now fixed for regular expressions compiled under the C<"u"> modifier.
3918See L</C<use feature "unicode_strings"> now applies to more regex matching>. [perl #18281].
c9989a74 3919
5076a392
FC
3920=item *
3921
3922Concatenating long strings under C<use encoding> no longer causes perl to
3923crash [perl #78674].
b7188eb5
FC
3924
3925=item *
3926
5076a392
FC
3927Typeglob assignments would crash if the glob's stash no longer existed, so
3928long as the glob assigned to was named 'ISA' or the glob on either side of
3929the assignment contained a subroutine.
911a3729 3930
5076a392 3931=item *
c8c13991 3932
5076a392
FC
3933Calling C<< ->import >> on a class lacking an import method could corrupt
3934the stack, resulting in strange behaviour. For instance,
c8c13991 3935
5076a392 3936 push @a, "foo", $b = bar->import;
f00d3350 3937
5076a392 3938would assign 'foo' to C<$b> [perl #63790].
c34a735e 3939
5076a392 3940=item *
b7188eb5 3941
5076a392
FC
3942Creating an alias to a package when that package had been detached from the
3943symbol table would result in corrupted isa caches [perl #77358].
b7188eb5 3944
5076a392 3945=item *
b7188eb5 3946
5076a392
FC
3947C<.=> followed by C<< <> >> or C<readline> would leak memory if C<$/>
3948contained characters beyond the octet range and the scalar assigned to
3949happened to be encoded as UTF8 internally [perl #72246].
c34a735e 3950
05dbc6f8
KW
3951=item *
3952
5076a392
FC
3953The C<recv> function could crash when called with the MSG_TRUNC flag
3954[perl #75082].
7b98b857 3955
5076a392 3956=item *
05dbc6f8 3957
5076a392
FC
3958Evaluating a simple glob (like C<*a>) was calling get-magic on the glob,
3959even when its contents were not being used [perl #78580].
05dbc6f8 3960
5076a392 3961This bug was introduced in 5.13.2 and did not affect earlier perl versions.
05dbc6f8 3962
5076a392
FC
3963=item *
3964
3965Matching a Unicode character against an alternation containing characters
3966that happened to match continuation bytes in the former's UTF8
3967representation (C<qq{\x{30ab}} =~ /\xab|\xa9/>) would cause erroneous
3968warnings [perl #70998].
05dbc6f8
KW
3969
3970=item *
3971
5076a392 3972C<s///r> (added in 5.13.2) no longer leaks.
05dbc6f8 3973
5076a392 3974=item *
05dbc6f8 3975
5076a392
FC
3976The trie optimisation was not taking empty groups into account, preventing
3977'foo' from matching C</\A(?:(?:)foo|bar|zot)\z/> [perl #78356].
05dbc6f8 3978
5076a392 3979=item *
05dbc6f8 3980
5076a392
FC
3981A pattern containing a C<+> inside a lookahead would sometimes cause an
3982incorrect match failure in a global match (e.g., C</(?=(\S+))/g>)
3983[perl #68564].
05dbc6f8 3984
5076a392 3985=item *
05dbc6f8 3986
5076a392
FC
3987Iterating with C<foreach> over an array returned by an lvalue sub now works
3988[perl #23790].
05dbc6f8
KW
3989
3990=item *
3991
5076a392
FC
3992C<$@> is now localised during calls to C<binmode> to prevent action at a
3993distance [perl #78844].
05dbc6f8 3994
5076a392 3995=item *
05dbc6f8 3996
5076a392
FC
3997C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now
3998updated properly when packages are deleted or removed from the C<@ISA> of
3999other classes. This allows many packages to be created and deleted without
4000causing a memory leak [perl #75176].
8079ad82 4001
5076a392 4002=item *
4d56cd4f 4003
5076a392
FC
4004C<undef *Foo::> and C<undef *Foo::ISA> and C<delete $package::{ISA}>
4005used not to update the internal isa caches if the
4006stash or C<@ISA> array had a reference elsewhere. In
4007fact, C<undef *Foo::ISA> would stop a new C<@Foo::ISA> array from updating
4008caches.
4d56cd4f 4009
5076a392
FC
4010=item *
4011
4012C<@ISA> arrays can now be shared between classes via
4013C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA> [perl #77238].
05dbc6f8 4014
911a3729
FC
4015=item *
4016
5076a392
FC
4017The parser no longer hangs when encountering certain Unicode characters,
4018such as U+387 [perl #74022].
911a3729 4019
5076a392 4020=item *
44691e6f 4021
5076a392
FC
4022C<formline> no longer crashes when passed a tainted format picture. It also
4023taints C<$^A> now if its arguments are tainted [perl #79138].
44691e6f 4024
5076a392 4025=item *
44691e6f 4026
5076a392
FC
4027A signal handler called within a signal handler could cause leaks or
4028double-frees. Now fixed. [perl #76248].
9dc513c5 4029
5076a392
FC
4030=item *
4031
4032When trying to report C<Use of uninitialized value $Foo::BAR>, crashes could
4033occur if the GLOB of the global variable causing the warning has been detached
4034from its original stash by, for example C<delete $::{'Foo::'}>. This has been
4035fixed by disabling the reporting of variable names in the warning in those
4036cases.
9dc513c5
DG
4037
4038=item *
4039
5076a392
FC
4040C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving
4041identically to C<use 5.12.0;>. Previously, C<require> in a C<BEGIN> block
4042was erroneously executing the C<use feature ':5.12.0'> and
4043C<use strict; use warnings;> behaviour, which only C<use> was documented to
4044provide [perl #69050].
9dc513c5 4045
5076a392 4046=item *
9dc513c5 4047
5076a392
FC
4048C<use 5.42> [perl #69050],
4049C<use 6> and C<no 5> no longer leak memory.
44691e6f 4050
5076a392 4051=item *
6d96b0fe 4052
5076a392 4053C<eval "BEGIN{die}"> no longer leaks memory on non-threaded builds.
6d96b0fe 4054
5076a392 4055=item *
6d96b0fe 4056
5076a392
FC
4057PerlIO no longer crashes when called recursively, e.g., from a signal
4058handler. Now it just leaks memory [perl #75556].
6d96b0fe 4059
5076a392 4060=item *
b7188eb5 4061
5076a392
FC
4062Defining a constant with the same name as one of perl's special blocks
4063(e.g., INIT) stopped working in 5.12.0, but has now been fixed
4064[perl #78634].
b7188eb5 4065
5076a392 4066=item *
b7188eb5 4067
5076a392
FC
4068A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used
4069to be stringified, even if the hash was tied [perl #79178].
44691e6f 4070
5076a392 4071=item *
44691e6f 4072
5076a392
FC
4073A closure containing an C<if> statement followed by a constant or variable
4074is no longer treated as a constant [perl #63540].
44691e6f 4075
5076a392 4076=item *
44691e6f 4077
5076a392
FC
4078Calling a closure prototype (what is passed to an attribute handler for a
4079closure) now results in a "Closure prototype called" error message instead
4080of a crash [perl #68560].
44691e6f 4081
5076a392 4082=item *
b7188eb5 4083
5076a392
FC
4084A regular expression optimisation would sometimes cause a match with a
4085C<{n,m}> quantifier to fail when it should match [perl #79152].
b7188eb5