=encoding utf8 =head1 NAME perldelta - what is new for perl v5.14.0 =head1 DESCRIPTION This document describes differences between the 5.12.0 release and the 5.14.0 release. If you are upgrading from an earlier release such as 5.10.0, first read L, which describes differences between 5.10.0 and 5.12.0. Some of the bug fixes in this release have been backported to subsequent releases of 5.12.x. Those are indicated with the 5.12.x version in parentheses. =head1 Notice XXX Any important notices here =head1 Core Enhancements =head2 Unicode =head3 Unicode Version 6.0 is now supported (mostly) Perl comes with the Unicode 6.0 data base updated with L, with one exception noted below. See L for details on the new release. Perl does not support any Unicode provisional properties, including the new ones for this release. Unicode 6.0 has chosen to use the name C for the character at U+1F514, which is a symbol that looks like a bell, and is used in Japanese cell phones. This conflicts with the long-standing Perl usage of having C mean the ASCII C character, U+0007. In Perl 5.14, C<\N{BELL}> will continue to mean U+0007, but its use will generate a deprecated warning message, unless such warnings are turned off. The new name for U+0007 in Perl is C, which corresponds nicely with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> means U+0007, with no warning given. The character at U+1F514 will not have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>, C<\N{BEL}>, or C<"\a"> instead. =head3 Full functionality for C This release provides full functionality for C. Under its scope, all string operations executed and regular expressions compiled (even if executed outside its scope) have Unicode semantics. See L. This feature avoids most forms of the "Unicode Bug" (See L for details.) If there is a possibility that your code will process Unicode strings, you are B encouraged to use this subpragma to avoid nasty surprises. =head3 C<\N{I}> and C enhancements =over =item * C<\N{}> and C now know about the abbreviated character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., all the customary abbreviations for the C0 and C1 control characters (such as ACK, BEL, CAN, etc.), and a few new variants of some C1 full names that are in common usage. =item * Unicode has a number of named character sequences, in which particular sequences of code points are given names. C<\N{...}> now recognizes these. =item * C<\N{}>, C, C now know about every character in Unicode. Previously, they didn't know about the Hangul syllables nor a number of CJK (Chinese/Japanese/Korean) characters. =item * In the past, it was ineffective to override one of Perl's abbreviations with your own custom alias. Now it works. =item * You can also create a custom alias of the ordinal of a character, known by C<\N{...}>, C, and C. Previously, an alias had to be to an official Unicode character name. This made it impossible to create an alias for a code point that had no name, such as those reserved for private use. =item * A new function, C, has been added. This function is a run-time version of C<\N{...}>, returning the string of characters whose Unicode name is its parameter. It can handle Unicode named character sequences, whereas the pre-existing C cannot, as the latter returns a single code point. =back See L for details on all these changes. =head3 New warnings categories for problematic (non-)Unicode code points. Three new warnings subcategories of "utf8" have been added. These allow you to turn off some "utf8" warnings, while allowing others warnings to remain on. The three categories are: C when UTF-16 surrogates are encountered; C when Unicode non-character code points are encountered; and C when code points that are above the legal Unicode maximum of 0x10FFFF are encountered. =head3 Any unsigned value can be encoded as a character With this release, Perl is adopting a model that any unsigned value can be treated as a code point and encoded internally (as utf8) without warnings - not just the code points that are legal in Unicode. However, unless utf8 or the corresponding sub-category (see previous item) warnings have been explicitly lexically turned off, outputting or performing a Unicode-defined operation (such as upper-casing) on such a code point will generate a warning. Attempting to input these using strict rules (such as with the C<:encoding('UTF-8')> layer) will continue to fail. Prior to this release the handling was very inconsistent, and incorrect in places. Also, the Unicode non-characters, some of which previously were erroneously considered illegal in places by Perl, contrary to the Unicode standard, are now always legal internally. But inputting or outputting them will work the same as for the non-legal Unicode code points, as the Unicode standard says they are illegal for "open interchange". =head3 Unicode database files not installed The Unicode database files are no longer installed with Perl. This doesn't affect any functionality in Perl and saves significant disk space. If you previously were explicitly opening and reading those files, you can download them from L. =head2 Regular Expressions =head3 C<(?^...)> construct to signify default modifiers An ASCII caret (also called a "circumflex accent") C<"^"> immediately following a C<"(?"> in a regular expression now means that the subexpression does not inherit the surrounding modifiers such as C, but reverts to the Perl defaults. Any modifiers following the caret override the defaults. The stringification of regular expressions now uses this notation. E.g., before, C would be stringified as C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>. The main purpose of this is to allow tests that rely on the stringification not to have to change when new modifiers are added. See L. =head3 C, C, C, C, and C modifiers Four new regular expression modifiers have been added. These are mutually exclusive; one only can be turned on at a time. The C modifier says to compile the regular expression as if it were in the scope of C, even if it is not. The C modifier says to compile the regular expression as if it were in the scope of a C pragma. The C (default) modifier is used to override any C and C pragmas that are in effect at the time of compiling the regular expression. The C regular expression modifier restricts C<\s>, C<\d> and C<\w> and the Posix (C<[[:posix:]]>) character classes to the ASCII range. Their complements and C<\b> and C<\B> are correspondingly affected. Otherwise, C behaves like the C modifier, in that case-insensitive matching uses Unicode semantics. The C modifier is like C, except that, in case-insensitive matching, no ASCII character will match a non-ASCII character. For example, 'k' =~ /\N{KELVIN SIGN}/ai will match; it won't under C. See L for more detail. =head3 Non-destructive substitution The substitution (C) and transliteration (C) operators now support an C option that copies the input variable, carries out the substitution on the copy and returns the result. The original remains unmodified. my $old = 'cat'; my $new = $old =~ s/cat/dog/r; # $old is 'cat' and $new is 'dog' This is particularly useful with C. See L for more examples. =head3 Reentrant regular expression engine It is now safe to use regular expressions within C<(?{...})> and C<(??{...})> code blocks inside regular expressions. These block are still experimental, however, and still have problems with lexical (C) variables and abnormal exiting. =head3 C The C pragma now has the ability to turn on regular expression flags till the end of the lexical scope: use re '/x'; "foo" =~ / (.+) /; # /x implied See L for details. =head3 \o{...} for octals There is a new octal escape sequence, C<"\o">, in double-quote-like contexts. This construct allows large octal ordinals beyond the current max of 0777 to be represented. It also allows you to specify a character in octal which can safely be concatenated with other regex snippets and which won't be confused with being a backreference to a regex capture group. See L. =head3 Add C<\p{Titlecase}> as a synonym for C<\p{Title}> This synonym is added for symmetry with the Unicode property names C<\p{Uppercase}> and C<\p{Lowercase}>. =head3 Regular expression debugging output improvement Regular expression debugging output (turned on by C) now uses hexadecimal when escaping non-ASCII characters, instead of octal. =head3 Return value of C Custom regular expression engines can now determine the return value of C on an entry of C<%+> or C<%->. =head2 Syntactical Enhancements =head3 Array and hash container functions accept references All built-in functions that operate directly on array or hash containers now also accept hard references to arrays or hashes: |----------------------------+---------------------------| | Traditional syntax | Terse syntax | |----------------------------+---------------------------| | push @$arrayref, @stuff | push $arrayref, @stuff | | unshift @$arrayref, @stuff | unshift $arrayref, @stuff | | pop @$arrayref | pop $arrayref | | shift @$arrayref | shift $arrayref | | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 | | keys %$hashref | keys $hashref | | keys @$arrayref | keys $arrayref | | values %$hashref | values $hashref | | values @$arrayref | values $arrayref | | ($k,$v) = each %$hashref | ($k,$v) = each $hashref | | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref | |----------------------------+---------------------------| This allows these built-in functions to act on long dereferencing chains or on the return value of subroutines without needing to wrap them in C<@{}> or C<%{}>: push @{$obj->tags}, $new_tag; # old way push $obj->tags, $new_tag; # new way for ( keys %{$hoh->{genres}{artists}} ) {...} # old way for ( keys $hoh->{genres}{artists} ) {...} # new way For C, C and C, the reference will auto-vivify if it is not defined, just as if it were wrapped with C<@{}>. For C, C, C, when overloaded dereferencing is present, the overloaded dereference is used instead of dereferencing the underlying reftype. Warnings are issued about assumptions made in ambiguous cases. =head3 Single term prototype The C<+> prototype is a special alternative to C<$> that will act like C<\[@%]> when given a literal array or hash variable, but will otherwise force scalar context on the argument. See L. =head3 C block syntax A package declaration can now contain a code block, in which case the declaration is in scope only inside that block. So C is precisely equivalent to C<{ package Foo; ... }>. It also works with a version number in the declaration, as in C. See L. =head3 Statement labels can appear in more places Statement labels can now occur before any type of statement or declaration, such as C. =head3 Stacked labels Multiple statement labels can now appear before a single statement. =head3 Uppercase X/B allowed in hexadecimal/binary literals Literals may now use either upper case C<0X...> or C<0B...> prefixes, in addition to the already supported C<0x...> and C<0b...> syntax [perl #76296]. C, Ruby, Python and PHP already supported this syntax, and it makes Perl more internally consistent. A round-trip with C now returns C<16>, the way C does. =head3 Overridable tie functions C, C and C can now be overridden [perl #75902]. =head2 Exception Handling Several changes have been made to the way C, C, and C<$@> behave, in order to make them more reliable and consistent. When an exception is thrown inside an C, the exception is no longer at risk of being clobbered by code running during unwinding (e.g., destructors). Previously, the exception was written into C<$@> early in the throwing process, and would be overwritten if C was used internally in the destructor for an object that had to be freed while exiting from the outer C. Now the exception is written into C<$@> last thing before exiting the outer C, so the code running immediately thereafter can rely on the value in C<$@> correctly corresponding to that C. (C<$@> is still also set before exiting the C, for the sake of destructors that rely on this.) Likewise, a C inside an C will no longer clobber any exception thrown in its scope. Previously, the restoration of C<$@> upon unwinding would overwrite any exception being thrown. Now the exception gets to the C anyway. So C is safe before a C. Exceptions thrown from object destructors no longer modify the C<$@> of the surrounding context. (If the surrounding context was exception unwinding, this used to be another way to clobber the exception being thrown.) Previously such an exception was sometimes emitted as a warning, and then either was string-appended to the surrounding C<$@> or completely replaced the surrounding C<$@>, depending on whether that exception and the surrounding C<$@> were strings or objects. Now, an exception in this situation is always emitted as a warning, leaving the surrounding C<$@> untouched. In addition to object destructors, this also affects any function call performed by XS code using the C flag. Warnings for C can now be objects, in the same way as exceptions for C. If an object-based warning gets the default handling, of writing to standard error, it is stringified as before, with the file and line number appended. But a C<$SIG{__WARN__}> handler will now receive an object-based warning as an object, where previously it was passed the result of stringifying the object. =head2 Other Enhancements =head3 Assignment to C<$0> sets the legacy process name with C on Linux On Linux the legacy process name is now set with L, in addition to altering the POSIX name via C as perl has done since version 4.000. Now system utilities that read the legacy process name such as ps, top and killall will recognize the name you set when assigning to C<$0>. The string you supply will be cut off at 16 bytes; this is a limitation imposed by Linux. =head3 C now returns the seed This allows programs that need to have repeatable results not to have to come up with their own seed-generating mechanism. Instead, they can use C and stash the return value for future use. Typical is a test program which has too many combinations to test comprehensively in the time available to it each run. It can test a random subset each time and, should there be a failure, log the seed used for that run so that it can later be used to reproduce the same results. =head3 printf-like functions understand post-1980 size modifiers Perl's printf and sprintf operators, and Perl's internal printf replacement function, now understand the C90 size modifiers "hh" (C), "z" (C), and "t" (C). Also, when compiled with a C99 compiler, Perl now understands the size modifier "j" (C). So, for example, on any modern machine, C returns '1'. =head3 New global variable C<${^GLOBAL_PHASE}> A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow introspection of the current phase of the perl interpreter. It's explained in detail in L and L. =head3 C<-d:-foo> calls C The syntax C<-dIfoo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>> equivalent to C<-MDevel::foo=bar>, which expands internally to C. F now allows prefixing the module name with C<->, with the same semantics as C<-M>, I =over 4 =item C<-d:-foo> Equivalent to C<-M-Devel::foo>, expands to C, calls C<< Devel::foo->unimport() >> if the method exists. =item C<-d:-foo=bar> Equivalent to C<-M-Devel::foo=bar>, expands to C, calls C<< Devel::foo->unimport('bar') >> if the method exists. =back This is particularly useful for suppressing the default actions of a C module's C method whilst still loading it for debugging. =head3 Filehandle method calls load L on demand When a method call on a filehandle would die because the method cannot be resolved, and L has not been loaded, Perl now loads L via C and attempts method resolution again: open my $fh, ">", $file; $fh->binmode(":raw"); # loads IO::File and succeeds This also works for globs like STDOUT, STDERR and STDIN: STDOUT->autoflush(1); Because this on-demand load only happens if method resolution fails, the legacy approach of manually loading an L parent class for partial method support still works as expected: use IO::Handle; open my $fh, ">", $file; $fh->autoflush(1); # IO::File not loaded =head3 IPv6 support The C module provides new affordances for IPv6, including implementations of the C and C functions, along with related constants, and a handful of new functions. See L. =head3 DTrace probes now include package name The DTrace probes now include an additional argument (C) which contains the package the subroutine being entered or left was compiled in. For example using the following DTrace script: perl$target:::sub-entry { printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3)); } and then running: perl -e'sub test { }; test' DTrace will print: main::test =head2 New C APIs See L. =head1 Security =head2 User-defined regular expression properties In L, it says you can create custom properties by defining subroutines whose names begin with "In" or "Is". However, Perl did not actually enforce that naming restriction, so \p{foo::bar} could call foo::bar() if it existed. Now this convention has been enforced. Also, Perl no longer allows a tainted regular expression to invoke a user-defined property. It simply dies instead [perl #82616]. =head1 Incompatible Changes Perl 5.14.0 is not binary-compatible with any previous stable release. In addition to the sections that follow, see L. =head2 Regular Expressions and String Escapes =head3 \400-\777 Use of C<\400>-C<\777> in regexes in certain circumstances has given different, anomalous behavior than their use in all other double-quote-like contexts. Since 5.10.1, a deprecated warning message has been raised when this happens. Now, all double-quote-like contexts have the same behavior, namely to be equivalent to C<\x{100}> - C<\x{1FF}>, with no deprecation warning. Use of these values in the command line option C<"-0"> retains the current meaning to slurp input files whole; previously, this was documented only for C<"-0777">. It is recommended, however, because of various ambiguities, to use the new C<\o{...}> construct to represent characters in octal. =head3 Most C<\p{}> properties are now immune to case-insensitive matching For most Unicode properties, it doesn't make sense to have them match differently under C case-insensitive matching than not. And doing so leads to unexpected results and potential security holes. For example m/\p{ASCII_Hex_Digit}+/i could previously match non-ASCII characters because of the Unicode matching rules (although there were a number of bugs with this). Now matching under C gives the same results as non-C matching except for those few properties where people have come to expect differences, namely the ones where casing is an integral part of their meaning, such as C and C, both of which match the exact same code points, namely those matched by C. Details are in L. User-defined property handlers that need to match differently under C must change to read the new boolean parameter passed to them which is non-zero if case-insensitive matching is in effect or 0 otherwise. See L. =head3 \p{} implies Unicode semantics Now, a Unicode property match specified in the pattern will indicate that the pattern is meant for matching according to Unicode rules, the way C<\N{}> does. =head3 Regular expressions retain their localeness when interpolated Regular expressions compiled under C<"use locale"> now retain this when interpolated into a new regular expression compiled outside a C<"use locale">, and vice-versa. Previously, a regular expression interpolated into another one inherited the localeness of the surrounding one, losing whatever state it originally had. This is considered a bug fix, but may trip up code that has come to rely on the incorrect behavior. =head3 Stringification of regexes has changed Default regular expression modifiers are now notated by using C<(?^...)>. Code relying on the old stringification will fail. The purpose of this is so that when new modifiers are added, such code will not have to change (after this one time), as the stringification will automatically incorporate the new modifiers. Code that needs to work properly with both old- and new-style regexes can avoid the whole issue by using (for Perls since 5.9.5; see L): use re qw(regexp_pattern); my ($pat, $mods) = regexp_pattern($re_ref); If the actual stringification is important, or older Perls need to be supported, you can use something like the following: # Accept both old and new-style stringification my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism'; And then use C<$modifiers> instead of C<-xism>. =head3 Run-time code blocks in regular expressions inherit pragmata Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not to inherit any pragmata (strict, warnings, etc.) if the regular expression was compiled at run time as happens in cases like these two: use re 'eval'; $foo =~ $bar; # when $bar contains (?{...}) $foo =~ /$bar(?{ $finished = 1 })/; This was a bug, which has now been fixed. But it has the potential to break any code that was relying on it. =head2 Stashes and Package Variables =head3 Localised tied hashes and arrays are no longed tied In the following: tie @a, ...; { local @a; # here, @a is a now a new, untied array } # here, @a refers again to the old, tied array The new local array used to be made tied too, which was fairly pointless, and has now been fixed. This fix could however potentially cause a change in behaviour of some code. =head3 Stashes are now always defined C now always returns true, even when no symbols have yet been defined in that package. This is a side effect of removing a special case kludge in the tokeniser, added for 5.10.0, to hide side effects of changes to the internal storage of hashes that drastically reduce their memory usage overhead. Calling defined on a stash has been deprecated since 5.6.0, warned on lexicals since 5.6.0, and warned for stashes (and other package variables) since 5.12.0. C has always exposed an implementation detail - emptying a hash by deleting all entries from it does not make C false, hence C is not valid code to determine whether an arbitrary hash is empty. Instead, use the behaviour that an empty C<%hash> always returns false in a scalar context. =head3 Dereferencing typeglobs If you assign a typeglob to a scalar variable: $glob = *foo; the glob that is copied to C<$glob> is marked with a special flag indicating that the glob is just a copy. This allows subsequent assignments to C<$glob> to overwrite the glob. The original glob, however, is immutable. Many Perl operators did not distinguish between these two types of globs. This would result in strange behaviour in edge cases: C would do nothing if the last thing assigned to the scalar was a glob (because it treated it as C, which unties a handle). Assignment to a glob slot (e.g., C<*$glob = \@some_array>) would simply assign C<\@some_array> to C<$glob>. To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms) has been modified to make a new immutable glob if its operand is a glob copy. This allows operators that make a distinction between globs and scalars to be modified to treat only immutable globs as globs. (C, C and C have been left as they are for compatibility's sake, but will warn. See L.) This causes an incompatible change in code that assigns a glob to the return value of C<*{}> when that operator was passed a glob copy. Take the following code, for instance: $glob = *foo; *$glob = *bar; The C<*$glob> on the second line returns a new immutable glob. That new glob is made an alias to C<*bar>. Then it is discarded. So the second assignment has no effect. See L for even more detail. =head3 Clearing stashes Stash list assignment C<%foo:: = ()> used to make the stash anonymous temporarily while it was being emptied. Consequently, any of its subroutines referenced elsewhere would become anonymous (showing up as "(unknown)" in C). Now they retain their package names, such that C will return the original sub name if there is still a reference to its typeglob, or "foo::__ANON__" otherwise [perl #79208]. =head3 Magic variables outside the main package In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would 'leak' into other packages. So C<%foo::SIG> could be used to access signals, C<${"foo::!"}> (with strict mode off) to access C's C, etc. This was a bug, or an 'unintentional' feature, which caused various ill effects, such as signal handlers being wiped when modules were loaded, etc. This has been fixed (or the feature has been removed, depending on how you see it). =head2 Changes to Syntax or to Perl Operators =head3 C return values C blocks now return the last evaluated expression, or an empty list if the block was exited by C. Thus you can now write: my $type = do { given ($num) { break when undef; 'integer' when /^[+-]?[0-9]+$/; 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/; 'unknown'; } }; See L for details. =head3 Change in the parsing of certain prototypes Functions declared with the following prototypes now behave correctly as unary functions: * \$ \% \@ \* \& \[...] ;$ ;* ;\$ ;\% etc. ;\[...] Due to this bug fix [perl #75904], functions using the C<(*)>, C<(;$)> and C<(;*)> prototypes are parsed with higher precedence than before. So in the following example: sub foo($); foo $a < $b; the second line is now parsed correctly as C<< foo($a) < $b >>, rather than C<< foo($a < $b) >>. This happens when one of these operators is used in an unparenthesised argument: < > <= >= lt gt le ge == != <=> eq ne cmp ~~ & | ^ && || // .. ... ?: = += -= *= etc. =head3 Smart-matching against array slices Previously, the following code resulted in a successful match: my @a = qw(a y0 z); my @b = qw(a x0 z); @a[0 .. $#b] ~~ @b; This odd behaviour has now been fixed [perl #77468]. =head3 Negation treats strings differently from before The unary negation operator C<-> now treats strings that look like numbers as numbers [perl #57706]. =head3 Negative zero Negative zero (-0.0), when converted to a string, now becomes "0" on all platforms. It used to become "-0" on some, but "0" on others. If you still need to determine whether a zero is negative, use C or the L module on CPAN. =head3 C<:=> is now a syntax error Previously C was exactly equivalent to C, with the C<:> being treated as the start of an attribute list, ending before the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now a syntax error. This will allow the future use of C<:=> as a new token. We find no Perl 5 code on CPAN using this construction, outside the core's tests for it, so we believe that this change will have very little impact on real-world codebases. If it is absolutely necessary to have empty attribute lists (for example, because of a code generator) then avoid the error by adding a space before the C<=>. =head2 Threads and Processes =head3 Directory handles not copied to threads On systems other than Windows that do not have a C function, newly-created threads no longer inherit directory handles from their parent threads. Such programs would usually have crashed anyway [perl #75154]. =head3 C on shared pipes The C function no longer waits for the child process to exit if the underlying file descriptor is still in use by another thread, to avoid deadlocks. It returns true in such cases. =head3 fork() emulation will not wait for signalled children On Windows parent processes would not terminate until all forked childred had terminated first. However, C is inherently unstable on pseudo-processes, and C might not get delivered if the child if blocked in a system call. To avoid the deadlock and still provide a safe mechanism to terminate the hosting process, Perl will now no longer wait for children that have been sent a SIGTERM signal. It is up to the parent process to waitpid() for these children if child clean-up processing must be allowed to finish. However, it is also the responsibility of the parent then to avoid the deadlock by making sure the child process can't be blocked on I/O either. See L for more information about the fork() emulation on Windows. =head2 Configuration =head3 Naming fixes in Policy_sh.SH may invalidate Policy.sh Several long-standing typos and naming confusions in Policy_sh.SH have been fixed, standardizing on the variable names used in config.sh. This will change the behavior of Policy.sh if you happen to have been accidentally relying on the Policy.sh incorrect behavior. =head3 Perl source code is read in text mode on Windows Perl scripts used to be read in binary mode on Windows for the benefit of the ByteLoader module (which is no longer part of core Perl). This had the side effect of breaking various operations on the DATA filehandle, including seek()/tell(), and even simply reading from DATA after file handles have been flushed by a call to system(), backticks, fork() etc. The default build options for Windows have been changed to read Perl source code on Windows in text mode now. Hopefully ByteLoader will be updated on CPAN to automatically handle this situation [perl #28106]. =head1 Deprecations See also L. =head2 Omitting a space between a regular expression and subsequent word Omitting a space between a regular expression operator or its modifiers and the following word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed as C<< m/foo/s and $bar >> but will issue a warning. =head2 C<\cI> The backslash-c construct was designed as a way of specifying non-printable characters, but there were no restrictions (on ASCII platforms) on what the character following the C could be. Now, a deprecation warning is raised if that character isn't an ASCII character. Also, a deprecation warning is raised for C<"\c{"> (which is the same as simply saying C<";">). =head2 C<"\b{"> and C<"\B{"> In regular expressions, a literal C<"{"> immediately following a C<"\b"> (not in a bracketed character class) or a C<"\B{"> is now deprecated to allow for its future use by Perl itself. =head2 Deprecation warning added for deprecated-in-core .pl libs This is a mandatory warning, not obeying -X or lexical warning bits. The warning is modelled on that supplied by deprecate.pm for deprecated-in-core .pm libraries. It points to the specific CPAN distribution that contains the .pl libraries. The CPAN version, of course, does not generate the warning. =head2 List assignment to C<$[> Assignment to C<$[> was deprecated and started to give warnings in Perl version 5.12.0. This version of perl also starts to emit a warning when assigning to C<$[> in list context. This fixes an oversight in 5.12.0. =head2 Use of qw(...) as parentheses Historically the parser fooled itself into thinking that C literals were always enclosed in parentheses, and as a result you could sometimes omit parentheses around them: for $x qw(a b c) { ... } The parser no longer lies to itself in this way. Wrap the list literal in parentheses, like this: for $x (qw(a b c)) { ... } =head2 C<\N{BELL}> is deprecated This is because Unicode is using that name for a different character. See L for more explanation. =head2 C is deprecated C (without the initial m) has been deprecated and now produces a warning. This is to allow future use of C in new operators. The match-once functionality is still available in the form of C. =head2 Tie functions on scalars holding typeglobs Calling a tie function (C, C, C) with a scalar argument acts on a file handle if the scalar happens to hold a typeglob. This is a long-standing bug that will be removed in Perl 5.16, as there is currently no way to tie the scalar itself when it holds a typeglob, and no way to untie a scalar that has had a typeglob assigned to it. Now there is a deprecation warning whenever a tie function is used on a handle without an explicit C<*>. =head2 User-defined case-mapping This feature is being deprecated due to its many issues, as documented in L. It is planned to remove this feature in Perl 5.16. Instead use the CPAN module L, which provides improved functionality. =head2 Deprecated modules The following modules will be removed from the core distribution in a future release, and should be installed from CPAN instead. Distributions on CPAN which require these should add them to their prerequisites. The core versions of these modules will issue a deprecation warning. If you ship a packaged version of Perl, either alone or as part of a larger system, then you should carefully consider the repercussions of core module deprecations. You may want to consider shipping your default build of Perl with packages for some or all deprecated modules which install into C or C perl library directories. This will inhibit the deprecation warnings. Alternatively, you may want to consider patching F to provide deprecation warnings specific to your packaging system or distribution of Perl, consistent with how your packaging system or distribution manages a staged transition from a release where the installation of a single package provides the given functionality, to a later release where the system administrator needs to know to install multiple packages to get that same functionality. You can silence these deprecation warnings by installing the modules in question from CPAN. To install the latest version of all of them, just install C. =over =item L We strongly recommend that you install and used L in preference, as it offers significantly improved profiling and reporting. =back =head1 Performance Enhancements =head2 "Safe signals" optimisation Signal dispatch has been moved from the runloop into control ops. This should give a few percent speed increase, and eliminates almost all of the speed penalty caused by the introduction of "safe signals" in 5.8.0. Signals should still be dispatched within the same statement as they were previously - if this is not the case, or it is possible to create uninterruptible loops, this is a bug, and reports are encouraged of how to recreate such issues. =head2 Optimisation of shift; and pop; calls without arguments Two fewer OPs are used for shift and pop calls with no argument (with implicit C<@_>). This change makes C 5% faster than C on non-threaded perls and 25% faster on threaded. =head2 Optimisation of regexp engine string comparison work The foldEQ_utf8 API function for case-insensitive comparison of strings (which is used heavily by the regexp engine) was substantially refactored and optimised - and its documentation much improved as a free bonus gift. =head2 Regular expression compilation speed-up Compiling regular expressions has been made faster for the case where upgrading the regex to utf8 is necessary but that isn't known when the compilation begins. =head2 String appending is 100 times faster When doing a lot of string appending, perl could end up allocating a lot more memory than needed in a very inefficient way, if perl was configured to use the system's C implementation instead of its own. C, which is what's being used to allocate more memory if necessary when appending to a string, has now been taught how to round up the memory it requests to a certain geometric progression, making it much faster on certain platforms and configurations. On Win32, it's now about 100 times faster. =head2 Eliminate C accessor functions under ithreads When C was first developed, and interpreter state moved into an interpreter struct, thread and interpreter local C variables were defined as macros that called accessor functions, returning the address of the value, outside of the perl core. The intent was to allow members within the interpreter struct to change size without breaking binary compatibility, so that bug fixes could be merged to a maintenance branch that necessitated such a size change. However, some non-core code defines C, sometimes intentionally to bypass this mechanism for speed reasons, sometimes for other reasons but with the inadvertent side effect of bypassing this mechanism. As some of this code is widespread in production use, the result is that the core I change the size of members of the interpreter struct, as it will break such modules compiled against a previous release on that maintenance branch. The upshot is that this mechanism is redundant, and well-behaved code is penalised by it. Hence it can and should be removed (and has been). =head2 Freeing weak references When an object has many weak references to it, freeing that object can under some some circumstances take O(N^2) time to free (where N is the number of references). The number of circumstances has been reduced [perl #75254] =head2 Lexical array and hash assignments An earlier optimisation to speed up C and C assignments caused a bug and was disabled in Perl 5.12.0. Now we have found another way to speed up these assignments [perl #82110]. =head2 C<@_> uses less memory Previously, C<@_> was allocated for every subroutine at compile time with enough space for four entries. Now this allocation is done on demand when the subroutine is called [perl #72416]. =head2 Size optimisations to SV and HV structures xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and on some systems will cause struct xpvhv to become cache-aligned. To avoid this memory saving causing a slowdown elsewhere, boolean use of HvFILL now calls HvTOTALKEYS instead (which is equivalent) - so while the fill data when actually required are now calculated on demand, the cases when this needs to be done should be few and far between. The order of structure elements in SV bodies has changed. Effectively, the NV slot has swapped location with STASH and MAGIC. As all access to SV members is via macros, this should be completely transparent. This change allows the space saving for PVHVs documented above, and may reduce the memory allocation needed for PVIVs on some architectures. C, C, and C now only allocate the parts of the C body they actually use, saving some space. Scalars containing regular expressions now only allocate the part of the C body they actually use, saving some space. =head2 Memory consumption improvements to Exporter The @EXPORT_FAIL AV is no longer created unless required, hence neither is the typeglob backing it. This saves about 200 bytes for every package that uses Exporter but doesn't use this functionality. =head2 Memory savings for weak references For weak references, the common case of just a single weak reference per referent has been optimised to reduce the storage required. In this case it saves the equivalent of one small Perl array per referent. =head2 C<%+> and C<%-> use less memory The bulk of the C module used to be in the perl core. It has now been moved to an XS module, to reduce the overhead for programs that do not use C<%+> or C<%->. =head2 Multiple small improvements to threads The internal structures of threading now make fewer API calls and fewer allocations, resulting in noticeably smaller object code. Additionally, many thread context checks have been deferred so that they're only done when required (although this is only possible for non-debugging builds). =head2 Adjacent pairs of nextstate opcodes are now optimized away Previously, in code such as use constant DEBUG => 0; sub GAK { warn if DEBUG; print "stuff\n"; } the ops for C would be folded to a C op (C), but the C op would remain, resulting in a runtime op dispatch of C, C, .... The execution of a sequence of C ops is indistinguishable from just the last C op so the peephole optimizer now eliminates the first of a pair of C ops, except where the first carries a label, since labels must not be eliminated by the optimizer and label usage isn't conclusively known at compile time. =head1 Modules and Pragmata =head2 New Modules and Pragmata =over 4 =item * C 0.003 has been added as a dual-life module. It supports a subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files included with CPAN distributions or generated by the module installation toolchain. It should not be used for any other general YAML parsing or generation task. =item * C version 2.110440 has been added as a dual-life module. It provides a standard library to read, interpret and write CPAN distribution metadata files (e.g. META.json and META.yml) which describes a distribution, its contents, and the requirements for building it and installing it. The latest CPAN distribution metadata specification is included as C and notes on changes in the specification over time are given in C. =item * C 0.011 has been added as a dual-life module. It is a very small, simple HTTP/1.1 client designed for simple GET requests and file mirroring. It has has been added to enable CPAN.pm and CPANPLUS to "bootstrap" HTTP access to CPAN using pure Perl without relying on external binaries like F or F. =item * C 2.27105 has been added as a dual-life module, for the sake of reading F files in CPAN distributions. =item * C 1.000004 has been added as a dual-life module. It gathers package and POD information from Perl module files. It is a standalone module based on Module::Build::ModuleInfo for use by other module installation toolchain components. Module::Build::ModuleInfo has been deprecated in favor of this module instead. =item * C 1.002 has been added as a dual-life module. It maps Perl operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types with standardized names (e.g. "Unix" or "Windows"). It has been refactored out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into a single location for easier maintenance. =item * The following modules were added by the C upgrade. See below for details. C C C C C C =item * C version 0.101020 has been added as a dual-life module. It provides a standard library to model and manipulates module prerequisites and version constraints as defined in the L. =back =head2 Updated Modules and Pragma =over 4 =item * C has been upgraded from version 0.12 to 0.14. =item * C has been upgraded from version 0.38 to 0.48. Updates since 0.38 include: a safe print method that guards Archive::Extract from changes to $\; a fix to the tests when run in core perl; support for TZ files; a modification for the lzma logic to favour IO::Uncompress::Unlzma; and a fix for an issue with NetBSD-current and its new unzip executable. =item * C has been upgraded from version 1.54 to 1.76. Important changes since 1.54 include the following: =over =item * Compatibility with busybox implementations of tar =item * A fix so that C and C close only handles they opened =item * A bug was fixed regarding the exit code of extract_archive. =item * The C utility has a new option to allow safe creation of tarballs without world-writable files on Windows, allowing those archives to be uploaded to CPAN. =item * A new ptargrep utility for using regular expressions against the contents of files in a tar archive. =item * Pax extended headers are now skipped. =back =item * C has been upgraded from version 0.87 to 0.89. =item * C has been upgraded from version 2.06_01 to 2.1001. =item * C has been upgraded from version 5.70 to 5.71. =item * C has been upgraded from version 1.23 to 1.29. It no longer crashes when taking apart a C containing characters outside the octet range or compiled in a C scope. The size of the shared object has been reduced by about 40%, with no reduction in functionality. =item * C has been upgraded from version 0.78 to 0.83. B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag as "DREFed". It no longer produces mangled output with the C<-tree> option [perl #80632]. =item * C has been upgraded from version 1.12 to 1.16. =item * C has been upgraded from version 0.96 to 1.03. The deparsing of a nextstate op has changed when it has both a change of package (relative to the previous nextstate), or a change of C<%^H> or other state, and a label. Previously the label was emitted first, but now the label is emitted last (5.12.1). The C or similar form is now correctly handled by B::Deparse (5.12.3). B::Deparse now properly handles the code that applies a conditional pattern match against implicit C<$_> as it was fixed in [perl #20444]. Deparsing of C followed by a variable with funny characters (as permitted under the C pragma) has also been fixed [perl #33752]. =item * C has been upgraded from version 1.11_01 to 1.13. =item * C has been upgraded from version 2.15 to 2.16. =item * C has been upgraded from version 1.11 to 1.12. =item * C has been upgraded from version 0.23 to 0.26. =item * C has been upgraded from version 1.15 to 1.20. L now detects incomplete L overrides and avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on particular behaviour of the C built-in. Carp now detects if other code has overridden this with an incomplete implementation, and modifies its backtrace accordingly. Previously incomplete overrides would cause incorrect values in backtraces (best case), or obscure fatal errors (worst case). This fixes certain cases of C caused by modules overriding C incorrectly (5.12.2). It now also avoids using regular expressions that cause perl to load its Unicode tables, in order to avoid the 'BEGIN not safe after errors' error that will ensue if there has been a syntax error [perl #82854]. =item * C has been upgraded from version 3.48 to 3.52. This provides the following security fixes: the MIME boundary in multipart_init is now random and the handling of newlines embedded in header values has been improved. =item * C has been upgraded from version 2.024 to 2.033. It has been updated to use bzip2 1.0.6. =item * C has been upgraded from version 2.024 to 2.033. =item * C has been upgraded from version 1.94_56 to 1.9600. Major highlights: =over 4 =item * much less configuration dialog hassle =item * support for META/MYMETA.json =item * support for local::lib =item * support for HTTP::Tiny to reduce the dependency on ftp sites =item * automatic mirror selection =item * iron out all known bugs in configure_requires =item * support for distributions compressed with bzip2 =item * allow Foo/Bar.pm on the commandline to mean Foo::Bar =back =item * C has been upgraded from version 0.90 to 0.9103. A change to F resolves L and L, both of which related to failures to install distributions that use C (5.12.2). A dependency on Config was not recognised as a core module dependency. This has been fixed. CPANPLUS now includes support for META.json and MYMETA.json. =item * C has been upgraded from version 0.46 to 0.54. =item * C has been upgraded from version 2.125 to 2.130_02. The indentation used to be off when C<$Data::Dumper::Terse> was set. This has been fixed [perl #73604]. This upgrade also fixes a crash when using custom sort functions that might cause the stack to change [perl #74170]. C no longer crashes with globs returned by C<*$io_ref> [perl #72332]. =item * C has been upgraded from version 1.820 to 1.821. =item * C has been upgraded from version 0.03 to 0.04. =item * C has been upgraded from version 20080331.00 to 20110228.00. Merely loading C now no longer triggers profiling to start. C and C still behave as before and start the profiler. NOTE: C is deprecated and will be removed from a future version of Perl. We strongly recommend that you install and use L instead, as it offers significantly improved profiling and reporting. =item * C has been upgraded from version 1.04 to 1.07. =item * C has been upgraded from version 1.03 to 1.05. =item * C has been upgraded from version 1.19 to 1.22. It now renders pod links slightly better, and has been taught to find descriptions for messages that share their descriptions with other messages. =item * C has been upgraded from version 2.39 to 2.51. It is now safe to use this module in combination with threads. =item * C has been upgraded from version 5.47 to 5.61. C now more closely mimics C/C. C accepts all POSIX filenames. New SHA-512/224 and SHA-512/256 transforms (ref. NIST Draft FIPS 180-4 [February 2011]) =item * C has been upgraded from version 1.03 to 1.04. =item * C has been upgraded from version 1.13 to 1.16. =item * C has been upgraded from version 1.10 to 1.13. It fixes a buffer overflow when passed a very long file name. It no longer inherits from AutoLoader; hence it no longer produces weird error messages for unsuccessful method calls on classes that inherit from DynaLoader [perl #84358]. =item * C has been upgraded from version 2.39 to 2.42. Now, all 66 Unicode non-characters are treated the same way U+FFFF has always been treated; in cases when it was disallowed, all 66 are disallowed; in those cases where it warned, all 66 warn. =item * C has been upgraded from version 1.01 to 1.02. =item * C has been upgraded from version 1.11 to 1.13. The implementation of C has been refactored to use about 55% less memory. On some platforms with unusual header files, like Win32/gcc using mingw64 headers, some constants which weren't actually error numbers have been exposed by C. This has been fixed [perl #77416]. =item * C has been upgraded from version 5.64_01 to 5.64_03. Exporter no longer overrides C<$SIG{__WARN__}> [perl #74472] =item * C has been upgraded from version 0.27 to 0.280202. =item * C has been upgraded from version 1.16 to 1.17. =item * C has been upgraded from 0.22 to 0.23. The C helper code generated by C can now C for missing constants, or generate a complete C subroutine in XS, allowing simplification of many modules that use it (C, C, C, C, C, C). C can now optionally push the names of all constants onto the package's C<@EXPORT_OK>. =item * C has been upgraded from version 1.55 to 1.56. =item * C has been upgraded from version 6.56 to 6.57_05. =item * C has been upgraded from version 1.57 to 1.58. =item * C has been upgraded from version 2.21 to 2.2210. =item * C has been upgraded from version 1.06 to 1.11. =item * C has been upgraded from version 2.78 to 2.81. =item * C has been upgraded from version 4.4 to 4.41. =item * C has been upgraded from version 2.17 to 2.21. =item * C has been upgraded from version 1.01 to 1.04. It allows patterns containing literal parentheses (they no longer need to be escaped). On Windows, it no longer adds an extra F<./> to the file names returned when the pattern is a relative glob with a drive specification, like F [perl #71712]. =item * C has been upgraded from version 0.24 to 0.32. C is now supported for 'http' scheme. The C utility is supported on FreeBSD, NetBSD and Dragonfly BSD for the C and C schemes. =item * C has been upgraded from version 1.15 to 1.19. It improves handling of backslashes on Windows, so that paths like F are no longer generated [perl #71710]. =item * C has been upgraded from version 1.07 to 1.12. =item * C has been upgraded from version 3.31 to 3.33. Several portability fixes were made in C: a colon is now recognized as a delimiter in native filespecs; caret-escaped delimiters are recognized for better handling of extended filespecs; C returns an empty directory rather than the current directory if the input directory name is empty; C properly handles Unix-style input (5.12.2). =item * C has been upgraded from 1.02 to 1.05. The C<-x> and C<-X> file test operators now work correctly under the root user. =item * C has been upgraded from version 0.84 to 0.86. =item * C has been upgraded from 1.10 to 1.14. This fixes a memory leak when DBM filters are used. =item * C has been upgraded from 0.07 to 0.11. Hash::Util no longer emits spurious "uninitialized" warnings when recursively locking hashes that have undefined values [perl #74280]. =item * C has been upgraded from version 1.04 to 1.09. =item * C has been upgraded from version 1.01 to 1.02. =item * C has been upgraded from version 0.03 to 0.08. C now defaults to using C<$_> if there is no argument given, just as the documentation has always claimed. =item * C has been upgraded from version 0.35 to 0.35_01. =item * C has been upgraded from version 0.05 to 0.0601. =item * C has been upgraded from version 1.25_02 to 1.25_04. This version of C includes a new C, which now allows IO::Handle objects (and objects in derived classes) to be removed from an IO::Select set even if the underlying file descriptor is closed or invalid. =item * C has been upgraded from version 0.54 to 0.70. Resolves an issue with splitting Win32 command lines. An argument consisting of the single character "0" used to be omitted (CPAN RT #62961). =item * C has been upgraded from 1.05 to 1.09. C now produces an error if the C call fails, allowing this condition to be distinguished from a child process that exited with a non-zero status [perl #72016]. The internal C routine now knows how to handle file descriptors, as documented, so duplicating STDIN in a child process using its file descriptor now works [perl #76474]. =item * C has been upgraded from version 2.01 to 2.03. =item * C has been upgraded from version 0.62 to 0.63. =item * C has been upgraded from version 1.14 to 1.19. Locale::Maketext now supports external caches. This upgrade also fixes an infinite loop in C when working with tainted values (CPAN RT #40727). C<< ->maketext >> calls will now back up and restore C<$@> so that error messages are not suppressed (CPAN RT #34182). =item * C has been upgraded from version 0.02 to 0.04. =item * C has been upgraded from version 0.06 to 0.08. =item * C has been upgraded from version 1.89_01 to 1.994. This fixes, among other things, incorrect results when computing binomial coefficients [perl #77640]. It also prevents C from crashing under C [perl #73534]. =item * C has been upgraded from version 0.19 to 0.28. =item * C has been upgraded from version 0.24 to 0.26_02. =item * C has been upgraded from version 1.01_03 to 1.02. =item * C has been upgraded from 3.08 to 3.13. Includes new functions to calculate the length of encoded and decoded base64 strings. Now provides C and C functions to process the base64 scheme for "URL applications". =item * C has been upgraded from version 0.3603 to 0.3800. A notable change is the deprecation of several modules. Module::Build::Version has been deprecated and Module::Build now relies directly upon L. Module::Build::ModuleInfo has been deprecated in favor of a standalone copy of it called L. Module::Build::YAML has been deprecated in favor of L. Module::Build now also generates META.json and MYMETA.json files in accordance with version 2 of the CPAN distribution metadata specification, L. The older format META.yml and MYMETA.yml files are still generated, as well. =item * C has been upgraded from version 2.29 to 2.47. Besides listing the updated core modules of this release, it also stops listing the C module. That module never existed in core. The scripts generating C confused it with C, which actually is a core module as of perl 5.8.7. =item * C has been upgraded from version 0.16 to 0.18. =item * C has been upgraded from version 0.34 to 0.44. =item * C has been upgraded from version 1.02 to 1.07. =item * C has been upgraded from version 1.08 to 1.12. This fixes a memory leak when DBM filters are used. =item * C has been upgraded from version 2.36 to 2.38. =item * C has been upgraded from version 0.64 to 0.65. =item * C has been upgraded from version 0.36 to 0.38. =item * C have been upgraded from version 1.07 to 1.10. This fixes a memory leak when DBM filters are used. =item * C has been upgraded from version 1.15 to 1.18. =item * C has been upgraded from 1.10 to 1.13. C can now handle subroutines that are themselves blessed into overloaded classes [perl #71998]. The documentation has greatly improved. See L below. =item * C has been upgraded from version 0.26 to 0.28. =item * C has been upgraded from version 0.223 to 0.225. =item * C has been upgraded from version 1.40 to 1.4401. The latest Parse::CPAN::Meta can now read YAML and JSON files using L and L, which are now part of the Perl core. =item * C has been upgraded from version 0.12 to 0.14. =item * C has been upgraded from 0.07 to 0.11. A C after a C beyond the end of the string no longer thinks it has data to read [perl #78716]. =item * C has been upgraded from version 0.09 to 0.11. =item * C has been upgraded from version 1.09 to 1.1. =item * C has been upgraded from version 0.58 to 0.59. =item * C has been upgraded from version 3.15_02 to 3.15_03. =item * C has been upgraded from version 3.13 to 3.16. =item * C has been upgraded from 1.19 to 1.24. It now includes constants for POSIX signal constants. =item * C has been upgraded from version 0.11 to 0.17. New C pragma The C function used to crash when called on a regular expression belonging to a pluggable engine. Now it croaks instead. C no longer leaks memory. =item * C has been upgraded from version 2.25 to 2.29. Coderefs returned by C and C are now wrapped via C (5.12.1). This fixes a possible infinite loop when looking for coderefs. It adds several version::vxs::* routines to the default share. =item * C has been upgraded from version 1.06 to 1.09. =item * C has been upgraded from 1.17 to 1.18. It now works in taint mode [perl #72062]. =item * C has been upgraded from version 1.04 to 1.05. It no longer tries to modify read-only arguments when generating a backtrace [perl #72340]. =item * C has been upgraded from version 1.87 to 1.94. See L, above. =item * C has been upgraded from version 2.22 to 2.27. Includes performance improvement for overloaded classes. This adds support for serialising code references that contain UTF-8 strings correctly. The Storable minor version number changed as a result, meaning that Storable users who set C<$Storable::accept_future_minor> to a C value will see errors (see L for more details). Freezing no longer gets confused if the Perl stack gets reallocated during freezing [perl #80074]. =item * C has been upgraded from version 1.11 to 1.16. =item * C has been upgraded from version 2.02 to 3.00. =item * C has been upgraded from version 0.20 to 0.26. =item * C has been upgraded from version 3.17 to 3.23. =item * C has been upgraded from version 0.94 to 0.98. Among many other things, subtests without a C or C now have an implicit C added to them. =item * C has been upgraded from version 2.09 to 2.12. It provides two new methods that give more control over the decrementing of semaphores: C and C. =item * C has been upgraded from version 2.11 to 2.12. =item * C has been upgraded from version 1.75 to 1.83. =item * C has been upgraded from version 1.32 to 1.36. =item * C has been upgraded from version 1.03 to 1.04. Calling C<< Tie::Hash-ETIEHASH() >> used to loop forever. Now it Cs. =item * C has been upgraded from version 0.06 to 0.08. =item * C has been upgraded from version 1.38 to 1.39. =item * C has been upgraded from version 1.9719 to 1.9721_01. =item * C has been upgraded from version 1.1901_01 to 1.2000. =item * C has been upgraded from version 1.15_01 to 1.20_01. =item * C has been upgraded from version 0.52_01 to 0.73. Unicode::Collate has been updated to use Unicode 6.0.0. Unicode::Collate::Locale now supports a plethora of new locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om, tn, vi, hr, ig, ja, ko, ru, sq, se, sr, to, uk, zh, zh__big5han, zh__gb2312han, zh__pinyin and zh__stroke. The following modules have been added: C for C which makes tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering. C for C which makes tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering. C which makes tailoring of 6355 kanji (CJK Unified Ideographs) in the JIS X 0208 order. C which makes tailoring of CJK Unified Ideographs in the order of CLDR's Korean ordering. C for C which makes tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering. C for C which makes tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering. This also sees the switch from using the pure-perl version of this module to the XS version. =item * C has been upgraded from version 1.03 to 1.10. =item * C has been upgraded from version 0.27 to 0.32. A new function, C, has been added. This function returns the numeric value of the string passed it or C if the string in its entirety has no "safe" numeric value. (For more detail, and for the definition of "safe", see L.) This upgrade also includes a number of bug fixes: =over 4 =item charinfo() =over 4 =item * It is now updated to Unicode Version 6 with Corrigendum #8, except, as with Perl 5.14, the code point at U+1F514 has no name. =item * The Hangul syllable code points have the correct names, and their decompositions are always output without requiring L to be installed. =item * The CJK (Chinese-Japanese-Korean) code points U+2A700 to U+2B734 and U+2B740 to U+2B81D are now properly handled. =item * The numeric values are now output for those CJK code points that have them. =item * The names that are output for code points with multiple aliases are now the corrected ones. =back =item charscript() This now correctly returns "Unknown" instead of C for the script of a code point that hasn't been assigned another one. =item charblock() This now correctly returns "No_Block" instead of C for the block of a code point that hasn't been assigned to another one. =back =item * C has been upgraded from 0.82 to 0.88. Due to a bug, now fixed, the C and C functions did not work when exported (5.12.1). =item * C has been upgraded from version 1.09 to 1.12. Calling C without arguments is now significantly more efficient. =item * C have been upgraded from version 1.01 to 1.02. It is now possible to register warning categories other than the names of packages using C. See L for more information. =item * C has been upgraded from version 0.10 to 0.13. =item * C has been upgraded from version 1.03 to 1.05. Two bugs have been fixed [perl #84086]: The symbol table name was lost when tying a hash, due to a thinko in C. The result was that all tied hashes interacted with the local symbol table. Unless a symbol table name had been explicitly specified in the call to the constructor, querying the special key ':LOCAL' failed to identify objects connected to the local symbol table. =item * C has been upgraded from version 0.39 to 0.44. This release has several new functions: C, C, C. The names returned by C and C have been corrected. =item * C has been upgraded from version 0.03 to 0.05. =back =head2 Removed Modules and Pragmata The following modules have been removed from the core distribution, and if needed should be installed from CPAN instead. =over =item * C has been removed from the Perl core. Prior version was 0.36. =item * C has been removed from the Perl core. Prior version was 1.02. =item * C has been removed from the Perl core. Prior version was 2.16. =back The removal of C has been deferred until after 5.14, as the implementation of C shipped with 5.12.0 did not correctly issue the warning that it was to be removed from core. =head1 Documentation =head2 New Documentation =head3 L L has been updated to contain GPL version 1, as is included in the F distributed with perl (5.12.1). =head3 Perl 5.12.x delta files The perldelta files for Perl 5.12.1 to 5.12.3 have been added from the maintenance branch: L, L, L. =head3 L New style guide for POD documentation, split mostly from the NOTES section of the pod2man man page. =head3 L, L, L, and L See L, below. =head2 Changes to Existing Documentation =head3 L is now complete The perlmodlib page that came with Perl 5.12.0 was missing a lot of modules, due to a bug in the script that generates the list. This has been fixed [perl #74332] (5.12.1). =head3 Replace wrong tr/// table in L L contains a helpful table to use in tr/// to convert between EBCDIC and Latin1/ASCII. Unfortunately, the table was the inverse of the one it describes, though the code that used the table worked correctly for the specific example given. The table has been changed to its inverse, and the sample code changed to correspond, as this is easier for the person trying to follow the instructions since deriving the old table is somewhat more complicated. The table has also been changed to hex from octal, as that is more the norm these days, and the recipes in the pod altered to print out leading zeros to make all the values the same length. =head3 Tricks for user-defined casing L now contains an explanation of how to override, mangle and otherwise tweak the way perl handles upper-, lower- and other-case conversions on Unicode data, and how to provide scoped changes to alter one's own code's behaviour without stomping on anybody else. =head3 INSTALL explicitly states the requirement for C89 This was already true but it's now Officially Stated For The Record (5.12.2). =head3 Explanation of C<\xI> and C<\oI> escapes L has been updated with more detailed explanation of these two character escapes. =head3 C<-0I> switch In L, the behavior of the C<-0NNN> switch for C<-0400> or higher has been clarified (5.12.2). =head3 Maintenance policy L now contains the policy on what patches are acceptable for maintenance branches (5.12.1). =head3 Deprecation policy L now contains the policy on compatibility and deprecation along with definitions of terms like "deprecation" (5.12.2). =head3 New descriptions in L The following existing diagnostics are now documented: =over 4 =item * L =item * L =item * L =item * L =item * L =item * L =item * L =back =head3 L L has been expanded to cover many more popular books. =head3 C macro The documentation for the C macro in L was simply wrong in stating that get-magic is not processed. It has been corrected. =head3 L revamp L reorders the variables and groups them by topic. Each variable introduced after Perl 5.000 notes the first version in which it is available. L also has a new section for deprecated variables to note when they were removed. =head3 Array and hash slices in scalar context These are now documented in L. =head3 C and formats L and L have been corrected to state that C affects formats. =head3 L L's documentation has practically undergone a rewrite. It is now much more straightforward and clear. =head3 perlhack and perlrepository revamp The L and perlrepository documents have been heavily edited and split up into several new documents. The L document is now much shorter, and focuses on the Perl 5 development process and submitting patches to Perl. The technical content has been moved to several new documents, L, L, L, and L. This technical content has only been lightly edited. The perlrepository document has been renamed to L. This new document is just a how-to on using git with the Perl source code. Any other content that used to be in perlrepository has been moved to perlhack. =head3 Time::Piece examples Examples in L have been updated to show the use of L. =head1 Diagnostics The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see L. =head2 New Diagnostics =head3 New Errors =over =item Closure prototype called This error occurs when a subroutine reference passed to an attribute handler is called, if the subroutine is a closure [perl #68560]. =item Insecure user-defined property %s Perl detected tainted data when trying to compile a regular expression that contains a call to a user-defined character property function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>. See L and L. =item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries This new error is triggered if a destructor called on an object in a typeglob that is being freed creates a new typeglob entry containing an object with a destructor that creates a new entry containing an object.... =item Parsing code internal error (%s) This new fatal error is produced when parsing code supplied by an extension violates the parser's API in a detectable way. =item refcnt: fd %d%s This new error only occurs if a internal consistency check fails when a pipe is about to be closed. =item Regexp modifier "/%c" may not appear twice The regular expression pattern has one of the mutually exclusive modifiers repeated. =item Regexp modifiers "/%c" and "/%c" are mutually exclusive The regular expression pattern has more than one of the mutually exclusive modifiers. =item Using !~ with %s doesn't make sense This error occurs when C is used with C or C. =back =head3 New Warnings =over =item "\b{" is deprecated; use "\b\{" instead =item "\B{" is deprecated; use "\B\{" instead Use of an unescaped "{" immediately following a C<\b> or C<\B> is now deprecated so as to reserve its use for Perl itself in a future release. =item Operation "%s" returns its argument for ... Performing an operation requiring Unicode semantics (such as case-folding) on a Unicode surrogate or a non-Unicode character now triggers a warning: 'Operation "%s" returns its argument for ...'. =item Use of qw(...) as parentheses is deprecated See L, above, for details. =back =head2 Changes to Existing Diagnostics =over 4 =item * The "Variable $foo is not imported" warning that precedes a C error has now been assigned the "misc" category, so that C will suppress it [perl #73712]. =item * C and C now produce 'Wide character' warnings when fed a character outside the byte range if STDERR is a byte-sized handle. =item * The 'Layer does not match this perl' error message has been replaced with these more helpful messages [perl #73754]: =over 4 =item * PerlIO layer function table size (%d) does not match size expected by this perl (%d) =item * PerlIO layer instance size (%d) does not match size expected by this perl (%d) =back =item * The "Found = in conditional" warning that is emitted when a constant is assigned to a variable in a condition is now withheld if the constant is actually a subroutine or one generated by C, since the value of the constant may not be known at the time the program is written [perl #77762]. =item * Previously, if none of the C, C and C functions were implemented on a given platform, they would all die with the message 'Unsupported socket function "gethostent" called', with analogous messages for C and C. This has been corrected. =item * The warning message about unrecognized regular expression escapes passed through has been changed to include any literal '{' following the two-character escape. E.g., "\q{" is now emitted instead of "\q". =back =head1 Utility Changes =head3 L =over 4 =item * L now looks in the EMAIL environment variable for a return address if the REPLY-TO and REPLYTO variables are empty. =item * L did not previously generate a From: header, potentially resulting in dropped mail. Now it does include that header. =item * The user's address is now used as the return-path. Many systems these days don't have a valid Internet domain name and perlbug@perl.org does not accept email with a return-path that does not resolve. So the user's address is now passed to sendmail so it's less likely to get stuck in a mail queue somewhere [perl #82996]. =item * L now always gives the reporter a chance to change the email address it guesses for them (5.12.2). =item * L should no longer warn about uninitialized values when using the C<-d> and C<-v> options (5.12.2). =back =head3 L =over =item * The remote terminal works after forking and spawns new sessions - one for each forked process. =back =head3 L =over 4 =item * L is a new utility to apply pattern matching to the contents of files in a tar archive. It comes with C. =back =head1 Configuration and Compilation See also L, above. =over 4 =item * CCINCDIR and CCLIBDIR for the mingw64 cross-compiler are now correctly under $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME). This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now set correctly. =item * 'make test.valgrind' has been adjusted to account for cpan/dist/ext separation. =item * On compilers that support it, C<-Wwrite-strings> is now added to cflags by default. =item * The C module can now (once again) be included in a static Perl build. The special-case handling for this situation got broken in Perl 5.11.0, and has now been repaired. =item * The previous default size of a PerlIO buffer (4096 bytes) has been increased to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling this decade-old default increases read and write performance in the neighborhood of 25% to 50% when using the default layers of perlio on top of unix. To choose a non-default size, such as to get back the old value or to obtain an even larger value, configure with: ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N where N is the desired size in bytes; it should probably be a multiple of your page size. =item * An "incompatible operand types" error in ternary expressions when building with C has been fixed (5.12.2). =item * Perl now skips setuid C tests on partitions it detects to be mounted as C (5.12.2). =back =head1 Platform Support =head2 New Platforms =over 4 =item AIX Perl now builds on AIX 4.2 (5.12.1). =back =head2 Discontinued Platforms =over 4 =item Apollo DomainOS The last vestiges of support for this platform have been excised from the Perl distribution. It was officially discontinued in version 5.12.0. It had not worked for years before that. =item MacOS Classic The last vestiges of support for this platform have been excised from the Perl distribution. It was officially discontinued in an earlier version. =back =head2 Platform-Specific Notes =head3 AIX =over =item * F has been updated with information about the XL C/C++ V11 compiler suite (5.12.2). =back =head3 ARM =over =item * The C configuration probe on ARM has been fixed (5.12.2). =back =head3 Cygwin =over 4 =item * MakeMaker has been updated to build man pages on cygwin. =item * Improved rebase behaviour If a dll is updated on cygwin the old imagebase address is reused. This solves most rebase errors, especially when updating on core dll's. See L for more information. =item * Support for the standard cygwin dll prefix, which is e.g. needed for FFI's =item * Updated build hints file =back =head3 FreeBSD 7 =over =item * FreeBSD 7 no longer contains F. At build time, Perl now skips the F check for versions 7 and higher and assumes ELF (5.12.1). =back =head3 HP-UX =over =item * Perl now allows -Duse64bitint without promoting to use64bitall on HP-UX (5.12.1). =back =head3 IRIX Conversion of strings to floating-point numbers is now more accurate on IRIX systems [perl #32380]. =head3 Mac OS X Early versions of Mac OS X (Darwin) had buggy implementations of the C, C, C and C functions, so perl would pretend they did not exist. These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and higher, as they have been fixed [perl #72990]. =head3 MirBSD Previously if you built perl with a shared libperl.so on MirBSD (the default config), it would work up to the installation; however, once installed, it would be unable to find libperl. So path handling is now treated as in the other BSD dialects. =head3 NetBSD The NetBSD hints file has been changed to make the system's malloc the default. =head3 Recent OpenBSDs now use perl's malloc OpenBSD E 3.7 has a new malloc implementation which is mmap-based and as such can release memory back to the OS; however, perl's use of this malloc causes a substantial slowdown so we now default to using perl's malloc instead [perl #75742]. =head3 OpenVOS perl now builds again with OpenVOS (formerly known as Stratus VOS) [perl #78132] (5.12.3). =head3 Solaris DTrace is now supported on Solaris. There used to be build failures, but these have been fixed [perl #73630] (5.12.3). =head3 VMS =over =item * It's now possible to build extensions on older (pre 7.3-2) VMS systems. DCL symbol length was limited to 1K up until about seven years or so ago, but there was no particularly deep reason to prevent those older systems from configuring and building Perl (5.12.1). =item * We fixed the previously-broken C<-Uuseperlio> build on VMS. We were checking a variable that doesn't exist in the non-default case of disabling perlio. Now we only look at it when it exists (5.12.1). =item * We fixed the -Uuseperlio command-line option in configure.com. Formerly it only worked if you went through all the questions interactively and explicitly answered no (5.12.1). =item * C now honours the default permissions on VMS. When C became the default and C became the default bottom layer, the most common path for creating files from Perl became C, which has always explicitly used C<0666> as the permission mask. To avoid this, C<0777> is now passed as the permissions to C. In the VMS CRTL, C<0777> has a special meaning over and above intersecting with the current umask; specifically, it allows Unix syscalls to preserve native default permissions (5.12.3). =item * Spurious record boundaries are no longer introduced by the PerlIO layer during output (5.12.3). =item * The shortening of symbols longer than 31 characters in the C sources is now done by the compiler rather than by xsubpp (which could only do so for generated symbols in XS code). =item * Record-oriented files (record format variable or variable with fixed control) opened for write by the perlio layer will now be line-buffered to prevent the introduction of spurious line breaks whenever the perlio buffer fills up. =item * F is now installed on VMS. This was an oversight in v5.12.0 which caused some extensions to fail to build (5.12.2). =item * Several memory leaks in L have been fixed (5.12.2). =item * A memory leak in C due to a double allocation has been fixed (5.12.2). =item * A memory leak in C (used by C and C) has been fixed (5.12.2). =back =head3 Windows See also L and L, above. =over 4 =item * Fixed build process for SDK2003SP1 compilers. =item * Compilation with Visual Studio 2010 is now supported. =item * When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set in C<$Config{ccflags}>. This improves portability when compiling XS extensions using new compilers, but for a perl compiled with old 32-bit compilers. =item * C<$Config{gccversion}> is now set correctly when perl is built using the mingw64 compiler from L [perl #73754]. =item * When building Perl with the mingw64 x64 cross-compiler C, C, C, C and C values in F and F were not previously being set correctly because, with that compiler, the include and lib directories are not immediately below C<$(CCHOME)> (5.12.2). =item * The build process proceeds more smoothly with mingw and dmake when F is in the PATH, due to a C fix. =item * Support for building with Visual C++ 2010 is now underway, but is not yet complete. See F or L for more details. =item * The option to use an externally-supplied C, or to build with no C at all, has been removed. Perl supplies its own C implementation for Windows, and the political situation that required this part of the distribution to sometimes be omitted is long gone. =back =head1 Internal Changes =head2 New APIs =head3 CLONE_PARAMS structure added to ease correct thread creation Modules that create threads should now create C structures by calling the new function C, and free them with C. This will ensure compatibility with any future changes to the internals of the C structure layout, and that it is correctly allocated and initialised. =head3 New parsing functions Several functions have been added for parsing statements or multiple statements: =over =item * C parses a complete Perl statement. =item * C parses a sequence of statements, up to closing brace or EOF. =item * C parses a block [perl #78222]. =item * C parses a statement without a label. =item * C parses a statement label, separate from statements. =back The L|perlapi/parse_fullexpr>, L|perlapi/parse_listexpr>, L|perlapi/parse_termexpr>, and L|perlapi/parse_arithexpr> functions have been added to the API. They perform recursive-descent parsing of expressions at various precedence levels. They are expected to be used by syntax plugins. See L for details. =head3 Hints hash API A new C API for introspecting the hinthash C<%^H> at runtime has been added. See C, C, C, C, and C in L for details. A new, experimental API has been added for accessing the internal structure that Perl uses for C<%^H>. See the functions beginning with C in L. =head3 C interface to C The C function has been added as an XSUB-writer's equivalent of C. See L for details. =head3 Custom per-subroutine check hooks XS code in an extension module can now annotate a subroutine (whether implemented in XS or in Perl) so that nominated XS code will be called at compile time (specifically as part of op checking) to change the op tree of that subroutine. The compile-time check function (supplied by the extension module) can implement argument processing that can't be expressed as a prototype, generate customised compile-time warnings, perform constant folding for a pure function, inline a subroutine consisting of sufficiently simple ops, replace the whole call with a custom op, and so on. This was previously all possible by hooking the C op checker, but the new mechanism makes it easy to tie the hook to a specific subroutine. See L. To help in writing custom check hooks, several subtasks within standard C op checking have been separated out and exposed in the API. =head3 Improved support for custom OPs Custom ops can now be registered with the new C C function and the C structure. This will make it easier to add new properties of custom ops in the future. Two new properties have been added already, C and C. C is one of the OA_*OP constants, and allows L and other introspection mechanisms to work with custom ops that aren't BASEOPs. C is a pointer to a function that will be called for ops of this type from C. See L and L for more detail. The old C/C interface is still supported but discouraged. =head3 Scope hooks It is now possible for XS code to hook into Perl's lexical scope mechanism at compile time, using the new C function. See L. =head3 The recursive part of the peephole optimizer is now hookable In addition to C, for hooking into the toplevel peephole optimizer, a C is now available to hook into the optimizer recursing into side-chains of the optree. =head3 New non-magical variants of existing functions The following functions/macros have been added to the API. The C<*_nomg> macros are equivalent to their non-_nomg variants, except that they ignore get-magic. Those ending in C<_flags> allow one to specify whether get-magic is processed. sv_2bool_flags SvTRUE_nomg sv_2nv_flags SvNV_nomg sv_cmp_flags sv_cmp_locale_flags sv_eq_flags sv_collxfrm_flags In some of these cases, the non-_flags functions have been replaced with wrappers around the new functions. =head3 pv/pvs/sv versions of existing functions Many functions ending with pvn now have equivalent pv/pvs/sv versions. =head3 List op-building functions List op-building functions have been added to the API. See L, L, and L in L. =head3 C The L macro, part of op building that constructs the execution-order op chain, has been added to the API. =head3 Localisation functions The C, C, C and C functions have been added to the API. =head3 Stash names A stash can now have a list of effective names in addition to its usual name. The first effective name can be accessed via the C macro, which is now the recommended name to use in MRO linearisations (C being a fallback if there is no C). These names are added and deleted via C and C. These two functions are I part of the API. =head3 New functions for finding and removing magic The L|perlapi/mg_findext> and L|perlapi/sv_unmagicext> functions have been added to the API. They allow extension authors to find and remove magic attached to scalars based on both the magic type and the magic virtual table, similar to how C attaches magic of a certain type and with a given virtual table to a scalar. This eliminates the need for extensions to walk the list of C pointers of an C to find the magic that belongs to them. =head3 C This function returns the SV representing C<$_>, whether it's lexical or dynamic. =head3 C C is short-hand for C. =head3 C define The C define has been added to provide the best-guess incantation to use for static inline functions, if the C compiler supports C99-style static inline. If it doesn't, it'll give a plain C. C can be used to check if the compiler actually supports inline functions. =head3 New C option for hexadecimal escapes A new option, C, has been added to C to dump all characters above ASCII in hexadecimal. Before, one could get all characters as hexadecimal or the Latin1 non-ASCII as octal. =head3 C C has been added to the API, but is considered experimental. =head3 C and C The C and C functions have been added to the API, but are considered experimental. =head2 C API Changes =head3 C has been removed The option to define C to expose older 5.005 symbols for backwards compatibility has been removed. It's use was always discouraged, and MakeMaker contains a more specific escape hatch: perl Makefile.PL POLLUTE=1 This can be used for modules that have not been upgraded to 5.6 naming conventions (and really should be completely obsolete by now). =head3 Check API compatibility when loading XS modules When perl's API changes in incompatible ways (which usually happens between major releases), XS modules compiled for previous versions of perl will not work anymore. They will need to be recompiled against the new perl. In order to ensure that modules are recompiled, and to prevent users from accidentally loading modules compiled for old perls into newer ones, the C macro has been added. That macro, which is called when loading every newly compiled extension, compares the API version of the running perl with the version a module has been compiled for and raises an exception if they don't match. =head3 Perl_fetch_cop_label The first argument of the C API function C has changed from C to C, to insulate the user from implementation details. This API function was marked as "may change", and likely isn't in use outside the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other references to it.) =head3 GvCV() and GvGP() are no longer lvalues The new GvCV_set() and GvGP_set() macros are now provided to replace assignment to those two macros. This allows a future commit to eliminate some backref magic between GV and CVs, which will require complete control over assignment to the gp_cv slot. =head3 CvGV() is no longer an lvalue Under some circumstances, the C field of a CV is now reference-counted. To ensure consistent behaviour, direct assignment to it, for example C is now a compile-time error. A new macro, C has been introduced to perform this operation safely. Note that modification of this field is not part of the public API, regardless of this new macro (and despite its being listed in this section). =head3 CvSTASH() is no longer an lvalue The C macro can now only be used as an rvalue. C has been added to replace assignment to C. This is to ensure that backreferences are handled properly. These macros are not part of the API. =head3 Calling conventions for C and C The way the parser handles labels has been cleaned up and refactored. As a result, the C constructor function no longer takes a parameter stating what label is to go in the state op. The C and C functions no longer accept a line number as a parameter. =head3 Flags passed to C and C Some of the flags parameters to uvuni_to_utf8_flags() and utf8n_to_uvuni() have changed. This is a result of Perl's now allowing internal storage and manipulation of code points that are problematic in some situations. Hence, the default actions for these functions has been complemented to allow these code points. The new flags are documented in L. Code that requires the problematic code points to be rejected needs to change to use the new flags. Some flag names are retained for backward source compatibility, though they do nothing, as they are now the default. However the flags C, C, C, and C have been removed, as they stem from a fundamentally broken model of how the Unicode non-character code points should be handled, which is now described in L. See also L. XXX Which bugs in particular? Selected Bug Fixes is too long for this link to be meaningful right now I don't see the bugs in that section currently -- khw =head2 Deprecated C APIs =over =item C C is no longer part of Perl's public API. Calling it now generates a deprecation warning, and it will be removed in a future release. =item C The C API function is now deprecated. Searches suggest that nothing on CPAN is using it, so this should have zero impact. It attempted to provide an API to compile code down to an optree, but failed to bind correctly to lexicals in the enclosing scope. It's not possible to fix this problem within the constraints of its parameters and return value. =item C The C function has been deprecated. It appeared that its design was insufficient for reliably getting the lexical C<$_> at run-time. Use the new C function or the C macro instead. They directly return the right SV representing C<$_>, whether it's lexical or dynamic. =item C and C Those are left from an old implementation of C using C++ objects, which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so they shouldn't be used anymore. For compatibility, they are still defined for external C code. Only extensions defining C must be updated now. =back =head2 Other Internal Changes =head3 Stack unwinding The protocol for unwinding the C stack at the last stage of a C has changed how it identifies the target stack frame. This now uses a separate variable C, where previously it relied on the C pointer in the C context frame that has nominally just been discarded. This change means that code running during various stages of Perl-level unwinding no longer needs to take care to avoid destroying the ghost frame. =head3 Scope stack entries The format of entries on the scope stack has been changed, resulting in a reduction of memory usage of about 10%. In particular, the memory used by the scope stack to record each active lexical variable has been halved. =head3 Memory allocation for pointer tables Memory allocation for pointer tables has been changed. Previously C allocated memory from the same arena system as C bodies and Cs, with freed memory remaining bound to those arenas until interpreter exit. Now it allocates memory from arenas private to the specific pointer table, and that memory is returned to the system when C is called. Additionally, allocation and release are both less CPU intensive. =head3 C The C macro now calls C. C is now a noop but should still be used to ensure past and future compatibility. =head3 String comparison routines renamed The ibcmp_* functions have been renamed and are now called foldEQ, foldEQ_locale and foldEQ_utf8. The old names are still available as macros. =head3 C and C implementations merged The opcode bodies for C and C and for C and C have been merged. The implementation functions C and C, never part of the public API, have been merged and moved to a static function in F. This shrinks the perl binary slightly, and should not affect any code outside the core (unless it is relying on the order of side effects when C is passed a I of values). =head1 Selected Bug Fixes =head2 I/O =over 4 =item * Perl no longer produces this warning: $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"' Use of uninitialized value in binmode at -e line 1. =item * Opening a glob reference via C<< open $fh, "E", \*glob >> will no longer cause the glob to be corrupted when the filehandle is printed to. This would cause perl to crash whenever the glob's contents were accessed [perl #77492]. =item * PerlIO no longer crashes when called recursively, e.g., from a signal handler. Now it just leaks memory [perl #75556]. =item * Most I/O functions were not warning for unopened handles unless the 'closed' and 'unopened' warnings categories were both enabled. Now only C is necessary to trigger these warnings (as was always meant to be the case). =item * There have been several fixes to PerlIO layers: When C pushes the C<:crlf> layer on top of the stack, it no longer enables crlf layers lower in the stack, to avoid unexpected results [perl #38456]. Opening a file in C<:raw> mode now does what it advertises to do (first open the file, then binmode it), instead of simply leaving off the top layer [perl #80764]. The three layers C<:pop>, C<:utf8> and C<:bytes> didn't allow stacking when opening a file. For example this: open FH, '>:pop:perlio', 'some.file' or die $!; Would throw an error: "Invalid argument". This has been fixed in this release [perl #82484]. =back =head2 Regular Expression Bug Fixes =over =item * The regular expression engine no longer loops when matching C<"\N{LATIN SMALL LIGATURE FF}" =~ /f+/i> and similar expressions [perl #72998] (5.12.1). =item * The trie runtime code should no longer allocate massive amounts of memory, fixing #74484. =item * Syntax errors in C<< (?{...}) >> blocks no longer cause panic messages [perl #2353]. =item * A pattern like C<(?:(o){2})?> no longer causes a "panic" error [perl #39233]. =item * A fatal error in regular expressions containing C<(.*?)> when processing UTF-8 data has been fixed [perl #75680] (5.12.2). =item * An erroneous regular expression engine optimisation that caused regex verbs like C<*COMMIT> sometimes to be ignored has been removed. =item * The regular expression bracketed character class C<[\8\9]> was effectively the same as C<[89\000]>, incorrectly matching a NULL character. It also gave incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are unrecognized escape sequences, passed-through. =item * A regular expression match in the right-hand side of a global substitution (C) that is in the same scope will no longer cause match variables to have the wrong values on subsequent iterations. This can happen when an array or hash subscript is interpolated in the right-hand side, as in C [perl #19078]. =item * Several cases in which characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match themselves or used to match both a character class and its complement have been fixed. For instance, U+00E2 could match both C<\w> and C<\W> [perl #78464] [perl #18281] [perl #60156]. =item * Matching a Unicode character against an alternation containing characters that happened to match continuation bytes in the former's UTF8 representation (C) would cause erroneous warnings [perl #70998]. =item * The trie optimisation was not taking empty groups into account, preventing 'foo' from matching C [perl #78356]. =item * A pattern containing a C<+> inside a lookahead would sometimes cause an incorrect match failure in a global match (e.g., C) [perl #68564]. =item * A regular expression optimisation would sometimes cause a match with a C<{n,m}> quantifier to fail when it should match [perl #79152]. =item * Case insensitive matching in regular expressions compiled under C now works much more sanely when the pattern or target string is encoded internally in UTF8. Previously, under these conditions the localeness was completely lost. Now, code points above 255 are treated as Unicode, but code points between 0 and 255 are treated using the current locale rules, regardless of whether the pattern or the string is encoded in UTF8. The few case-insensitive matches that cross the 255/256 boundary are not allowed. For example, 0xFF does not caselessly match the character at 0x178, LATIN CAPITAL LETTER Y WITH DIAERESIS, because 0xFF may not be LATIN SMALL LETTER Y in the current locale, and Perl has no way of knowing if that character even exists in the locale, much less what code point it is. =item * The C<(?|...)> regular expression construct no longer crashes if the final branch has more sets of capturing parentheses than any other branch. This was fixed in Perl 5.10.1 for the case of a single branch, but that fix did not take multiple branches into account [perl #84746]. =item * A bug has been fixed in the implementation of C<{...}> quantifiers in regular expressions that prevented the code block in C from seeing the C<$2> sometimes [perl #84294]. =back =head2 Syntax/Parsing Bugs =over =item * C no longer crashes, but produces a syntax error [perl #74114] (5.12.1). =item * A label right before a string eval (C) no longer causes the label to be associated also with the first statement inside the eval [perl #74290] (5.12.1). =item * The C form of C no longer tries to turn on features or pragmata (i.e., strict) [perl #70075] (5.12.2). =item * C now behaves as documented, rather than behaving identically to C. Previously, C in a C block was erroneously executing the C and C behaviour, which only C was documented to provide [perl #69050]. =item * A regression introduced in Perl 5.12.0, making C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been fixed. C<$x> will now be C [perl #85508] (5.12.2). =item * When strict 'refs' mode is off, C<%{...}> in rvalue context returns C if its argument is undefined. An optimisation introduced in perl 5.12.0 to make C faster when used as a boolean did not take this into account, causing C (and C when C<$foo> is undefined) to be an error, which it should only be in strict mode [perl #81750]. =item * Constant-folding used to cause $text =~ ( 1 ? /phoo/ : /bear/) to turn into $text =~ /phoo/ at compile time. Now it correctly matches against C<$_> [perl #20444]. =item * Parsing Perl code (either with string C or by loading modules) from within a C block no longer causes the interpreter to crash [perl #70614]. =item * String evals no longer fail after 2 billion scopes have been compiled [perl #83364]. =item * The parser no longer hangs when encountering certain Unicode characters, such as U+387 [perl #74022]. =item * Several contexts no longer allow a Unicode character to begin a word that should never begin words, for an example an accent that must follow another character previously could precede all other characters. =item * Defining a constant with the same name as one of perl's special blocks (e.g., INIT) stopped working in 5.12.0, but has now been fixed [perl #78634]. =item * A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used to be stringified, even if the hash was tied [perl #79178]. =item * A closure containing an C statement followed by a constant or variable is no longer treated as a constant [perl #63540]. =item * C can now be used with attributes. It used to mean the same thing as C if attributes were present [perl #68658]. =item * Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in the "Use of uninitialized value in numeric gt" warning when C<$a> is undefined (since it is not part of the C> expression, but the operand of the C<@>) [perl #72090]. =item * Accessing an element of a package array with a hard-coded number (as opposed to an arbitrary expression) would crash if the array did not exist. Usually the array would be autovivified during compilation, but typeglob manipulation could remove it, as in these two cases which used to crash: *d = *a; print $d[0]; undef *d; print $d[0]; =item * The C<-C> command line option, when used on the shebang line, can now be followed by other options [perl #72434]. =item * The C module was returning Cs instead of Cs for C [perl #80622]. This was due to a bug in the perl core, not in C itself. =back =head2 Stashes, Globs and Method Lookup Perl 5.10.0 introduced a new internal mechanism for caching MROs (method resolution orders, or lists of parent classes; aka "isa" caches) to make method lookup faster (so @ISA arrays would not have to be searched repeatedly). Unfortunately, this brought with it quite a few bugs. Almost all of these have been fixed now, along with a few MRO-related bugs that existed before 5.10.0: =over =item * The following used to have erratic effects on method resolution, because the "isa" caches were not reset or otherwise ended up listing the wrong classes. These have been fixed. =over =item Aliasing packages by assigning to globs [perl #77358] =item Deleting packages by deleting their containing stash elements =item Undefining the glob containing a package (C) =item Undefining an ISA glob (C) =item Deleting an ISA stash element (C) =item Sharing @ISA arrays between classes (via C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA>) [perl #77238] =back C would even stop a new C<@Foo::ISA> array from updating caches. =item * Typeglob assignments would crash if the glob's stash no longer existed, so long as the glob assigned to was named 'ISA' or the glob on either side of the assignment contained a subroutine. =item * C, which is accessible to Perl via C is now updated properly when packages are deleted or removed from the C<@ISA> of other classes. This allows many packages to be created and deleted without causing a memory leak [perl #75176]. =back In addition, various other bugs related to typeglobs and stashes have been fixed: =over =item * Some work has been done on the internal pointers that link between symbol tables (stashes), typeglobs and subroutines. This has the effect that various edge cases related to deleting stashes or stash entries (e.g. <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no longer crash the interpreter. =item * Assigning a reference to a glob copy now assigns to a glob slot instead of overwriting the glob with a scalar [perl #1804] [perl #77508]. =item * A bug when replacing the glob of a loop variable within the loop has been fixed [perl #21469]. This means the following code will no longer crash: for $x (...) { *x = *y; } =item * Assigning a glob to a PVLV used to convert it to a plain string. Now it works correctly, and a PVLV can hold a glob. This would happen when a nonexistent hash or array element was passed to a subroutine: sub { $_[0] = *foo }->($hash{key}); # $_[0] would have been the string "*main::foo" It also happened when a glob was assigned to, or returned from, an element of a tied array or hash [perl #36051]. =item * When trying to report C, crashes could occur if the glob holding the global variable in question had been detached from its original stash by, for example, C. This has been fixed by disabling the reporting of variable names in those cases. =item * During the restoration of a localised typeglob on scope exit, any destructors called as a result would be able to see the typeglob in an inconsistent state, containing freed entries, which could result in a crash. This would affect code like this: local *@; eval { die bless [] }; # puts an object in $@ sub DESTROY { local $@; # boom } Now the glob entries are cleared before any destructors are called. This also means that destructors can vivify entries in the glob. So perl tries again and, if the entries are re-created too many times, dies with a 'panic: gp_free...' error message. =back =head2 Unicode =over =item * What has become known as the "Unicode Bug" is almost completely resolved in this release. Under C (which is automatically selected by C and above), the internal storage format of a string no longer affects the external semantics. [perl #58182]. There are two known exceptions: =over =item 1 The now-deprecated user-defined case changing functions require utf8-encoded strings to function. The CPAN module L has been written to replace this feature, without its drawacks, and the feature is scheduled to be removed in 5.16 =item 2 C (and its in-line equivalent C<\Q>) also can give different results if a string is encoded in UTF-8 or not. See L. =back =item * The handling of Unicode non-character code points has changed. Previously they were mostly considered illegal, except that only one of the 66 of them was known about in places. The Unicode standard considers them legal, but forbids the "open interchange" of them. This is part of the change to allow the internal use of any code point (see L). Together, these changes resolve [perl #38722], [perl #51918], [perl #51936], [perl #63446]. =item * Case-insensitive C<"/i"> regular expression matching of Unicode characters which match multiple characters now works much more as intended. For example "\N{LATIN SMALL LIGATURE FFI}" =~ /ffi/ui and "ffi" =~ /\N{LATIN SMALL LIGATURE FFI}/ui are both true. Previously, there were many bugs with this feature. What hasn't been fixed are the places where the pattern contains the multiple characters, but the characters are split up by other things, such as in "\N{LATIN SMALL LIGATURE FFI}" =~ /(f)(f)i/ui or "\N{LATIN SMALL LIGATURE FFI}" =~ /ffi*/ui or "\N{LATIN SMALL LIGATURE FFI}" =~ /[a-f][f-m][g-z]/ui None of these match. Also, this matching doesn't fully conform to the current Unicode standard, which asks that the matching be made upon the NFD (Normalization Form .ecomposed) of the text. However, as of this writing, March 2010, the Unicode standard is currently in flux about what they will recommend doing with regard to such cases. It may be that they will throw out the whole concept of multi-character matches. [perl #71736]. =item * Naming a deprecated character in \N{...} no longer leaks memory. =item * We fixed a bug that could cause \N{} constructs followed by a single . to be parsed incorrectly [perl #74978] (5.12.1). =item * C now correctly handles characters above "\x{7fffffff}" [perl #73246]. =item * Passing to C an offset beyond the end of the string when the string is encoded internally in UTF8 no longer causes panics [perl #75898]. =item * C and C now respect utf8-encoded scalars [perl #45549]. =item * Sometimes the UTF8 length cache would not be reset on a value returned by substr, causing C to give wrong answers. With C<${^UTF8CACHE}> set to -1, it would produce a 'panic' error message, too [perl #77692]. =back =head2 Ties, Overloading and Other Magic =over =item * Overloading now works properly in conjunction with tied variables. What formerly happened was that most ops checked their arguments for overloading I checking for magic, so for example an overloaded object returned by a tied array access would usually be treated as not overloaded [RT #57012]. =item * Various cases of magic (e.g., tie methods) being called on tied variables too many or too few times have been fixed: =over =item * FETCH is no longer called on tied variables in void context. =item * C<$tied-E()> did not always call FETCH [perl #8438]. =item * Filetest operators and C and C were calling FETCH too many times. =item * The C<=> operator used to ignore magic on its right-hand side if the scalar happened to hold a typeglob (if a typeglob was the last thing returned from or assigned to a tied scalar) [perl #77498]. =item * Dereference operators used to ignore magic if the argument was a reference already (e.g., from a previous FETCH) [perl #72144]. =item * C now calls set-magic (so changes made by C are respected by method calls) [perl #78400]. =item * In-memory files created by C' \$buffer> were not calling FETCH/STORE at all [perl #43789] (5.12.2). =back =item * String C now detects taintedness of overloaded or tied arguments [perl #75716]. =item * String C and regular expression matches against objects with string overloading no longer cause memory corruption or crashes [perl 77084]. =item * L now honors C<< <> >> overloading on tied arguments. =item * C<< EexprE >> always respects overloading now if the expression is overloaded. Due to the way that 'EE as glob' was parsed differently from 'EE as filehandle' from 5.6 onwards, something like C<< E$foo[0]E >> did not handle overloading, even if C<$foo[0]> was an overloaded object. This was contrary to the documentation for overload, and meant that C<< EE >> could not be used as a general overloaded iterator operator. =item * The fallback behaviour of overloading on binary operators was asymmetric [perl #71286]. =item * Magic applied to variables in the main package no longer affects other packages. See L above [perl #76138]. =item * Sometimes magic (ties, taintedness, etc.) attached to variables could cause an object to last longer than it should, or cause a crash if a tied variable were freed from within a tie method. These have been fixed [perl #81230]. =item * DESTROY methods of objects implementing ties are no longer able to crash by accessing the tied variable through a weak reference [perl #86328]. =item * Fixed a regression of kill() when a match variable is used for the process ID to kill [perl #75812]. =item * C<$AUTOLOAD> used to remain tainted forever if it ever became tainted. Now it is correctly untainted if an autoloaded method is called and the method name was not tainted. =item * C now dies when passed a tainted scalar for the format. It did already die for arbitrary expressions, but not for simple scalars [perl #82250]. =item * utf8::is_utf8 now respects get-magic (e.g. $1) (5.12.1). =back =head2 The Debugger =over =item * The Perl debugger now also works in taint mode [perl #76872]. =item * Subroutine redefinition works once more in the debugger [perl #48332]. =item * When C<-d> is used on the shebang (C<#!>) line, the debugger now has access to the lines of the main program. In the past, this sometimes worked and sometimes did not, depending on what order things happened to be arranged in memory [perl #71806]. =item * A possible memory leak when using L to set C<@DB::args> has been fixed (5.12.2). =item * Perl no longer stomps on $DB::single, $DB::trace and $DB::signal if they already have values when $^P is assigned to [perl #72422]. =item * C<#line> directives in string evals were not properly updating the arrays of lines of code (C<< @{"_<..."} >>) that the debugger (or any debugging or profiling module) uses. In threaded builds, they were not being updated at all. In non-threaded builds, the line number was ignored, so any change to the existing line number would cause the lines to be misnumbered [perl #79442]. =back =head2 Threads =over =item * Perl no longer accidentally clones lexicals in scope within active stack frames in the parent when creating a child thread [perl #73086]. =item * Several memory leaks in cloning and freeing threaded Perl interpreters have been fixed [perl #77352]. =item * Creating a new thread when directory handles were open used to cause a crash, because the handles were not cloned, but simply passed to the new thread, resulting in a double free. Now directory handles are cloned properly, on systems that have a C function. On other systems, new threads simply do not inherit directory handles from their parent threads [perl #75154]. =item * The typeglob C<*,>, which holds the scalar variable C<$,> (output field separator), had the wrong reference count in child threads. =item * [perl #78494] When pipes are shared between threads, the C function (and any implicit close, such as on thread exit) no longer blocks. =item * Perl now does a timely cleanup of SVs that are cloned into a new thread but then discovered to be orphaned (i.e., their owners are I cloned). This eliminates several "scalars leaked" warnings when joining threads. =back =head2 Scoping and Subroutines =over =item * Lvalue subroutines are again able to return copy-on-write scalars. This had been broken since version 5.10.0 [perl #75656] (5.12.3). =item * C no longer causes C to return the wrong file name for the scope that called C and other scopes higher up that had the same file name [perl #68712]. =item * C with a ($$)-prototyped comparison routine used to cause the value of @_ to leak out of the sort. Taking a reference to @_ within the sorting routine could cause a crash [perl #72334]. =item * Match variables (e.g., C<$1>) no longer persist between calls to a sort subroutine [perl #76026]. =item * Iterating with C over an array returned by an lvalue sub now works [perl #23790]. =item * C<$@> is now localised during calls to C to prevent action at a distance [perl #78844]. =item * Calling a closure prototype (what is passed to an attribute handler for a closure) now results in a "Closure prototype called" error message instead of a crash [perl #68560]. =item * Mentioning a read-only lexical variable from the enclosing scope in a string C no longer causes the variable to become writable [perl #19135]. =back =head2 Signals =over =item * Within signal handlers, C<$!> is now implicitly localized. =item * CHLD signals are no longer unblocked after a signal handler is called if they were blocked before by C [perl #82040]. =item * A signal handler called within a signal handler could cause leaks or double-frees. Now fixed. [perl #76248]. =back =head2 Miscellaneous Memory Leaks =over =item * Several memory leaks when loading XS modules were fixed (5.12.2). =item * L, L, L, and L could, when used in combination with lvalues, result in leaking the scalar value they operate on, and cause its destruction to happen too late. This has now been fixed. =item * The postincrement and postdecrement operators, C<++> and C<-->, used to cause leaks when being used on references. This has now been fixed. =item * Nested C and C blocks no longer leak memory when processing large lists [perl #48004]. =item * C> and C> no longer leak memory [perl #78436] [perl #69050]. =item * C<.=> followed by C<< <> >> or C would leak memory if C<$/> contained characters beyond the octet range and the scalar assigned to happened to be encoded as UTF8 internally [perl #72246]. =item * C no longer leaks memory on non-threaded builds. =back =head2 Memory Corruption and Crashes =over =item * glob() no longer crashes when %File::Glob:: is empty and CORE::GLOBAL::glob isn't present [perl #75464] (5.12.2). =item * readline() has been fixed when interrupted by signals so it no longer returns the "same thing" as before or random memory. =item * When assigning a list with duplicated keys to a hash, the assignment used to return garbage and/or freed values: @a = %h = (list with some duplicate keys); This has now been fixed [perl #31865]. =item * The mechanism for freeing objects in globs used to leave dangling pointers to freed SVs, meaning Perl users could see corrupted state during destruction. Perl now only frees the affected slots of the GV, rather than freeing the GV itself. This makes sure that there are no dangling refs or corrupted state during destruction. =item * The interpreter no longer crashes when freeing deeply-nested arrays of arrays. Hashes have not been fixed yet [perl #44225]. =item * Concatenating long strings under C no longer causes perl to crash [perl #78674]. =item * Calling C<< ->import >> on a class lacking an import method could corrupt the stack, resulting in strange behaviour. For instance, push @a, "foo", $b = bar->import; would assign 'foo' to C<$b> [perl #63790]. =item * The C function could crash when called with the MSG_TRUNC flag [perl #75082]. =item * C no longer crashes when passed a tainted format picture. It also taints C<$^A> now if its arguments are tainted [perl #79138]. =item * A bug in how we process filetest operations could cause a segfault. Filetests don't always expect an op on the stack, so we now use TOPs only if we're sure that we're not stat'ing the _ filehandle. This is indicated by OPf_KIDS (as checked in ck_ftst) [perl #74542] (5.12.1). =item * C now handles scalar context correctly for C<%32H> and C<%32u>, fixing a potential crash. C would crash because the third item on the stack wasn't the regular expression it expected. C would return both the unpacked result and the checksum on the stack, as would C [perl #73814] (5.12.2). =back =head2 Fixes to Various Perl Operators =over =item * The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments [perl #20661]. =item * Stringifying a scalar containing -0.0 no longer has the affect of turning false into true [perl #45133]. =item * Some numeric operators were converting integers to floating point, resulting in loss of precision on 64-bit platforms [perl #77456]. =item * C was ignoring locales when called with constant arguments [perl #78632]. =item * Combining the vector (%v) flag and dynamic precision would cause sprintf to confuse the order of its arguments, making it treat the string as the precision and vice versa [perl #83194]. =back =head2 Bugs Relating to the C API =over =item * The C-level C function would sometimes cause a spurious syntax error on the last line of the file if it lacked a final semicolon [perl #74006] (5.12.1). =item * The C and C C functions now set C<$@> correctly when there is a syntax error and no C flag, and never set it if the C flag is present [perl #3719]. =item * The XS multicall API no longer causes subroutines to lose reference counts if called via the multicall interface from within those very subroutines. This affects modules like List::Util. Calling one of its functions with an active subroutine as the first argument could cause a crash [perl #78070]. =item * The C function available to XS modules now calls magic before downgrading the SV, to avoid warnings about wide characters [perl #72398]. =item * The ref types in the typemap for XS bindings now support magical variables [perl #72684]. =item * C no longer calls C on its second argument (the source string) if the flags passed to it do not include SV_GMAGIC. So it now matches the documentation. =item * C no longer leaks memory. This fixes a memory leak in C [perl #73520]. =item * XSUB.h now correctly redefines fgets under PERL_IMPLICIT_SYS [perl #55049] (5.12.1). =item * XS code using C or C: on Windows could cause an error due to their arguments being swapped [perl #72704] (5.12.1). =item * A possible segfault in the C default typemap has been fixed (5.12.2). =item * A bug that could cause "Unknown error" messages when C is called from an XS destructor has been fixed (5.12.2). =back =head1 Known Problems XXX Many of these have probably already been solved. There are also unresolved BBC articles linked to #77718 that are awaiting CPAN releases. These may need to be listed here. See also #84444. Enbugger may also need to be listed if there is no new release in time (see #82152). JJORE/overload-eval-0.08.tar.gz appears to be broken, too. See http://www.nntp.perl.org/group/perl.perl5.porters/2010/11/msg165773.html =over 4 =item * C misbehaves in the presence of a lexical C<$_> (typically introduced by C or implicitly by C). The variable which gets set for each iteration is the package variable C<$_>, not the lexical C<$_>. A similar issue may occur in other modules that provide functions which take a block as their first argument, like foo { ... $_ ...} list See also: L =item * readline() returns an empty string instead of undef when it is interrupted by a signal =item * Test-Harness was updated from 3.17 to 3.21 for this release. A rewrite in how it handles non-Perl tests (in 3.17_01) broke argument passing to non-Perl tests with L (RT #59186), and required that non-Perl tests be run as C instead of C These issues are being solved upstream, but didn't make it into this release. They're expected to be fixed in time for perl v5.13.4. (RT #59457) =item * C now prevents object methods from being called as class methods (d808b68) =item * The changes in L broke C <= 3.66. A fixed C is available as versions 3.67 on CPAN. =item * The changes in prototype handling break C. A patch has been sent upstream and will hopefully appear on CPAN soon. =item * The upgrade to Encode-2.40 has caused some tests in the libwww-perl distribution on CPAN to fail. (Specifically, F tests 33-36 in version 5.836 of that distribution now fail.) =item * The upgrade to ExtUtils-MakeMaker-6.57_05 has caused some tests in the Module-Install distribution on CPAN to fail. (Specifically, F<02_mymeta.t> tests 5 and 21, F<18_all_from.t> tests 6 and 15, F<19_authors.t> tests 5, 13, 21 and 29, and F<20_authors_with_special_characters.t> tests 6, 15 and 23 in version 1.00 of that distribution now fail.) =back =head1 Errata =head2 C, C and C work on arrays You can now use the C, C, C builtin functions on arrays (previously you could only use them on hashes). See L for details. This is actually a change introduced in perl 5.12.0, but it was missed from that release's perldelta. =head1 Obituary Randy Kobes, creator of the kobesearch alternative to search.cpan.org and contributor/maintainer to several core Perl toolchain modules, passed away on September 18, 2010 after a battle with lung cancer. His contributions to the Perl community will be missed. =head1 Acknowledgements XXX The list of people to thank goes here. =head1 Reporting Bugs If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://rt.perl.org/perlbug/ . There may also be information at http://www.perl.org/ , the Perl Home Page. If you believe you have an unreported bug, please run the L program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of C, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN. =head1 SEE ALSO The F file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut