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