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