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