5 perldelta - what is new for perl v5.14.0
9 This document describes differences between the 5.12.0 release and
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
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
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.
26 =head1 Core Enhancements
30 =head3 Unicode Version 6.0 is now supported (mostly)
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.
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}> continues 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 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.
53 =head3 Full functionality for C<use feature 'unicode_strings'>
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">.
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.
65 =head3 C<\N{I<NAME>}> and C<charnames> enhancements
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 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
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.
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 several
87 CJK (Chinese/Japanese/Korean) characters.
91 It is now possible to override Perl's abbreviations with your own custom aliases.
95 You can now create a custom alias of the ordinal of a
96 character, known by C<\N{I<NAME>}>, 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
104 The new function charnames::string_vianame() is a run-time version
105 of C<\N{I<NAME>}}>, 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.
112 See L<charnames> for details on all these changes.
114 =head3 New warnings categories for problematic (non-)Unicode code points.
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.
124 =head3 Any unsigned value can be encoded as a character
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) of lexical warnings have been explicitly turned off, outputting
131 or executing 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.
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".
143 =head3 Unicode database files not installed
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/>.
150 =head2 Regular Expressions
152 =head3 C<(?^...)> construct signifies default modifiers
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.
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)>.
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>.
167 This change is likely to break code that compares stringified regular
168 expressions with fixed strings containing C<?-xism>.
170 =head3 C</d>, C</l>, C</u>, C</a>, and C</aa> modifiers
172 Four new regular expression modifiers have been added. These are mutually
173 exclusive: one only can be turned on at a time.
179 The C</l> modifier says to compile the regular expression as if it were
180 in the scope of C<use locale>, even if it is not.
184 The C</u> modifier says to compile the regular expression as if it were
185 in the scope of a C<use feature 'unicode_strings'> pragma.
189 The C</d> (default) modifier is used to override any C<use locale> and
190 C<use feature 'unicode_strings'> pragmas in effect at the time
191 of compiling the regular expression.
195 The C</a> regular expression modifier restricts C<\s>, C<\d> and C<\w> and
196 the POSIX (C<[[:posix:]]>) character classes to the ASCII range. Their
197 complements and C<\b> and C<\B> are correspondingly
198 affected. Otherwise, C</a> behaves like the C</u> modifier, in that
199 case-insensitive matching uses Unicode semantics.
203 The C</aa> modifier is like C</a>, except that, in case-insensitive
204 matching, no ASCII character can match a non-ASCII character.
207 "k" =~ /\N{KELVIN SIGN}/ai
212 "k" =~ /\N{KELVIN SIGN}/aai
219 See L<perlre/Modifiers> for more detail.
221 =head3 Non-destructive substitution
223 The substitution (C<s///>) and transliteration
224 (C<y///>) operators now support an C</r> option that
225 copies the input variable, carries out the substitution on
226 the copy, and returns the result. The original remains unmodified.
229 my $new = $old =~ s/cat/dog/r;
230 # $old is "cat" and $new is "dog"
232 This is particularly useful with C<map>. See L<perlop> for more examples.
234 =head3 Re-entrant regular expression engine
236 It is now safe to use regular expressions within C<(?{...})> and
237 C<(??{...})> code blocks inside regular expressions.
239 These blocks are still experimental, however, and still have problems with
240 lexical (C<my>) variables and abnormal exiting.
242 =head3 C<use re '/flags'>
244 The C<re> pragma now has the ability to turn on regular expression flags
245 till the end of the lexical scope:
248 "foo" =~ / (.+) /; # /x implied
250 See L<re/"'/flags' mode"> for details.
252 =head3 \o{...} for octals
254 There is a new octal escape sequence, C<"\o">, in doublequote-like
255 contexts. This construct allows large octal ordinals beyond the
256 current max of 0777 to be represented. It also allows you to specify a
257 character in octal which can safely be concatenated with other regex
258 snippets and which won't be confused with being a backreference to
259 a regex capture group. See L<perlre/Capture groups>.
261 =head3 Add C<\p{Titlecase}> as a synonym for C<\p{Title}>
263 This synonym is added for symmetry with the Unicode property names
264 C<\p{Uppercase}> and C<\p{Lowercase}>.
266 =head3 Regular expression debugging output improvement
268 Regular expression debugging output (turned on by C<use re 'debug'>) now
269 uses hexadecimal when escaping non-ASCII characters, instead of octal.
271 =head3 Return value of C<delete $+{...}>
273 Custom regular expression engines can now determine the return value of
274 C<delete> on an entry of C<%+> or C<%->.
276 =head2 Syntactical Enhancements
278 =head3 Array and hash container functions accept references
280 B<Warning:> This feature is considered experimental, as the exact behaviour
281 may change in a future version of Perl.
283 All builtin functions that operate directly on array or hash
284 containers now also accept unblessed hard references to arrays
287 |----------------------------+---------------------------|
288 | Traditional syntax | Terse syntax |
289 |----------------------------+---------------------------|
290 | push @$arrayref, @stuff | push $arrayref, @stuff |
291 | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
292 | pop @$arrayref | pop $arrayref |
293 | shift @$arrayref | shift $arrayref |
294 | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 |
295 | keys %$hashref | keys $hashref |
296 | keys @$arrayref | keys $arrayref |
297 | values %$hashref | values $hashref |
298 | values @$arrayref | values $arrayref |
299 | ($k,$v) = each %$hashref | ($k,$v) = each $hashref |
300 | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref |
301 |----------------------------+---------------------------|
303 This allows these builtin functions to act on long dereferencing chains
304 or on the return value of subroutines without needing to wrap them in
307 push @{$obj->tags}, $new_tag; # old way
308 push $obj->tags, $new_tag; # new way
310 for ( keys %{$hoh->{genres}{artists}} ) {...} # old way
311 for ( keys $hoh->{genres}{artists} ) {...} # new way
313 =head3 Single term prototype
315 The C<+> prototype is a special alternative to C<$> that acts like
316 C<\[@%]> when given a literal array or hash variable, but will otherwise
317 force scalar context on the argument. See L<perlsub/Prototypes>.
319 =head3 C<package> block syntax
321 A package declaration can now contain a code block, in which case the
322 declaration is in scope inside that block only. So C<package Foo { ... }>
323 is precisely equivalent to C<{ package Foo; ... }>. It also works with
324 a version number in the declaration, as in C<package Foo 1.2 { ... }>,
325 which is its most attractive feature. See L<perlfunc>.
327 =head3 Statement labels can appear in more places
329 Statement labels can now occur before any type of statement or declaration,
332 =head3 Stacked labels
334 Multiple statement labels can now appear before a single statement.
336 =head3 Uppercase X/B allowed in hexadecimal/binary literals
338 Literals may now use either upper case C<0X...> or C<0B...> prefixes,
339 in addition to the already supported C<0x...> and C<0b...>
340 syntax [perl #76296].
342 C, Ruby, Python, and PHP already support this syntax, and it makes
343 Perl more internally consistent: a round-trip with C<eval sprintf
344 "%#X", 0x10> now returns C<16>, just like C<eval sprintf "%#x", 0x10>.
346 =head3 Overridable tie functions
348 C<tie>, C<tied> and C<untie> can now be overridden [perl #75902].
350 =head2 Exception Handling
352 To make them more reliable and consistent, several changes have been made
353 to how C<die>, C<warn>, and C<$@> behave.
359 When an exception is thrown inside an C<eval>, the exception is no
360 longer at risk of being clobbered by destructor code running during unwinding.
361 Previously, the exception was written into C<$@>
362 early in the throwing process, and would be overwritten if C<eval> was
363 used internally in the destructor for an object that had to be freed
364 while exiting from the outer C<eval>. Now the exception is written
365 into C<$@> last thing before exiting the outer C<eval>, so the code
366 running immediately thereafter can rely on the value in C<$@> correctly
367 corresponding to that C<eval>. (C<$@> is still also set before exiting the
368 C<eval>, for the sake of destructors that rely on this.)
370 Likewise, a C<local $@> inside an C<eval> no longer clobbers any
371 exception thrown in its scope. Previously, the restoration of C<$@> upon
372 unwinding would overwrite any exception being thrown. Now the exception
373 gets to the C<eval> anyway. So C<local $@> is safe before a C<die>.
375 Exceptions thrown from object destructors no longer modify the C<$@>
376 of the surrounding context. (If the surrounding context was exception
377 unwinding, this used to be another way to clobber the exception being
378 thrown.) Previously such an exception was
379 sometimes emitted as a warning, and then either was
380 string-appended to the surrounding C<$@> or completely replaced the
381 surrounding C<$@>, depending on whether that exception and the surrounding
382 C<$@> were strings or objects. Now, an exception in this situation is
383 always emitted as a warning, leaving the surrounding C<$@> untouched.
384 In addition to object destructors, this also affects any function call
385 run by XS code using the C<G_KEEPERR> flag.
389 Warnings for C<warn> can now be objects in the same way as exceptions
390 for C<die>. If an object-based warning gets the default handling
391 of writing to standard error, it is stringified as before with the
392 filename and line number appended. But a C<$SIG{__WARN__}> handler now
393 receives an object-based warning as an object, where previously it
394 was passed the result of stringifying the object.
398 =head2 Other Enhancements
400 =head3 Assignment to C<$0> sets the legacy process name with prctl() on Linux
402 On Linux the legacy process name is now set with L<prctl(2)>, in
403 addition to altering the POSIX name via C<argv[0]>, as Perl has done
404 since version 4.000. Now system utilities that read the legacy process
405 name such as I<ps>, I<top>, and I<killall> recognize the name you set when
406 assigning to C<$0>. The string you supply is truncated at 16 bytes;
407 this limitation is imposed by Linux.
409 =head3 srand() now returns the seed
411 This allows programs that need to have repeatable results not to have to come
412 up with their own seed-generating mechanism. Instead, they can use srand()
413 and stash the return value for future use. One example is a test program with
414 too many combinations to test comprehensively in the time available for
415 each run. It can test a random subset each time and, should there be a failure,
416 log the seed used for that run so this can later be used to produce the same results.
418 =head3 printf-like functions understand post-1980 size modifiers
420 Perl's printf and sprintf operators, and Perl's internal printf replacement
421 function, now understand the C90 size modifiers "hh" (C<char>), "z"
422 (C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99
423 compiler, Perl now understands the size modifier "j" (C<intmax_t>)
424 (but this is not portable).
426 So, for example, on any modern machine, C<sprintf("%hhd", 257)> returns "1".
428 =head3 New global variable C<${^GLOBAL_PHASE}>
430 A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow
431 introspection of the current phase of the Perl interpreter. It's explained in
432 detail in L<perlvar/"${^GLOBAL_PHASE}"> and in
433 L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">.
435 =head3 C<-d:-foo> calls C<Devel::foo::unimport>
437 The syntax B<-d:foo> was extended in 5.6.1 to make B<-d:foo=bar>
438 equivalent to B<-MDevel::foo=bar>, which expands
439 internally to C<use Devel::foo 'bar'>.
440 Perl now allows prefixing the module name with B<->, with the same
441 semantics as B<-M>; that is:
447 Equivalent to B<-M-Devel::foo>: expands to
448 C<no Devel::foo> and calls C<< Devel::foo->unimport() >>
449 if that method exists.
453 Equivalent to B<-M-Devel::foo=bar>: expands to C<no Devel::foo 'bar'>,
454 and calls C<< Devel::foo->unimport("bar") >> if that method exists.
458 This is particularly useful for suppressing the default actions of a
459 C<Devel::*> module's C<import> method whilst still loading it for debugging.
461 =head3 Filehandle method calls load L<IO::File> on demand
463 When a method call on a filehandle would die because the method cannot
464 be resolved and L<IO::File> has not been loaded, Perl now loads L<IO::File>
465 via C<require> and attempts method resolution again:
467 open my $fh, ">", $file;
468 $fh->binmode(":raw"); # loads IO::File and succeeds
470 This also works for globs like C<STDOUT>, C<STDERR>, and C<STDIN>:
472 STDOUT->autoflush(1);
474 Because this on-demand load happens only if method resolution fails, the
475 legacy approach of manually loading an L<IO::File> parent class for partial
476 method support still works as expected:
479 open my $fh, ">", $file;
480 $fh->autoflush(1); # IO::File not loaded
482 =head3 Improved IPv6 support
484 The C<Socket> module provides new affordances for IPv6,
485 including implementations of the C<Socket::getaddrinfo()> and
486 C<Socket::getnameinfo()> functions, along with related constants and a
487 handful of new functions. See L<Socket>.
489 =head3 DTrace probes now include package name
491 The C<DTrace> probes now include an additional argument, C<arg3>, which contains
492 the package the subroutine being entered or left was compiled in.
494 For example, using the following DTrace script:
496 perl$target:::sub-entry
498 printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
503 $ perl -e 'sub test { }; test'
505 C<DTrace> will print:
511 See L</Internal Changes>.
515 =head2 User-defined regular expression properties
517 L<perlunicode/"User-Defined Character Properties"> documented that you can
518 create custom properties by defining subroutines whose names begin with
519 "In" or "Is". However, Perl did not actually enforce that naming
520 restriction, so C<\p{foo::bar}> could call foo::bar() if it existed. The documented
521 convention is now enforced.
523 Also, Perl no longer allows tainted regular expressions to invoke a
524 user-defined property. It simply dies instead [perl #82616].
526 =head1 Incompatible Changes
528 Perl 5.14.0 is not binary-compatible with any previous stable release.
530 In addition to the sections that follow, see L</C API Changes>.
532 =head2 Regular Expressions and String Escapes
536 In certain circumstances, C<\400>-C<\777> in regexes have behaved
537 differently than they behave in all other doublequote-like contexts.
538 Since 5.10.1, Perl has issued a deprecation warning when this happens.
539 Now, these literals behave the same in all doublequote-like contexts,
540 namely to be equivalent to C<\x{100}>-C<\x{1FF}>, with no deprecation
543 Use of C<\400>-C<\777> in the command-line option B<-0> retain their
544 conventional meaning. They slurp whole input files; previously, this
545 was documented only for B<-0777>.
547 Because of various ambiguities, you should use the new
548 C<\o{...}> construct to represent characters in octal instead.
550 =head3 Most C<\p{}> properties are now immune to case-insensitive matching
552 For most Unicode properties, it doesn't make sense to have them match
553 differently under C</i> case-insensitive matching. Doing so can lead
554 to unexpected results and potential security holes. For example
556 m/\p{ASCII_Hex_Digit}+/i
558 could previously match non-ASCII characters because of the Unicode
559 matching rules (although there were several bugs with this). Now
560 matching under C</i> gives the same results as non-C</i> matching except
561 for those few properties where people have come to expect differences,
562 namely the ones where casing is an integral part of their meaning, such
563 as C<m/\p{Uppercase}/i> and C<m/\p{Lowercase}/i>, both of which match
564 the same code points as matched by C<m/\p{Cased}/i>.
565 Details are in L<perlrecharclass/Unicode Properties>.
567 User-defined property handlers that need to match differently under C</i>
568 must be changed to read the new boolean parameter passed to them, which
569 is non-zero if case-insensitive matching is in effect and 0 otherwise.
570 See L<perlunicode/User-Defined Character Properties>.
572 =head3 \p{} implies Unicode semantics
574 Specifying a Unicode property in the pattern indicates
575 that the pattern is meant for matching according to Unicode rules, the way
578 =head3 Regular expressions retain their localeness when interpolated
580 Regular expressions compiled under C<use locale> now retain this when
581 interpolated into a new regular expression compiled outside a
582 C<use locale>, and vice-versa.
584 Previously, one regular expression interpolated into another inherited
585 the localeness of the surrounding regex, losing whatever state it
586 originally had. This is considered a bug fix, but may trip up code that
587 has come to rely on the incorrect behaviour.
589 =head3 Stringification of regexes has changed
591 Default regular expression modifiers are now notated using
592 C<(?^...)>. Code relying on the old stringification will fail.
593 This is so that when new modifiers are added, such code won't
594 have to keep changing each time this happens, because the stringification
595 will automatically incorporate the new modifiers.
597 Code that needs to work properly with both old- and new-style regexes
598 can avoid the whole issue by using (for perls since 5.9.5; see L<re>):
600 use re qw(regexp_pattern);
601 my ($pat, $mods) = regexp_pattern($re_ref);
603 If the actual stringification is important or older Perls need to be
604 supported, you can use something like the following:
606 # Accept both old and new-style stringification
607 my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? "^" : "-xism";
609 And then use C<$modifiers> instead of C<-xism>.
611 =head3 Run-time code blocks in regular expressions inherit pragmata
613 Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) previously
614 did not inherit pragmata (strict, warnings, etc.) if the regular expression
615 was compiled at run time as happens in cases like these two:
618 $foo =~ $bar; # when $bar contains (?{...})
619 $foo =~ /$bar(?{ $finished = 1 })/;
621 This bug has now been fixed, but code that relied on the buggy behaviour
622 may need to be fixed to account for the correct behaviour.
624 =head2 Stashes and Package Variables
626 =head3 Localised tied hashes and arrays are no longed tied
633 # here, @a is a now a new, untied array
635 # here, @a refers again to the old, tied array
637 Earlier versions of Perl incorrectly tied the new local array. This has
638 now been fixed. This fix could however potentially cause a change in
639 behaviour of some code.
641 =head3 Stashes are now always defined
643 C<defined %Foo::> now always returns true, even when no symbols have yet been
644 defined in that package.
646 This is a side-effect of removing a special-case kludge in the tokeniser,
647 added for 5.10.0, to hide side-effects of changes to the internal storage of
648 hashes. The fix drastically reduces hashes' memory overhead.
650 Calling defined on a stash has been deprecated since 5.6.0, warned on
651 lexicals since 5.6.0, and warned for stashes and other package
652 variables since 5.12.0. C<defined %hash> has always exposed an
653 implementation detail: emptying a hash by deleting all entries from it does
654 not make C<defined %hash> false. Hence C<defined %hash> is not valid code to
655 determine whether an arbitrary hash is empty. Instead, use the behaviour
656 of an empty C<%hash> always returning false in scalar context.
658 =head3 Clearing stashes
660 Stash list assignment C<%foo:: = ()> used to make the stash temporarily
661 anonymous while it was being emptied. Consequently, any of its
662 subroutines referenced elsewhere would become anonymous, showing up as
663 "(unknown)" in C<caller>. They now retain their package names such that
664 C<caller> returns the original sub name if there is still a reference
665 to its typeglob and "foo::__ANON__" otherwise [perl #79208].
667 =head3 Dereferencing typeglobs
669 If you assign a typeglob to a scalar variable:
673 the glob that is copied to C<$glob> is marked with a special flag
674 indicating that the glob is just a copy. This allows subsequent
675 assignments to C<$glob> to overwrite the glob. The original glob,
676 however, is immutable.
678 Some Perl operators did not distinguish between these two types of globs.
679 This would result in strange behaviour in edge cases: C<untie $scalar>
680 would not untie the scalar if the last thing assigned to it was a glob
681 (because it treated it as C<untie *$scalar>, which unties a handle).
682 Assignment to a glob slot (such as C<*$glob = \@some_array>) would simply
683 assign C<\@some_array> to C<$glob>.
685 To fix this, the C<*{}> operator (including its C<*foo> and C<*$foo> forms)
686 has been modified to make a new immutable glob if its operand is a glob
687 copy. This allows operators that make a distinction between globs and
688 scalars to be modified to treat only immutable globs as globs. (C<tie>,
689 C<tied> and C<untie> have been left as they are for compatibility's sake,
690 but will warn. See L</Deprecations>.)
692 This causes an incompatible change in code that assigns a glob to the
693 return value of C<*{}> when that operator was passed a glob copy. Take the
694 following code, for instance:
699 The C<*$glob> on the second line returns a new immutable glob. That new
700 glob is made an alias to C<*bar>. Then it is discarded. So the second
701 assignment has no effect.
703 See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for
706 =head3 Magic variables outside the main package
708 In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would
709 "leak" into other packages. So C<%foo::SIG> could be used to access signals,
710 C<${"foo::!"}> (with strict mode off) to access C's C<errno>, etc.
712 This was a bug, or an "unintentional" feature, which caused various ill effects,
713 such as signal handlers being wiped when modules were loaded, etc.
715 This has been fixed (or the feature has been removed, depending on how you see
718 =head3 local($_) strips all magic from $_
720 local() on scalar variables gives them a new value but keeps all
721 their magic intact. This has proven problematic for the default
722 scalar variable $_, where L<perlsub> recommends that any subroutine
723 that assigns to $_ should first localize it. This would throw an
724 exception if $_ is aliased to a read-only variable, and could in general have
725 various unintentional side-effects.
727 Therefore, as an exception to the general rule, local($_) will not
728 only assign a new value to $_, but also remove all existing magic from
731 =head3 Parsing of package and variable names
733 Parsing the names of packages and package variables has changed:
734 multiple adjacent pairs of colons, as in C<foo::::bar>, are now all
735 treated as package separators.
737 Regardless of this change, the exact parsing of package separators has
738 never been guaranteed and is subject to change in future Perl versions.
740 =head2 Changes to Syntax or to Perl Operators
742 =head3 C<given> return values
744 C<given> blocks now return the last evaluated
745 expression, or an empty list if the block was exited by C<break>. Thus you
751 "integer" when /^[+-]?[0-9]+$/;
752 "float" when /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
757 See L<perlsyn/Return value> for details.
759 =head3 Change in parsing of certain prototypes
761 Functions declared with the following prototypes now behave correctly as unary
771 Due to this bug fix [perl #75904], functions
772 using the C<(*)>, C<(;$)> and C<(;*)> prototypes
773 are parsed with higher precedence than before. So
774 in the following example:
779 the second line is now parsed correctly as C<< foo($a) < $b >>, rather than
780 C<< foo($a < $b) >>. This happens when one of these operators is used in
781 an unparenthesised argument:
783 < > <= >= lt gt le ge
784 == != <=> eq ne cmp ~~
793 =head3 Smart-matching against array slices
795 Previously, the following code resulted in a successful match:
801 This odd behaviour has now been fixed [perl #77468].
803 =head3 Negation treats strings differently from before
805 The unary negation operator, C<->, now treats strings that look like numbers
806 as numbers [perl #57706].
810 Negative zero (-0.0), when converted to a string, now becomes "0" on all
811 platforms. It used to become "-0" on some, but "0" on others.
813 If you still need to determine whether a zero is negative, use
814 C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN.
816 =head3 C<:=> is now a syntax error
818 Previously C<my $pi := 4> was exactly equivalent to C<my $pi : = 4>,
819 with the C<:> being treated as the start of an attribute list, ending before
820 the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is
821 now a syntax error. This allows future use of C<:=> as a new token.
823 Outside the core's tests for it, we find no Perl 5 code on CPAN
824 using this construction, so we believe that this change will have
825 little impact on real-world codebases.
827 If it is absolutely necessary to have empty attribute lists (for example,
828 because of a code generator), simply avoid the error by adding a space before
831 =head3 Change in the parsing of identifiers
833 Characters outside the Unicode "XIDStart" set are no longer allowed at the
834 beginning of an identifier. This means that certain accents and marks
835 that normally follow an alphabetic character may no longer be the first
836 character of an identifier.
838 =head2 Threads and Processes
840 =head3 Directory handles not copied to threads
842 On systems other than Windows that do not have
843 a C<fchdir> function, newly-created threads no
844 longer inherit directory handles from their parent threads. Such programs
845 would usually have crashed anyway [perl #75154].
847 =head3 C<close> on shared pipes
849 To avoid deadlocks, the C<close> function no longer waits for the
850 child process to exit if the underlying file descriptor is still
851 in use by another thread. It returns true in such cases.
853 =head3 fork() emulation will not wait for signalled children
855 On Windows parent processes would not terminate until all forked
856 children had terminated first. However, C<kill("KILL", ...)> is
857 inherently unstable on pseudo-processes, and C<kill("TERM", ...)>
858 might not get delivered if the child is blocked in a system call.
860 To avoid the deadlock and still provide a safe mechanism to terminate
861 the hosting process, Perl now no longer waits for children that
862 have been sent a SIGTERM signal. It is up to the parent process to
863 waitpid() for these children if child-cleanup processing must be
864 allowed to finish. However, it is also then the responsibility of the
865 parent to avoid the deadlock by making sure the child process
866 can't be blocked on I/O.
868 See L<perlfork> for more information about the fork() emulation on
873 =head3 Naming fixes in Policy_sh.SH may invalidate Policy.sh
875 Several long-standing typos and naming confusions in F<Policy_sh.SH> have
876 been fixed, standardizing on the variable names used in F<config.sh>.
878 This will change the behaviour of F<Policy.sh> if you happen to have been
879 accidentally relying on its incorrect behaviour.
881 =head3 Perl source code is read in text mode on Windows
883 Perl scripts used to be read in binary mode on Windows for the benefit
884 of the L<ByteLoader> module (which is no longer part of core Perl). This
885 had the side-effect of breaking various operations on the C<DATA> filehandle,
886 including seek()/tell(), and even simply reading from C<DATA> after filehandles
887 have been flushed by a call to system(), backticks, fork() etc.
889 The default build options for Windows have been changed to read Perl source
890 code on Windows in text mode now. L<ByteLoader> will (hopefully) be updated on
891 CPAN to automatically handle this situation [perl #28106].
895 See also L</Deprecated C APIs>.
897 =head2 Omitting a space between a regular expression and subsequent word
899 Omitting the space between a regular expression operator or
900 its modifiers and the following word is deprecated. For
901 example, C<< m/foo/sand $bar >> is for now still parsed
902 as C<< m/foo/s and $bar >>, but will now issue a warning.
906 The backslash-c construct was designed as a way of specifying
907 non-printable characters, but there were no restrictions (on ASCII
908 platforms) on what the character following the C<c> could be. Now,
909 a deprecation warning is raised if that character isn't an ASCII character.
910 Also, a deprecation warning is raised for C<"\c{"> (which is the same
911 as simply saying C<";">).
913 =head2 C<"\b{"> and C<"\B{">
915 In regular expressions, a literal C<"{"> immediately following a C<"\b">
916 (not in a bracketed character class) or a C<"\B{"> is now deprecated
917 to allow for its future use by Perl itself.
919 =head2 Deprecation warning added for deprecated-in-core Perl 4-era .pl libraries
921 This is a mandatory warning, not obeying B<-X> or lexical warning bits.
922 The warning is modelled on that supplied by F<deprecate.pm> for
923 deprecated-in-core F<.pm> libraries. It points to the specific CPAN
924 distribution that contains the F<.pl> libraries. The CPAN versions, of
925 course, do not generate the warning.
927 =head2 List assignment to C<$[>
929 Assignment to C<$[> was deprecated and started to give warnings in
930 Perl version 5.12.0. This version of Perl (5.14) now also emits a warning
931 when assigning to C<$[> in list context. This fixes an oversight in 5.12.0.
933 =head2 Use of qw(...) as parentheses
935 Historically the parser fooled itself into thinking that C<qw(...)> literals
936 were always enclosed in parentheses, and as a result you could sometimes omit
937 parentheses around them:
939 for $x qw(a b c) { ... }
941 The parser no longer lies to itself in this way. Wrap the list literal in
942 parentheses like this:
944 for $x (qw(a b c)) { ... }
946 This is being deprecated because C<qw(a b c)> is supposed to mean
947 C<"a", "b", "c"> not C<("a", "b", "c")>. In other words, this doesn't compile:
949 for my $i "a", "b", "c" { }
951 So neither should this:
953 for my $i qw(a b c) {}
957 for my $i ("a", "b", "c") { }
958 for my $i (qw(a b c)) {}
960 Note that this does not change the behaviour of cases like:
962 use POSIX qw(setlocale localeconv)
963 our @EXPORT = qw(foo bar baz);
965 Where a list with or without parentheses could have been provided.
969 This is because Unicode is using that name for a different character.
970 See L</Unicode Version 6.0 is now supported (mostly)> for more
975 C<?PATTERN?> (without the initial C<m>) has been deprecated and now produces
976 a warning. This is to allow future use of C<?> in new operators.
977 The match-once functionality is still available as C<m?PATTERN?>.
979 =head2 Tie functions on scalars holding typeglobs
981 Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
982 acts on a filehandle if the scalar happens to hold a typeglob.
984 This is a long-standing bug that will be removed in Perl 5.16, as
985 there is currently no way to tie the scalar itself when it holds
986 a typeglob, and no way to untie a scalar that has had a typeglob
989 Now there is a deprecation warning whenever a tie
990 function is used on a handle without an explicit C<*>.
992 =head2 User-defined case-mapping
994 This feature is being deprecated due to its many issues, as documented in
995 L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
996 This feature will be removed in Perl 5.16. Instead use the CPAN module
997 L<Unicode::Casing>, which provides improved functionality.
999 =head2 Deprecated modules
1001 The following modules will be removed from the core distribution in a
1002 future release, and should be installed from CPAN instead. Distributions
1003 on CPAN that require these should add them to their prerequisites. The
1004 core versions of these modules now issue a deprecation warning.
1006 If you ship a packaged version of Perl, either alone or as part of a
1007 larger system, then you should carefully consider the repercussions of
1008 core module deprecations. You may want to consider shipping your default
1009 build of Perl with packages for some or all deprecated modules that
1010 install into C<vendor> or C<site> Perl library directories. This will
1011 inhibit the deprecation warnings.
1013 Alternatively, you may want to consider patching F<lib/deprecate.pm>
1014 to provide deprecation warnings specific to your packaging system
1015 or distribution of Perl, consistent with how your packaging system
1016 or distribution manages a staged transition from a release where the
1017 installation of a single package provides the given functionality, to
1018 a later release where the system administrator needs to know to install
1019 multiple packages to get that same functionality.
1021 You can silence these deprecation warnings by installing the modules
1022 in question from CPAN. To install the latest version of all of them,
1023 just install C<Task::Deprecations::5_14>.
1027 =item L<Devel::DProf>
1029 We strongly recommend that you install and use L<Devel::NYTProf> instead
1030 of L<Devel::Dprof>, as L<Devel::NYTProf> offers significantly
1031 improved profiling and reporting.
1035 =head1 Performance Enhancements
1037 =head2 "Safe signals" optimisation
1039 Signal dispatch has been moved from the runloop into control ops.
1040 This should give a few percent speed increase, and eliminates nearly
1041 all the speed penalty caused by the introduction of "safe signals"
1042 in 5.8.0. Signals should still be dispatched within the same
1043 statement as they were previously. If this does I<not> happen, or
1044 if you find it possible to create uninterruptible loops, this is a
1045 bug, and reports are encouraged of how to recreate such issues.
1047 =head2 Optimisation of shift() and pop() calls without arguments
1049 Two fewer OPs are used for shift() and pop() calls with no argument (with
1050 implicit C<@_>). This change makes shift() 5% faster than C<shift @_>
1051 on non-threaded perls, and 25% faster on threaded ones.
1053 =head2 Optimisation of regexp engine string comparison work
1055 The C<foldEQ_utf8> API function for case-insensitive comparison of strings (which
1056 is used heavily by the regexp engine) was substantially refactored and
1057 optimised -- and its documentation much improved as a free bonus.
1059 =head2 Regular expression compilation speed-up
1061 Compiling regular expressions has been made faster when upgrading
1062 the regex to utf8 is necessary but this isn't known when the compilation begins.
1064 =head2 String appending is 100 times faster
1066 When doing a lot of string appending, perls built to use the system's
1067 C<malloc> could end up allocating a lot more memory than needed in a
1070 C<sv_grow>, the function used to allocate more memory if necessary
1071 when appending to a string, has been taught to round up the memory
1072 it requests to a certain geometric progression, making it much faster on
1073 certain platforms and configurations. On Win32, it's now about 100 times
1076 =head2 Eliminate C<PL_*> accessor functions under ithreads
1078 When C<MULTIPLICITY> was first developed, and interpreter state moved into
1079 an interpreter struct, thread- and interpreter-local C<PL_*> variables
1080 were defined as macros that called accessor functions (returning the
1081 address of the value) outside the Perl core. The intent was to allow
1082 members within the interpreter struct to change size without breaking
1083 binary compatibility, so that bug fixes could be merged to a maintenance
1084 branch that necessitated such a size change. This mechanism was redundant
1085 and penalised well-behaved code. It has been removed.
1087 =head2 Freeing weak references
1089 When there are many weak references to an object, freeing that object
1090 can under some circumstances take O(I<NE<0xB2>>) time to free, where
1091 I<N> is the number of references. The circumstances in which this can happen
1092 have been reduced [perl #75254]
1094 =head2 Lexical array and hash assignments
1096 An earlier optimisation to speed up C<my @array = ...> and
1097 C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
1099 Now we have found another way to speed up these assignments [perl #82110].
1101 =head2 C<@_> uses less memory
1103 Previously, C<@_> was allocated for every subroutine at compile time with
1104 enough space for four entries. Now this allocation is done on demand when
1105 the subroutine is called [perl #72416].
1107 =head2 Size optimisations to SV and HV structures
1109 C<xhv_fill> has been eliminated from C<struct xpvhv>, saving 1 IV per hash and
1110 on some systems will cause C<struct xpvhv> to become cache-aligned. To avoid
1111 this memory saving causing a slowdown elsewhere, boolean use of C<HvFILL>
1112 now calls C<HvTOTALKEYS> instead (which is equivalent), so while the fill
1113 data when actually required are now calculated on demand, cases when
1114 this needs to be done should be rare.
1116 The order of structure elements in SV bodies has changed. Effectively,
1117 the NV slot has swapped location with STASH and MAGIC. As all access to
1118 SV members is via macros, this should be completely transparent. This
1119 change allows the space saving for PVHVs documented above, and may reduce
1120 the memory allocation needed for PVIVs on some architectures.
1122 C<XPV>, C<XPVIV>, and C<XPVNV> now allocate only the parts of the C<SV> body
1123 they actually use, saving some space.
1125 Scalars containing regular expressions now allocate only the part of the C<SV>
1126 body they actually use, saving some space.
1128 =head2 Memory consumption improvements to Exporter
1130 The C<@EXPORT_FAIL> AV is no longer created unless needed, hence neither is
1131 the typeglob backing it. This saves about 200 bytes for every package that
1132 uses Exporter but doesn't use this functionality.
1134 =head2 Memory savings for weak references
1136 For weak references, the common case of just a single weak reference
1137 per referent has been optimised to reduce the storage required. In this
1138 case it saves the equivalent of one small Perl array per referent.
1140 =head2 C<%+> and C<%-> use less memory
1142 The bulk of the C<Tie::Hash::NamedCapture> module used to be in the Perl
1143 core. It has now been moved to an XS module to reduce overhead for
1144 programs that do not use C<%+> or C<%->.
1146 =head2 Multiple small improvements to threads
1148 The internal structures of threading now make fewer API calls and fewer
1149 allocations, resulting in noticeably smaller object code. Additionally,
1150 many thread context checks have been deferred so they're done only
1151 as needed (although this is only possible for non-debugging builds).
1153 =head2 Adjacent pairs of nextstate opcodes are now optimized away
1155 Previously, in code such as
1157 use constant DEBUG => 0;
1164 the ops for C<warn if DEBUG> would be folded to a C<null> op (C<ex-const>), but
1165 the C<nextstate> op would remain, resulting in a runtime op dispatch of
1166 C<nextstate>, C<nextstate>, etc.
1168 The execution of a sequence of C<nextstate> ops is indistinguishable from just
1169 the last C<nextstate> op so the peephole optimizer now eliminates the first of
1170 a pair of C<nextstate> ops except when the first carries a label, since labels
1171 must not be eliminated by the optimizer, and label usage isn't conclusively known
1174 =head1 Modules and Pragmata
1176 =head2 New Modules and Pragmata
1182 L<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a
1183 subset of YAML sufficient for reading and writing F<META.yml> and F<MYMETA.yml> files
1184 included with CPAN distributions or generated by the module installation
1185 toolchain. It should not be used for any other general YAML parsing or
1190 L<CPAN::Meta> version 2.110440 has been added as a dual-life module. It
1191 provides a standard library to read, interpret and write CPAN distribution
1192 metadata files (like F<META.json> and F<META.yml)> that describe a
1193 distribution, its contents, and the requirements for building it and
1194 installing it. The latest CPAN distribution metadata specification is
1195 included as L<CPAN::Meta::Spec> and notes on changes in the specification
1196 over time are given in L<CPAN::Meta::History>.
1200 L<HTTP::Tiny> 0.012 has been added as a dual-life module. It is a very
1201 small, simple HTTP/1.1 client designed for simple GET requests and file
1202 mirroring. It has been added so that F<CPAN.pm> and L<CPANPLUS> can
1203 "bootstrap" HTTP access to CPAN using pure Perl without relying on external
1204 binaries like L<curl(1)> or L<wget(1)>.
1208 L<JSON::PP> 2.27105 has been added as a dual-life module to allow CPAN
1209 clients to read F<META.json> files in CPAN distributions.
1213 L<Module::Metadata> 1.000004 has been added as a dual-life module. It gathers
1214 package and POD information from Perl module files. It is a standalone module
1215 based on L<Module::Build::ModuleInfo> for use by other module installation
1216 toolchain components. L<Module::Build::ModuleInfo> has been deprecated in
1217 favor of this module instead.
1221 L<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl
1222 operating system names (like "dragonfly" or "MSWin32") to more generic types
1223 with standardized names (like "Unix" or "Windows"). It has been refactored
1224 out of L<Module::Build> and L<ExtUtils::CBuilder> and consolidates such mappings into
1225 a single location for easier maintenance.
1229 The following modules were added by the L<Unicode::Collate>
1230 upgrade. See below for details.
1232 L<Unicode::Collate::CJK::Big5>
1234 L<Unicode::Collate::CJK::GB2312>
1236 L<Unicode::Collate::CJK::JISX0208>
1238 L<Unicode::Collate::CJK::Korean>
1240 L<Unicode::Collate::CJK::Pinyin>
1242 L<Unicode::Collate::CJK::Stroke>
1246 L<Version::Requirements> version 0.101020 has been added as a dual-life
1247 module. It provides a standard library to model and manipulates module
1248 prerequisites and version constraints defined in L<CPAN::Meta::Spec>.
1252 =head2 Updated Modules and Pragma
1258 L<attributes> has been upgraded from version 0.12 to 0.14.
1262 L<Archive::Extract> has been upgraded from version 0.38 to 0.48.
1264 Updates since 0.38 include: a safe print method that guards
1265 L<Archive::Extract> from changes to C<$\>; a fix to the tests when run in core
1266 Perl; support for TZ files; a modification for the lzma
1267 logic to favour L<IO::Uncompress::Unlzma>; and a fix
1268 for an issue with NetBSD-current and its new L<unzip(1)>
1273 L<Archive::Tar> has been upgraded from version 1.54 to 1.76.
1275 Important changes since 1.54 include the following:
1281 Compatibility with busybox implementations of L<tar(1)>.
1285 A fix so that write() and create_archive()
1286 close only filehandles they themselves opened.
1290 A bug was fixed regarding the exit code of extract_archive.
1294 The L<ptar(1)> utility has a new option to allow safe creation of
1295 tarballs without world-writable files on Windows, allowing those
1296 archives to be uploaded to CPAN.
1300 A new L<ptargrep(1)> utility for using regular expressions against
1301 the contents of files in a tar archive.
1305 L<pax> extended headers are now skipped.
1311 L<Attribute::Handlers> has been upgraded from version 0.87 to 0.89.
1315 L<autodie> has been upgraded from version 2.06_01 to 2.1001.
1319 L<AutoLoader> has been upgraded from version 5.70 to 5.71.
1323 The L<B> module has been upgraded from version 1.23 to 1.29.
1325 It no longer crashes when taking apart a C<y///> containing characters
1326 outside the octet range or compiled in a C<use utf8> scope.
1328 The size of the shared object has been reduced by about 40%, with no
1329 reduction in functionality.
1333 L<B::Concise> has been upgraded from version 0.78 to 0.83.
1335 L<B::Concise> marks rv2sv(), rv2av(), and rv2hv() ops with the new
1336 C<OPpDEREF> flag as "DREFed".
1338 It no longer produces mangled output with the B<-tree> option
1343 L<B::Debug> has been upgraded from version 1.12 to 1.16.
1347 L<B::Deparse> has been upgraded from version 0.96 to 1.03.
1349 The deparsing of a C<nextstate> op has changed when it has both a
1350 change of package relative to the previous nextstate, or a change of
1351 C<%^H> or other state and a label. The label was previously emitted
1352 first, but is now emitted last (5.12.1).
1354 The C<no 5.13.2> or similar form is now correctly handled by L<B::Deparse>
1357 L<B::Deparse> now properly handles the code that applies a conditional
1358 pattern match against implicit C<$_> as it was fixed in [perl #20444].
1360 Deparsing of C<our> followed by a variable with funny characters
1361 (as permitted under the C<use utf8> pragma) has also been fixed [perl #33752].
1365 L<B::Lint> has been upgraded from version 1.11_01 to 1.13.
1369 L<base> has been upgraded from version 2.15 to 2.16.
1373 L<Benchmark> has been upgraded from version 1.11 to 1.12.
1377 L<bignum> has been upgraded from version 0.23 to 0.27.
1381 L<Carp> has been upgraded from version 1.15 to 1.20.
1383 L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR">
1384 overrides and avoids using bogus C<@DB::args>. To provide backtraces,
1385 Carp relies on particular behaviour of the caller() builtin.
1386 L<Carp> now detects if other code has overridden this with an
1387 incomplete implementation, and modifies its backtrace accordingly.
1388 Previously incomplete overrides would cause incorrect values in
1389 backtraces (best case), or obscure fatal errors (worst case).
1391 This fixes certain cases of "Bizarre copy of ARRAY" caused by modules
1392 overriding caller() incorrectly (5.12.2).
1394 It now also avoids using regular expressions that cause Perl to
1395 load its Unicode tables, so as to avoid the "BEGIN not safe after
1396 errors" error that ensue if there has been a syntax error
1401 L<CGI> has been upgraded from version 3.48 to 3.52.
1403 This provides the following security fixes: the MIME boundary in
1404 multipart_init() is now random and the handling of
1405 newlines embedded in header values has been improved.
1409 L<Compress::Raw::Bzip2> has been upgraded from version 2.024 to 2.033.
1411 It has been updated to use L<bzip2(1)> 1.0.6.
1415 L<Compress::Raw::Zlib> has been upgraded from version 2.024 to 2.033.
1419 L<constant> has been upgraded from version 1.20 to 1.21.
1421 Unicode constants work once more. They have been broken since Perl 5.10.0
1426 L<CPAN> has been upgraded from version 1.94_56 to 1.9600.
1432 =item * much less configuration dialog hassle
1434 =item * support for F<META/MYMETA.json>
1436 =item * support for L<local::lib>
1438 =item * support for L<HTTP::Tiny> to reduce the dependency on FTP sites
1440 =item * automatic mirror selection
1442 =item * iron out all known bugs in configure_requires
1444 =item * support for distributions compressed with L<bzip2(1)>
1446 =item * allow F<Foo/Bar.pm> on the command line to mean C<Foo::Bar>
1452 L<CPANPLUS> has been upgraded from version 0.90 to 0.9103.
1454 A change to F<cpanp-run-perl>
1455 resolves L<RT #55964|http://rt.cpan.org/Public/Bug/Display.html?id=55964>
1456 and L<RT #57106|http://rt.cpan.org/Public/Bug/Display.html?id=57106>, both
1457 of which related to failures to install distributions that use
1458 C<Module::Install::DSL> (5.12.2).
1460 A dependency on L<Config> was not recognised as a
1461 core module dependency. This has been fixed.
1463 L<CPANPLUS> now includes support for F<META.json> and F<MYMETA.json>.
1467 L<CPANPLUS::Dist::Build> has been upgraded from version 0.46 to 0.54.
1471 L<Data::Dumper> has been upgraded from version 2.125 to 2.130_02.
1473 The indentation used to be off when C<$Data::Dumper::Terse> was set. This
1474 has been fixed [perl #73604].
1476 This upgrade also fixes a crash when using custom sort functions that might
1477 cause the stack to change [perl #74170].
1479 L<Dumpxs> no longer crashes with globs returned by C<*$io_ref>
1484 L<DB_File> has been upgraded from version 1.820 to 1.821.
1488 L<DBM_Filter> has been upgraded from version 0.03 to 0.04.
1492 L<Devel::DProf> has been upgraded from version 20080331.00 to 20110228.00.
1494 Merely loading L<Devel::DProf> now no longer triggers profiling to start.
1495 Both C<use Devel::DProf> and C<perl -d:DProf ...> behave as before and start
1498 B<NOTE>: L<Devel::DProf> is deprecated and will be removed from a future
1499 version of Perl. We strongly recommend that you install and use
1500 L<Devel::NYTProf> instead, as it offers significantly improved
1501 profiling and reporting.
1505 L<Devel::Peek> has been upgraded from version 1.04 to 1.07.
1509 L<Devel::SelfStubber> has been upgraded from version 1.03 to 1.05.
1513 L<diagnostics> has been upgraded from version 1.19 to 1.22.
1515 It now renders pod links slightly better, and has been taught to find
1516 descriptions for messages that share their descriptions with other
1521 L<Digest::MD5> has been upgraded from version 2.39 to 2.51.
1523 It is now safe to use this module in combination with threads.
1527 L<Digest::SHA> has been upgraded from version 5.47 to 5.61.
1529 L<shasum> now more closely mimics L<sha1sum(1)>/L<md5sum(1)>.
1531 L<Addfile> accepts all POSIX filenames.
1533 New SHA-512/224 and SHA-512/256 transforms (ref. NIST Draft FIPS 180-4
1538 L<DirHandle> has been upgraded from version 1.03 to 1.04.
1542 L<Dumpvalue> has been upgraded from version 1.13 to 1.16.
1546 L<DynaLoader> has been upgraded from version 1.10 to 1.13.
1548 It fixes a buffer overflow when passed a very long file name.
1550 It no longer inherits from L<AutoLoader>; hence it no longer
1551 produces weird error messages for unsuccessful method calls on classes that
1552 inherit from L<DynaLoader> [perl #84358].
1556 L<Encode> has been upgraded from version 2.39 to 2.42.
1558 Now, all 66 Unicode non-characters are treated the same way U+FFFF has
1559 always been treated: in cases when it was disallowed, all 66 are
1560 disallowed, and in cases where it warned, all 66 warn.
1564 L<Env> has been upgraded from version 1.01 to 1.02.
1568 L<Errno> has been upgraded from version 1.11 to 1.13.
1570 The implementation of L<Errno> has been refactored to use about 55% less memory.
1572 On some platforms with unusual header files, like Win32 L<gcc(1)> using C<mingw64>
1573 headers, some constants that weren't actually error numbers have been exposed
1574 by L<Errno>. This has been fixed [perl #77416].
1578 L<Exporter> has been upgraded from version 5.64_01 to 5.64_03.
1580 Exporter no longer overrides C<$SIG{__WARN__}> [perl #74472]
1584 L<ExtUtils::CBuilder> has been upgraded from version 0.27 to 0.280203.
1588 L<ExtUtils::Command> has been upgraded from version 1.16 to 1.17.
1592 L<ExtUtils::Constant> has been upgraded from 0.22 to 0.23.
1594 The L<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs>
1595 can now croak() for missing constants, or generate a complete C<AUTOLOAD>
1596 subroutine in XS, allowing simplification of many modules that use it
1597 (L<Fcntl>, L<File::Glob>, L<GDBM_File>, L<I18N::Langinfo>, L<POSIX>,
1600 L<ExtUtils::Constant::ProxySubs> can now optionally push the names of all
1601 constants onto the package's C<@EXPORT_OK>.
1605 L<ExtUtils::Install> has been upgraded from version 1.55 to 1.56.
1609 L<ExtUtils::MakeMaker> has been upgraded from version 6.56 to 6.57_05.
1613 L<ExtUtils::Manifest> has been upgraded from version 1.57 to 1.58.
1617 L<ExtUtils::ParseXS> has been upgraded from version 2.21 to 2.2210.
1621 L<Fcntl> has been upgraded from version 1.06 to 1.11.
1625 L<File::Basename> has been upgraded from version 2.78 to 2.82.
1629 L<File::CheckTree> has been upgraded from version 4.4 to 4.41.
1633 L<File::Copy> has been upgraded from version 2.17 to 2.21.
1637 L<File::DosGlob> has been upgraded from version 1.01 to 1.04.
1639 It allows patterns containing literal parentheses: they no longer need to
1640 be escaped. On Windows, it no longer
1641 adds an extra F<./> to file names
1642 returned when the pattern is a relative glob with a drive specification,
1643 like F<C:*.pl> [perl #71712].
1647 L<File::Fetch> has been upgraded from version 0.24 to 0.32.
1649 L<HTTP::Lite> is now supported for the "http" scheme.
1651 The L<fetch(1)> utility is supported on FreeBSD, NetBSD, and
1652 Dragonfly BSD for the C<http> and C<ftp> schemes.
1656 L<File::Find> has been upgraded from version 1.15 to 1.19.
1658 It improves handling of backslashes on Windows, so that paths like
1659 F<C:\dir\/file> are no longer generated [perl #71710].
1663 L<File::Glob> has been upgraded from version 1.07 to 1.12.
1667 L<File::Spec> has been upgraded from version 3.31 to 3.33.
1669 Several portability fixes were made in L<File::Spec::VMS>: a colon is now
1670 recognized as a delimiter in native filespecs; caret-escaped delimiters are
1671 recognized for better handling of extended filespecs; catpath() returns
1672 an empty directory rather than the current directory if the input directory
1673 name is empty; and abs2rel() properly handles Unix-style input (5.12.2).
1677 L<File::stat> has been upgraded from 1.02 to 1.05.
1679 The C<-x> and C<-X> file test operators now work correctly when run
1684 L<Filter::Simple> has been upgraded from version 0.84 to 0.86.
1688 L<GDBM_File> has been upgraded from 1.10 to 1.14.
1690 This fixes a memory leak when DBM filters are used.
1694 L<Hash::Util> has been upgraded from 0.07 to 0.11.
1696 L<Hash::Util> no longer emits spurious "uninitialized" warnings when
1697 recursively locking hashes that have undefined values [perl #74280].
1701 L<Hash::Util::FieldHash> has been upgraded from version 1.04 to 1.09.
1705 L<I18N::Collate> has been upgraded from version 1.01 to 1.02.
1709 L<I18N::Langinfo> has been upgraded from version 0.03 to 0.08.
1711 langinfo() now defaults to using C<$_> if there is no argument given, just
1712 as the documentation has always claimed.
1716 L<I18N::LangTags> has been upgraded from version 0.35 to 0.35_01.
1720 L<if> has been upgraded from version 0.05 to 0.0601.
1724 L<IO> has been upgraded from version 1.25_02 to 1.25_04.
1726 This version of L<IO> includes a new L<IO::Select>, which now allows L<IO::Handle>
1727 objects (and objects in derived classes) to be removed from an L<IO::Select> set
1728 even if the underlying file descriptor is closed or invalid.
1732 L<IPC::Cmd> has been upgraded from version 0.54 to 0.70.
1734 Resolves an issue with splitting Win32 command lines. An argument
1735 consisting of the single character "0" used to be omitted (CPAN RT #62961).
1739 L<IPC::Open3> has been upgraded from 1.05 to 1.09.
1741 open3() now produces an error if the C<exec> call fails, allowing this
1742 condition to be distinguished from a child process that exited with a
1743 non-zero status [perl #72016].
1745 The internal xclose() routine now knows how to handle file descriptors as
1746 documented, so duplicating C<STDIN> in a child process using its file
1747 descriptor now works [perl #76474].
1751 L<IPC::SysV> has been upgraded from version 2.01 to 2.03.
1755 L<lib> has been upgraded from version 0.62 to 0.63.
1759 L<Locale::Maketext> has been upgraded from version 1.14 to 1.19.
1761 L<Locale::Maketext> now supports external caches.
1763 This upgrade also fixes an infinite loop in
1764 C<Locale::Maketext::Guts::_compile()> when
1765 working with tainted values (CPAN RT #40727).
1767 C<< ->maketext >> calls now back up and restore C<$@> so error
1768 messages are not suppressed (CPAN RT #34182).
1772 L<Log::Message> has been upgraded from version 0.02 to 0.04.
1776 L<Log::Message::Simple> has been upgraded from version 0.06 to 0.08.
1780 L<Math::BigInt> has been upgraded from version 1.89_01 to 1.994.
1782 This fixes, among other things, incorrect results when computing binomial
1783 coefficients [perl #77640].
1785 It also prevents C<sqrt($int)> from crashing under C<use bigrat>.
1790 L<Math::BigInt::FastCalc> has been upgraded from version 0.19 to 0.28.
1794 L<Math::BigRat> has been upgraded from version 0.24 to 0.26_02.
1798 L<Memoize> has been upgraded from version 1.01_03 to 1.02.
1802 L<MIME::Base64> has been upgraded from 3.08 to 3.13.
1804 Includes new functions to calculate the length of encoded and decoded
1807 Now provides encode_base64url() and decode_base64url() functions to process
1808 the base64 scheme for "URL applications".
1812 L<Module::Build> has been upgraded from version 0.3603 to 0.3800.
1814 A notable change is the deprecation of several modules.
1815 L<Module::Build::Version> has been deprecated and L<Module::Build> now
1816 relies on the L<version> pragma directly. L<Module::Build::ModuleInfo> has
1817 been deprecated in favor of a standalone copy called L<Module::Metadata>.
1818 L<Module::Build::YAML> has been deprecated in favor of L<CPAN::Meta::YAML>.
1820 L<Module::Build> now also generates F<META.json> and F<MYMETA.json> files
1821 in accordance with version 2 of the CPAN distribution metadata specification,
1822 L<CPAN::Meta::Spec>. The older format F<META.yml> and F<MYMETA.yml> files are
1827 L<Module::CoreList> has been upgraded from version 2.29 to 2.47.
1829 Besides listing the updated core modules of this release, it also stops listing
1830 the C<Filespec> module. That module never existed in core. The scripts
1831 generating L<Module::CoreList> confused it with L<VMS::Filespec>, which actually
1832 is a core module as of Perl 5.8.7.
1836 L<Module::Load> has been upgraded from version 0.16 to 0.18.
1840 L<Module::Load::Conditional> has been upgraded from version 0.34 to 0.44.
1844 The L<mro> pragma has been upgraded from version 1.02 to 1.07.
1849 L<NDBM_File> has been upgraded from version 1.08 to 1.12.
1851 This fixes a memory leak when DBM filters are used.
1855 L<Net::Ping> has been upgraded from version 2.36 to 2.38.
1859 L<NEXT> has been upgraded from version 0.64 to 0.65.
1863 L<Object::Accessor> has been upgraded from version 0.36 to 0.38.
1867 L<ODBM_File> has been upgraded from version 1.07 to 1.10.
1869 This fixes a memory leak when DBM filters are used.
1873 L<Opcode> has been upgraded from version 1.15 to 1.18.
1877 The L<overload> pragma has been upgraded from 1.10 to 1.13.
1879 C<overload::Method> can now handle subroutines that are themselves blessed
1880 into overloaded classes [perl #71998].
1882 The documentation has greatly improved. See L</Documentation> below.
1886 L<Params::Check> has been upgraded from version 0.26 to 0.28.
1890 The L<parent> pragma has been upgraded from version 0.223 to 0.225.
1894 L<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401.
1896 The latest Parse::CPAN::Meta can now read YAML and JSON files using
1897 L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core.
1901 L<PerlIO::encoding> has been upgraded from version 0.12 to 0.14.
1905 L<PerlIO::scalar> has been upgraded from 0.07 to 0.11.
1907 A read() after a seek() beyond the end of the string no longer thinks it
1908 has data to read [perl #78716].
1912 L<PerlIO::via> has been upgraded from version 0.09 to 0.11.
1916 L<Pod::Html> has been upgraded from version 1.09 to 1.11.
1920 L<Pod::LaTeX> has been upgraded from version 0.58 to 0.59.
1924 L<Pod::Perldoc> has been upgraded from version 3.15_02 to 3.15_03.
1928 L<Pod::Simple> has been upgraded from version 3.13 to 3.16.
1932 L<POSIX> has been upgraded from 1.19 to 1.24.
1934 It now includes constants for POSIX signal constants.
1938 The L<re> pragma has been upgraded from version 0.11 to 0.18.
1940 The C<use re '/flags'> subpragma is new.
1942 The regmust() function used to crash when called on a regular expression
1943 belonging to a pluggable engine. Now it croaks instead.
1945 regmust() no longer leaks memory.
1949 L<Safe> has been upgraded from version 2.25 to 2.29.
1951 Coderefs returned by reval() and rdo() are now wrapped via
1952 wrap_code_refs() (5.12.1).
1954 This fixes a possible infinite loop when looking for coderefs.
1956 It adds several C<version::vxs::*> routines to the default share.
1960 L<SDBM_File> has been upgraded from version 1.06 to 1.09.
1964 L<SelfLoader> has been upgraded from 1.17 to 1.18.
1966 It now works in taint mode [perl #72062].
1970 The L<sigtrap> pragma has been upgraded from version 1.04 to 1.05.
1972 It no longer tries to modify read-only arguments when generating a
1973 backtrace [perl #72340].
1977 L<Socket> has been upgraded from version 1.87 to 1.94.
1979 See L</Improved IPv6 support> above.
1983 L<Storable> has been upgraded from version 2.22 to 2.27.
1985 Includes performance improvement for overloaded classes.
1987 This adds support for serialising code references that contain UTF-8 strings
1988 correctly. The L<Storable> minor version
1989 number changed as a result, meaning that
1990 L<Storable> users who set C<$Storable::accept_future_minor> to a C<FALSE> value
1991 will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details).
1993 Freezing no longer gets confused if the Perl stack gets reallocated
1994 during freezing [perl #80074].
1998 L<Sys::Hostname> has been upgraded from version 1.11 to 1.16.
2002 L<Term::ANSIColor> has been upgraded from version 2.02 to 3.00.
2006 L<Term::UI> has been upgraded from version 0.20 to 0.26.
2010 L<Test::Harness> has been upgraded from version 3.17 to 3.23.
2014 L<Test::Simple> has been upgraded from version 0.94 to 0.98.
2016 Among many other things, subtests without a C<plan> or C<no_plan> now have an
2017 implicit done_testing() added to them.
2021 L<Thread::Semaphore> has been upgraded from version 2.09 to 2.12.
2023 It provides two new methods that give more control over the decrementing of
2024 semaphores: C<down_nb> and C<down_force>.
2028 L<Thread::Queue> has been upgraded from version 2.11 to 2.12.
2032 The L<threads> pragma has been upgraded from version 1.75 to 1.83.
2036 The L<threads::shared> pragma has been upgraded from version 1.32 to 1.37.
2040 L<Tie::Hash> has been upgraded from version 1.03 to 1.04.
2042 Calling C<< Tie::Hash->TIEHASH() >> used to loop forever. Now it C<croak>s.
2046 L<Tie::Hash::NamedCapture> has been upgraded from version 0.06 to 0.08.
2050 L<Tie::RefHash> has been upgraded from version 1.38 to 1.39.
2054 L<Time::HiRes> has been upgraded from version 1.9719 to 1.9721_01.
2058 L<Time::Local> has been upgraded from version 1.1901_01 to 1.2000.
2062 L<Time::Piece> has been upgraded from version 1.15_01 to 1.20_01.
2066 L<Unicode::Collate> has been upgraded from version 0.52_01 to 0.73.
2068 L<Unicode::Collate> has been updated to use Unicode 6.0.0.
2070 L<Unicode::Collate::Locale> now supports a plethora of new locales: I<ar, be,
2071 bg, de__phonebook, hu, hy, kk, mk, nso, om, tn, vi, hr, ig, ja, ko, ru, sq,
2072 se, sr, to, uk, zh, zh__big5han, zh__gb2312han, zh__pinyin>, and I<zh__stroke>.
2074 The following modules have been added:
2076 L<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes
2077 tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering.
2079 L<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes
2080 tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering.
2082 L<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji
2083 (CJK Unified Ideographs) in the JIS X 0208 order.
2085 L<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs
2086 in the order of CLDR's Korean ordering.
2088 L<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes
2089 tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering.
2091 L<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes
2092 tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
2094 This also sees the switch from using the pure-Perl version of this
2095 module to the XS version.
2099 L<Unicode::Normalize> has been upgraded from version 1.03 to 1.10.
2103 L<Unicode::UCD> has been upgraded from version 0.27 to 0.32.
2105 A new function, Unicode::UCD::num(), has been added. This function
2106 returns the numeric value of the string passed it or C<undef> if the string
2107 in its entirety has no "safe" numeric value. (For more detail, and for the
2108 definition of "safe", see L<Unicode::UCD/num>.)
2110 This upgrade also includes several bug fixes:
2120 It is now updated to Unicode Version 6.0.0 with I<Corrigendum #8>,
2121 excepting that, just as with Perl 5.14, the code point at U+1F514 has no name.
2125 Hangul syllable code points have the correct names, and their
2126 decompositions are always output without requiring L<Lingua::KO::Hangul::Util>
2131 CJK (Chinese-Japanese-Korean) code points U+2A700 to U+2B734
2132 and U+2B740 to U+2B81D are now properly handled.
2136 Numeric values are now output for those CJK code points that have them.
2140 Names output for code points with multiple aliases are now the
2147 This now correctly returns "Unknown" instead of C<undef> for the script
2148 of a code point that hasn't been assigned another one.
2152 This now correctly returns "No_Block" instead of C<undef> for the block
2153 of a code point that hasn't been assigned to another one.
2159 The L<version> pragma has been upgraded from 0.82 to 0.88.
2161 Because of a bug, now fixed, the is_strict() and is_lax() functions did not
2162 work when exported (5.12.1).
2166 The L<warnings> pragma has been upgraded from version 1.09 to 1.12.
2168 Calling C<use warnings> without arguments is now significantly more efficient.
2172 The L<warnings::register> pragma has been upgraded from version 1.01 to 1.02.
2174 It is now possible to register warning categories other than the names of
2175 packages using L<warnings::register>. See L<perllexwarn(1)> for more information.
2179 L<XSLoader> has been upgraded from version 0.10 to 0.13.
2183 L<VMS::DCLsym> has been upgraded from version 1.03 to 1.05.
2185 Two bugs have been fixed [perl #84086]:
2187 The symbol table name was lost when tying a hash, due to a thinko in
2188 C<TIEHASH>. The result was that all tied hashes interacted with the
2191 Unless a symbol table name had been explicitly specified in the call
2192 to the constructor, querying the special key C<:LOCAL> failed to
2193 identify objects connected to the local symbol table.
2197 The L<Win32> module has been upgraded from version 0.39 to 0.44.
2199 This release has several new functions: Win32::GetSystemMetrics(),
2200 Win32::GetProductInfo(), Win32::GetOSDisplayName().
2202 The names returned by Win32::GetOSName() and Win32::GetOSDisplayName()
2203 have been corrected.
2207 L<XS::Typemap> has been upgraded from version 0.03 to 0.05.
2211 =head2 Removed Modules and Pragmata
2213 As promised in Perl 5.12.0's release notes, the following modules have
2214 been removed from the core distribution, and if needed should be installed
2221 L<Class::ISA> has been removed from the Perl core. Prior version was 0.36.
2225 L<Pod::Plainer> has been removed from the Perl core. Prior version was 1.02.
2229 L<Switch> has been removed from the Perl core. Prior version was 2.16.
2233 The removal of L<Shell> has been deferred until after 5.14, as the
2234 implementation of L<Shell> shipped with 5.12.0 did not correctly issue the
2235 warning that it was to be removed from core.
2237 =head1 Documentation
2239 =head2 New Documentation
2243 L<perlgpl> has been updated to contain GPL version 1, as is included in the
2244 F<README> distributed with Perl (5.12.1).
2246 =head3 Perl 5.12.x delta files
2248 The perldelta files for Perl 5.12.1 to 5.12.3 have been added from the
2249 maintenance branch: L<perl5121delta>, L<perl5122delta>, L<perl5123delta>.
2251 =head3 L<perlpodstyle>
2253 New style guide for POD documentation,
2254 split mostly from the NOTES section of the L<pod2man(1)> manpage.
2256 =head3 L<perlsource>, L<perlinterp>, L<perlhacktut>, and L<perlhacktips>
2258 See L</perlhack and perlrepository revamp>, below.
2260 =head2 Changes to Existing Documentation
2262 =head3 L<perlmodlib> is now complete
2264 The L<perlmodlib> manpage that came with Perl 5.12.0 was missing several
2265 modules due to a bug in the script that generates the list. This has been
2266 fixed [perl #74332] (5.12.1).
2268 =head3 Replace incorrect tr/// table in L<perlebcdic>
2270 L<perlebcdic> contains a helpful table to use in C<tr///> to convert
2271 between EBCDIC and Latin1/ASCII. The table was the inverse of the one
2272 it describes, though the code that used the table worked correctly for
2273 the specific example given.
2275 The table has been corrected and the sample code changed to correspond.
2277 The table has also been changed to hex from octal, and the recipes in the
2278 pod have been altered to print out leading zeros to make all values
2281 =head3 Tricks for user-defined casing
2283 L<perlunicode> now contains an explanation of how to override, mangle
2284 and otherwise tweak the way Perl handles upper-, lower- and other-case
2285 conversions on Unicode data, and how to provide scoped changes to alter
2286 one's own code's behaviour without stomping on anybody else's.
2288 =head3 INSTALL explicitly states that Perl requires a C89 compiler
2290 This was already true, but it's now Officially Stated For The Record
2293 =head3 Explanation of C<\xI<HH>> and C<\oI<OOO>> escapes
2295 L<perlop> has been updated with more detailed explanation of these two
2298 =head3 B<-0I<NNN>> switch
2300 In L<perlrun>, the behaviour of the B<-0NNN> switch for B<-0400> or higher
2301 has been clarified (5.12.2).
2303 =head3 Maintenance policy
2305 L<perlpolicy> now contains the policy on what patches are acceptable for
2306 maintenance branches (5.12.1).
2308 =head3 Deprecation policy
2310 L<perlpolicy> now contains the policy on compatibility and deprecation
2311 along with definitions of terms like "deprecation" (5.12.2).
2313 =head3 New descriptions in L<perldiag>
2315 The following existing diagnostics are now documented:
2321 L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c">
2325 L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s">
2330 L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()">
2334 L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)">
2338 L<Invalid version format (%s)|perldiag/"Invalid version format (%s)">
2342 L<Invalid version object|perldiag/"Invalid version object">
2348 L<perlbook> has been expanded to cover many more popular books.
2350 =head3 C<SvTRUE> macro
2352 The documentation for the C<SvTRUE> macro in
2353 L<perlapi> was simply wrong in stating that
2354 get-magic is not processed. It has been corrected.
2356 =head3 L<perlvar> revamp
2358 L<perlvar> reorders the variables and groups them by topic. Each variable
2359 introduced after Perl 5.000 notes the first version in which it is
2360 available. L<perlvar> also has a new section for deprecated variables to
2361 note when they were removed.
2363 =head3 Array and hash slices in scalar context
2365 These are now documented in L<perldata>.
2367 =head3 C<use locale> and formats
2369 L<perlform> and L<perllocale> have been corrected to state that
2370 C<use locale> affects formats.
2374 L<overload>'s documentation has practically undergone a rewrite. It
2375 is now much more straightforward and clear.
2377 =head3 perlhack and perlrepository revamp
2379 The L<perlhack> document is now much shorter, and focuses on the Perl 5
2380 development process and submitting patches to Perl. The technical content
2381 has been moved to several new documents, L<perlsource>, L<perlinterp>,
2382 L<perlhacktut>, and L<perlhacktips>. This technical content has
2383 been only lightly edited.
2385 The perlrepository document has been renamed to L<perlgit>. This new
2386 document is just a how-to on using git with the Perl source code.
2387 Any other content that used to be in perlrepository has been moved
2390 =head3 Time::Piece examples
2392 Examples in L<perlfaq4> have been updated to show the use of
2397 The following additions or changes have been made to diagnostic output,
2398 including warnings and fatal error messages. For the complete list of
2399 diagnostic messages, see L<perldiag>.
2401 =head2 New Diagnostics
2407 =item Closure prototype called
2409 This error occurs when a subroutine reference passed to an attribute
2410 handler is called, if the subroutine is a closure [perl #68560].
2412 =item Insecure user-defined property %s
2414 Perl detected tainted data when trying to compile a regular
2415 expression that contains a call to a user-defined character property
2416 function, meaning C<\p{IsFoo}> or C<\p{InFoo}>.
2417 See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
2419 =item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries
2421 This new error is triggered if a destructor called on an object in a
2422 typeglob that is being freed creates a new typeglob entry containing an
2423 object with a destructor that creates a new entry containing an object etc.
2425 =item Parsing code internal error (%s)
2427 This new fatal error is produced when parsing
2428 code supplied by an extension violates the
2429 parser's API in a detectable way.
2431 =item refcnt: fd %d%s
2433 This new error only occurs if a internal consistency check fails when a
2434 pipe is about to be closed.
2436 =item Regexp modifier "/%c" may not appear twice
2438 The regular expression pattern has one of the
2439 mutually exclusive modifiers repeated.
2441 =item Regexp modifiers "/%c" and "/%c" are mutually exclusive
2443 The regular expression pattern has more than one of the mutually
2444 exclusive modifiers.
2446 =item Using !~ with %s doesn't make sense
2448 This error occurs when C<!~> is used with C<s///r> or C<y///r>.
2456 =item "\b{" is deprecated; use "\b\{" instead
2458 =item "\B{" is deprecated; use "\B\{" instead
2460 Use of an unescaped "{" immediately following a C<\b> or C<\B> is now
2461 deprecated in order to reserve its use for Perl itself in a future release.
2463 =item Operation "%s" returns its argument for ...
2465 Performing an operation requiring Unicode semantics (such as case-folding)
2466 on a Unicode surrogate or a non-Unicode character now triggers this
2469 =item Use of qw(...) as parentheses is deprecated
2471 See L</"Use of qw(...) as parentheses">, above, for details.
2475 =head2 Changes to Existing Diagnostics
2481 The "Variable $foo is not imported" warning that precedes a
2482 C<strict 'vars'> error has now been assigned the "misc" category, so that
2483 C<no warnings> will suppress it [perl #73712].
2487 warn() and die() now produce "Wide character" warnings when fed a
2488 character outside the byte range if C<STDERR> is a byte-sized handle.
2492 The "Layer does not match this perl" error message has been replaced with
2493 these more helpful messages [perl #73754]:
2499 PerlIO layer function table size (%d) does not match size expected by this
2504 PerlIO layer instance size (%d) does not match size expected by this perl
2511 The "Found = in conditional" warning that is emitted when a constant is
2512 assigned to a variable in a condition is now withheld if the constant is
2513 actually a subroutine or one generated by C<use constant>, since the value
2514 of the constant may not be known at the time the program is written
2519 Previously, if none of the gethostbyaddr(), gethostbyname() and
2520 gethostent() functions were implemented on a given platform, they would
2521 all die with the message "Unsupported socket function 'gethostent' called",
2522 with analogous messages for getnet*() and getserv*(). This has been
2527 The warning message about unrecognized regular expression escapes passed
2528 through has been changed to include any literal "{" following the
2529 two-character escape. For example, "\q{" is now emitted instead of "\q".
2533 =head1 Utility Changes
2535 =head3 L<perlbug(1)>
2541 L<perlbug> now looks in the EMAIL environment variable for a return address
2542 if the REPLY-TO and REPLYTO variables are empty.
2546 L<perlbug> did not previously generate a "From:" header, potentially
2547 resulting in dropped mail; it now includes that header.
2551 The user's address is now used as the Return-Path.
2553 Many systems these days don't have a valid Internet domain name, and
2554 perlbug@perl.org does not accept email with a return-path that does
2555 not resolve. So the user's address is now passed to sendmail so it's
2556 less likely to get stuck in a mail queue somewhere [perl #82996].
2560 L<perlbug> now always gives the reporter a chance to change the email
2561 address it guesses for them (5.12.2).
2565 L<perlbug> should no longer warn about uninitialized values when using the B<-d>
2566 and B<-v> options (5.12.2).
2570 =head3 L<perl5db.pl>
2576 The remote terminal works after forking and spawns new sessions, one
2587 L<ptargrep> is a new utility to apply pattern matching to the contents of
2588 files in a tar archive. It comes with C<Archive::Tar>.
2592 =head1 Configuration and Compilation
2594 See also L</"Naming fixes in Policy_sh.SH may invalidate Policy.sh">,
2601 CCINCDIR and CCLIBDIR for the mingw64 cross-compiler are now correctly
2602 under F<$(CCHOME)\mingw\include> and F<\lib> rather than immediately below
2605 This means the "incpath", "libpth", "ldflags", "lddlflags" and
2606 "ldflags_nolargefiles" values in F<Config.pm> and F<Config_heavy.pl> are now
2611 C<make test.valgrind> has been adjusted to account for F<cpan/dist/ext>
2616 On compilers that support it, B<-Wwrite-strings> is now added to cflags by
2621 The L<Encode> module can now (once again) be included in a static Perl
2622 build. The special-case handling for this situation got broken in Perl
2623 5.11.0, and has now been repaired.
2627 The previous default size of a PerlIO buffer (4096 bytes) has been increased
2628 to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling
2629 this decade-old default increases read and write performance by around
2630 25% to 50% when using the default layers of perlio on top of unix. To choose
2631 a non-default size, such as to get back the old value or to obtain an even
2632 larger value, configure with:
2634 ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N
2636 where N is the desired size in bytes; it should probably be a multiple of
2641 An "incompatible operand types" error in ternary expressions when building
2642 with C<clang> has been fixed (5.12.2).
2646 Perl now skips setuid L<File::Copy> tests on partitions it detects mounted
2647 as C<nosuid> (5.12.2).
2651 =head1 Platform Support
2653 =head2 New Platforms
2659 Perl now builds on AIX 4.2 (5.12.1).
2663 =head2 Discontinued Platforms
2667 =item Apollo DomainOS
2669 The last vestiges of support for this platform have been excised from
2670 the Perl distribution. It was officially discontinued in version 5.12.0.
2671 It had not worked for years before that.
2675 The last vestiges of support for this platform have been excised from the
2676 Perl distribution. It was officially discontinued in an earlier version.
2680 =head2 Platform-Specific Notes
2688 F<README.aix> has been updated with information about the XL C/C++ V11 compiler
2699 The C<d_u32align> configuration probe on ARM has been fixed (5.12.2).
2709 L<MakeMaker> has been updated to build manpages on cygwin.
2713 Improved rebase behaviour
2715 If a DLL is updated on cygwin the old imagebase address is reused.
2716 This solves most rebase errors, especially when updating on core DLL's.
2717 See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README>
2718 for more information.
2722 Support for the standard cygwin dll prefix (needed for FFIs)
2726 Updated build hints file
2736 FreeBSD 7 no longer contains F</usr/bin/objformat>. At build time,
2737 Perl now skips the F<objformat> check for versions 7 and higher and
2738 assumes ELF (5.12.1).
2748 Perl now allows B<-Duse64bitint> without promoting to C<use64bitall> on HP-UX
2759 Conversion of strings to floating-point numbers is now more accurate on
2760 IRIX systems [perl #32380].
2770 Early versions of Mac OS X (Darwin) had buggy implementations of the
2771 setregid(), setreuid(), setrgid(,) and setruid() functions, so Perl
2772 would pretend they did not exist.
2774 These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and
2775 higher, as they have been fixed [perl #72990].
2785 Previously if you built Perl with a shared F<libperl.so> on MirBSD (the
2786 default config), it would work up to the installation; however, once
2787 installed, it would be unable to find F<libperl>. Path handling is now
2788 treated as in the other BSD dialects.
2798 The NetBSD hints file has been changed to make the system malloc the
2809 OpenBSD E<gt> 3.7 has a new malloc implementation which is I<mmap>-based,
2810 and as such can release memory back to the OS; however, Perl's use of
2811 this malloc causes a substantial slowdown, so we now default to using
2812 Perl's malloc instead [perl #75742].
2822 Perl now builds again with OpenVOS (formerly known as Stratus VOS)
2823 [perl #78132] (5.12.3).
2833 DTrace is now supported on Solaris. There used to be build failures, but
2834 these have been fixed [perl #73630] (5.12.3).
2844 Extension building on older (pre 7.3-2) VMS systems was broken because
2845 configure.com hit the DCL symbol length limit of 1K. We now work within
2846 this limit when assembling the list of extensions in the core build (5.12.1).
2850 We fixed configuring and building Perl with B<-Uuseperlio> (5.12.1).
2854 C<PerlIOUnix_open> now honours the default permissions on VMS.
2856 When C<perlio> became the default and C<unix> became the default bottom layer,
2857 the most common path for creating files from Perl became C<PerlIOUnix_open>,
2858 which has always explicitly used C<0666> as the permission mask. This prevents
2859 inheriting permissions from RMS defaults and ACLs, so to avoid that problem,
2860 we now pass C<0777> to open(). In theVMS CRTL, C<0777> has a special
2861 meaning over and above intersecting with the current umask; specifically, it
2862 allows Unix syscalls to preserve native default permissions (5.12.3).
2866 The shortening of symbols longer than 31 characters in the core C sources
2867 and in extensions is now by default done by the C compiler rather than by
2868 xsubpp (which could only do so for generated symbols in XS code). You can
2869 reenable xsubpp's symbol shortening by configuring with -Uuseshortenedsymbols,
2870 but you'll have some work to do to get the core sources to compile.
2874 Record-oriented files (record format variable or variable with fixed control)
2875 opened for write by the C<perlio> layer will now be line-buffered to prevent the
2876 introduction of spurious line breaks whenever the perlio buffer fills up.
2880 F<git_version.h> is now installed on VMS. This was an oversight in v5.12.0 which
2881 caused some extensions to fail to build (5.12.2).
2885 Several memory leaks in L<stat()|perlfunc/"stat FILEHANDLE"> have been fixed (5.12.2).
2889 A memory leak in Perl_rename() due to a double allocation has been
2894 A memory leak in vms_fid_to_name() (used by realpath() and
2895 realname()> has been fixed (5.12.2).
2901 See also L</"fork() emulation will not wait for signalled children"> and
2902 L</"Perl source code is read in text mode on Windows">, above.
2908 Fixed build process for SDK2003SP1 compilers.
2912 Compilation with Visual Studio 2010 is now supported.
2916 When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> is now
2917 set in C<$Config{ccflags}>. This improves portability when compiling
2918 XS extensions using new compilers, but for a Perl compiled with old 32-bit
2923 C<$Config{gccversion}> is now set correctly when Perl is built using the
2924 mingw64 compiler from L<http://mingw64.org> [perl #73754].
2928 When building Perl with the mingw64 x64 cross-compiler C<incpath>,
2929 C<libpth>, C<ldflags>, C<lddlflags> and C<ldflags_nolargefiles> values
2930 in F<Config.pm> and F<Config_heavy.pl> were not previously being set
2931 correctly because, with that compiler, the include and lib directories
2932 are not immediately below C<$(CCHOME)> (5.12.2).
2936 The build process proceeds more smoothly with mingw and dmake when
2937 F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix.
2941 Support for building with Visual C++ 2010 is now underway, but is not yet
2942 complete. See F<README.win32> or L<perlwin32> for more details.
2946 The option to use an externally-supplied crypt(), or to build with no
2947 crypt() at all, has been removed. Perl supplies its own crypt()
2948 implementation for Windows, and the political situation that required
2949 this part of the distribution to sometimes be omitted is long gone.
2953 =head1 Internal Changes
2957 =head3 CLONE_PARAMS structure added to ease correct thread creation
2959 Modules that create threads should now create C<CLONE_PARAMS> structures
2960 by calling the new function Perl_clone_params_new(), and free them with
2961 Perl_clone_params_del(). This will ensure compatibility with any future
2962 changes to the internals of the C<CLONE_PARAMS> structure layout, and that
2963 it is correctly allocated and initialised.
2965 =head3 New parsing functions
2967 Several functions have been added for parsing statements or multiple
2974 C<parse_fullstmt> parses a complete Perl statement.
2978 C<parse_stmtseq> parses a sequence of statements, up
2979 to closing brace or EOF.
2983 C<parse_block> parses a block [perl #78222].
2987 C<parse_barestmt> parses a statement
2992 C<parse_label> parses a statement label, separate from statements.
2997 L<C<parse_fullexpr()>|perlapi/parse_fullexpr>,
2998 L<C<parse_listexpr()>|perlapi/parse_listexpr>,
2999 L<C<parse_termexpr()>|perlapi/parse_termexpr>, and
3000 L<C<parse_arithexpr()>|perlapi/parse_arithexpr>
3001 functions have been added to the API. They run
3002 recursive-descent parsing of expressions at various precedence levels.
3003 They are expected to be used by syntax plugins.
3005 See L<perlapi> for details.
3007 =head3 Hints hash API
3009 A new C API for introspecting the hinthash C<%^H> at runtime has been
3010 added. See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>,
3011 C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details.
3013 A new, experimental API has been added for accessing the internal
3014 structure that Perl uses for C<%^H>. See the functions beginning with
3015 C<cophh_> in L<perlapi>.
3017 =head3 C interface to caller()
3019 The C<caller_cx> function has been added as an XSUB-writer's equivalent of
3020 caller(). See L<perlapi> for details.
3022 =head3 Custom per-subroutine check hooks
3024 XS code in an extension module can now annotate a subroutine (whether
3025 implemented in XS or in Perl) so that nominated XS code will be called
3026 at compile time (specifically as part of op checking) to change the op
3027 tree of that subroutine. The compile-time check function (supplied by
3028 the extension module) can implement argument processing that can't be
3029 expressed as a prototype, generate customised compile-time warnings,
3030 perform constant folding for a pure function, inline a subroutine
3031 consisting of sufficiently simple ops, replace the whole call with a
3032 custom op, and so on. This was previously all possible by hooking the
3033 C<entersub> op checker, but the new mechanism makes it easy to tie the
3034 hook to a specific subroutine. See L<perlapi/cv_set_call_checker>.
3036 To help in writing custom check hooks, several subtasks within standard
3037 C<entersub> op checking have been separated out and exposed in the API.
3039 =head3 Improved support for custom OPs
3041 Custom ops can now be registered with the new C<custom_op_register> C
3042 function and the C<XOP> structure. This will make it easier to add new
3043 properties of custom ops in the future. Two new properties have been added
3044 already, C<xop_class> and C<xop_peep>.
3046 C<xop_class> is one of the OA_*OP constants. It allows L<B> and other
3047 introspection mechanisms to work with custom ops
3048 that aren't BASEOPs. C<xop_peep> is a pointer to
3049 a function that will be called for ops of this
3050 type from C<Perl_rpeep>.
3052 See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
3055 The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
3056 supported but discouraged.
3060 It is now possible for XS code to hook into Perl's lexical scope
3061 mechanism at compile time, using the new C<Perl_blockhook_register>
3062 function. See L<perlguts/"Compile-time scope hooks">.
3064 =head3 The recursive part of the peephole optimizer is now hookable
3066 In addition to C<PL_peepp>, for hooking into the toplevel peephole optimizer, a
3067 C<PL_rpeepp> is now available to hook into the optimizer recursing into
3068 side-chains of the optree.
3070 =head3 New non-magical variants of existing functions
3072 The following functions/macros have been added to the API. The C<*_nomg>
3073 macros are equivalent to their non-C<_nomg> variants, except that they ignore
3074 C<get-magic>. Those ending in C<_flags> allow one to specify whether
3075 C<get-magic> is processed.
3086 In some of these cases, the non-C<_flags> functions have
3087 been replaced with wrappers around the new functions.
3089 =head3 pv/pvs/sv versions of existing functions
3091 Many functions ending with pvn now have equivalent C<pv/pvs/sv> versions.
3093 =head3 List op-building functions
3095 List op-building functions have been added to the
3096 API. See L<op_append_elem|perlapi/op_append_elem>,
3097 L<op_append_list|perlapi/op_append_list>, and
3098 L<op_prepend_elem|perlapi/op_prepend_elem> in L<perlapi>.
3102 The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that
3103 constructs the execution-order op chain, has been added to the API.
3105 =head3 Localisation functions
3107 The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr>
3108 functions have been added to the API.
3112 A stash can now have a list of effective names in addition to its usual
3113 name. The first effective name can be accessed via the C<HvENAME> macro,
3114 which is now the recommended name to use in MRO linearisations (C<HvNAME>
3115 being a fallback if there is no C<HvENAME>).
3117 These names are added and deleted via C<hv_ename_add> and
3118 C<hv_ename_delete>. These two functions are I<not> part of the API.
3120 =head3 New functions for finding and removing magic
3122 The L<C<mg_findext()>|perlapi/mg_findext> and
3123 L<C<sv_unmagicext()>|perlapi/sv_unmagicext>
3124 functions have been added to the API.
3125 They allow extension authors to find and remove magic attached to
3126 scalars based on both the magic type and the magic virtual table, similar to how
3127 sv_magicext() attaches magic of a certain type and with a given virtual table
3128 to a scalar. This eliminates the need for extensions to walk the list of
3129 C<MAGIC> pointers of an C<SV> to find the magic that belongs to them.
3131 =head3 C<find_rundefsv>
3133 This function returns the SV representing C<$_>, whether it's lexical
3136 =head3 C<Perl_croak_no_modify>
3138 Perl_croak_no_modify() is short-hand for
3139 C<Perl_croak("%s", PL_no_modify)>.
3141 =head3 C<PERL_STATIC_INLINE> define
3143 The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
3144 incantation to use for static inline functions, if the C compiler supports
3145 C99-style static inline. If it doesn't, it'll give a plain C<static>.
3147 C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
3150 =head3 New C<pv_escape> option for hexadecimal escapes
3152 A new option, C<PERL_PV_ESCAPE_NONASCII>, has been added to C<pv_escape> to
3153 dump all characters above ASCII in hexadecimal. Before, one could get all
3154 characters as hexadecimal or the Latin1 non-ASCII as octal.
3158 C<lex_start> has been added to the API, but is considered experimental.
3160 =head3 op_scope() and op_lvalue()
3162 The op_scope() and op_lvalue() functions have been added to the API,
3163 but are considered experimental.
3165 =head2 C API Changes
3167 =head3 C<PERL_POLLUTE> has been removed
3169 The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for
3170 backwards compatibility has been removed. Its use was always discouraged,
3171 and MakeMaker contains a more specific escape hatch:
3173 perl Makefile.PL POLLUTE=1
3175 This can be used for modules that have not been upgraded to 5.6 naming
3176 conventions (and really should be completely obsolete by now).
3178 =head3 Check API compatibility when loading XS modules
3180 When Perl's API changes in incompatible ways (which usually happens between
3181 major releases), XS modules compiled for previous versions of Perl will no
3182 longer work. They need to be recompiled against the new Perl.
3184 The C<XS_APIVERSION_BOOTCHECK> macro has been added to ensure that modules
3185 are recompiled and to prevent users from accidentally loading modules
3186 compiled for old perls into newer perls. That macro, which is called when
3187 loading every newly compiled extension, compares the API version of the
3188 running perl with the version a module has been compiled for and raises an
3189 exception if they don't match.
3191 =head3 Perl_fetch_cop_label
3193 The first argument of the C API function C<Perl_fetch_cop_label> has changed
3194 from C<struct refcounted he *> to C<COP *>, to insulate the user from
3195 implementation details.
3197 This API function was marked as "may change", and likely isn't in use outside
3198 the core. (Neither an unpacked CPAN nor Google's codesearch finds any other
3201 =head3 GvCV() and GvGP() are no longer lvalues
3203 The new GvCV_set() and GvGP_set() macros are now provided to replace
3204 assignment to those two macros.
3206 This allows a future commit to eliminate some backref magic between GV
3207 and CVs, which will require complete control over assignment to the
3210 =head3 CvGV() is no longer an lvalue
3212 Under some circumstances, the CvGV() field of a CV is now
3213 reference-counted. To ensure consistent behaviour, direct assignment to
3214 it, for example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
3215 C<CvGV_set(cv,gv)> has been introduced to run this operation
3216 safely. Note that modification of this field is not part of the public
3217 API, regardless of this new macro (and despite its being listed in this section).
3219 =head3 CvSTASH() is no longer an lvalue
3221 The CvSTASH() macro can now only be used as an rvalue. CvSTASH_set()
3222 has been added to replace assignment to CvSTASH(). This is to ensure
3223 that backreferences are handled properly. These macros are not part of the
3226 =head3 Calling conventions for C<newFOROP> and C<newWHILEOP>
3228 The way the parser handles labels has been cleaned up and refactored. As a
3229 result, the newFOROP() constructor function no longer takes a parameter
3230 stating what label is to go in the state op.
3232 The newWHILEOP() and newFOROP() functions no longer accept a line
3233 number as a parameter.
3235 =head3 Flags passed to C<uvuni_to_utf8_flags> and C<utf8n_to_uvuni>
3237 Some of the flags parameters to uvuni_to_utf8_flags() and
3238 utf8n_to_uvuni() have changed. This is a result of Perl's now allowing
3239 internal storage and manipulation of code points that are problematic
3240 in some situations. Hence, the default actions for these functions has
3241 been complemented to allow these code points. The new flags are
3242 documented in L<perlapi>. Code that requires the problematic code
3243 points to be rejected needs to change to use the new flags. Some flag
3244 names are retained for backward source compatibility, though they do
3245 nothing, as they are now the default. However the flags
3246 C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and
3247 C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a
3248 fundamentally broken model of how the Unicode non-character code points
3249 should be handled, which is now described in
3250 L<perlunicode/Non-character code points>. See also the Unicode section
3251 under L</Selected Bug Fixes>.
3253 =head2 Deprecated C APIs
3257 =item C<Perl_ptr_table_clear>
3259 C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it
3260 now generates a deprecation warning, and it will be removed in a future
3263 =item C<sv_compile_2op>
3265 The sv_compile_2op() API function is now deprecated. Searches suggest
3266 that nothing on CPAN is using it, so this should have zero impact.
3268 It attempted to provide an API to compile code down to an optree, but failed
3269 to bind correctly to lexicals in the enclosing scope. It's not possible to
3270 fix this problem within the constraints of its parameters and return value.
3272 =item C<find_rundefsvoffset>
3274 The C<find_rundefsvoffset> function has been deprecated. It appeared that
3275 its design was insufficient for reliably getting the lexical C<$_> at
3278 Use the new C<find_rundefsv> function or the C<UNDERBAR> macro
3279 instead. They directly return the right SV
3280 representing C<$_>, whether it's
3283 =item C<CALL_FPTR> and C<CPERLscope>
3285 Those are left from an old implementation of C<MULTIPLICITY> using C++ objects,
3286 which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so
3287 they shouldn't be used anymore.
3289 For compatibility, they are still defined for external C<XS> code. Only
3290 extensions defining C<PERL_CORE> must be updated now.
3294 =head2 Other Internal Changes
3296 =head3 Stack unwinding
3298 The protocol for unwinding the C stack at the last stage of a C<die>
3299 has changed how it identifies the target stack frame. This now uses
3300 a separate variable C<PL_restartjmpenv>, where previously it relied on
3301 the C<blk_eval.cur_top_env> pointer in the C<eval> context frame that
3302 has nominally just been discarded. This change means that code running
3303 during various stages of Perl-level unwinding no longer needs to take
3304 care to avoid destroying the ghost frame.
3306 =head3 Scope stack entries
3308 The format of entries on the scope stack has been changed, resulting in a
3309 reduction of memory usage of about 10%. In particular, the memory used by
3310 the scope stack to record each active lexical variable has been halved.
3312 =head3 Memory allocation for pointer tables
3314 Memory allocation for pointer tables has been changed. Previously
3315 C<Perl_ptr_table_store> allocated memory from the same arena system as
3316 C<SV> bodies and C<HE>s, with freed memory remaining bound to those arenas
3317 until interpreter exit. Now it allocates memory from arenas private to the
3318 specific pointer table, and that memory is returned to the system when
3319 C<Perl_ptr_table_free> is called. Additionally, allocation and release are
3320 both less CPU intensive.
3324 The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a
3325 noop but should still be used to ensure past and future compatibility.
3327 =head3 String comparison routines renamed
3329 The C<ibcmp_*> functions have been renamed and are now called C<foldEQ>,
3330 C<foldEQ_locale>, and C<foldEQ_utf8>. The old names are still available as
3333 =head3 C<chop> and C<chomp> implementations merged
3335 The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp>
3336 have been merged. The implementation functions Perl_do_chop() and
3337 Perl_do_chomp(), never part of the public API, have been merged and
3338 moved to a static function in F<pp.c>. This shrinks the Perl binary
3339 slightly, and should not affect any code outside the core (unless it is
3340 relying on the order of side-effects when C<chomp> is passed a I<list> of
3343 =head1 Selected Bug Fixes
3351 Perl no longer produces this warning:
3353 $ perl -we 'open(my $f, ">", \my $x); binmode($f, "scalar")'
3354 Use of uninitialized value in binmode at -e line 1.
3358 Opening a glob reference via C<< open($fh, ">", \*glob) >> no longer
3359 causes the glob to be corrupted when the filehandle is printed to. This would
3360 cause Perl to crash whenever the glob's contents were accessed
3365 PerlIO no longer crashes when called recursively, such as from a signal
3366 handler. Now it just leaks memory [perl #75556].
3370 Most I/O functions were not warning for unopened handles unless the
3371 "closed" and "unopened" warnings categories were both enabled. Now only
3372 C<use warnings 'unopened'> is necessary to trigger these warnings, as
3373 had always been the intention.
3377 There have been several fixes to PerlIO layers:
3379 When C<binmode(FH, ":crlf")> pushes the C<:crlf> layer on top of the stack,
3380 it no longer enables crlf layers lower in the stack so as to avoid
3381 unexpected results [perl #38456].
3383 Opening a file in C<:raw> mode now does what it advertises to do (first
3384 open the file, then C<binmode> it), instead of simply leaving off the top
3385 layer [perl #80764].
3387 The three layers C<:pop>, C<:utf8>, and C<:bytes> didn't allow stacking when
3388 opening a file. For example
3391 open(FH, ">:pop:perlio", "some.file") or die $!;
3393 would throw an "Invalid argument" error. This has been fixed in this
3394 release [perl #82484].
3398 =head2 Regular Expression Bug Fixes
3404 The regular expression engine no longer loops when matching
3405 C<"\N{LATIN SMALL LIGATURE FF}" =~ /f+/i> and similar expressions
3406 [perl #72998] (5.12.1).
3410 The trie runtime code should no longer allocate massive amounts of memory,
3415 Syntax errors in C<< (?{...}) >> blocks no longer cause panic messages
3420 A pattern like C<(?:(o){2})?> no longer causes a "panic" error
3425 A fatal error in regular expressions containing C<(.*?)> when processing
3426 UTF-8 data has been fixed [perl #75680] (5.12.2).
3430 An erroneous regular expression engine optimisation that caused regex verbs like
3431 C<*COMMIT> sometimes to be ignored has been removed.
3435 The regular expression bracketed character class C<[\8\9]> was effectively the
3436 same as C<[89\000]>, incorrectly matching a NULL character. It also gave
3437 incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the
3438 same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are
3439 unrecognized escape sequences, passed-through.
3443 A regular expression match in the right-hand side of a global substitution
3444 (C<s///g>) that is in the same scope will no longer cause match variables
3445 to have the wrong values on subsequent iterations. This can happen when an
3446 array or hash subscript is interpolated in the right-hand side, as in
3447 C<s|(.)|@a{ print($1), /./ }|g> [perl #19078].
3451 Several cases in which characters in the Latin-1 non-ASCII range (0x80 to
3452 0xFF) used not to match themselves, or used to match both a character class
3453 and its complement, have been fixed. For instance, U+00E2 could match both
3454 C<\w> and C<\W> [perl #78464] [perl #18281] [perl #60156].
3458 Matching a Unicode character against an alternation containing characters
3459 that happened to match continuation bytes in the former's UTF8
3460 representation (like C<qq{\x{30ab}} =~ /\xab|\xa9/>) would cause erroneous
3461 warnings [perl #70998].
3465 The trie optimisation was not taking empty groups into account, preventing
3466 "foo" from matching C</\A(?:(?:)foo|bar|zot)\z/> [perl #78356].
3470 A pattern containing a C<+> inside a lookahead would sometimes cause an
3471 incorrect match failure in a global match (for example, C</(?=(\S+))/g>)
3476 A regular expression optimisation would sometimes cause a match with a
3477 C<{n,m}> quantifier to fail when it should have matched [perl #79152].
3481 Case-insensitive matching in regular expressions compiled under
3482 C<use locale> now works much more sanely when the pattern or target
3483 string is internally encoded in UTF8. Previously, under these
3484 conditions the localeness was completely lost. Now, code points
3485 above 255 are treated as Unicode, but code points between 0 and 255
3486 are treated using the current locale rules, regardless of whether
3487 the pattern or the string is encoded in UTF8. The few case-insensitive
3488 matches that cross the 255/256 boundary are not allowed. For
3489 example, 0xFF does not caselessly match the character at 0x178,
3490 LATIN CAPITAL LETTER Y WITH DIAERESIS, because 0xFF may not be LATIN
3491 SMALL LETTER Y in the current locale, and Perl has no way of knowing
3492 if that character even exists in the locale, much less what code
3497 The C<(?|...)> regular expression construct no longer crashes if the final
3498 branch has more sets of capturing parentheses than any other branch. This
3499 was fixed in Perl 5.10.1 for the case of a single branch, but that fix did
3500 not take multiple branches into account [perl #84746].
3504 A bug has been fixed in the implementation of C<{...}> quantifiers in
3505 regular expressions that prevented the code block in
3506 C</((\w+)(?{ print $2 })){2}/> from seeing the C<$2> sometimes
3511 =head2 Syntax/Parsing Bugs
3517 C<when (scalar) {...}> no longer crashes, but produces a syntax error
3518 [perl #74114] (5.12.1).
3522 A label right before a string eval (C<foo: eval $string>) no longer causes
3523 the label to be associated also with the first statement inside the eval
3524 [perl #74290] (5.12.1).
3528 The C<no 5.13.2> form of C<no> no longer tries to turn on features or
3529 pragmata (like L<strict>) [perl #70075] (5.12.2).
3533 C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving
3534 identically to C<use 5.12.0>. Previously, C<require> in a C<BEGIN> block
3535 was erroneously executing the C<use feature ':5.12.0'> and
3536 C<use strict> behaviour, which only C<use> was documented to
3537 provide [perl #69050].
3541 A regression introduced in Perl 5.12.0, making
3542 C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been
3543 fixed. C<$x> will now be C<undef> [perl #85508] (5.12.2).
3547 When strict "refs" mode is off, C<%{...}> in rvalue context returns
3548 C<undef> if its argument is undefined. An optimisation introduced in Perl
3549 5.12.0 to make C<keys %{...}> faster when used as a boolean did not take
3550 this into account, causing C<keys %{+undef}> (and C<keys %$foo> when
3551 C<$foo> is undefined) to be an error, which it should be so in strict
3552 mode only [perl #81750].
3556 Constant-folding used to cause
3558 $text =~ ( 1 ? /phoo/ : /bear/)
3564 at compile time. Now it correctly matches against C<$_> [perl #20444].
3568 Parsing Perl code (either with string C<eval> or by loading modules) from
3569 within a C<UNITCHECK> block no longer causes the interpreter to crash
3574 String C<eval>s no longer fail after 2 billion scopes have been
3575 compiled [perl #83364].
3579 The parser no longer hangs when encountering certain Unicode characters,
3580 such as U+387 [perl #74022].
3584 Defining a constant with the same name as one of Perl's special blocks
3585 (like C<INIT>) stopped working in 5.12.0, but has now been fixed
3590 A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used
3591 to be stringified, even if the hash was tied [perl #79178].
3595 A closure containing an C<if> statement followed by a constant or variable
3596 is no longer treated as a constant [perl #63540].
3600 C<state> can now be used with attributes. It
3601 used to mean the same thing as
3602 C<my> if any attributes were present [perl #68658].
3606 Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in
3607 the "Use of uninitialized value in numeric gt" warning when C<$a> is
3608 undefined (since it is not part of the C<< > >> expression, but the operand
3609 of the C<@>) [perl #72090].
3613 Accessing an element of a package array with a hard-coded number (as
3614 opposed to an arbitrary expression) would crash if the array did not exist.
3615 Usually the array would be autovivified during compilation, but typeglob
3616 manipulation could remove it, as in these two cases which used to crash:
3618 *d = *a; print $d[0];
3619 undef *d; print $d[0];
3623 The B<-C> command-line option, when used on the shebang line, can now be
3624 followed by other options [perl #72434].
3628 The C<B> module was returning C<B::OP>s instead of C<B::LOGOP>s for
3629 C<entertry> [perl #80622]. This was due to a bug in the Perl core,
3634 =head2 Stashes, Globs and Method Lookup
3636 Perl 5.10.0 introduced a new internal mechanism for caching MROs (method
3637 resolution orders, or lists of parent classes; aka "isa" caches) to make
3638 method lookup faster (so C<@ISA> arrays would not have to be searched
3639 repeatedly). Unfortunately, this brought with it quite a few bugs. Almost
3640 all of these have been fixed now, along with a few MRO-related bugs that
3641 existed before 5.10.0:
3647 The following used to have erratic effects on method resolution, because
3648 the "isa" caches were not reset or otherwise ended up listing the wrong
3649 classes. These have been fixed.
3653 =item Aliasing packages by assigning to globs [perl #77358]
3655 =item Deleting packages by deleting their containing stash elements
3657 =item Undefining the glob containing a package (C<undef *Foo::>)
3659 =item Undefining an ISA glob (C<undef *Foo::ISA>)
3661 =item Deleting an ISA stash element (C<delete $Foo::{ISA}>)
3663 =item Sharing @ISA arrays between classes (via C<*Foo::ISA = \@Bar::ISA> or
3664 C<*Foo::ISA = *Bar::ISA>) [perl #77238]
3668 C<undef *Foo::ISA> would even stop a new C<@Foo::ISA> array from updating
3673 Typeglob assignments would crash if the glob's stash no longer existed, so
3674 long as the glob assigned to were named C<ISA> or the glob on either side of
3675 the assignment contained a subroutine.
3679 C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now
3680 updated properly when packages are deleted or removed from the C<@ISA> of
3681 other classes. This allows many packages to be created and deleted without
3682 causing a memory leak [perl #75176].
3686 In addition, various other bugs related to typeglobs and stashes have been
3693 Some work has been done on the internal pointers that link between symbol
3694 tables (stashes), typeglobs, and subroutines. This has the effect that
3695 various edge cases related to deleting stashes or stash entries (for example,
3696 <%FOO:: = ()>), and complex typeglob or code-reference aliasing, will no
3697 longer crash the interpreter.
3701 Assigning a reference to a glob copy now assigns to a glob slot instead of
3702 overwriting the glob with a scalar [perl #1804] [perl #77508].
3706 A bug when replacing the glob of a loop variable within the loop has been fixed
3708 means the following code will no longer crash:
3716 Assigning a glob to a PVLV used to convert it to a plain string. Now it
3717 works correctly, and a PVLV can hold a glob. This would happen when a
3718 nonexistent hash or array element was passed to a subroutine:
3720 sub { $_[0] = *foo }->($hash{key});
3721 # $_[0] would have been the string "*main::foo"
3723 It also happened when a glob was assigned to, or returned from, an element
3724 of a tied array or hash [perl #36051].
3728 When trying to report C<Use of uninitialized value $Foo::BAR>, crashes could
3729 occur if the glob holding the global variable in question had been detached
3730 from its original stash by, for example, C<delete $::{"Foo::"}>. This has
3731 been fixed by disabling the reporting of variable names in those
3736 During the restoration of a localised typeglob on scope exit, any
3737 destructors called as a result would be able to see the typeglob in an
3738 inconsistent state, containing freed entries, which could result in a
3739 crash. This would affect code like this:
3742 eval { die bless [] }; # puts an object in $@
3747 Now the glob entries are cleared before any destructors are called. This
3748 also means that destructors can vivify entries in the glob. So Perl tries
3749 again and, if the entries are re-created too many times, dies with a
3750 "panic: gp_free ..." error message.
3754 If a typeglob is freed while a subroutine attached to it is still
3755 referenced elsewhere, the subroutine is renamed to C<__ANON__> in the same
3756 package, unless the package has been undefined, in which case the C<__ANON__>
3757 package is used. This could cause packages to be sometimes autovivified,
3758 such as if the package had been deleted. Now this no longer occurs.
3759 The C<__ANON__> package is also now used when the original package is
3760 no longer attached to the symbol table. This avoids memory leaks in some
3761 cases [perl #87664].
3765 Subroutines and package variables inside a package whose name ends with
3766 C<::> can now be accessed with a fully qualified name.
3776 What has become known as "the Unicode Bug" is almost completely resolved in
3777 this release. Under C<use feature 'unicode_strings'> (which is
3778 automatically selected by C<use 5.012> and above), the internal
3779 storage format of a string no longer affects the external semantics.
3782 There are two known exceptions:
3788 The now-deprecated, user-defined case-changing
3789 functions require utf8-encoded strings to operate. The CPAN module
3790 L<Unicode::Casing> has been written to replace this feature without its
3791 drawbacks, and the feature is scheduled to be removed in 5.16.
3795 quotemeta() (and its in-line equivalent C<\Q>) can also give different
3796 results depending on whether a string is encoded in UTF-8. See
3797 L<perlunicode/The "Unicode Bug">.
3803 Handling of Unicode non-character code points has changed.
3804 Previously they were mostly considered illegal, except that in some
3805 place only one of the 66 of them was known. The Unicode Standard
3806 considers them all legal, but forbids their "open interchange".
3807 This is part of the change to allow internal use of any code
3808 point (see L</Core Enhancements>). Together, these changes resolve
3809 [perl #38722], [perl #51918], [perl #51936], and [perl #63446].
3813 Case-insensitive C<"/i"> regular expression matching of Unicode
3814 characters that match multiple characters now works much more as
3815 intended. For example
3817 "\N{LATIN SMALL LIGATURE FFI}" =~ /ffi/ui
3821 "ffi" =~ /\N{LATIN SMALL LIGATURE FFI}/ui
3823 are both true. Previously, there were many bugs with this feature.
3824 What hasn't been fixed are the places where the pattern contains the
3825 multiple characters, but the characters are split up by other things,
3828 "\N{LATIN SMALL LIGATURE FFI}" =~ /(f)(f)i/ui
3832 "\N{LATIN SMALL LIGATURE FFI}" =~ /ffi*/ui
3836 "\N{LATIN SMALL LIGATURE FFI}" =~ /[a-f][f-m][g-z]/ui
3838 None of these match.
3840 Also, this matching doesn't fully conform to the current Unicode
3841 Standard, which asks that the matching be made upon the NFD
3842 (Normalization Form Decomposed) of the text. However, as of this
3843 writing (April 2010), the Unicode Standard is currently in flux about
3844 what they will recommend doing with regard in such scenarios. It may be
3845 that they will throw out the whole concept of multi-character matches.
3850 Naming a deprecated character in C<\N{I<NAME>}> no longer leaks memory.
3854 We fixed a bug that could cause C<\N{I<NAME>}> constructs followed by
3855 a single C<"."> to be parsed incorrectly [perl #74978] (5.12.1).
3859 C<chop> now correctly handles characters above C<"\x{7fffffff}">
3864 Passing to C<index> an offset beyond the end of the string when the string
3865 is encoded internally in UTF8 no longer causes panics [perl #75898].
3869 warn() and die() now respect utf8-encoded scalars [perl #45549].
3873 Sometimes the UTF8 length cache would not be reset on a value
3874 returned by substr, causing C<length(substr($uni_string, ...))> to give
3875 wrong answers. With C<${^UTF8CACHE}> set to -1, it would also produce
3876 a "panic" error message [perl #77692].
3880 =head2 Ties, Overloading and Other Magic
3886 Overloading now works properly in conjunction with tied
3887 variables. What formerly happened was that most ops checked their
3888 arguments for overloading I<before> checking for magic, so for example
3889 an overloaded object returned by a tied array access would usually be
3890 treated as not overloaded [RT #57012].
3894 Various instances of magic (like tie methods) being called on tied variables
3895 too many or too few times have been fixed:
3901 C<< $tied->() >> did not always call FETCH [perl #8438].
3905 Filetest operators and C<y///> and C<tr///> were calling FETCH too
3910 The C<=> operator used to ignore magic on its right-hand side if the
3911 scalar happened to hold a typeglob (if a typeglob was the last thing
3912 returned from or assigned to a tied scalar) [perl #77498].
3916 Dereference operators used to ignore magic if the argument was a
3917 reference already (such as from a previous FETCH) [perl #72144].
3921 C<splice> now calls C<set-magic> (so changes made
3922 by C<splice @ISA> are respected by method calls) [perl #78400].
3926 In-memory files created by C<< open($fh, ">", \$buffer) >> were not calling
3927 FETCH/STORE at all [perl #43789] (5.12.2).
3931 utf8::is_utf8() now respects C<get-magic> (like C<$1>) (5.12.1).
3937 Non-commutative binary operators used to swap their operands if the same
3938 tied scalar was used for both operands and returned a different value for
3939 each FETCH. For instance, if C<$t> returned 2 the first time and 3 the
3940 second, then C<$t/$t> would evaluate to 1.5. This has been fixed
3945 String C<eval> now detects taintedness of overloaded or tied
3946 arguments [perl #75716].
3950 String C<eval> and regular expression matches against objects with string
3951 overloading no longer cause memory corruption or crashes [perl #77084].
3955 L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
3960 C<< <expr> >> always respects overloading now if the expression is
3963 Because "S<< <> as >> glob" was parsed differently from
3964 "S<< <> as >> filehandle" from 5.6 onwards, something like C<< <$foo[0]> >> did
3965 not handle overloading, even if C<$foo[0]> was an overloaded object. This
3966 was contrary to the documentation for L<overload>, and meant that C<< <> >>
3967 could not be used as a general overloaded iterator operator.
3971 The fallback behaviour of overloading on binary operators was asymmetric
3976 Magic applied to variables in the main package no longer affects other packages.
3977 See L</Magic variables outside the main package> above [perl #76138].
3981 Sometimes magic (ties, taintedness, etc.) attached to variables could cause
3982 an object to last longer than it should, or cause a crash if a tied
3983 variable were freed from within a tie method. These have been fixed
3988 DESTROY methods of objects implementing ties are no longer able to crash by
3989 accessing the tied variable through a weak reference [perl #86328].
3993 Fixed a regression of kill() when a match variable is used for the
3994 process ID to kill [perl #75812].
3998 C<$AUTOLOAD> used to remain tainted forever if it ever became tainted. Now
3999 it is correctly untainted if an autoloaded method is called and the method
4000 name was not tainted.
4004 C<sprintf> now dies when passed a tainted scalar for the format. It did
4005 already die for arbitrary expressions, but not for simple scalars
4010 C<lc>, C<uc>, C<lcfirst>, and C<ucfirst> no longer return untainted strings
4011 when the argument is tainted. This has been broken since perl 5.8.9
4022 The Perl debugger now also works in taint mode [perl #76872].
4026 Subroutine redefinition works once more in the debugger [perl #48332].
4030 When B<-d> is used on the shebang (C<#!>) line, the debugger now has access
4031 to the lines of the main program. In the past, this sometimes worked and
4032 sometimes did not, depending on the order in which things happened to be
4033 arranged in memory [perl #71806].
4037 A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
4038 C<@DB::args> has been fixed (5.12.2).
4042 Perl no longer stomps on C<$DB::single>, C<$DB::trace>, and C<$DB::signal>
4043 if these variables already have values when C<$^P> is assigned to [perl #72422].
4047 C<#line> directives in string evals were not properly updating the arrays
4048 of lines of code (C<< @{"_< ..."} >>) that the debugger (or any debugging or
4049 profiling module) uses. In threaded builds, they were not being updated at
4050 all. In non-threaded builds, the line number was ignored, so any change to
4051 the existing line number would cause the lines to be misnumbered
4062 Perl no longer accidentally clones lexicals in scope within active stack
4063 frames in the parent when creating a child thread [perl #73086].
4067 Several memory leaks in cloning and freeing threaded Perl interpreters have been
4068 fixed [perl #77352].
4072 Creating a new thread when directory handles were open used to cause a
4073 crash, because the handles were not cloned, but simply passed to the new
4074 thread, resulting in a double free.
4076 Now directory handles are cloned properly on Windows
4077 and on systems that have a C<fchdir> function. On other
4078 systems, new threads simply do not inherit directory
4079 handles from their parent threads [perl #75154].
4083 The typeglob C<*,>, which holds the scalar variable C<$,> (output field
4084 separator), had the wrong reference count in child threads.
4088 [perl #78494] When pipes are shared between threads, the C<close> function
4089 (and any implicit close, such as on thread exit) no longer blocks.
4093 Perl now does a timely cleanup of SVs that are cloned into a new
4094 thread but then discovered to be orphaned (that is, their owners
4095 are I<not> cloned). This eliminates several "scalars leaked"
4096 warnings when joining threads.
4100 =head2 Scoping and Subroutines
4106 Lvalue subroutines are again able to return copy-on-write scalars. This
4107 had been broken since version 5.10.0 [perl #75656] (5.12.3).
4111 C<require> no longer causes C<caller> to return the wrong file name for
4112 the scope that called C<require> and other scopes higher up that had the
4113 same file name [perl #68712].
4117 C<sort> with a C<($$)>-prototyped comparison routine used to cause the value
4118 of C<@_> to leak out of the sort. Taking a reference to C<@_> within the
4119 sorting routine could cause a crash [perl #72334].
4123 Match variables (like C<$1>) no longer persist between calls to a sort
4124 subroutine [perl #76026].
4128 Iterating with C<foreach> over an array returned by an lvalue sub now works
4133 C<$@> is now localised during calls to C<binmode> to prevent action at a
4134 distance [perl #78844].
4138 Calling a closure prototype (what is passed to an attribute handler for a
4139 closure) now results in a "Closure prototype called" error message instead
4140 of a crash [perl #68560].
4144 Mentioning a read-only lexical variable from the enclosing scope in a
4145 string C<eval> no longer causes the variable to become writable
4156 Within signal handlers, C<$!> is now implicitly localized.
4160 CHLD signals are no longer unblocked after a signal handler is called if
4161 they were blocked before by C<POSIX::sigprocmask> [perl #82040].
4165 A signal handler called within a signal handler could cause leaks or
4166 double-frees. Now fixed [perl #76248].
4170 =head2 Miscellaneous Memory Leaks
4176 Several memory leaks when loading XS modules were fixed (5.12.2).
4180 L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
4181 L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">,
4182 and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination
4183 with lvalues, result in leaking the scalar value they operate on, and cause its
4184 destruction to happen too late. This has now been fixed.
4188 The postincrement and postdecrement operators, C<++> and C<-->, used to cause
4189 leaks when used on references. This has now been fixed.
4193 Nested C<map> and C<grep> blocks no longer leak memory when processing
4194 large lists [perl #48004].
4198 C<use I<VERSION>> and C<no I<VERSION>> no longer leak memory [perl #78436]
4203 C<.=> followed by C<< <> >> or C<readline> would leak memory if C<$/>
4204 contained characters beyond the octet range and the scalar assigned to
4205 happened to be encoded as UTF8 internally [perl #72246].
4209 C<eval 'BEGIN{die}'> no longer leaks memory on non-threaded builds.
4213 =head2 Memory Corruption and Crashes
4219 glob() no longer crashes when C<%File::Glob::> is empty and
4220 C<CORE::GLOBAL::glob> isn't present [perl #75464] (5.12.2).
4224 readline() has been fixed when interrupted by signals so it no longer
4225 returns the "same thing" as before or random memory.
4229 When assigning a list with duplicated keys to a hash, the assignment used to
4230 return garbage and/or freed values:
4232 @a = %h = (list with some duplicate keys);
4234 This has now been fixed [perl #31865].
4238 The mechanism for freeing objects in globs used to leave dangling
4239 pointers to freed SVs, meaning Perl users could see corrupted state
4242 Perl now frees only the affected slots of the GV, rather than freeing
4243 the GV itself. This makes sure that there are no dangling refs or
4244 corrupted state during destruction.
4248 The interpreter no longer crashes when freeing deeply-nested arrays of
4249 arrays. Hashes have not been fixed yet [perl #44225].
4253 Concatenating long strings under C<use encoding> no longer causes Perl to
4254 crash [perl #78674].
4258 Calling C<< ->import >> on a class lacking an import method could corrupt
4259 the stack, resulting in strange behaviour. For instance,
4261 push @a, "foo", $b = bar->import;
4263 would assign "foo" to C<$b> [perl #63790].
4267 The C<recv> function could crash when called with the MSG_TRUNC flag
4272 C<formline> no longer crashes when passed a tainted format picture. It also
4273 taints C<$^A> now if its arguments are tainted [perl #79138].
4277 A bug in how we process filetest operations could cause a segfault.
4278 Filetests don't always expect an op on the stack, so we now use
4279 TOPs only if we're sure that we're not C<stat>ing the C<_> filehandle.
4280 This is indicated by C<OPf_KIDS> (as checked in ck_ftst) [perl #74542]
4285 unpack() now handles scalar context correctly for C<%32H> and C<%32u>,
4286 fixing a potential crash. split() would crash because the third item
4287 on the stack wasn't the regular expression it expected. C<unpack("%2H",
4288 ...)> would return both the unpacked result and the checksum on the stack,
4289 as would C<unpack("%2u", ...)> [perl #73814] (5.12.2).
4293 =head2 Fixes to Various Perl Operators
4299 The C<&>, C<|>, and C<^> bitwise operators no longer coerce read-only arguments
4304 Stringifying a scalar containing "-0.0" no longer has the effect of turning
4305 false into true [perl #45133].
4309 Some numeric operators were converting integers to floating point,
4310 resulting in loss of precision on 64-bit platforms [perl #77456].
4314 sprintf() was ignoring locales when called with constant arguments
4319 Combining the vector (C<%v>) flag and dynamic precision would
4320 cause C<sprintf> to confuse the order of its arguments, making it
4321 treat the string as the precision and vice-versa [perl #83194].
4325 =head2 Bugs Relating to the C API
4331 The C-level C<lex_stuff_pvn> function would sometimes cause a spurious
4332 syntax error on the last line of the file if it lacked a final semicolon
4333 [perl #74006] (5.12.1).
4337 The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when
4338 there is a syntax error and no C<G_KEEPERR> flag, and never set it if the
4339 C<G_KEEPERR> flag is present [perl #3719].
4343 The XS multicall API no longer causes subroutines to lose reference counts
4344 if called via the multicall interface from within those very subroutines.
4345 This affects modules like L<List::Util>. Calling one of its functions with an
4346 active subroutine as the first argument could cause a crash [perl #78070].
4350 The C<SvPVbyte> function available to XS modules now calls magic before
4351 downgrading the SV, to avoid warnings about wide characters [perl #72398].
4355 The ref types in the typemap for XS bindings now support magical variables
4360 C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the
4361 source string) if the flags passed to it do not include SV_GMAGIC. So it
4362 now matches the documentation.
4366 C<my_strftime> no longer leaks memory. This fixes a memory leak in
4367 C<POSIX::strftime> [perl #73520].
4371 F<XSUB.h> now correctly redefines fgets under PERL_IMPLICIT_SYS [perl #55049]
4376 XS code using fputc() or fputs() on Windows could cause an error
4377 due to their arguments being swapped [perl #72704] (5.12.1).
4381 A possible segfault in the C<T_PRTOBJ> default typemap has been fixed
4386 A bug that could cause "Unknown error" messages when
4387 C<call_sv(code, G_EVAL)> is called from an XS destructor has been fixed
4392 =head1 Known Problems
4394 This is a list of significant unresolved issues which are regressions
4395 from earlier versions of Perl or which affect widely-used CPAN modules.
4401 C<List::Util::first> misbehaves in the presence of a lexical C<$_>
4402 (typically introduced by C<my $_> or implicitly by C<given>). The variable
4403 that gets set for each iteration is the package variable C<$_>, not the
4406 A similar issue may occur in other modules that provide functions which
4407 take a block as their first argument, like
4409 foo { ... $_ ...} list
4411 See also: L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=67694>
4415 readline() returns an empty string instead of undef when it is
4416 interrupted by a signal.
4420 L<version> now prevents object methods from being called as class methods
4425 The changes in prototype handling break L<Switch>. A patch has been sent
4426 upstream and will hopefully appear on CPAN soon.
4430 The upgrade to F<ExtUtils-MakeMaker-6.57_05> has caused
4431 some tests in the F<Module-Install> distribution on CPAN to
4432 fail. (Specifically, F<02_mymeta.t> tests 5 and 21l; F<18_all_from.t>
4433 tests 6 and 15; F<19_authors.t> tests 5, 13, 21, and 29; and
4434 F<20_authors_with_special_characters.t> tests 6, 15, and 23 in version
4435 1.00 of that distribution now fail.)
4441 =head2 keys(), values(), and each() work on arrays
4443 You can now use the keys(), values(), and each() builtins on arrays;
4444 previously you could use them only on hashes. See L<perlfunc> for details.
4445 This is actually a change introduced in perl 5.12.0, but it was missed from
4446 that release's L<perl5120delta>.
4448 =head2 split() and C<@_>
4450 split() no longer modifies C<@_> when called in scalar or void context.
4451 In void context it now produces a "Useless use of split" warning.
4452 This was also a perl 5.12.0 changed that missed the perldelta.
4456 Randy Kobes, creator of http://kobesearch.cpan.org/ and
4457 contributor/maintainer to several core Perl toolchain modules, passed
4458 away on September 18, 2010 after a battle with lung cancer. The community
4459 was richer for his involvement. He will be missed.
4461 =head1 Acknowledgements
4464 Perl 5.14.0 represents one year of development since
4465 Perl 5.12.0 and contains nearly 550,000 lines of changes across nearly
4466 3,000 files from 150 authors and committers.
4468 Perl continues to flourish into its third decade thanks to a vibrant
4469 community of users and developers. The following people are known to
4470 have contributed the improvements that became Perl 5.14.0:
4472 Aaron Crane, Abhijit Menon-Sen, Abigail, Ævar Arnfjörð Bjarmason,
4473 Alastair Douglas, Alexander Alekseev, Alexander Hartmaier, Alexandr
4474 Ciornii, Alex Davies, Alex Vandiver, Ali Polatel, Allen Smith, Andreas
4475 König, Andrew Rodland, Andy Armstrong, Andy Dougherty, Aristotle
4476 Pagaltzis, Arkturuz, Arvan, A. Sinan Unur, Ben Morrow, Bo Lindbergh,
4477 Boris Ratner, Brad Gilbert, Bram, brian d foy, Brian Phillips, Casey
4478 West, Charles Bailey, Chas. Owens, Chip Salzenberg, Chris 'BinGOs'
4479 Williams, chromatic, Craig A. Berry, Curtis Jewell, Dagfinn Ilmari
4480 Mannsåker, Dan Dascalescu, Dave Rolsky, David Caldwell, David Cantrell,
4481 David Golden, David Leadbeater, David Mitchell, David Wheeler, Eric
4482 Brine, Father Chrysostomos, Fingle Nark, Florian Ragwitz, Frank Wiegand,
4483 Franz Fasching, Gene Sullivan, George Greer, Gerard Goossen, Gisle Aas,
4484 Goro Fuji, Grant McLean, gregor herrmann, H.Merijn Brand, Hongwen Qiu,
4485 Hugo van der Sanden, Ian Goodacre, James E Keenan, James Mastros, Jan
4486 Dubois, Jay Hannah, Jerry D. Hedden, Jesse Vincent, Jim Cromie, Jirka
4487 Hruška, John Peacock, Joshua ben Jore, Joshua Pritikin, Karl Williamson,
4488 Kevin Ryde, kmx, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯, Larwan Berke, Leon Brocard, Leon
4489 Timmermans, Lubomir Rintel, Lukas Mai, Maik Hentsche, Marty Pauley,
4490 Marvin Humphrey, Matt Johnson, Matt S Trout, Max Maischein, Michael
4491 Breen, Michael Fig, Michael G Schwern, Michael Parker, Michael Stevens,
4492 Michael Witten, Mike Kelly, Moritz Lenz, Nicholas Clark, Nick Cleaton,
4493 Nick Johnston, Nicolas Kaiser, Niko Tyni, Noirin Shirley, Nuno Carvalho,
4494 Paul Evans, Paul Green, Paul Johnson, Paul Marquess, Peter J. Holzer,
4495 Peter John Acklam, Peter Martini, Philippe Bruhat (BooK), Piotr Fusik,
4496 Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Renee Baecker, Ricardo
4497 Signes, Richard Möhn, Richard Soderberg, Rob Hoelz, Robin Barker, Ruslan
4498 Zakirov, Salvador Fandiño, Salvador Ortiz Garcia, Shlomi Fish, Sinan
4499 Unur, Sisyphus, Slaven Rezic, Steffen Müller, Steve Hay, Steven
4500 Schubiger, Steve Peters, Sullivan Beck, Tatsuhiko Miyagawa, Tim Bunce,
4501 Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Tye McQueen,
4502 Vadim Konovalov, Vernon Lyon, Vincent Pit, Walt Mankowski, Wolfram
4503 Humann, Yves Orton, Zefram, and Zsbán Ambrus.
4505 This is woefully incomplete as it's automatically generated from version
4506 control history. In particular, it doesn't include the names of the
4507 (very much appreciated) contributors who reported issues in previous
4508 versions of Perl that helped make Perl 5.14.0 better. For a more complete
4509 list of all of Perl's historical contributors, please see the C<AUTHORS>
4510 file in the Perl 5.14.0 distribution.
4512 Many of the changes included in this version originated in the CPAN
4513 modules included in Perl's core. We're grateful to the entire CPAN
4514 community for helping Perl to flourish.
4517 =head1 Reporting Bugs
4519 If you find what you think is a bug, you might check the articles
4520 recently posted to the comp.lang.perl.misc newsgroup and the Perl
4521 bug database at http://rt.perl.org/perlbug/ . There may also be
4522 information at http://www.perl.org/ , the Perl Home Page.
4524 If you believe you have an unreported bug, please run the L<perlbug>
4525 program included with your release. Be sure to trim your bug down
4526 to a tiny but sufficient test case. Your bug report, along with the
4527 output of C<perl -V>, will be sent off to perlbug@perl.org to be
4528 analysed by the Perl porting team.
4530 If the bug you are reporting has security implications, which make it
4531 inappropriate to send to a publicly archived mailing list, then please send
4532 it to perl5-security-report@perl.org. This points to a closed subscription
4533 unarchived mailing list, which includes all the core committers, who be able
4534 to help assess the impact of issues, figure out a resolution, and help
4535 co-ordinate the release of patches to mitigate or fix the problem across all
4536 platforms on which Perl is supported. Please use this address for
4537 security issues in the Perl core I<only>, not for modules independently
4538 distributed on CPAN.
4542 The F<Changes> file for an explanation of how to view exhaustive details
4545 The F<INSTALL> file for how to build Perl.
4547 The F<README> file for general stuff.
4549 The F<Artistic> and F<Copying> files for copyright information.