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