5 perl5120delta - what is new for perl v5.12.0
9 This document describes differences between the 5.10.0 release and the
12 Many of the bug fixes in 5.12.0 are already included in the 5.10.1
15 You can see the list of those changes in the 5.10.1 release notes
19 =head1 Core Enhancements
21 =head2 New C<package NAME VERSION> syntax
23 This new syntax allows a module author to set the $VERSION of a namespace
24 when the namespace is declared with 'package'. It eliminates the need
25 for C<our $VERSION = ...> and similar constructs. E.g.
27 package Foo::Bar 1.23;
28 # $Foo::Bar::VERSION == 1.23
30 There are several advantages to this:
36 C<$VERSION> is parsed in exactly the same way as C<use NAME VERSION>
40 C<$VERSION> is set at compile time
44 C<$VERSION> is a version object that provides proper overloading of
45 comparison operators so comparing C<$VERSION> to decimal (1.23) or
46 dotted-decimal (v1.2.3) version numbers works correctly.
50 Eliminates C<$VERSION = ...> and C<eval $VERSION> clutter
54 As it requires VERSION to be a numeric literal or v-string
55 literal, it can be statically parsed by toolchain modules
56 without C<eval> the way MM-E<gt>parse_version does for C<$VERSION = ...>
60 It does not break old code with only C<package NAME>, but code that uses
61 C<package NAME VERSION> will need to be restricted to perl 5.12.0 or newer
62 This is analogous to the change to C<open> from two-args to three-args.
63 Users requiring the latest Perl will benefit, and perhaps after several
64 years, it will become a standard practice.
67 However, C<package NAME VERSION> requires a new, 'strict' version
68 number format. See L<"Version number formats"> for details.
71 =head2 The C<...> operator
73 A new operator, C<...>, nicknamed the Yada Yada operator, has been added.
74 It is intended to mark placeholder code that is not yet implemented.
75 See L<perlop/"Yada Yada Operator">.
77 =head2 Implicit strictures
79 Using the C<use VERSION> syntax with a version number greater or equal
80 to 5.11.0 will lexically enable strictures just like C<use strict>
81 would do (in addition to enabling features.) The following:
90 =head2 Unicode improvements
92 Perl 5.12 comes with Unicode 5.2, the latest version available to
93 us at the time of release. This version of Unicode was released in
94 October 2009. See L<http://www.unicode.org/versions/Unicode5.2.0> for
95 further details about what's changed in this version of the standard.
96 See L<perlunicode> for instructions on installing and using other versions
99 Additionally, Perl's developers have significantly improved Perl's Unicode
100 implementation. For full details, see L</Unicode overhaul> below.
102 =head2 Y2038 compliance
104 Perl's core time-related functions are now Y2038 compliant. (It may not mean much to you, but your kids will love it!)
106 =head2 qr overloading
108 It is now possible to overload the C<qr//> operator, that is,
109 conversion to regexp, like it was already possible to overload
110 conversion to boolean, string or number of objects. It is invoked when
111 an object appears on the right hand side of the C<=~> operator or when
112 it is interpolated into a regexp. See L<overload>.
114 =head2 Pluggable keywords
116 Extension modules can now cleanly hook into the Perl parser to define
117 new kinds of keyword-headed expression and compound statement. The
118 syntax following the keyword is defined entirely by the extension. This
119 allow a completely non-Perl sublanguage to be parsed inline, with the
120 correct ops cleanly generated.
122 See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core
123 source distribution also includes a new module
124 L<XS::APItest::KeywordRPN>, which implements reverse Polish notation
125 arithmetic via pluggable keywords. This module is mainly used for test
126 purposes, and is not normally installed, but also serves as an example
127 of how to use the new mechanism.
129 Perl's developers consider this feature to be experimental. We may remove
130 it or change it in a backwards-incompatible way in Perl 5.14.
132 =head2 APIs for more internals
134 The lowest layers of the lexer and parts of the pad system now have C
135 APIs available to XS extensions. These are necessary to support proper
136 use of pluggable keywords, but have other uses too. The new APIs are
137 experimental, and only cover a small proportion of what would be
138 necessary to take full advantage of the core's facilities in these
139 areas. It is intended that the Perl 5.13 development cycle will see the
140 addition of a full range of clean, supported interfaces.
142 Perl's developers consider this feature to be experimental. We may remove
143 it or change it in a backwards-incompatible way in Perl 5.14.
145 =head2 Overridable function lookup
147 Where an extension module hooks the creation of rv2cv ops to modify the
148 subroutine lookup process, this now works correctly for bareword
149 subroutine calls. This means that prototypes on subroutines referenced
150 this way will be processed correctly. (Previously bareword subroutine
151 names were initially looked up, for parsing purposes, by an unhookable
152 mechanism, so extensions could only properly influence subroutine names
153 that appeared with an C<&> sigil.)
155 =head2 A proper interface for pluggable Method Resolution Orders
157 As of Perl 5.12.0 there is a new interface for plugging and using method
158 resolution orders other than the default linear depth first search.
159 The C3 method resolution order added in 5.10.0 has been re-implemented as
160 a plugin, without changing its Perl-space interface. See L<perlmroapi> for
165 =head2 C<\N> experimental regex escape
167 Perl now supports C<\N>, a new regex escape which you can think of as
168 the inverse of C<\n>. It will match any character that is not a newline,
169 independently from the presence or absence of the single line match
170 modifier C</s>. It is not usable within a character class. C<\N{3}>
171 means to match 3 non-newlines; C<\N{5,}> means to match at least 5.
172 C<\N{NAME}> still means the character or sequence named C<NAME>, but
173 C<NAME> no longer can be things like C<3>, or C<5,>.
175 This will break a L<custom charnames translator|charnames/CUSTOM
176 TRANSLATORS> which allows numbers for character names, as C<\N{3}> will
177 now mean to match 3 non-newline characters, and not the character whose
178 name is C<3>. (No name defined by the Unicode standard is a number,
179 so only custom translators might be affected.)
181 Perl's developers are somewhat concerned about possible user confusion
182 with the existing C<\N{...}> construct which matches characters by their
183 Unicode name. Consequently, this feature is experimental. We may remove
184 it or change it in a backwards-incompatible way in Perl 5.14.
186 =head2 DTrace support
188 Perl now has some support for DTrace. See "DTrace support" in F<INSTALL>.
190 =head2 Support for C<configure_requires> in CPAN module metadata
192 Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires>
193 keyword in the F<META.yml> metadata file included in most recent CPAN
194 distributions. This allows distribution authors to specify configuration
195 prerequisites that must be installed before running F<Makefile.PL>
198 See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for
199 more on how to specify C<configure_requires> when creating a distribution
202 =head2 C<each>, C<keys>, C<values> are now more flexible
204 The C<each>, C<keys>, C<values> function can now operate on arrays.
206 =head2 C<when> as a statement modifier
208 C<when> is now allowed to be used as a statement modifier.
210 =head2 C<$,> flexibility
212 The variable C<$,> may now be tied.
214 =head2 // in when clauses
216 // now behaves like || in when clauses
218 =head2 Enabling warnings from your shell environment
220 You can now set C<-W> from the C<PERL5OPT> environment variable
222 =head2 C<delete local>
224 C<delete local> now allows you to locally delete a hash entry.
226 =head2 New support for Abstract namespace sockets
228 Abstract namespace sockets are Linux-specific socket type that live in
229 AF_UNIX family, slightly abusing it to be able to use arbitrary
230 character arrays as addresses: They start with nul byte and are not
231 terminated by nul byte, but with the length passed to the socket()
234 =head2 32-bit limit on substr arguments removed
236 The 32-bit limit on C<substr> arguments has now been removed. The full
237 range of the system's signed and unsigned integers is now available for
238 the C<pos> and C<len> arguments.
240 =head1 Potentially Incompatible Changes
242 =head2 Deprecations warn by default
244 Over the years, Perl's developers have deprecated a number of language
245 features for a variety of reasons. Perl now defaults to issuing a
246 warning if a deprecated language feature is used. Many of the deprecations
247 Perl now warns you about have been deprecated for many years. You can
248 find a list of what was deprecated in a given release of Perl in the
249 C<perl5xxdelta.pod> file for that release.
251 To disable this feature in a given lexical scope, you should use C<no
252 warnings 'deprecated';> For information about which language features
253 are deprecated and explanations of various deprecation warnings, please
254 see L<perldiag>. See L</Deprecations> below for the list of features
255 and modules Perl's developers have deprecated as part of this release.
257 =head2 Version number formats
259 Acceptable version number formats have been formalized into "strict" and
260 "lax" rules. C<package NAME VERSION> takes a strict version number.
261 C<UNIVERSAL::VERSION> and the L<version> object constructors take lax
262 version numbers. Providing an invalid version will result in a fatal
263 error. The version argument in C<use NAME VERSION> is first parsed as a
264 numeric literal or v-string and then passed to C<UNIVERSAL::VERSION>
265 (and must then pass the "lax" format test).
267 These formats are documented fully in the L<version> module. To a first
268 approximation, a "strict" version number is a positive decimal number
269 (integer or decimal-fraction) without exponentiation or else a
270 dotted-decimal v-string with a leading 'v' character and at least three
271 components. A "lax" version number allows v-strings with fewer than
272 three components or without a leading 'v'. Under "lax" rules, both
273 decimal and dotted-decimal versions may have a trailing "alpha"
274 component separated by an underscore character after a fractional or
275 dotted-decimal component.
277 The L<version> module adds C<version::is_strict> and C<version::is_lax>
278 functions to check a scalar against these rules.
280 =head2 @INC reorganization
282 In C<@INC>, C<ARCHLIB> and C<PRIVLIB> now occur after after the current
283 version's C<site_perl> and C<vendor_perl>. Modules installed into
284 C<site_perl> and C<vendor_perl> will now be loaded in preference to
285 those installed in C<ARCHLIB> and C<PRIVLIB>.
288 =head2 REGEXPs are now first class
290 Internally, Perl now treats compiled regular expressions (such as
291 those created with C<qr//>) as first class entities. Perl modules which
292 serialize, deserialize or otherwise have deep interaction with Perl's
293 internal data structures need to be updated for this change. Most
294 affected CPAN modules have already been updated as of this writing.
296 =head2 Switch statement changes
298 The C<given>/C<when> switch statement handles complex statements better
299 than Perl 5.10.0 did (These enhancements are also available in
300 5.10.1 and subsequent 5.10 releases.) There are two new cases where
301 C<when> now interprets its argument as a boolean, instead of an
302 expression to be used in a smart match:
306 =item flip-flop operators
308 The C<..> and C<...> flip-flop operators are now evaluated in boolean
309 context, following their usual semantics; see L<perlop/"Range Operators">.
311 Note that, as in perl 5.10.0, C<when (1..10)> will not work to test
312 whether a given value is an integer between 1 and 10; you should use
313 C<when ([1..10])> instead (note the array reference).
315 However, contrary to 5.10.0, evaluating the flip-flop operators in
316 boolean context ensures it can now be useful in a C<when()>, notably
317 for implementing bistable conditions, like in:
319 when (/^=begin/ .. /^=end/) {
323 =item defined-or operator
325 A compound expression involving the defined-or operator, as in
326 C<when (expr1 // expr2)>, will be treated as boolean if the first
327 expression is boolean. (This just extends the existing rule that applies
328 to the regular or operator, as in C<when (expr1 || expr2)>.)
332 =head2 Smart match changes
334 Since Perl 5.10.0, Perl's developers have made a number of changes to
335 the smart match operator. These, of course, also alter the behaviour
336 of the switch statements where smart matching is implicitly used.
337 These changes were also made for the 5.10.1 release, and will remain in
338 subsequent 5.10 releases.
340 =head3 Changes to type-based dispatch
342 The smart match operator C<~~> is no longer commutative. The behaviour of
343 a smart match now depends primarily on the type of its right hand
344 argument. Moreover, its semantics have been adjusted for greater
345 consistency or usefulness in several cases. While the general backwards
346 compatibility is maintained, several changes must be noted:
352 Code references with an empty prototype are no longer treated specially.
353 They are passed an argument like the other code references (even if they
354 choose to ignore it).
358 C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine
359 returns a true value for each key of the hash (or element of the
360 array), instead of passing the whole hash or array as a reference to
365 Due to the commutativity breakage, code references are no longer
366 treated specially when appearing on the left of the C<~~> operator,
367 but like any vulgar scalar.
371 C<undef ~~ %hash> is always false (since C<undef> can't be a key in a
372 hash). No implicit conversion to C<""> is done (as was the case in perl
377 C<$scalar ~~ @array> now always distributes the smart match across the
378 elements of the array. It's true if one element in @array verifies
379 C<$scalar ~~ $element>. This is a generalization of the old behaviour
380 that tested whether the array contained the scalar.
384 The full dispatch table for the smart match operator is given in
385 L<perlsyn/"Smart matching in detail">.
387 =head3 Smart match and overloading
389 According to the rule of dispatch based on the rightmost argument type,
390 when an object overloading C<~~> appears on the right side of the
391 operator, the overload routine will always be called (with a 3rd argument
392 set to a true value, see L<overload>.) However, when the object will
393 appear on the left, the overload routine will be called only when the
394 rightmost argument is a simple scalar. This way, distributivity of smart
395 match across arrays is not broken, as well as the other behaviours with
396 complex types (coderefs, hashes, regexes). Thus, writers of overloading
397 routines for smart match mostly need to worry only with comparing
398 against a scalar, and possibly with stringification overloading; the
399 other common cases will be automatically handled consistently.
401 C<~~> will now refuse to work on objects that do not overload it (in order
402 to avoid relying on the object's underlying structure). (However, if the
403 object overloads the stringification or the numification operators, and
404 if overload fallback is active, it will be used instead, as usual.)
406 =head2 Other potentially incompatible changes
412 The definitions of a number of Unicode properties have changed to match
413 those of the current Unicode standard. These are listed above under
414 L</Unicode overhaul>. This change may break code that expects the old
419 The boolkeys op has moved to the group of hash ops. This breaks binary
424 Filehandles are now always blessed into C<IO::File>.
426 The previous behaviour was to bless Filehandles into L<FileHandle>
427 (an empty proxy class) if it was loaded into memory and otherwise
428 to bless them into C<IO::Handle>.
432 The semantics of C<use feature :5.10*> have changed slightly.
433 See L<"Modules and Pragmata"> for more information.
437 Perl's developers now use git, rather than Perforce. This should be
438 a purely internal change only relevant to people actively working on
439 the core. However, you may see minor difference in perl as a consequence
440 of the change. For example in some of details of the output of C<perl
441 -V>. See L<perlrepository> for more information.
445 As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental
446 C<Test::Harness::Straps> module has been removed.
447 See L</"Modules and Pragmata"> for more details.
451 As part of the C<ExtUtils::MakeMaker> upgrade, the
452 C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules
453 have been removed from this distribution.
457 C<Module::CoreList> no longer contains the C<%:patchlevel> hash.
462 C<length undef> now returns undef.
466 Unsupported private C API functions are now declared "static" to prevent
467 leakage to Perl's public API.
471 To support the bootstrapping process, F<miniperl> no longer builds with
472 UTF-8 support in the regexp engine.
474 This allows a build to complete with PERL_UNICODE set and a UTF-8 locale.
475 Without this there's a bootstrapping problem, as miniperl can't load
476 the UTF-8 components of the regexp engine, because they're not yet built.
480 F<miniperl>'s @INC is now restricted to just C<-I...>, the split of
481 C<$ENV{PERL5LIB}>, and "C<.>"
485 A space or a newline is now required after a C<"#line XXX"> directive.
489 Tied filehandles now have an additional method EOF which provides the
494 To better match all other flow control statements, C<foreach> may no
495 longer be used as an attribute.
499 Perl's command-line switch "-P", which was deprecated in version 5.10.0, has
500 now been removed. The CPAN module C<< Filter::cpp >> can be used as an
508 From time to time, Perl's developers find it necessary to deprecate
509 features or modules we've previously shipped as part of the core
510 distribution. We are well aware of the pain and frustration that a
511 backwards-incompatible change to Perl can cause for developers building
512 or maintaining software in Perl. You can be sure that when we deprecate
513 a functionality or syntax, it isn't a choice we make lightly. Sometimes,
514 we choose to deprecate functionality or syntax because it was found to
515 be poorly designed or implemented. Sometimes, this is because they're
516 holding back other features or causing performance problems. Sometimes,
517 the reasons are more complex. Wherever possible, we try to keep deprecated
518 functionality available to developers in its previous form for at least
519 one major release. So long as a deprecated feature isn't actively
520 disrupting our ability to maintain and extend Perl, we'll try to leave
521 it in place as long as possible.
523 The following items are now deprecated:
529 C<suidperl> is no longer part of Perl. It used to provide a mechanism to
530 emulate setuid permission bits on systems that don't support it properly.
533 =item Use of C<:=> to mean an empty attribute list
535 An accident of Perl's parser meant that these constructions were all
542 with the C<:> being treated as the start of an attribute list, which
543 ends before the C<=>. As whitespace is not significant here, all are
544 parsed as an empty attribute list, hence all the above are equivalent
545 to, and better written as
549 because no attribute processing is done for an empty list.
551 As is, this meant that C<:=> cannot be used as a new token, without
552 silently changing the meaning of existing code. Hence that particular
553 form is now deprecated, and will become a syntax error. If it is
554 absolutely necessary to have empty attribute lists (for example,
555 because of a code generator) then avoid the warning by adding a space
558 =item C<< UNIVERSAL->import() >>
560 The method C<< UNIVERSAL->import() >> is now deprecated. Attempting to
561 pass import arguments to a C<use UNIVERSAL> statement will result in a
565 =item Use of "goto" to jump into a construct
567 Using C<goto> to jump from an outer scope into an inner scope is now
568 deprecated. This rare use case was causing problems in the
569 implementation of scopes.
571 =item Custom character names in \N{name} that don't look like names
573 In C<\N{I<name>}>, I<name> can be just about anything. The standard
574 Unicode names have a very limited domain, but a custom name translator
575 could create names that are, for example, made up entirely of punctuation
576 symbols. It is now deprecated to make names that don't begin with an
577 alphabetic character, and aren't alphanumeric or contain other than
578 a very few other characters, namely spaces, dashes, parentheses
579 and colons. Because of the added meaning of C<\N> (See L</C<\N>
580 experimental regex escape>), names that look like curly brace -enclosed
581 quantifiers won't work. For example, C<\N{3,4}> now means to match 3 to
582 4 non-newlines; before a custom name C<3,4> could have been created.
584 =item Deprecated Modules
586 The following modules will be removed from the core distribution in a
587 future release, and should be installed from CPAN instead. Distributions
588 on CPAN which require these should add them to their prerequisites. The
589 core versions of these modules warnings will issue a deprecation warning.
591 If you ship a packaged version of Perl, either alone or as part of a
592 larger system, then you should carefully consider the repercussions of
593 core module deprecations. You may want to consider shipping your default
594 build of Perl with packages for some or all deprecated modules which
595 install into C<vendor> or C<site> perl library directories. This will
596 inhibit the deprecation warnings.
598 Alternatively, you may want to consider patching F<lib/deprecate.pm>
599 to provide deprecation warnings specific to your packaging system
600 or distribution of Perl, consistent with how your packaging system
601 or distribution manages a staged transition from a release where the
602 installation of a single package provides the given functionality, to
603 a later release where the system administrator needs to know to install
604 multiple packages to get that same functionality.
606 You can silence these deprecation warnings by installing the modules
607 in question from CPAN. To install the latest version of all of them,
608 just install C<Task::Deprecations::5_12>.
614 =item L<Pod::Plainer>
620 Switch is buggy and should be avoided. You may find Perl's new
621 C<given>/C<when> feature a suitable replacement. See L<perlsyn/"Switch
622 statements"> for more information.
626 =item Assignment to $[
628 =item Use of the attribute :locked on subroutines
630 =item Use of "locked" with the attributes pragma
632 =item Use of "unique" with the attributes pragma
636 C<Perl_pmflag> is no longer part of Perl's public API. Calling it now
637 generates a deprecation warning, and it will be removed in a future
638 release. Although listed as part of the API, it was never documented,
639 and only ever used in F<toke.c>, and prior to 5.10, F<regcomp.c>. In
640 core, it has been replaced by a static function.
642 =item Numerous Perl 4-era libraries
644 F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>,
645 F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>,
646 F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>,
647 F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>,
648 F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>,
649 F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and
650 F<timelocal.pl> are all now deprecated. Earlier, Perl's developers
651 intended to remove these libraries from Perl's core for the 5.14.0 release.
653 During final testing before the release of 5.12.0, several developers
654 discovered current production code using these ancient libraries, some
655 inside the Perl core itself. Accordingly, the pumpking granted them
656 a stay of execution. They will begin to warn about their deprecation
657 in the 5.14.0 release and will be removed in the 5.16.0 release.
662 =head1 Unicode overhaul
664 Perl's developers have made a concerted effort to update Perl to be in
665 sync with the latest Unicode standard. Changes for this include:
667 Perl can now handle every Unicode character property. New documentation,
668 L<perluniprops>, lists all available non-Unihan character properties. By
669 default, perl does not expose Unihan, deprecated or Unicode-internal
670 properties. See below for more details on these; there is also a section
671 in the pod listing them, and explaining why they are not exposed.
673 Perl now fully supports the Unicode compound-style of using C<=>
674 and C<:> in writing regular expressions: C<\p{property=value}> and
675 C<\p{property:value}> (both of which mean the same thing).
677 Perl now fully supports the Unicode loose matching rules for text between
678 the braces in C<\p{...}> constructs. In addition, Perl allows underscores
679 between digits of numbers.
681 Perl now accepts all the Unicode-defined synonyms for properties and
684 C<qr/\X/>, which matches a Unicode logical character, has
685 been expanded to work better with various Asian languages. It
686 now is defined as an I<extended grapheme cluster>. (See
687 L<http://www.unicode.org/reports/tr29/>). Anything matched previously
688 and that made sense will continue to be accepted. Additionally:
694 C<\X> will not break apart a C<S<CR LF>> sequence.
698 C<\X> will now match a sequence which includes the C<ZWJ> and C<ZWNJ>
703 C<\X> will now always match at least one character, including an initial
704 mark. Marks generally come after a base character, but it is possible in
705 Unicode to have them in isolation, and C<\X> will now handle that case,
706 for example at the beginning of a line, or after a C<ZWSP>. And this is
707 the part where C<\X> doesn't match the things that it used to that don't
708 make sense. Formerly, for example, you could have the nonsensical case
713 C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai
714 and Lao exception cases.
718 Otherwise, this change should be transparent for the non-affected
721 C<\p{...}> matches using the Canonical_Combining_Class property were
722 completely broken in previous releases of Perl. They should now work
725 Before Perl 5.12, the Unicode C<Decomposition_Type=Compat> property
726 and a Perl extension had the same name, which led to neither matching
727 all the correct values (with more than 100 mistakes in one, and several
728 thousand in the other). The Perl extension has now been renamed to be
729 C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the
730 same meaning as was previously intended, namely the union of all the
731 non-canonical Decomposition types, with Unicode C<Compat> being just
734 C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables.
736 C<\p{Uppercase}> and C<\p{Lowercase}> now work as the Unicode standard
737 says they should. This means they each match a few more characters than
740 C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This
741 means it no longer will match Private Use (gc=co), Surrogates (gc=cs),
742 nor Format (gc=cf) code points. The Format code points represent the
743 biggest possible problem. All but 36 of them are either officially
744 deprecated or strongly discouraged from being used. Of those 36, likely
745 the most widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ,
746 WJ, and similar characters, plus bidirectional controls.
748 C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. Before
749 5.12, Perl's definition definition included a number of things that aren't
750 really alpha (all marks) while omitting many that were. The definitions
751 of C<\p{Alnum}> and C<\p{Word}> depend on Alpha's definition and have
754 C<\p{Word}> no longer incorrectly matches non-word characters such
757 C<\p{Print}> no longer matches the line control characters: Tab, LF,
758 CR, FF, VT, and NEL. This brings it in line with standards and the
761 C<\p{XDigit}> now matches the same characters as C<\p{Hex_Digit}>. This
762 means that in addition to the characters it currently matches,
763 C<[A-Fa-f0-9]>, it will also match the 22 fullwidth equivalents, for
764 example U+FF10: FULLWIDTH DIGIT ZERO.
766 The Numeric type property has been extended to include the Unihan
769 There is a new Perl extension, the 'Present_In', or simply 'In',
770 property. This is an extension of the Unicode Age property, but
771 C<\p{In=5.0}> matches any code point whose usage has been determined
772 I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points
773 added in I<precisely> version 5.0.
775 A number of properties now have the correct values for unassigned
776 code points. The affected properties are Bidi_Class, East_Asian_Width,
777 Joining_Type, Decomposition_Type, Hangul_Syllable_Type, Numeric_Type,
780 The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
781 are now up to date with current Unicode definitions.
783 Earlier versions of Perl erroneously exposed certain properties that
784 are supposed to be Unicode internal-only. Use of these in regular
785 expressions will now generate, if enabled, a deprecation warning message.
786 The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point,
787 Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase,
788 Other_Math, and Other_Uppercase.
790 It is now possible to change which Unicode properties Perl understands
791 on a per-installation basis. As mentioned above, certain properties
792 are turned off by default. These include all the Unihan properties
793 (which should be accessible via the CPAN module Unicode::Unihan) and any
794 deprecated or Unicode internal-only property that Perl has never exposed.
796 The generated files in the C<lib/unicore/To> directory are now more
797 clearly marked as being stable, directly usable by applications. New hash
798 entries in them give the format of the normal entries, which allows for
799 easier machine parsing. Perl can generate files in this directory for
800 any property, though most are suppressed. You can find instructions
801 for changing which are written in L<perluniprops>.
803 =head1 Modules and Pragmata
805 =head2 New Modules and Pragmata
811 C<autodie> is a new lexically-scoped alternative for the C<Fatal> module.
812 The bundled version is 2.06_01. Note that in this release, using a string
813 eval when C<autodie> is in effect can cause the autodie behaviour to leak
814 into the surrounding scope. See L<autodie/"BUGS"> for more details.
816 Version 2.06_01 has been added to the Perl core.
818 =item C<Compress::Raw::Bzip2>
820 Version 2.024 has been added to the Perl core.
824 C<overloading> allows you to lexically disable or enable overloading
825 for some or all operations.
827 Version 0.001 has been added to the Perl core.
831 C<parent> establishes an ISA relationship with base classes at compile
832 time. It provides the key feature of C<base> without further unwanted
835 Version 0.223 has been added to the Perl core.
837 =item C<Parse::CPAN::Meta>
839 Version 1.40 has been added to the Perl core.
843 Version 1.03 has been added to the Perl core.
847 Version 2.4 has been added to the Perl core.
849 =item C<XS::APItest::KeywordRPN>
851 Version 0.003 has been added to the Perl core.
855 =head2 Updated Pragmata
861 Upgraded from version 2.13 to 2.15.
865 Upgraded from version 0.22 to 0.23.
869 C<charnames> now contains the Unicode F<NameAliases.txt> database file.
870 This has the effect of adding some extra C<\N> character names that
871 formerly wouldn't have been recognised; for example, C<"\N{LATIN CAPITAL
874 Upgraded from version 1.06 to 1.07.
878 Upgraded from version 1.13 to 1.20.
882 C<diagnostics> now supports %.0f formatting internally.
884 C<diagnostics> no longer suppresses C<Use of uninitialized value in range
885 (or flip)> warnings. [perl #71204]
887 Upgraded from version 1.17 to 1.19.
891 In C<feature>, the meaning of the C<:5.10> and C<:5.10.X> feature
892 bundles has changed slightly. The last component, if any (i.e. C<X>) is
893 simply ignored. This is predicated on the assumption that new features
894 will not, in general, be added to maintenance releases. So C<:5.10>
895 and C<:5.10.X> have identical effect. This is a change to the behaviour
896 documented for 5.10.0.
898 C<feature> now includes the C<unicode_strings> feature:
900 use feature "unicode_strings";
902 This pragma turns on Unicode semantics for the case-changing operations
903 (C<uc>, C<lc>, C<ucfirst>, C<lcfirst>) on strings that don't have the
904 internal UTF-8 flag set, but that contain single-byte characters between
907 Upgraded from version 1.11 to 1.16.
911 C<less> now includes the C<stash_name> method to allow subclasses of
912 C<less> to pick where in %^H to store their stash.
914 Upgraded from version 0.02 to 0.03.
918 Upgraded from version 0.5565 to 0.62.
922 C<mro> is now implemented as an XS extension. The documented interface has
923 not changed. Code relying on the implementation detail that some C<mro::>
924 methods happened to be available at all times gets to "keep both pieces".
926 Upgraded from version 1.00 to 1.02.
930 C<overload> now allow overloading of 'qr'.
932 Upgraded from version 1.06 to 1.10.
936 Upgraded from version 1.67 to 1.75.
938 =item C<threads::shared>
940 Upgraded from version 1.14 to 1.32.
944 C<version> now has support for L</Version number formats> as described
945 earlier in this document and in its own documentation.
947 Upgraded from version 0.74 to 0.82.
951 C<warnings> has a new C<warnings::fatal_enabled()> function. It also
952 includes a new C<illegalproto> warning category. See also L</New or
953 Changed Diagnostics> for this change.
955 Upgraded from version 1.06 to 1.09.
959 =head2 Updated Modules
963 =item C<Archive::Extract>
965 Upgraded from version 0.24 to 0.38.
967 =item C<Archive::Tar>
969 Upgraded from version 1.38 to 1.54.
971 =item C<Attribute::Handlers>
973 Upgraded from version 0.79 to 0.87.
977 Upgraded from version 5.63 to 5.70.
981 Upgraded from version 0.74 to 0.78.
985 Upgraded from version 1.05 to 1.12.
989 Upgraded from version 0.83 to 0.96.
993 Upgraded from version 1.09 to 1.11_01.
997 Upgraded from version 3.29 to 3.48.
1001 Upgraded from version 0.33 to 0.36.
1003 NOTE: C<Class::ISA> is deprecated and may be removed from a future
1006 =item C<Compress::Raw::Zlib>
1008 Upgraded from version 2.008 to 2.024.
1012 Upgraded from version 1.9205 to 1.94_56.
1016 Upgraded from version 0.84 to 0.90.
1018 =item C<CPANPLUS::Dist::Build>
1020 Upgraded from version 0.06_02 to 0.46.
1022 =item C<Data::Dumper>
1024 Upgraded from version 2.121_14 to 2.125.
1028 Upgraded from version 1.816_1 to 1.820.
1030 =item C<Devel::PPPort>
1032 Upgraded from version 3.13 to 3.19.
1036 Upgraded from version 1.15 to 1.16.
1038 =item C<Digest::MD5>
1040 Upgraded from version 2.36_01 to 2.39.
1042 =item C<Digest::SHA>
1044 Upgraded from version 5.45 to 5.47.
1048 Upgraded from version 2.23 to 2.39.
1052 Upgraded from version 5.62 to 5.64_01.
1054 =item C<ExtUtils::CBuilder>
1056 Upgraded from version 0.21 to 0.27.
1058 =item C<ExtUtils::Command>
1060 Upgraded from version 1.13 to 1.16.
1062 =item C<ExtUtils::Constant>
1064 Upgraded from version 0.2 to 0.22.
1066 =item C<ExtUtils::Install>
1068 Upgraded from version 1.44 to 1.55.
1070 =item C<ExtUtils::MakeMaker>
1072 Upgraded from version 6.42 to 6.56.
1074 =item C<ExtUtils::Manifest>
1076 Upgraded from version 1.51_01 to 1.57.
1078 =item C<ExtUtils::ParseXS>
1080 Upgraded from version 2.18_02 to 2.21.
1082 =item C<File::Fetch>
1084 Upgraded from version 0.14 to 0.24.
1088 Upgraded from version 2.04 to 2.08_01.
1092 Upgraded from version 0.18 to 0.22.
1094 =item C<Filter::Simple>
1096 Upgraded from version 0.82 to 0.84.
1098 =item C<Filter::Util::Call>
1100 Upgraded from version 1.07 to 1.08.
1102 =item C<Getopt::Long>
1104 Upgraded from version 2.37 to 2.38.
1108 Upgraded from version 1.23_01 to 1.25_02.
1112 Upgraded from version 1.07 to 1.10.
1116 Upgraded from version 0.40_1 to 0.54.
1120 Upgraded from version 1.05 to 2.01.
1122 =item C<Locale::Maketext>
1124 Upgraded from version 1.12 to 1.14.
1126 =item C<Locale::Maketext::Simple>
1128 Upgraded from version 0.18 to 0.21.
1130 =item C<Log::Message>
1132 Upgraded from version 0.01 to 0.02.
1134 =item C<Log::Message::Simple>
1136 Upgraded from version 0.04 to 0.06.
1138 =item C<Math::BigInt>
1140 Upgraded from version 1.88 to 1.89_01.
1142 =item C<Math::BigInt::FastCalc>
1144 Upgraded from version 0.16 to 0.19.
1146 =item C<Math::BigRat>
1148 Upgraded from version 0.21 to 0.24.
1150 =item C<Math::Complex>
1152 Upgraded from version 1.37 to 1.56.
1156 Upgraded from version 1.01_02 to 1.01_03.
1158 =item C<MIME::Base64>
1160 Upgraded from version 3.07_01 to 3.08.
1162 =item C<Module::Build>
1164 Upgraded from version 0.2808_01 to 0.3603.
1166 =item C<Module::CoreList>
1168 Upgraded from version 2.12 to 2.29.
1170 =item C<Module::Load>
1172 Upgraded from version 0.12 to 0.16.
1174 =item C<Module::Load::Conditional>
1176 Upgraded from version 0.22 to 0.34.
1178 =item C<Module::Loaded>
1180 Upgraded from version 0.01 to 0.06.
1182 =item C<Module::Pluggable>
1184 Upgraded from version 3.6 to 3.9.
1188 Upgraded from version 2.33 to 2.36.
1192 Upgraded from version 0.60_01 to 0.64.
1194 =item C<Object::Accessor>
1196 Upgraded from version 0.32 to 0.36.
1198 =item C<Package::Constants>
1200 Upgraded from version 0.01 to 0.02.
1204 Upgraded from version 1.04 to 1.06.
1206 =item C<Pod::Parser>
1208 Upgraded from version 1.35 to 1.37.
1210 =item C<Pod::Perldoc>
1212 Upgraded from version 3.14_02 to 3.15_02.
1214 =item C<Pod::Plainer>
1216 Upgraded from version 0.01 to 1.02.
1218 NOTE: C<Pod::Plainer> is deprecated and may be removed from a future
1221 =item C<Pod::Simple>
1223 Upgraded from version 3.05 to 3.13.
1227 Upgraded from version 2.12 to 2.22.
1231 Upgraded from version 1.11 to 1.17.
1235 Upgraded from version 2.18 to 2.22.
1239 Upgraded from version 2.13 to 2.16.
1241 NOTE: C<Switch> is deprecated and may be removed from a future version
1244 =item C<Sys::Syslog>
1246 Upgraded from version 0.22 to 0.27.
1248 =item C<Term::ANSIColor>
1250 Upgraded from version 1.12 to 2.02.
1254 Upgraded from version 0.18 to 0.20.
1258 Upgraded from version 1.25 to 1.25_02.
1260 =item C<Test::Harness>
1262 Upgraded from version 2.64 to 3.17.
1264 =item C<Test::Simple>
1266 Upgraded from version 0.72 to 0.94.
1268 =item C<Text::Balanced>
1270 Upgraded from version 2.0.0 to 2.02.
1272 =item C<Text::ParseWords>
1274 Upgraded from version 3.26 to 3.27.
1276 =item C<Text::Soundex>
1278 Upgraded from version 3.03 to 3.03_01.
1280 =item C<Thread::Queue>
1282 Upgraded from version 2.00 to 2.11.
1284 =item C<Thread::Semaphore>
1286 Upgraded from version 2.01 to 2.09.
1288 =item C<Tie::RefHash>
1290 Upgraded from version 1.37 to 1.38.
1292 =item C<Time::HiRes>
1294 Upgraded from version 1.9711 to 1.9719.
1296 =item C<Time::Local>
1298 Upgraded from version 1.18 to 1.1901_01.
1300 =item C<Time::Piece>
1302 Upgraded from version 1.12 to 1.15.
1304 =item C<Unicode::Collate>
1306 Upgraded from version 0.52 to 0.52_01.
1308 =item C<Unicode::Normalize>
1310 Upgraded from version 1.02 to 1.03.
1314 Upgraded from version 0.34 to 0.39.
1316 =item C<Win32API::File>
1318 Upgraded from version 0.1001_01 to 0.1101.
1322 Upgraded from version 0.08 to 0.10.
1326 =head2 Removed Modules and Pragmata
1332 Removed from the Perl core. Prior version was 1.02.
1334 =item C<CPAN::API::HOWTO>
1336 Removed from the Perl core. Prior version was 'undef'.
1338 =item C<CPAN::DeferedCode>
1340 Removed from the Perl core. Prior version was 5.50.
1342 =item C<CPANPLUS::inc>
1344 Removed from the Perl core. Prior version was 'undef'.
1348 Removed from the Perl core. Prior version was 1.03.
1350 =item C<ExtUtils::MakeMaker::bytes>
1352 Removed from the Perl core. Prior version was 6.42.
1354 =item C<ExtUtils::MakeMaker::vmsish>
1356 Removed from the Perl core. Prior version was 6.42.
1360 Removed from the Perl core. Prior version was 2.3.
1362 =item C<Test::Harness::Assert>
1364 Removed from the Perl core. Prior version was 0.02.
1366 =item C<Test::Harness::Iterator>
1368 Removed from the Perl core. Prior version was 0.02.
1370 =item C<Test::Harness::Point>
1372 Removed from the Perl core. Prior version was 0.01.
1374 =item C<Test::Harness::Results>
1376 Removed from the Perl core. Prior version was 0.01.
1378 =item C<Test::Harness::Straps>
1380 Removed from the Perl core. Prior version was 0.26_01.
1382 =item C<Test::Harness::Util>
1384 Removed from the Perl core. Prior version was 0.01.
1388 Removed from the Perl core. Prior version was 1.1.
1392 =head2 Deprecated Modules and Pragmata
1394 See L</Deprecated Modules> above.
1397 =head1 Documentation
1399 =head2 New Documentation
1405 L<perlhaiku> contains instructions on how to build perl for the Haiku
1410 L<perlmroapi> describes the new interface for pluggable Method Resolution
1415 L<perlperf>, by Richard Foley, provides an introduction to the use of
1416 performance and optimization techniques which can be used with particular
1417 reference to perl programs.
1421 L<perlrepository> describes how to access the perl source using the I<git>
1422 version control system.
1426 L<perlpolicy> extends the "Social contract about contributed modules" into
1427 the beginnings of a document on Perl porting policies.
1431 =head2 Changes to Existing Documentation
1439 The various large F<Changes*> files (which listed every change made
1440 to perl over the last 18 years) have been removed, and replaced by a
1441 small file, also called F<Changes>, which just explains how that same
1442 information may be extracted from the git version control system.
1446 F<Porting/patching.pod> has been deleted, as it mainly described
1447 interacting with the old Perforce-based repository, which is now obsolete.
1448 Information still relevant has been moved to L<perlrepository>.
1453 The syntax C<unless (EXPR) BLOCK else BLOCK> is now documented as valid,
1454 as is the syntax C<unless (EXPR) BLOCK elsif (EXPR) BLOCK ... else
1455 BLOCK>, although actually using the latter may not be the best idea for
1456 the readability of your source code.
1461 Documented -X overloading.
1465 Documented that C<when()> treats specially most of the filetest operators
1469 Documented C<when> as a syntax modifier.
1473 Eliminated "Old Perl threads tutorial", which described 5005 threads.
1475 F<pod/perlthrtut.pod> is the same material reworked for ithreads.
1479 Correct previous documentation: v-strings are not deprecated
1481 With version objects, we need them to use MODULE VERSION syntax. This
1482 patch removes the deprecation notice.
1486 Security contact information is now part of L<perlsec>.
1490 A significant fraction of the core documentation has been updated to
1491 clarify the behavior of Perl's Unicode handling.
1493 Much of the remaining core documentation has been reviewed and edited
1494 for clarity, consistent use of language, and to fix the spelling of Tom
1495 Christiansen's name.
1499 The Pod specification (L<perlpodspec>) has been updated to bring the
1500 specification in line with modern usage already supported by most Pod
1501 systems. A parameter string may now follow the format name in a
1502 "begin/end" region. Links to URIs with a text description are now
1503 allowed. The usage of C<LE<lt>"section"E<gt>> has been marked as
1508 L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
1509 conditional loading of modules despite the implicit BEGIN block around
1514 The documentation for C<$1> in perlvar.pod has been clarified.
1518 C<\N{U+I<code point>}> is now documented.
1522 =head1 Selected Performance Enhancements
1528 A new internal cache means that C<isa()> will often be faster.
1532 The implementation of C<C3> Method Resolution Order has been
1533 optimised - linearisation for classes with single inheritance is 40%
1534 faster. Performance for multiple inheritance is unchanged.
1538 Under C<use locale>, the locale-relevant information is now cached on
1539 read-only values, such as the list returned by C<keys %hash>. This makes
1540 operations such as C<sort keys %hash> in the scope of C<use locale>
1545 Empty C<DESTROY> methods are no longer called.
1549 C<Perl_sv_utf8_upgrade()> is now faster.
1553 C<keys> on empty hash is now faster.
1557 C<if (%foo)> has been optimized to be faster than C<if (keys %foo)>.
1561 The string repetition operator (C<$str x $num>) is now several times
1562 faster when C<$str> has length one or C<$num> is large.
1566 Reversing an array to itself (as in C<@a = reverse @a>) in void context
1567 now happens in-place and is several orders of magnitude faster than
1568 it used to be. It will also preserve non-existent elements whenever
1569 possible, i.e. for non magical arrays or tied arrays with C<EXISTS>
1570 and C<DELETE> methods.
1574 =head1 Installation and Configuration Improvements
1580 L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all
1581 generated at build time, rather than being shipped as part of the release.
1585 If C<vendorlib> and C<vendorarch> are the same, then they are only added
1590 C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if
1591 perl is built with C<-Dusedevel>.
1595 F<Configure> will enable use of C<-fstack-protector>, to provide protection
1596 against stack-smashing attacks, if the compiler supports it.
1600 F<Configure> will now determine the correct prototypes for re-entrant
1601 functions and for C<gconvert> if you are using a C++ compiler rather
1606 On Unix, if you build from a tree containing a git repository, the
1607 configuration process will note the commit hash you have checked out, for
1608 display in the output of C<perl -v> and C<perl -V>. Unpushed local commits
1609 are automatically added to the list of local patches displayed by
1614 Perl now supports SystemTap's C<dtrace> compatibility layer and an
1615 issue with linking C<miniperl> has been fixed in the process.
1619 perldoc now uses C<less -R> instead of C<less> for improved behaviour
1620 in the face of C<groff>'s new usage of ANSI escape codes.
1625 C<perl -V> now reports use of the compile-time options C<USE_PERL_ATOF> and
1626 C<USE_ATTRIBUTES_FOR_PERLIO>.
1630 As part of the flattening of F<ext>, all extensions on all platforms are
1631 built by F<make_ext.pl>. This replaces the Unix-specific
1632 F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific
1633 F<win32/buildext.pl>.
1637 =head1 Internal Changes
1639 Each release of Perl sees numerous internal changes which shouldn't
1640 affect day to day usage but may still be notable for developers working
1641 with Perl's source code.
1647 The J.R.R. Tolkien quotes at the head of C source file have been checked
1648 and proper citations added, thanks to a patch from Tom Christiansen.
1652 The internal structure of the dual-life modules traditionally found in
1653 the F<lib/> and F<ext/> directories in the perl source has changed
1654 significantly. Where possible, dual-lifed modules have been extracted
1655 from F<lib/> and F<ext/>.
1657 Dual-lifed modules maintained by Perl's developers as part of the Perl
1658 core now live in F<dist/>. Dual-lifed modules maintained primarily on
1659 CPAN now live in F<cpan/>. When reporting a bug in a module located
1660 under F<cpan/>, please send your bug report directly to the module's
1661 bug tracker or author, rather than Perl's bug tracker.
1665 C<\N{...}> now compiles better, always forces UTF-8 internal representation
1667 Perl's developers have fixed several problems with the recognition of
1668 C<\N{...}> constructs. As part of this, perl will store any scalar
1669 or regex containing C<\N{I<name>}> or C<\N{U+I<code point>}> in its
1670 definition in UTF-8 format. (This was true previously for all occurrences
1671 of C<\N{I<name>}> that did not use a custom translator, but now it's
1676 Perl_magic_setmglob now knows about globs, fixing RT #71254.
1680 C<SVt_RV> no longer exists. RVs are now stored in IVs.
1684 C<Perl_vcroak()> now accepts a null first argument. In addition, a full
1685 audit was made of the "not NULL" compiler annotations, and those for
1686 several other internal functions were corrected.
1690 New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO>
1691 have been added to formalise the temporary saving of the C<errno>
1696 The function C<Perl_sv_insert_flags> has been added to augment
1701 The function C<Perl_newSV_type(type)> has been added, equivalent to
1702 C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>.
1706 The function C<Perl_newSVpvn_flags()> has been added, equivalent to
1707 C<Perl_newSVpvn()> and then performing the action relevant to the flag.
1709 Two flag bits are currently supported.
1715 C<SVf_UTF8> will call C<SvUTF8_on()> for you. (Note that this does
1716 not convert an sequence of ISO 8859-1 characters to UTF-8). A wrapper,
1717 C<newSVpvn_utf8()> is available for this.
1721 C<SVs_TEMP> now calls C<Perl_sv_2mortal()> on the new SV.
1725 There is also a wrapper that takes constant strings, C<newSVpvs_flags()>.
1729 The function C<Perl_croak_xs_usage> has been added as a wrapper to
1734 Perl now exports the functions C<PerlIO_find_layer> and C<PerlIO_list_alloc>.
1738 C<PL_na> has been exterminated from the core code, replaced by local
1739 STRLEN temporaries, or C<*_nolen()> calls. Either approach is faster than
1740 C<PL_na>, which is a pointer dereference into the interpreter structure
1741 under ithreads, and a global variable otherwise.
1745 C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()>
1746 on the scalar. It now updates the linked list to remove each piece of
1747 magic as it is freed.
1751 Under ithreads, the regex in C<PL_reg_curpm> is now reference
1752 counted. This eliminates a lot of hackish workarounds to cope with it
1753 not being reference counted.
1757 C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>.
1758 This has been fixed.
1762 The I<public> IV and NV flags are now not set if the string value has
1763 trailing "garbage". This behaviour is consistent with not setting the
1764 public IV or NV flags if the value is out of range for the type.
1768 Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have
1769 been replaced by C<NULL> in the core code, and non-dual-life modules,
1770 as C<NULL> is clearer to those unfamiliar with the core code.
1774 A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will
1775 not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>,
1776 C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without
1777 casting away C<const>. This allows proper compile-time auditing of
1778 C<const> correctness in the core, and helped picked up some errors
1783 Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the
1784 stack and mortalizing them.
1788 Use of the private structure C<mro_meta> has changed slightly. Nothing
1789 outside the core should be accessing this directly anyway.
1793 A new tool, F<Porting/expand-macro.pl> has been added, that allows you
1794 to view how a C preprocessor macro would be expanded when compiled.
1795 This is handy when trying to decode the macro hell that is the perl
1802 =head2 Testing improvements
1806 =item Parallel tests
1808 The core distribution can now run its regression tests in parallel on
1809 Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in
1810 your environment to the number of tests to run in parallel, and run
1811 C<make test_harness>. On a Bourne-like shell, this can be done as
1813 TEST_JOBS=3 make test_harness # Run 3 tests in parallel
1815 An environment variable is used, rather than parallel make itself, because
1816 L<TAP::Harness> needs to be able to schedule individual non-conflicting test
1817 scripts itself, and there is no standard interface to C<make> utilities to
1818 interact with their job schedulers.
1820 Note that currently some test scripts may fail when run in parallel (most
1821 notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts
1822 again sequentially and see if the failures go away.
1824 =item Test harness flexibility
1826 It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
1830 Several tests that have the potential to hang forever if they fail now
1831 incorporate a "watchdog" functionality that will kill them after a timeout,
1832 which helps ensure that C<make test> and C<make test_harness> run to
1833 completion automatically.
1840 Perl's developers have added a number of new tests to the core.
1841 In addition to the items listed below, many modules updated from CPAN
1842 incorporate new tests.
1848 Significant cleanups to core tests to ensure that language and
1849 interpreter features are not used before they're tested.
1853 C<make test_porting> now runs a number of important pre-commit checks
1854 which might be of use to anyone working on the Perl core.
1858 F<t/porting/podcheck.t> automatically checks the well-formedness of
1859 POD found in all .pl, .pm and .pod files in the F<MANIFEST>, other than in
1860 dual-lifed modules which are primarily maintained outside the Perl core.
1864 F<t/porting/manifest.t> now tests that all files listed in MANIFEST
1869 F<t/op/while_readdir.t> tests that a bare readdir in while loop sets $_.
1873 F<t/comp/retainedlines.t> checks that the debugger can retain source
1878 F<t/io/perlio_fail.t> checks that bad layers fail.
1882 F<t/io/perlio_leaks.t> checks that PerlIO layers are not leaking.
1886 F<t/io/perlio_open.t> checks that certain special forms of open work.
1890 F<t/io/perlio.t> includes general PerlIO tests.
1894 F<t/io/pvbm.t> checks that there is no unexpected interaction between
1895 the internal types C<PVBM> and C<PVGV>.
1899 F<t/mro/package_aliases.t> checks that mro works properly in the presence
1900 of aliased packages.
1904 F<t/op/dbm.t> tests C<dbmopen> and C<dbmclose>.
1908 F<t/op/index_thr.t> tests the interaction of C<index> and threads.
1912 F<t/op/pat_thr.t> tests the interaction of esoteric patterns and threads.
1916 F<t/op/qr_gc.t> tests that C<qr> doesn't leak.
1920 F<t/op/reg_email_thr.t> tests the interaction of regex recursion and threads.
1924 F<t/op/regexp_qr_embed_thr.t> tests the interaction of patterns with
1925 embedded C<qr//> and threads.
1929 F<t/op/regexp_unicode_prop.t> tests Unicode properties in regular
1934 F<t/op/regexp_unicode_prop_thr.t> tests the interaction of Unicode
1935 properties and threads.
1939 F<t/op/reg_nc_tie.t> tests the tied methods of C<Tie::Hash::NamedCapture>.
1943 F<t/op/reg_posixcc.t> checks that POSIX character classes behave
1948 F<t/op/re.t> checks that exportable C<re> functions in F<universal.c> work.
1952 F<t/op/setpgrpstack.t> checks that C<setpgrp> works.
1956 F<t/op/substr_thr.t> tests the interaction of C<substr> and threads.
1960 F<t/op/upgrade.t> checks that upgrading and assigning scalars works.
1964 F<t/uni/lex_utf8.t> checks that Unicode in the lexer works.
1968 F<t/uni/tie.t> checks that Unicode and C<tie> work.
1972 F<t/comp/final_line_num.t> tests whether line numbers are correct at EOF
1976 F<t/comp/form_scope.t> tests format scoping.
1980 F<t/comp/line_debug.t> tests whether C<< @{"_<$file"} >> works.
1984 F<t/op/filetest_t.t> tests if -t file test works.
1988 F<t/op/qr.t> tests C<qr>.
1992 F<t/op/utf8cache.t> tests malfunctions of the utf8 cache.
1996 F<t/re/uniprops.t> test unicodes C<\p{}> regex constructs.
2000 F<t/op/filehandle.t> tests some suitably portable filetest operators
2001 to check that they work as expected, particularly in the light of some
2002 internal changes made in how filehandles are blessed.
2006 F<t/op/time_loop.t> tests that unix times greater than C<2**63>, which
2007 can now be handed to C<gmtime> and C<localtime>, do not cause an internal
2008 overflow or an excessively long loop.
2013 =head1 New or Changed Diagnostics
2015 =head2 New Diagnostics
2021 SV allocation tracing has been added to the diagnostics enabled by C<-Dm>.
2022 The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if
2023 that was enabled when the F<perl> binary was compiled.
2027 Smartmatch resolution tracing has been added as a new diagnostic. Use
2028 C<-DM> to enable it.
2032 A new debugging flag C<-DB> now dumps subroutine definitions, leaving
2033 C<-Dx> for its original purpose of dumping syntax trees.
2037 Perl 5.12 provides a number of new diagnostic messages to help you write
2038 better code. See L<perldiag> for details of these new messages.
2044 C<Bad plugin affecting keyword '%s'>
2048 C<gmtime(%.0f) too large>
2052 C<Lexing code attempted to stuff non-Latin-1 character into Latin-1 input>
2056 C<Lexing code internal error (%s)>
2060 C<localtime(%.0f) too large>
2064 C<Overloaded dereference did not return a reference>
2068 C<Overloaded qr did not return a REGEXP>
2072 C<Perl_pmflag() is deprecated, and will be removed from the XS API>
2076 C<lvalue attribute ignored after the subroutine has been defined>
2078 This new warning is issued when one attempts to mark a subroutine as
2079 lvalue after it has been defined.
2083 Perl now warns you if C<++> or C<--> are unable to change the value
2084 because it's beyond the limit of representation.
2086 This uses a new warnings category: "imprecision".
2090 C<lc>, C<uc>, C<lcfirst>, and C<ucfirst> warn when passed undef.
2094 C<Show constant in "Useless use of a constant in void context">
2098 C<Prototype after '%s'>
2102 C<panic: sv_chop %s>
2104 This new fatal error occurs when the C routine C<Perl_sv_chop()> was
2105 passed a position that is not within the scalar's string buffer. This
2106 could be caused by buggy XS code, and at this point recovery is not
2112 The fatal error C<Malformed UTF-8 returned by \N> is now produced if the
2113 C<charnames> handler returns malformed UTF-8.
2117 If an unresolved named character or sequence was encountered when
2118 compiling a regex pattern then the fatal error C<\N{NAME} must be resolved
2119 by the lexer> is now produced. This can happen, for example, when using a
2120 single-quotish context like C<$re = '\N{SPACE}'; /$re/;>. See L<perldiag>
2121 for more examples of how the lexer can get bypassed.
2125 C<Invalid hexadecimal number in \N{U+...}> is a new fatal error
2126 triggered when the character constant represented by C<...> is not a
2127 valid hexadecimal number.
2131 The new meaning of C<\N> as C<[^\n]> is not valid in a bracketed character
2132 class, just like C<.> in a character class loses its special meaning,
2133 and will cause the fatal error C<\N in a character class must be a named
2134 character: \N{...}>.
2138 The rules on what is legal for the C<...> in C<\N{...}> have been
2139 tightened up so that unless the C<...> begins with an alphabetic
2140 character and continues with a combination of alphanumerics, dashes,
2141 spaces, parentheses or colons then the warning C<Deprecated character(s)
2142 in \N{...} starting at '%s'> is now issued.
2146 The warning C<Using just the first characters returned by \N{}> will
2147 be issued if the C<charnames> handler returns a sequence of characters
2148 which exceeds the limit of the number of characters that can be used. The
2149 message will indicate which characters were used and which were discarded.
2155 =head2 Changed Diagnostics
2157 A number of existing diagnostic messages have been improved or corrected:
2163 A new warning category C<illegalproto> allows finer-grained control of
2164 warnings around function prototypes.
2170 =item C<Illegal character in prototype for %s : %s>
2172 =item C<Prototype after '%c' for %s : %s>
2176 have been moved from the C<syntax> top-level warnings category into a new
2177 first-level category, C<illegalproto>. These two warnings are currently
2178 the only ones emitted during parsing of an invalid/illegal prototype,
2181 no warnings 'illegalproto';
2183 to suppress only those, but not other syntax-related warnings. Warnings
2184 where prototypes are changed, ignored, or not met are still in the
2185 C<prototype> category as before.
2189 C<Deep recursion on subroutine "%s">
2191 It is now possible to change the depth threshold for this warning from the
2192 default of 100, by recompiling the F<perl> binary, setting the C
2193 pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
2197 C<Illegal character in prototype> warning is now more precise
2198 when reporting illegal characters after _
2202 mro merging error messages are now very similar to those produced by
2207 Amelioration of the error message "Unrecognized character %s in column %d"
2209 Changes the error message to "Unrecognized character %s; marked by E<lt>--
2210 HERE after %sE<lt>-- HERE near column %d". This should make it a little
2211 simpler to spot and correct the suspicious character.
2215 Perl now explicitly points to C<$.> when it causes an uninitialized
2216 warning for ranges in scalar context.
2220 C<split> now warns when called in void context.
2224 C<printf>-style functions called with too few arguments will now issue the
2225 warning C<"Missing argument in %s"> [perl #71000]
2229 Perl now properly returns a syntax error instead of segfaulting
2230 if C<each>, C<keys>, or C<values> is used without an argument.
2234 C<tell()> now fails properly if called without an argument and when no
2235 previous file was read.
2237 C<tell()> now returns C<-1>, and sets errno to C<EBADF>, thus restoring
2238 the 5.8.x behaviour.
2242 C<overload> no longer implicitly unsets fallback on repeated 'use
2247 POSIX::strftime() can now handle Unicode characters in the format string.
2251 The C<syntax> category was removed from 5 warnings that should only be in
2256 Three fatal C<pack>/C<unpack> error messages have been normalized to
2261 C<Unicode character is illegal> has been rephrased to be more accurate
2263 It now reads C<Unicode non-character is illegal in interchange> and the
2264 perldiag documentation has been expanded a bit.
2268 Currently, all but the first of the several characters that the
2269 C<charnames> handler may return are discarded when used in a regular
2270 expression pattern bracketed character class. If this happens then the
2271 warning C<Using just the first character returned by \N{} in character
2272 class> will be issued.
2276 The warning C<Missing right brace on \N{} or unescaped left brace after
2277 \N. Assuming the latter> will be issued if Perl encounters a C<\N{>
2278 but doesn't find a matching C<}>. In this case Perl doesn't know if it
2279 was mistakenly omitted, or if "match non-newline" followed by "match
2280 a C<{>" was desired. It assumes the latter because that is actually a
2281 valid interpretation as written, unlike the other case. If you meant
2282 the former, you need to add the matching right brace. If you did mean
2283 the latter, you can silence this warning by writing instead C<\N\{>.
2287 C<gmtime> and C<localtime> called with numbers smaller than they can
2288 reliably handle will now issue the warnings C<gmtime(%.0f) too small>
2289 and C<localtime(%.0f) too small>.
2293 The following diagnostic messages have been removed:
2303 C<Can't locate package %s for the parents of %s>
2305 In general this warning it only got produced in
2306 conjunction with other warnings, and removing it allowed an ISA lookup
2307 optimisation to be added.
2311 C<v-string in use/require is non-portable>
2315 =head1 Utility Changes
2321 F<h2ph> now looks in C<include-fixed> too, which is a recent addition
2322 to gcc's search path.
2326 F<h2xs> no longer incorrectly treats enum values like macros.
2327 It also now handles C++ style comments (C<//>) properly in enums.
2331 F<perl5db.pl> now supports C<LVALUE> subroutines. Additionally, the
2332 debugger now correctly handles proxy constant subroutines, and
2337 F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out
2338 upstream bug tracker URLs. If a user identifies a particular module
2339 as the topic of their bug report and we're able to divine the URL for
2340 its upstream bug tracker, perlbug now provide a message to the user
2341 explaining that the core copies the CPAN version directly, and provide
2342 the URL for reporting the bug directly to the upstream author.
2344 F<perlbug> no longer reports "Message sent" when it hasn't actually sent
2349 F<perlthanks> is a new utility for sending non-bug-reports to the
2350 authors and maintainers of Perl. Getting nothing but bug reports can
2351 become a bit demoralising. If Perl 5.12 works well for you, please try
2352 out F<perlthanks>. It will make the developers smile.
2356 Perl's developers have fixed bugs in F<a2p> having to do with the
2357 C<match()> operator in list context. Additionally, F<a2p> no longer
2358 generates code that uses the C<$[> variable.
2362 =head1 Selected Bug Fixes
2368 U+0FFFF is now a legal character in regular expressions.
2372 pp_qr now always returns a new regexp SV. Resolves RT #69852.
2374 Instead of returning a(nother) reference to the (pre-compiled) regexp
2375 in the optree, use reg_temp_copy() to create a copy of it, and return a
2376 reference to that. This resolves issues about Regexp::DESTROY not being
2377 called in a timely fashion (the original bug tracked by RT #69852), as
2378 well as bugs related to blessing regexps, and of assigning to regexps,
2379 as described in correspondence added to the ticket.
2381 It transpires that we also need to undo the SvPVX() sharing when ithreads
2382 cloning a Regexp SV, because mother_re is set to NULL, instead of a
2383 cloned copy of the mother_re. This change might fix bugs with regexps
2384 and threads in certain other situations, but as yet neither tests nor
2385 bug reports have indicated any problems, so it might not actually be an
2386 edge case that it's possible to reach.
2390 Several compilation errors and segfaults when perl was built with C<-Dmad>
2395 Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
2399 C<-t> should only return TRUE for file handles connected to a TTY
2401 The Microsoft C version of C<isatty()> returns TRUE for all character mode
2402 devices, including the F</dev/null>-style "nul" device and printers like
2407 Fixed a regression caused by commit fafafbaf which caused a panic during
2408 parameter passing [perl #70171]
2412 On systems which in-place edits without backup files, -i'*' now works as
2413 the documentation says it does [perl #70802]
2417 Saving and restoring magic flags no longer loses readonly flag.
2421 The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer
2422 causes abrupt and total failure.
2426 Regular expressions compiled with C<qr{}> literals properly set C<$'> when
2431 Using named subroutines with C<sort> should no longer lead to bus errors
2436 Numerous bugfixes catch small issues caused by the recently-added Lexer API.
2440 Smart match against C<@_> sometimes gave false negatives. [perl #71078]
2444 C<$@> may now be assigned a read-only value (without error or busting
2449 C<sort> called recursively from within an active comparison subroutine no
2450 longer causes a bus error if run multiple times. [perl #71076]
2454 Tie::Hash::NamedCapture::* will not abort if passed bad input (RT #71828)
2458 @_ and $_ no longer leak under threads (RT #34342 and #41138, also
2463 C<-I> on shebang line now adds directories in front of @INC
2464 as documented, and as does C<-I> when specified on the command-line.
2468 C<kill> is now fatal when called on non-numeric process identifiers.
2469 Previously, an C<undef> process identifier would be interpreted as a
2470 request to kill process 0, which would terminate the current process
2471 group on POSIX systems. Since process identifiers are always integers,
2472 killing a non-numeric process is now fatal.
2476 5.10.0 inadvertently disabled an optimisation, which caused a measurable
2477 performance drop in list assignment, such as is often used to assign
2478 function parameters from C<@_>. The optimisation has been re-instated, and
2479 the performance regression fixed. (This fix is also present in 5.10.1)
2483 Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038].
2487 Some potential coredumps in PerlIO fixed [RT #57322,54828].
2491 The debugger now works with lvalue subroutines.
2495 The debugger's C<m> command was broken on modules that defined constants
2500 C<crypt> and string complement could return tainted values for untainted
2501 arguments [RT #59998].
2505 The C<-i>I<.suffix> command-line switch now recreates the file using
2506 restricted permissions, before changing its mode to match the original
2507 file. This eliminates a potential race condition [RT #60904].
2511 On some Unix systems, the value in C<$?> would not have the top bit set
2512 (C<$? & 128>) even if the child core dumped.
2516 Under some circumstances, C<$^R> could incorrectly become undefined
2521 In the XS API, various hash functions, when passed a pre-computed hash where
2522 the key is UTF-8, might result in an incorrect lookup.
2526 XS code including F<XSUB.h> before F<perl.h> gave a compile-time error
2531 C<< $object-E<gt>isa('Foo') >> would report false if the package C<Foo>
2532 didn't exist, even if the object's C<@ISA> contained C<Foo>.
2536 Various bugs in the new-to 5.10.0 mro code, triggered by manipulating
2537 C<@ISA>, have been found and fixed.
2541 Bitwise operations on references could crash the interpreter, e.g.
2542 C<$x=\$y; $x |= "foo"> [RT #54956].
2546 Patterns including alternation might be sensitive to the internal UTF-8
2547 representation, e.g.
2549 my $byte = chr(192);
2550 my $utf8 = chr(192); utf8::upgrade($utf8);
2551 $utf8 =~ /$byte|X}/i; # failed in 5.10.0
2555 Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in
2556 effect), double-quoted literal strings could be corrupted where a C<\xNN>,
2557 C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value
2558 greater than 255 [RT #59908].
2562 C<B::Deparse> failed to correctly deparse various constructs:
2563 C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488],
2564 C<sub foo(_)> [RT #62484].
2568 Using C<setpgrp> with no arguments could corrupt the perl stack.
2572 The block form of C<eval> is now specifically trappable by C<Safe> and
2573 C<ops>. Previously it was erroneously treated like string C<eval>.
2577 In 5.10.0, the two characters C<[~> were sometimes parsed as the smart
2578 match operator (C<~~>) [RT #63854].
2582 In 5.10.0, the C<*> quantifier in patterns was sometimes treated as
2583 C<{0,32767}> [RT #60034, #60464]. For example, this match would fail:
2585 ("ab" x 32768) =~ /^(ab)*$/
2589 C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924].
2593 Using C<next> or C<last> to exit a C<given> block no longer produces a
2594 spurious warning like the following:
2596 Exiting given via last at foo.pl line 123
2600 Assigning a format to a glob could corrupt the format; e.g.:
2602 *bar=*foo{FORMAT}; # foo format now bad
2606 Attempting to coerce a typeglob to a string or number could cause an
2607 assertion failure. The correct error message is now generated,
2608 C<Can't coerce GLOB to I<$type>>.
2612 Under C<use filetest 'access'>, C<-x> was using the wrong access
2613 mode. This has been fixed [RT #49003].
2617 C<length> on a tied scalar that returned a Unicode value would not be
2618 correct the first time. This has been fixed.
2622 Using an array C<tie> inside in array C<tie> could SEGV. This has been
2627 A race condition inside C<PerlIOStdio_close()> has been identified and
2628 fixed. This used to cause various threading issues, including SEGVs.
2632 In C<unpack>, the use of C<()> groups in scalar context was internally
2633 placing a list on the interpreter's stack, which manifested in various
2634 ways, including SEGVs. This is now fixed [RT #50256].
2638 Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>.
2639 These have all been fixed.
2643 A 5.10.0 optimisation to clear the temporary stack within the implicit
2644 loop of C<s///ge> has been reverted, as it turned out to be the cause of
2645 obscure bugs in seemingly unrelated parts of the interpreter [commit
2650 The line numbers for warnings inside C<elsif> are now correct.
2654 The C<..> operator now works correctly with ranges whose ends are at or
2655 close to the values of the smallest and largest integers.
2659 C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
2660 This has been fixed [RT #54828].
2664 An off-by-one error meant that C<index $str, ...> was effectively being
2665 executed as C<index "$str\0", ...>. This has been fixed [RT #53746].
2669 Various leaks associated with named captures in regexes have been fixed
2674 A weak reference to a hash would leak. This was affecting C<DBI>
2679 Using (?|) in a regex could cause a segfault [RT #59734].
2683 Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520].
2687 Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an
2688 unaligned 64-bit access on the SPARC architecture [RT #60574].
2692 In the 5.10.0 release, C<inc_version_list> would incorrectly list
2693 C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order
2698 In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value
2703 In 5.10.0, C<printf> and C<sprintf> could produce the fatal error
2704 C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings
2709 In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be
2710 missed (method cache issue) [RT #60220,60232].
2714 In the 5.10.0 release, a combination of C<use feature> and C<//ee> could
2715 cause a memory leak [RT #63110].
2719 C<-C> on the shebang (C<#!>) line is once more permitted if it is also
2720 specified on the command line. C<-C> on the shebang line used to be a
2721 silent no-op I<if> it was not also on the command line, so perl 5.10.0
2722 disallowed it, which broke some scripts. Now perl checks whether it is
2723 also on the command line and only dies if it is not [RT #67880].
2727 In 5.10.0, certain types of re-entrant regular expression could crash,
2728 or cause the following assertion failure [RT #60508]:
2730 Assertion rx->sublen >= (s - rx->subbeg) + i failed
2734 Perl now includes previously missing files from the Unicode Character
2739 Perl now honors C<TMPDIR> when opening an anonymous temporary file.
2744 =head1 Platform Specific Changes
2746 Perl is incredibly portable. In general, if a platform has a C compiler,
2747 someone has ported Perl to it (or will soon). We're happy to announce
2748 that Perl 5.12 includes support for several new platforms. At the same
2749 time, it's time to bid farewell to some (very) old friends.
2751 =head2 New Platforms
2757 Perl's developers have merged patches from Haiku's maintainers. Perl
2758 should now build on Haiku.
2762 Perl should now build on MirOS BSD.
2766 =head2 Discontinued Platforms
2778 =head2 Updated Platforms
2788 Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from
2793 Removed F<libgdbm> for AIX 5L and 6.1 if F<libgdbm> < 1.8.3-5 is
2794 installed. The F<libgdbm> is delivered as an optional package with the
2795 AIX Toolbox. Unfortunately the versions below 1.8.3-5 are broken.
2799 Hints changes mean that AIX 4.2 should work again.
2809 Perl now supports IPv6 on Cygwin 1.7 and newer.
2813 On Cygwin we now strip the last number from the DLL. This has been the
2814 behaviour in the cygwin.com build for years. The hints files have been
2819 =item Darwin (Mac OS X)
2825 Skip testing the be_BY.CP1131 locale on Darwin 10 (Mac OS X 10.6),
2826 as it's still buggy.
2830 Correct infelicities in the regexp used to identify buggy locales
2831 on Darwin 8 and 9 (Mac OS X 10.4 and 10.5, respectively).
2841 Fix thread library selection [perl #69686]
2851 The hints files now identify the correct threading libraries on FreeBSD 7
2862 We now work around a bizarre preprocessor bug in the Irix 6.5 compiler:
2863 C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't.
2873 Hints now supports versions 5.*.
2883 C<-UDEBUGGING> is now the default on VMS.
2885 Like it has been everywhere else for ages and ages. Also make command-line
2886 selection of -UDEBUGGING and -DDEBUGGING work in configure.com; before
2887 the only way to turn it off was by saying no in answer to the interactive
2892 The default pipe buffer size on VMS has been updated to 8192 on 64-bit
2897 Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail
2898 if C<$/> was set to a numeric reference (to indicate record-style reads).
2903 VMS now supports C<getgrgid>.
2907 Many improvements and cleanups have been made to the VMS file name handling
2908 and conversion code.
2912 Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit
2913 status in a VMS condition value for better interaction with GNV's bash
2914 shell and other utilities that depend on POSIX exit values. See
2915 L<perlvms/"$?"> for details.
2919 C<File::Copy> now detects Unix compatibility mode on VMS.
2929 Various changes from Stratus have been merged in.
2939 There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
2949 Perl 5.12 supports Windows 2000 and later. The supporting code for
2950 legacy versions of Windows is still included, but will be removed
2951 during the next development cycle.
2955 Initial support for building Perl with MinGW-w64 is now available.
2959 F<perl.exe> now includes a manifest resource to specify the C<trustInfo>
2960 settings for Windows Vista and later. Without this setting Windows
2961 would treat F<perl.exe> as a legacy application and apply various
2962 heuristics like redirecting access to protected file system areas
2963 (like the "Program Files" folder) to the users "VirtualStore"
2964 instead of generating a proper "permission denied" error.
2966 The manifest resource also requests the Microsoft Common-Controls
2967 version 6.0 (themed controls introduced in Windows XP). Check out the
2968 Win32::VisualStyles module on CPAN to switch back to old style
2969 unthemed controls for legacy applications.
2973 The C<-t> filetest operator now only returns true if the filehandle
2974 is connected to a console window. In previous versions of Perl it
2975 would return true for all character mode devices, including F<NUL>
2980 The C<-p> filetest operator now works correctly, and the
2981 Fcntl::S_IFIFO constant is defined when Perl is compiled with
2982 Microsoft Visual C. In previous Perl versions C<-p> always
2983 returned a false value, and the Fcntl::S_IFIFO constant
2986 This bug is specific to Microsoft Visual C and never affected
2987 Perl binaries built with MinGW.
2991 The socket error codes are now more widely supported: The POSIX
2992 module will define the symbolic names, like POSIX::EWOULDBLOCK,
2993 and stringification of socket error codes in $! works as well
2996 C:\>perl -MPOSIX -E "$!=POSIX::EWOULDBLOCK; say $!"
2997 A non-blocking socket operation could not be completed immediately.
3001 flock() will now set sensible error codes in $!. Previous Perl versions
3002 copied the value of $^E into $!, which caused much confusion.
3006 select() now supports all empty C<fd_set>s more correctly.
3010 C<'.\foo'> and C<'..\foo'> were treated differently than
3011 C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492].
3015 Improved message window handling means that C<alarm> and C<kill> messages
3016 will no longer be dropped under race conditions.
3020 Various bits of Perl's build infrastructure are no longer converted to
3021 win32 line endings at release time. If this hurts you, please report the
3022 problem with the L<perlbug> program included with perl.
3029 =head1 Known Problems
3031 This is a list of some significant unfixed bugs, which are regressions
3032 from either 5.10.x or 5.8.x.
3038 Some CPANPLUS tests may fail if there is a functioning file
3039 F<../../cpanp-run-perl> outside your build directory. The failure
3040 shouldn't imply there's a problem with the actual functional
3041 software. The bug is already fixed in [RT #74188] and is scheduled for
3042 inclusion in perl-v5.12.1.
3046 C<List::Util::first> misbehaves in the presence of a lexical C<$_>
3047 (typically introduced by C<my $_> or implicitly by C<given>). The variable
3048 which gets set for each iteration is the package variable C<$_>, not the
3049 lexical C<$_> [RT #67694].
3051 A similar issue may occur in other modules that provide functions which
3052 take a block as their first argument, like
3054 foo { ... $_ ...} list
3058 Some regexes may run much more slowly when run in a child thread compared
3059 with the thread the pattern was compiled into [RT #55600].
3063 Things like C<"\N{LATIN SMALL LIGATURE FF}" =~ /\N{LATIN SMALL LETTER F}+/>
3064 will appear to hang as they get into a very long running loop [RT #72998].
3068 Several porters have reported mysterious crashes when Perl's entire
3069 test suite is run after a build on certain Windows 2000 systems. When
3070 run by hand, the individual tests reportedly work fine.
3080 This one is actually a change introduced in 5.10.0, but it was missed
3081 from that release's perldelta, so it is mentioned here instead.
3083 A bugfix related to the handling of the C</m> modifier and C<qr> resulted
3084 in a change of behaviour between 5.8.x and 5.10.0:
3086 # matches in 5.8.x, doesn't match in 5.10.0
3087 $re = qr/^bar/; "foo\nbar" =~ /$re/m;
3091 =head1 Acknowledgements
3093 Perl 5.12.0 represents approximately two years of development since
3094 Perl 5.10.0 and contains over 750,000 lines of changes across over
3095 3,000 files from over 200 authors and committers.
3097 Perl continues to flourish into its third decade thanks to a vibrant
3098 community of users and developers. The following people are known to
3099 have contributed the improvements that became Perl 5.12.0:
3101 Aaron Crane, Abe Timmerman, Abhijit Menon-Sen, Abigail, Adam Russell,
3102 Adriano Ferreira, Ævar Arnfjörð Bjarmason, Alan Grover, Alexandr
3103 Ciornii, Alex Davies, Alex Vandiver, Andreas Koenig, Andrew Rodland,
3104 andrew@sundale.net, Andy Armstrong, Andy Dougherty, Jose AUGUSTE-ETIENNE,
3105 Benjamin Smith, Ben Morrow, bharanee rathna, Bo Borgerson, Bo Lindbergh,
3106 Brad Gilbert, Bram, Brendan O'Dea, brian d foy, Charles Bailey,
3107 Chip Salzenberg, Chris 'BinGOs' Williams, Christoph Lamprecht, Chris
3108 Williams, chromatic, Claes Jakobsson, Craig A. Berry, Dan Dascalescu,
3109 Daniel Frederick Crisman, Daniel M. Quinlan, Dan Jacobson, Dan Kogai,
3110 Dave Mitchell, Dave Rolsky, David Cantrell, David Dick, David Golden,
3111 David Mitchell, David M. Syzdek, David Nicol, David Wheeler, Dennis
3112 Kaarsemaker, Dintelmann, Peter, Dominic Dunlop, Dr.Ruud, Duke Leto,
3113 Enrico Sorcinelli, Eric Brine, Father Chrysostomos, Florian Ragwitz,
3114 Frank Wiegand, Gabor Szabo, Gene Sullivan, Geoffrey T. Dairiki, George
3115 Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham Barr, Green, Paul,
3116 Hans Dieter Pearcey, Harmen, H. Merijn Brand, Hugo van der Sanden,
3117 Ian Goodacre, Igor Sutton, Ingo Weinhold, James Bence, James Mastros,
3118 Jan Dubois, Jari Aalto, Jarkko Hietaniemi, Jay Hannah, Jerry Hedden,
3119 Jesse Vincent, Jim Cromie, Jody Belka, John E. Malmberg, John Malmberg,
3120 John Peacock, John Peacock via RT, John P. Linderman, John Wright,
3121 Josh ben Jore, Jos I. Boumans, Karl Williamson, Kenichi Ishigaki, Ken
3122 Williams, Kevin Brintnall, Kevin Ryde, Kurt Starsinic, Leon Brocard,
3123 Lubomir Rintel, Luke Ross, Marcel Grünauer, Marcus Holland-Moritz, Mark
3124 Jason Dominus, Marko Asplund, Martin Hasch, Mashrab Kuvatov, Matt Kraai,
3125 Matt S Trout, Max Maischein, Michael Breen, Michael Cartmell, Michael
3126 G Schwern, Michael Witten, Mike Giroux, Milosz Tanski, Moritz Lenz,
3127 Nicholas Clark, Nick Cleaton, Niko Tyni, Offer Kaye, Osvaldo Villalon,
3128 Paul Fenwick, Paul Gaborit, Paul Green, Paul Johnson, Paul Marquess,
3129 Philip Hazel, Philippe Bruhat, Rafael Garcia-Suarez, Rainer Tammer,
3130 Rajesh Mandalemula, Reini Urban, Renée Bäcker, Ricardo Signes,
3131 Ricardo SIGNES, Richard Foley, Rich Rauenzahn, Rick Delaney, Risto
3132 Kankkunen, Robert May, Roberto C. Sanchez, Robin Barker, SADAHIRO
3133 Tomoyuki, Salvador Ortiz Garcia, Sam Vilain, Scott Lanning, Sébastien
3134 Aperghis-Tramoni, Sérgio Durigan Júnior, Shlomi Fish, Simon 'corecode'
3135 Schubert, Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steffen
3136 Ullrich, Stepan Kasal, Steve Hay, Steven Schubiger, Steve Peters, Tels,
3137 The Doctor, Tim Bunce, Tim Jenness, Todd Rinaldo, Tom Christiansen,
3138 Tom Hukins, Tom Wyant, Tony Cook, Torsten Schoenfeld, Tye McQueen,
3139 Vadim Konovalov, Vincent Pit, Hio YAMASHINA, Yasuhiro Matsumoto,
3140 Yitzchak Scott-Thoennes, Yuval Kogman, Yves Orton, Zefram, Zsban Ambrus
3142 This is woefully incomplete as it's automatically generated from version
3143 control history. In particular, it doesn't include the names of the
3144 (very much appreciated) contributors who reported issues in previous
3145 versions of Perl that helped make Perl 5.12.0 better. For a more complete
3146 list of all of Perl's historical contributors, please see the C<AUTHORS>
3147 file in the Perl 5.12.0 distribution.
3149 Our "retired" pumpkings Nicholas Clark and Rafael Garcia-Suarez
3150 deserve special thanks for their brilliant and substantive ongoing
3151 contributions. Nicholas personally authored over 30% of the patches
3152 since 5.10.0. Rafael comes in second in patch authorship with 11%,
3153 but is first by a long shot in committing patches authored by others,
3154 pushing 44% of the commits since 5.10.0 in this category, often after
3155 providing considerable coaching to the patch authors. These statistics
3156 in no way comprise all of their contributions, but express in shorthand
3157 that we couldn't have done it without them.
3159 Many of the changes included in this version originated in the CPAN
3160 modules included in Perl's core. We're grateful to the entire CPAN
3161 community for helping Perl to flourish.
3163 =head1 Reporting Bugs
3165 If you find what you think is a bug, you might check the articles
3166 recently posted to the comp.lang.perl.misc newsgroup and the perl
3167 bug database at L<http://rt.perl.org/perlbug/>. There may also be
3168 information at L<http://www.perl.org/>, the Perl Home Page.
3170 If you believe you have an unreported bug, please run the B<perlbug>
3171 program included with your release. Be sure to trim your bug down
3172 to a tiny but sufficient test case. Your bug report, along with the
3173 output of C<perl -V>, will be sent off to perlbug@perl.org to be
3174 analyzed by the Perl porting team.
3176 If the bug you are reporting has security implications, which make it
3177 inappropriate to send to a publicly archived mailing list, then please send
3178 it to perl5-security-report@perl.org. This points to a closed subscription
3179 unarchived mailing list, which includes all the core committers, who be able
3180 to help assess the impact of issues, figure out a resolution, and help
3181 co-ordinate the release of patches to mitigate or fix the problem across all
3182 platforms on which Perl is supported. Please only use this address for
3183 security issues in the Perl core, not for modules independently
3184 distributed on CPAN.
3188 The F<Changes> file for an explanation of how to view exhaustive details
3191 The F<INSTALL> file for how to build Perl.
3193 The F<README> file for general stuff.
3195 The F<Artistic> and F<Copying> files for copyright information.
3197 L<http://dev.perl.org/perl5/errata.html> for a list of issues
3198 found after this release, as well as a list of CPAN modules known
3199 to be incompatible with this release.