This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Resort MANIFEST.
[perl5.git] / pod / perl5120delta.pod
CommitLineData
01358b4a
JV
1=head1 NAME
2
3perl5120delta - what is new for perl v5.12.0
4
3ab3a109
JV
5=head1 XXX - THIS DOCUMENT IS ONLY CURRENT THROUGH PERL5114
6
dac9950b 7FIX ME BEFORE RELEASE
3ab3a109
JV
8
9OTHER ISSUES:
10
11UPDATED MODULE LIST NEEDS TO BE GENERATED
12ORDERING NEEDS CHECKING
13HEAVY COPYEDITING IS NEEDED
14
15
01358b4a
JV
16=head1 DESCRIPTION
17
18This document describes differences between the 5.10.0 release and
19the 5.12.0 release.
20
21Many of the bug fixes in 5.12.0 were already seen in the 5.10.1
22maintenance release since the two releases were kept closely
23coordinated (while 5.12.0 was still called 5.11.something).
24
25You can see the list of changes in the 5.10.1 release
26by reading L<perl5101delta>.
27
3ab3a109
JV
28=head1 Core Enhancements
29
30=head2 qr overloading
31
32It is now possible to overload the C<qr//> operator, that is,
33conversion to regexp, like it was already possible to overload
34conversion to boolean, string or number of objects. It is invoked when
c66407fa 35an object appears on the right hand side of the C<=~> operator or when
3ab3a109
JV
36it is interpolated into a regexp. See L<overload>.
37
38=head2 Pluggable keywords
39
40Extension modules can now cleanly hook into the Perl parser to define
41new kinds of keyword-headed expression and compound statement. The
42syntax following the keyword is defined entirely by the extension. This
43allow a completely non-Perl sublanguage to be parsed inline, with the
c66407fa 44correct ops cleanly generated. This feature is currently considered
3ab3a109
JV
45experimental.
46
47See L<perlapi/PL_keyword_plugin> for the mechanism. The Perl core
48source distribution also includes a new module
49L<XS::APItest::KeywordRPN>, which implements reverse Polish notation
50arithmetic via pluggable keywords. This module is mainly used for test
51purposes, and is not normally installed, but also serves as an example
52of how to use the new mechanism.
53
54=head2 APIs for more internals
55
56The lowest layers of the lexer and parts of the pad system now have C
57APIs available to XS extensions. These are necessary to support proper
58use of pluggable keywords, but have other uses too. The new APIs are
59experimental, and only cover a small proportion of what would be
60necessary to take full advantage of the core's facilities in these
61areas. It is intended that the Perl 5.13 development cycle will see the
62addition of a full range of clean, supported interfaces.
63
64=head2 Overridable function lookup
65
66Where an extension module hooks the creation of rv2cv ops to modify the
67subroutine lookup process, this now works correctly for bareword
68subroutine calls. This means that prototypes on subroutines referenced
69this way will be processed correctly. (Previously bareword subroutine
70names were initially looked up, for parsing purposes, by an unhookable
71mechanism, so extensions could only properly influence subroutine names
72that appeared with an C<&> sigil.)
73
74=head2 Unicode version
75
76Perl is shipped with the latest Unicode version, 5.2, dated October 2009. See
77L<http://www.unicode.org/versions/Unicode5.2.0> for details about this release
78of Unicode. See L<perlunicode> for instructions on installing and using
79older versions of Unicode.
80
81=head2 Unicode properties
82
83Perl can now handle every Unicode character property. A new pod,
84L<perluniprops>, lists all available non-Unihan character properties. By
85default the Unihan properties and certain others (deprecated and Unicode
86internal-only ones) are not exposed. See below for more details on
c66407fa
RS
87these; there is also a section in the pod listing them, and explaining
88why they are not exposed.
3ab3a109
JV
89
90Perl now fully supports the Unicode compound-style of using C<=> and C<:>
91in writing regular expressions: C<\p{property=value}> and
92C<\p{property:value}> (both of which mean the same thing).
93
94Perl now fully supports the Unicode loose matching rules for text
c66407fa 95between the braces in C<\p{...}> constructs. In addition, Perl allows
3ab3a109
JV
96underscores between digits of numbers.
97
98All the Unicode-defined synonyms for properties and property values are
99now accepted.
100
101C<qr/\X/>, which matches a Unicode logical character, has been expanded to work
102better with various Asian languages. It now is defined as an C<extended
103grapheme cluster>. (See L<http://www.unicode.org/reports/tr29/>).
c66407fa
RS
104Anything matched previously and that made sense will continue to be
105matched, but in addition:
3ab3a109
JV
106
107=over
108
109=item *
110
111C<\X> will now not break apart a C<S<CR LF>> sequence.
112
113=item *
114
115C<\X> will now match a sequence including the C<ZWJ> and C<ZWNJ> characters.
116
117=item *
118
119C<\X> will now always match at least one character, including an initial mark.
120Marks generally come after a base character, but it is possible in Unicode to
121have them in isolation, and C<\X> will now handle that case, for example at the
122beginning of a line or after a C<ZWSP>. And this is the part where C<\X>
123doesn't match the things that it used to that don't make sense. Formerly, for
124example, you could have the nonsensical case of an accented LF.
125
126=item *
127
128C<\X> will now match a (Korean) Hangul syllable sequence, and the Thai and Lao
129exception cases.
130
131=back
132
133Otherwise, this change should be transparent for the non-affected languages.
134
135C<\p{...}> matches using the Canonical_Combining_Class property were
136completely broken in previous Perls. This is now fixed.
137
138In previous Perls, the Unicode C<Decomposition_Type=Compat> property and a
139Perl extension had the same name, which led to neither matching all the
140correct values (with more than 100 mistakes in one, and several thousand
141in the other). The Perl extension has now been renamed to be
142C<Decomposition_Type=Noncanonical> (short: C<dt=noncanon>). It has the same
143meaning as was previously intended, namely the union of all the
144non-canonical Decomposition types, with Unicode C<Compat> being just one of
145those.
146
147C<\p{Uppercase}> and C<\p{Lowercase}> have been brought into line with the
148Unicode definitions. This means they each match a few more characters
149than previously.
150
151C<\p{Cntrl}> now matches the same characters as C<\p{Control}>. This means it
152no longer will match Private Use (gc=co), Surrogates (gc=cs), nor Format
153(gc=cf) code points. The Format code points represent the biggest
154possible problem. All but 36 of them are either officially deprecated
155or strongly discouraged from being used. Of those 36, likely the most
156widely used are the soft hyphen (U+00AD), and BOM, ZWSP, ZWNJ, WJ, and
c66407fa 157similar, plus bidirectional controls.
3ab3a109
JV
158
159C<\p{Alpha}> now matches the same characters as C<\p{Alphabetic}>. The Perl
160definition included a number of things that aren't really alpha (all
161marks), while omitting many that were. As a direct consequence, the
162definitions of C<\p{Alnum}> and C<\p{Word}> which depend on Alpha also change.
163
164C<\p{Word}> also now doesn't match certain characters it wasn't supposed
165to, such as fractions.
166
167C<\p{Print}> no longer matches the line control characters: Tab, LF, CR,
168FF, VT, and NEL. This brings it in line with the documentation.
169
170C<\p{Decomposition_Type=Canonical}> now includes the Hangul syllables.
171
172The Numeric type property has been extended to include the Unihan
173characters.
174
175There is a new Perl extension, the 'Present_In', or simply 'In',
176property. This is an extension of the Unicode Age property, but
177C<\p{In=5.0}> matches any code point whose usage has been determined
178I<as of> Unicode version 5.0. The C<\p{Age=5.0}> only matches code points
179added in I<precisely> version 5.0.
180
181A number of properties did not have the correct values for unassigned
182code points. This is now fixed. The affected properties are
183Bidi_Class, East_Asian_Width, Joining_Type, Decomposition_Type,
184Hangul_Syllable_Type, Numeric_Type, and Line_Break.
185
186The Default_Ignorable_Code_Point, ID_Continue, and ID_Start properties
187have been updated to their current Unicode definitions.
188
189Certain properties that are supposed to be Unicode internal-only were
190erroneously exposed by previous Perls. Use of these in regular
191expressions will now generate, if enabled, a deprecated warning message.
192The properties are: Other_Alphabetic, Other_Default_Ignorable_Code_Point,
193Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase,
194Other_Math, and Other_Uppercase.
195
196An installation can now fairly easily change which Unicode properties
197Perl understands. As mentioned above, certain properties are by default
198turned off. These include all the Unihan properties (which should be
199accessible via the CPAN module Unicode::Unihan) and any deprecated or
200Unicode internal-only property that Perl has never exposed.
201
202The generated files in the C<lib/unicore/To> directory are now more
203clearly marked as being stable, directly usable by applications.
204New hash entries in them give the format of the normal entries,
205which allows for easier machine parsing. Perl can generate files
206in this directory for any property, though most are suppressed. An
207installation can choose to change which get written. Instructions
208are in L<perluniprops>.
209
210=head2 Regular Expressions
211
212U+0FFFF is now a legal character in regular expressions.
213
214=head2 Unicode properties
215
216C<\p{XDigit}> now matches the same characters as C<\p{Hex_Digit}>. This
217means that in addition to the characters it currently matches,
218C<[A-Fa-f0-9]>, it will also match their fullwidth equivalent forms, for
219example U+FF10: FULLWIDTH DIGIT ZERO.
220
221=head2 Unicode Character Database 5.1.0
222
223The copy of the Unicode Character Database included in Perl 5.11.0 has
224been updated to 5.1.0 from 5.0.0. See
225L<http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes> for the
226notable changes.
227
228=head2 A proper interface for pluggable Method Resolution Orders
229
230As of Perl 5.11.0 there is a new interface for plugging and using method
231resolution orders other than the default (linear depth first search).
232The C3 method resolution order added in 5.10.0 has been re-implemented as
233a plugin, without changing its Perl-space interface. See L<perlmroapi> for
234more information.
235
236=head2 The C<overloading> pragma
237
238This pragma allows you to lexically disable or enable overloading
239for some or all operations. (Yuval Kogman)
240
241=head2 C<\N> regex escape
242
243A new regex escape has been added, C<\N>. It will match any character that
244is not a newline, independently from the presence or absence of the single
245line match modifier C</s>. (If C<\N> is followed by an opening brace and
246by a letter, perl will still assume that a Unicode character name is
247coming, so compatibility is preserved.) (Rafael Garcia-Suarez)
248
249=head2 Implicit strictures
250
251Using the C<use VERSION> syntax with a version number greater or equal
252to 5.11.0 will also lexically enable strictures just like C<use strict>
253would do (in addition to enabling features.) So, the following:
254
255 use 5.11.0;
256
257will now imply:
258
259 use strict;
260 use feature ':5.11';
261
262=head2 Parallel tests
263
264The core distribution can now run its regression tests in parallel on
265Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in
266your environment to the number of tests to run in parallel, and run
267C<make test_harness>. On a Bourne-like shell, this can be done as
268
269 TEST_JOBS=3 make test_harness # Run 3 tests in parallel
270
271An environment variable is used, rather than parallel make itself, because
272L<TAP::Harness> needs to be able to schedule individual non-conflicting test
273scripts itself, and there is no standard interface to C<make> utilities to
274interact with their job schedulers.
275
276Note that currently some test scripts may fail when run in parallel (most
277notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts
278again sequentially and see if the failures go away.
279
280=head2 The C<...> operator
281
282A new operator, C<...>, nicknamed the Yada Yada operator, has been added.
c66407fa 283It is intended to mark placeholder code that is not yet implemented.
3ab3a109
JV
284See L<perlop/"Yada Yada Operator">. (chromatic)
285
286=head2 DTrace support
287
288Some support for DTrace has been added. See "DTrace support" in F<INSTALL>.
289
290=head2 Support for C<configure_requires> in CPAN module metadata
291
292Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires> keyword
293in the F<META.yml> metadata file included in most recent CPAN distributions.
294This allows distribution authors to specify configuration prerequisites that
295must be installed before running F<Makefile.PL> or F<Build.PL>.
296
297See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for more
298on how to specify C<configure_requires> when creating a distribution for CPAN.
299
300=head2 C<each> is now more flexible
301
302The C<each> function can now operate on arrays.
303
304=head2 Y2038 compliance
305
306Perl's core time-related functions are now Y2038 compliant. (With 29
307years to spare!)
308
309=head2 C<$,> flexibility
310
311The variable C<$,> may now be tied.
312
313=head2 // in where clauses
314
315// now behaves like || in when clauses
316
317=head2 Enabling warnings from your shell environment
318
319You can now set C<-W> from the C<PERL5OPT> environment variable
320
321=head2 C<delete local>
322
323C<delete local> now allows you to locally delete a hash entry.
324
325=head2 New support for Abstract namespace sockets
326
327Abstract namespace sockets are Linux-specific socket type that live in
328AF_UNIX family, slightly abusing it to be able to use arbitrary
329character arrays as addresses: They start with nul byte and are not
330terminated by nul byte, but with the length passed to the socket()
331system call.
332
252eec4f 333=head2 New C<package NAME VERSION> syntax
3ab3a109
JV
334
335This new syntax allows a module author to set the $VERSION of a namespace
336when the namespace is declared with 'package'. It eliminates the need
337for C<our $VERSION = ...> and similar constructs. E.g.
338
339 package Foo::Bar 1.23;
340 # $Foo::Bar::VERSION == 1.23
341
342There are several advantages to this:
343
344=over
345
346=item *
347
252eec4f 348C<$VERSION> is parsed in exactly the same way as C<use NAME VERSION>
3ab3a109
JV
349
350=item *
351
352C<$VERSION> is set at compile time
353
354=item *
355
252eec4f
DG
356C<$VERSION> is a version object that provides proper overloading of
357comparision operators so comparing C<$VERSION> to decimal (1.23) or
358dotted-decimal (v1.2.3) version numbers works correctly.
359
360=item *
361
3ab3a109
JV
362Eliminates C<$VERSION = ...> and C<eval $VERSION> clutter
363
364=item *
365
366As it requires VERSION to be a numeric literal or v-string
367literal, it can be statically parsed by toolchain modules
368without C<eval> the way MM-E<gt>parse_version does for C<$VERSION = ...>
369
370=item *
371
3ab3a109 372It does not break old code with only C<package NAME>, but code that uses
252eec4f 373C<package NAME VERSION> will need to be restricted to perl 5.12.0 or newer
3ab3a109 374This is analogous to the change to C<open> from two-args to three-args.
252eec4f
DG
375Users requiring the latest Perl will benefit, and perhaps after several
376years, it will become a standard practice.
3ab3a109
JV
377
378=back
379
252eec4f
DG
380However, C<package NAME VERSION> requires a new, 'strict' version
381number format. See L<"Version number formats"> for details.
382
3ab3a109
JV
383=head1 Incompatible Changes
384
385=head2 Version number formats
386
387Acceptable version number formats have been formalized into "strict" and
388"lax" rules. C<package NAME VERSION> takes a strict version number. C<use
389NAME VERSION> takes a lax version number. C<UNIVERSAL::VERSION> and the
390L<version> object constructors take lax version numbers. Providing an
391invalid version will result in a fatal error.
392
393These formats will be documented fully in the L<version> module in a
394subsequent release of Perl 5.11. To a first approximation, a "strict"
395version number is a positive decimal number (integer or decimal-fraction)
396without exponentiation or else a dotted-decimal v-string with a leading 'v'
397character and at least three components. A "lax" version number allows
398v-strings with fewer than three components or without a leading 'v'. Under
399"lax" rules, both decimal and dotted-decimal versions may have a trailing
400"alpha" component separated by an underscore character after a fractional
401or dotted-decimal component.
402
403The L<version> module adds C<version::is_strict> and C<version::is_lax>
404functions to check a scalar against these rules.
405
3ab3a109
JV
406=head2 Unicode interpretation of \w, \d, \s, and the POSIX character classes redefined.
407
c66407fa
RS
408Previous versions of Perl tried to map POSIX style character class
409definitions onto Unicode property names so that patterns would "do what
410you meant" when matches were made against latin-1 or unicode strings.
411This proved to be a mistake, breaking character class negation, causing
412forward compatibility problems (as Unicode keeps updating their property
413definitions and adding new characters), and other problems.
3ab3a109 414
c66407fa
RS
415Therefore we have now defined a new set of artificial "unicode" property
416names which will be used to do unicode matching of patterns using POSIX
417style character classes and perl short-form escape character classes
418like \w and \d.
3ab3a109 419
c66407fa
RS
420The key change here is that \d will no longer match every digit in the
421unicode standard (there are thousands) nor will \w match every word
422character in the standard, instead they will match precisely their POSIX
423or Perl definition.
3ab3a109 424
c66407fa
RS
425Those needing to match based on Unicode properties can continue to do so
426by using the \p{} syntax to match whichever property they like,
427including the new artificial definitions.
3ab3a109 428
c66407fa
RS
429B<NOTE:> This is a backwards incompatible no-warning change in
430behaviour. If you are upgrading and you process large volumes of text
431look for POSIX and Perl style character classes and change them to the
432relevent property name (by removing the word 'Posix' from the current
433name).
3ab3a109 434
c66407fa
RS
435The following table maps the POSIX character class names, the escapes
436and the old and new Unicode property mappings:
3ab3a109
JV
437
438 POSIX Esc Class New-Property ! Old-Property
439 ----------------------------------------------+-------------
440 alnum [0-9A-Za-z] IsPosixAlnum ! IsAlnum
441 alpha [A-Za-z] IsPosixAlpha ! IsAlpha
442 ascii [\000-\177] IsASCII = IsASCII
443 blank [\011 ] IsPosixBlank !
444 cntrl [\0-\37\177] IsPosixCntrl ! IsCntrl
445 digit \d [0-9] IsPosixDigit ! IsDigit
446 graph [!-~] IsPosixGraph ! IsGraph
447 lower [a-z] IsPosixLower ! IsLower
448 print [ -~] IsPosixPrint ! IsPrint
449 punct [!-/:-@[-`{-~] IsPosixPunct ! IsPunct
450 space [\11-\15 ] IsPosixSpace ! IsSpace
451 \s [\11\12\14\15 ] IsPerlSpace ! IsSpacePerl
452 upper [A-Z] IsPosixUpper ! IsUpper
453 word \w [0-9A-Z_a-z] IsPerlWord ! IsWord
454 xdigit [0-9A-Fa-f] IsXDigit = IsXDigit
455
456If you wish to build perl with the old mapping you may do so by setting
457
458 #define PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS 1
459
460in regcomp.h, and then setting
461
462 PERL_TEST_LEGACY_POSIX_CC
463
464to true your enviornment when testing.
465
c66407fa 466=head2 @INC reorganization
3ab3a109
JV
467
468In @INC, ARCHLIB and PRIVLIB now occur after after the current version's
469site_perl and vendor_perl.
470
471=head2 Switch statement changes
472
473The handling of complex expressions by the C<given>/C<when> switch
474statement has been enhanced. These enhancements are also available in
c66407fa
RS
4755.10.1 and subsequent 5.10 releases. There are two new cases where
476C<when> now interprets its argument as a boolean, instead of an
477expression to be used in a smart match:
3ab3a109
JV
478
479=head2 flip-flop operators
480
481The C<..> and C<...> flip-flop operators are now evaluated in boolean
482context, following their usual semantics; see L<perlop/"Range Operators">.
483
484Note that, as in perl 5.10.0, C<when (1..10)> will not work to test
485whether a given value is an integer between 1 and 10; you should use
486C<when ([1..10])> instead (note the array reference).
487
488However, contrary to 5.10.0, evaluating the flip-flop operators in boolean
489context ensures it can now be useful in a C<when()>, notably for
490implementing bistable conditions, like in:
491
492 when (/^=begin/ .. /^=end/) {
493 # do something
494 }
495
496=head2 defined-or operator
497
498A compound expression involving the defined-or operator, as in
499C<when (expr1 // expr2)>, will be treated as boolean if the first
500expression is boolean. (This just extends the existing rule that applies
501to the regular or operator, as in C<when (expr1 || expr2)>.)
502
503=head2 Smart match changes
504
505This section details more changes brought to the semantics to
506the smart match operator, that naturally also modify the behaviour
507of the switch statements where smart matching is implicitly used.
c66407fa 508These changes were also made for the 5.10.1 release, and will remain in
3ab3a109
JV
509subsequent 5.10 releases.
510
3ab3a109
JV
511=head3 Changes to type-based dispatch
512
513The smart match operator C<~~> is no longer commutative. The behaviour of
514a smart match now depends primarily on the type of its right hand
515argument. Moreover, its semantics have been adjusted for greater
516consistency or usefulness in several cases. While the general backwards
517compatibility is maintained, several changes must be noted:
518
519=over 4
520
521=item *
522
523Code references with an empty prototype are no longer treated specially.
524They are passed an argument like the other code references (even if they
525choose to ignore it).
526
527=item *
528
529C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine
530returns a true value for each key of the hash (or element of the
531array), instead of passing the whole hash or array as a reference to
532the subroutine.
533
534=item *
535
536Due to the commutativity breakage, code references are no longer
537treated specially when appearing on the left of the C<~~> operator,
538but like any vulgar scalar.
539
540=item *
541
542C<undef ~~ %hash> is always false (since C<undef> can't be a key in a
543hash). No implicit conversion to C<""> is done (as was the case in perl
5445.10.0).
545
546=item *
547
548C<$scalar ~~ @array> now always distributes the smart match across the
549elements of the array. It's true if one element in @array verifies
550C<$scalar ~~ $element>. This is a generalization of the old behaviour
551that tested whether the array contained the scalar.
552
553=back
554
555The full dispatch table for the smart match operator is given in
556L<perlsyn/"Smart matching in detail">.
557
558=head3 Smart match and overloading
559
560According to the rule of dispatch based on the rightmost argument type,
561when an object overloading C<~~> appears on the right side of the
562operator, the overload routine will always be called (with a 3rd argument
563set to a true value, see L<overload>.) However, when the object will
564appear on the left, the overload routine will be called only when the
c66407fa
RS
565rightmost argument is a simple scalar. This way, distributivity of smart
566match across arrays is not broken, as well as the other behaviours with
567complex types (coderefs, hashes, regexes). Thus, writers of overloading
568routines for smart match mostly need to worry only with comparing
569against a scalar, and possibly with stringification overloading; the
570other common cases will be automatically handled consistently.
3ab3a109
JV
571
572C<~~> will now refuse to work on objects that do not overload it (in order
573to avoid relying on the object's underlying structure). (However, if the
574object overloads the stringification or the numification operators, and
575if overload fallback is active, it will be used instead, as usual.)
576
577=head2 Labels can't be keywords
578
579Labels used as targets for the C<goto>, C<last>, C<next> or C<redo>
580statements cannot be keywords anymore. This restriction will prevent
581potential confusion between the C<goto LABEL> and C<goto EXPR> syntaxes:
582for example, a statement like C<goto print> would jump to a label whose
583name would be the return value of C<print()>, (usually 1), instead of a
584label named C<print>. Moreover, the other control flow statements
585would just ignore any keyword passed to them as a label name. Since
586such labels cannot be defined anymore, this kind of error will be
587avoided.
588
589=head2 Other incompatible changes
590
591=over 4
592
593=item *
594
c66407fa
RS
595The boolkeys op moved to the group of hash ops. This breaks binary
596compatibility.
3ab3a109
JV
597
598=item *
599
c66407fa
RS
600C<\s> C<\w> and C<\d> once again have the semantics they had in Perl 5.8.x.
601
602=item *
603
604Filehandles are blessed directly into C<IO::Handle>, as C<FileHandle> is
605merely a wrapper around C<IO::Handle>.
606
607The previous behaviour was to bless Filehandles into L<FileHandle>
608(an empty proxy class) if it was loaded into memory and otherwise
609to bless them into C<IO::Handle>.
610
611=item *
612
613The semantics of C<use feature :5.10*> have changed slightly.
614See L<"Modules and Pragmata"> for more information.
3ab3a109
JV
615
616=item *
617
618The version control system used for the development of the perl
619interpreter has been switched from Perforce to git. This is mainly an
620internal issue that only affects people actively working on the perl core;
621but it may have minor external visibility, for example in some of details
622of the output of C<perl -V>. See L<perlrepository> for more information.
623
624=item *
625
626The internal structure of the C<ext/> directory in the perl source has
627been reorganised. In general, a module C<Foo::Bar> whose source was
628stored under F<ext/Foo/Bar/> is now located under F<ext/Foo-Bar/>. Also,
629nearly all dual-life modules have been moved from F<lib/> to F<ext/>. This
630is purely a source tarball change, and should make no difference to the
631compilation or installation of perl, unless you have a very customised build
632process that explicitly relies on this structure, or which hard-codes the
633C<nonxs_ext> F<Configure> parameter. Specifically, this change does not by
634default alter the location of any files in the final installation.
635
636=item *
637
638As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental
639C<Test::Harness::Straps> module has been removed.
640See L</"Updated Modules"> for more details.
641
642=item *
643
644As part of the C<ExtUtils::MakeMaker> upgrade, the
645C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules
646have been removed from this distribution.
647
648=item *
649
650C<Module::CoreList> no longer contains the C<%:patchlevel> hash.
651
652=item *
653
654This one is actually a change introduced in 5.10.0, but it was missed
655from that release's perldelta, so it is mentioned here instead.
656
657A bugfix related to the handling of the C</m> modifier and C<qr> resulted
658in a change of behaviour between 5.8.x and 5.10.0:
659
660 # matches in 5.8.x, doesn't match in 5.10.0
661 $re = qr/^bar/; "foo\nbar" =~ /$re/m;
662
663=item *
664
665C<length undef> now returns undef.
666
667=item *
668
669Unsupported private C API functions are now declared "static" to prevent
670leakage to Perl's public API.
671
672=item *
673
674To support the bootstrapping process, F<miniperl> no longer builds with
675UTF-8 support in the regexp engine.
676
677This allows a build to complete with PERL_UNICODE set and a UTF-8 locale.
678Without this there's a bootstrapping problem, as miniperl can't load the UTF-8
679components of the regexp engine, because they're not yet built.
680
681=item *
682
c66407fa
RS
683F<miniperl>'s @INC is now restricted to just C<-I...>, the split of
684C<$ENV{PERL5LIB}>, and "C<.>"
3ab3a109
JV
685
686=item *
687
688A space or a newline is now required after a C<"#line XXX"> directive.
689
690=item *
691
692Tied filehandles now have an additional method EOF which provides the EOF type
693
694=item *
695
c66407fa
RS
696To better match all other flow control statements, C<foreach> may no
697longer be used as an attribute.
3ab3a109
JV
698
699=back
700
701=head1 Deprecations
702
703From time to time, Perl's developers find it necessary to deprecate
704features or modules we've previously shipped as part of the core
705distribution. We are well aware of the pain and frustration that a
706backwards-incompatible change to Perl can cause for developers building
707or maintaining software in Perl. You can be sure that when we deprecate
708a functionality or syntax, it isn't a choice we make lightly. Sometimes,
709we choose to deprecate functionality or syntax because it was found to
710be poorly designed or implemented. Sometimes, this is because they're
711holding back other features or causing performance problems. Sometimes,
712the reasons are more complex. Wherever possible, we try to keep deprecated
713functionality available to developers in its previous form for at least
714one major release. So long as a deprecated feature isn't actively
715disrupting our ability to maintain and extend Perl, we'll try to leave
716it in place as long as possible.
717
718The following items are now deprecated.
719
720=over 4
721
722=item Use of C<:=> to mean an empty attribute list is now deprecated.
723
724An accident of Perl's parser meant that these constructions were all
725equivalent:
726
727 my $pi := 4;
728 my $pi : = 4;
729 my $pi : = 4;
730
731with the C<:> being treated as the start of an attribute list, which
732ends before the C<=>. As whitespace is not significant here, all are
733parsed as an empty attribute list, hence all the above are equivalent
734to, and better written as
735
736 my $pi = 4;
737
738because no attribute processing is done for an empty list.
739
740As is, this meant that C<:=> cannot be used as a new token, without
741silently changing the meaning of existing code. Hence that particular
742form is now deprecated, and will become a syntax error. If it is
743absolutely necessary to have empty attribute lists (for example,
744because of a code generator) then avoid the warning by adding a space
745before the C<=>.
746
c66407fa 747=item C<< UNIVERSAL->import() >>
3ab3a109 748
c66407fa 749The method C<< UNIVERSAL->import() >> is now deprecated. Attempting to
3ab3a109 750pass import arguments to a C<use UNIVERSAL> statement will result in a
c66407fa 751deprecation warning.
3ab3a109
JV
752
753=item Use of "goto" to jump into a construct is deprecated
754
c66407fa
RS
755Using C<goto> to jump from an outer scope into an inner scope is now
756deprecated. This rare use case was causing problems in the
757implementation of scopes.
3ab3a109
JV
758
759=item Deprecated Modules
760
761The following modules will be removed from the core distribution in a future
762release, and should be installed from CPAN instead. Distributions on CPAN
763which require these should add them to their prerequisites. The core versions
764of these modules warnings will issue a deprecation warning.
765
766=over
767
c66407fa
RS
768=item L<Class::ISA>
769
770=item L<Pod::Plainer>
771
772=item L<Shell>
3ab3a109 773
c66407fa 774=item L<Switch>
3ab3a109 775
c66407fa
RS
776Switch is buggy and should be avoided. See L<perlsyn/"Switch
777statements"> for its replacement.
3ab3a109
JV
778
779=back
780
781=item suidperl
782
783C<suidperl> has been removed. It used to provide a mechanism to
784emulate setuid permission bits on systems that don't support it properly.
785
786=item Assignment to $[
787
788=item attrs
789
790Remove attrs, which has been deprecated since 1999-10-02.
791
792=item Use of the attribute :locked on subroutines.
793
794=item Use of "locked" with the attributes pragma.
795
796=item Use of "unique" with the attributes pragma.
797
798=item Numerous Perl 4-era libraries:
799
800F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>,
801F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>,
802F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>,
803F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>,
804F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>,
805F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and
806F<timelocal.pl> are all now deprecated. Using them will incur a warning.
807
808=back
809
810=head1 Modules and Pragmata
811
812=head2 Dual-lifed modules moved
813
814Dual-lifed modules maintained primarily in the Perl core now live in dist/.
815Dual-lifed modules maintained primarily on CPAN now live in cpan/
816
817In previous releases of Perl, it was customary to enumerate all module
c66407fa
RS
818changes in this section of the C<perldelta> file. From 5.11.0 forward
819only notable updates (such as new or deprecated modules ) will be listed
820in this section. For a complete reference to the versions of modules
821shipped in a given release of perl, please see L<Module::CoreList>.
3ab3a109
JV
822
823=head2 New Modules and Pragmata
824
825=over 4
826
827=item *
828
829C<autodie>
830
831This is a new lexically-scoped alternative for the C<Fatal> module.
832The bundled version is 2.06_01. Note that in this release, using a string
833eval when C<autodie> is in effect can cause the autodie behaviour to leak
834into the surrounding scope. See L<autodie/"BUGS"> for more details.
835
836=item *
837
838C<Compress::Raw::Bzip2>
839
840This has been added to the core (version 2.020).
841
842=item *
843
844C<parent>
845
846This pragma establishes an ISA relationship with base classes at compile
c66407fa
RS
847time. It provides the key feature of C<base> without further unwanted
848behaviors.
3ab3a109
JV
849
850=item *
851
852C<Parse::CPAN::Meta>
853
854This has been added to the core (version 1.39).
855
856=back
857
858=head2 Pragmata Changes
859
860=over 4
861
862=item *
863
864C<overloading>
865
866See L</"The C<overloading> pragma"> above.
867
868=item *
869
870C<attrs>
871
872The C<attrs> pragma has been removed. It had been marked as deprecated since
8735.6.0.
874
875=item *
876
877C<charnames>
878
879The Unicode F<NameAliases.txt> database file has been added. This has the
880effect of adding some extra C<\N> character names that formerly wouldn't
881have been recognised; for example, C<"\N{LATIN CAPITAL LETTER GHA}">.
882
883=item *
884
885C<feature>
886
887The meaning of the C<:5.10> and C<:5.10.X> feature bundles has
888changed slightly. The last component, if any (i.e. C<X>) is simply ignored.
889This is predicated on the assumption that new features will not, in
890general, be added to maintenance releases. So C<:5.10> and C<:5.10.X>
891have identical effect. This is a change to the behaviour documented for
8925.10.0.
893
894=item *
895
896C<mro>
897
898Upgraded from version 1.00 to 1.01. Performance for single inheritance is 40%
899faster - see L</"Performance Enhancements"> below.
900
901C<mro> is now implemented as an XS extension. The documented interface has not
902changed. Code relying on the implementation detail that some C<mro::>
903methods happened to be available at all times gets to "keep both pieces".
904
905=item *
906
907C<diagnostics>
908
909Supports %.0f formatting internally.
910
911=item *
912
913C<overload>
914
915Allow overloading of 'qr'.
916
917=item *
918
919C<constant>
920
921Upgraded from version 1.19 to 1.20.
922
923=item *
924
925C<diagnostics>
926
c66407fa
RS
927This pragma no longer suppresses C<Use of uninitialized value in range
928(or flip)> warnings. [perl #71204]
3ab3a109
JV
929
930=item *
931
932C<feature>
933
934Upgraded from 1.13 to 1.14. Added the C<unicode_strings> feature:
935
936 use feature "unicode_strings";
937
938This pragma turns on Unicode semantics for the case-changing operations
c66407fa
RS
939(C<uc>, C<lc>, C<ucfirst>, C<lcfirst>) on strings that don't have the
940internal UTF-8 flag set, but that contain single-byte characters between
941128 and 255.
3ab3a109
JV
942
943=item *
944
945C<threads>
946
947Upgraded from version 1.74 to 1.75.
948
949=item *
950
951C<less>
952
c66407fa 953Upgraded from version 0.02 to 0.03.
3ab3a109 954
c66407fa
RS
955This version introduces the C<stash_name> method to allow subclasses of
956C<less> to pick where in %^H to store their stash.
3ab3a109
JV
957
958=item *
959
960C<version>
961
962Upgraded from version 0.77 to 0.81.
963
964This version adds support for L</Version number formats> as described earlier
965in this document and in its own documentation.
966
967=item *
968
969C<warnings>
970
971Upgraded from 1.07 to 1.09.
972
973Added new C<warnings::fatal_enabled()> function.
974This version adds the C<illegalproto> warning category. See also L</New or
975Changed Diagnostics> for this change.
976
977=back
978
979
980=head2 Updated Modules
981
982=over 4
983
984=item XXX TODO RECALCULATE THIS VS 5.10.0
985
986=back
987
988=head2 Removed Modules and Pragmata
989
990=over 4
991
992=item *
993
994C<Devel::DProf::V>
995
996Removed from the Perl core. Prior version was 'undef'.
997
998=back
999
1000=head1 Documentation
1001
1002=head2 New Documentation
1003
1004=over 4
1005
1006=item *
1007
1008L<perlhaiku>
1009
1010This contains instructions on how to build perl for the Haiku platform.
1011
1012=item *
1013
1014L<perlmroapi>
1015
1016This describes the new interface for pluggable Method Resolution Orders.
1017
1018=item *
1019
1020L<perlperf>
1021
1022This document, by Richard Foley, provides an introduction to the use of
1023performance and optimization techniques which can be used with particular
1024reference to perl programs.
1025
1026=item *
1027
1028L<perlrepository>
1029
1030This describes how to access the perl source using the I<git> version
1031control system.
1032
1033=item *
1034
1035L<perlpolicy> extends the "Social contract about contributed modules" into
1036the beginnings of a document on Perl porting policies.
1037
1038=back
1039
1040=head2 Changes to Existing Documentation
1041
1042The various large F<Changes*> files (which listed every change made to perl
1043over the last 18 years) have been removed, and replaced by a small file,
1044also called F<Changes>, which just explains how that same information may
1045be extracted from the git version control system.
1046
1047The file F<Porting/patching.pod> has been deleted, as it mainly described
1048interacting with the old Perforce-based repository, which is now obsolete.
1049Information still relevant has been moved to L<perlrepository>.
1050
1051L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all
1052generated at build time, rather than being shipped as part of the release.
1053
1054=over
1055
1056=item *
1057
1058Documented -X overloading.
1059
1060=item *
1061
1062Documented that C<when()> treats specially most of the filetest operators
1063
1064=item *
1065
c66407fa 1066Documented C<when> as a syntax modifier
3ab3a109
JV
1067
1068=item *
1069
c66407fa 1070Eliminated "Old Perl threads tutorial", which described 5005 threads.
3ab3a109
JV
1071
1072F<pod/perlthrtut.pod> is the same material reworked for ithreads.
1073
1074=item *
1075
1076Correct previous documentation: v-strings are not deprecated
1077
1078With version objects, we need them to use MODULE VERSION syntax. This
c66407fa 1079patch removes the deprecation notice.
3ab3a109
JV
1080
1081=item *
1082
1083Added security contact information to L<perlsec>
1084
1085A significant fraction of the core documentation has been updated to clarify
1086the behavior of Perl's Unicode handling.
1087
1088Much of the remaining core documentation has been reviewed and edited
1089for clarity, consistent use of language, and to fix the spelling of Tom
1090Christiansen's name.
1091
1092The Pod specification (L<perlpodspec>) has been updated to bring the
c66407fa
RS
1093specification in line with modern usage already supported by most Pod
1094systems. A parameter string may now follow the format name in a
1095"begin/end" region. Links to URIs with a text description are now
1096allowed. The usage of C<LE<lt>"section"E<gt>> has been marked as
1097deprecated.
3ab3a109
JV
1098
1099L<if.pm|if> has been documented in L<perlfunc/use> as a means to get
c66407fa
RS
1100conditional loading of modules despite the implicit BEGIN block around
1101C<use>.
3ab3a109
JV
1102
1103=item *
1104
c66407fa 1105The documentation for C<$1> in perlvar.pod has been clarified.
3ab3a109
JV
1106
1107=back
1108
1109=head1 Performance Enhancements
1110
1111=over 4
1112
1113=item *
1114
1115A new internal cache means that C<isa()> will often be faster.
1116
1117=item *
1118
1119The implementation of C<C3> Method Resolution Order has been optimised -
1120linearisation for classes with single inheritance is 40% faster. Performance
1121for multiple inheritance is unchanged.
1122
1123=item *
1124
1125Under C<use locale>, the locale-relevant information is now cached on
1126read-only values, such as the list returned by C<keys %hash>. This makes
1127operations such as C<sort keys %hash> in the scope of C<use locale> much
1128faster.
1129
1130=item *
1131
1132Empty C<DESTROY> methods are no longer called.
1133
1134=item *
1135
1136Faster C<Perl_sv_utf8_upgrade()>
1137
1138=item *
1139
1140Speed up C<keys> on empty hash
1141
1142=item *
1143
1144C<if (%foo)> has been optimized to be faster than C<if (keys %foo)>
1145
1146=item *
1147
1148Reversing an array to itself (as in C<@a = reverse @a>) in void context
1149now happens in-place and is several orders of magnitude faster than it
1150used to be. It will also preserve non-existent elements whenever
1151possible, i.e. for non magical arrays or tied arrays with C<EXISTS> and
1152C<DELETE> methods.
1153
1154=back
1155
1156=head1 Installation and Configuration Improvements
1157
1158=head2 F<ext/> reorganisation
1159
1160The layout of directories in F<ext> has been revised. Specifically, all
1161extensions are now flat, and at the top level, with C</> in pathnames
1162replaced by C<->, so that F<ext/Data/Dumper/> is now F<ext/Data-Dumper/>,
1163etc. The names of the extensions as specified to F<Configure>, and as
1164reported by C<%Config::Config> under the keys C<dynamic_ext>,
1165C<known_extensions>, C<nonxs_ext> and C<static_ext> have not changed, and
1166still use C</>. Hence this change will not have any affect once perl is
1167installed. C<Safe> has been split out from being part of C<Opcode>, and
1168C<mro> is now an extension in its own right.
1169
1170Nearly all dual-life modules have been moved from F<lib> to F<ext>, and will
1171now appear as known C<nonxs_ext>. This will made no difference to the
1172structure of an installed perl, nor will the modules installed differ,
1173unless you run F<Configure> with options to specify an exact list of
1174extensions to build. In this case, you will rapidly become aware that you
1175need to add to your list, because various modules needed to complete the
1176build, such as C<ExtUtils::ParseXS>, have now become extensions, and
1177without them the build will fail well before it attempts to run the
1178regression tests.
1179
1180=head2 Configuration improvements
1181
1182If C<vendorlib> and C<vendorarch> are the same, then they are only added to
1183C<@INC> once.
1184
1185C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if
1186perl is built with C<-Dusedevel>.
1187
1188F<Configure> will enable use of C<-fstack-protector>, to provide protection
1189against stack-smashing attacks, if the compiler supports it.
1190
1191F<Configure> will now determine the correct prototypes for re-entrant
c66407fa 1192functions and for C<gconvert> if you are using a C++ compiler rather
3ab3a109
JV
1193than a C compiler.
1194
1195On Unix, if you build from a tree containing a git repository, the
1196configuration process will note the commit hash you have checked out, for
1197display in the output of C<perl -v> and C<perl -V>. Unpushed local commits
1198are automatically added to the list of local patches displayed by
1199C<perl -V>.
1200
1201USE_ATTRIBUTES_FOR_PERLIO is now reported in the compile-time options
1202listed by the C<-V> switch.
1203
1204=head2 Compilation improvements
1205
1206As part of the flattening of F<ext>, all extensions on all platforms are
1207built by F<make_ext.pl>. This replaces the Unix-specific
1208F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific
1209F<win32/buildext.pl>.
1210
3ab3a109
JV
1211=head1 Changed Internals
1212
1213=over 4
1214
1215=item *
1216
1217C<Perl_pmflag> has been removed from the public API. Calling it now
1218generates a deprecation warning, and it will be removed in a future
1219release. Although listed as part of the API, it was never documented,
1220and only ever used in F<toke.c>, and prior to 5.10, F<regcomp.c>. In
1221core, it has been replaced by a static function.
1222
1223=item *
1224
1225Perl_magic_setmglob now knows about globs, fixing RT #71254.
1226
1227=item *
1228
1229TODO: C<SVt_RV> is gone. RVs are now stored in IVs
1230
1231=item *
1232
1233TODO: REGEXPs are first class
1234
1235=item *
1236
1237TODO: OOK is reworked, such that an OOKed scalar is PV not PVIV
1238
1239=item *
1240
1241The J.R.R. Tolkien quotes at the head of C source file have been checked and
1242proper citations added, thanks to a patch from Tom Christiansen.
1243
1244=item *
1245
1246C<Perl_vcroak()> now accepts a null first argument. In addition, a full audit
1247was made of the "not NULL" compiler annotations, and those for several
1248other internal functions were corrected.
1249
1250=item *
1251
1252New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO>
1253have been added to formalise the temporary saving of the C<errno>
1254variable.
1255
1256=item *
1257
1258The function C<Perl_sv_insert_flags> has been added to augment
1259C<Perl_sv_insert>.
1260
1261=item *
1262
1263The function C<Perl_newSV_type(type)> has been added, equivalent to
1264C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>.
1265
1266=item *
1267
1268The function C<Perl_newSVpvn_flags()> has been added, equivalent to
1269C<Perl_newSVpvn()> and then performing the action relevant to the flag.
1270
1271Two flag bits are currently supported.
1272
1273=over 4
1274
1275=item *
1276
1277C<SVf_UTF8>
1278
1279This will call C<SvUTF8_on()> for you. (Note that this does not convert an
1280sequence of ISO 8859-1 characters to UTF-8). A wrapper, C<newSVpvn_utf8()>
1281is available for this.
1282
1283=item *
1284
1285C<SVs_TEMP>
1286
1287Call C<Perl_sv_2mortal()> on the new SV.
1288
1289=back
1290
1291There is also a wrapper that takes constant strings, C<newSVpvs_flags()>.
1292
1293=item *
1294
1295The function C<Perl_croak_xs_usage> has been added as a wrapper to
1296C<Perl_croak>.
1297
1298=item *
1299
1300The functions C<PerlIO_find_layer> and C<PerlIO_list_alloc> are now
1301exported.
1302
1303=item *
1304
1305C<PL_na> has been exterminated from the core code, replaced by local STRLEN
1306temporaries, or C<*_nolen()> calls. Either approach is faster than C<PL_na>,
17270880 1307which is a pointer dereference into the interpreter structure under ithreads,
3ab3a109
JV
1308and a global variable otherwise.
1309
1310=item *
1311
1312C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()> on
1313the scalar. It now updates the linked list to remove each piece of magic
1314as it is freed.
1315
1316=item *
1317
1318Under ithreads, the regex in C<PL_reg_curpm> is now reference counted. This
1319eliminates a lot of hackish workarounds to cope with it not being reference
1320counted.
1321
1322=item *
1323
1324C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>.
1325This has been fixed.
1326
1327=item *
1328
1329The I<public> IV and NV flags are now not set if the string value has
1330trailing "garbage". This behaviour is consistent with not setting the
1331public IV or NV flags if the value is out of range for the type.
1332
1333=item *
1334
1335SV allocation tracing has been added to the diagnostics enabled by C<-Dm>.
1336The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if
1337that was enabled when the F<perl> binary was compiled.
1338
1339=item *
1340
1341Smartmatch resolution tracing has been added as a new diagnostic. Use C<-DM> to
1342enable it.
1343
1344=item *
1345
1346A new debugging flag C<-DB> now dumps subroutine definitions, leaving
1347C<-Dx> for its original purpose of dumping syntax trees.
1348
1349=item *
1350
1351Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have been
1352replaced by C<NULL> in the core code, and non-dual-life modules, as C<NULL>
1353is clearer to those unfamiliar with the core code.
1354
1355=item *
1356
1357A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will
1358not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>,
1359C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without
1360casting away C<const>. This allows proper compile-time auditing of
1361C<const> correctness in the core, and helped picked up some errors (now
1362fixed).
1363
1364=item *
1365
1366Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the
1367stack and mortalizing them.
1368
1369=item *
1370
1371Use of the private structure C<mro_meta> has changed slightly. Nothing
1372outside the core should be accessing this directly anyway.
1373
1374=item *
1375
1376A new tool, F<Porting/expand-macro.pl> has been added, that allows you
1377to view how a C preprocessor macro would be expanded when compiled.
1378This is handy when trying to decode the macro hell that is the perl
1379guts.
1380
1381=back
1382
1383=head1 Testing
1384
1385=head2 New Tests
1386
1387Many modules updated from CPAN incorporate new tests.
1388Several tests that have the potential to hang forever if they fail now
1389incorporate a "watchdog" functionality that will kill them after a timeout,
1390which helps ensure that C<make test> and C<make test_harness> run to
1391completion automatically. (Jerry Hedden).
1392
1393Some core-specific tests have been added:
1394
1395=over 4
1396
1397=item *
1398
1399Significant cleanups to core tests to ensure that language and
1400interpreter features are not used before they're tested.
1401
1402=item *
1403
c66407fa
RS
1404C<make test_porting> now runs a number of important pre-commit checks
1405which might be of use to anyone working on the Perl core.
3ab3a109
JV
1406
1407=item *
1408
1409F<t/porting/podcheck.t> automatically checks the well-formedness of
1410POD found in all .pl, .pm and .pod files in the F<MANIFEST>, other than in
1411dual-lifed modules which are primarily maintained outside the Perl core.
1412
1413=item *
1414
1415F<t/porting/manifest.t> now tests that all files listed in MANIFEST are present.
1416
1417=item *
1418
1419F<t/op/while_readdir.t>
1420
1421Test that a bare readdir in while loop sets $_.
1422
1423=item *
1424
c66407fa 1425F<t/comp/retainedlines.t>
3ab3a109
JV
1426
1427Check that the debugger can retain source lines from C<eval>.
1428
1429=item *
1430
c66407fa 1431F<t/io/perlio_fail.t>
3ab3a109
JV
1432
1433Check that bad layers fail.
1434
1435=item *
1436
c66407fa 1437F<t/io/perlio_leaks.t>
3ab3a109
JV
1438
1439Check that PerlIO layers are not leaking.
1440
1441=item *
1442
c66407fa 1443F<t/io/perlio_open.t>
3ab3a109
JV
1444
1445Check that certain special forms of open work.
1446
1447=item *
1448
c66407fa 1449F<t/io/perlio.t>
3ab3a109
JV
1450
1451General PerlIO tests.
1452
1453=item *
1454
c66407fa 1455F<t/io/pvbm.t>
3ab3a109
JV
1456
1457Check that there is no unexpected interaction between the internal types
1458C<PVBM> and C<PVGV>.
1459
1460=item *
1461
c66407fa 1462F<t/mro/package_aliases.t>
3ab3a109
JV
1463
1464Check that mro works properly in the presence of aliased packages.
1465
1466=item *
1467
c66407fa 1468F<t/op/dbm.t>
3ab3a109
JV
1469
1470Tests for C<dbmopen> and C<dbmclose>.
1471
1472=item *
1473
c66407fa 1474F<t/op/index_thr.t>
3ab3a109
JV
1475
1476Tests for the interaction of C<index> and threads.
1477
1478=item *
1479
c66407fa 1480F<t/op/pat_thr.t>
3ab3a109
JV
1481
1482Tests for the interaction of esoteric patterns and threads.
1483
1484=item *
1485
c66407fa 1486F<t/op/qr_gc.t>
3ab3a109
JV
1487
1488Test that C<qr> doesn't leak.
1489
1490=item *
1491
c66407fa 1492F<t/op/reg_email_thr.t>
3ab3a109
JV
1493
1494Tests for the interaction of regex recursion and threads.
1495
1496=item *
1497
c66407fa 1498F<t/op/regexp_qr_embed_thr.t>
3ab3a109
JV
1499
1500Tests for the interaction of patterns with embedded C<qr//> and threads.
1501
1502=item *
1503
c66407fa 1504F<t/op/regexp_unicode_prop.t>
3ab3a109
JV
1505
1506Tests for Unicode properties in regular expressions.
1507
1508=item *
1509
c66407fa 1510F<t/op/regexp_unicode_prop_thr.t>
3ab3a109
JV
1511
1512Tests for the interaction of Unicode properties and threads.
1513
1514=item *
1515
c66407fa 1516F<t/op/reg_nc_tie.t>
3ab3a109
JV
1517
1518Test the tied methods of C<Tie::Hash::NamedCapture>.
1519
1520=item *
1521
c66407fa 1522F<t/op/reg_posixcc.t>
3ab3a109
JV
1523
1524Check that POSIX character classes behave consistently.
1525
1526=item *
1527
c66407fa 1528F<t/op/re.t>
3ab3a109
JV
1529
1530Check that exportable C<re> functions in F<universal.c> work.
1531
1532=item *
1533
c66407fa 1534F<t/op/setpgrpstack.t>
3ab3a109
JV
1535
1536Check that C<setpgrp> works.
1537
1538=item *
1539
c66407fa 1540F<t/op/substr_thr.t>
3ab3a109
JV
1541
1542Tests for the interaction of C<substr> and threads.
1543
1544=item *
1545
c66407fa 1546F<t/op/upgrade.t>
3ab3a109
JV
1547
1548Check that upgrading and assigning scalars works.
1549
1550=item *
1551
c66407fa 1552F<t/uni/lex_utf8.t>
3ab3a109
JV
1553
1554Check that Unicode in the lexer works.
1555
1556=item *
1557
c66407fa 1558F<t/uni/tie.t>
3ab3a109
JV
1559
1560Check that Unicode and C<tie> work.
1561
1562=item *
1563
c66407fa 1564F<t/comp/final_line_num.t>
3ab3a109
JV
1565
1566See if line numbers are correct at EOF
1567
1568=item *
1569
c66407fa 1570F<t/comp/form_scope.t>
3ab3a109
JV
1571
1572See if format scoping works
1573
1574=item *
1575
c66407fa 1576F<t/comp/line_debug.t>
3ab3a109 1577
c66407fa 1578See if C<< @{"_<$file"} >> works
3ab3a109
JV
1579
1580=item *
1581
c66407fa 1582F<t/op/filetest_t.t>
3ab3a109
JV
1583
1584See if -t file test works
1585
1586=item *
1587
c66407fa 1588F<t/op/qr.t>
3ab3a109
JV
1589
1590See if qr works
1591
1592=item *
1593
c66407fa 1594F<t/op/utf8cache.t>
3ab3a109
JV
1595
1596Tests malfunctions of utf8 cache
1597
1598=item *
1599
c66407fa 1600F<t/re/uniprops.t>
3ab3a109
JV
1601
1602Test unicode \p{} regex constructs
1603
1604=back
1605
1606=head2 Testing improvements
1607
1608=over 4
1609
1610=item *
1611
1612It's now possible to override C<PERL5OPT> and friends in F<t/TEST>
1613
1614=back
1615
1616
1617=head1 New or Changed Diagnostics
1618
1619Several new diagnostics, see L<perldiag> for details.
1620
1621=over 4
1622
1623=item *
1624
1625C<Bad plugin affecting keyword '%s'>
1626
1627=item *
1628
1629C<gmtime(%.0f) too large>
1630
1631=item *
1632
1633C<Lexing code attempted to stuff non-Latin-1 character into Latin-1 input>
1634
1635=item *
1636
1637C<Lexing code internal error (%s)>
1638
1639=item *
1640
1641C<localtime(%.0f) too large>
1642
1643=item *
1644
1645C<Overloaded dereference did not return a reference>
1646
1647=item *
1648
1649C<Overloaded qr did not return a REGEXP>
1650
1651=item *
1652
1653C<Perl_pmflag() is deprecated, and will be removed from the XS API>
1654
1655=item *
1656
1657New warning category C<illegalproto>
1658
1659The two warnings :
1660
1661 Illegal character in prototype for %s : %s
1662 Prototype after '%c' for %s : %s
1663
1664have been moved from the C<syntax> top-level warnings category into a new
1665first-level category, C<illegalproto>. These two warnings are currently the
1666only ones emitted during parsing of an invalid/illegal prototype, so one
1667can now do
1668
1669 no warnings 'illegalproto';
1670
1671to suppress only those, but not other syntax-related warnings. Warnings where
1672prototypes are changed, ignored, or not met are still in the C<prototype>
1673category as before. (Matt S. Trout)
1674
1675=item *
1676
1677lvalue attribute ignored after the subroutine has been defined
1678
1679This new warning is issued when one attempts to mark a subroutine as
1680lvalue after it has been defined.
1681
1682=item *
1683
c66407fa
RS
1684warn if C<++> or C<--> are unable to change the value because it's
1685beyond the limit of representation
3ab3a109
JV
1686
1687This uses a new warnings category: "imprecision".
1688
1689=item *
c66407fa
RS
1690
1691C<lc>, C<uc>, C<lcfirst>, and C<ucfirst> warn when passed undef.
3ab3a109
JV
1692
1693=item *
1694
1695Show constant in "Useless use of a constant in void context"
1696
1697=item *
1698
1699Make the new warning report undef constants as undef
1700
1701=item *
1702
1703Add a new warning, "Prototype after '%s'"
1704
1705=item *
1706
c66407fa
RS
1707Tweak the "Illegal character in prototype" warning so it's more precise
1708when reporting illegal characters after _
3ab3a109
JV
1709
1710=item *
1711
c66407fa 1712Correct the unintended interpolation of C<$\> in regex
3ab3a109
JV
1713
1714=item *
1715
c66407fa
RS
1716Make overflow warnings in C<gmtime> and C<localtime> only occur when
1717warnings are enabled
3ab3a109
JV
1718
1719=item *
1720
1721Improve mro merging error messages.
1722
1723They are now very similar to those produced by Algorithm::C3.
1724
1725=item *
1726
1727Amelioration of the error message "Unrecognized character %s in column %d"
1728
1729Changes the error message to "Unrecognized character %s; marked by E<lt>--
1730HERE after %sE<lt>-- HERE near column %d". This should make it a little
1731simpler to spot and correct the suspicious character.
1732
1733=item *
1734
c66407fa
RS
1735Explicitely point to C<$.> when it causes an uninitialized warning for
1736ranges in scalar context
3ab3a109
JV
1737
1738=item *
1739
3ab3a109
JV
1740C<split> now warns when called in void context
1741
1742=item *
1743
1744C<printf>-style functions called with too few arguments will now issue the
1745warning C<"Missing argument in %s"> [perl #71000]
1746
1747=item *
1748
1749C<panic: sv_chop %s>
1750
1751This new fatal error occurs when the C routine C<Perl_sv_chop()> was
1752passed a position that is not within the scalar's string buffer. This
1753could be caused by buggy XS code, and at this point recovery is not
1754possible.
1755
1756=item *
1757
3ab3a109
JV
1758C<Deep recursion on subroutine "%s">
1759
1760It is now possible to change the depth threshold for this warning from the
1761default of 100, by recompiling the F<perl> binary, setting the C
1762pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
1763
1764=item *
1765
1766Perl now properly returns a syntax error instead of segfaulting
c66407fa 1767if C<each>, C<keys>, or C<values> is used without an argument.
3ab3a109
JV
1768
1769=item *
1770
c66407fa
RS
1771C<tell()> now fails properly if called without an argument and when no
1772previous file was read.
3ab3a109 1773
c66407fa
RS
1774C<tell()> now returns C<-1>, and sets errno to C<EBADF>, thus restoring
1775the 5.8.x behaviour.
3ab3a109
JV
1776
1777=item *
1778
c66407fa
RS
1779C<overload> no longer implicitly unsets fallback on repeated 'use
1780overload' lines.
3ab3a109
JV
1781
1782=item *
1783
1784POSIX::strftime() can now handle Unicode characters in the format string.
1785
1786=item *
1787
c66407fa
RS
1788The Windows select() implementation now supports all empty C<fd_set>s
1789more correctly.
3ab3a109
JV
1790
1791=item *
1792
c66407fa
RS
1793The "syntax" category was removed from 5 warnings that should only be in
1794"deprecated".
3ab3a109
JV
1795
1796=item *
1797
c66407fa
RS
1798Three fatal C<pack>/C<unpack> error messages have been normalized to
1799"panic: %s"
3ab3a109
JV
1800
1801=item *
1802
1803"Unicode character is illegal" has been rephrased to be more accurate
1804
1805It now reads C<Unicode non-character is illegal in interchange> and the
1806perldiag documentation has been expanded a bit.
1807
1808=item *
1809
c66407fa
RS
1810Perl now defaults to issuing a warning if a deprecated language feature
1811is used.
3ab3a109
JV
1812
1813To disable this feature in a given lexical scope, you should use C<no
1814warnings 'deprecated';> For information about which language features
1815are deprecated and explanations of various deprecation warnings, please
1816see L<perldiag.pod>
1817
1818=back
1819
c66407fa
RS
1820The following diagnostics have been removed:
1821
1822=over 4
1823
1824=item *
1825
1826C<Runaway format>
1827
1828=item *
1829
1830C<Can't locate package %s for the parents of %s>
1831
1832This warning has been removed. In general, it only got produced in
1833conjunction with other warnings, and removing it allowed an ISA lookup
1834optimisation to be added.
1835
1836=item *
1837
1838C<v-string in use/require is non-portable>
1839
1840=back
1841
3ab3a109
JV
1842=head1 Utility Changes
1843
1844=over 4
1845
1846=item *
1847
1848F<h2ph>
1849
1850Now looks in C<include-fixed> too, which is a recent addition to gcc's
1851search path.
1852
1853=item *
1854
1855F<h2xs>
1856
1857No longer incorrectly treats enum values like macros (Daniel Burr).
1858
1859Now handles C++ style constants (C<//>) properly in enums. (A patch from
1860Rainer Weikusat was used; Daniel Burr also proposed a similar fix).
1861
1862=item *
1863
1864F<perl5db.pl>
1865
1866C<LVALUE> subroutines now work under the debugger.
1867
1868The debugger now correctly handles proxy constant subroutines, and
1869subroutine stubs.
1870
1871=item *
1872
1873F<perlbug>
1874
1875F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out upstream bug
1876tracker URLs.
1877
1878Where the user names a module that their bug report is about, and we know the
1879URL for its upstream bug tracker, provide a message to the user explaining
1880that the core copies the CPAN version directly, and provide the URL for
1881reporting the bug directly to upstream.
1882
1883=item *
1884
1885F<perlthanks>
1886
1887Perl 5.11.0 added a new utility F<perlthanks>, which is a variant of
1888F<perlbug>, but for sending non-bug-reports to the authors and maintainers
1889of Perl. Getting nothing but bug reports can become a bit demoralising:
1890we'll see if this changes things.
1891
1892=item *
1893
1894F<perlbug>
1895
1896No longer reports "Message sent" when it hasn't actually sent the message
1897
1898=item *
1899
1900F<a2p>
1901
1902Fixed bugs with the match() operator in list context, remove mention of
c66407fa 1903C<$[>.
3ab3a109
JV
1904
1905=back
1906
1907=head1 Selected Bug Fixes
1908
1909=over 4
1910
1911=item *
1912
1913Ensure that pp_qr returns a new regexp SV each time. Resolves RT #69852.
1914
1915Instead of returning a(nother) reference to the (pre-compiled) regexp in the
1916optree, use reg_temp_copy() to create a copy of it, and return a reference to
1917that. This resolves issues about Regexp::DESTROY not being called in a timely
1918fashion (the original bug tracked by RT #69852), as well as bugs related to
1919blessing regexps, and of assigning to regexps, as described in correspondence
1920added to the ticket.
1921
1922It transpires that we also need to undo the SvPVX() sharing when ithreads
1923cloning a Regexp SV, because mother_re is set to NULL, instead of a cloned
1924copy of the mother_re. This change might fix bugs with regexps and threads in
1925certain other situations, but as yet neither tests nor bug reports have
1926indicated any problems, so it might not actually be an edge case that it's
1927possible to reach.
1928
1929=item *
1930
3ab3a109
JV
1931Several compilation errors and segfaults when perl was built with C<-Dmad> were fixed.
1932
1933=item *
1934
1935Fixes for lexer API changes in 5.11.2 which broke NYTProf's savesrc option.
1936
1937=item *
1938
c66407fa 1939C<-t> should only return TRUE for file handles connected to a TTY
3ab3a109 1940
c66407fa
RS
1941The Microsoft C version of C<isatty()> returns TRUE for all
1942character mode devices, including the F</dev/null>-style "nul"
3ab3a109
JV
1943device and printers like "lpt1".
1944
1945=item *
1946
1947Fixed a regression caused by commit fafafbaf which caused a panic during
1948parameter passing [perl #70171]
1949
1950=item *
1951
1952On systems which in-place edits without backup files, -i'*' now works as
1953the documentation says it does [perl #70802]
1954
1955=item *
1956
1957Saving and restoring magic flags no longer loses readonly flag.
1958
1959=item *
1960
1961The malformed syntax C<grep EXPR LIST> (note the missing comma) no longer
1962causes abrupt and total failure.
1963
1964=item *
1965
1966Regular expressions compiled with C<qr{}> literals properly set C<$'> when
1967matching again.
1968
1969=item *
1970
1971Using named subroutines with C<sort> should no longer lead to bus errors [perl
1972#71076]
1973
1974=item *
1975
1976Numerous bugfixes catch small issues caused by the recently-added Lexer API.
1977
1978=item *
1979
1980Smart match against C<@_> sometimes gave false negatives. [perl #71078]
1981
1982=item *
1983
c66407fa
RS
1984C<$@> may now be assigned a read-only value (without error or busting
1985the stack).
3ab3a109
JV
1986
1987=item *
1988
1989C<sort> called recursively from within an active comparison subroutine no
1990longer causes a bus error if run multiple times. [perl #71076]
1991
1992=item *
1993
c66407fa 1994Tie::Hash::NamedCapture::* will not abort if passed bad input (RT #71828)
3ab3a109
JV
1995
1996=item *
1997
1998@_ and $_ no longer leak under threads (RT #34342 and #41138, also
1999#70602, #70974)
2000
2001=item *
2002
2003C<-I> on shebang line now adds directories in front of @INC
2004as documented, and as does C<-I> when specified on the command-line.
2005
2006=item *
2007
2008C<kill> is now fatal when called on non-numeric process identifiers.
c66407fa
RS
2009Previously, an C<undef> process identifier would be interpreted as a
2010request to kill process 0, which would terminate the current process
2011group on POSIX systems. Since process identifiers are always integers,
2012killing a non-numeric process is now fatal.
3ab3a109
JV
2013
2014=item *
2015
20165.10.0 inadvertently disabled an optimisation, which caused a measurable
2017performance drop in list assignment, such as is often used to assign
2018function parameters from C<@_>. The optimisation has been re-instated, and
c66407fa 2019the performance regression fixed. (This fix is also present in 5.10.1)
3ab3a109
JV
2020
2021=item *
2022
2023Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038].
2024
2025=item *
2026
2027Some potential coredumps in PerlIO fixed [RT #57322,54828].
2028
2029=item *
2030
2031The debugger now works with lvalue subroutines.
2032
2033=item *
2034
2035The debugger's C<m> command was broken on modules that defined constants
2036[RT #61222].
2037
2038=item *
2039
2040C<crypt> and string complement could return tainted values for untainted
2041arguments [RT #59998].
2042
2043=item *
2044
2045The C<-i>I<.suffix> command-line switch now recreates the file using
2046restricted permissions, before changing its mode to match the original
2047file. This eliminates a potential race condition [RT #60904].
2048
2049=item *
2050
2051On some Unix systems, the value in C<$?> would not have the top bit set
2052(C<$? & 128>) even if the child core dumped.
2053
2054=item *
2055
2056Under some circumstances, C<$^R> could incorrectly become undefined
2057[RT #57042].
2058
2059=item *
2060
2061In the XS API, various hash functions, when passed a pre-computed hash where
2062the key is UTF-8, might result in an incorrect lookup.
2063
2064=item *
2065
2066XS code including F<XSUB.h> before F<perl.h> gave a compile-time error
2067[RT #57176].
2068
2069=item *
2070
2071C<< $object-E<gt>isa('Foo') >> would report false if the package C<Foo> didn't
2072exist, even if the object's C<@ISA> contained C<Foo>.
2073
2074=item *
2075
2076Various bugs in the new-to 5.10.0 mro code, triggered by manipulating
2077C<@ISA>, have been found and fixed.
2078
2079=item *
2080
2081Bitwise operations on references could crash the interpreter, e.g.
2082C<$x=\$y; $x |= "foo"> [RT #54956].
2083
2084=item *
2085
2086Patterns including alternation might be sensitive to the internal UTF-8
2087representation, e.g.
2088
2089 my $byte = chr(192);
2090 my $utf8 = chr(192); utf8::upgrade($utf8);
2091 $utf8 =~ /$byte|X}/i; # failed in 5.10.0
2092
2093=item *
2094
2095Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in
2096effect), double-quoted literal strings could be corrupted where a C<\xNN>,
2097C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value
2098greater than 255 [RT #59908].
2099
2100=item *
2101
2102C<B::Deparse> failed to correctly deparse various constructs:
2103C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488],
2104C<sub foo(_)> [RT #62484].
2105
2106=item *
2107
2108Using C<setpgrp> with no arguments could corrupt the perl stack.
2109
2110=item *
2111
2112The block form of C<eval> is now specifically trappable by C<Safe> and
2113C<ops>. Previously it was erroneously treated like string C<eval>.
2114
2115=item *
2116
2117In 5.10.0, the two characters C<[~> were sometimes parsed as the smart
2118match operator (C<~~>) [RT #63854].
2119
2120=item *
2121
2122In 5.10.0, the C<*> quantifier in patterns was sometimes treated as
2123C<{0,32767}> [RT #60034, #60464]. For example, this match would fail:
2124
2125 ("ab" x 32768) =~ /^(ab)*$/
2126
2127=item *
2128
2129C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924].
2130
2131=item *
2132
2133Using C<next> or C<last> to exit a C<given> block no longer produces a
2134spurious warning like the following:
2135
2136 Exiting given via last at foo.pl line 123
2137
2138=item *
2139
2140On Windows, C<'.\foo'> and C<'..\foo'> were treated differently than
2141C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492].
2142
2143=item *
2144
2145Assigning a format to a glob could corrupt the format; e.g.:
2146
2147 *bar=*foo{FORMAT}; # foo format now bad
2148
2149=item *
2150
2151Attempting to coerce a typeglob to a string or number could cause an
2152assertion failure. The correct error message is now generated,
2153C<Can't coerce GLOB to I<$type>>.
2154
2155=item *
2156
2157Under C<use filetest 'access'>, C<-x> was using the wrong access mode. This
2158has been fixed [RT #49003].
2159
2160=item *
2161
2162C<length> on a tied scalar that returned a Unicode value would not be
2163correct the first time. This has been fixed.
2164
2165=item *
2166
2167Using an array C<tie> inside in array C<tie> could SEGV. This has been
2168fixed. [RT #51636]
2169
2170=item *
2171
2172A race condition inside C<PerlIOStdio_close()> has been identified and
2173fixed. This used to cause various threading issues, including SEGVs.
2174
2175=item *
2176
2177In C<unpack>, the use of C<()> groups in scalar context was internally
2178placing a list on the interpreter's stack, which manifested in various
2179ways, including SEGVs. This is now fixed [RT #50256].
2180
2181=item *
2182
2183Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>.
2184These have all been fixed.
2185
2186=item *
2187
2188A 5.10.0 optimisation to clear the temporary stack within the implicit
2189loop of C<s///ge> has been reverted, as it turned out to be the cause of
2190obscure bugs in seemingly unrelated parts of the interpreter [commit
2191ef0d4e17921ee3de].
2192
2193=item *
2194
2195The line numbers for warnings inside C<elsif> are now correct.
2196
2197=item *
2198
2199The C<..> operator now works correctly with ranges whose ends are at or
2200close to the values of the smallest and largest integers.
2201
2202=item *
2203
2204C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
2205This has been fixed [RT #54828].
2206
2207=item *
2208
2209An off-by-one error meant that C<index $str, ...> was effectively being
2210executed as C<index "$str\0", ...>. This has been fixed [RT #53746].
2211
2212=item *
2213
2214Various leaks associated with named captures in regexes have been fixed
2215[RT #57024].
2216
2217=item *
2218
2219A weak reference to a hash would leak. This was affecting C<DBI>
2220[RT #56908].
2221
2222=item *
2223
2224Using (?|) in a regex could cause a segfault [RT #59734].
2225
2226=item *
2227
2228Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520].
2229
2230=item *
2231
2232Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an
2233unaligned 64-bit access on the SPARC architecture [RT #60574].
2234
2235=item *
2236
2237In the 5.10.0 release, C<inc_version_list> would incorrectly list
2238C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order
2239[RT #67628].
2240
2241=item *
2242
2243In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value
2244[RT #52552].
2245
2246=item *
2247
2248In 5.10.0, C<printf> and C<sprintf> could produce the fatal error
2249C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings
2250[RT #62666].
2251
2252=item *
2253
2254In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be
2255missed (method cache issue) [RT #60220,60232].
2256
2257=item *
2258
2259In the 5.10.0 release, a combination of C<use feature> and C<//ee> could
2260cause a memory leak [RT #63110].
2261
2262=item *
2263
2264C<-C> on the shebang (C<#!>) line is once more permitted if it is also
2265specified on the command line. C<-C> on the shebang line used to be a
2266silent no-op I<if> it was not also on the command line, so perl 5.10.0
2267disallowed it, which broke some scripts. Now perl checks whether it is
2268also on the command line and only dies if it is not [RT #67880].
2269
2270=item *
2271
2272In 5.10.0, certain types of re-entrant regular expression could crash,
2273or cause the following assertion failure [RT #60508]:
2274
2275 Assertion rx->sublen >= (s - rx->subbeg) + i failed
2276
2277=item *
2278
2279Previously missing files from Unicode 5.1 Character Database are now included.
2280
2281=item *
2282
2283C<TMPDIR> is now honored when opening an anonymous temporary file
2284
2285=back
2286
2287=head1 Platform Specific Changes
2288
2289=head2 New Platforms
2290
2291=over
2292
2293=item Haiku
2294
2295Patches from the Haiku maintainers have been merged in. Perl should now
2296build on Haiku.
2297
2298=item MirOS BSD
2299
2300Perl should now build on MirOS BSD.
2301
2302
2303=back
2304
2305=head2 Discontinued Platforms
2306
2307=over
2308
2309=item DomainOS
2310
2311Support for Apollo DomainOS was removed in Perl 5.11.0
2312
2313=item MachTen
2314
2315Support for Tenon Intersystems MachTen Unix layer for MacOS Classic was
2316removed in Perl 5.11.0
2317
2318=item MiNT
2319
2320Support for Atari MiNT was removed in Perl 5.11.0.
2321
2322=back
2323
2324=head2 Updated Platforms
2325
2326=over 4
2327
2328=item Darwin (Mac OS X)
2329
2330=over 4
2331
2332=item *
2333
2334Skip testing the be_BY.CP1131 locale on Darwin 10 (Mac OS X 10.6),
2335as it's still buggy.
2336
2337=item *
2338
2339Correct infelicities in the regexp used to identify buggy locales
2340on Darwin 8 and 9 (Mac OS X 10.4 and 10.5, respectively).
2341
2342=back
2343
2344=item DragonFly BSD
2345
2346=over 4
2347
2348=item *
2349
2350Fix thread library selection [perl #69686]
2351
2352=back
2353
2354=item Win32
2355
2356=over 4
2357
2358=item *
2359
2360Initial support for mingw64 is now available
2361
2362=item *
2363
c66407fa
RS
2364Various bits of Perl's build infrastructure are no longer converted to
2365win32 line endings at release time. If this hurts you, please report the
2366problem with the L<perlbug> program included with perl.
3ab3a109
JV
2367
2368=item *
2369
2370Always add a manifest resource to C<perl.exe> to specify the C<trustInfo>
2371settings for Windows Vista and later. Without this setting Windows
2372will treat C<perl.exe> as a legacy application and apply various
2373heuristics like redirecting access to protected file system areas
2374(like the "Program Files" folder) to the users "VirtualStore"
2375instead of generating a proper "permission denied" error.
2376
2377For VC8 and VC9 this manifest setting is automatically generated by
2378the compiler/linker (together with the binding information for their
2379respective runtime libraries); for all other compilers we need to
2380embed the manifest resource explicitly in the external resource file.
2381
2382This change also requests the Microsoft Common-Controls version 6.0
2383(themed controls introduced in Windows XP) via the dependency list
2384in the assembly manifest. For VC8 and VC9 this is specified using the
2385C</manifestdependency> linker commandline option instead.
2386
2387=item *
2388
2389Improved message window handling means that C<alarm> and C<kill> messages
2390will no longer be dropped under race conditions.
2391
2392=back
2393
2394=item cygwin
2395
2396=over 4
2397
2398=item *
2399
2400Enable IPv6 support on cygwin 1.7 and newer
2401
2402=back
2403
2404=item OpenVMS
2405
2406=over 4
2407
2408=item *
2409
2410Make -UDEBUGGING the default on VMS for 5.12.0.
2411
2412Like it has been everywhere else for ages and ages. Also make
2413command-line selection of -UDEBUGGING and -DDEBUGGING work in
2414configure.com; before the only way to turn it off was by saying
2415no in answer to the interactive question.
2416
2417=item *
2418
2419The default pipe buffer size on VMS has been updated to 8192 on 64-bit
2420systems.
2421
2422=item *
2423
2424Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail
2425if C<$/> was set to a numeric reference (to indicate record-style reads).
2426This is now fixed.
2427
2428=item *
2429
2430VMS now supports C<getgrgid>.
2431
2432=item *
2433
2434Many improvements and cleanups have been made to the VMS file name handling
2435and conversion code.
2436
2437=item *
2438
2439Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit
2440status in a VMS condition value for better interaction with GNV's bash
2441shell and other utilities that depend on POSIX exit values. See
2442L<perlvms/"$?"> for details.
2443
2444=item *
2445
2446C<File::Copy> now detects Unix compatibility mode on VMS.
2447
2448=back
2449
2450=item AIX
2451
2452Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from F<libbsd>.
2453
2454Removed F<libgdbm> for AIX 5L and 6.1. The F<libgdbm> is delivered as an
2455optional package with the AIX Toolbox. Unfortunately the 64 bit version
2456is broken.
2457
2458Hints changes mean that AIX 4.2 should work again.
2459
2460=item Cygwin
2461
2462On Cygwin we now strip the last number from the DLL. This has been the
2463behaviour in the cygwin.com build for years. The hints files have been
2464updated.
2465
2466
2467=item FreeBSD
2468
2469The hints files now identify the correct threading libraries on FreeBSD 7
2470and later.
2471
2472=item Irix
2473
2474We now work around a bizarre preprocessor bug in the Irix 6.5 compiler:
2475C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't.
2476
2477=item NetBSD
2478
2479Hints now supports versions 5.*.
2480
2481=item Stratus VOS
2482
2483Various changes from Stratus have been merged in.
2484
2485=item Symbian
2486
2487There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
2488
2489=back
2490
2491=head1 Known Problems
2492
2493This is a list of some significant unfixed bugs, which are regressions
2494from either 5.10.0 or 5.8.x.
2495
2496=over 4
2497
2498=item *
2499
2500C<List::Util::first> misbehaves in the presence of a lexical C<$_>
2501(typically introduced by C<my $_> or implicitly by C<given>). The variable
2502which gets set for each iteration is the package variable C<$_>, not the
2503lexical C<$_> [RT #67694].
2504
2505A similar issue may occur in other modules that provide functions which
2506take a block as their first argument, like
2507
2508 foo { ... $_ ...} list
2509
2510=item *
2511
2512The C<charnames> pragma may generate a run-time error when a regex is
2513interpolated [RT #56444]:
2514
2515 use charnames ':full';
2516 my $r1 = qr/\N{THAI CHARACTER SARA I}/;
2517 "foo" =~ $r1; # okay
2518 "foo" =~ /$r1+/; # runtime error
2519
2520A workaround is to generate the character outside of the regex:
2521
2522 my $a = "\N{THAI CHARACTER SARA I}";
2523 my $r1 = qr/$a/;
2524
2525=item *
2526
2527Some regexes may run much more slowly when run in a child thread compared
2528with the thread the pattern was compiled into [RT #55600].
2529
2530=item *
2531
3ab3a109
JV
2532Untriaged test crashes on Windows 2000
2533
2534Several porters have reported mysterious crashes when Perl's entire test suite is run after a build on certain Windows 2000 systems. When run by hand, the individual tests reportedly work fine.
2535
2536=item *
2537
2538Known test failures on VMS
2539
2540Perl 5.11.1 fails a small set of core and CPAN tests as of this release.
2541With luck, that'll be sorted out for 5.11.2
2542
2543=item *
2544
2545Known test failures on VMS
2546
2547Perl 5.11.2 fails a small set of core and CPAN tests as of this
2548release. With luck, that'll be sorted out for 5.11.3.
2549
2550=back
2551
2552=head1 Acknowledgements
2553
2554Perl 5.12.0 represents approximately two years of development since
2555Perl 5.10.0 and contains __ lines of changes across ___ files
2556from __ authors and committers:
2557
2558XXX TODO LIST
2559
2560Many of the changes included in this version originated in the CPAN
2561modules included in Perl's core. We're grateful to the entire CPAN
2562community for helping Perl to flourish.
2563
2564=head1 Reporting Bugs
2565
2566If you find what you think is a bug, you might check the articles
2567recently posted to the comp.lang.perl.misc newsgroup and the perl
2568bug database at L<http://rt.perl.org/perlbug/>. There may also be
2569information at L<http://www.perl.org/>, the Perl Home Page.
2570
2571If you believe you have an unreported bug, please run the B<perlbug>
2572program included with your release. Be sure to trim your bug down
2573to a tiny but sufficient test case. Your bug report, along with the
2574output of C<perl -V>, will be sent off to perlbug@perl.org to be
2575analyzed by the Perl porting team.
2576
2577If the bug you are reporting has security implications, which make it
2578inappropriate to send to a publicly archived mailing list, then please send
2579it to perl5-security-report@perl.org. This points to a closed subscription
2580unarchived mailing list, which includes all the core committers, who be able
2581to help assess the impact of issues, figure out a resolution, and help
2582co-ordinate the release of patches to mitigate or fix the problem across all
2583platforms on which Perl is supported. Please only use this address for
2584security issues in the Perl core, not for modules independently
2585distributed on CPAN.
2586
2587=head1 SEE ALSO
2588
2589The F<Changes> file for an explanation of how to view exhaustive details
2590on what changed.
2591
2592The F<INSTALL> file for how to build Perl.
2593
2594The F<README> file for general stuff.
2595
2596The F<Artistic> and F<Copying> files for copyright information.
2597
2598=cut