5 perldelta - what is new for perl v5.14.0
9 This document describes differences between the 5.12.0 release and
12 Some of the bug fixes in this release have been backported to subsequent
13 releases of 5.12.x. Those are indicated with the 5.12.x version in
16 XXX Go through the perl512*delta files and do that.
20 XXX Any important notices here
22 =head1 Core Enhancements
26 =head3 Unicode Version 6.0 is now supported (mostly)
28 Perl comes with the Unicode 6.0 data base updated with
29 L<Corrigendum #8|http://www.unicode.org/versions/corrigendum8.html>,
30 with one exception noted below.
31 See L<http://unicode.org/versions/Unicode6.0.0> for details on the new
32 release. Perl does not support any Unicode provisional properties,
33 including the new ones for this release, but their database files are
36 Unicode 6.0 has chosen to use the name C<BELL> for the character at U+1F514,
37 which is a symbol that looks like a bell, and is used in Japanese cell
38 phones. This conflicts with the long-standing Perl usage of having
39 C<BELL> mean the ASCII C<BEL> character, U+0007. In Perl 5.14,
40 C<\N{BELL}> will continue to mean U+0007, but its use will generate a
41 deprecated warning message, unless such warnings are turned off. The
42 new name for U+0007 in Perl will be C<ALERT>, which corresponds nicely
43 with the existing shorthand sequence for it, C<"\a">. C<\N{BEL}> will
44 mean U+0007, with no warning given. The character at U+1F514 will not
45 have a name in 5.14, but can be referred to by C<\N{U+1F514}>. The plan
46 is that in Perl 5.16, C<\N{BELL}> will refer to U+1F514, and so all code
47 that uses C<\N{BELL}> should convert by then to using C<\N{ALERT}>,
48 C<\N{BEL}>, or C<"\a"> instead.
50 =head3 Full functionality for C<use feature 'unicode_strings'>
52 This release provides full functionality for C<use feature
53 'unicode_strings'>. Under its scope, all string operations executed and
54 regular expressions compiled (even if executed outside its scope) have
55 Unicode semantics. See L<feature>.
57 This feature avoids most forms of the "Unicode Bug" (See
58 L<perlunicode/The "Unicode Bug"> for details.) If there is a
59 possibility that your code will process Unicode strings, you are
60 B<strongly> encouraged to use this subpragma to avoid nasty surprises.
62 =head3 C<\N{I<name>}> and C<charnames> enhancements
68 C<\N{}> and C<charnames::vianame> now know about the abbreviated
69 character names listed by Unicode, such as NBSP, SHY, LRO, ZWJ, etc., all
70 the customary abbreviations for the C0 and C1 control characters (such as
71 ACK, BEL, CAN, etc.), and a few new variants of some C1 full names that
76 Unicode has a number of named character sequences, in which particular sequences
77 of code points are given names. C<\N{...}> now recognizes these.
81 C<\N{}>, C<charnames::vianame>, C<charnames::viacode> now know about every
82 character in Unicode. Previously, they didn't know about the Hangul syllables
83 nor a number of CJK (Chinese/Japanese/Korean) characters.
87 In the past, it was ineffective to override one of Perl's abbreviations
88 with your own custom alias. Now it works.
92 You can also create a custom alias of the ordinal of a
93 character, known by C<\N{...}>, C<charnames::vianame()>, and
94 C<charnames::viacode()>. Previously, an alias had to be to an official
95 Unicode character name. This made it impossible to create an alias for
96 a code point that had no name, such as those reserved for private
101 A new function, C<charnames::string_vianame()>, has been added.
102 This function is a run-time version of C<\N{...}>, returning the string
103 of characters whose Unicode name is its parameter. It can handle
104 Unicode named character sequences, whereas the pre-existing
105 C<charnames::vianame()> cannot, as the latter returns a single code
110 See L<charnames> for details on all these changes.
112 =head3 Any unsigned value can be encoded as a character
114 With this release, Perl is adopting a model that any unsigned value can
115 be treated as a code point and encoded internally (as utf8) without
116 warnings -- not just the code points that are legal in Unicode.
117 However, unless utf8 warnings have been
118 explicitly lexically turned off, outputting or performing a
119 Unicode-defined operation (such as upper-casing) on such a code point
120 will generate a warning. Attempting to input these using strict rules
121 (such as with the C<:encoding('UTF-8')> layer) will continue to fail.
122 Prior to this release the handling was very inconsistent, and incorrect
123 in places. Also, the Unicode non-characters, some of which previously were
124 erroneously considered illegal in places by Perl, contrary to the Unicode
125 standard, are now always legal internally. But inputting or outputting
126 them will work the same as for the non-legal Unicode code points, as the
127 Unicode standard says they are illegal for "open interchange".
129 =head3 New warnings categories for problematic (non-)Unicode code points.
131 Three new warnings subcategories of "utf8" have been added. These
132 allow you to turn off some "utf8" warnings, while allowing
133 others warnings to remain on. The three categories are:
134 C<surrogate> when UTF-16 surrogates are encountered;
135 C<nonchar> when Unicode non-character code points are encountered;
136 and C<non_unicode> when code points that are above the legal Unicode
137 maximum of 0x10FFFF are encountered.
139 =head2 Regular Expressions
141 =head3 C<(?^...)> construct to signify default modifiers
143 An ASCII caret (also called a "circumflex accent") C<"^">
144 immediately following a C<"(?"> in a regular expression
145 now means that the subexpression does not inherit the
146 surrounding modifiers such as C</i>, but reverts to the
147 Perl defaults. Any modifiers following the caret override the defaults.
149 The stringification of regular expressions now uses this
150 notation. E.g., before, C<qr/hlagh/i> would be stringified as
151 C<(?i-xsm:hlagh)>, but now it's stringified as C<(?^i:hlagh)>.
153 The main purpose of this is to allow tests that rely on the
154 stringification not to have to change when new modifiers are added.
155 See L<perlre/Extended Patterns>.
157 =head3 C</d>, C</l>, C</u>, C</a>, and C</aa> modifiers
159 Four new regular expression modifiers have been added. These are mutually
160 exclusive; one only can be turned on at a time.
162 The C</l> modifier says to compile the regular expression as if it were
163 in the scope of C<use locale>, even if it is not.
165 The C</u> modifier says to compile the regular expression as if it were
166 in the scope of a C<use feature "unicode_strings"> pragma.
168 The C</d> (default) modifier is used to override any C<use locale> and
169 C<use feature "unicode_strings"> pragmas that are in effect at the time
170 of compiling the regular expression.
172 The C</a> regular expression modifier restricts C<\s>, C<\d> and C<\w> and
173 the Posix (C<[[:posix:]]>) character classes to the ASCII range. The
174 complements and C<\b> and C<\B> are correspondingly
175 affected. Otherwise, C</a> behaves like the C</u> modifier, in that
176 case-insensitive matching uses Unicode semantics.
178 The C</aa> modifier is like C</a>, except that, in case-insensitive matching, no ASCII character will match a
179 non-ASCII character. For example,
181 'k' =~ /\N{KELVIN SIGN}/ai
183 will match; it won't under C</aa>.
185 See L<perlre/Modifiers> for more detail.
187 =head3 Non-destructive substitution
189 The substitution (C<s///>) and transliteration
190 (C<y///>) operators now support an C</r> option that
191 copies the input variable, carries out the substitution on
192 the copy and returns the result. The original remains unmodified.
195 my $new = $old =~ s/cat/dog/r;
196 # $old is 'cat' and $new is 'dog'
198 This is particularly useful with C<map>. See L<perlop> for more examples.
200 =head3 Reentrant regular expression engine
202 It is now safe to use regular expressions within C<(?{...})> and
203 C<(??{...})> code blocks inside regular expressions.
205 These block are still experimental, however, and still have problems with
206 lexical (C<my>) variables and abnormal exiting.
208 =head3 C<use re '/flags';>
210 The C<re> pragma now has the ability to turn on regular expression flags
211 till the end of the lexical scope:
214 "foo" =~ / (.+) /; # /x implied
216 See L<re/"'/flags' mode"> for details.
218 =head3 \o{...} for octals
220 There is a new octal escape sequence, C<"\o">, in double-quote-like
221 contexts. This construct allows large octal ordinals beyond the
222 current max of 0777 to be represented. It also allows you to specify a
223 character in octal which can safely be concatenated with other regex
224 snippets and which won't be confused with being a backreference to
225 a regex capture group. See L<perlre/Capture groups>.
227 =head3 Add C<\p{Titlecase}> as a synonym for C<\p{Title}>
229 This synonym is added for symmetry with the Unicode property names
230 C<\p{Uppercase}> and C<\p{Lowercase}>.
232 =head3 Regular expression debugging output improvement
234 Regular expression debugging output (turned on by C<use re 'debug';>) now
235 uses hexadecimal when escaping non-ASCII characters, instead of octal.
237 =head2 Syntactical Enhancements
239 =head3 Array and hash container functions accept references
241 All built-in functions that operate directly on array or hash
242 containers now also accept hard references to arrays or hashes:
244 |----------------------------+---------------------------|
245 | Traditional syntax | Terse syntax |
246 |----------------------------+---------------------------|
247 | push @$arrayref, @stuff | push $arrayref, @stuff |
248 | unshift @$arrayref, @stuff | unshift $arrayref, @stuff |
249 | pop @$arrayref | pop $arrayref |
250 | shift @$arrayref | shift $arrayref |
251 | splice @$arrayref, 0, 2 | splice $arrayref, 0, 2 |
252 | keys %$hashref | keys $hashref |
253 | keys @$arrayref | keys $arrayref |
254 | values %$hashref | values $hashref |
255 | values @$arrayref | values $arrayref |
256 | ($k,$v) = each %$hashref | ($k,$v) = each $hashref |
257 | ($k,$v) = each @$arrayref | ($k,$v) = each $arrayref |
258 |----------------------------+---------------------------|
260 This allows these built-in functions to act on long dereferencing chains
261 or on the return value of subroutines without needing to wrap them in
264 push @{$obj->tags}, $new_tag; # old way
265 push $obj->tags, $new_tag; # new way
267 for ( keys %{$hoh->{genres}{artists}} ) {...} # old way
268 for ( keys $hoh->{genres}{artists} ) {...} # new way
270 For C<push>, C<unshift> and C<splice>, the reference will auto-vivify
271 if it is not defined, just as if it were wrapped with C<@{}>.
273 For C<keys>, C<values>, C<each>, when overloaded dereferencing is
274 present, the overloaded dereference is used instead of dereferencing the
275 underlying reftype. Warnings are issued about assumptions made in
278 =head3 Single term prototype
280 The C<+> prototype is a special alternative to C<$> that will act like
281 C<\[@%]> when given a literal array or hash variable, but will otherwise
282 force scalar context on the argument. See L<perlsub/Prototypes>.
284 =head3 C<package> block syntax
286 A package declaration can now contain a code block, in which case the
287 declaration is in scope only inside that block. So C<package Foo { ... }>
288 is precisely equivalent to C<{ package Foo; ... }>. It also works with
289 a version number in the declaration, as in C<package Foo 1.2 { ... }>.
292 =head3 Statement labels can appear in more places
294 Statement labels can now occur before any type of statement or declaration,
297 =head3 Stacked labels
299 Multiple statement labels can now appear before a single statement.
301 =head3 Uppercase X/B allowed in hexadecimal/binary literals
303 Literals may now use either upper case C<0X...> or C<0B...> prefixes,
304 in addition to the already supported C<0x...> and C<0b...>
305 syntax [perl #76296].
307 C, Ruby, Python and PHP already supported this syntax, and it makes
308 Perl more internally consistent. A round-trip with C<eval sprintf
309 "%#X", 0x10> now returns C<16>, the way C<eval sprintf "%#x", 0x10> does.
311 =head2 Exception Handling
313 Several changes have been made to the way C<die>, C<warn>, and C<$@>
314 behave, in order to make them more reliable and consistent.
316 When an exception is thrown inside an C<eval>, the exception is no
317 longer at risk of being clobbered by code running during unwinding
318 (e.g., destructors). Previously, the exception was written into C<$@>
319 early in the throwing process, and would be overwritten if C<eval> was
320 used internally in the destructor for an object that had to be freed
321 while exiting from the outer C<eval>. Now the exception is written
322 into C<$@> last thing before exiting the outer C<eval>, so the code
323 running immediately thereafter can rely on the value in C<$@> correctly
324 corresponding to that C<eval>. (C<$@> is still also set before exiting the
325 C<eval>, for the sake of destructors that rely on this.)
327 Likewise, a C<local $@> inside an C<eval> will no longer clobber any
328 exception thrown in its scope. Previously, the restoration of C<$@> upon
329 unwinding would overwrite any exception being thrown. Now the exception
330 gets to the C<eval> anyway. So C<local $@> is safe before a C<die>.
332 Exceptions thrown from object destructors no longer modify the C<$@>
333 of the surrounding context. (If the surrounding context was exception
334 unwinding, this used to be another way to clobber the exception being
335 thrown.) Previously such an exception was
336 sometimes emitted as a warning, and then either was
337 string-appended to the surrounding C<$@> or completely replaced the
338 surrounding C<$@>, depending on whether that exception and the surrounding
339 C<$@> were strings or objects. Now, an exception in this situation is
340 always emitted as a warning, leaving the surrounding C<$@> untouched.
341 In addition to object destructors, this also affects any function call
342 performed by XS code using the C<G_KEEPERR> flag.
344 Warnings for C<warn> can now be objects, in the same way as exceptions
345 for C<die>. If an object-based warning gets the default handling,
346 of writing to standard error, it is stringified as
347 before, with the file and line number appended. But
348 a C<$SIG{__WARN__}> handler will now receive an
349 object-based warning as an object, where previously it was passed the
350 result of stringifying the object.
352 =head2 Other Enhancements
354 =head3 Assignment to C<$0> sets the legacy process name with C<prctl()> on Linux
356 On Linux the legacy process name will be set with L<prctl(2)>, in
357 addition to altering the POSIX name via C<argv[0]> as perl has done
358 since version 4.000. Now system utilities that read the legacy process
359 name such as ps, top and killall will recognize the name you set when
360 assigning to C<$0>. The string you supply will be cut off at 16 bytes,
361 this is a limitation imposed by Linux.
363 =head3 C<srand()> now returns the seed
365 This allows programs that need to have repeatable results not to have to come
366 up with their own seed-generating mechanism. Instead, they can use C<srand()>
367 and stash the return value for future use. Typical is a test program which
368 has too many combinations to test comprehensively in the time available to it
369 each run. It can test a random subset each time and, should there be a failure,
370 log the seed used for that run so that it can later be used to reproduce the
373 =head3 printf-like functions understand post-1980 size modifiers
375 Perl's printf and sprintf operators, and Perl's internal printf replacement
376 function, now understand the C90 size modifiers "hh" (C<char>), "z"
377 (C<size_t>), and "t" (C<ptrdiff_t>). Also, when compiled with a C99
378 compiler, Perl now understands the size modifier "j" (C<intmax_t>).
380 So, for example, on any modern machine, C<sprintf('%hhd', 257)> returns '1'.
382 =head3 New global variable C<${^GLOBAL_PHASE}>
384 A new global variable, C<${^GLOBAL_PHASE}>, has been added to allow
385 introspection of the current phase of the perl interpreter. It's explained in
386 detail in L<perlvar/"${^GLOBAL_PHASE}"> and
387 L<perlmod/"BEGIN, UNITCHECK, CHECK, INIT and END">.
389 =head3 C<-d:-foo> calls C<Devel::foo::unimport>
391 The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
392 equivalent to C<-MDevel::foo=bar>, which expands
393 internally to C<use Devel::foo 'bar';>.
394 F<perl> now allows prefixing the module name with C<->, with the same
395 semantics as C<-M>, I<i.e.>
401 Equivalent to C<-M-Devel::foo>, expands to
402 C<no Devel::foo;>, calls C<< Devel::foo->unimport() >>
403 if the method exists.
407 Equivalent to C<-M-Devel::foo=bar>, expands to C<no Devel::foo 'bar';>,
408 calls C<< Devel::foo->unimport('bar') >> if the method exists.
412 This is particularly useful for suppressing the default actions of a
413 C<Devel::*> module's C<import> method whilst still loading it for debugging.
415 =head3 Filehandle method calls load L<IO::File> on demand
417 When a method call on a filehandle would die because the method cannot
418 be resolved, and L<IO::File> has not been loaded, Perl now loads L<IO::File>
419 via C<require> and attempts method resolution again:
421 open my $fh, ">", $file;
422 $fh->binmode(":raw"); # loads IO::File and succeeds
424 This also works for globs like STDOUT, STDERR and STDIN:
426 STDOUT->autoflush(1);
428 Because this on-demand load only happens if method resolution fails, the
429 legacy approach of manually loading an L<IO::File> parent class for partial
430 method support still works as expected:
433 open my $fh, ">", $file;
434 $fh->autoflush(1); # IO::File not loaded
436 =head3 DTrace probes now include package name
438 The DTrace probes now include an additional argument (C<arg3>) which contains
439 the package the subroutine being entered or left was compiled in.
441 For example using the following DTrace script:
443 perl$target:::sub-entry
445 printf("%s::%s\n", copyinstr(arg0), copyinstr(arg3));
450 perl -e'sub test { }; test'
458 =head2 User-defined regular expression properties
460 In L<perlunicode/"User-Defined Character Properties">, it says you can
461 create custom properties by defining subroutines whose names begin with
462 "In" or "Is". However, Perl did not actually enforce that naming
463 restriction, so \p{foo::bar} could call foo::bar() if it existed. Now this
464 convention has been enforced.
466 Also, Perl no longer allows a tainted regular expression to invoke a
467 user-defined. It simply dies instead [perl #82616].
469 =head1 Incompatible Changes
473 The backslash-c construct was designed as a way of specifying
474 non-printable characters, but there were no restrictions (on ASCII
475 platforms) on what the character following the C<c> could be. Now, that
476 character must be one of the ASCII characters.
478 =head2 localised tied hashes, arrays and scalars are no longed tied
485 # here, @a is a now a new, untied array
487 # here, @a refers again to the old, tied array
489 The new local array used to be made tied too, which was fairly pointless,
490 and has now been fixed. This fix could however potentially cause a change
491 in behaviour of some code.
493 =head2 C<given> return values
495 Starting from this release, C<given> blocks returns the last evaluated
496 expression, or an empty list if the block was exited by C<break>. Thus you
502 'integer' when /^[+-]?[0-9]+$/;
503 'float' when /^[+-]?[0-9]+(?:\.[0-9]+)?$/;
508 See L<perlsyn/Return value> for details.
510 =head2 localised tied scalars are tied again.
512 The change in behaviour in 5.13.1 of localising tied scalar values has
513 been reverted to the existing 5.12.0 and earlier behaviour (the change for
514 arrays and hashes remains).
516 =head2 Naming fixes in Policy_sh.SH may invalidate Policy.sh
518 Several long-standing typos and naming confusions in Policy_sh.SH have
519 been fixed, standardizing on the variable names used in config.sh.
521 This will change the behavior of Policy.sh if you happen to have been
522 accidentally relying on the Policy.sh incorrect behavior. We'd appreciate
523 feedback from anyone using Policy.sh to be sure nothing is broken by
524 this change (c1bd23).
526 =head2 Stashes are now always defined
528 C<defined %Foo::> now always returns true, even when no symbols have yet been
529 defined in that package.
531 This is a side effect of removing a special case kludge in the tokeniser,
532 added for 5.10.0, to hide side effects of changes to the internal storage of
533 hashes that to drastically reduce their memory usage overhead.
535 Calling defined on a stash has been deprecated since 5.6.0, warned on
536 lexicals since 5.6.0, and has warned for stashes (and other package
537 variables) since 5.12.0. C<defined %hash> has always exposed an
538 implementation detail - emptying a hash by deleting all entries from it does
539 not make C<defined %hash> false, hence C<defined %hash> is not valid code to
540 determine whether an arbitrary hash is empty. Instead, use the behaviour
541 that an empty C<%hash> always returns false in a scalar context.
545 Use of C<\400> - C<\777> in regexes in certain circumstances has given
546 different, anomalous behavior than their use in all other
547 double-quote-like contexts. Since 5.10.1, a deprecated warning message
548 has been raised when this happens. Now, all double-quote-like contexts
549 have the same behavior, namely to be equivalent to C<\x{100}> -
550 C<\x{1FF}>, with no deprecation warning. Use of these values in the
551 command line option C<"-0"> retains the current meaning to slurp input
552 files whole; previously, this was documented only for C<"-0777">. It is
553 recommended, however, because of various ambiguities, to use the new
554 C<\o{...}> construct to represent characters in octal.
557 =head2 Declare API incompatibility between blead releases
559 Only stable releases (5.10.x, 5.12.x, 5.14.x, ...) guarantee binary
560 compatibility with each other, while blead releases (5.13.x, 5.15.x, ...) often
561 break this compatibility. However, prior to perl 5.13.4, all blead releases had
562 the same C<PERL_API_REVISION>, C<PERL_API_VERSION>, and C<PERL_API_SUBVERSION>,
563 effectively declaring them as binary compatible, which they weren't. From now
564 on, blead releases will have a C<PERL_API_SUBVERSION> equal to their
565 C<PERL_SUBVERSION>, explicitly marking them as incompatible with each other.
567 Maintenance releases of stable perl versions will continue to make no
568 intentionally incompatible API changes.
570 =head2 Check API compatibility when loading XS modules
572 When perl's API changes in incompatible ways (which usually happens between
573 every major release), XS modules compiled for previous versions of perl will not
574 work anymore. They will need to be recompiled against the new perl.
576 In order to ensure that modules are recompiled, and to prevent users from
577 accidentally loading modules compiled for old perls into newer ones, the
578 C<XS_APIVERSION_BOOTCHECK> macro has been added. That macro, which is called
579 when loading every newly compiled extension, compares the API version of the
580 running perl with the version a module has been compiled for and raises an
581 exception if they don't match.
583 =head2 Binary Incompatible with all previous Perls
585 Some bit fields have been reordered; therefore, this release will not be binary
586 compatible with any previous Perl release.
588 =head2 Change in the parsing of certain prototypes
590 Functions declared with the following prototypes now behave correctly as unary
625 Due to this bug fix, functions using the C<(*)>, C<(;$)> and C<(;*)> prototypes
626 are parsed with higher precedence than before. So in the following example:
631 the second line is now parsed correctly as C<< foo($a) < $b >>, rather than
632 C<< foo($a < $b) >>. This happens when one of these operators is used in
633 an unparenthesised argument:
635 < > <= >= lt gt le ge
636 == != <=> eq ne cmp ~~
645 =head2 Magic variables outside the main package
647 In previous versions of Perl, magic variables like C<$!>, C<%SIG>, etc. would
648 'leak' into other packages. So C<%foo::SIG> could be used to access signals,
649 C<${"foo::!"}> (with strict mode off) to access C's C<errno>, etc.
651 This was a bug, or an 'unintentional' feature, which caused various ill effects,
652 such as signal handlers being wiped when modules were loaded, etc.
654 This has been fixed (or the feature has been removed, depending on how you see
657 =head2 Smart-matching against array slices
659 Previously, the following code resulted in a successful match:
665 This odd behaviour has now been fixed [perl #77468].
669 The first argument of the C API function C<Perl_fetch_cop_label> has changed
670 from C<struct refcounted he *> to C<COP *>, to better insulate the user from
671 implementation details.
673 This API function was marked as "may change", and likely isn't in use outside
674 the core. (Neither an unpacked CPAN, nor Google's codesearch, finds any other
677 =head2 Stringification of regexes has changed
679 Default regular expression modifiers are now notated by using
680 C<(?^...)>. Code relying on the old stringification will fail. The
681 purpose of this is so that when new modifiers are added, such code will
682 not have to change (after this one time), as the stringification will
683 automatically incorporate the new modifiers.
685 Code that needs to work properly with both old- and new-style regexes
686 can avoid the whole issue by using (for Perls since 5.9.5):
688 use re qw(regexp_pattern);
689 my ($pat, $mods) = regexp_pattern($re_ref);
691 where C<$re_ref> is a reference to a compiled regular expression. Upon
692 return, C<$mods> will be a string containing all the non-default
693 modifiers used when the regular expression was compiled, and C<$pattern>
696 If the actual stringification is important, or older Perls need to be
697 supported, you can use something like the following:
699 # Accept both old and new-style stringification
700 my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
702 And then use C<$modifiers> instead of C<-xism>.
704 =head2 Regular expressions retain their localeness when interpolated
706 Regular expressions compiled under C<"use locale"> now retain this when
707 interpolated into a new regular expression compiled outside a
708 C<"use locale">, and vice-versa.
710 Previously, a regular expression interpolated into another one inherited
711 the localeness of the surrounding one, losing whatever state it
712 originally had. This is considered a bug fix, but may trip up code that
713 has come to rely on the incorrect behavior.
715 =head2 Directory handles not copied to threads
717 On systems that do not have a C<fchdir> function, newly-created threads no
718 longer inherit directory handles from their parent threads. Such programs
719 would probably have crashed anyway [perl #75154].
721 =head2 Negation treats strings differently from before
723 The unary negation operator C<-> now treats strings that look like numbers
724 as numbers [perl #57706].
728 Negative zero (-0.0), when converted to a string, now becomes "0" on all
729 platforms. It used to become "-0" on some, but "0" on others.
731 If you still need to determine whether a zero is negative, use
732 C<sprintf("%g", $zero) =~ /^-/> or the L<Data::Float> module on CPAN.
734 =head2 Dereferencing typeglobs
736 If you assign a typeglob to a scalar variable:
740 the glob that is copied to C<$glob> is marked with a special flag
741 indicating that the glob is just a copy. This allows subsequent assignments
742 to C<$glob> to overwrite the glob. The original glob, however, is
745 Many Perl operators did not distinguish between these two types of globs.
746 This would result in strange behaviour in edge cases: C<untie $scalar>
747 would do nothing if the last thing assigned to the scalar was a glob
748 (because it treated it as C<untie *$scalar>, which unties a handle).
749 Assignment to a glob slot (e.g., C<(*$glob) = \@some_array>) would simply
750 assign C<\@some_array> to C<$glob>.
752 To fix this, the C<*{}> operator (including the C<*foo> and C<*$foo> forms)
753 has been modified to make a new immutable glob if its operand is a glob
754 copy. Various operators that make a distinction between globs and scalars
755 have been modified to treat only immutable globs as globs.
757 This causes an incompatible change in code that assigns a glob to the
758 return value of C<*{}> when that operator was passed a glob copy. Take the
759 following code, for instance:
764 The C<*$glob> on the second line returns a new immutable glob. That new
765 glob is made an alias to C<*bar>. Then it is discarded. So the second
766 assignment has no effect.
768 It also means that C<tie $handle> will now tie C<$handle> as a scalar, even
769 if it has had a glob assigned to it.
771 The upside to this incompatible change is that bugs [perl #77496],
772 [perl #77502], [perl #77508], [perl #77688], and [perl #77812],
773 and maybe others, too, have been fixed.
775 See L<http://rt.perl.org/rt3/Public/Bug/Display.html?id=77810> for even
778 =head2 Clearing stashes
780 Stash list assignment C<%foo:: = ()> used to make the stash anonymous
781 temporarily while it was being emptied. Consequently, any of its
782 subroutines referenced elsewhere would become anonymous (showing up as
783 "(unknown)" in C<caller>). Now they retain their package names, such that
784 C<caller> will return the original sub name if there is still a reference
785 to its typeglob, or "foo::__ANON__" otherwise [perl #79208].
787 =head2 C<:=> is now a syntax error
789 Previously C<my $pi := 4;> was exactly equivalent to C<my $pi : = 4;>,
790 with the C<:> being treated as the start of an attribute list, ending before
791 the C<=>. The use of C<:=> to mean C<: => was deprecated in 5.12.0, and is now
792 a syntax error. This will allow the future use of C<:=> as a new token.
794 We find no Perl 5 code on CPAN using this construction, outside the core's
795 tests for it, so we believe that this change will have very little impact on
796 real-world codebases.
798 If it is absolutely necessary to have empty attribute lists (for example,
799 because of a code generator) then avoid the error by adding a space before
802 =head2 Run-time code block in regular expressions
804 Code blocks in regular expressions (C<(?{...})> and C<(??{...})>) used not
805 to inherit any pragmata (strict, warnings, etc.) if the regular expression
806 was compiled at run time as happens in cases like these two:
809 $foo =~ $bar; # when $bar contains (?{...})
810 $foo =~ /$bar(?{ $finished = 1 })/;
812 This was a bug, which has now been fixed. But it has the potential to break
813 any code that was relying on this bug.
815 =head2 All objects are destroyed
817 It used to be possible to prevent a destructor from being called during
818 global destruction by artificially increasing the reference count of an
821 Now such objects I<will> will be destroyed, as a result of a bug fix
824 This has the potential to break some XS modules. (In fact, it break some.
825 See L</Known Problems>, below.)
827 =head2 Most C<\p{}> properties are now immune from case-insensitive matching
829 For most Unicode properties, it doesn't make sense to have them match
830 differently under C</i> case-insensitive matching than not. And doing
831 so leads to unexpected results and potential security holes. For
834 m/\p{ASCII_Hex_Digit}+/i
836 could previously match non-ASCII characters because of the Unicode
837 matching rules. There were a number of bugs in this feature until an
838 earlier release in the 5.13 series. Now this release reverts, and
839 removes the feature completely except for the few properties where
840 people have come to expect it, namely the ones where casing is an
841 integral part of their functionality, such as C<m/\p{Uppercase}/i> and
842 C<m/\p{Lowercase}/i>, both of which match the exact same code points,
843 namely those matched by C<m/\p{Cased}/i>. Details are in
844 L<perlrecharclass/Unicode Properties>.
846 User-defined property handlers that need to match differently under
847 C</i> must change to read the new boolean parameter passed it which is
848 non-zero if case-insensitive matching is in effect; 0 if not. See
849 L<perluniprops/User-Defined Character Properties>.
851 =head2 regex: \p{} in pattern implies Unicode semantics
853 Now, a Unicode property match specified in the pattern will indicate
854 that the pattern is meant for matching according to Unicode rules
857 =head2 add GvCV_set() and GvGP_set() macros and change GvGP()
859 This allows a future commit to eliminate some backref magic between GV
860 and CVs, which will require complete control over assignment to the
863 If you've been using GvGP() in lvalue context this change will break
864 your code, you should use GvGP_set() instead. (c43ae56)
866 =head2 _swash_inversion_hash is no longer exported as part of the API
868 This function shouldn't be called from XS code. (4c2e113)
870 =head2 Unreferenced objects in global destruction
872 The fix for [perl #36347], which made sure that destructors were called on
873 unreferenced objects, broke the tests for three CPAN modules, which
874 apparently rely on the bug.
876 To provide more time for fixing them (as this is such a minor bug), we
877 have reverted the fix until after perl 5.14.0.
879 This resolves [perl #82542] and other related tickets.
881 =head2 C<close> on shared pipes
883 The C<close> function no longer waits for the child process to exit if the
884 underlying file descriptor is still in use by another thread, to avoid
885 deadlocks. It returns true in such cases.
887 =head2 Passing references to warn()
889 An earlier Perl 5.13.x release changed C<warn($ref)> to leave the reference
890 unchanged, allowing C<$SIG{__WARN__}> handlers to access the original
891 reference. But this stopped warnings that were references from having the
892 file and line number appended even when there was no C<$SIG{__WARN__}>
895 Now C<warn> checks for the presence of such a handler and, if there is
896 none, proceeds to stringify the reference and append the file and line
897 number. This allows simple uses of C<warn> for debugging to continue to
898 work as they did before.
902 The following items are now deprecated.
906 =item C<Perl_ptr_table_clear>
908 C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it now
909 generates a deprecation warning, and it will be removed in a future
914 Omitting a space between a regex pattern or pattern modifiers and the following
915 word is deprecated. For example, C<< m/foo/sand $bar >> will still be parsed
916 as C<< m/foo/s and $bar >> but will issue a warning.
920 =head2 Omitting a space between a regular expression and subsequent word
922 Omitting a space between a regex pattern or pattern modifiers and the
923 following word is deprecated. Deprecation for regular expression
924 I<matches> was added in Perl 5.13.2. In this release, the deprecation
925 is extended to regular expression I<substitutions>. For example,
926 C<< s/foo/bar/sand $bar >> will still be parsed as
927 C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66)
929 =head2 Deprecation warning added for deprecated-in-core .pl libs
931 This is a mandatory warning, not obeying -X or lexical warning bits.
932 The warning is modelled on that supplied by deprecate.pm for
933 deprecated-in-core .pm libraries. It points to the specific CPAN
934 distribution that contains the .pl libraries. The CPAN version, of
935 course, does not generate the warning. (0111154)
937 =head2 List assignment to C<$[>
939 After assignment to C<$[> has been deprecated and started to give warnings in
940 perl version 5.12.0, this version of perl also starts to emit a warning when
941 assigning to C<$[> in list context. This fixes an oversight in 5.12.0.
943 =head2 Use of qw(...) as parentheses
945 Historically the parser fooled itself into thinking that C<qw(...)> literals
946 were always enclosed in parentheses, and as a result you could sometimes omit
947 parentheses around them:
949 for $x qw(a b c) { ... }
951 The parser no longer lies to itself in this way. Wrap the list literal in
954 for $x (qw(a b c)) { ... }
956 =head2 C<\N{BELL}> is deprecated
958 This is because Unicode is using that name for a different character.
959 See L</Unicode Version 6.0 is now supported (mostly)> for more
962 =head2 C<?PATTERN?> is deprecated
964 C<?PATTERN?> (without the initial m) has been deprecated and now produces
965 a warning. This is to allow future use of C<?> in new operators.
966 The match-once functionality is still available in the form of C<m?PATTERN?>.
968 =head2 C<sv_compile_2op()> is now deprecated
970 The C<sv_compile_2op()> API function is now deprecated. Searches suggest
971 that nothing on CPAN is using it, so this should have zero impact.
973 It attempted to provide an API to compile code down to an optree, but failed
974 to bind correctly to lexicals in the enclosing scope. It's not possible to
975 fix this problem within the constraints of its parameters and return value.
977 =head2 Tie functions on scalars holding typeglobs
979 Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
980 acts on a file handle if the scalar happens to hold a typeglob.
982 This is a long-standing bug that will be removed in Perl 5.16, as
983 there is currently no way to tie the scalar itself when it holds
984 a typeglob, and no way to untie a scalar that has had a typeglob
987 This bug was fixed in 5.13.7 but, because of the breakage it caused, the
988 fix has been reverted. Now there is a deprecation warning whenever a tie
989 function is used on a handle without an explicit C<*>.
993 =item Deprecated Modules
995 The following modules will be removed from the core distribution in a
996 future release, and should be installed from CPAN instead. Distributions
997 on CPAN which require these should add them to their prerequisites. The
998 core versions of these modules warnings will issue a deprecation warning.
1000 If you ship a packaged version of Perl, either alone or as part of a
1001 larger system, then you should carefully consider the repercussions of
1002 core module deprecations. You may want to consider shipping your default
1003 build of Perl with packages for some or all deprecated modules which
1004 install into C<vendor> or C<site> perl library directories. This will
1005 inhibit the deprecation warnings.
1007 Alternatively, you may want to consider patching F<lib/deprecate.pm>
1008 to provide deprecation warnings specific to your packaging system
1009 or distribution of Perl, consistent with how your packaging system
1010 or distribution manages a staged transition from a release where the
1011 installation of a single package provides the given functionality, to
1012 a later release where the system administrator needs to know to install
1013 multiple packages to get that same functionality.
1015 You can silence these deprecation warnings by installing the modules
1016 in question from CPAN. To install the latest version of all of them,
1017 just install C<Task::Deprecations::5_14>.
1021 =item L<Devel::DProf>
1023 We strongly recommend that you install and used L<Devel::NYTProf> in
1024 preference, as it offers significantly improved profiling and reporting.
1030 =head2 User-defined case-mapping
1032 This feature is being deprecated due to its many issues, as documented in
1033 L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
1034 It is planned to remove this feature in Perl 5.16. A CPAN module
1035 providing improved functionality is being prepared for release by the
1038 =head1 Performance Enhancements
1040 =head2 "safe signals" optimization
1042 Signal dispatch has been moved from the runloop into control ops. This
1043 should give a few percent speed increase, and eliminates almost all of
1044 the speed penalty caused by the introduction of "safe signals" in
1045 5.8.0. Signals should still be dispatched within the same statement as
1046 they were previously - if this is not the case, or it is possible to
1047 create uninterruptible loops, this is a bug, and reports are encouraged
1048 of how to recreate such issues.
1050 =head2 Optimization of shift; and pop; calls without arguments
1052 Additional two OPs are not added anymore into op tree for shift and pop
1053 calls without argument (when it works on C<@_>). Makes C<shift;> 5%
1054 faster over C<shift @_;> on not threaded perl and 25% faster on threaded.
1056 =head2 Adjacent pairs of nextstate opcodes are now optimized away
1058 Previously, in code such as
1060 use constant DEBUG => 0;
1067 the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), but
1068 the C<nextstate> op would remain, resulting in a runtime op dispatch of
1069 C<nextstate>, C<nextstate>, ...
1071 The execution of a sequence of C<nextstate> ops is indistinguishable from just
1072 the last C<nextstate> op so the peephole optimizer now eliminates the first of
1073 a pair of C<nextstate> ops, except where the first carries a label, since labels
1074 must not be eliminated by the optimizer and label usage isn't conclusively known
1077 =head2 blah blah blah
1079 Only allocate entries for @_ on demand - this not only saves memory per
1080 subroutine defined but should hopefully improve COW behaviour (77bac2).
1082 =head2 Multiple small improvements to threads
1084 The internal structures of threading now make fewer API calls and fewer
1085 allocations, resulting in noticeably smaller object code. Additionally,
1086 many thread context checks have been deferred so that they're only done
1087 when required (although this is only possible for non-debugging builds).
1089 =head2 Size optimisations to SV and HV structures
1091 xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and
1092 on some systems will cause struct xpvhv to become cache aligned. To avoid
1093 this memory saving causing a slowdown elsewhere, boolean use of HvFILL
1094 now calls HvTOTALKEYS instead (which is equivalent) - so while the fill
1095 data when actually required is now calculated on demand, the cases when
1096 this needs to be done should be few and far between (f4431c .. fcd245).
1098 The order of structure elements in SV bodies has changed. Effectively,
1099 the NV slot has swapped location with STASH and MAGIC. As all access to
1100 SV members is via macros, this should be completely transparent. This
1101 change allows the space saving for PVHVs documented above, and may reduce
1102 the memory allocation needed for PVIVs on some architectures.
1104 =head2 Optimisation of regexp engine string comparison work
1106 The foldEQ_utf8 API function for case-insensitive comparison of strings (which
1107 is used heavily by the regexp engine) was substantially refactored and
1108 optimised - and its documentation much improved as a free bonus gift
1111 =head2 Memory consumption improvements to Exporter
1113 The @EXPORT_FAIL AV is no longer created unless required, hence neither is
1114 the typeglob backing it - this saves about 200 bytes per Exporter using
1115 package that doesn't use this functionality.
1117 =head2 blah blah blah
1119 There are several small optimizations to reduce CPU cache misses in various very
1120 commonly used modules like C<warnings> and C<Carp> as well in accessing
1121 file-handles for reading. (5.13.3)
1123 XXX These need to be changed to =head2 entries, or the entries above need
1130 Make string appending 100 times faster
1132 When doing a lot of string appending, perl could end up allocating a lot more
1133 memory than needed in a very inefficient way, if perl was configured to use the
1134 system's C<malloc> implementation instead of its own.
1136 C<sv_grow>, which is what's being used to allocate more memory if necessary when
1137 appending to a string, has now been taught how to round up the memory it
1138 requests to a certain geometric progression, making it much faster on certain
1139 platforms and configurations. On Win32, it's now about 100 times faster.
1143 For weak references, the common case of just a single weak reference per
1144 referent has been optimised to reduce the storage required. In this case it
1145 saves the equivalent of one small perl array per referent.
1149 C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body
1150 they actually use, saving some space.
1154 Scalars containing regular expressions now only allocate the part of the C<SV>
1155 body they actually use, saving some space.
1159 Compiling regular expressions has been made faster for the case where upgrading
1160 the regex to utf8 is necessary but that isn't known when the compilation begins.
1164 The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl
1165 core. It has now been moved to an XS module, to reduce the overhead for
1166 programs that do not use C<%+> or C<%->.
1170 Eliminate C<PL_*> accessor functions under ithreads.
1172 When C<MULTIPLICITY> was first developed, and interpreter state moved into an
1173 interpreter struct, thread and interpreter local C<PL_*> variables were defined
1174 as macros that called accessor functions, returning the address of the value,
1175 outside of the perl core. The intent was to allow members within the interpreter
1176 struct to change size without breaking binary compatibility, so that bug fixes
1177 could be merged to a maintenance branch that necessitated such a size change.
1179 However, some non-core code defines C<PERL_CORE>, sometimes intentionally to
1180 bypass this mechanism for speed reasons, sometimes for other reasons but with
1181 the inadvertent side effect of bypassing this mechanism. As some of this code is
1182 widespread in production use, the result is that the core B<can't> change the
1183 size of members of the interpreter struct, as it will break such modules
1184 compiled against a previous release on that maintenance branch. The upshot is
1185 that this mechanism is redundant, and well-behaved code is penalised by
1186 it. Hence it can and should be removed.
1190 When an object has many weak references to it, freeing that object
1191 can under some some circumstances take O(N^2) time to free (where N is the
1192 number of references). The number of circumstances has been reduced
1197 An earlier optimisation to speed up C<my @array = ...> and
1198 C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
1200 Now we have found another way to speed up these assignments [perl #82110].
1204 =head1 Modules and Pragmata
1206 =head2 New Modules and Pragmata
1212 C<CPAN::Meta::YAML> 0.003 has been added as a dual-life module. It supports a
1213 subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files
1214 included with CPAN distributions or generated by the module installation
1215 toolchain. It should not be used for any other general YAML parsing or
1220 C<CPAN::Meta> version 2.110440 has been added as a dual-life module. It
1221 provides a standard library to read, interpret and write CPAN distribution
1222 metadata files (e.g. META.json and META.yml) which describes a
1223 distribution, its contents, and the requirements for building it and
1224 installing it. The latest CPAN distribution metadata specification is
1225 included as C<CPAN::Meta::Spec> and notes on changes in the specification
1226 over time are given in C<CPAN::Meta::History>.
1230 C<HTTP::Tiny> 0.010 has been added as a dual-life module. It is a very
1231 small, simple HTTP/1.1 client designed for simple GET requests and file
1232 mirroring. It has has been added to enable CPAN.pm and CPANPLUS to
1233 "bootstrap" HTTP access to CPAN using pure Perl without relying on external
1234 binaries like F<curl> or F<wget>.
1238 C<JSON::PP> 2.27105 has been added as a dual-life module, for the sake of
1239 reading F<META.json> files in CPAN distributions.
1243 C<Module::Metadata> 1.000003 has been added as a dual-life module. It gathers
1244 package and POD information from Perl module files. It is a standalone module
1245 based on Module::Build::ModuleInfo for use by other module installation
1246 toolchain components. Module::Build::ModuleInfo has been deprecated in
1247 favor of this module instead.
1251 C<Perl::OSType> 1.002 has been added as a dual-life module. It maps Perl
1252 operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic types
1253 with standardized names (e.g. "Unix" or "Windows"). It has been refactored
1254 out of Module::Build and ExtUtils::CBuilder and consolidates such mappings into
1255 a single location for easier maintenance.
1259 The following modules were added by the C<Unicode::Collate>
1260 upgrade. See below for details.
1262 C<Unicode::Collate::CJK::Big5>
1264 C<Unicode::Collate::CJK::GB2312>
1266 C<Unicode::Collate::CJK::JISX0208>
1268 C<Unicode::Collate::CJK::Korean>
1270 C<Unicode::Collate::CJK::Pinyin>
1272 C<Unicode::Collate::CJK::Stroke>
1276 C<Version::Requirements> version 0.101020 has been added as a dual-life
1277 module. It provides a standard library to model and manipulates module
1278 prerequisites and version constraints as defined in the L<CPAN::Meta::Spec>.
1282 =head2 Updated Modules and Pragmata
1288 XXX Where does this go in the list?
1290 Perl 4 C<.pl> libraries
1292 These historical libraries have been minimally modified to avoid using
1293 C<$[>. This is to prepare them for the deprecation of C<$[>.
1297 C<Archive::Extract> has been upgraded from version 0.38 to 0.48.
1299 Updates since 0.38 include: a safe print method that guards
1300 Archive::Extract from changes to $\; a fix to the tests when run in core
1301 perl; support for TZ files; and a modification for the lzma logic to favour
1302 IO::Uncompress::Unlzma
1304 Resolves an issue with NetBSD-current and its new unzip
1309 C<Archive::Tar> has been upgraded from version 1.54 to 1.76.
1311 Important changes since 1.54 include: compatibility with busybox
1312 implementations of tar; a fix so that C<write()> and C<create_archive()>
1313 close only handles they opened; and a bug was fixed regarding the exit code
1314 of extract_archive. (afabe0e)
1316 Among other things, the new version adds a new option to C<ptar> to allow safe
1317 creation of tarballs without world-writable files on Windows, allowing those
1318 archives to be uploaded to CPAN.
1320 This adds the ptargrep utility for using regular expressions against
1321 the contents of files in a tar archive.
1323 Skip extracting pax extended headers.
1327 C<autodie> has been upgraded from version 2.06_01 to 2.1001.
1331 C<B> has been upgraded from version 1.23 to 1.27.
1333 It no longer crashes when taking apart a C<y///> containing characters
1334 outside the octet range or compiled in a C<use utf8> scope.
1336 The size of the shared object has been reduced by about 40%, with no
1337 reduction in functionality.
1341 C<B::Concise> has been upgraded from version 0.78 to 0.82.
1343 B::Concise marks rv2sv, rv2av and rv2hv ops with the new OPpDEREF flag
1346 It no longer produces mangled output with the C<-tree> option
1351 C<B::Debug> has been upgraded from version 1.12 to 1.16.
1355 C<B::Deparse> has been upgraded from version 0.96 to 1.02.
1357 A bug has been fixed when deparsing a nextstate op that has both a
1358 change of package (relative to the previous nextstate), or a change of
1359 C<%^H> or other state, and a label. Previously the label was emitted
1360 first, leading to syntactically invalid output because a label is not
1361 permitted immediately before a package declaration, B<BEGIN> block,
1362 or some other things. Now the label is emitted last.
1364 The 'no 5.13.2' or similar form is now correctly handled by B::Deparse.
1366 B::Deparse now properly handles the code that applies a conditional
1367 pattern match against implicit C<$_> as it was fixed in [perl #20444].
1369 It fixes deparsing of C<our> followed by a variable with funny characters
1370 (as permitted under the C<utf8> pragma) [perl #33752].
1374 C<B::Lint> has been upgraded from version 1.11_01 to 1.12.
1378 C<base> has been upgraded from version 2.15 to 2.16.
1382 C<bignum> has been upgraded from version 0.23 to 0.25.
1386 C<blib> has been upgraded from version 1.04 to 1.06.
1390 C<Carp> has been upgraded from version 1.18 to 1.19.
1392 L<Carp> now detects incomplete L<caller()|perlfunc/"caller EXPR"> overrides and
1393 avoids using bogus C<@DB::args>. To provide backtraces, Carp relies on
1394 particular behaviour of the caller built-in. Carp now detects if other code has
1395 overridden this with an incomplete implementation, and modifies its backtrace
1396 accordingly. Previously incomplete overrides would cause incorrect values in
1397 backtraces (best case), or obscure fatal errors (worst case)
1399 This fixes certain cases of C<Bizarre copy of ARRAY> caused by modules
1400 overriding C<caller()> incorrectly.
1402 It now avoids using regular expressions that cause perl to
1403 load its Unicode tables, in order to avoid the 'BEGIN not safe after
1404 errors' error that will ensue if there has been a syntax error
1409 C<CGI> has been upgraded from version 3.48 to 3.51.
1411 This provides the following security fixes: the MIME boundary in
1412 multipart_init is now random and improvements to the handling of
1413 newlines embedded in header values.
1415 The documentation for param_fetch() has been corrected and clarified.
1419 C<charnames> has been upgraded from version 1.07 to 1.10.
1421 C<viacode()> is now significantly faster.
1425 C<Compress::Raw::Bzip2> has been upgraded from version 2.024 to 2.033.
1427 Updated to use bzip2 1.0.6
1431 C<Compress::Raw::Zlib> has been upgraded from version 2.024 to 2.033.
1435 C<Compress::Zlib> has been upgraded from version 2.024 to 2.027.
1439 C<CPAN> has been upgraded from version 1.94_56 to 1.94_63.
1443 =item * release 1.94_57
1445 =item * bugfix: treat modules correctly that are deprecated in perl 5.12.
1447 =item * bugfix: RT #57482 and #57788 revealed that configure_requires
1448 implicitly assumed build_requires instead of normal requires. (Reported
1449 by Andrew Whatson and Father Chrysostomos respectively)
1451 =item * testfix: solaris should run the tests without expect because (some?)
1452 solaris have a broken expect
1454 =item * testfix: run tests with cache_metadata off to prevent spill over
1455 effects from previous test runs
1459 Includes support for META.json and MYMETA.json.
1463 C<CPANPLUS> has been upgraded from version 0.90 to 0.9102.
1465 Fixed the shell test to skip if test is not being run under a terminal;
1466 resolved the issue where a prereq on Config would not be recognised as a
1469 Includes support for META.json and MYMETA.json and a change to
1470 using Digest::SHA for CPAN checksums.
1474 C<CPANPLUS::Dist::Build> has been upgraded from version 0.46 to 0.54.
1478 C<Cwd> has been upgraded from version 3.31 to 3.36.
1482 C<Data::Dumper> has been upgraded from version 2.125 to 2.130_02.
1484 The indentation used to be off when C<$Data::Dumper::Terse> was set. This
1485 has been fixed [perl #73604].
1487 This fixes a crash when using custom sort functions that might cause the stack
1490 C<Dumpxs> no longer crashes with globs returned by C<*$io_ref>
1495 C<DB_File> has been upgraded from version 1.820 to 1.821.
1499 C<deprecate> has been upgraded from version 0.01 to 0.02.
1503 C<Devel::DProf> has been upgraded from version 20080331.00 to 20110228.00.
1505 Merely loading C<Devel::DProf> now no longer triggers profiling to start.
1506 C<use Devel::DProf> and C<perl -d:DProf ...> still behave as before and start
1509 NOTE: C<Devel::DProf> is deprecated and will be removed from a future
1510 version of Perl. We strongly recommend that you install and use
1511 L<Devel::NYTProf> instead, as it offers significantly improved
1512 profiling and reporting.
1516 C<Devel::Peek> has been upgraded from version 1.04 to 1.06.
1520 C<Devel::SelfStubber> has been upgraded from version 1.03 to 1.05.
1524 C<diagnostics> has been upgraded from version 1.19 to 1.22.
1526 It now renders pod links slightly better, and has been taught to find
1527 descriptions for messages that share their descriptions with other
1532 C<Digest::MD5> has been upgraded from version 2.39 to 2.51.
1534 It is now safe to use this module in combination with threads.
1538 C<Digest::SHA> has been upgraded from version 5.47 to 5.61.
1540 C<shasum> now more closely mimics C<sha1sum>/C<md5sum>.
1542 C<Addfile> accepts all POSIX filenames.
1544 New SHA-512/224 and SHA-512/256 transforms ref. NIST Draft FIPS 180-4 (February 2011)
1548 C<Dumpvalue> has been upgraded from version 1.13 to 1.15.
1552 C<DynaLoader> has been upgraded from version 1.10 to 1.12.
1554 It fixes a buffer overflow when passed a very long file name.
1556 It no longer inherits from AutoLoader; hence it no longer
1557 produces weird error messages for unsuccessful method calls on classes that
1558 inherit from DynaLoader [perl #84358].
1562 C<Encode> has been upgraded from version 2.39 to 2.42.
1564 Now, all 66 Unicode non-characters are treated the same way U+FFFF has
1565 always been treated; if it was disallowed, all 66 are disallowed; if it
1566 warned, all 66 warn.
1570 C<Env> has been upgraded from version 1.01 to 1.02.
1574 C<Errno> has been upgraded from version 1.11 to 1.13.
1576 The implementation of C<Errno> has been refactored to use about 55% less memory.
1577 There should be no user-visible changes.
1579 On some platforms with unusual header files, like Win32/gcc using mingw64
1580 headers, some constants which weren't actually error numbers have been exposed
1581 by C<Errno>. This has been fixed [perl #77416].
1585 C<Exporter> has been upgraded from version 5.64_01 to 5.64_03.
1587 Exporter no longer overrides C<$SIG{__WARN__}> [perl #74472]
1591 C<ExtUtils::CBuilder> has been upgraded from 0.27 to 0.280201.
1593 Handle C and C++ compilers separately.
1595 Preserves exit status on VMS.
1599 C<ExtUtils::Command> has been upgraded from version 1.16 to 1.17.
1603 C<ExtUtils::Constant> has been upgraded from 0.22 to 0.23.
1605 The C<AUTOLOAD> helper code generated by C<ExtUtils::Constant::ProxySubs>
1606 can now C<croak> for missing constants, or generate a complete C<AUTOLOAD>
1607 subroutine in XS, allowing simplification of many modules that use it.
1608 (C<Fcntl>, C<File::Glob>, C<GDBM_File>, C<I18N::Langinfo>, C<POSIX>, C<Socket>)
1610 C<ExtUtils::Constant::ProxySubs> can now optionally push the names of all
1611 constants onto the package's C{@EXPORT_OK}. This has been used to replace
1612 less space-efficient code in C<B>, helping considerably shrink the size of its
1617 C<ExtUtils::Constant::Utils> has been upgraded from 0.02 to 0.03.
1619 Refactoring and fixing of backcompat code, preparing for resynchronisation
1624 C<ExtUtils::Embed> has been upgraded from 1.28 to 1.30.
1628 C<ExtUtils::MakeMaker> has been upgraded from version 6.56 to 6.57_05.
1632 C<ExtUtils::Manifest> has been upgraded from version 1.57 to 1.58.
1636 C<ExtUtils::ParseXS> has been upgraded from 2.21 to 2.2208.
1640 C<Fcntl> has been upgraded from 1.06 to 1.11.
1644 C<File::Copy> has been downgraded from version 2.17 to 2.21.
1646 An extra stanza was added explaining behaviours when the copy destination
1647 already exists and is a directory.
1651 C<File::DosGlob> has been upgraded from version 1.01 to 1.03.
1653 It allows patterns containing literal parentheses (they no longer need to
1654 be escaped). On Windows, it no longer adds an extra F<./> to the file names
1655 returned when the pattern is a relative glob with a drive specification,
1656 like F<c:*.pl> [perl #71712].
1660 C<File::Fetch> has been upgraded from version 0.24 to 0.32.
1662 C<HTTP::Lite> is now supported for 'http' scheme.
1664 The C<fetch> utility is supported on FreeBSD, NetBSD and
1665 Dragonfly BSD for the C<http> and C<ftp> schemes.
1669 C<File::Find> has been upgraded from version 1.15 to 1.18.
1671 It improves handling of backslashes on Windows, so that paths such as
1672 F<c:\dir\/file> are no longer generated [perl #71710].
1676 C<feature> has been upgraded from 1.16 to 1.19.
1678 Documentation and test updates for the C<unicode_strings> feature.
1679 See L</Full functionality for C<use feature 'unicode_strings'>>.
1683 C<File::CheckTree> has been upgraded from 4.4 to 4.41.
1687 C<File::Glob> has been upgraded from 1.07 to 1.11.
1691 C<File::stat> has been upgraded from 1.02 to 1.04.
1693 The C<-x> and C<-X> file test operators now work correctly under the root
1698 C<Filter::Simple> has been upgraded from version 0.84 to 0.85.
1702 C<GDBM_File> has been upgraded from 1.10 to 1.13.
1704 This fixes a memory leak when DBM filters are used.
1708 C<Hash::Util> has been upgraded from 0.07 to 0.10.
1710 Hash::Util now enables "no warnings 'uninitialized'" to suppress spurious
1711 warnings from undefined hash values (RT #74280).
1715 C<Hash::Util::FieldHash> has been upgraded from 1.04 to 1.07.
1719 C<I18N::Collate> has been upgraded from 1.01 to 1.02.
1723 C<I18N::Langinfo> has been upgraded from version 0.03 to 0.07.
1725 C<langinfo()> now defaults to using C<$_> if there is no argument given, just
1726 like the documentation always claimed it did.
1730 C<I18N::LangTags> has been upgraded from version 0.35 to 0.35_01.
1734 C<if> has been upgraded from version 0.05 to 0.0601.
1738 C<IO> has been upgraded from version 1.25_02 to 1.25_04.
1742 The IO-Compress distribution has been upgraded from version 2.024 to 2.033.
1746 C<IO::Select> has been upgraded from version 1.17 to 1.18.
1748 It now allows IO::Handle objects (and objects in derived classes) to be
1749 removed from an IO::Select set even if the underlying file descriptor is
1754 C<IO::Socket> has been upgraded from version 1.31 to 1.32.
1756 C<getsockopt> and C<setsockopt> are now documented.
1760 C<IPC::Cmd> has been upgraded from version 0.54 to 0.68.
1762 Resolves an issue with splitting Win32 command lines.
1766 C<IPC::Open3> has been upgraded from 1.05 to 1.08.
1768 C<open3> now produces an error if the C<exec> call fails, allowing this
1769 condition to be distinguished from a child process that exited with a
1770 non-zero status [perl #72016].
1772 The internal C<xclose> routine now knows how to handle file descriptors, as
1773 documented, so duplicating STDIN in a child process using its file
1774 descriptor now works [perl #76474].
1778 C<IPC::SysV> has been upgraded from version 2.01 to 2.03.
1782 C<lib> has been upgraded from version 0.62 to 0.63.
1786 The Locale-Codes distribution has been upgraded from version 2.07 to 3.16.
1788 Locale::Country, Locale::Language and Locale::Currency were updated from
1789 3.12 to 3.13 of the Locale-Codes distribution to include locale code changes.
1795 C<Locale::Maketext> has been upgraded from version 1.14 to 1.17.
1797 Locale::Maketext guts have been merged back into the main module
1798 and adds external cache support
1800 It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when
1801 working with tainted values (CPAN RT #40727).
1803 C<< ->maketext >> calls will now backup and restore C<$@> so that error
1804 messages are not suppressed (CPAN RT #34182).
1808 C<Log::Message> has been upgraded from version 0.02 to 0.04.
1812 C<Log::Message::Simple> has been upgraded from version 0.06 to 0.08.
1816 C<Math::BigInt> has been upgraded from version 1.89_01 to 1.994.
1818 This fixes, among other things, incorrect results when computing binomial
1819 coefficients [perl #77640].
1821 This prevents C<sqrt($int)> from crashing under C<use bigrat;>
1826 C<Math::BigInt::FastCalc> has been upgraded from version 0.19 to 0.28.
1830 C<Math::BigRat> has been upgraded from version 0.24 to 0.26_01.
1834 C<Memoize> has been upgraded from version 1.01_03 to 1.02.
1838 C<MIME::Base64> has been upgraded from 3.08 to 3.13.
1840 Includes new functions to calculate the length of encoded and decoded
1843 Now provides C<encode_base64url> and C<decode_base64url> functions to process
1844 the base64 scheme for "URL applications".
1848 C<Module::Build> has been upgraded from version 0.3603 to 0.3800.
1850 A notable change is the deprecation of several modules.
1851 Module::Build::Version has been deprecated and Module::Build now relies
1852 directly upon L<version>. Module::Build::ModuleInfo has been deprecated in
1853 favor of a standalone copy of it called L<Module::Metadata>.
1854 Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>.
1856 Module::Build now also generates META.json and MYMETA.json files
1857 in accordance with version 2 of the CPAN distribution metadata specification,
1858 L<CPAN::Meta::Spec>. The older format META.yml and MYMETA.yml files are
1859 still generated, as well.
1863 C<Module::CoreList> has been upgraded from version 2.29 to XXX.
1865 Besides listing the updated core modules of this release, it also stops listing
1866 the C<Filespec> module. That module never existed in core. The scripts
1867 generating C<Module::CoreList> confused it with C<VMS::Filespec>, which actually
1868 is a core module, since the time of perl 5.8.7.
1872 C<Module::Load> has been upgraded from version 0.16 to 0.18.
1876 C<Module::Load::Conditional> has been upgraded from version 0.34 to 0.40.
1880 C<Module::Metadata> has been upgraded from version 1.000003 to 1.000004.
1882 XXX This is not listed in corelist for 5.12.0. When was it added?
1886 C<mro> has been upgraded from version 1.02 to 1.06.
1888 C<next::method> I<et al.> now take into account that every class inherits
1889 from UNIVERSAL [perl #68654].
1893 C<NDBM_File> has been upgraded from 1.08 to 1.11.
1895 This fixes a memory leak when DBM filters are used.
1899 C<NEXT> has been upgraded from version 0.64 to 0.65.
1903 C<ODBM_File> has been upgraded from 1.08 to 1.09.
1905 This fixes a memory leak when DBM filters are used.
1909 C<Net::Ping> has been upgraded from 2.36 to 2.37.
1913 C<ODBM_File> has been upgraded from 1.07 to 1.10.
1917 C<Object::Accessor> has been upgraded from version 0.36 to 0.38.
1921 C<open> has been upgraded from version 1.07 to 1.08.
1925 C<Opcode> has been upgraded from 1.15 to 1.18.
1929 C<overload> has been upgraded from 1.11 to 1.12.
1931 C<overload::Method> can now handle subroutines that are themselves blessed
1932 into overloaded classes [perl #71998].
1934 Avoid a taint problem in use of sprintf.
1936 The documentation has greatly improved. See L</Documentation> below.
1940 C<Params::Check> has been upgraded from version 0.26 to 0.28.
1944 C<parent> has been upgraded from version 0.223 to 0.225.
1948 C<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401.
1950 The latest Parse::CPAN::Meta can now read YAML or JSON files using
1951 L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core.
1955 The PathTools distribution has been upgraded from version 3.31 to 3.34.
1957 Various issues in L<File::Spec::VMS> have been fixed. (5.13.4)
1961 C<PerlIO::encoding> has been upgraded from 0.12 to 0.14.
1965 C<PerlIO::scalar> has been upgraded from 0.07 to 0.11.
1967 A C<read> after a C<seek> beyond the end of the string no longer thinks it
1968 has data to read [perl #78716].
1972 C<PerlIO::via> has been upgraded from 0.09 to 0.11.
1976 The podlators distribution has been upgraded from version 2.3.1 to 2.4.0.
1980 C<Pod::LaTeX> has been upgraded from version 0.58 to 0.59.
1984 C<Pod::Simple> has been upgraded from 3.14 to 3.15
1986 Includes various fixes to C<HTML> and C<XHTML> handling.
1990 C<POSIX> has been upgraded from 1.19 to 1.23.
1992 It now includes constants for POSIX signal constants.
1996 C<re> has been upgraded from version 0.11 to 0.15.
1998 New C<use re "/flags"> pragma
2000 Enforce that C</d>, C</u>, and C</l> are mutually exclusive.
2002 C<re> has been upgraded from version 0.16 to 0.17.
2004 It now supports the double-a flag: C<use re '/aa';>
2006 The C<regmust> function used to crash when called on a regular expression
2007 belonging to a pluggable engine. Now it has been disabled for those.
2009 C<regmust> no longer leaks memory.
2013 C<Safe> has been upgraded from version 2.25 to 2.29.
2015 This fixes a possible infinite loop when looking for coderefs.
2017 It adds C<&version::vxs::VCMP> to the default share.
2021 C<SDBM_File> has been upgraded from 1.06 to 1.08.
2025 C<SelfLoader> has been upgraded from 1.17 to 1.18.
2027 It now works in taint mode [perl #72062].
2031 C<sigtrap> has been upgraded from version 1.04 to 1.05.
2033 It no longer tries to modify read-only arguments when generating a
2034 backtrace [perl #72340].
2038 C<Socket> has been upgraded from version 1.87 to XXX.
2040 It has several new functions for handling IPv6 addresses. (from 5.13.8)
2042 It provides new affordances for IPv6,
2043 including implementations of the C<Socket::getaddrinfo()> and
2044 C<Socket::getnameinfo()> functions, along with related constants.
2048 C<Storable> has been upgraded from version 2.22 to 2.27.
2050 Includes performance improvement for overloaded classes.
2054 C<Storable> has been upgraded from 2.24 to 2.25.
2056 This adds support for serialising code references that contain UTF-8 strings
2057 correctly. The Storable minor version number changed as a result, meaning that
2058 Storable users who set C<$Storable::accept_future_minor> to a C<FALSE> value
2059 will see errors (see L<Storable/FORWARD COMPATIBILITY> for more details).
2061 Freezing no longer gets confused if the Perl stack gets reallocated
2062 during freezing [perl #80074].
2066 C<Sys::Hostname> has been upgraded from 1.11 to 1.14.
2070 C<Term::ANSIColor> has been upgraded from version 2.02 to 3.00.
2074 C<Term::UI> has been upgraded from version 0.20 to 0.26.
2078 C<Test::Harness> has been upgraded from version 3.17 to 3.23.
2080 The core update from Test-Harness 3.17 to 3.21 fixed some things, but
2081 also L<introduced a known problem|/"Known Problems"> with argument
2082 passing to non-Perl tests. (5.13.3)
2086 C<Test::Simple> has been upgraded from version 0.94 to 0.98.
2088 Among many other things, subtests without a C<plan> or C<no_plan> now have an
2089 implicit C<done_testing()> added to them.
2093 C<Thread::Queue> has been upgraded from version 2.11 to 2.12.
2097 C<Thread::Semaphore> has been upgraded from version 2.09 to 2.12.
2099 Added new methods -E<gt>down_nb() and -E<gt>down_force() at the suggestion
2102 Refactored methods to skip argument validation when no argument is supplied.
2106 C<threads> has been upgraded from version 1.75 to 1.82.
2110 C<threads::shared> has been upgraded from version 1.32 to 1.36.
2114 C<Tie::Hash> has been upgraded from version 1.03 to 1.04.
2116 Calling C<< Tie::Hash-E<gt>TIEHASH() >> used to loop forever. Now it C<croak>s.
2120 C<Tie::Hash::NamedCapture> has been upgraded from version 0.06 to 0.08.
2122 Some of the Perl code has been converted to XS for efficency's sake.
2126 C<Tie::RefHash> has been upgraded from version 1.38 to 1.39.
2130 C<Time::HiRes> has been upgraded from version 1.9719 to 1.9721.
2134 C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000.
2138 C<Time::Piece> has been upgraded from version 1.15_01 to 1.20_01.
2142 C<Unicode::Collate> has been upgraded from version 0.52_01 to 0.73.
2144 Includes Unicode Collation Algorithm 18
2146 Among other things, it is now using UCA Revision 20 (based on Unicode 5.2.0) and
2147 supports a couple of new locales.
2149 U::C::Locale newly supports locales: ar, be, bg, de__phonebook, hu, hy, kk, mk, nso, om,
2150 tn, vi, hr, ig, ru, sq, se, sr, to and uk
2152 This release newly adds locales C<ja> C<ko> and C<zh> and its variants
2153 ( C<zh__big5han>, C<zh__gb2312han>, C<zh__pinyin>, C<zh__stroke> ).
2155 Supported UCA_Version 22 for Unicode 6.0.0.
2157 The following modules have been added:
2159 C<Unicode::Collate::CJK::Big5> for C<zh__big5han> which makes
2160 tailoring of CJK Unified Ideographs in the order of CLDR's big5han ordering.
2162 C<Unicode::Collate::CJK::GB2312> for C<zh__gb2312han> which makes
2163 tailoring of CJK Unified Ideographs in the order of CLDR's gb2312han ordering.
2165 C<Unicode::Collate::CJK::JISX0208> which makes tailoring of 6355 kanji
2166 (CJK Unified Ideographs) in the JIS X 0208 order.
2168 C<Unicode::Collate::CJK::Korean> which makes tailoring of CJK Unified Ideographs
2169 in the order of CLDR's Korean ordering.
2171 C<Unicode::Collate::CJK::Pinyin> for C<zh__pinyin> which makes
2172 tailoring of CJK Unified Ideographs in the order of CLDR's pinyin ordering.
2174 C<Unicode::Collate::CJK::Stroke> for C<zh__stroke> which makes
2175 tailoring of CJK Unified Ideographs in the order of CLDR's stroke ordering.
2177 DUCET has been updated for Unicode 6.0.0 as Collate/allkeys.txt and
2178 the default UCA_Version is 22.
2180 This also sees the switch from using the pure-perl version of this
2181 module to the XS version.
2185 C<Unicode::Normalize> has been upgraded from version 1.03 to 1.10.
2189 C<Unicode::UCD> has been upgraded from version 0.27 to 0.32.
2191 Add info about named sequence alternatives.
2193 Don't use C<CompositionExclusions.txt>.
2195 This includes a number of bug fixes:
2205 It is now updated to Unicode Version 6 with Corrigendum #8, except,
2206 as with Perl 5.14, the code point at U+1F514 has no name.
2210 The Hangul syllable code points have the correct names, and their
2211 decompositions are always output without requiring L<Lingua::KO::Hangul::Util>
2216 The CJK (Chinese-Japanese-Korean) code points U+2A700 - U+2B734
2217 and U+2B740 - 2B81D are now properly handled.
2221 The numeric values are now output for those CJK code points that have them.
2225 The names that are output for code points with multiple aliases are now the
2232 This now correctly returns "Unknown" instead of C<undef> for the script
2233 of a code point that hasn't been assigned another one.
2237 This now correctly returns "No_Block" instead of C<undef> for the block
2238 of a code point that hasn't been assigned to another one.
2242 Added new function C<Unicode::UCD::num()>. This function will return the
2243 numeric value of the string passed it; C<undef> if the string in its
2244 entirety has no safe numeric value.
2246 To be safe, a string must be a single character which has a numeric
2247 value, or consist entirely of characters that match \d, coming from the
2248 same Unicode block of digits. Thus, a mix of Bengali and Western
2249 digits would be considered unsafe, as well as a mix of half- and
2250 full-width digits, but strings consisting entirely of Devanagari digits
2251 or of "Mathematical Bold" digits would would be safe.
2255 C<version> has been upgraded from 0.82 to 0.88.
2257 Modify export logic for C<is_strict> and C<is_lax>.
2261 C<warnings> and C<warnings::register> have been upgraded from version 1.09
2262 to 1.11 and from version 1.01 to 1.02 respectively.
2264 Calling C<use warnings> without arguments is now significantly more efficient.
2266 It is now possible to register warning categories other than the names of
2267 packages using C<warnings::register>. See L<perllexwarn> for more information.
2271 C<VMS::DCLsym> has been upgraded from version 1.03 to 1.05.
2273 Two bugs have been fixed [perl #84086]:
2275 The symbol table name was lost when tying a hash, due to a thinko in
2276 C<TIEHASH>. The result was that all tied hashes interacted with the
2279 Unless a symbol table name had been explicitly specified in the call
2280 to the constructor, querying the special key ':LOCAL' failed to
2281 identify objects connected to the local symbol table.
2285 C<Win32> has been upgraded from version 0.39 to 0.44.
2287 Add several functions. (5.13.8)
2289 Corrections to names returned by C<Win32::GetOSName> and
2290 C<Win32::GetOSDisplayName>.
2294 C<XSLoader> has been upgraded from version 0.10 to 0.11.
2298 =head2 Dual-life Modules and Pragmata
2300 These modules were formerly distributed only in the Perl core
2301 distribution, and are now dual-lifed (meaning they are now also available
2302 separately on CPAN):
2312 C<Devel::SelfStubber>
2332 =head2 Removed Modules and Pragmata
2334 The following modules have been removed from the core distribution, and if
2335 needed should be installed from CPAN instead.
2341 =item C<Pod::Plainer>
2347 The removal of C<Shell> has been deferred until after 5.14, as the
2348 implementation of C<Shell> shipped with 5.12.0 did not correctly issue the
2349 warning that it was to be removed from core.
2351 =head1 Documentation
2353 XXX Changes to files in F<pod/> go here. Consider grouping entries by
2354 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
2356 =head2 New Documentation
2360 L<perlgpl> has been updated to contain GPL version 1, as is included in the
2361 F<README> distributed with perl.
2363 =head3 L<perl5121delta>
2365 The Perl 5.12.1 perldelta file was added from the Perl maintenance branch
2367 =head3 L<perlpodstyle>
2369 New style guide for POD documentation,
2370 split mostly from the NOTES section of the pod2man man page.
2372 ( This was added to C<v5.13.6> but was not documented with that release ).
2374 =head2 Changes to Existing Documentation
2376 =head3 L<perlmodlib>
2378 The perlmodlib page that came with Perl 5.12.0 was missing a lot of
2379 modules, due to a bug in the script that generates the list. This has been
2380 fixed [perl #74332].
2382 =head3 Replace wrong tr/// table in perlebcdic.pod
2384 perlebcdic.pod contains a helpful table to use in tr/// to convert
2385 between EBCDIC and Latin1/ASCII. Unfortunately, the table was the
2386 inverse of the one it describes, though the code that used the table
2387 worked correctly for the specific example given.
2389 The table has been changed to its inverse, and the sample code changed
2390 to correspond, as this is easier for the person trying to follow the
2391 instructions since deriving the old table is somewhat more complicated.
2393 The table has also been changed to hex from octal, as that is more the norm
2394 these days, and the recipes in the pod altered to print out leading
2395 zeros to make all the values the same length, as the table that they can
2396 generate has them (5f26d5).
2398 =head3 Document tricks for user-defined casing
2400 perlunicode.pod now contains an explanation of how to override, mangle
2401 and otherwise tweak the way perl handles upper, lower and other case
2402 conversions on unicode data, and how to provide scoped changes to alter
2403 one's own code's behaviour without stomping on anybody else (71648f).
2405 =head3 Document $# and $* as removed and clarify $#array usage
2407 $# and $* were both disabled as of perl5 version 10; this release adds
2408 documentation to that effect, a description of the results of continuing
2409 to try and use them, and a note explaining that $# can also function as a
2410 sigil in the $#array form (7f315d2).
2412 =head3 INSTALL explicitly states the requirement for C89
2414 This was already true but it's now Officially Stated For The Record (51eec7).
2416 =head3 No longer advertise Math::TrulyRandom
2418 This module hasn't been updated since 1996 so we can't recommend it any more
2421 =head3 perlfaq synchronised to upstream
2423 The FAQ has been updated to commit
2424 37550b8f812e591bcd0dd869d61677dac5bda92c from the perlfaq repository
2425 at git@github.com:briandfoy/perlfaq.git
2427 =head3 General changes
2433 Octal character escapes in documentation now prefer a three-digit octal
2434 escape or the new C<\o{...}> escape as they have more consistent behavior
2435 in different contexts than other forms. (ce7b6f0) (d8b950d) (e1f120a)
2439 Documentation now standardizes on the term 'capture group' over 'buffer'
2440 in regular expression documentation (c27a5cf)
2450 Added cautionary note about "no VERSION" (e0de7c2)
2454 Added additional notes regarding srand when forking (d460397)
2464 Improved documentation of unusual character escapes (4068718, 9644846)
2468 Clarified how hexadecimal escapes are interpreted, with particular
2469 attention to the treatment of invalid characters (9644846)
2479 Clarified the behavior of the C<-0NNN> switch for C<-0400> or higher (7ba31cb)
2483 =head3 L<perlpolicy>
2489 Added the policy on compatibility and deprecation along with definitions of
2490 terms like "deprecation" (70e4a83)
2500 Added examples of the perils of not using \g{} when there are more
2501 than nine back-references (9d86067)
2511 Updated some examples for modern Perl style (67d00dd)
2521 The following existing diagnostics are now documented:
2527 L<Ambiguous use of %c resolved as operator %c|perldiag/"Ambiguous use of %c resolved as operator %c">
2531 L<Ambiguous use of %c{%s} resolved to %c%s|perldiag/"Ambiguous use of %c{%s} resolved to %c%s">
2535 L<Ambiguous use of %c{%s%s} resolved to %c%s%s|perldiag/"Ambiguous use of %c{%s%s} resolved to %c%s%s">
2539 L<Ambiguous use of -%s resolved as -&%s()|perldiag/"Ambiguous use of -%s resolved as -&%s()">
2543 L<Invalid strict version format (%s)|perldiag/"Invalid strict version format (%s)">
2547 L<Invalid version format (%s)|perldiag/"Invalid version format (%s)">
2551 L<Invalid version object|perldiag/"Invalid version object">
2563 Documented a L<limitation|perlport/alarm> of L<alarm()|perlfunc/"alarm SECONDS">
2574 Minor fix to a multiple scalar match example.
2584 Many of the optree construction functions are now documented.
2594 Expanded to cover many more popular books.
2604 L<perlfaq>, L<perlfaq2>, L<perlfaq4>, L<perlfaq5>, L<perlfaq6>, L<perlfaq8>, and
2605 L<perlfaq9> have seen various updates and modernizations.
2615 The documentation for the C<SvTRUE> macro was simply wrong in stating that
2616 get-magic is not processed. It has been corrected.
2622 L<perlvar> reorders the variables and groups them by topic. Each variable
2623 introduced after Perl 5.000 notes the first version in which it is
2624 available. L<perlvar> also has a new section for deprecated variables to
2625 note when they were removed.
2627 =head3 blah blah blah
2629 Array and hash slices in scalar context are now documented in L<perldata>.
2631 =head3 blah blah blah
2633 L<perlform> and L<perllocale> have been corrected to state that
2634 C<use locale> affects formats.
2636 =head3 All documentation
2642 Numerous POD warnings were fixed.
2646 Many, many spelling errors and typographical mistakes were corrected throughout Perl's core.
2656 C<perlhack> was extensively reorganized.
2666 It has now been documented that C<ord> returns 0 for an empty string.
2676 L<overload>'s documentation has practically undergone a rewrite. It
2677 is now much more straightforward and clear.
2681 =head3 L<perlhack> and perlrepository
2687 The L<perlhack> and perlrepository documents have been heavily edited and
2688 split up into several new documents.
2690 The L<perlhack> document is now much shorter, and focuses on the Perl 5
2691 development process and submitting patches to Perl. The technical content has
2692 been moved to several new documents, L<perlsource>, L<perlinterp>,
2693 L<perlhacktut>, and L<perlhacktips>. This technical content has only been
2696 The perlrepository document has been renamed to L<perlgit>. This new document
2697 is just a how-to on using git with the Perl source code. Any other content
2698 that used to be in perlrepository has been moved to perlhack.
2708 The documentation for the C<map> function now contains more examples,
2709 see B<perldoc -f map> (f947627)
2719 Examples in L<perlfaq4> have been updated to show the use of
2720 L<Time::Piece>. (9243591)
2724 =head3 Miscellaneous
2730 Many POD related RT bugs and other issues which are too numerous to
2731 enumerate have been solved by Michael Stevens.
2737 The following additions or changes have been made to diagnostic output,
2738 including warnings and fatal error messages. For the complete list of
2739 diagnostic messages, see L<perldiag>.
2741 =head2 New Diagnostics
2745 =item Parsing code internal error (%s)
2747 New fatal error produced when parsing code supplied by an extension violated the
2748 parser's API in a detectable way.
2750 =item Use of qw(...) as parentheses is deprecated
2752 See L</"Use of qw(...) as parentheses"> for details.
2754 =item Using !~ with %s doesn't make sense
2756 This message was actually added in
2757 5.13.2, but was omitted from perldelta. It now applies also to the C<y///>
2758 operator, and has been documented.
2760 =item Closure prototype called
2762 There is a new "Closure prototype called" error [perl #68560].
2764 =item Operation "%s" returns its argument for ...
2766 Performing an operation requiring Unicode semantics (such as case-folding)
2767 on a Unicode surrogate or a non-Unicode character now triggers a warning:
2768 'Operation "%s" returns its argument for ...'.
2770 =item "\b{" is deprecated; use "\b\{" instead
2772 =item "\B{" is deprecated; use "\B\{" instead
2774 Use of an unescaped "{" immediately following a C<\b> or C<\B> is now
2775 deprecated so as to reserve its use for Perl itself in a future release.
2777 =item regcomp: Add warning if \p is used under locale. (fb2e24c)
2779 C<\p> implies Unicode matching rules, which are likely going to be
2780 different than the locale's.
2782 =item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries
2784 This new error is triggered if a destructor called on an object in a
2785 typeglob that is being freed creates a new typeglob entry containing an
2786 object with a destructor that creates a new entry containing an object....
2788 =item refcnt: fd %d%s
2790 This new error only occurs if a internal consistency check fails when a
2791 pipe is about to be closed.
2793 =item Regexp modifier "/%c" may not appear twice
2795 (F syntax) The regular expression pattern had one of the mutually exclusive
2796 modifiers repeated. Remove all but one of the occurrences.
2798 =item Regexp modifiers "/%c" and "/%c" are mutually exclusive
2800 (F syntax) The regular expression pattern had more than one of the mutually
2801 exclusive modifiers. Retain only the modifier that is supposed to be there.
2803 =item Insecure user-defined property %s
2805 (F) Perl detected tainted data when trying to compile a regular
2806 expression that contains a call to a user-defined character property
2807 function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>.
2808 See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
2812 =head2 Changes to Existing Diagnostics
2818 The "Variable $foo is not imported" warning that precedes a
2819 C<strict 'vars'> error has now been assigned the "misc" category, so that
2820 C<no warnings> will suppress it [perl #73712].
2824 C<warn> and C<die> now produce 'Wide character' warnings when fed a
2825 character outside the byte range if STDERR is a byte-sized handle.
2829 The 'Layer does not match this perl' error message has been replaced with
2830 these more helpful messages:
2836 PerlIO layer function table size (%d) does not match size expected by this
2841 PerlIO layer instance size (%d) does not match size expected by this perl
2850 The "Found = in conditional" warning that is emitted when a constant is
2851 assigned to a variable in a condition is now withheld if the constant is
2852 actually a subroutine or one generated by C<use constant>, since the value
2853 of the constant may not be known at the time the program is written
2858 Previously, if none of the C<gethostbyaddr>, C<gethostbyname> and
2859 C<gethostent> functions were implemented on a given platform, they would
2860 all die with the message 'Unsupported socket function "gethostent" called',
2861 with analogous messages for C<getnet*> and C<getserv*>. This has been
2866 The warning message about regex unrecognized escapes passed through is
2867 changed to include any literal '{' following the 2-char escape. e.g.,
2868 "\q{" will include the { in the message as part of the escape
2873 C<binmode $fh, ':scalar'> no longer warns (8250589)
2875 Perl will now no longer produce this warning:
2877 $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"'
2878 Use of uninitialized value in binmode at -e line 1.
2882 =head1 Utility Changes
2890 The remote terminal works after forking and spawns new sessions - one
2891 for each forked process (11653f7)
2895 Uses the less pager path from Config instead of searching for it (bf320d6)
2905 The use of a deprecated C<goto> construct has been removed [perl #74404].
2915 L<ptargrep> is a utility to apply pattern matching to the contents of files
2916 in a tar archive. It comes with C<Archive::Tar>.
2926 C<perlbug> now looks in the EMAIL environment variable for a return address
2927 if the REPLY-TO and REPLYTO variables are empty.
2931 C<perlbug> did not previously generate a From: header, potentially
2932 resulting in dropped mail. Now it does include that header.
2942 F<pod/buildtoc> has been modernized and can now be used to test the
2943 well-formedness of F<pod/perltoc.pod> automatically.
2953 [perl #82996] Use the user's from address as return-path in perlbug
2955 Many systems these days don't have a valid Internet domain name and
2956 perlbug@perl.org does not accept email with a return-path that does
2957 not resolve. Therefore pass the user's address to sendmail so it's
2958 less likely to get stuck in a mail queue somewhere. (019cfd2)
2962 =head1 Configuration and Compilation
2968 Fix CCINCDIR and CCLIBDIR for mingw64 cross compiler to correctly be under
2969 $(CCHOME)\mingw\include and \lib rather than immediately below $(CCHOME).
2973 This means the 'incpath', 'libpth', 'ldflags', 'lddlflags' and
2974 'ldflags_nolargefiles' values in Config.pm and Config_heavy.pl are now
2975 set correctly (23ae7f).
2979 Adjusted 'make test.valgrind' to account for cpan/dist/ext separation
2984 Compatibility with C<C++> compilers has been improved.
2988 On compilers that support it, C<-Wwrite-strings> is now added to cflags by
2993 The C<Encode> module can now (once again) be included in a static Perl
2994 build. The special-case handling for this situation got broken in Perl
2995 5.11.0, and has now been repaired.
3001 XXX Any significant changes to the testing of a freshly built perl should be
3002 listed here. Changes which create B<new> files in F<t/> go here as do any
3003 large changes to the testing harness (e.g. when parallel testing was added).
3004 Changes to existing files in F<t/> aren't worth summarising, although the bugs
3005 that they represent may be covered elsewhere.
3011 F<t/harness> clears PERL5LIB, PERLLIB, PERL5OPT as t/TEST does (a2d3de1)
3015 Many common testing routines were refactored into t/lib/common.pl
3019 Several test files have been modernized to use Test::More
3023 F<t/op/print.t> has been added to test implicit printing of C<$_>.
3027 F<t/io/errnosig.t> has been added to test for restoration of of C<$!> when
3028 leaving signal handlers.
3032 F<t/op/tie_fetch_count.t> has been added to see if C<FETCH> is only called once
3037 F<lib/Tie/ExtraHash.t> has been added to make sure the, previously untested,
3038 L<Tie::ExtraHash> keeps working.
3042 F<t/re/overload.t> has been added to test against string corruption in pattern
3043 matches on overloaded objects. This is a TODO test.
3047 The new F<t/lib/universal.t> script tests the Internal::* functions and other
3048 things in F<universal.c>.
3052 A rare race condition in F<t/op/while_readdir.t> has been fixed, stopping it
3053 from failing randomly when running tests in parallel.
3057 The new F<t/op/leaky-magic.t> script tests that magic applied to variables in
3058 the main packages does not affect other packages.
3062 The script F<t/op/threads-dirh.t> has been added, which tests interaction
3063 of threads and directory handles.
3067 The new F<t/mro/isa_aliases.t> has been added, which tests that
3068 C<*Foo::ISA = *Bar::ISA> works properly.
3072 F<t/mro/isarev.t> has been added, which tests that C<PL_isarev> (accessible
3073 at the Perl level via C<mro::get_isarev>) is updated properly.
3077 F<t/run/switchd-78586.t> has been added, which tests that [perl #78586]
3078 has been fixed (related to line numbers in the debugger).
3082 C<lib/File/DosGlob.t> has been modernized and now uses C<Test::More>.
3086 A new test script, C<t/porting/filenames.t>, makes sure that filenames and
3087 paths are reasonably portable.
3091 C<t/porting/diag.t> is now several orders of magnitude faster.
3095 C<t/porting/buildtoc.t> now tests that the documentation TOC file is current and well-formed.
3099 C<t/base/while.t> now tests the basics of a while loop with minimal dependencies.
3103 C<t/cmd/while.t> now uses F<test.pl> for better maintainability.
3107 C<t/op/split.t> now tests calls to C<split> without any pattern specified.
3111 F<porting/FindExt.t> now skips all tests on a static (-Uusedl) build
3116 F<porting/FindExt.t> now passes on non-Win32 platforms when some
3117 extensions are built statically.
3121 The tests for C<split /\s/> and Unicode have been moved from
3122 F<t/op/split.t> to the new F<t/op/split_unicode.t>.
3126 F<t/re/re.t> has been moved to F<ext/re/t/re_funcs_u.t>.
3130 The tests for [perl #72922] have been moved from F<t/re/qr.t> to the new
3135 F<t/re/reg_unsafe.t> has been deleted and its only test moved to
3136 F<t/re/pat_advanced.t>.
3140 =head1 Platform Support
3142 XXX Any changes to platform support should be listed in the sections below.
3144 [ Within the sections, list each platform as a =item entry with specific
3145 changes as paragraphs below it. ]
3147 =head2 New Platforms
3149 XXX List any platforms that this version of perl compiles on, that previous
3150 versions did not. These will either be enabled by new files in the F<hints/>
3151 directories, or new subdirectories and F<README> files at the top level of the
3158 Perl now builds on AIX 4.2.
3162 =head2 Discontinued Platforms
3168 Support for MacOS Classic within ExtUtils::MakeMaker was removed from Perl in
3169 December 2004. Vestigial MacOS Classic specific code has now been removed
3170 from other core modules as well (8f8c2a4..c457df0)
3172 =item Apollo DomainOS
3174 The last vestiges of support for this platform have been excised from the
3175 Perl distribution. It was officially discontinued in version 5.12.0. It had
3176 not worked for years before that.
3180 The last vestiges of support for this platform have been excised from the
3181 Perl distribution. It was officially discontinued in an earlier version.
3185 =head2 Platform-Specific Notes
3187 =head3 Recent OpenBSDs now use perl's malloc
3189 OpenBSD E<gt> 3.7 has a new malloc implementation which is mmap based
3190 and as such can release memory back to the OS; however for perl using
3191 this malloc causes a substantial slowdown so we now default to using
3192 perl's malloc instead (RT #75742) (9b58b5).
3200 Make C<PerlIOUnix_open> honour default permissions on VMS.
3202 When C<perlio> became the default and C<unixio> became the default bottom layer,
3203 the most common path for creating files from Perl became C<PerlIOUnix_open>,
3204 which has always explicitly used C<0666> as the permission mask.
3206 To avoid this, C<0777> is now passed as the permissions to C<open()>. In the
3207 VMS CRTL, C<0777> has a special meaning over and above intersecting with the
3208 current umask; specifically, it allows Unix syscalls to preserve native default
3215 t/io/openpid.t now uses the alarm() watchdog strategy for more
3216 robustness (5732108)
3222 Fixed a possible hang in F<t/op/readline.t>.
3226 Fixed build process for SDK2003SP1 compilers.
3230 When using old 32-bit compilers, the define C<_USE_32BIT_TIME_T> will now be set
3231 in C<$Config{ccflags}>. This improves portability when compiling XS extensions
3232 using new compilers, but for a perl compiled with old 32-bit compilers.
3236 XXX A bunch of entries that need conversion to =head2 format (unless the
3237 entries above change to =items):
3243 Conversion of strings to floating-point numbers is now more accurate on
3244 IRIX systems [perl #32380].
3248 Early versions of Mac OS X (Darwin) had buggy implementations of the
3249 C<setregid>, C<setreuid>, C<setrgid> and C<setruid> functions, so perl
3250 would pretend they did not exist.
3252 These functions are now recognised on Mac OS 10.5 (Leopard; Darwin 9) and
3253 higher, as they have been fixed [perl #72990].
3257 perl now builds again with OpenVOS (formerly known as Stratus VOS)
3262 The shortening of symbols longer than 31 characters in the C sources is
3263 now done by the compiler rather than by xsubpp (which could only do so
3264 for generated symbols in XS code).
3268 C<$Config{gccversion}> is now set correctly when perl is built using the
3269 mingw64 compiler from L<http://mingw64.org> [perl #73754].
3271 The build process proceeds more smoothly with mingw and dmake when
3272 F<C:\MSYS\bin> is in the PATH, due to a C<Cwd> fix.
3276 Directory handles are now properly cloned when threads are created. In perl
3277 5.13.6, child threads simply stopped inheriting directory handles. In
3278 previous versions, threads would share handles, resulting in crashes.
3280 Support for building with Visual C++ 2010 is now underway, but is not yet
3281 complete. See F<README.win32> for more details.
3285 Record-oriented files (record format variable or variable with fixed control)
3286 opened for write by the perlio layer will now be line buffered to prevent the
3287 introduction of spurious line breaks whenever the perlio buffer fills up.
3291 The NetBSD hints file has been changed to make the system's malloc the
3296 The option to use an externally-supplied C<crypt()>, or to build with no
3297 C<crypt()> at all, has been removed. Perl supplies its own C<crypt()>
3298 implementation for Windows, and the political situation that required
3299 this part of the distribution to sometimes be omitted is long gone.
3307 Updated MakeMaker to build man pages on cygwin.
3311 Improved rebase behaviour
3313 If a dll is updated on cygwin reuse the old imagebase address.
3314 This solves most rebase errors, esp when updating on core dll's.
3315 See L<http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README> for more information.
3319 Support the standard cyg dll prefix, which is e.g. needed for FFI's.
3323 Updated build hints file
3330 DTrace is now supported on Solaris. There used to be build failures, but
3331 these have been fixed [perl #73630].
3339 The C<test-prep> build target now depends on F<pod/perltoc.pod> to allow the
3340 F<t/porting/buildtoc.t> test to run successfully.
3350 [perl #82988] Skip hanging taint.t test on MirBSD 10 (1fb83d0)
3352 Skip a hanging test under MirBSD that was already being skipped under
3357 Previously if you build perl with a shared libperl.so on MirBSD (the
3358 default config), it will work up to the installation; however, once
3359 installed, it will be unable to find libperl. Treat path handling
3360 like in the other BSD dialects.
3366 =head1 Internal Changes
3370 =head2 CLONE_PARAMS structure added to ease correct thread creation
3372 Modules that create threads should now create C<CLONE_PARAMS> structures
3373 by calling the new function C<Perl_clone_params_new()>, and free them with
3374 C<Perl_clone_params_del()>. This will ensure compatibility with any future
3375 changes to the internals of the C<CLONE_PARAMS> structure layout, and that
3376 it is correctly allocated and initialised.
3378 =head2 API function to parse statements
3380 The C<parse_fullstmt> function has been added to allow parsing of a single
3381 complete Perl statement. See L<perlapi> for details.
3383 =head2 API functions for accessing the runtime hinthash
3385 A new C API for introspecting the hinthash C<%^H> at runtime has been added.
3386 See C<cop_hints_2hv>, C<cop_hints_fetchpvn>, C<cop_hints_fetchpvs>,
3387 C<cop_hints_fetchsv>, and C<hv_copy_hints_hv> in L<perlapi> for details.
3389 =head2 C interface to C<caller()>
3391 The C<caller_cx> function has been added as an XSUB-writer's equivalent of
3392 C<caller()>. See L<perlapi> for details.
3394 =head2 Custom per-subroutine check hooks
3396 XS code in an extension module can now annotate a subroutine (whether
3397 implemented in XS or in Perl) so that nominated XS code will be called
3398 at compile time (specifically as part of op checking) to change the op
3399 tree of that subroutine. The compile-time check function (supplied by
3400 the extension module) can implement argument processing that can't be
3401 expressed as a prototype, generate customised compile-time warnings,
3402 perform constant folding for a pure function, inline a subroutine
3403 consisting of sufficiently simple ops, replace the whole call with a
3404 custom op, and so on. This was previously all possible by hooking the
3405 C<entersub> op checker, but the new mechanism makes it easy to tie the
3406 hook to a specific subroutine. See L<perlapi/cv_set_call_checker>.
3408 To help in writing custom check hooks, several subtasks within standard
3409 C<entersub> op checking have been separated out and exposed in the API.
3411 =head2 Improved support for custom OPs
3413 Custom ops can now be registered with the new C<custom_op_register> C
3414 function and the C<XOP> structure. This will make it easier to add new
3415 properties of custom ops in the future. Two new properties have been added
3416 already, C<xop_class> and C<xop_peep>.
3418 C<xop_class> is one of the OA_*OP constants, and allows L<B> and other
3419 introspection mechanisms to work with custom ops that aren't BASEOPs.
3420 C<xop_peep> is a pointer to a function that will be called for ops of this
3421 type from C<Perl_rpeep>.
3423 See L<perlguts/Custom Operators> and L<perlapi/Custom Operators> for more
3426 The old C<PL_custom_op_names>/C<PL_custom_op_descs> interface is still
3427 supported but discouraged.
3429 =head2 Return value of C<delete $+{...}>
3431 Custom regular expression engines can now determine the return value of
3432 C<delete> on an entry of C<%+> or C<%->.
3434 XXX Mention the actual API.
3436 =head2 Changes to existing APIs
3438 XXX This probably contains also internal changes unrelated to APIs. It
3439 needs to be sorted out. Maybe we also need an ‘Other Changes’ or ‘Really
3440 Internal Changes’ section.
3446 The protocol for unwinding the C stack at the last stage of a C<die>
3447 has changed how it identifies the target stack frame. This now uses
3448 a separate variable C<PL_restartjmpenv>, where previously it relied on
3449 the C<blk_eval.cur_top_env> pointer in the C<eval> context frame that
3450 has nominally just been discarded. This change means that code running
3451 during various stages of Perl-level unwinding no longer needs to take
3452 care to avoid destroying the ghost frame.
3456 The format of entries on the scope stack has been changed, resulting in a
3457 reduction of memory usage of about 10%. In particular, the memory used by
3458 the scope stack to record each active lexical variable has been halved.
3462 Memory allocation for pointer tables has been changed. Previously
3463 C<Perl_ptr_table_store> allocated memory from the same arena system as C<SV>
3464 bodies and C<HE>s, with freed memory remaining bound to those arenas until
3465 interpreter exit. Now it allocates memory from arenas private to the specific
3466 pointer table, and that memory is returned to the system when
3467 C<Perl_ptr_table_free> is called. Additionally, allocation and release are both
3472 A new function, Perl_magic_methcall has been added that wraps the setup needed
3473 to call a magic method like FETCH (the existing S_magic_methcall function has
3474 been renamed S_magic_methcall1).
3478 The implementation of sv_dup_inc() has changed from a macro to a function.
3482 The C<find_rundefsvoffset> function has been deprecated. It appeared that
3483 its design was insufficient to reliably get the lexical C<$_> at run-time.
3485 Use the new C<find_rundefsv> function or the C<UNDERBAR> macro instead.
3486 They directly return the right SV representing C<$_>, whether it's lexical
3487 or dynamic (789bd8 .. 03d5bc).
3491 The following new functions or macros have been added to the public API:
3492 C<SvNV_nomg>, C<sv_2nv_flags>, C<find_rundefsv>.
3496 The C<UNDERBAR> macro now calls C<find_rundefsv>. C<dUNDERBAR> is now a
3497 noop but should still be used to ensure past and future compatibility.
3501 The ibcmp_* functions have been renamed and are now called foldEQ,
3502 foldEQ_locale and foldEQ_utf8 (e6226b).
3506 Under some circumstances, the C<CvGV()> field of a CV is now reference
3507 counted. To ensure consistent behaviour, direct assignment to it, for
3508 example C<CvGV(cv) = gv> is now a compile-time error. A new macro,
3509 C<CvGV_set(cv,gv)> has been introduced to perform this operation safely.
3510 Note that modification of this field is not part of of the public API,
3511 regardless of this new macro. This change caused some
3512 L<issues|/"Known Problems"> in modules that used the private C<GvGV()>
3517 It is now possible for XS code to hook into Perl's lexical scope
3518 mechanism at compile time, using the new C<Perl_blockhook_register>
3519 function. See L<perlguts/"Compile-time scope hooks">.
3523 Added C<Perl_croak_no_modify()> to implement
3524 C<Perl_croak("%s", PL_no_modify)> (6ad8f25)
3528 Added prototypes for C<tie()> and C<untie()> to allow overloading (RT#75902)
3533 Adds C<my_[l]stat_flags()> to replace C<my_[l]stat()>. C<my_stat()> and
3534 C<my_lstat()> call get magic on the stack arg, so create C<_flags()>
3535 variants that allow us to control this. (0d7d409)
3539 Removed C<PERL_POLLUTE>
3541 The option to define C<PERL_POLLUTE> to expose older 5.005 symbols for backwards
3542 compatibility has been removed. It's use was always discouraged, and MakeMaker
3543 contains a more specific escape hatch:
3545 perl Makefile.PL POLLUTE=1
3547 This can be used for modules that have not been upgraded to 5.6 naming
3548 conventions (and really should be completely obsolete by now).
3552 Added C<PERL_STATIC_INLINE>
3554 The C<PERL_STATIC_INLINE> define has been added to provide the best-guess
3555 incantation to use for static inline functions, if the C compiler supports
3556 C99-style static inline. If it doesn't, it'll give a plain C<static>.
3558 C<HAS_STATIC_INLINE> can be used to check if the compiler actually supports
3563 C<CALL_FPTR> and C<CPERLscope> have been deprecated.
3565 Those are left from an old implementation of C<MULTIPLICITY> using C++ objects,
3566 which was removed in Perl 5.8. Nowadays these macros do exactly nothing, so
3567 they shouldn't be used anymore.
3569 For compatibility, they are still defined for external C<XS> code. Only
3570 extensions defining C<PERL_CORE> must be updated now.
3574 C<lex_stuff_pvs()> has been added as a convenience macro wrapping
3575 C<lex_stuff_pvn()> for literal strings.
3579 The recursive part of the peephole optimizer is now hookable.
3581 In addition to C<PL_peepp>, for hooking into the toplevel peephole optimizer, a
3582 C<PL_rpeepp> is now available to hook into the optimizer recursing into
3583 side-chains of the optree.
3587 See L</Regular expressions retain their localeness when interpolated>,
3592 The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and
3593 C<sv_collxfrm_flags> functions have been added. These are like their
3594 non-_flags counterparts, but allow one to specify whether get-magic is
3597 The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have
3598 been replaced with wrappers around the new functions.
3602 A new C<sv_2bool_flags> function has been added.
3604 This is like C<sv_2bool>, but it lets the calling code decide whether
3605 get-magic is handled. C<sv_2bool> is now a macro that calls the new
3610 A new macro, C<SvTRUE_nomg>, has been added.
3612 This is like C<SvTRUE>, except that it does not process magic. It uses the
3613 new C<sv_2bool_flags> function.
3617 C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the
3618 source string) if the flags passed to it do not include SV_GMAGIC. So it
3619 now matches the documentation.
3623 A new interface has been added for custom check hooks on subroutines. See
3624 L</Custom per-subroutine check hooks>, above.
3628 List op building functions have been added to the
3629 API. See L<op_append_elem|perlapi/op_append_elem>,
3630 L<op_append_list|perlapi/op_append_list>, and
3631 L<op_prepend_elem|perlapi/op_prepend_elem>.
3635 The L<LINKLIST|perlapi/LINKLIST> macro, part of op building that
3636 constructs the execution-order op chain, has been added to the API.
3640 Many functions ending with pvn now have equivalent pv/pvs/sv versions.
3644 The C<save_freeop>, C<save_op>, C<save_pushi32ptr> and C<save_pushptrptr>
3645 functions have been added to the API.
3649 The new API function C<parse_stmtseq()> parses a sequence of statements, up
3650 to closing brace or EOF.
3654 C<lex_start> has been added to the API, but is considered experimental.
3658 A new C<parse_block> function has been added to the API [perl #78222].
3662 A new, experimental API has been added for accessing the internal
3663 structure that Perl uses for C<%^H>. See the functions beginning with
3664 C<cophh_> in L<perlapi>.
3668 A stash can now have a list of effective names in addition to its usual
3669 name. The first effective name can be accessed via the C<HvENAME> macro,
3670 which is now the recommended name to use in MRO linearisations (C<HvNAME>
3671 being a fallback if there is no C<HvENAME>).
3673 These names are added and deleted via C<hv_ename_add> and
3674 C<hv_ename_delete>. These two functions are I<not> part of the API.
3678 The way the parser handles labels has been cleaned up and refactored. As a
3679 result, the C<newFOROP()> constructor function no longer takes a parameter
3680 stating what label is to go in the state op.
3684 The C<newWHILEOP()> and C<newFOROP()> functions no longer accept a line
3685 number as a parameter.
3689 A new C<parse_barestmt()> function has been added, for parsing a statement
3694 A new C<parse_label()> function has been added, that parses a statement
3695 label, separate from statements.
3699 The C<CvSTASH()> macro can now only be used as an rvalue. C<CvSTASH_set()>
3700 has been added to replace assignment to C<CvSTASH()>. This is to ensure
3701 that backreferences are handled properly. These macros are not part of the
3706 The C<op_scope()> and C<op_lvalue()> functions have been added to the API,
3707 but are considered experimental.
3711 The L<C<mg_findext()>|perlapi/mg_findext> and
3712 L<C<sv_unmagicext()>|perlapi/sv_unmagicext>
3713 functions have been added to the API.
3714 They allow extension authors to find and remove magic attached to
3715 scalars based on both the magic type and the magic virtual table, similar to how
3716 C<sv_magicext()> attaches magic of a certain type and with a given virtual table
3717 to a scalar. This eliminates the need for extensions to walk the list of
3718 C<MAGIC> pointers of an C<SV> to find the magic that belongs to them.
3723 L<C<parse_fullexpr()>|perlapi/parse_fullexpr>,
3724 L<C<parse_listexpr()>|perlapi/parse_listexpr>,
3725 L<C<parse_termexpr()>|perlapi/parse_termexpr>, and
3726 L<C<parse_arithexpr()>|perlapi/parse_arithexpr>
3727 functions have been added to the API. They perform
3728 recursive-descent parsing of expressions at various precedence levels.
3729 They are expected to be used by syntax plugins.
3733 The opcode bodies for C<chop> and C<chomp> and for C<schop> and C<schomp> have
3734 been merged. The implementation functions C<Perl_do_chop()> and
3735 C<Perl_do_chomp()>, never part of the public API, have been merged and moved to
3736 a static function in F<pp.c>. This shrinks the perl binary slightly, and should
3737 not affect any code outside the core (unless it is relying on the order of side
3738 effects when C<chomp> is passed a I<list> of values).
3742 Some of the flags parameters to the uvuni_to_utf8_flags() and
3743 utf8n_to_uvuni() have changed. This is a result of Perl now allowing
3744 internal storage and manipulation of code points that are problematic
3745 in some situations. Hence, the default actions for these functions has
3746 been complemented to allow these code points. The new flags are
3747 documented in L<perlapi>. Code that requires the problematic code
3748 points to be rejected needs to change to use these flags. Some flag
3749 names are retained for backward source compatibility, though they do
3750 nothing, as they are now the default. However the flags
3751 C<UNICODE_ALLOW_FDD0>, C<UNICODE_ALLOW_FFFF>, C<UNICODE_ILLEGAL>, and
3752 C<UNICODE_IS_ILLEGAL> have been removed, as they stem from a
3753 fundamentally broken model of how the Unicode non-character code points
3754 should be handled, which is now described in
3755 L<perlunicode/Non-character code points>. See also L</Selected Bug Fixes>.
3759 Certain shared flags in the C<pmop.op_pmflags> and C<regexp.extflags>
3760 structures have been removed. These are: C<Rxf_Pmf_LOCALE>,
3761 C<Rxf_Pmf_UNICODE>, and C<PMf_LOCALE>. Instead there are encodes and
3762 three static in-line functions for accessing the information:
3763 C<get_regex_charset()>, C<set_regex_charset()>, and C<get_regex_charset_name()>,
3764 which are defined in the places where the original flags were.
3768 A new option has been added to C<pv_escape> to dump all characters above
3769 ASCII in hexadecimal. Before, one could get all characters as hexadecimal
3770 or the Latin1 non-ASCII as octal
3775 Generate pp_* prototypes in pp_proto.h, and remove pp.sym
3777 Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
3778 locations that relied on them.
3780 regen/opcode.pl now generates prototypes for the PP functions directly, into
3781 pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
3782 this, removing the only ordering dependency in the regen scripts. opcode.pl
3783 is now responsible for prototypes for pp_* functions. (embed.pl remains
3784 responsible for ck_* functions, reading from regen/opcodes)
3788 Fix harmless invalid read in Perl_re_compile() (f6d9469)
3790 [perl #2460] described a case where electric fence reported an invalid
3791 read. This could be reproduced under valgrind with blead and -e'/x/',
3792 but only on a non-debugging build.
3794 This was because it was checking for certain pairs of nodes (e.g. BOL + END)
3795 and wasn't allowing for EXACT nodes, which have the string at the next
3796 node position when using a naive NEXTOPER(first). In the non-debugging
3797 build, the nodes aren't initialised to zero, and a 1-char EXACT node isn't
3798 long enough to spill into the type field of the "next node".
3800 Fix this by only using NEXTOPER(first) when we know the first node is
3805 Break out the generated function Perl_keywords() into F<keywords.c>, a new file. (26ea9e1)
3807 As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is
3808 no longer static, and the two macro definitions move from toke.c to perl.h
3810 Previously, one had to cut and paste the output of perl_keywords.pl into the
3811 middle of toke.c, and it was not clear that it was generated code.
3815 A lot of tests have been ported from Test to Test::More, e.g. in
3820 Increase default PerlIO buffer size. (b83080d)
3822 The previous default size of a PerlIO buffer (4096 bytes) has been increased
3823 to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling
3824 this decade-old default increases read and write performance in the neighborhood
3825 of 25% to 50% when using the default layers of perlio on top of unix. To choose
3826 a non-default size, such as to get back the old value or to obtain and even
3827 larger value, configure with:
3829 ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N
3831 where N is the desired size in bytes; it should probably be a multiple of
3836 =head1 Selected Bug Fixes
3842 C<when(scalar){...}> no longer crashes, but produces a syntax error
3847 The C-level C<lex_stuff_pvn> function would sometimes cause a spurious
3848 syntax error on the last line of the file if it lacked a final semicolon
3853 The regular expression engine no longer loops when matching
3854 C<"\N{LATIN SMALL LIGATURE FF}" =~ /f+/i> and similar expressions
3859 A label right before a string eval (C<foo: eval $string>) no longer causes
3860 the label to be associated also with the first statement inside the eval
3861 [perl #74290] (5.12.1).
3865 Naming a deprecated character in \N{...} will not leak memory.
3869 FETCH is no longer called needlessly on some tied variables.
3873 The trie runtime code should no longer allocate massive amounts of memory,
3878 Timely cleanup of SVs that are cloned into a new thread but then
3879 discovered to be orphaned (i.e. their owners are -not- cloned) (e42956)
3883 Don't accidentally clone lexicals in scope within active stack frames in
3884 the parent when creating a child thread (RT #73086) (05d04d).
3888 Avoid loading feature.pm when 'no 5.13.2;' or similar is
3889 encountered (faee19).
3893 Trap invalid use of SvIVX on SVt_REGEXP when assertions are on
3898 Don't stamp on $DB::single, $DB::trace and $DB::signal if they
3899 already have values when $^P is assigned to (RT #72422) (4c0f30).
3903 chop now correctly handles perl's extended UTF-8 (RT #73246) (65ab92)
3907 Defer signal handling when shared SV locks are held to avoid
3908 deadlocks (RT #74868) (65c742).
3912 glob() no longer crashes when %File::Glob:: is empty and
3913 CORE::GLOBAL::glob isn't present (4984aa).
3917 perlbug now always permits the sender address to be changed
3918 before sending - if you were having trouble sending bug reports before
3919 now, this should fix it, we hope (e6eb90).
3923 Overloading now works properly in conjunction with tied
3924 variables. What formerly happened was that most ops checked their
3925 arguments for overloading I<before> checking for magic, so for example
3926 an overloaded object returned by a tied array access would usually be
3927 treated as not overloaded (RT #57012) (6f1401, ed3b9b, 6a5f8c .. 24328f).
3931 Independently, a bug was fixed that prevented $tied-E<gt>() from
3932 always calling FETCH correctly (RT #8438) (7c7501)
3936 Some work has been done on the internal pointers that link between symbol
3937 tables (stashes), typeglobs and subroutines. This has the effect that
3938 various edge cases related to deleting stashes or stash entries (e.g.
3939 <%FOO:: = ()>), and complex typeglob or code reference aliasing, will no
3940 longer crash the interpreter.
3944 Fixed readline() when interrupted by signals so it no longer returns
3945 the "same thing" as before or random memory
3949 Fixed a regression of kill() when a match variable is used for the
3950 process ID to kill (RT#75812) (8af710e)
3954 Fixed several subtle bugs in sort() when @_ is accessed within a subroutine
3955 used for sorting (RT#72334) (8f443ca)
3959 Catch yyparse() exceptions in C<< (?{...}) >> (RT#2353) (634d691)
3963 Avoid UTF-8 cache panics with offsets beyond a string (RT #75898) (3e2d381)
3967 Fixed POSIX::strftime memory leak (RT#73520) (c4bc4aa)
3971 Doesn't set strict with C<no VERSION> if C<VERSION> is greater than 5.12
3976 Avoids multiple FETCH/stringify on filetest ops (40c852d)
3980 Fixed issue with string C<eval> not detecting taint of overloaded/tied
3981 arguments (RT #75716) (895b760)
3985 Fix potential crashes of string C<eval> when evaluating a object with
3986 overloaded stringification by creating a stringified copy when necessary
3991 Fixed bug where overloaded stringification could remove tainting
3992 (RT #75716) (a02ec77)
3996 Plugs more memory leaks in vms.c. (9e2bec0)
4000 Fix pthread include error for Time::Piece (e9f284c)
4004 A possible memory leak when using L<caller()|perlfunc/"caller EXPR"> to set
4005 C<@DB::args> has been fixed.
4009 Several memory leaks when loading XS modules were fixed.
4013 A panic in the regular expression optimizer has been fixed (RT#75762).
4017 Assignments to lvalue subroutines now honor copy-on-write behavior again, which
4018 has been broken since version 5.10.0 (RT#75656).
4022 Assignments to glob copies now behave just like assignments to regular globs
4027 Within signal handlers, C<$!> is now implicitly localized.
4031 L<readline|perlfunc/"readline EXPR"> now honors C<< <> >> overloading on tied
4036 L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">,
4037 L<pos()|perlfunc/"index STR,SUBSTR,POSITION">, L<keys()|perlfunc/"keys HASH">,
4038 and L<vec()|perlfunc/"vec EXPR,OFFSET,BITS"> could, when used in combination
4039 with lvalues, result in leaking the scalar value they operate on, and cause its
4040 destruction to happen too late. This has now been fixed.
4044 Building with C<PERL_GLOBAL_STRUCT>, which has been broken accidentally in
4045 5.13.3, now works again.
4049 A regression introduced in Perl 5.12.0, making
4050 C<< my $x = 3; $x = length(undef) >> result in C<$x> set to C<3> has been
4051 fixed. C<$x> will now be C<undef>.
4055 A fatal error in regular expressions when processing UTF-8 data has been fixed [perl #75680].
4059 An erroneous regular expression engine optimization that caused regex verbs like
4060 C<*COMMIT> to sometimes be ignored has been removed.
4064 The Perl debugger now also works in taint mode [perl #76872].
4068 Several memory leaks in cloning and freeing threaded Perl interpreters have been
4069 fixed [perl #77352].
4073 A possible string corruption when doing regular expression matches on overloaded
4074 objects has been fixed [perl #77084].
4078 Magic applied to variables in the main package no longer affects other packages.
4079 See L</Magic variables outside the main package> above [perl #76138].
4083 Opening a glob reference via C<< open $fh, "E<gt>", \*glob >> will no longer
4084 cause the glob to be corrupted when the filehandle is printed to. This would
4085 cause perl to crash whenever the glob's contents were accessed
4090 The postincrement and postdecrement operators, C<++> and C<-->, used to cause
4091 leaks when being used on references. This has now been fixed.
4095 A bug when replacing the glob of a loop variable within the loop has been fixed
4097 means the following code will no longer crash:
4105 Perl would segfault if the undocumented C<Internals> functions that used
4106 reference prototypes were called with the C<&foo()> syntax, e.g.
4107 C<&Internals::SvREADONLY(undef)> [perl #77776].
4109 These functions now call C<SvROK> on their arguments before dereferencing them
4110 with C<SvRV>, and we test for this case in F<t/lib/universal.t>.
4114 When assigning a list with duplicated keys to a hash, the assignment used to
4115 return garbage and/or freed values:
4117 @a = %h = (list with some duplicate keys);
4119 This has now been fixed [perl #31865].
4123 An earlier release of the 5.13 series of Perl changed the semantics of opening a
4124 reference to a copy of a glob:
4127 open my $fh, '>', \$var;
4129 This was a mistake, and the previous behaviour from Perl 5.10 and 5.12, which is
4130 to treat \$var as a scalar reference, has now been restored.
4134 The regular expression bracketed character class C<[\8\9]> was effectively the
4135 same as C<[89\000]>, incorrectly matching a NULL character. It also gave
4136 incorrect warnings that the C<8> and C<9> were ignored. Now C<[\8\9]> is the
4137 same as C<[89]> and gives legitimate warnings that C<\8> and C<\9> are
4138 unrecognized escape sequences, passed-through.
4142 C<warn()> and C<die()> now respect utf8-encoded scalars [perl #45549].
4146 A regular expression match in the right-hand side of a global substitution
4147 (C<s///g>) that is in the same scope will no longer cause match variables
4148 to have the wrong values on subsequent iterations. This can happen when an
4149 array or hash subscript is interpolated in the right-hand side, as in
4150 C<s|(.)|@a{ print($1), /./ }|g> [perl #19078].
4154 Constant-folding used to cause
4156 $text =~ ( 1 ? /phoo/ : /bear/)
4162 at compile time. Now it correctly matches against C<$_> [perl #20444].
4166 Parsing Perl code (either with string C<eval> or by loading modules) from
4167 within a C<UNITCHECK> block no longer causes the interpreter to crash
4172 When C<-d> is used on the shebang (C<#!>) line, the debugger now has access
4173 to the lines of the main program. In the past, this sometimes worked and
4174 sometimes did not, depending on what order things happened to be arranged
4175 in memory [perl #71806].
4179 The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH>
4180 method of a tie) on its left-hand side just once, not twice [perl #76814].
4184 String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and
4185 C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic
4186 (e.g., tie methods) twice on their operands [perl #76814].
4188 This bug was introduced in an earlier 5.13 release, and does not affect
4193 When a tied (or other magic) variable is used as, or in, a regular
4194 expression, it no longer has its C<FETCH> method called twice
4197 This bug was introduced in an earlier 5.13 release, and does not affect
4202 The C<-C> command line option can now be followed by other options
4207 Assigning a glob to a PVLV used to convert it to a plain string. Now it
4208 works correctly, and a PVLV can hold a glob. This would happen when a
4209 nonexistent hash or array element was passed to a subroutine:
4211 sub { $_[0] = *foo }->($hash{key});
4212 # $_[0] would have been the string "*main::foo"
4214 It also happened when a glob was assigned to, or returned from, an element
4215 of a tied array or hash [perl #36051].
4219 Creating a new thread when directory handles were open used to cause a
4220 crash, because the handles were not cloned, but simply passed to the new
4221 thread, resulting in a double free.
4223 Now directory handles are cloned properly, on systems that have a C<fchdir>
4224 function. On other systems, new threads simply do not inherit directory
4225 handles from their parent threads [perl #75154].
4229 The regular expression parser no longer hangs when parsing C<\18> and
4232 This bug was introduced in version 5.13.5 and did not affect earlier
4233 versions [perl #78058].
4237 Subroutine redefinition works once more in the debugger [perl #48332].
4241 The C<&> C<|> C<^> bitwise operators no longer coerce read-only arguments
4246 Stringifying a scalar containing -0.0 no longer has the affect of turning
4247 false into true [perl #45133].
4251 Aliasing packages by assigning to globs or deleting packages by deleting
4252 their containing stash elements used to have erratic effects on method
4253 resolution, because the internal 'isa' caches were not reset. This has been
4258 C<sort> with a custom sort routine could crash if too many nested
4259 subroutine calls occurred from within the sort routine [perl #77930].
4261 This bug was introduced in an earlier 5.13 release, and did not affect
4266 The C<eval_sv> and C<eval_pv> C functions now set C<$@> correctly when
4267 there is a syntax error and no C<G_KEEPERR> flag, and never set it if the
4268 C<G_KEEPERR> flag is present [perl #3719].
4272 Nested C<map> and C<grep> blocks no longer leak memory when processing
4273 large lists [perl #48004].
4277 Malformed C<version> objects no longer cause crashes [perl #78286].
4281 The interpreter no longer crashes when freeing deeply-nested arrays of
4282 arrays. Hashes have not been fixed yet [perl #44225].
4286 The mechanism for freeing objects in globs used to leave dangling
4287 pointers to freed SVs, meaning Perl users could see corrupted state
4290 Perl now only frees the affected slots of the GV, rather than freeing
4291 the GV itself. This makes sure that there are no dangling refs or
4292 corrupted state during destruction.
4296 The typeglob C<*,>, which holds the scalar variable C<$,> (output field
4297 separator), had the wrong reference count in child threads.
4301 C<splice> now calls set-magic. This means that, for instance, changes made
4302 by C<splice @ISA> are respected by method calls [perl #78400].
4306 C<use v5.8> no longer leaks memory [perl #78436].
4310 The XS multicall API no longer causes subroutines to lose reference counts
4311 if called via the multicall interface from within those very subroutines.
4312 This affects modules like List::Util. Calling one of its functions with an
4313 active subroutine as the first argument could cause a crash [perl #78070].
4317 The C<parse_stmt> C function added in earlier in the 5.13.x series has been
4318 fixed to work with statements ending with C<}> [perl #78222].
4322 The C<parse_fullstmt> C function added in 5.13.5 has been fixed to work
4323 when called while an expression is being parsed.
4327 Characters in the Latin-1 non-ASCII range (0x80 to 0xFF) used not to match
4328 themselves if the string happened to be UTF8-encoded internally, the
4329 regular expression was not, and the character in the regular expression was
4330 inside a repeated group (e.g.,
4331 C<Encode::decode_utf8("\303\200") =~ /(\xc0)+/>) [perl #78464].
4335 The C<(?d)> regular expression construct now overrides a previous C<(?u)>
4336 or C<use feature "unicode_string"> [perl #78508].
4340 A memory leak in C<do "file">, introduced in perl 5.13.6, has been fixed
4345 Various bugs related to typeglob dereferencing have been fixed. See
4346 L</Dereferencing typeglobs>, above.
4350 The C<SvPVbyte> function available to XS modules now calls magic before
4351 downgrading the SV, to avoid warnings about wide characters [perl #72398].
4355 The C<=> operator used to ignore magic (e.g., tie methods) on its
4356 right-hand side if the scalar happened to hold a typeglob. This could
4357 happen if a typeglob was the last thing returned from or assigned to a tied
4358 scalar [perl #77498].
4362 C<sprintf> was ignoring locales when called with constant arguments
4367 A non-ASCII character in the Latin-1 range could match both a Posix
4368 class, such as C<[[:alnum:]]>, and its inverse C<[[:^alnum:]]>. This is
4369 now fixed for regular expressions compiled under the C<"u"> modifier.
4370 See L</C<use feature "unicode_strings"> now applies to more regex matching>. [perl #18281].
4374 Concatenating long strings under C<use encoding> no longer causes perl to
4375 crash [perl #78674].
4379 Typeglob assignments would crash if the glob's stash no longer existed, so
4380 long as the glob assigned to was named 'ISA' or the glob on either side of
4381 the assignment contained a subroutine.
4385 Calling C<< ->import >> on a class lacking an import method could corrupt
4386 the stack, resulting in strange behaviour. For instance,
4388 push @a, "foo", $b = bar->import;
4390 would assign 'foo' to C<$b> [perl #63790].
4394 Creating an alias to a package when that package had been detached from the
4395 symbol table would result in corrupted isa caches [perl #77358].
4399 C<.=> followed by C<< <> >> or C<readline> would leak memory if C<$/>
4400 contained characters beyond the octet range and the scalar assigned to
4401 happened to be encoded as UTF8 internally [perl #72246].
4405 The C<recv> function could crash when called with the MSG_TRUNC flag
4410 Evaluating a simple glob (like C<*a>) was calling get-magic on the glob,
4411 even when its contents were not being used [perl #78580].
4413 This bug was introduced in 5.13.2 and did not affect earlier perl versions.
4417 Matching a Unicode character against an alternation containing characters
4418 that happened to match continuation bytes in the former's UTF8
4419 representation (C<qq{\x{30ab}} =~ /\xab|\xa9/>) would cause erroneous
4420 warnings [perl #70998].
4424 C<s///r> (added in 5.13.2) no longer leaks.
4428 The trie optimisation was not taking empty groups into account, preventing
4429 'foo' from matching C</\A(?:(?:)foo|bar|zot)\z/> [perl #78356].
4433 A pattern containing a C<+> inside a lookahead would sometimes cause an
4434 incorrect match failure in a global match (e.g., C</(?=(\S+))/g>)
4439 Iterating with C<foreach> over an array returned by an lvalue sub now works
4444 C<$@> is now localised during calls to C<binmode> to prevent action at a
4445 distance [perl #78844].
4449 C<PL_isarev>, which is accessible to Perl via C<mro::get_isarev> is now
4450 updated properly when packages are deleted or removed from the C<@ISA> of
4451 other classes. This allows many packages to be created and deleted without
4452 causing a memory leak [perl #75176].
4456 C<undef *Foo::> and C<undef *Foo::ISA> and C<delete $package::{ISA}>
4457 used not to update the internal isa caches if the
4458 stash or C<@ISA> array had a reference elsewhere. In
4459 fact, C<undef *Foo::ISA> would stop a new C<@Foo::ISA> array from updating
4464 C<@ISA> arrays can now be shared between classes via
4465 C<*Foo::ISA = \@Bar::ISA> or C<*Foo::ISA = *Bar::ISA> [perl #77238].
4469 The parser no longer hangs when encountering certain Unicode characters,
4470 such as U+387 [perl #74022].
4474 C<formline> no longer crashes when passed a tainted format picture. It also
4475 taints C<$^A> now if its arguments are tainted [perl #79138].
4479 A signal handler called within a signal handler could cause leaks or
4480 double-frees. Now fixed. [perl #76248].
4484 When trying to report C<Use of uninitialized value $Foo::BAR>, crashes could
4485 occur if the GLOB of the global variable causing the warning has been detached
4486 from its original stash by, for example C<delete $::{'Foo::'}>. This has been
4487 fixed by disabling the reporting of variable names in the warning in those
4492 C<BEGIN {require 5.12.0}> now behaves as documented, rather than behaving
4493 identically to C<use 5.12.0;>. Previously, C<require> in a C<BEGIN> block
4494 was erroneously executing the C<use feature ':5.12.0'> and
4495 C<use strict; use warnings;> behaviour, which only C<use> was documented to
4496 provide [perl #69050].
4500 C<use 5.42> [perl #69050],
4501 C<use 6> and C<no 5> no longer leak memory.
4505 C<eval "BEGIN{die}"> no longer leaks memory on non-threaded builds.
4509 PerlIO no longer crashes when called recursively, e.g., from a signal
4510 handler. Now it just leaks memory [perl #75556].
4514 Defining a constant with the same name as one of perl's special blocks
4515 (e.g., INIT) stopped working in 5.12.0, but has now been fixed
4520 A reference to a literal value used as a hash key (C<$hash{\"foo"}>) used
4521 to be stringified, even if the hash was tied [perl #79178].
4525 A closure containing an C<if> statement followed by a constant or variable
4526 is no longer treated as a constant [perl #63540].
4530 Calling a closure prototype (what is passed to an attribute handler for a
4531 closure) now results in a "Closure prototype called" error message instead
4532 of a crash [perl #68560].
4536 A regular expression optimisation would sometimes cause a match with a
4537 C<{n,m}> quantifier to fail when it should match [perl #79152].
4541 What has become known as the "Unicode Bug" is mostly resolved in this release.
4542 Under C<use feature 'unicode_strings'>, the internal storage format of a
4543 string no longer affects the external semantics. There are two known
4544 exceptions. User-defined case changing functions, which are planned to
4545 be deprecated in 5.14, require utf8-encoded strings to function; and the
4546 character C<LATIN SMALL LETTER SHARP S> in regular expression
4547 case-insensitive matching has a somewhat different set of bugs depending
4548 on the internal storage format. Case-insensitive matching of all
4549 characters that have multi-character matches, as this one does, is
4550 problematical in Perl [perl #58182].
4554 Mentioning a read-only lexical variable from the enclosing scope in a
4555 string C<eval> no longer causes the variable to become writable
4560 C<state> can now be used with attributes. It used to mean the same thing as
4561 C<my> if attributes were present [perl #68658].
4565 Expressions like C<< @$a > 3 >> no longer cause C<$a> to be mentioned in
4566 the "Use of uninitialized value in numeric gt" warning when C<$a> is
4567 undefined (since it is not part of the C<E<gt>> expression, but the operand
4568 of the C<@>) [perl #72090].
4572 C<require> no longer causes C<caller> to return the wrong file name for
4573 the scope that called C<require> and other scopes higher up that had the
4574 same file name [perl #68712].
4578 The ref types in the typemap for XS bindings now support magical variables
4583 Match variables (e.g., C<$1>) no longer persist between calls to a sort
4584 subroutine [perl #76026].
4588 The C<B> module was returning C<B::OP>s instead of C<B::LOGOP>s for C<entertry> [perl #80622].
4589 This was due to a bug in the perl core, not in C<B> itself.
4593 Some numeric operators were converting integers to floating point,
4594 resulting in loss of precision on 64-bit platforms [perl #77456].
4598 The fallback behaviour of overloading on binary operators was asymmetric
4603 The handling of Unicode non-characters has changed.
4604 Previously they were mostly considered illegal, except that only one of
4605 the 66 of them was known about in places. The Unicode standard
4606 considers them legal, but forbids the "open interchange" of them.
4607 This is part of the change to allow the internal use of any code point
4608 (see L</Core Enhancements>). Together, these changes resolve
4609 [perl #38722], [perl #51918], [perl #51936], [perl #63446]
4613 Sometimes magic (ties, tainted, etc.) attached to variables could cause an
4614 object to last longer than it should, or cause a crash if a tied variable
4615 were freed from within a tie method. These have been fixed [perl #81230].
4619 Most I/O functions were not warning for unopened handles unless the
4620 'closed' and 'unopened' warnings categories were both enabled. Now only
4621 C<use warnings 'unopened'> is necessary to trigger these warnings (as was
4622 always meant to be the case.
4626 C<< E<lt>exprE<gt> >> always respects overloading now if the expression is
4629 Due to the way that 'E<lt>E<gt> as glob' was parsed differently from
4630 'E<lt>E<gt> as filehandle' from 5.6 onwards, something like C<< E<lt>$foo[0]E<gt> >> did
4631 not handle overloading, even if C<$foo[0]> was an overloaded object. This
4632 was contrary to the documentation for overload, and meant that C<< E<lt>E<gt> >>
4633 could not be used as a general overloaded iterator operator.
4637 Destructors on objects were not called during global destruction on objects
4638 that were not referenced by any scalars. This could happen if an array
4639 element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
4640 blessed variable (C<bless \my @a; sub foo { @a }>).
4642 Now there is an extra pass during global destruction to fire destructors on
4643 any objects that might be left after the usual passes that check for
4644 objects referenced by scalars
4649 A long standing bug has now been fully fixed (partial fixes came in
4650 earlier releases), in which some Latin-1 non-ASCII characters on
4651 ASCII-platforms would match both a character class and its complement,
4652 such as U+00E2 being both in C<\w> and C<\W>, depending on the
4653 UTF-8-ness of the regular expression pattern and target string.
4654 Fixing this did expose some bugs in various modules and tests that
4655 relied on the previous behavior of C<[[:alpha:]]> not ever matching
4656 U+00FF, "LATIN SMALL LETTER Y WITH DIAERESIS", even when it should, in
4657 Unicode mode; now it does match when appropriate.
4662 A Unicode C<\p{}> property match in a regular expression pattern will
4663 now force Unicode rules for the rest of the regular expression
4667 [perl #38456] binmode FH, ":crlf" only modifies top crlf layer (7826b36)
4669 When pushed on top of the stack, crlf will no longer enable crlf layers
4670 lower in the stack. This will prevent unexpected results.
4674 Fix 'raw' layer for RT #80764 (ecfd064)
4676 Made a ':raw' open do what it advertises to do (first open the file,
4677 then binmode it), instead of leaving off the top layer.
4681 Use PerlIOBase_open for pop, utf8 and bytes layers (c0888ac)
4683 Three of Perl's builtin PerlIO layers (C<:pop>, C<:utf8> and
4684 C<:bytes>) didn't allow stacking when opening a file. For example
4687 open FH, '>:pop:perlio', 'some.file' or die $!;
4689 Would throw an error: "Invalid argument". This has been fixed in this
4694 An issue present since 5.13.1, where s/A/B/ with A utf8 and B
4695 non-utf8, could cause corruption or segfaults has been
4700 String evals will no longer fail after 2 billion scopes have been
4701 compiled (d1bfb64, 2df5bdd, 0d311cd and 6012dc8)
4705 [perl #81750] When strict 'refs' mode is off,
4706 C<%{...}> in rvalue context returns C<undef> if
4707 its argument is undefined. An optimisation introduced in perl 5.12.0 to
4708 make C<keys %{...}> faster when used as a boolean did not take this into
4709 account, causing C<keys %{+undef}> (and C<keys %$foo> when C<$foo> is
4710 undefined) to be an error, which it should only be in strict mode.
4714 [perl #83194] Combining the vector (%v) flag and dynamic precision would
4715 cause sprintf to confuse the order of its arguments, making it treat the
4716 string as the precision and vice versa.
4720 [perl #77692] Sometimes the UTF8 length cache would not be reset on a value
4721 returned by substr, causing C<length(substr($uni_string,...))> to give
4722 wrong answers. With C<${^UTF8CACHE}> set to -1, it would produce a 'panic'
4727 During the restoration of a localised typeglob on scope exit, any
4728 destructors called as a result would be able to see the typeglob in an
4729 inconsistent state, containing freed entries, which could result in a
4730 crash. This would affect code like this:
4733 eval { die bless [] }; # puts an object in $@
4738 Now the glob entries are cleared before any destructors are called. This
4739 also means that destructors can vivify entries in the glob. So perl tries
4740 again and, if the entries are re-created too many times, dies with a
4741 'panic: gp_free...' error message.
4745 [perl #78494] When pipes are shared between threads, the C<close> function
4746 (and any implicit close, such as on thread exit) no longer blocks.
4750 Several contexts no longer allow a Unicode character to begin a word
4751 that should never begin words, for an example an accent that must follow
4752 another character previously could precede all other characters.
4756 Case insensitive matching in regular expressions compiled under C<use
4757 locale> now works much more sanely when the pattern and/or target string
4758 are encoded in UTF-8. Previously, under these conditions the localeness
4759 was completely lost. Now, code points above 255 are treated as Unicode,
4760 but code points between 0 and 255 are treated using the current locale
4761 rules, regardless of whether the pattern or string are encoded in UTF-8.
4762 The few case insensitive matches that cross the 255/256 boundary are not
4763 allowed. For example, 0xFF does not caselessly match the character at
4764 0x178, LATIN CAPITAL LETTER Y WITH DIAERESIS, because 0xFF may not be
4765 LATIN SMALL LETTER Y in the current locale, and Perl has no way of
4766 knowing if that character even exists in the locale, much less what code
4771 A fix for a bug in C<length(undef)> in 5.13.4 introduced a regression that
4772 meant C<print length undef> did not warn when warnings were enabled. It now
4773 correctly warns [perl #85508].
4777 The C<(?|...)> regular expression construct no longer crashes if the final
4778 branch has more sets of capturing parentheses than any other branch. This
4779 was fixed in Perl 5.10.1 for the case of a single branch, but that fix did
4780 not take multiple branches into account [perl #84746].
4784 Accessing an element of a package array with a hard-coded number (as
4785 opposed to an arbitrary expression) would crash if the array did not exist.
4786 Usually the array would be autovivified during compilation, but typeglob
4787 manipulation could remove it, as in these two cases which used to crash:
4789 *d = *a; print $d[0];
4790 undef *d; print $d[0];
4794 C<#line> directives in string evals were not properly updating the arrays
4795 of lines of code (C<< @{"_<..."} >>) that the debugger (or any debugging or
4796 profiling module) uses. In threaded builds, they were not being updated at
4797 all. In non-threaded builds, the line number was ignored, so any change to
4798 the existing line number would cause the lines to be misnumbered
4803 C<$AUTOLOAD> used to remain tainted forever if it ever became tainted. Now
4804 it is correctly untainted if an autoloaded method is called and the method
4805 name was not tainted.
4809 A bug has been fixed in the implementation of C<{...}> quantifiers in
4810 regular expressions that prevented the code block in
4811 C</((\w+)(?{ print $2 })){2}/> from seeing the C<$2> sometimes
4816 C<sprintf> now dies when passed a tainted scalar for the format. It did
4817 already die for arbitrary expressions, but not for simple scalars
4822 =head1 Known Problems
4828 Bug fixes involving CvGV reference counting break Sub::Name. A
4829 patch has been sent upstream to the maintainer
4833 readline() returns an empty string instead of undef when it is
4834 interrupted by a signal
4838 Test-Harness was updated from 3.17 to 3.21 for this release. A rewrite
4839 in how it handles non-Perl tests (in 3.17_01) broke argument passing to
4840 non-Perl tests with L<prove> (RT #59186), and required that non-Perl
4841 tests be run as C<prove ./test.sh> instead of C<prove test.sh> These
4842 issues are being solved upstream, but didn't make it into this release.
4843 They're expected to be fixed in time for perl v5.13.4. (RT #59457)
4847 C<version> now prevents object methods from being called as class methods
4852 The changes in L<substr()|perlfunc/"substr EXPR,OFFSET,LENGTH,REPLACEMENT">
4853 broke C<HTML::Parser> <= 3.66. A fixed C<HTML::Parser> is available as versions
4858 The changes in prototype handling break C<Switch>. A patch has been sent
4859 upstream and will hopefully appear on CPAN soon.
4863 The upgrade to Encode-2.40 has caused some tests in the libwww-perl distribution
4864 on CPAN to fail. (Specifically, F<base/message-charset.t> tests 33-36 in version
4865 5.836 of that distribution now fail.)
4869 The upgrade to ExtUtils-MakeMaker-6.57_05 has caused some tests in the
4870 Module-Install distribution on CPAN to fail. (Specifically, F<02_mymeta.t> tests
4871 5 and 21, F<18_all_from.t> tests 6 and 15, F<19_authors.t> tests 5, 13, 21 and
4872 29, and F<20_authors_with_special_characters.t> tests 6, 15 and 23 in version
4873 1.00 of that distribution now fail.)
4879 =head2 C<keys>, C<values> work on arrays
4881 You can now use the C<keys>, C<values>, C<each> builtin functions on arrays
4882 (previously you could only use them on hashes). See L<perlfunc> for details.
4883 This is actually a change introduced in perl 5.12.0, but it was missed from
4884 that release's perldelta.
4888 Randy Kobes, creator of the kobesearch alternative to search.cpan.org and
4889 contributor/maintainer to several core Perl toolchain modules, passed away
4890 on September 18, 2010 after a battle with lung cancer. His contributions
4891 to the Perl community will be missed.
4893 =head1 Acknowledgements
4895 XXX The list of people to thank goes here.
4897 =head1 Reporting Bugs
4899 If you find what you think is a bug, you might check the articles
4900 recently posted to the comp.lang.perl.misc newsgroup and the perl
4901 bug database at http://rt.perl.org/perlbug/ . There may also be
4902 information at http://www.perl.org/ , the Perl Home Page.
4904 If you believe you have an unreported bug, please run the L<perlbug>
4905 program included with your release. Be sure to trim your bug down
4906 to a tiny but sufficient test case. Your bug report, along with the
4907 output of C<perl -V>, will be sent off to perlbug@perl.org to be
4908 analysed by the Perl porting team.
4910 If the bug you are reporting has security implications, which make it
4911 inappropriate to send to a publicly archived mailing list, then please send
4912 it to perl5-security-report@perl.org. This points to a closed subscription
4913 unarchived mailing list, which includes all the core committers, who be able
4914 to help assess the impact of issues, figure out a resolution, and help
4915 co-ordinate the release of patches to mitigate or fix the problem across all
4916 platforms on which Perl is supported. Please only use this address for
4917 security issues in the Perl core, not for modules independently
4918 distributed on CPAN.
4922 The F<Changes> file for an explanation of how to view exhaustive details
4925 The F<INSTALL> file for how to build Perl.
4927 The F<README> file for general stuff.
4929 The F<Artistic> and F<Copying> files for copyright information.