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