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