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