A slightly tweaked patch to perldelta from Craig Berry acknowledging the
[p5sagit/p5-mst-13.2.git] / pod / perl5120delta.pod
CommitLineData
c0924907 1=encoding utf8
2
01358b4a 3=head1 NAME
4
5perl5120delta - what is new for perl v5.12.0
6
7=head1 DESCRIPTION
8
702b4ef6 9This document describes differences between the 5.10.0 release and the
105.12.0 release.
01358b4a 11
72d4e865 12Many of the bug fixes in 5.12.0 are already included in the 5.10.1
702b4ef6 13maintenance release.
72d4e865 14
702b4ef6 15You can see the list of those changes in the 5.10.1 release notes
16(L<perl5101delta>).
72d4e865 17
18
b6381718 19=head1 Core Enhancements
72d4e865 20
21=head2 New C<package NAME VERSION> syntax
22
23This new syntax allows a module author to set the $VERSION of a namespace
24when the namespace is declared with 'package'. It eliminates the need
25for C<our $VERSION = ...> and similar constructs. E.g.
26
27 package Foo::Bar 1.23;
28 # $Foo::Bar::VERSION == 1.23
29
30There are several advantages to this:
31
b16f1257 32=over
72d4e865 33
34=item *
35
36C<$VERSION> is parsed in exactly the same way as C<use NAME VERSION>
37
38=item *
39
40C<$VERSION> is set at compile time
41
42=item *
43
44C<$VERSION> is a version object that provides proper overloading of
4655b0a1 45comparison operators so comparing C<$VERSION> to decimal (1.23) or
72d4e865 46dotted-decimal (v1.2.3) version numbers works correctly.
47
48=item *
49
50Eliminates C<$VERSION = ...> and C<eval $VERSION> clutter
51
52=item *
53
54As it requires VERSION to be a numeric literal or v-string
55literal, it can be statically parsed by toolchain modules
56without C<eval> the way MM-E<gt>parse_version does for C<$VERSION = ...>
57
e014eb68 58=back
72d4e865 59
60It does not break old code with only C<package NAME>, but code that uses
61C<package NAME VERSION> will need to be restricted to perl 5.12.0 or newer
62This is analogous to the change to C<open> from two-args to three-args.
63Users requiring the latest Perl will benefit, and perhaps after several
64years, it will become a standard practice.
65
72d4e865 66
67However, C<package NAME VERSION> requires a new, 'strict' version
68number format. See L<"Version number formats"> for details.
69
70
71=head2 The C<...> operator
72
73A new operator, C<...>, nicknamed the Yada Yada operator, has been added.
74It is intended to mark placeholder code that is not yet implemented.
79849ba8 75See L<perlop/"Yada Yada Operator">.
72d4e865 76
77=head2 Implicit strictures
78
79Using the C<use VERSION> syntax with a version number greater or equal
80to 5.11.0 will lexically enable strictures just like C<use strict>
81would do (in addition to enabling features.) The following:
82
83 use 5.12.0;
84
85means:
86
87 use strict;
88 use feature ':5.12';
01358b4a 89
b6381718 90=head2 Unicode improvements
01358b4a 91
b6381718 92Perl 5.12 comes with Unicode 5.2, the latest version available to
93us at the time of release. This version of Unicode was released in
94October 2009. See L<http://www.unicode.org/versions/Unicode5.2.0> for
95further details about what's changed in this version of the standard.
96See L<perlunicode> for instructions on installing and using other versions
97of Unicode.
98
99Additionally, Perl's developers have significantly improved Perl's Unicode
100implementation. For full details, see L</Unicode overhaul> below.
101
102=head2 Y2038 compliance
103
104Perl's core time-related functions are now Y2038 compliant. (It may not mean much to you, but your kids will love it!)
3ab3a109 105
106=head2 qr overloading
107
108It is now possible to overload the C<qr//> operator, that is,
109conversion to regexp, like it was already possible to overload
110conversion to boolean, string or number of objects. It is invoked when
c66407fa 111an object appears on the right hand side of the C<=~> operator or when
3ab3a109 112it is interpolated into a regexp. See L<overload>.
113
114=head2 Pluggable keywords
115
116Extension modules can now cleanly hook into the Perl parser to define
117new kinds of keyword-headed expression and compound statement. The
118syntax following the keyword is defined entirely by the extension. This
119allow a completely non-Perl sublanguage to be parsed inline, with the
b16f1257 120correct ops cleanly generated.
3ab3a109 121
122See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core
123source distribution also includes a new module
124L<XS::APItest::KeywordRPN>, which implements reverse Polish notation
125arithmetic via pluggable keywords. This module is mainly used for test
126purposes, and is not normally installed, but also serves as an example
127of how to use the new mechanism.
128
72d4e865 129Perl's developers consider this feature to be experimental. We may remove
130it or change it in a backwards-incompatible way in Perl 5.14.
131
3ab3a109 132=head2 APIs for more internals
133
134The lowest layers of the lexer and parts of the pad system now have C
135APIs available to XS extensions. These are necessary to support proper
136use of pluggable keywords, but have other uses too. The new APIs are
137experimental, and only cover a small proportion of what would be
138necessary to take full advantage of the core's facilities in these
139areas. It is intended that the Perl 5.13 development cycle will see the
140addition of a full range of clean, supported interfaces.
141
72d4e865 142Perl's developers consider this feature to be experimental. We may remove
143it or change it in a backwards-incompatible way in Perl 5.14.
144
3ab3a109 145=head2 Overridable function lookup
146
147Where an extension module hooks the creation of rv2cv ops to modify the
148subroutine lookup process, this now works correctly for bareword
149subroutine calls. This means that prototypes on subroutines referenced
150this way will be processed correctly. (Previously bareword subroutine
151names were initially looked up, for parsing purposes, by an unhookable
152mechanism, so extensions could only properly influence subroutine names
153that appeared with an C<&> sigil.)
154
3ab3a109 155=head2 A proper interface for pluggable Method Resolution Orders
156
72d4e865 157As of Perl 5.12.0 there is a new interface for plugging and using method
158resolution orders other than the default linear depth first search.
3ab3a109 159The C3 method resolution order added in 5.10.0 has been re-implemented as
160a plugin, without changing its Perl-space interface. See L<perlmroapi> for
161more information.
162
b3b85878 163
5e75e599 164
72d4e865 165=head2 C<\N> experimental regex escape
3ab3a109 166
72d4e865 167Perl now supports C<\N>, a new regex escape which you can think of as
168the inverse of C<\n>. It will match any character that is not a newline,
169independently from the presence or absence of the single line match
170modifier C</s>. It is not usable within a character class. C<\N{3}>
171means to match 3 non-newlines; C<\N{5,}> means to match at least 5.
172C<\N{NAME}> still means the character or sequence named C<NAME>, but
173C<NAME> no longer can be things like C<3>, or C<5,>.
174
175This will break a L<custom charnames translator|charnames/CUSTOM
176TRANSLATORS> which allows numbers for character names, as C<\N{3}> will
177now mean to match 3 non-newline characters, and not the character whose
178name is C<3>. (No name defined by the Unicode standard is a number,
179so only custom translators might be affected.)
180
181Perl's developers are somewhat concerned about possible user confusion
182with the existing C<\N{...}> construct which matches characters by their
183Unicode name. Consequently, this feature is experimental. We may remove
184it or change it in a backwards-incompatible way in Perl 5.14.
3ab3a109 185
186=head2 DTrace support
187
72d4e865 188Perl now has some support for DTrace. See "DTrace support" in F<INSTALL>.
3ab3a109 189
190=head2 Support for C<configure_requires> in CPAN module metadata
191
702b4ef6 192Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires>
193keyword in the F<META.yml> metadata file included in most recent CPAN
194distributions. This allows distribution authors to specify configuration
195prerequisites that must be installed before running F<Makefile.PL>
196or F<Build.PL>.
3ab3a109 197
702b4ef6 198See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for
199more on how to specify C<configure_requires> when creating a distribution
200for CPAN.
3ab3a109 201
202=head2 C<each> is now more flexible
203
204The C<each> function can now operate on arrays.
205
8a4f3f14 206=head2 C<when> as a statement modifier
207
208C<when> is now allowed to be used as a statement modifier.
209
3ab3a109 210=head2 C<$,> flexibility
211
212The variable C<$,> may now be tied.
213
61f382b0 214=head2 // in when clauses
3ab3a109 215
216// now behaves like || in when clauses
217
218=head2 Enabling warnings from your shell environment
219
220You can now set C<-W> from the C<PERL5OPT> environment variable
221
222=head2 C<delete local>
223
224C<delete local> now allows you to locally delete a hash entry.
225
226=head2 New support for Abstract namespace sockets
227
228Abstract namespace sockets are Linux-specific socket type that live in
229AF_UNIX family, slightly abusing it to be able to use arbitrary
230character arrays as addresses: They start with nul byte and are not
231terminated by nul byte, but with the length passed to the socket()
232system call.
233
72d4e865 234=head2 32-bit limit on substr arguments removed
3ab3a109 235
702b4ef6 236The 32-bit limit on C<substr> arguments has now been removed. The full
237range of the system's signed and unsigned integers is now available for
238the C<pos> and C<len> arguments.
3ab3a109 239
b6381718 240=head1 Potentially Incompatible Changes
3ab3a109 241
72d4e865 242=head2 Deprecations warn by default
3ab3a109 243
72d4e865 244Perl now defaults to issuing a warning if a deprecated language feature
245is used.
252eec4f 246
72d4e865 247To disable this feature in a given lexical scope, you should use C<no
248warnings 'deprecated';> For information about which language features
249are deprecated and explanations of various deprecation warnings, please
b6381718 250see L<perldiag.pod>. See L</Deprecations> below for the list of features
251and modules Perl's developers have deprecated as part of this release.
3ab3a109 252
253=head2 Version number formats
254
255Acceptable version number formats have been formalized into "strict" and
72d4e865 256"lax" rules. C<package NAME VERSION> takes a strict version number.
fab55263 257C<UNIVERSAL::VERSION> and the L<version> object constructors take lax
72d4e865 258version numbers. Providing an invalid version will result in a fatal
259error. The version argument in C<use NAME VERSION> is first parsed as a
fab55263 260numeric literal or v-string and then passed to C<UNIVERSAL::VERSION>
261(and must then pass the "lax" format test).
262
72d4e865 263These formats are documented fully in the L<version> module. To a first
fab55263 264approximation, a "strict" version number is a positive decimal number
265(integer or decimal-fraction) without exponentiation or else a
266dotted-decimal v-string with a leading 'v' character and at least three
72d4e865 267components. A "lax" version number allows v-strings with fewer than
268three components or without a leading 'v'. Under "lax" rules, both
fab55263 269decimal and dotted-decimal versions may have a trailing "alpha"
270component separated by an underscore character after a fractional or
271dotted-decimal component.
3ab3a109 272
273The L<version> module adds C<version::is_strict> and C<version::is_lax>
274functions to check a scalar against these rules.
275
c66407fa 276=head2 @INC reorganization
3ab3a109 277
b6381718 278In C<@INC>, C<ARCHLIB> and C<PRIVLIB> now occur after after the current
279version's C<site_perl> and C<vendor_perl>. Modules installed into
280C<site_perl> and C<vendor_perl> will now be loaded in preference to
281those installed in C<ARCHLIB> and C<PRIVLIB>.
3ab3a109 282
283=head2 Switch statement changes
284
b6381718 285The C<given>/C<when> switch statement handles complex statements better
286than Perl 5.10.0 did (These enhancements are also available in
2875.10.1 and subsequent 5.10 releases.) There are two new cases where
c66407fa 288C<when> now interprets its argument as a boolean, instead of an
289expression to be used in a smart match:
3ab3a109 290
b6381718 291=over
292
293=item flip-flop operators
3ab3a109 294
295The C<..> and C<...> flip-flop operators are now evaluated in boolean
296context, following their usual semantics; see L<perlop/"Range Operators">.
297
298Note that, as in perl 5.10.0, C<when (1..10)> will not work to test
299whether a given value is an integer between 1 and 10; you should use
300C<when ([1..10])> instead (note the array reference).
301
702b4ef6 302However, contrary to 5.10.0, evaluating the flip-flop operators in
303boolean context ensures it can now be useful in a C<when()>, notably
304for implementing bistable conditions, like in:
3ab3a109 305
306 when (/^=begin/ .. /^=end/) {
307 # do something
308 }
309
b6381718 310=item defined-or operator
3ab3a109 311
312A compound expression involving the defined-or operator, as in
313C<when (expr1 // expr2)>, will be treated as boolean if the first
314expression is boolean. (This just extends the existing rule that applies
315to the regular or operator, as in C<when (expr1 || expr2)>.)
316
b6381718 317=back
318
3ab3a109 319=head2 Smart match changes
320
b6381718 321Since Perl 5.10.0, Perl's developers have made a number of changes to
322the smart match operator. These, of course, also alter the behaviour
3ab3a109 323of the switch statements where smart matching is implicitly used.
c66407fa 324These changes were also made for the 5.10.1 release, and will remain in
3ab3a109 325subsequent 5.10 releases.
326
3ab3a109 327=head3 Changes to type-based dispatch
328
329The smart match operator C<~~> is no longer commutative. The behaviour of
330a smart match now depends primarily on the type of its right hand
331argument. Moreover, its semantics have been adjusted for greater
332consistency or usefulness in several cases. While the general backwards
333compatibility is maintained, several changes must be noted:
334
335=over 4
336
337=item *
338
339Code references with an empty prototype are no longer treated specially.
340They are passed an argument like the other code references (even if they
341choose to ignore it).
342
343=item *
344
345C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine
346returns a true value for each key of the hash (or element of the
347array), instead of passing the whole hash or array as a reference to
348the subroutine.
349
350=item *
351
352Due to the commutativity breakage, code references are no longer
353treated specially when appearing on the left of the C<~~> operator,
354but like any vulgar scalar.
355
356=item *
357
358C<undef ~~ %hash> is always false (since C<undef> can't be a key in a
359hash). No implicit conversion to C<""> is done (as was the case in perl
3605.10.0).
361
362=item *
363
364C<$scalar ~~ @array> now always distributes the smart match across the
365elements of the array. It's true if one element in @array verifies
366C<$scalar ~~ $element>. This is a generalization of the old behaviour
367that tested whether the array contained the scalar.
368
369=back
370
371The full dispatch table for the smart match operator is given in
372L<perlsyn/"Smart matching in detail">.
373
374=head3 Smart match and overloading
375
376According to the rule of dispatch based on the rightmost argument type,
377when an object overloading C<~~> appears on the right side of the
378operator, the overload routine will always be called (with a 3rd argument
379set to a true value, see L<overload>.) However, when the object will
380appear on the left, the overload routine will be called only when the
c66407fa 381rightmost argument is a simple scalar. This way, distributivity of smart
382match across arrays is not broken, as well as the other behaviours with
383complex types (coderefs, hashes, regexes). Thus, writers of overloading
384routines for smart match mostly need to worry only with comparing
385against a scalar, and possibly with stringification overloading; the
386other common cases will be automatically handled consistently.
3ab3a109 387
388C<~~> will now refuse to work on objects that do not overload it (in order
389to avoid relying on the object's underlying structure). (However, if the
390object overloads the stringification or the numification operators, and
391if overload fallback is active, it will be used instead, as usual.)
392
b6381718 393=head2 Other potentially incompatible changes
3ab3a109 394
395=over 4
396
397=item *
398
b16f1257 399The definitions of a number of Unicode properties have changed to match
400those of the current Unicode standard. These are listed above under
702b4ef6 401L</Unicode overhaul>. This change may break code that expects the old
402definitions.
3ab3a109 403
404=item *
405
b6381718 406The boolkeys op has moved to the group of hash ops. This breaks binary
b21d8e53 407compatibility.
c66407fa 408
409=item *
410
72d4e865 411Filehandles are now always blessed into C<IO::File>.
c66407fa 412
413The previous behaviour was to bless Filehandles into L<FileHandle>
414(an empty proxy class) if it was loaded into memory and otherwise
415to bless them into C<IO::Handle>.
416
417=item *
418
419The semantics of C<use feature :5.10*> have changed slightly.
420See L<"Modules and Pragmata"> for more information.
3ab3a109 421
422=item *
423
b6381718 424Perl's developers now use git, rather than Perforce. This should be
425a purely internal change only relevant to people actively working on
426the core. However, you may see minor difference in perl as a consequence
427of the change. For example in some of details of the output of C<perl
428-V>. See L<perlrepository> for more information.
3ab3a109 429
430=item *
431
432As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental
433C<Test::Harness::Straps> module has been removed.
b6381718 434See L</"Modules and Pragmata"> for more details.
3ab3a109 435
436=item *
437
438As part of the C<ExtUtils::MakeMaker> upgrade, the
439C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules
440have been removed from this distribution.
441
442=item *
443
444C<Module::CoreList> no longer contains the C<%:patchlevel> hash.
445
3ab3a109 446
447=item *
448
449C<length undef> now returns undef.
450
451=item *
452
453Unsupported private C API functions are now declared "static" to prevent
454leakage to Perl's public API.
455
456=item *
457
458To support the bootstrapping process, F<miniperl> no longer builds with
459UTF-8 support in the regexp engine.
460
461This allows a build to complete with PERL_UNICODE set and a UTF-8 locale.
702b4ef6 462Without this there's a bootstrapping problem, as miniperl can't load
463the UTF-8 components of the regexp engine, because they're not yet built.
3ab3a109 464
465=item *
466
c66407fa 467F<miniperl>'s @INC is now restricted to just C<-I...>, the split of
468C<$ENV{PERL5LIB}>, and "C<.>"
3ab3a109 469
470=item *
471
472A space or a newline is now required after a C<"#line XXX"> directive.
473
474=item *
475
702b4ef6 476Tied filehandles now have an additional method EOF which provides the
477EOF type.
3ab3a109 478
479=item *
480
c66407fa 481To better match all other flow control statements, C<foreach> may no
482longer be used as an attribute.
3ab3a109 483
484=back
485
b6381718 486
3ab3a109 487=head1 Deprecations
488
489From time to time, Perl's developers find it necessary to deprecate
490features or modules we've previously shipped as part of the core
491distribution. We are well aware of the pain and frustration that a
492backwards-incompatible change to Perl can cause for developers building
493or maintaining software in Perl. You can be sure that when we deprecate
494a functionality or syntax, it isn't a choice we make lightly. Sometimes,
495we choose to deprecate functionality or syntax because it was found to
496be poorly designed or implemented. Sometimes, this is because they're
497holding back other features or causing performance problems. Sometimes,
498the reasons are more complex. Wherever possible, we try to keep deprecated
499functionality available to developers in its previous form for at least
72d4e865 500one major release. So long as a deprecated feature isn't actively
3ab3a109 501disrupting our ability to maintain and extend Perl, we'll try to leave
502it in place as long as possible.
503
b6381718 504The following items are now deprecated:
3ab3a109 505
b6381718 506=over
507
508=item suidperl
509
510C<suidperl> is no longer part of Perl. It used to provide a mechanism to
511emulate setuid permission bits on systems that don't support it properly.
3ab3a109 512
b6381718 513
514=item Use of C<:=> to mean an empty attribute list
3ab3a109 515
516An accident of Perl's parser meant that these constructions were all
517equivalent:
518
519 my $pi := 4;
520 my $pi : = 4;
521 my $pi : = 4;
522
523with the C<:> being treated as the start of an attribute list, which
524ends before the C<=>. As whitespace is not significant here, all are
525parsed as an empty attribute list, hence all the above are equivalent
526to, and better written as
527
528 my $pi = 4;
529
530because no attribute processing is done for an empty list.
531
532As is, this meant that C<:=> cannot be used as a new token, without
533silently changing the meaning of existing code. Hence that particular
534form is now deprecated, and will become a syntax error. If it is
535absolutely necessary to have empty attribute lists (for example,
536because of a code generator) then avoid the warning by adding a space
537before the C<=>.
538
c66407fa 539=item C<< UNIVERSAL->import() >>
3ab3a109 540
72d4e865 541The method C<< UNIVERSAL->import() >> is now deprecated. Attempting to
3ab3a109 542pass import arguments to a C<use UNIVERSAL> statement will result in a
c66407fa 543deprecation warning.
3ab3a109 544
b6381718 545
546=item Use of "goto" to jump into a construct
3ab3a109 547
c66407fa 548Using C<goto> to jump from an outer scope into an inner scope is now
549deprecated. This rare use case was causing problems in the
550implementation of scopes.
3ab3a109 551
b6381718 552=item Custom character names in \N{name} that don't look like names
8c66a230 553
702b4ef6 554In C<\N{I<name>}>, I<name> can be just about anything. The standard
555Unicode names have a very limited domain, but a custom name translator
556could create names that are, for example, made up entirely of punctuation
557symbols. It is now deprecated to make names that don't begin with an
558alphabetic character, and aren't alphanumeric or contain other than
559a very few other characters, namely spaces, dashes, parentheses
560and colons. Because of the added meaning of C<\N> (See L</C<\N>
561experimental regex escape>), names that look like curly brace -enclosed
562quantifiers won't work. For example, C<\N{3,4}> now means to match 3 to
5634 non-newlines; before a custom name C<3,4> could have been created.
8c66a230 564
3ab3a109 565=item Deprecated Modules
566
702b4ef6 567The following modules will be removed from the core distribution in a
568future release, and should be installed from CPAN instead. Distributions
569on CPAN which require these should add them to their prerequisites. The
570core versions of these modules warnings will issue a deprecation warning.
3ab3a109 571
702b4ef6 572If you ship a packaged version of Perl, either alone or as part of a
573larger system, then you should carefully consider the reprecussions of
574core module deprecations. You may want to consider shipping your default
575build of Perl with packages for some or all deprecated modules which
576install into C<vendor> or C<site> perl library directories. This will
577inhibit the deprecation warnings.
8df7d2a3 578
579Alternatively, you may want to consider patching F<lib/deprecate.pm>
702b4ef6 580to provide deprecation warnings specific to your packaging system
581or distribution of Perl, consistent with how your packaging system
582or distribution manages a staged transition from a release where the
583installation of a single package provides the given functionality, to
584a later release where the system administrator needs to know to install
585multiple packages to get that same functionality.
8df7d2a3 586
3ab3a109 587=over
588
c66407fa 589=item L<Class::ISA>
590
591=item L<Pod::Plainer>
592
593=item L<Shell>
3ab3a109 594
c66407fa 595=item L<Switch>
3ab3a109 596
b6381718 597Switch is buggy and should be avoided. You may find Perl's new
598C<given>/C<when> feature a suitable replacement. See L<perlsyn/"Switch
599statements"> for more information.
3ab3a109 600
601=back
602
3ab3a109 603=item Assignment to $[
604
b6381718 605=item Use of the attribute :locked on subroutines
3ab3a109 606
b6381718 607=item Use of "locked" with the attributes pragma
3ab3a109 608
b6381718 609=item Use of "unique" with the attributes pragma
3ab3a109 610
b6381718 611=item Perl_pmflag
3ab3a109 612
b6381718 613C<Perl_pmflag> is no longer part of Perl's public API. Calling it now
614generates a deprecation warning, and it will be removed in a future
615release. Although listed as part of the API, it was never documented,
616and only ever used in F<toke.c>, and prior to 5.10, F<regcomp.c>. In
617core, it has been replaced by a static function.
3ab3a109 618
b6381718 619=item Numerous Perl 4-era libraries
3ab3a109 620
621F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>,
622F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>,
623F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>,
624F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>,
625F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>,
626F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and
627F<timelocal.pl> are all now deprecated. Using them will incur a warning.
628
b6381718 629
3ab3a109 630=back
631
b6381718 632=head1 Unicode overhaul
3ab3a109 633
b6381718 634Perl's developers have made a concerted effort to update Perl to be in
635sync with the latest Unicode standard. Changes for this include:
3ab3a109 636
b6381718 637Perl can now handle every Unicode character property. New documentation,
638L<perluniprops>, lists all available non-Unihan character properties. By
639default, perl does not expose Unihan, deprecated or Unicode-internal
640properties. See below for more details on these; there is also a section
641in the pod listing them, and explaining why they are not exposed.
3ab3a109 642
702b4ef6 643Perl now fully supports the Unicode compound-style of using C<=>
644and C<:> in writing regular expressions: C<\p{property=value}> and
b6381718 645C<\p{property:value}> (both of which mean the same thing).
3ab3a109 646
702b4ef6 647Perl now fully supports the Unicode loose matching rules for text between
648the braces in C<\p{...}> constructs. In addition, Perl allows underscores
649between digits of numbers.
3ab3a109 650
702b4ef6 651Perl now accepts all the Unicode-defined synonyms for properties and
652property values.
3ab3a109 653
702b4ef6 654C<qr/\X/>, which matches a Unicode logical character, has
655been expanded to work better with various Asian languages. It
656now is defined as an I<extended grapheme cluster>. (See
657L<http://www.unicode.org/reports/tr29/>). Anything matched previously
658and that made sense will continue to be accepted. Additionally:
3ab3a109 659
b6381718 660=over
3ab3a109 661
b6381718 662=item *
663
664C<\X> will not break apart a C<S<CR LF>> sequence.
3ab3a109 665
666=item *
667
702b4ef6 668C<\X> will now match a sequence which includes the C<ZWJ> and C<ZWNJ>
669characters.
b6381718 670
671=item *
3ab3a109 672
702b4ef6 673C<\X> will now always match at least one character, including an initial
674mark. Marks generally come after a base character, but it is possible in
675Unicode to have them in isolation, and C<\X> will now handle that case,
676for example at the beginning of a line, or after a C<ZWSP>. And this is
677the part where C<\X> doesn't match the things that it used to that don't
678make sense. Formerly, for example, you could have the nonsensical case
679of an accented LF.
3ab3a109 680
681=item *
682
702b4ef6 683C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai
684and Lao exception cases.
3ab3a109 685
b6381718 686=back
3ab3a109 687
a56dbb5e 688Otherwise, this change should be transparent for the non-affected
689languages.
3ab3a109 690
b6381718 691C<\p{...}> matches using the Canonical_Combining_Class property were
a56dbb5e 692completely broken in previous releases of Perl. They should now work
693correctly.
694
695Before Perl 5.12, the Unicode C<Decomposition_Type=Compat> property
696and a Perl extension had the same name, which led to neither matching
697all the correct values (with more than 100 mistakes in one, and several
698thousand in the other). The Perl extension has now been renamed to be
699C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the
700same meaning as was previously intended, namely the union of all the
701non-canonical Decomposition types, with Unicode C<Compat> being just
702one of those.
3ab3a109 703
b6381718 704C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables.
3ab3a109 705
a56dbb5e 706C<\p{Uppercase}> and C<\p{Lowercase}> now work as the Unicode standard
707says they should. This means they each match a few more characters than
708they used to.
3ab3a109 709
a56dbb5e 710C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This
711means it no longer will match Private Use (gc=co), Surrogates (gc=cs),
712nor Format (gc=cf) code points. The Format code points represent the
713biggest possible problem. All but 36 of them are either officially
714deprecated or strongly discouraged from being used. Of those 36, likely
715the most widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ,
716WJ, and similar characters, plus bidirectional controls.
3ab3a109 717
a56dbb5e 718C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. Before
7195.12, Perl's definition definition included a number of things that aren't
720really alpha (all marks) while omitting many that were. The definitions
721of C<\p{Alnum}> and C<\p{Word}> depend on Alpha's definition and have
722changed accordingly.
3ab3a109 723
a56dbb5e 724C<\p{Word}> no longer incorrectly matches non-word characters such
725as fractions.
3ab3a109 726
a56dbb5e 727C<\p{Print}> no longer matches the line control characters: Tab, LF,
728CR, FF, VT, and NEL. This brings it in line with standards and the
729documentation.
3ab3a109 730
b6381718 731C<\p{XDigit}> now matches the same characters as C<\p{Hex_Digit}>. This
732means that in addition to the characters it currently matches,
733C<[A-Fa-f0-9]>, it will also match the 22 fullwidth equivalents, for
734example U+FF10: FULLWIDTH DIGIT ZERO.
3ab3a109 735
b6381718 736The Numeric type property has been extended to include the Unihan
737characters.
3ab3a109 738
b6381718 739There is a new Perl extension, the 'Present_In', or simply 'In',
740property. This is an extension of the Unicode Age property, but
741C<\p{In=5.0}> matches any code point whose usage has been determined
742I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points
743added in I<precisely> version 5.0.
3ab3a109 744
b6381718 745A number of properties now have the correct values for unassigned
a56dbb5e 746code points. The affected properties are Bidi_Class, East_Asian_Width,
747Joining_Type, Decomposition_Type, Hangul_Syllable_Type, Numeric_Type,
748and Line_Break.
3ab3a109 749
b6381718 750The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
751are now up to date with current Unicode definitions.
3ab3a109 752
a56dbb5e 753Earlier versions of Perl erroneously exposed certain properties that
754are supposed to be Unicode internal-only. Use of these in regular
755expressions will now generate, if enabled, a deprecation warning message.
b6381718 756The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point,
757Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase,
758Other_Math, and Other_Uppercase.
3ab3a109 759
b6381718 760It is now possible to change which Unicode properties Perl understands
761on a per-installation basis. As mentioned above, certain properties
762are turned off by default. These include all the Unihan properties
763(which should be accessible via the CPAN module Unicode::Unihan) and any
764deprecated or Unicode internal-only property that Perl has never exposed.
3ab3a109 765
b6381718 766The generated files in the C<lib/unicore/To> directory are now more
a56dbb5e 767clearly marked as being stable, directly usable by applications. New hash
768entries in them give the format of the normal entries, which allows for
769easier machine parsing. Perl can generate files in this directory for
770any property, though most are suppressed. You can find instructions
771for changing which are written in L<perluniprops>.
3ab3a109 772
b6381718 773=head1 Modules and Pragmata
3ab3a109 774
a56dbb5e 775=head2 New Modules and Pragmata
3ab3a109 776
b6381718 777=over 4
3ab3a109 778
a56dbb5e 779=item C<autodie>
3ab3a109 780
b6381718 781C<autodie> is a new lexically-scoped alternative for the C<Fatal> module.
782The bundled version is 2.06_01. Note that in this release, using a string
783eval when C<autodie> is in effect can cause the autodie behaviour to leak
784into the surrounding scope. See L<autodie/"BUGS"> for more details.
785
a56dbb5e 786Version 2.06_01 has been added to the Perl core.
3ab3a109 787
a56dbb5e 788=item C<Compress::Raw::Bzip2>
3ab3a109 789
a56dbb5e 790Version 2.024 has been added to the Perl core.
791
792=item C<overloading>
3ab3a109 793
b6381718 794C<overloading> allows you to lexically disable or enable overloading
79849ba8 795for some or all operations.
3ab3a109 796
a56dbb5e 797Version 0.001 has been added to the Perl core.
798
799=item C<parent>
b6381718 800
801C<parent> establishes an ISA relationship with base classes at compile
802time. It provides the key feature of C<base> without further unwanted
803behaviors.
3ab3a109 804
a56dbb5e 805Version 0.223 has been added to the Perl core.
806
807=item C<Parse::CPAN::Meta>
3ab3a109 808
a56dbb5e 809Version 1.40 has been added to the Perl core.
810
811=item C<VMS::DCLsym>
812
813Version 1.03 has been added to the Perl core.
814
815=item C<VMS::Stdio>
816
817Version 2.4 has been added to the Perl core.
818
819=item C<XS::APItest::KeywordRPN>
820
821Version 0.003 has been added to the Perl core.
3ab3a109 822
b6381718 823=back
3ab3a109 824
a56dbb5e 825=head2 Updated Pragmata
3ab3a109 826
b6381718 827=over 4
3ab3a109 828
a56dbb5e 829=item C<base>
830
831Upgraded from version 2.13 to 2.15.
832
833=item C<bignum>
834
835Upgraded from version 0.22 to 0.23.
836
837=item C<charnames>
b6381718 838
839C<charnames> now contains the Unicode F<NameAliases.txt> database file.
840This has the effect of adding some extra C<\N> character names that
841formerly wouldn't have been recognised; for example, C<"\N{LATIN CAPITAL
842LETTER GHA}">.
3ab3a109 843
a56dbb5e 844Upgraded from version 1.06 to 1.07.
845
846=item C<constant>
847
848Upgraded from version 1.13 to 1.20.
849
850=item C<diagnostics>
851
852C<diagnostics> now supports %.0f formatting internally.
853
854C<diagnostics> no longer suppresses C<Use of uninitialized value in range
855(or flip)> warnings. [perl #71204]
856
857Upgraded from version 1.17 to 1.19.
858
859=item C<feature>
3ab3a109 860
702b4ef6 861In C<feature>, the meaning of the C<:5.10> and C<:5.10.X> feature
862bundles has changed slightly. The last component, if any (i.e. C<X>) is
863simply ignored. This is predicated on the assumption that new features
864will not, in general, be added to maintenance releases. So C<:5.10>
865and C<:5.10.X> have identical effect. This is a change to the behaviour
866documented for 5.10.0.
3ab3a109 867
b6381718 868C<feature> now includes the C<unicode_strings> feature:
3ab3a109 869
870 use feature "unicode_strings";
871
872This pragma turns on Unicode semantics for the case-changing operations
c66407fa 873(C<uc>, C<lc>, C<ucfirst>, C<lcfirst>) on strings that don't have the
874internal UTF-8 flag set, but that contain single-byte characters between
875128 and 255.
3ab3a109 876
b7569deb 877Upgraded from version 1.11 to 1.16.
a56dbb5e 878
879=item C<less>
880
881C<less> now includes the C<stash_name> method to allow subclasses of
882C<less> to pick where in %^H to store their stash.
883
884Upgraded from version 0.02 to 0.03.
885
886=item C<lib>
887
888Upgraded from version 0.5565 to 0.62.
889
890=item C<mro>
3ab3a109 891
702b4ef6 892C<mro> is now implemented as an XS extension. The documented interface has
893not changed. Code relying on the implementation detail that some C<mro::>
b6381718 894methods happened to be available at all times gets to "keep both pieces".
3ab3a109 895
a56dbb5e 896Upgraded from version 1.00 to 1.02.
3ab3a109 897
a56dbb5e 898=item C<overload>
3ab3a109 899
b6381718 900C<overload> now allow overloading of 'qr'.
3ab3a109 901
a56dbb5e 902Upgraded from version 1.06 to 1.10.
3ab3a109 903
a56dbb5e 904=item C<threads>
3ab3a109 905
a56dbb5e 906Upgraded from version 1.67 to 1.75.
3ab3a109 907
a56dbb5e 908=item C<threads::shared>
909
910Upgraded from version 1.14 to 1.32.
911
912=item C<version>
3ab3a109 913
702b4ef6 914C<version> now has support for L</Version number formats> as described
915earlier in this document and in its own documentation.
3ab3a109 916
a56dbb5e 917Upgraded from version 0.74 to 0.82.
918
919=item C<warnings>
920
921C<warnings> has a new C<warnings::fatal_enabled()> function. It also
922includes a new C<illegalproto> warning category. See also L</New or
923Changed Diagnostics> for this change.
3ab3a109 924
a56dbb5e 925Upgraded from version 1.06 to 1.09.
3ab3a109 926
927=back
928
a56dbb5e 929=head2 Updated Modules
930
931=over 4
932
933=item C<Archive::Extract>
934
935Upgraded from version 0.24 to 0.38.
936
937=item C<Archive::Tar>
938
939Upgraded from version 1.38 to 1.54.
940
941=item C<Attribute::Handlers>
942
943Upgraded from version 0.79 to 0.87.
944
945=item C<AutoLoader>
946
947Upgraded from version 5.63 to 5.70.
948
949=item C<B::Concise>
950
951Upgraded from version 0.74 to 0.78.
952
953=item C<B::Debug>
954
955Upgraded from version 1.05 to 1.12.
956
957=item C<B::Deparse>
958
702b4ef6 959Upgraded from version 0.83 to 0.96.
a56dbb5e 960
961=item C<B::Lint>
962
963Upgraded from version 1.09 to 1.11_01.
964
965=item C<CGI>
966
967Upgraded from version 3.29 to 3.48.
968
969=item C<Class::ISA>
970
971Upgraded from version 0.33 to 0.36.
972
702b4ef6 973NOTE: C<Class::ISA> is deprecated and may be removed from a future
974version of Perl.
a56dbb5e 975
976=item C<Compress::Raw::Zlib>
977
978Upgraded from version 2.008 to 2.024.
979
980=item C<CPAN>
981
982Upgraded from version 1.9205 to 1.94_56.
983
984=item C<CPANPLUS>
985
986Upgraded from version 0.84 to 0.90.
987
988=item C<CPANPLUS::Dist::Build>
989
990Upgraded from version 0.06_02 to 0.46.
991
992=item C<Data::Dumper>
993
994Upgraded from version 2.121_14 to 2.125.
995
996=item C<DB_File>
997
998Upgraded from version 1.816_1 to 1.820.
999
1000=item C<Devel::PPPort>
1001
1002Upgraded from version 3.13 to 3.19.
1003
1004=item C<Digest>
1005
1006Upgraded from version 1.15 to 1.16.
1007
1008=item C<Digest::MD5>
1009
1010Upgraded from version 2.36_01 to 2.39.
1011
1012=item C<Digest::SHA>
1013
1014Upgraded from version 5.45 to 5.47.
1015
1016=item C<Encode>
1017
1018Upgraded from version 2.23 to 2.39.
1019
1020=item C<Exporter>
1021
1022Upgraded from version 5.62 to 5.64_01.
1023
1024=item C<ExtUtils::CBuilder>
1025
1026Upgraded from version 0.21 to 0.27.
1027
1028=item C<ExtUtils::Command>
1029
1030Upgraded from version 1.13 to 1.16.
1031
1032=item C<ExtUtils::Constant>
1033
1034Upgraded from version 0.2 to 0.22.
1035
1036=item C<ExtUtils::Install>
1037
1038Upgraded from version 1.44 to 1.55.
1039
1040=item C<ExtUtils::MakeMaker>
1041
1042Upgraded from version 6.42 to 6.56.
1043
1044=item C<ExtUtils::Manifest>
1045
1046Upgraded from version 1.51_01 to 1.57.
1047
1048=item C<ExtUtils::ParseXS>
1049
1050Upgraded from version 2.18_02 to 2.21.
1051
1052=item C<File::Fetch>
1053
1054Upgraded from version 0.14 to 0.24.
1055
1056=item C<File::Path>
1057
1058Upgraded from version 2.04 to 2.08_01.
1059
1060=item C<File::Temp>
1061
1062Upgraded from version 0.18 to 0.22.
1063
1064=item C<Filter::Simple>
1065
1066Upgraded from version 0.82 to 0.84.
1067
1068=item C<Filter::Util::Call>
1069
1070Upgraded from version 1.07 to 1.08.
1071
1072=item C<Getopt::Long>
1073
1074Upgraded from version 2.37 to 2.38.
1075
1076=item C<IO>
1077
1078Upgraded from version 1.23_01 to 1.25_02.
1079
1080=item C<IO::Zlib>
1081
1082Upgraded from version 1.07 to 1.10.
1083
1084=item C<IPC::Cmd>
1085
1086Upgraded from version 0.40_1 to 0.54.
1087
1088=item C<IPC::SysV>
1089
1090Upgraded from version 1.05 to 2.01.
1091
1092=item C<Locale::Maketext>
1093
1094Upgraded from version 1.12 to 1.14.
1095
1096=item C<Locale::Maketext::Simple>
1097
1098Upgraded from version 0.18 to 0.21.
1099
1100=item C<Log::Message>
1101
1102Upgraded from version 0.01 to 0.02.
1103
1104=item C<Log::Message::Simple>
1105
1106Upgraded from version 0.04 to 0.06.
1107
1108=item C<Math::BigInt>
1109
1110Upgraded from version 1.88 to 1.89_01.
1111
1112=item C<Math::BigInt::FastCalc>
1113
1114Upgraded from version 0.16 to 0.19.
1115
1116=item C<Math::BigRat>
1117
1118Upgraded from version 0.21 to 0.24.
1119
1120=item C<Math::Complex>
1121
1122Upgraded from version 1.37 to 1.56.
1123
1124=item C<Memoize>
1125
1126Upgraded from version 1.01_02 to 1.01_03.
1127
1128=item C<MIME::Base64>
1129
1130Upgraded from version 3.07_01 to 3.08.
1131
1132=item C<Module::Build>
1133
1134Upgraded from version 0.2808_01 to 0.3603.
1135
1136=item C<Module::CoreList>
1137
702b4ef6 1138Upgraded from version 2.12 to 2.29.
a56dbb5e 1139
1140=item C<Module::Load>
1141
1142Upgraded from version 0.12 to 0.16.
1143
1144=item C<Module::Load::Conditional>
1145
1146Upgraded from version 0.22 to 0.34.
1147
1148=item C<Module::Loaded>
1149
1150Upgraded from version 0.01 to 0.06.
1151
1152=item C<Module::Pluggable>
1153
1154Upgraded from version 3.6 to 3.9.
1155
1156=item C<Net::Ping>
1157
1158Upgraded from version 2.33 to 2.36.
1159
1160=item C<NEXT>
1161
1162Upgraded from version 0.60_01 to 0.64.
1163
1164=item C<Object::Accessor>
1165
1166Upgraded from version 0.32 to 0.36.
1167
1168=item C<Package::Constants>
1169
1170Upgraded from version 0.01 to 0.02.
1171
1172=item C<PerlIO>
1173
1174Upgraded from version 1.04 to 1.06.
1175
1176=item C<Pod::Parser>
1177
1178Upgraded from version 1.35 to 1.37.
1179
1180=item C<Pod::Perldoc>
1181
1182Upgraded from version 3.14_02 to 3.15_02.
1183
1184=item C<Pod::Plainer>
1185
1186Upgraded from version 0.01 to 1.02.
1187
702b4ef6 1188NOTE: C<Pod::Plainer> is deprecated and may be removed from a future
1189version of Perl.
a56dbb5e 1190
1191=item C<Pod::Simple>
1192
1193Upgraded from version 3.05 to 3.13.
1194
1195=item C<Safe>
1196
1197Upgraded from version 2.12 to 2.22.
1198
1199=item C<SelfLoader>
1200
1201Upgraded from version 1.11 to 1.17.
1202
1203=item C<Storable>
1204
1205Upgraded from version 2.18 to 2.22.
1206
1207=item C<Switch>
1208
1209Upgraded from version 2.13 to 2.16.
1210
702b4ef6 1211NOTE: C<Switch> is deprecated and may be removed from a future version
1212of Perl.
a56dbb5e 1213
1214=item C<Sys::Syslog>
1215
1216Upgraded from version 0.22 to 0.27.
1217
1218=item C<Term::ANSIColor>
1219
1220Upgraded from version 1.12 to 2.02.
1221
1222=item C<Term::UI>
1223
1224Upgraded from version 0.18 to 0.20.
1225
1226=item C<Test>
1227
1228Upgraded from version 1.25 to 1.25_02.
1229
1230=item C<Test::Harness>
1231
1232Upgraded from version 2.64 to 3.17.
1233
1234=item C<Test::Simple>
1235
1236Upgraded from version 0.72 to 0.94.
1237
1238=item C<Text::Balanced>
1239
1240Upgraded from version 2.0.0 to 2.02.
1241
1242=item C<Text::ParseWords>
1243
1244Upgraded from version 3.26 to 3.27.
1245
1246=item C<Text::Soundex>
1247
1248Upgraded from version 3.03 to 3.03_01.
1249
1250=item C<Thread::Queue>
1251
1252Upgraded from version 2.00 to 2.11.
1253
1254=item C<Thread::Semaphore>
1255
1256Upgraded from version 2.01 to 2.09.
1257
1258=item C<Tie::RefHash>
1259
1260Upgraded from version 1.37 to 1.38.
1261
1262=item C<Time::HiRes>
1263
1264Upgraded from version 1.9711 to 1.9719.
1265
1266=item C<Time::Local>
1267
1268Upgraded from version 1.18 to 1.1901_01.
1269
1270=item C<Time::Piece>
1271
1272Upgraded from version 1.12 to 1.15.
1273
1274=item C<Unicode::Collate>
1275
1276Upgraded from version 0.52 to 0.52_01.
1277
1278=item C<Unicode::Normalize>
1279
1280Upgraded from version 1.02 to 1.03.
1281
1282=item C<Win32>
1283
1284Upgraded from version 0.34 to 0.39.
1285
1286=item C<Win32API::File>
1287
1288Upgraded from version 0.1001_01 to 0.1101.
1289
1290=item C<XSLoader>
1291
1292Upgraded from version 0.08 to 0.10.
1293
1294=back
3ab3a109 1295
b6381718 1296=head2 Removed Modules and Pragmata
3ab3a109 1297
1298=over 4
1299
a56dbb5e 1300=item C<attrs>
3ab3a109 1301
a56dbb5e 1302Removed from the Perl core. Prior version was 1.02.
3ab3a109 1303
a56dbb5e 1304=item C<CPAN::API::HOWTO>
3ab3a109 1305
a56dbb5e 1306Removed from the Perl core. Prior version was 'undef'.
1307
1308=item C<CPAN::DeferedCode>
1309
1310Removed from the Perl core. Prior version was 5.50.
1311
1312=item C<CPANPLUS::inc>
1313
1314Removed from the Perl core. Prior version was 'undef'.
1315
1316=item C<DCLsym>
1317
1318Removed from the Perl core. Prior version was 1.03.
1319
1320=item C<ExtUtils::MakeMaker::bytes>
1321
1322Removed from the Perl core. Prior version was 6.42.
1323
1324=item C<ExtUtils::MakeMaker::vmsish>
1325
1326Removed from the Perl core. Prior version was 6.42.
3ab3a109 1327
a56dbb5e 1328=item C<Stdio>
1329
1330Removed from the Perl core. Prior version was 2.3.
1331
1332=item C<Test::Harness::Assert>
1333
1334Removed from the Perl core. Prior version was 0.02.
1335
1336=item C<Test::Harness::Iterator>
1337
1338Removed from the Perl core. Prior version was 0.02.
1339
1340=item C<Test::Harness::Point>
1341
1342Removed from the Perl core. Prior version was 0.01.
1343
1344=item C<Test::Harness::Results>
1345
1346Removed from the Perl core. Prior version was 0.01.
1347
1348=item C<Test::Harness::Straps>
1349
1350Removed from the Perl core. Prior version was 0.26_01.
1351
1352=item C<Test::Harness::Util>
1353
1354Removed from the Perl core. Prior version was 0.01.
1355
1356=item C<XSSymSet>
1357
1358Removed from the Perl core. Prior version was 1.1.
3ab3a109 1359
1360=back
1361
b6381718 1362=head2 Deprecated Modules and Pragmata
1363
1364See L</Deprecated Modules> above.
1365
a56dbb5e 1366
3ab3a109 1367=head1 Documentation
1368
1369=head2 New Documentation
1370
1371=over 4
1372
1373=item *
1374
702b4ef6 1375L<perlhaiku> contains instructions on how to build perl for the Haiku
1376platform.
3ab3a109 1377
1378=item *
1379
702b4ef6 1380L<perlmroapi> describes the new interface for pluggable Method Resolution
1381Orders.
3ab3a109 1382
1383=item *
1384
b6381718 1385L<perlperf>, by Richard Foley, provides an introduction to the use of
3ab3a109 1386performance and optimization techniques which can be used with particular
1387reference to perl programs.
1388
1389=item *
1390
702b4ef6 1391L<perlrepository> describes how to access the perl source using the I<git>
1392version control system.
3ab3a109 1393
1394=item *
1395
1396L<perlpolicy> extends the "Social contract about contributed modules" into
1397the beginnings of a document on Perl porting policies.
1398
1399=back
1400
1401=head2 Changes to Existing Documentation
1402
b6381718 1403
72d4e865 1404=over
1405
1406
1407=item *
1408
702b4ef6 1409The various large F<Changes*> files (which listed every change made
1410to perl over the last 18 years) have been removed, and replaced by a
1411small file, also called F<Changes>, which just explains how that same
1412information may be extracted from the git version control system.
3ab3a109 1413
72d4e865 1414=item *
1415
b6381718 1416F<Porting/patching.pod> has been deleted, as it mainly described
3ab3a109 1417interacting with the old Perforce-based repository, which is now obsolete.
1418Information still relevant has been moved to L<perlrepository>.
1419
3ab3a109 1420
72d4e865 1421=item *
1422
702b4ef6 1423The syntax C<unless (EXPR) BLOCK else BLOCK> is now documented as valid,
1424as is the syntax C<unless (EXPR) BLOCK elsif (EXPR) BLOCK ... else
1425BLOCK>, although actually using the latter may not be the best idea for
1426the readability of your source code.
72d4e865 1427
3ab3a109 1428
1429=item *
1430
1431Documented -X overloading.
1432
1433=item *
1434
1435Documented that C<when()> treats specially most of the filetest operators
1436
1437=item *
1438
b6381718 1439Documented C<when> as a syntax modifier.
3ab3a109 1440
1441=item *
1442
c66407fa 1443Eliminated "Old Perl threads tutorial", which described 5005 threads.
3ab3a109 1444
1445F<pod/perlthrtut.pod> is the same material reworked for ithreads.
1446
1447=item *
1448
1449Correct previous documentation: v-strings are not deprecated
1450
72d4e865 1451With version objects, we need them to use MODULE VERSION syntax. This
c66407fa 1452patch removes the deprecation notice.
3ab3a109 1453
1454=item *
1455
b6381718 1456Security contact information is now part of L<perlsec>.
1457
1458=item *
3ab3a109 1459
702b4ef6 1460A significant fraction of the core documentation has been updated to
1461clarify the behavior of Perl's Unicode handling.
3ab3a109 1462
1463Much of the remaining core documentation has been reviewed and edited
1464for clarity, consistent use of language, and to fix the spelling of Tom
1465Christiansen's name.
1466
b6381718 1467=item *
1468
3ab3a109 1469The Pod specification (L<perlpodspec>) has been updated to bring the
c66407fa 1470specification in line with modern usage already supported by most Pod
72d4e865 1471systems. A parameter string may now follow the format name in a
1472"begin/end" region. Links to URIs with a text description are now
1473allowed. The usage of C<LE<lt>"section"E<gt>> has been marked as
c66407fa 1474deprecated.
3ab3a109 1475
b6381718 1476=item *
1477
3ab3a109 1478L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
c66407fa 1479conditional loading of modules despite the implicit BEGIN block around
1480C<use>.
3ab3a109 1481
1482=item *
1483
c66407fa 1484The documentation for C<$1> in perlvar.pod has been clarified.
3ab3a109 1485
a620a577 1486=item *
1487
1488C<\N{U+I<wide hex char>}> is now documented.
1489
3ab3a109 1490=back
1491
b6381718 1492=head1 Selected Performance Enhancements
3ab3a109 1493
1494=over 4
1495
1496=item *
1497
1498A new internal cache means that C<isa()> will often be faster.
1499
1500=item *
1501
702b4ef6 1502The implementation of C<C3> Method Resolution Order has been
1503optimised - linearisation for classes with single inheritance is 40%
1504faster. Performance for multiple inheritance is unchanged.
3ab3a109 1505
1506=item *
1507
1508Under C<use locale>, the locale-relevant information is now cached on
1509read-only values, such as the list returned by C<keys %hash>. This makes
702b4ef6 1510operations such as C<sort keys %hash> in the scope of C<use locale>
1511much faster.
3ab3a109 1512
1513=item *
1514
1515Empty C<DESTROY> methods are no longer called.
1516
1517=item *
1518
b6381718 1519C<Perl_sv_utf8_upgrade()> is now faster.
3ab3a109 1520
1521=item *
1522
b6381718 1523C<keys> on empty hash is now faster.
3ab3a109 1524
1525=item *
1526
b6381718 1527C<if (%foo)> has been optimized to be faster than C<if (keys %foo)>.
3ab3a109 1528
1529=item *
1530
702b4ef6 1531The string repetition operator (C<$str x $num>) is now several times
1532faster when C<$str> has length one or C<$num> is large.
8a4f3f14 1533
1534=item *
1535
3ab3a109 1536Reversing an array to itself (as in C<@a = reverse @a>) in void context
702b4ef6 1537now happens in-place and is several orders of magnitude faster than
1538it used to be. It will also preserve non-existent elements whenever
1539possible, i.e. for non magical arrays or tied arrays with C<EXISTS>
1540and C<DELETE> methods.
3ab3a109 1541
1542=back
1543
1544=head1 Installation and Configuration Improvements
1545
72d4e865 1546=over 4
1547
1548=item *
1549
1550L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all
1551generated at build time, rather than being shipped as part of the release.
1552
1553=item *
3ab3a109 1554
702b4ef6 1555If C<vendorlib> and C<vendorarch> are the same, then they are only added
1556to C<@INC> once.
3ab3a109 1557
72d4e865 1558=item *
1559
3ab3a109 1560C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if
1561perl is built with C<-Dusedevel>.
1562
72d4e865 1563=item *
1564
3ab3a109 1565F<Configure> will enable use of C<-fstack-protector>, to provide protection
1566against stack-smashing attacks, if the compiler supports it.
1567
72d4e865 1568=item *
1569
3ab3a109 1570F<Configure> will now determine the correct prototypes for re-entrant
c66407fa 1571functions and for C<gconvert> if you are using a C++ compiler rather
3ab3a109 1572than a C compiler.
1573
72d4e865 1574=item *
1575
3ab3a109 1576On Unix, if you build from a tree containing a git repository, the
1577configuration process will note the commit hash you have checked out, for
1578display in the output of C<perl -v> and C<perl -V>. Unpushed local commits
1579are automatically added to the list of local patches displayed by
1580C<perl -V>.
1581
72d4e865 1582=item *
1583
b6381718 1584Perl now supports SystemTap's C<dtrace> compatibility layer and an
72d4e865 1585issue with linking C<miniperl> has been fixed in the process.
1586
1587=item *
1588
b6381718 1589perldoc now uses C<less -R> instead of C<less> for improved behaviour
1590in the face of C<groff>'s new usage of ANSI escape codes.
72d4e865 1591
1592=item *
1593
72d4e865 1594
b6381718 1595C<perl -V> now reports use of the compile-time options C<USE_PERL_ATOF> and
1596C<USE_ATTRIBUTES_FOR_PERLIO>.
72d4e865 1597
b6381718 1598=item *
3ab3a109 1599
1600As part of the flattening of F<ext>, all extensions on all platforms are
1601built by F<make_ext.pl>. This replaces the Unix-specific
1602F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific
1603F<win32/buildext.pl>.
1604
b6381718 1605=back
3ab3a109 1606
b6381718 1607=head1 Internal Changes
1608
1609Each release of Perl sees numerous internal changes which shouldn't
1610affect day to day usage but may still be notable for developers working
1611with Perl's source code.
1612
1613=over
3ab3a109 1614
1615=item *
1616
702b4ef6 1617The J.R.R. Tolkien quotes at the head of C source file have been checked
1618and proper citations added, thanks to a patch from Tom Christiansen.
3ab3a109 1619
1620=item *
1621
b6381718 1622The internal structure of the dual-life modules traditionally found in
1623the F<lib/> and F<ext/> directories y in the perl source has changed
1624significantly. Where possible, dual-lifed modules have been extracted
1625from F<lib/> and F<ext/>.
1626
1627Dual-lifed modules maintained by Perl's developers as part of the Perl
1628core now live in F<dist/>. Dual-lifed modules maintained primarily on
1629CPAN now live in F<cpan/>. When reporting a bug in a module located
1630under F<cpan/>, please send your bug report directly to the module's
1631bug tracker or author, rather than Perl's bug tracker.
3ab3a109 1632
1633=item *
1634
b6381718 1635C<\N{...}> now compiles better, always forces UTF-8 internal representation
1636
702b4ef6 1637Perl's developers have fixed several problems with the recognition of
1638C<\N{...}> constructs. As part of this, perl will store any scalar
1639or regex containing C<\N{I<name>}> or C<\N{U+I<wide hex char>}> in its
1640definition in UTF-8 format. (This was true previously for all occurences
1641of C<\N{I<name>}> that did not use a custom translator, but now it's
1642always true.)
3ab3a109 1643
1644=item *
1645
b6381718 1646Perl_magic_setmglob now knows about globs, fixing RT #71254.
3ab3a109 1647
1648=item *
1649
b6381718 1650C<SVt_RV> no longer exists. RVs are now stored in IVs.
3ab3a109 1651
1652=item *
1653
b6381718 1654REGEXPs are now first class.
3ab3a109 1655
1656=item *
1657
702b4ef6 1658C<Perl_vcroak()> now accepts a null first argument. In addition, a full
1659audit was made of the "not NULL" compiler annotations, and those for
1660several other internal functions were corrected.
3ab3a109 1661
1662=item *
1663
1664New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO>
1665have been added to formalise the temporary saving of the C<errno>
1666variable.
1667
1668=item *
1669
1670The function C<Perl_sv_insert_flags> has been added to augment
1671C<Perl_sv_insert>.
1672
1673=item *
1674
1675The function C<Perl_newSV_type(type)> has been added, equivalent to
1676C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>.
1677
1678=item *
1679
1680The function C<Perl_newSVpvn_flags()> has been added, equivalent to
1681C<Perl_newSVpvn()> and then performing the action relevant to the flag.
1682
1683Two flag bits are currently supported.
1684
1685=over 4
1686
1687=item *
1688
702b4ef6 1689C<SVf_UTF8> will call C<SvUTF8_on()> for you. (Note that this does
1690not convert an sequence of ISO 8859-1 characters to UTF-8). A wrapper,
1691C<newSVpvn_utf8()> is available for this.
3ab3a109 1692
1693=item *
1694
b6381718 1695C<SVs_TEMP> now calls C<Perl_sv_2mortal()> on the new SV.
3ab3a109 1696
1697=back
1698
1699There is also a wrapper that takes constant strings, C<newSVpvs_flags()>.
1700
1701=item *
1702
1703The function C<Perl_croak_xs_usage> has been added as a wrapper to
1704C<Perl_croak>.
1705
1706=item *
1707
b6381718 1708Perl now exports the functions C<PerlIO_find_layer> and C<PerlIO_list_alloc>.
3ab3a109 1709
1710=item *
1711
702b4ef6 1712C<PL_na> has been exterminated from the core code, replaced by local
1713STRLEN temporaries, or C<*_nolen()> calls. Either approach is faster than
1714C<PL_na>, which is a pointer dereference into the interpreter structure
1715under ithreads, and a global variable otherwise.
3ab3a109 1716
1717=item *
1718
702b4ef6 1719C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()>
1720on the scalar. It now updates the linked list to remove each piece of
1721magic as it is freed.
3ab3a109 1722
1723=item *
1724
702b4ef6 1725Under ithreads, the regex in C<PL_reg_curpm> is now reference
1726counted. This eliminates a lot of hackish workarounds to cope with it
1727not being reference counted.
3ab3a109 1728
1729=item *
1730
1731C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>.
1732This has been fixed.
1733
1734=item *
1735
1736The I<public> IV and NV flags are now not set if the string value has
1737trailing "garbage". This behaviour is consistent with not setting the
1738public IV or NV flags if the value is out of range for the type.
1739
1740=item *
1741
702b4ef6 1742Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have
1743been replaced by C<NULL> in the core code, and non-dual-life modules,
1744as C<NULL> is clearer to those unfamiliar with the core code.
3ab3a109 1745
1746=item *
1747
1748A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will
1749not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>,
1750C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without
1751casting away C<const>. This allows proper compile-time auditing of
702b4ef6 1752C<const> correctness in the core, and helped picked up some errors
1753(now fixed).
3ab3a109 1754
1755=item *
1756
1757Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the
1758stack and mortalizing them.
1759
1760=item *
1761
1762Use of the private structure C<mro_meta> has changed slightly. Nothing
1763outside the core should be accessing this directly anyway.
1764
b6381718 1765=item *
1766
1767A new tool, F<Porting/expand-macro.pl> has been added, that allows you
1768to view how a C preprocessor macro would be expanded when compiled.
1769This is handy when trying to decode the macro hell that is the perl
1770guts.
1771
1772=back
1773
1774=head1 Testing
1775
1776=head2 Testing improvements
1777
1778=over 4
1779
1780=item Parallel tests
1781
1782The core distribution can now run its regression tests in parallel on
1783Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in
1784your environment to the number of tests to run in parallel, and run
1785C<make test_harness>. On a Bourne-like shell, this can be done as
1786
1787 TEST_JOBS=3 make test_harness # Run 3 tests in parallel
3ab3a109 1788
b6381718 1789An environment variable is used, rather than parallel make itself, because
1790L<TAP::Harness> needs to be able to schedule individual non-conflicting test
1791scripts itself, and there is no standard interface to C<make> utilities to
1792interact with their job schedulers.
3ab3a109 1793
b6381718 1794Note that currently some test scripts may fail when run in parallel (most
1795notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts
1796again sequentially and see if the failures go away.
3ab3a109 1797
b6381718 1798=item Test harness flexibility
3ab3a109 1799
b6381718 1800It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
1801
1802=item Test watchdog
3ab3a109 1803
3ab3a109 1804Several tests that have the potential to hang forever if they fail now
1805incorporate a "watchdog" functionality that will kill them after a timeout,
1806which helps ensure that C<make test> and C<make test_harness> run to
79849ba8 1807completion automatically.
3ab3a109 1808
b6381718 1809
1810=back
1811
1812=head2 New Tests
1813
1814Perl's developers have added a number of new tests to the core.
1815In addition to the items listed below, many modules updated from CPAN
1816incorporate new tests.
3ab3a109 1817
1818=over 4
1819
1820=item *
1821
1822Significant cleanups to core tests to ensure that language and
1823interpreter features are not used before they're tested.
1824
1825=item *
1826
c66407fa 1827C<make test_porting> now runs a number of important pre-commit checks
1828which might be of use to anyone working on the Perl core.
3ab3a109 1829
1830=item *
1831
1832F<t/porting/podcheck.t> automatically checks the well-formedness of
1833POD found in all .pl, .pm and .pod files in the F<MANIFEST>, other than in
1834dual-lifed modules which are primarily maintained outside the Perl core.
1835
1836=item *
1837
702b4ef6 1838F<t/porting/manifest.t> now tests that all files listed in MANIFEST
1839are present.
3ab3a109 1840
1841=item *
1842
b6381718 1843F<t/op/while_readdir.t> tests that a bare readdir in while loop sets $_.
3ab3a109 1844
1845=item *
1846
702b4ef6 1847F<t/comp/retainedlines.t> checks that the debugger can retain source
1848lines from C<eval>.
3ab3a109 1849
1850=item *
1851
b6381718 1852F<t/io/perlio_fail.t> checks that bad layers fail.
3ab3a109 1853
1854=item *
1855
b6381718 1856F<t/io/perlio_leaks.t> checks that PerlIO layers are not leaking.
3ab3a109 1857
1858=item *
1859
b6381718 1860F<t/io/perlio_open.t> checks that certain special forms of open work.
3ab3a109 1861
1862=item *
1863
b6381718 1864F<t/io/perlio.t> includes general PerlIO tests.
3ab3a109 1865
1866=item *
1867
702b4ef6 1868F<t/io/pvbm.t> checks that there is no unexpected interaction between
1869the internal types C<PVBM> and C<PVGV>.
3ab3a109 1870
1871=item *
1872
702b4ef6 1873F<t/mro/package_aliases.t> checks that mro works properly in the presence
1874of aliased packages.
3ab3a109 1875
1876=item *
1877
b6381718 1878F<t/op/dbm.t> tests C<dbmopen> and C<dbmclose>.
3ab3a109 1879
1880=item *
1881
b6381718 1882F<t/op/index_thr.t> tests the interaction of C<index> and threads.
3ab3a109 1883
1884=item *
1885
b6381718 1886F<t/op/pat_thr.t> tests the interaction of esoteric patterns and threads.
3ab3a109 1887
1888=item *
1889
b6381718 1890F<t/op/qr_gc.t> tests that C<qr> doesn't leak.
3ab3a109 1891
1892=item *
1893
b6381718 1894F<t/op/reg_email_thr.t> tests the interaction of regex recursion and threads.
3ab3a109 1895
1896=item *
1897
702b4ef6 1898F<t/op/regexp_qr_embed_thr.t> tests the interaction of patterns with
1899embedded C<qr//> and threads.
3ab3a109 1900
1901=item *
1902
702b4ef6 1903F<t/op/regexp_unicode_prop.t> tests Unicode properties in regular
1904expressions.
3ab3a109 1905
1906=item *
1907
702b4ef6 1908F<t/op/regexp_unicode_prop_thr.t> tests the interaction of Unicode
1909properties and threads.
3ab3a109 1910
1911=item *
1912
b6381718 1913F<t/op/reg_nc_tie.t> tests the tied methods of C<Tie::Hash::NamedCapture>.
3ab3a109 1914
1915=item *
1916
702b4ef6 1917F<t/op/reg_posixcc.t> checks that POSIX character classes behave
1918consistently.
3ab3a109 1919
1920=item *
1921
0c359e6f 1922F<t/op/re.t> checks that exportable C<re> functions in F<universal.c> work.
3ab3a109 1923
1924=item *
1925
b6381718 1926F<t/op/setpgrpstack.t> checks that C<setpgrp> works.
3ab3a109 1927
1928=item *
1929
b6381718 1930F<t/op/substr_thr.t> tests the interaction of C<substr> and threads.
3ab3a109 1931
1932=item *
1933
b6381718 1934F<t/op/upgrade.t> checks that upgrading and assigning scalars works.
3ab3a109 1935
1936=item *
1937
b6381718 1938F<t/uni/lex_utf8.t> checks that Unicode in the lexer works.
3ab3a109 1939
1940=item *
1941
b6381718 1942F<t/uni/tie.t> checks that Unicode and C<tie> work.
3ab3a109 1943
1944=item *
1945
b6381718 1946F<t/comp/final_line_num.t> tests whether line numbers are correct at EOF
3ab3a109 1947
1948=item *
1949
b6381718 1950F<t/comp/form_scope.t> tests format scoping.
3ab3a109 1951
1952=item *
1953
b6381718 1954F<t/comp/line_debug.t> tests whether C<< @{"_<$file"} >> works.
3ab3a109 1955
1956=item *
1957
b6381718 1958F<t/op/filetest_t.t> tests if -t file test works.
3ab3a109 1959
1960=item *
1961
b6381718 1962F<t/op/qr.t> tests C<qr>.
3ab3a109 1963
1964=item *
1965
b6381718 1966F<t/op/utf8cache.t> tests malfunctions of the utf8 cache.
3ab3a109 1967
1968=item *
1969
b6381718 1970F<t/re/uniprops.t> test unicodes C<\p{}> regex constructs.
3ab3a109 1971
b16f1257 1972=item *
1973
b6381718 1974F<t/op/filehandle.t> tests some suitably portable filetest operators
1975to check that they work as expected, particularly in the light of some
1976internal changes made in how filehandles are blessed.
72d4e865 1977
b16f1257 1978=item *
1979
b6381718 1980F<t/op/time_loop.t> tests that unix times greater than C<2**63>, which
1981can now be handed to C<gmtime> and C<localtime>, do not cause an internal
1982overflow or an excessively long loop.
72d4e865 1983
3ab3a109 1984=back
1985
3ab3a109 1986
b6381718 1987=head1 New or Changed Diagnostics
72d4e865 1988
b6381718 1989=head2 New Diagnostics
72d4e865 1990
b6381718 1991=over
72d4e865 1992
b6381718 1993=item *
72d4e865 1994
b6381718 1995SV allocation tracing has been added to the diagnostics enabled by C<-Dm>.
1996The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if
1997that was enabled when the F<perl> binary was compiled.
72d4e865 1998
b6381718 1999=item *
3ab3a109 2000
702b4ef6 2001Smartmatch resolution tracing has been added as a new diagnostic. Use
2002C<-DM> to enable it.
3ab3a109 2003
b6381718 2004=item *
3ab3a109 2005
b6381718 2006A new debugging flag C<-DB> now dumps subroutine definitions, leaving
2007C<-Dx> for its original purpose of dumping syntax trees.
3ab3a109 2008
b6381718 2009=item *
3ab3a109 2010
b6381718 2011Perl 5.12 provides a number of new diagnostic messages to help you write
2012better code. See L<perldiag> for details of these new messages.
3ab3a109 2013
2014=over 4
2015
2016=item *
2017
2018C<Bad plugin affecting keyword '%s'>
2019
2020=item *
2021
2022C<gmtime(%.0f) too large>
2023
2024=item *
2025
2026C<Lexing code attempted to stuff non-Latin-1 character into Latin-1 input>
2027
2028=item *
2029
2030C<Lexing code internal error (%s)>
2031
2032=item *
2033
2034C<localtime(%.0f) too large>
2035
2036=item *
2037
2038C<Overloaded dereference did not return a reference>
2039
2040=item *
2041
2042C<Overloaded qr did not return a REGEXP>
2043
2044=item *
2045
2046C<Perl_pmflag() is deprecated, and will be removed from the XS API>
2047
2048=item *
2049
b6381718 2050C<lvalue attribute ignored after the subroutine has been defined>
3ab3a109 2051
2052This new warning is issued when one attempts to mark a subroutine as
2053lvalue after it has been defined.
2054
2055=item *
2056
702b4ef6 2057Perl now warns you if C<++> or C<--> are unable to change the value
2058because it's beyond the limit of representation.
3ab3a109 2059
2060This uses a new warnings category: "imprecision".
2061
2062=item *
c66407fa 2063
2064C<lc>, C<uc>, C<lcfirst>, and C<ucfirst> warn when passed undef.
3ab3a109 2065
2066=item *
2067
b6381718 2068C<Show constant in "Useless use of a constant in void context">
3ab3a109 2069
2070=item *
2071
b6381718 2072C<Prototype after '%s'>
3ab3a109 2073
2074=item *
2075
b6381718 2076C<panic: sv_chop %s>
2077
2078This new fatal error occurs when the C routine C<Perl_sv_chop()> was
2079passed a position that is not within the scalar's string buffer. This
2080could be caused by buggy XS code, and at this point recovery is not
2081possible.
2082
3ab3a109 2083
2084=item *
2085
b6381718 2086The fatal error C<Malformed UTF-8 returned by \N> is now produced if the
2087C<charnames> handler returns malformed UTF-8.
3ab3a109 2088
2089=item *
2090
702b4ef6 2091If an unresolved named character or sequence was encountered when
2092compiling a regex pattern then the fatal error C<\N{NAME} must be resolved
2093by the lexer> is now produced. This can happen, for example, when using a
2094single-quotish context like C<$re = '\N{SPACE}'; /$re/;>. See L<perldiag>
2095for more examples of how the lexer can get bypassed.
3ab3a109 2096
2097=item *
2098
702b4ef6 2099C<Invalid hexadecimal number in \N{U+...}> is a new fatal error
2100triggered when the character constant represented by C<...> is not a
2101valid hexadecimal number.
3ab3a109 2102
2103=item *
2104
b6381718 2105The new meaning of C<\N> as C<[^\n]> is not valid in a bracketed character
702b4ef6 2106class, just like C<.> in a character class loses its special meaning,
2107and will cause the fatal error C<\N in a character class must be a named
2108character: \N{...}>.
b6381718 2109
2110=item *
3ab3a109 2111
702b4ef6 2112The rules on what is legal for the C<...> in C<\N{...}> have been
2113tightened up so that unless the C<...> begins with an alphabetic
2114character and continues with a combination of alphanumerics, dashes,
2115spaces, parentheses or colons then the warning C<Deprecated character(s)
2116in \N{...} starting at '%s'> is now issued.
3ab3a109 2117
2118=item *
2119
702b4ef6 2120The warning C<Using just the first characters returned by \N{}> will
2121be issued if the C<charnames> handler returns a sequence of characters
2122which exceeds the limit of the number of characters that can be used. The
2123message will indicate which characters were used and which were discarded.
3ab3a109 2124
b6381718 2125=back
3ab3a109 2126
b6381718 2127=back
3ab3a109 2128
b6381718 2129=head2 Changed Diagnostics
3ab3a109 2130
b6381718 2131A number of existing diagnostic messages have been improved or corrected:
3ab3a109 2132
b6381718 2133=over
3ab3a109 2134
2135=item *
2136
b6381718 2137A new warning category C<illegalproto> allows finer-grained control of
2138warnings around function prototypes.
3ab3a109 2139
b6381718 2140The two warnings:
3ab3a109 2141
b6381718 2142=over
3ab3a109 2143
b6381718 2144=item C<Illegal character in prototype for %s : %s>
2145
2146=item C<Prototype after '%c' for %s : %s>
2147
2148=back
2149
2150have been moved from the C<syntax> top-level warnings category into a new
702b4ef6 2151first-level category, C<illegalproto>. These two warnings are currently
2152the only ones emitted during parsing of an invalid/illegal prototype,
2153so one can now use
b6381718 2154
2155 no warnings 'illegalproto';
2156
702b4ef6 2157to suppress only those, but not other syntax-related warnings. Warnings
2158where prototypes are changed, ignored, or not met are still in the
2159C<prototype> category as before.
3ab3a109 2160
2161=item *
2162
3ab3a109 2163C<Deep recursion on subroutine "%s">
2164
2165It is now possible to change the depth threshold for this warning from the
2166default of 100, by recompiling the F<perl> binary, setting the C
2167pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
2168
2169=item *
2170
b6381718 2171C<Illegal character in prototype> warning is now more precise
2172when reporting illegal characters after _
3ab3a109 2173
2174=item *
2175
702b4ef6 2176mro merging error messages are now very similar to those produced by
2177L<Algorithm::C3>.
3ab3a109 2178
2179=item *
2180
b6381718 2181Amelioration of the error message "Unrecognized character %s in column %d"
2182
2183Changes the error message to "Unrecognized character %s; marked by E<lt>--
2184HERE after %sE<lt>-- HERE near column %d". This should make it a little
2185simpler to spot and correct the suspicious character.
3ab3a109 2186
2187=item *
2188
702b4ef6 2189Perl now explicitly points to C<$.> when it causes an uninitialized
2190warning for ranges in scalar context.
3ab3a109 2191
2192=item *
2193
b6381718 2194C<split> now warns when called in void context.
3ab3a109 2195
2196=item *
2197
b6381718 2198C<printf>-style functions called with too few arguments will now issue the
2199warning C<"Missing argument in %s"> [perl #71000]
3ab3a109 2200
2201=item *
2202
b6381718 2203Perl now properly returns a syntax error instead of segfaulting
2204if C<each>, C<keys>, or C<values> is used without an argument.
3ab3a109 2205
2206=item *
2207
b6381718 2208C<tell()> now fails properly if called without an argument and when no
2209previous file was read.
3ab3a109 2210
b6381718 2211C<tell()> now returns C<-1>, and sets errno to C<EBADF>, thus restoring
2212the 5.8.x behaviour.
3ab3a109 2213
2214=item *
2215
b6381718 2216C<overload> no longer implicitly unsets fallback on repeated 'use
2217overload' lines.
3ab3a109 2218
72d4e865 2219=item *
2220
b6381718 2221POSIX::strftime() can now handle Unicode characters in the format string.
72d4e865 2222
2223=item *
2224
b6381718 2225The C<syntax> category was removed from 5 warnings that should only be in
2226C<deprecated>.
72d4e865 2227
2228=item *
2229
b6381718 2230Three fatal C<pack>/C<unpack> error messages have been normalized to
2231C<panic: %s>
72d4e865 2232
2233=item *
2234
b6381718 2235C<Unicode character is illegal> has been rephrased to be more accurate
2236
2237It now reads C<Unicode non-character is illegal in interchange> and the
2238perldiag documentation has been expanded a bit.
72d4e865 2239
2240=item *
2241
702b4ef6 2242Currently, all but the first of the several characters that the
2243C<charnames> handler may return are discarded when used in a regular
2244expression pattern bracketed character class. If this happens then the
2245warning C<Using just the first character returned by \N{} in character
2246class> will be issued.
72d4e865 2247
2248=item *
2249
702b4ef6 2250The warning C<Missing right brace on \N{} or unescaped left brace after
2251\N. Assuming the latter> will be issued if Perl encounters a C<\N{>
2252but doesn't find a matching C<}>. In this case Perl doesn't know if it
2253was mistakenly omitted, or if "match non-newline" followed by "match
2254a C<{>" was desired. It assumes the latter because that is actually a
2255valid interpretation as written, unlike the other case. If you meant
2256the former, you need to add the matching right brace. If you did mean
2257the latter, you can silence this warning by writing instead C<\N\{>.
72d4e865 2258
2259=item *
2260
702b4ef6 2261C<gmtime> and C<localtime> called with numbers smaller than they can
2262reliably handle will now issue the warnings C<gmtime(%.0f) too small>
2263and C<localtime(%.0f) too small>.
72d4e865 2264
2265=back
3ab3a109 2266
b6381718 2267The following diagnostic messages have been removed:
c66407fa 2268
2269=over 4
2270
2271=item *
2272
2273C<Runaway format>
2274
2275=item *
2276
2277C<Can't locate package %s for the parents of %s>
2278
b6381718 2279In general this warning it only got produced in
c66407fa 2280conjunction with other warnings, and removing it allowed an ISA lookup
2281optimisation to be added.
2282
2283=item *
2284
2285C<v-string in use/require is non-portable>
2286
2287=back
2288
3ab3a109 2289=head1 Utility Changes
2290
2291=over 4
2292
2293=item *
2294
702b4ef6 2295F<h2ph> now looks in C<include-fixed> too, which is a recent addition
2296to gcc's search path.
3ab3a109 2297
2298=item *
2299
79849ba8 2300F<h2xs> no longer incorrectly treats enum values like macros.
2301It also now handles C++ style comments (C<//>) properly in enums.
3ab3a109 2302
2303=item *
2304
d13f8571 2305F<perl5db.pl> now supports C<LVALUE> subroutines. Additionally, the
2306debugger now correctly handles proxy constant subroutines, and
2307subroutine stubs.
3ab3a109 2308
2309=item *
2310
b6381718 2311F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out
2312upstream bug tracker URLs. If a user identifies a particular module
4655b0a1 2313as the topic of their bug report and we're able to divine the URL for
b6381718 2314its upstream bug tracker, perlbug now provide a message to the user
2315explaining that the core copies the CPAN version directly, and provide
2316the URL for reporting the bug directly to the upstream author.
3ab3a109 2317
702b4ef6 2318F<perlbug> no longer reports "Message sent" when it hasn't actually sent
2319the message
3ab3a109 2320
2321=item *
2322
b6381718 2323F<perlthanks> is a new utility for sending non-bug-reports to the
2324authors and maintainers of Perl. Getting nothing but bug reports can
2325become a bit demoralising. If Perl 5.12 works well for you, please try
2326out F<perlthanks>. It will make the developers smile.
3ab3a109 2327
2328=item *
2329
b6381718 2330Perl's developers have fixed bugs in F<a2p> having to do with the
e014eb68 2331C<match()> operator in list context. Additionally, F<a2p> no longer
2332generates code that uses the C<$[> variable.
3ab3a109 2333
2334=back
2335
2336=head1 Selected Bug Fixes
2337
2338=over 4
2339
2340=item *
2341
b6381718 2342U+0FFFF is now a legal character in regular expressions.
2343
2344=item *
2345
2346pp_qr now always returns a new regexp SV. Resolves RT #69852.
3ab3a109 2347
702b4ef6 2348Instead of returning a(nother) reference to the (pre-compiled) regexp
2349in the optree, use reg_temp_copy() to create a copy of it, and return a
2350reference to that. This resolves issues about Regexp::DESTROY not being
2351called in a timely fashion (the original bug tracked by RT #69852), as
2352well as bugs related to blessing regexps, and of assigning to regexps,
2353as described in correspondence added to the ticket.
3ab3a109 2354
2355It transpires that we also need to undo the SvPVX() sharing when ithreads
702b4ef6 2356cloning a Regexp SV, because mother_re is set to NULL, instead of a
2357cloned copy of the mother_re. This change might fix bugs with regexps
2358and threads in certain other situations, but as yet neither tests nor
2359bug reports have indicated any problems, so it might not actually be an
2360edge case that it's possible to reach.
3ab3a109 2361
2362=item *
2363
702b4ef6 2364Several compilation errors and segfaults when perl was built with C<-Dmad>
2365were fixed.
3ab3a109 2366
2367=item *
2368
2369Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
2370
2371=item *
2372
c66407fa 2373C<-t> should only return TRUE for file handles connected to a TTY
3ab3a109 2374
702b4ef6 2375The Microsoft C version of C<isatty()> returns TRUE for all character mode
2376devices, including the F</dev/null>-style "nul" device and printers like
2377"lpt1".
3ab3a109 2378
2379=item *
2380
2381Fixed a regression caused by commit fafafbaf which caused a panic during
2382parameter passing [perl #70171]
2383
2384=item *
2385
2386On systems which in-place edits without backup files, -i'*' now works as
2387the documentation says it does [perl #70802]
2388
2389=item *
2390
2391Saving and restoring magic flags no longer loses readonly flag.
2392
2393=item *
2394
2395The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer
2396causes abrupt and total failure.
2397
2398=item *
2399
2400Regular expressions compiled with C<qr{}> literals properly set C<$'> when
2401matching again.
2402
2403=item *
2404
702b4ef6 2405Using named subroutines with C<sort> should no longer lead to bus errors
2406[perl #71076]
3ab3a109 2407
2408=item *
2409
2410Numerous bugfixes catch small issues caused by the recently-added Lexer API.
2411
2412=item *
2413
2414Smart match against C<@_> sometimes gave false negatives. [perl #71078]
2415
2416=item *
2417
c66407fa 2418C<$@> may now be assigned a read-only value (without error or busting
2419the stack).
3ab3a109 2420
2421=item *
2422
2423C<sort> called recursively from within an active comparison subroutine no
2424longer causes a bus error if run multiple times. [perl #71076]
2425
2426=item *
2427
c66407fa 2428Tie::Hash::NamedCapture::* will not abort if passed bad input (RT #71828)
3ab3a109 2429
2430=item *
2431
2432@_ and $_ no longer leak under threads (RT #34342 and #41138, also
2433#70602, #70974)
2434
2435=item *
2436
2437C<-I> on shebang line now adds directories in front of @INC
2438as documented, and as does C<-I> when specified on the command-line.
2439
2440=item *
2441
2442C<kill> is now fatal when called on non-numeric process identifiers.
c66407fa 2443Previously, an C<undef> process identifier would be interpreted as a
2444request to kill process 0, which would terminate the current process
72d4e865 2445group on POSIX systems. Since process identifiers are always integers,
c66407fa 2446killing a non-numeric process is now fatal.
3ab3a109 2447
2448=item *
2449
24505.10.0 inadvertently disabled an optimisation, which caused a measurable
2451performance drop in list assignment, such as is often used to assign
2452function parameters from C<@_>. The optimisation has been re-instated, and
72d4e865 2453the performance regression fixed. (This fix is also present in 5.10.1)
3ab3a109 2454
2455=item *
2456
2457Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038].
2458
2459=item *
2460
2461Some potential coredumps in PerlIO fixed [RT #57322,54828].
2462
2463=item *
2464
2465The debugger now works with lvalue subroutines.
2466
2467=item *
2468
2469The debugger's C<m> command was broken on modules that defined constants
2470[RT #61222].
2471
2472=item *
2473
2474C<crypt> and string complement could return tainted values for untainted
2475arguments [RT #59998].
2476
2477=item *
2478
2479The C<-i>I<.suffix> command-line switch now recreates the file using
2480restricted permissions, before changing its mode to match the original
2481file. This eliminates a potential race condition [RT #60904].
2482
2483=item *
2484
2485On some Unix systems, the value in C<$?> would not have the top bit set
2486(C<$? & 128>) even if the child core dumped.
2487
2488=item *
2489
2490Under some circumstances, C<$^R> could incorrectly become undefined
2491[RT #57042].
2492
2493=item *
2494
2495In the XS API, various hash functions, when passed a pre-computed hash where
2496the key is UTF-8, might result in an incorrect lookup.
2497
2498=item *
2499
2500XS code including F<XSUB.h> before F<perl.h> gave a compile-time error
2501[RT #57176].
2502
2503=item *
2504
702b4ef6 2505C<< $object-E<gt>isa('Foo') >> would report false if the package C<Foo>
2506didn't exist, even if the object's C<@ISA> contained C<Foo>.
3ab3a109 2507
2508=item *
2509
2510Various bugs in the new-to 5.10.0 mro code, triggered by manipulating
2511C<@ISA>, have been found and fixed.
2512
2513=item *
2514
2515Bitwise operations on references could crash the interpreter, e.g.
2516C<$x=\$y; $x |= "foo"> [RT #54956].
2517
2518=item *
2519
2520Patterns including alternation might be sensitive to the internal UTF-8
2521representation, e.g.
2522
2523 my $byte = chr(192);
2524 my $utf8 = chr(192); utf8::upgrade($utf8);
2525 $utf8 =~ /$byte|X}/i; # failed in 5.10.0
2526
2527=item *
2528
2529Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in
2530effect), double-quoted literal strings could be corrupted where a C<\xNN>,
2531C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value
2532greater than 255 [RT #59908].
2533
2534=item *
2535
2536C<B::Deparse> failed to correctly deparse various constructs:
2537C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488],
2538C<sub foo(_)> [RT #62484].
2539
2540=item *
2541
2542Using C<setpgrp> with no arguments could corrupt the perl stack.
2543
2544=item *
2545
2546The block form of C<eval> is now specifically trappable by C<Safe> and
72d4e865 2547C<ops>. Previously it was erroneously treated like string C<eval>.
3ab3a109 2548
2549=item *
2550
2551In 5.10.0, the two characters C<[~> were sometimes parsed as the smart
2552match operator (C<~~>) [RT #63854].
2553
2554=item *
2555
2556In 5.10.0, the C<*> quantifier in patterns was sometimes treated as
2557C<{0,32767}> [RT #60034, #60464]. For example, this match would fail:
2558
2559 ("ab" x 32768) =~ /^(ab)*$/
2560
2561=item *
2562
2563C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924].
2564
2565=item *
2566
2567Using C<next> or C<last> to exit a C<given> block no longer produces a
2568spurious warning like the following:
2569
2570 Exiting given via last at foo.pl line 123
2571
2572=item *
2573
3ab3a109 2574Assigning a format to a glob could corrupt the format; e.g.:
2575
2576 *bar=*foo{FORMAT}; # foo format now bad
2577
2578=item *
2579
2580Attempting to coerce a typeglob to a string or number could cause an
2581assertion failure. The correct error message is now generated,
2582C<Can't coerce GLOB to I<$type>>.
2583
2584=item *
2585
702b4ef6 2586Under C<use filetest 'access'>, C<-x> was using the wrong access
2587mode. This has been fixed [RT #49003].
3ab3a109 2588
2589=item *
2590
2591C<length> on a tied scalar that returned a Unicode value would not be
2592correct the first time. This has been fixed.
2593
2594=item *
2595
2596Using an array C<tie> inside in array C<tie> could SEGV. This has been
2597fixed. [RT #51636]
2598
2599=item *
2600
2601A race condition inside C<PerlIOStdio_close()> has been identified and
2602fixed. This used to cause various threading issues, including SEGVs.
2603
2604=item *
2605
2606In C<unpack>, the use of C<()> groups in scalar context was internally
2607placing a list on the interpreter's stack, which manifested in various
72d4e865 2608ways, including SEGVs. This is now fixed [RT #50256].
3ab3a109 2609
2610=item *
2611
2612Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>.
2613These have all been fixed.
2614
2615=item *
2616
2617A 5.10.0 optimisation to clear the temporary stack within the implicit
2618loop of C<s///ge> has been reverted, as it turned out to be the cause of
2619obscure bugs in seemingly unrelated parts of the interpreter [commit
2620ef0d4e17921ee3de].
2621
2622=item *
2623
2624The line numbers for warnings inside C<elsif> are now correct.
2625
2626=item *
2627
2628The C<..> operator now works correctly with ranges whose ends are at or
2629close to the values of the smallest and largest integers.
2630
2631=item *
2632
2633C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
2634This has been fixed [RT #54828].
2635
2636=item *
2637
2638An off-by-one error meant that C<index $str, ...> was effectively being
2639executed as C<index "$str\0", ...>. This has been fixed [RT #53746].
2640
2641=item *
2642
2643Various leaks associated with named captures in regexes have been fixed
2644[RT #57024].
2645
2646=item *
2647
2648A weak reference to a hash would leak. This was affecting C<DBI>
2649[RT #56908].
2650
2651=item *
2652
2653Using (?|) in a regex could cause a segfault [RT #59734].
2654
2655=item *
2656
2657Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520].
2658
2659=item *
2660
2661Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an
2662unaligned 64-bit access on the SPARC architecture [RT #60574].
2663
2664=item *
2665
2666In the 5.10.0 release, C<inc_version_list> would incorrectly list
2667C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order
2668[RT #67628].
2669
2670=item *
2671
2672In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value
2673[RT #52552].
2674
2675=item *
2676
2677In 5.10.0, C<printf> and C<sprintf> could produce the fatal error
2678C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings
2679[RT #62666].
2680
2681=item *
2682
2683In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be
2684missed (method cache issue) [RT #60220,60232].
2685
2686=item *
2687
2688In the 5.10.0 release, a combination of C<use feature> and C<//ee> could
2689cause a memory leak [RT #63110].
2690
2691=item *
2692
2693C<-C> on the shebang (C<#!>) line is once more permitted if it is also
2694specified on the command line. C<-C> on the shebang line used to be a
2695silent no-op I<if> it was not also on the command line, so perl 5.10.0
2696disallowed it, which broke some scripts. Now perl checks whether it is
2697also on the command line and only dies if it is not [RT #67880].
2698
2699=item *
2700
2701In 5.10.0, certain types of re-entrant regular expression could crash,
2702or cause the following assertion failure [RT #60508]:
2703
2704 Assertion rx->sublen >= (s - rx->subbeg) + i failed
2705
2706=item *
2707
702b4ef6 2708Perl now includes previously missing files from the Unicode Character
2709Database.
3ab3a109 2710
2711=item *
2712
b6381718 2713Perl now honors C<TMPDIR> when opening an anonymous temporary file.
3ab3a109 2714
2715=back
2716
b6381718 2717
3ab3a109 2718=head1 Platform Specific Changes
2719
b6381718 2720Perl is incredibly portable. In general, if a platform has a C compiler,
2721someone has ported Perl to it (or will soon). We're happy to announce
2722that Perl 5.12 includes support for several new platforms. At the same
2723time, it's time to bid farewell to some (very) old friends.
2724
3ab3a109 2725=head2 New Platforms
2726
2727=over
2728
2729=item Haiku
2730
702b4ef6 2731Perl's developers have merged patches from Haiku's maintainers. Perl
2732should now build on Haiku.
3ab3a109 2733
2734=item MirOS BSD
2735
2736Perl should now build on MirOS BSD.
2737
3ab3a109 2738=back
2739
2740=head2 Discontinued Platforms
2741
2742=over
2743
3b72faae 2744=item Domain/OS
3ab3a109 2745
3ab3a109 2746=item MiNT
2747
8ead3603 2748=item Tenon MachTen
2749
3ab3a109 2750=back
2751
2752=head2 Updated Platforms
2753
2754=over 4
2755
8ead3603 2756=item AIX
2757
2758=over 4
2759
2760=item *
2761
702b4ef6 2762Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from
2763F<libbsd>.
8ead3603 2764
2765=item *
2766
702b4ef6 2767Removed F<libgdbm> for AIX 5L and 6.1 if F<libgdbm> < 1.8.3-5 is
2768installed. The F<libgdbm> is delivered as an optional package with the
2769AIX Toolbox. Unfortunately the versions below 1.8.3-5 are broken.
8ead3603 2770
2771=item *
2772
2773Hints changes mean that AIX 4.2 should work again.
2774
2775=back
2776
2777=item Cygwin
2778
2779=over 4
2780
2781=item *
2782
2783Perl now supports IPv6 on Cygwin 1.7 and newer.
2784
2785=item *
2786
2787On Cygwin we now strip the last number from the DLL. This has been the
2788behaviour in the cygwin.com build for years. The hints files have been
2789updated.
2790
2791=back
2792
3ab3a109 2793=item Darwin (Mac OS X)
2794
2795=over 4
2796
2797=item *
2798
2799Skip testing the be_BY.CP1131 locale on Darwin 10 (Mac OS X 10.6),
2800as it's still buggy.
2801
2802=item *
2803
2804Correct infelicities in the regexp used to identify buggy locales
2805on Darwin 8 and 9 (Mac OS X 10.4 and 10.5, respectively).
2806
2807=back
2808
2809=item DragonFly BSD
2810
2811=over 4
2812
2813=item *
2814
2815Fix thread library selection [perl #69686]
2816
2817=back
2818
8ead3603 2819=item FreeBSD
3ab3a109 2820
2821=over 4
2822
2823=item *
2824
8ead3603 2825The hints files now identify the correct threading libraries on FreeBSD 7
2826and later.
3ab3a109 2827
8ead3603 2828=back
3ab3a109 2829
8ead3603 2830=item Irix
3ab3a109 2831
8ead3603 2832=over 4
3ab3a109 2833
2834=item *
2835
8ead3603 2836We now work around a bizarre preprocessor bug in the Irix 6.5 compiler:
2837C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't.
3ab3a109 2838
2839=back
2840
8ead3603 2841=item NetBSD
3ab3a109 2842
2843=over 4
2844
2845=item *
2846
8ead3603 2847Hints now supports versions 5.*.
3ab3a109 2848
2849=back
2850
2851=item OpenVMS
2852
2853=over 4
2854
2855=item *
2856
b6381718 2857C<-UDEBUGGING> is now the default on VMS.
3ab3a109 2858
702b4ef6 2859Like it has been everywhere else for ages and ages. Also make command-line
2860selection of -UDEBUGGING and -DDEBUGGING work in configure.com; before
2861the only way to turn it off was by saying no in answer to the interactive
2862question.
3ab3a109 2863
2864=item *
2865
2866The default pipe buffer size on VMS has been updated to 8192 on 64-bit
2867systems.
2868
2869=item *
2870
2871Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail
2872if C<$/> was set to a numeric reference (to indicate record-style reads).
2873This is now fixed.
2874
2875=item *
2876
2877VMS now supports C<getgrgid>.
2878
2879=item *
2880
2881Many improvements and cleanups have been made to the VMS file name handling
2882and conversion code.
2883
2884=item *
2885
2886Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit
2887status in a VMS condition value for better interaction with GNV's bash
72d4e865 2888shell and other utilities that depend on POSIX exit values. See
3ab3a109 2889L<perlvms/"$?"> for details.
2890
2891=item *
2892
2893C<File::Copy> now detects Unix compatibility mode on VMS.
2894
2895=back
2896
8ead3603 2897=item Stratus VOS
3ab3a109 2898
8ead3603 2899=over 4
3ab3a109 2900
8ead3603 2901=item *
3ab3a109 2902
8ead3603 2903Various changes from Stratus have been merged in.
3ab3a109 2904
8ead3603 2905=back
3ab3a109 2906
8ead3603 2907=item Symbian
3ab3a109 2908
8ead3603 2909=over 4
3ab3a109 2910
8ead3603 2911=item *
3ab3a109 2912
8ead3603 2913There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
3ab3a109 2914
8ead3603 2915=back
3ab3a109 2916
d13f8571 2917=item Windows
3ab3a109 2918
8ead3603 2919=over 4
3ab3a109 2920
8ead3603 2921=item *
3ab3a109 2922
d13f8571 2923Perl 5.12 supports Windows 2000 and later. The supporting code for
2924legacy versions of Windows is still included, but will be removed
2925during the next development cycle.
3ab3a109 2926
8ead3603 2927=item *
3ab3a109 2928
d13f8571 2929Initial support for building Perl with MinGW-w64 is now available.
3ab3a109 2930
8ead3603 2931=item *
2932
d13f8571 2933F<perl.exe> now includes a manifest resource to specify the C<trustInfo>
8ead3603 2934settings for Windows Vista and later. Without this setting Windows
d13f8571 2935would treat F<perl.exe> as a legacy application and apply various
8ead3603 2936heuristics like redirecting access to protected file system areas
2937(like the "Program Files" folder) to the users "VirtualStore"
2938instead of generating a proper "permission denied" error.
2939
d13f8571 2940The manifest resource also requests the Microsoft Common-Controls
2941version 6.0 (themed controls introduced in Windows XP). Check out the
2942Win32::VisualStyles module on CPAN to switch back to old style
2943unthemed controls for legacy applications.
2944
2945=item *
2946
2947The C<-t> filetest operator now only returns true if the filehandle
2948is connected to a console window. In previous versions of Perl it
2949would return true for all character mode devices, including F<NUL>
2950and F<LPT1>.
2951
2952=item *
2953
2954The C<-p> filetest operator now works correctly, and the
2955Fcntl::S_IFIFO constant is defined when Perl is compiled with
2956Microsoft Visual C. In previous Perl versions C<-p> always
2957returned a false value, and the Fcntl::S_IFIFO constant
2958was not defined.
2959
2960This bug is specific to Microsoft Visual C and never affected
2961Perl binaries built with MinGW.
2962
2963=item *
2964
2965The socket error codes are now more widely supported: The POSIX
2966module will define the symbolic names, like POSIX::EWOULDBLOCK,
2967and stringification of socket error codes in $! works as well
2968now;
2969
2970 C:\>perl -MPOSIX -E "$!=POSIX::EWOULDBLOCK; say $!"
2971 A non-blocking socket operation could not be completed immediately.
2972
2973=item *
2974
2975flock() will now set sensible error codes in $!. Previous Perl versions
2976copied the value of $^E into $!, which caused much confusion.
2977
2978=item *
2979
2980select() now supports all empty C<fd_set>s more correctly.
8ead3603 2981
d13f8571 2982=item *
2983
2984C<'.\foo'> and C<'..\foo'> were treated differently than
2985C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492].
8ead3603 2986
2987=item *
2988
2989Improved message window handling means that C<alarm> and C<kill> messages
2990will no longer be dropped under race conditions.
2991
d13f8571 2992=item *
2993
2994Various bits of Perl's build infrastructure are no longer converted to
2995win32 line endings at release time. If this hurts you, please report the
2996problem with the L<perlbug> program included with perl.
2997
8ead3603 2998=back
3ab3a109 2999
3000=back
3001
b6381718 3002
3ab3a109 3003=head1 Known Problems
3004
3005This is a list of some significant unfixed bugs, which are regressions
72d4e865 3006from either 5.10.x or 5.8.x.
3ab3a109 3007
3008=over 4
3009
3010=item *
3011
3012C<List::Util::first> misbehaves in the presence of a lexical C<$_>
3013(typically introduced by C<my $_> or implicitly by C<given>). The variable
3014which gets set for each iteration is the package variable C<$_>, not the
3015lexical C<$_> [RT #67694].
3016
3017A similar issue may occur in other modules that provide functions which
3018take a block as their first argument, like
3019
3020 foo { ... $_ ...} list
3021
3022=item *
3023
3ab3a109 3024Some regexes may run much more slowly when run in a child thread compared
3025with the thread the pattern was compiled into [RT #55600].
3026
3027=item *
3028
3d3a8206 3029Things like C<"\N{LATIN SMALL LIGATURE FF}" =~ /\N{LATIN SMALL LETTER F}+/>
3030will appear to hang as they get into a very long running loop [RT #72998].
3031
3032=item *
3033
d13f8571 3034Several porters have reported mysterious crashes when Perl's entire
3035test suite is run after a build on certain Windows 2000 systems. When
3036run by hand, the individual tests reportedly work fine.
3ab3a109 3037
b6381718 3038=back
3039
3040=head1 Errata
3041
3042=over
3043
3ab3a109 3044=item *
3045
b6381718 3046This one is actually a change introduced in 5.10.0, but it was missed
3047from that release's perldelta, so it is mentioned here instead.
3048
3049A bugfix related to the handling of the C</m> modifier and C<qr> resulted
3050in a change of behaviour between 5.8.x and 5.10.0:
3ab3a109 3051
b6381718 3052 # matches in 5.8.x, doesn't match in 5.10.0
3053 $re = qr/^bar/; "foo\nbar" =~ /$re/m;
3ab3a109 3054
3ab3a109 3055=back
3056
3057=head1 Acknowledgements
3058
3059Perl 5.12.0 represents approximately two years of development since
aac88411 3060Perl 5.10.0 and contains over 750,000 lines of changes across over
ee75e258 30613,000 files from over 200 authors and committers.
aac88411 3062
d13f8571 3063Perl continues to flourish into its third decade thanks to a vibrant
3064community of users and developers. The following people are known to
3065have contributed the improvements that became Perl 5.12.0:
aac88411 3066
3067Aaron Crane, Abe Timmerman, Abhijit Menon-Sen, Abigail, Adam Russell,
3068Adriano Ferreira, Ævar Arnfjörð Bjarmason, Alan Grover, Alexandr
3069Ciornii, Alex Davies, Alex Vandiver, Andreas Koenig, Andrew Rodland,
3070andrew@sundale.net, Andy Armstrong, Andy Dougherty, Jose AUGUSTE-ETIENNE,
3071Benjamin Smith, Ben Morrow, bharanee rathna, Bo Borgerson, Bo Lindbergh,
3072Brad Gilbert, Bram, Brendan O'Dea, brian d foy, Charles Bailey,
3073Chip Salzenberg, Chris 'BinGOs' Williams, Christoph Lamprecht, Chris
3074Williams, chromatic, Claes Jakobsson, Craig A. Berry, Dan Dascalescu,
3075Daniel Frederick Crisman, Daniel M. Quinlan, Dan Jacobson, Dan Kogai,
3076Dave Mitchell, Dave Rolsky, David Cantrell, David Dick, David Golden,
3077David Mitchell, David M. Syzdek, David Nicol, David Wheeler, Dennis
3078Kaarsemaker, Dintelmann, Peter, Dominic Dunlop, Dr.Ruud, Duke Leto,
3079Enrico Sorcinelli, Eric Brine, Father Chrysostomos, Florian Ragwitz,
3080Frank Wiegand, Gabor Szabo, Gene Sullivan, Geoffrey T. Dairiki, George
3081Greer, Gerard Goossen, Gisle Aas, Goro Fuji, Graham Barr, Green, Paul,
3082Hans Dieter Pearcey, Harmen, H. Merijn Brand, Hugo van der Sanden,
3083Ian Goodacre, Igor Sutton, Ingo Weinhold, James Bence, James Mastros,
3084Jan Dubois, Jari Aalto, Jarkko Hietaniemi, Jay Hannah, Jerry Hedden,
3085Jesse Vincent, Jim Cromie, Jody Belka, John E. Malmberg, John Malmberg,
3086John Peacock, John Peacock via RT, John P. Linderman, John Wright,
3087Josh ben Jore, Jos I. Boumans, Karl Williamson, Kenichi Ishigaki, Ken
3088Williams, Kevin Brintnall, Kevin Ryde, Kurt Starsinic, Leon Brocard,
3089Lubomir Rintel, Luke Ross, Marcel Grünauer, Marcus Holland-Moritz, Mark
3090Jason Dominus, Marko Asplund, Martin Hasch, Mashrab Kuvatov, Matt Kraai,
3091Matt S Trout, Max Maischein, Michael Breen, Michael Cartmell, Michael
3092G Schwern, Michael Witten, Mike Giroux, Milosz Tanski, Moritz Lenz,
3093Nicholas Clark, Nick Cleaton, Niko Tyni, Offer Kaye, Osvaldo Villalon,
3094Paul Fenwick, Paul Gaborit, Paul Green, Paul Johnson, Paul Marquess,
3095Philip Hazel, Philippe Bruhat, Rafael Garcia-Suarez, Rainer Tammer,
3096Rajesh Mandalemula, Reini Urban, Renée Bäcker, Ricardo Signes,
3097Ricardo SIGNES, Richard Foley, Rich Rauenzahn, Rick Delaney, Risto
3098Kankkunen, Robert May, Roberto C. Sanchez, Robin Barker, SADAHIRO
3099Tomoyuki, Salvador Ortiz Garcia, Sam Vilain, Scott Lanning, Sébastien
3100Aperghis-Tramoni, Sérgio Durigan Júnior, Shlomi Fish, Simon 'corecode'
3101Schubert, Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steffen
3102Ullrich, Stepan Kasal, Steve Hay, Steven Schubiger, Steve Peters, Tels,
3103The Doctor, Tim Bunce, Tim Jenness, Todd Rinaldo, Tom Christiansen,
3104Tom Hukins, Tom Wyant, Tony Cook, Torsten Schoenfeld, Tye McQueen,
3105Vadim Konovalov, Vincent Pit, Hio YAMASHINA, Yasuhiro Matsumoto,
3106Yitzchak Scott-Thoennes, Yuval Kogman, Yves Orton, Zefram, Zsban Ambrus
3107
3108This is woefully incomplete as it's automatically generated from version
3109control history. In particular, it doesn't include the names of the
3110(very much appreciated) contributors who reported issues in previous
3111versions of Perl that helped make Perl 5.12.0 better. For a more complete
3112list of all of Perl's historical contributors, please see the C<AUTHORS>
3113file in the Perl 5.12.0 distribution.
3ab3a109 3114
c8937c7e 3115Our "retired" pumpkings Nicholas Clark and Rafael Garcia-Suarez
3116deserve special thanks for their brilliant and substantive ongoing
3117contributions. Nicholas personally authored over 30% of the patches
3118since 5.10.0. Rafael comes in second in patch authorship with 11%,
3119but is first by a long shot in committing patches authored by others,
3120pushing 44% of the commits since 5.10.0 in this category, often after
3121providing considerable coaching to the patch authors. These statistics
3122in no way comprise all of their contributions, but express in shorthand
3123that we couldn't have done it without them.
3124
3ab3a109 3125Many of the changes included in this version originated in the CPAN
3126modules included in Perl's core. We're grateful to the entire CPAN
3127community for helping Perl to flourish.
3128
3129=head1 Reporting Bugs
3130
3131If you find what you think is a bug, you might check the articles
3132recently posted to the comp.lang.perl.misc newsgroup and the perl
72d4e865 3133bug database at L<http://rt.perl.org/perlbug/>. There may also be
3ab3a109 3134information at L<http://www.perl.org/>, the Perl Home Page.
3135
3136If you believe you have an unreported bug, please run the B<perlbug>
72d4e865 3137program included with your release. Be sure to trim your bug down
3138to a tiny but sufficient test case. Your bug report, along with the
3ab3a109 3139output of C<perl -V>, will be sent off to perlbug@perl.org to be
3140analyzed by the Perl porting team.
3141
3142If the bug you are reporting has security implications, which make it
3143inappropriate to send to a publicly archived mailing list, then please send
3144it to perl5-security-report@perl.org. This points to a closed subscription
3145unarchived mailing list, which includes all the core committers, who be able
3146to help assess the impact of issues, figure out a resolution, and help
3147co-ordinate the release of patches to mitigate or fix the problem across all
3148platforms on which Perl is supported. Please only use this address for
3149security issues in the Perl core, not for modules independently
3150distributed on CPAN.
3151
3152=head1 SEE ALSO
3153
3154The F<Changes> file for an explanation of how to view exhaustive details
3155on what changed.
3156
3157The F<INSTALL> file for how to build Perl.
3158
3159The F<README> file for general stuff.
3160
3161The F<Artistic> and F<Copying> files for copyright information.
3162
3163=cut