corelist.pl updates
[p5sagit/p5-mst-13.2.git] / pod / perl5110delta.pod
CommitLineData
fa7da8f7 1=encoding utf8
2
7120b314 3=head1 NAME
4
5a00ee6a 5perl5110delta - what is new for perl v5.11.0
7120b314 6
7=head1 DESCRIPTION
8
5a00ee6a 9This document describes differences between the 5.10.0 release and
10the 5.11.0 development release.
7120b314 11
12=head1 Incompatible Changes
13
6fa80ea2 14=head2 Unicode interpretation of \w, \d, \s, and the POSIX character classes redefined.
15
16Previous versions of Perl tried to map POSIX style character class definitions onto
17Unicode property names so that patterns would "dwim" when matches were made against latin-1 or
18unicode strings. This proved to be a mistake, breaking character class negation, causing
19forward compatibility problems (as Unicode keeps updating their property definitions and adding
20new characters), and other problems.
21
22Therefore we have now defined a new set of artificial "unicode" property names which will be
23used to do unicode matching of patterns using POSIX style character classes and perl short-form
24escape character classes like \w and \d.
25
26The key change here is that \d will no longer match every digit in the unicode standard
27(there are thousands) nor will \w match every word character in the standard, instead they
28will match precisely their POSIX or Perl definition.
29
30Those needing to match based on Unicode properties can continue to do so by using the \p{} syntax
31to match whichever property they like, including the new artificial definitions.
32
33B<NOTE:> This is a backwards incompatible no-warning change in behaviour. If you are upgrading
34and you process large volumes of text look for POSIX and Perl style character classes and
35change them to the relevent property name (by removing the word 'Posix' from the current name).
36
37The following table maps the POSIX character class names, the escapes and the old and new
38Unicode property mappings:
39
40 POSIX Esc Class New-Property ! Old-Property
41 ----------------------------------------------+-------------
42 alnum [0-9A-Za-z] IsPosixAlnum ! IsAlnum
43 alpha [A-Za-z] IsPosixAlpha ! IsAlpha
44 ascii [\000-\177] IsASCII = IsASCII
45 blank [\011 ] IsPosixBlank !
46 cntrl [\0-\37\177] IsPosixCntrl ! IsCntrl
47 digit \d [0-9] IsPosixDigit ! IsDigit
48 graph [!-~] IsPosixGraph ! IsGraph
49 lower [a-z] IsPosixLower ! IsLower
50 print [ -~] IsPosixPrint ! IsPrint
51 punct [!-/:-@[-`{-~] IsPosixPunct ! IsPunct
52 space [\11-\15 ] IsPosixSpace ! IsSpace
53 \s [\11\12\14\15 ] IsPerlSpace ! IsSpacePerl
54 upper [A-Z] IsPosixUpper ! IsUpper
55 word \w [0-9A-Z_a-z] IsPerlWord ! IsWord
56 xdigit [0-9A-Fa-f] IsXDigit = IsXDigit
57
58If you wish to build perl with the old mapping you may do so by setting
59
60 #define PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS 1
61
62in regcomp.h, and then setting
63
64 PERL_TEST_LEGACY_POSIX_CC
65
66to true your enviornment when testing.
67
68
c3e6c235 69=head2 @INC reorganization
70
71In @INC, ARCHLIB and PRIVLIB now occur after after the current version's
72site_perl and vendor_perl.
ad1d1c50 73
8b8da387 74=head2 Switch statement changes
75
76The handling of complex expressions by the C<given>/C<when> switch
a98ccf1e 77statement has been enhanced. These enhancements are also available in
785.10.1 and subsequent 5.10 releases. There are two new cases where C<when> now
412304fb 79interprets its argument as a boolean, instead of an expression to be used
8b8da387 80in a smart match:
81
82=over 4
83
8b8da387 84=item flip-flop operators
85
98814a2b 86The C<..> and C<...> flip-flop operators are now evaluated in boolean
87context, following their usual semantics; see L<perlop/"Range Operators">.
88
89Note that, as in perl 5.10.0, C<when (1..10)> will not work to test
90whether a given value is an integer between 1 and 10; you should use
91C<when ([1..10])> instead (note the array reference).
92
93However, contrary to 5.10.0, evaluating the flip-flop operators in boolean
94context ensures it can now be useful in a C<when()>, notably for
95implementing bistable conditions, like in:
96
5a00ee6a 97 when (/^=begin/ .. /^=end/) {
98 # do something
99 }
8b8da387 100
101=item defined-or operator
102
103A compound expression involving the defined-or operator, as in
104C<when (expr1 // expr2)>, will be treated as boolean if the first
105expression is boolean. (This just extends the existing rule that applies
106to the regular or operator, as in C<when (expr1 || expr2)>.)
107
108=back
109
98814a2b 110The next section details more changes brought to the semantics to
8b8da387 111the smart match operator, that naturally also modify the behaviour
112of the switch statements where smart matching is implicitly used.
a98ccf1e 113These changers were also made for the 5.10.1 release, and will remain in
114subsequent 5.10 releases.
8b8da387 115
116=head2 Smart match changes
117
118=head3 Changes to type-based dispatch
119
120The smart match operator C<~~> is no longer commutative. The behaviour of
121a smart match now depends primarily on the type of its right hand
5a00ee6a 122argument. Moreover, its semantics have been adjusted for greater
ee18cc6c 123consistency or usefulness in several cases. While the general backwards
124compatibility is maintained, several changes must be noted:
8b8da387 125
126=over 4
127
128=item *
129
130Code references with an empty prototype are no longer treated specially.
131They are passed an argument like the other code references (even if they
132choose to ignore it).
133
134=item *
135
136C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine
9091a618 137returns a true value for each key of the hash (or element of the
8b8da387 138array), instead of passing the whole hash or array as a reference to
139the subroutine.
140
141=item *
142
ee18cc6c 143Due to the commutativity breakage, code references are no longer
144treated specially when appearing on the left of the C<~~> operator,
145but like any vulgar scalar.
146
147=item *
148
8b8da387 149C<undef ~~ %hash> is always false (since C<undef> can't be a key in a
150hash). No implicit conversion to C<""> is done (as was the case in perl
1515.10.0).
152
153=item *
154
155C<$scalar ~~ @array> now always distributes the smart match across the
156elements of the array. It's true if one element in @array verifies
157C<$scalar ~~ $element>. This is a generalization of the old behaviour
158that tested whether the array contained the scalar.
159
160=back
161
162The full dispatch table for the smart match operator is given in
163L<perlsyn/"Smart matching in detail">.
164
165=head3 Smart match and overloading
166
167According to the rule of dispatch based on the rightmost argument type,
168when an object overloading C<~~> appears on the right side of the
169operator, the overload routine will always be called (with a 3rd argument
170set to a true value, see L<overload>.) However, when the object will
171appear on the left, the overload routine will be called only when the
9091a618 172rightmost argument is a simple scalar. This way distributivity of smart match
8b8da387 173across arrays is not broken, as well as the other behaviours with complex
174types (coderefs, hashes, regexes). Thus, writers of overloading routines
ee18cc6c 175for smart match mostly need to worry only with comparing against a scalar,
176and possibly with stringification overloading; the other common cases
177will be automatically handled consistently.
8b8da387 178
179C<~~> will now refuse to work on objects that do not overload it (in order
665f5e98 180to avoid relying on the object's underlying structure). (However, if the
181object overloads the stringification or the numification operators, and
182if overload fallback is active, it will be used instead, as usual.)
8b8da387 183
f71d6157 184=head2 Labels can't be keywords
185
186Labels used as targets for the C<goto>, C<last>, C<next> or C<redo>
187statements cannot be keywords anymore. This restriction will prevent
188potential confusion between the C<goto LABEL> and C<goto EXPR> syntaxes:
189for example, a statement like C<goto print> would jump to a label whose
7a4b5c08 190name would be the return value of C<print()>, (usually 1), instead of a
f71d6157 191label named C<print>. Moreover, the other control flow statements
192would just ignore any keyword passed to them as a label name. Since
193such labels cannot be defined anymore, this kind of error will be
194avoided.
195
5a00ee6a 196=head2 Other incompatible changes
197
198=over 4
199
200=item *
201
202The semantics of C<use feature :5.10*> have changed slightly.
203See L<"Modules and Pragmata"> for more information.
204
205=item *
206
207It is now a run-time error to use the smart match operator C<~~>
208with an object that has no overload defined for it. (This way
209C<~~> will not break encapsulation by matching against the
210object's internal representation as a reference.)
211
212=item *
213
214The version control system used for the development of the perl
215interpreter has been switched from Perforce to git. This is mainly an
216internal issue that only affects people actively working on the perl core;
217but it may have minor external visibility, for example in some of details
218of the output of C<perl -V>. See L<perlrepository> for more information.
219
220=item *
221
222The internal structure of the C<ext/> directory in the perl source has
223been reorganised. In general, a module C<Foo::Bar> whose source was
224stored under F<ext/Foo/Bar/> is now located under F<ext/Foo-Bar/>. Also,
429ee0aa 225nearly all dual-life modules have been moved from F<lib/> to F<ext/>. This
226is purely a source tarball change, and should make no difference to the
227compilation or installation of perl, unless you have a very customised build
228process that explicitly relies on this structure, or which hard-codes the
229C<nonxs_ext> F<Configure> parameter. Specifically, this change does not by
230default alter the location of any files in the final installation.
5a00ee6a 231
232=item *
233
234As part of the C<Test::Harness> 2.x to 3.x upgrade, the experimental
235C<Test::Harness::Straps> module has been removed.
236See L</"Updated Modules"> for more details.
237
238=item *
239
240As part of the C<ExtUtils::MakeMaker> upgrade, the
241C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish> modules
242have been removed from this distribution.
243
244=item *
245
246C<Module::CoreList> no longer contains the C<%:patchlevel> hash.
247
248=item *
249
250This one is actually a change introduced in 5.10.0, but it was missed
251from that release's perldelta, so it is mentioned here instead.
252
253A bugfix related to the handling of the C</m> modifier and C<qr> resulted
254in a change of behaviour between 5.8.x and 5.10.0:
255
256 # matches in 5.8.x, doesn't match in 5.10.0
257 $re = qr/^bar/; "foo\nbar" =~ /$re/m;
258
ad1d1c50 259=item *
260
261C<length undef> now returns undef.
262
7f0da121 263=item *
264
265Unsupported private C API functions are now declared "static" to prevent
c3e6c235 266leakage to Perl's public API.
7f0da121 267
268=item *
269
c3e6c235 270To support the bootstrapping process, F<miniperl> no longer builds with
271UTF-8 support in the regexp engine.
272
7f0da121 273This allows a build to complete with PERL_UNICODE set and a UTF-8 locale.
274Without this there's a bootstrapping problem, as miniperl can't load the UTF-8
275components of the regexp engine, because they're not yet built.
276
277=item *
278
279F<miniperl>'s @INC is now restricted to just -I..., the split of $ENV{PERL5LIB}, and "."
280
01ad23f5 281=item *
282
283A space or a newline is now required after a C<"#line XXX"> directive.
284
fd99c0b9 285=item *
286
287Tied filehandles now have an additional method EOF which provides the EOF type
288
289=item *
290
291To better match all other flow control statements, C<foreach> may no longer be used as an attribute.
7f0da121 292
5a00ee6a 293=back
294
7120b314 295=head1 Core Enhancements
296
5a00ee6a 297=head2 Unicode Character Database 5.1.0
298
3141b5e1 299The copy of the Unicode Character Database included in Perl 5.11.0 has
5a00ee6a 300been updated to 5.1.0 from 5.0.0. See
301L<http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes> for the
302notable changes.
303
304=head2 A proper interface for pluggable Method Resolution Orders
305
3141b5e1 306As of Perl 5.11.0 there is a new interface for plugging and using method
5a00ee6a 307resolution orders other than the default (linear depth first search).
308The C3 method resolution order added in 5.10.0 has been re-implemented as
309a plugin, without changing its Perl-space interface. See L<perlmroapi> for
310more information.
311
ef55af2a 312=head2 The C<overloading> pragma
1839a850 313
314This pragma allows you to lexically disable or enable overloading
315for some or all operations. (Yuval Kogman)
316
71e9c532 317=head2 C<\N> regex escape
318
319A new regex escape has been added, C<\N>. It will match any character that
320is not a newline, independently from the presence or absence of the single
321line match modifier C</s>. (If C<\N> is followed by an opening brace and
322by a letter, perl will still assume that a Unicode character name is
323coming, so compatibility is preserved.) (Rafael Garcia-Suarez)
324
4b3db487 325=head2 Implicit strictures
326
327Using the C<use VERSION> syntax with a version number greater or equal
328to 5.11.0 will also lexically enable strictures just like C<use strict>
329would do (in addition to enabling features.) So, the following:
330
331 use 5.11.0;
332
333will now imply:
334
335 use strict;
336 use feature ':5.11';
337
5ee651a9 338=head2 Parallel tests
339
340The core distribution can now run its regression tests in parallel on
341Unix-like platforms. Instead of running C<make test>, set C<TEST_JOBS> in
342your environment to the number of tests to run in parallel, and run
343C<make test_harness>. On a Bourne-like shell, this can be done as
344
345 TEST_JOBS=3 make test_harness # Run 3 tests in parallel
346
347An environment variable is used, rather than parallel make itself, because
348L<TAP::Harness> needs to be able to schedule individual non-conflicting test
349scripts itself, and there is no standard interface to C<make> utilities to
350interact with their job schedulers.
351
5a00ee6a 352Note that currently some test scripts may fail when run in parallel (most
353notably C<ext/IO/t/io_dir.t>). If necessary run just the failing scripts
354again sequentially and see if the failures go away.
355
044c880b 356=head2 The C<...> operator
357
358A new operator, C<...>, nicknamed the Yada Yada operator, has been added.
359It is intended to mark placeholder code, that is not yet implemented.
360See L<perlop/"Yada Yada Operator">. (chromatic)
361
5a00ee6a 362=head2 DTrace support
363
364Some support for DTrace has been added. See "DTrace support" in F<INSTALL>.
365
366=head2 Support for C<configure_requires> in CPAN module metadata
367
368Both C<CPAN> and C<CPANPLUS> now support the C<configure_requires> keyword
038a5866 369in the F<META.yml> metadata file included in most recent CPAN distributions.
5a00ee6a 370This allows distribution authors to specify configuration prerequisites that
371must be installed before running F<Makefile.PL> or F<Build.PL>.
372
373See the documentation for C<ExtUtils::MakeMaker> or C<Module::Build> for more
374on how to specify C<configure_requires> when creating a distribution for CPAN.
375
c3e6c235 376=head2 C<each> is now more flexible
377
378The C<each> function can now operate on arrays.
379
380=head2 Y2038 compliance
381
382Perl's core time-related functions are now Y2038 compliant. (With 29
383years to spare!)
384
385=head2 C<$,> flexibilty
386
387The variable C<$,> may now be tied.
388
389=head2 // in where clauses
ad1d1c50 390
c3e6c235 391// now behaves like || in when clauses
ad1d1c50 392
c3e6c235 393=head2 Enabling warnings from your shell environment
ad1d1c50 394
c3e6c235 395You can now set C<-W> from the C<PERL5OPT> environment variable
ad1d1c50 396
c3e6c235 397=head2 C<delete local>
398
399C<delete local> now allows you to lexically delete a hash entry.
400
401=head2 New support for Abstract namespace sockets
7f0da121 402
7f0da121 403Abstract namespace sockets are Linux-specific socket type that live in
404AF_UNIX family, slightly abusing it to be able to use arbitrary
405character arrays as addresses: They start with nul byte and are not
406terminated by nul byte, but with the length passed to the socket()
407system call.
ad1d1c50 408
7120b314 409=head1 Modules and Pragmata
410
7f0da121 411=head2 Dual-lifed modules moved
412
18fd877a 413Dual-lifed modules maintained primarily in the Perl core now live in dist/.
7f0da121 414Dual-lifed modules maintained primarily on CPAN now live in cpan/
415
5a00ee6a 416=head2 New Modules and Pragmata
417
418=over 4
419
420=item C<autodie>
421
422This is a new lexically-scoped alternative for the C<Fatal> module.
423The bundled version is 2.06_01. Note that in this release, using a string
424eval when C<autodie> is in effect can cause the autodie behaviour to leak
425into the surrounding scope. See L<autodie/"BUGS"> for more details.
426
427=item C<Compress::Raw::Bzip2>
428
429This has been added to the core (version 2.020).
430
431=item C<parent>
432
433This pragma establishes an ISA relationship with base classes at compile
434time. It provides the key feature of C<base> without the feature creep.
435
436=item C<Parse::CPAN::Meta>
437
438This has been added to the core (version 1.39).
439
440=back
441
1839a850 442=head2 Pragmata Changes
443
444=over 4
445
446=item C<overloading>
447
448See L</"The C<overloading> pragma"> above.
449
5a00ee6a 450=item C<attributes>
451
452Upgraded from version 0.08 to 0.09.
453
454=item C<attrs>
455
42f099ed 456The C<attrs> pragma has been removed. It had been marked as deprecated since
4575.6.0.
5a00ee6a 458
459=item C<base>
460
461Upgraded from version 2.13 to 2.14. See L<parent> for a replacement.
462
463=item C<bigint>
464
465Upgraded from version 0.22 to 0.23.
466
467=item C<bignum>
468
469Upgraded from version 0.22 to 0.23.
470
471=item C<bigrat>
472
473Upgraded from version 0.22 to 0.23.
474
475=item C<charnames>
476
477Upgraded from version 1.06 to 1.07.
478
479The Unicode F<NameAliases.txt> database file has been added. This has the
480effect of adding some extra C<\N> character names that formerly wouldn't
481have been recognised; for example, C<"\N{LATIN CAPITAL LETTER GHA}">.
482
483=item C<constant>
484
9f808eed 485Upgraded from version 1.13 to 1.19. Some code has been shifted from run time to
486compile time, and the amount of MRO cache flushing has been minimised.
5a00ee6a 487
488=item C<feature>
489
490The meaning of the C<:5.10> and C<:5.10.X> feature bundles has
491changed slightly. The last component, if any (i.e. C<X>) is simply ignored.
492This is predicated on the assumption that new features will not, in
493general, be added to maintenance releases. So C<:5.10> and C<:5.10.X>
494have identical effect. This is a change to the behaviour documented for
4955.10.0.
496
497=item C<fields>
498
499Upgraded from version 2.13 to 2.14 (this was just a version bump; there
500were no functional changes).
501
502=item C<lib>
503
504Upgraded from version 0.5565 to 0.62.
505
506=item C<open>
507
508Upgraded from version 1.06 to 1.07.
509
510=item C<overload>
511
512Upgraded from version 1.06 to 1.07.
513
514=item C<overloading>
515
516See L</"The C<overloading> pragma"> above.
517
f7fa8439 518=item C<mro>
519
520Upgraded from version 1.00 to 1.01. Performance for single inheritance is 40%
521faster - see L</"Performance Enhancements"> below.
522
523C<mro> is now implemented as an XS extension. The documented interface has not
524changed. Code relying on the implementation detail that some C<mro::>
525methods happened to be available at all times gets to "keep both pieces".
526
5a00ee6a 527=item C<version>
528
529Upgraded from version 0.74 to 0.77.
530
1839a850 531=back
532
5a00ee6a 533=head2 Updated Modules
02569b83 534
535=over 4
536
5a00ee6a 537=item C<Archive::Extract>
538
539Upgraded from version 0.24 to 0.34.
540
541=item C<Archive::Tar>
542
543Upgraded from version 1.38 to 1.52.
544
545=item C<Attribute::Handlers>
546
547Upgraded from version 0.79 to 0.85.
548
549=item C<AutoLoader>
550
551Upgraded from version 5.63 to 5.68.
552
553=item C<AutoSplit>
554
555Upgraded from version 1.05 to 1.06.
556
557=item C<B>
558
559Upgraded from version 1.17 to 1.22.
560
561=item C<B::Debug>
562
563Upgraded from version 1.05 to 1.11.
564
565=item C<B::Deparse>
566
567Upgraded from version 0.83 to 0.89.
568
569=item C<B::Lint>
570
571Upgraded from version 1.09 to 1.11.
572
573=item C<B::Xref>
574
575Upgraded from version 1.01 to 1.02.
576
577=item C<Benchmark>
578
579Upgraded from version 1.10 to 1.11.
580
581=item C<Carp>
582
583Upgraded from version 1.08 to 1.11.
584
02569b83 585L<Carp> now includes all the necessary code to function. Previously, it
586used to be a lightweight placeholder that loaded the actual code from
587C<Carp::Heavy> on demand. C<Carp::Heavy> is now a simple, empty module
588kept for backwards compatibility for programs that used to pre-load it.
589
5a00ee6a 590=item C<CGI>
7120b314 591
5a00ee6a 592Upgraded from version 3.29 to 3.43.
593(also includes the "default_value for popup_menu()" fix from 3.45).
7120b314 594
5a00ee6a 595=item C<Compress::Zlib>
7120b314 596
5a00ee6a 597Upgraded from version 2.008 to 2.020.
7120b314 598
5a00ee6a 599=item C<CPAN>
7120b314 600
5a00ee6a 601Upgraded from version 1.9205 to 1.9402. C<CPAN::FTP> has a local fix to
602stop it being too verbose on download failure.
54ad55c5 603
5a00ee6a 604=item C<CPANPLUS>
54ad55c5 605
5a00ee6a 606Upgraded from version 0.84 to 0.88.
54ad55c5 607
5a00ee6a 608=item C<CPANPLUS::Dist::Build>
e2c0f81f 609
5a00ee6a 610Upgraded from version 0.06_02 to 0.36.
e2c0f81f 611
5a00ee6a 612=item C<Cwd>
fc46f0f6 613
5a00ee6a 614Upgraded from version 3.25_01 to 3.30.
fc46f0f6 615
5a00ee6a 616=item C<Data::Dumper>
54ad55c5 617
5a00ee6a 618Upgraded from version 2.121_14 to 2.124.
7120b314 619
5a00ee6a 620=item C<DB>
7120b314 621
5a00ee6a 622Upgraded from version 1.01 to 1.02.
623
624=item C<DB_File>
625
626Upgraded from version 1.816_1 to 1.820.
627
628=item C<Devel::PPPort>
629
630Upgraded from version 3.13 to 3.19.
631
632=item C<Digest::MD5>
633
634Upgraded from version 2.36_01 to 2.39.
635
636=item C<Digest::SHA>
637
638Upgraded from version 5.45 to 5.47.
639
640=item C<DirHandle>
641
642Upgraded from version 1.01 to 1.03.
643
644=item C<Dumpvalue>
645
646Upgraded from version 1.12 to 1.13.
647
648=item C<DynaLoader>
649
650Upgraded from version 1.08 to 1.10.
651
652=item C<Encode>
653
654Upgraded from version 2.23 to 2.35.
655
656=item C<Errno>
657
658Upgraded from version 1.10 to 1.11.
659
660=item C<Exporter>
661
662Upgraded from version 5.62 to 5.63.
663
664=item C<ExtUtils::CBuilder>
665
666Upgraded from version 0.21 to 0.2602.
667
668=item C<ExtUtils::Command>
669
670Upgraded from version 1.13 to 1.16.
671
672=item C<ExtUtils::Constant>
673
674Upgraded from 0.20 to 0.22. (Note that neither of these versions are
675available on CPAN.)
676
677=item C<ExtUtils::Embed>
678
679Upgraded from version 1.27 to 1.28.
680
681=item C<ExtUtils::Install>
682
683Upgraded from version 1.44 to 1.54.
684
685=item C<ExtUtils::MakeMaker>
686
687Upgraded from version 6.42 to 6.55_02.
688
689Note that C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish>
690have been removed from this distribution.
691
692=item C<ExtUtils::Manifest>
693
694Upgraded from version 1.51_01 to 1.56.
695
696=item C<ExtUtils::ParseXS>
697
698Upgraded from version 2.18_02 to 2.2002.
699
700=item C<Fatal>
701
702Upgraded from version 1.05 to 2.06_01. See also the new pragma C<autodie>.
703
704=item C<File::Basename>
705
706Upgraded from version 2.76 to 2.77.
707
708=item C<File::Compare>
709
710Upgraded from version 1.1005 to 1.1006.
711
712=item C<File::Copy>
713
0de885a9 714Upgraded from version 2.11 to 2.16.
5a00ee6a 715
ad1d1c50 716File::Copy now always return 0 (not "") on failure.
717
0de885a9 718FIXME - describe C<cp>
719
5a00ee6a 720=item C<File::Fetch>
721
722Upgraded from version 0.14 to 0.20.
723
724=item C<File::Find>
725
726Upgraded from version 1.12 to 1.14.
727
728=item C<File::Path>
729
730Upgraded from version 2.04 to 2.07_03.
731
732=item C<File::Spec>
733
734Upgraded from version 3.2501 to 3.30.
735
736=item C<File::stat>
737
738Upgraded from version 1.00 to 1.01.
739
ad1d1c50 740Added -X overloading, -M, -C and -A.
741
5a00ee6a 742=item C<File::Temp>
743
744Upgraded from version 0.18 to 0.22.
745
746=item C<FileCache>
747
748Upgraded from version 1.07 to 1.08.
749
750=item C<FileHandle>
751
752Upgraded from version 2.01 to 2.02.
753
754=item C<Filter::Simple>
755
756Upgraded from version 0.82 to 0.84.
757
758=item C<Filter::Util::Call>
759
760Upgraded from version 1.07 to 1.08.
761
762=item C<FindBin>
763
764Upgraded from version 1.49 to 1.50.
765
766=item C<GDBM_File>
767
768Upgraded from version 1.08 to 1.09.
769
770=item C<Getopt::Long>
771
772Upgraded from version 2.37 to 2.38.
773
774=item C<Hash::Util::FieldHash>
775
776Upgraded from version 1.03 to 1.04. This fixes a memory leak.
777
778=item C<I18N::Collate>
779
780Upgraded from version 1.00 to 1.01.
781
782=item C<IO>
783
784Upgraded from version 1.23_01 to 1.25.
785
786This makes non-blocking mode work on Windows in C<IO::Socket::INET>
787[CPAN #43573].
788
789=item C<IO::Compress::*>
790
791Upgraded from version 2.008 to 2.020.
792
793=item C<IO::Dir>
794
795Upgraded from version 1.06 to 1.07.
796
797=item C<IO::Handle>
798
799Upgraded from version 1.27 to 1.28.
800
801=item C<IO::Socket>
802
803Upgraded from version 1.30_01 to 1.31.
804
805=item C<IO::Zlib>
806
807Upgraded from version 1.07 to 1.09.
808
809=item C<IPC::Cmd>
810
811Upgraded from version 0.40_1 to 0.46.
812
813=item C<IPC::Open3>
814
815Upgraded from version 1.02 to 1.04.
816
817=item C<IPC::SysV>
818
819Upgraded from version 1.05 to 2.01.
820
821=item C<lib>
822
823Upgraded from version 0.5565 to 0.62.
824
825=item C<List::Util>
826
827Upgraded from version 1.19 to 1.21.
828
829=item C<Locale::MakeText>
830
831Upgraded from version 1.12 to 1.13.
832
833=item C<Log::Message>
834
835Upgraded from version 0.01 to 0.02.
836
837=item C<Math::BigFloat>
838
839Upgraded from version 1.59 to 1.60.
840
841=item C<Math::BigInt>
842
843Upgraded from version 1.88 to 1.89.
844
845=item C<Math::BigInt::FastCalc>
846
847Upgraded from version 0.16 to 0.19.
848
849=item C<Math::BigRat>
850
851Upgraded from version 0.21 to 0.22.
852
853=item C<Math::Complex>
854
855Upgraded from version 1.37 to 1.56.
856
857=item C<Math::Trig>
858
859Upgraded from version 1.04 to 1.20.
860
861=item C<Memoize>
862
863Upgraded from version 1.01_02 to 1.01_03 (just a minor documentation
864change).
865
866=item C<Module::Build>
867
868Upgraded from version 0.2808_01 to 0.34_02.
869
870=item C<Module::CoreList>
871
872Upgraded from version 2.13 to 2.18. This release no longer contains the
873C<%Module::CoreList::patchlevel> hash.
874
875=item C<Module::Load>
876
877Upgraded from version 0.12 to 0.16.
878
879=item C<Module::Load::Conditional>
880
881Upgraded from version 0.22 to 0.30.
882
883=item C<Module::Loaded>
884
885Upgraded from version 0.01 to 0.02.
886
887=item C<Module::Pluggable>
888
889Upgraded from version 3.6 to 3.9.
890
891=item C<NDBM_File>
892
893Upgraded from version 1.07 to 1.08.
894
895=item C<Net::Ping>
896
897Upgraded from version 2.33 to 2.36.
898
899=item C<NEXT>
900
901Upgraded from version 0.60_01 to 0.64.
902
903=item C<Object::Accessor>
904
905Upgraded from version 0.32 to 0.34.
906
907=item C<OS2::REXX>
908
909Upgraded from version 1.03 to 1.04.
910
911=item C<Package::Constants>
912
913Upgraded from version 0.01 to 0.02.
914
915=item C<PerlIO>
916
917Upgraded from version 1.04 to 1.06.
918
919=item C<PerlIO::via>
920
921Upgraded from version 0.04 to 0.07.
922
923=item C<Pod::Man>
924
925Upgraded from version 2.16 to 2.22.
926
927=item C<Pod::Parser>
928
929Upgraded from version 1.35 to 1.37.
930
0f97ff05 931=item C<Pod::Plainer>
932
cfc946ee 933Upgraded from version 0.01 to 1.01.
0f97ff05 934
935There are no code changes - the version bump is because C<Pod::Plainer> has
cfc946ee 936been released to CPAN as a stand-alone distribution, and will be removed from
0f97ff05 937the core distribution in 5.14.
938
ad1d1c50 939=item Pod::Perldoc
940
941Upgrade from version 3.14_02 to 3.15.
942
5a00ee6a 943=item C<Pod::Simple>
944
945Upgraded from version 3.05 to 3.07.
946
947=item C<Pod::Text>
948
949Upgraded from version 3.08 to 3.13.
950
951=item C<POSIX>
952
953Upgraded from version 1.13 to 1.17.
954
955=item C<Safe>
956
957Upgraded from 2.12 to 2.18.
958
959=item C<Scalar::Util>
960
961Upgraded from version 1.19 to 1.21.
962
963=item C<SelectSaver>
964
965Upgraded from 1.01 to 1.02.
966
967=item C<SelfLoader>
968
969Upgraded from 1.11 to 1.17.
970
971=item C<Socket>
972
61f1d76c 973Upgraded from 1.80 to 1.84.
974
975As of 1.84, C<Socket> can now handle abstract namespace sockets on Linux.
976(see unix(7)).
5a00ee6a 977
978=item C<Storable>
979
980Upgraded from 2.18 to 2.20.
981
982=item C<Switch>
983
984Upgraded from version 2.13 to 2.14. Please see L</Deprecations>.
985
986=item C<Symbol>
987
988Upgraded from version 1.06 to 1.07.
989
990=item C<Sys::Syslog>
991
992Upgraded from version 0.22 to 0.27.
993
994=item C<Term::ANSIColor>
995
ad1d1c50 996Upgraded from version 1.12 to 2.01.
5a00ee6a 997
998=item C<Term::ReadLine>
999
1000Upgraded from version 1.03 to 1.04.
1001
1002=item C<Term::UI>
1003
1004Upgraded from version 0.18 to 0.20.
1005
1006=item C<Test::Harness>
1007
1008Upgraded from version 2.64 to 3.17.
1009
1010Note that one side-effect of the 2.x to 3.x upgrade is that the
1011experimental C<Test::Harness::Straps> module (and its supporting
1012C<Assert>, C<Iterator>, C<Point> and C<Results> modules) have been
1013removed. If you still need this, then they are available in the
1014(unmaintained) C<Test-Harness-Straps> distribution on CPAN.
1015
1016=item C<Test::Simple>
1017
1018Upgraded from version 0.72 to 0.92.
1019
1020=item C<Text::ParseWords>
1021
1022Upgraded from version 3.26 to 3.27.
1023
1024=item C<Text::Tabs>
1025
1026Upgraded from version 2007.1117 to 2009.0305.
1027
1028=item C<Text::Wrap>
1029
1030Upgraded from version 2006.1117 to 2009.0305.
1031
1032=item C<Thread::Queue>
1033
1034Upgraded from version 2.00 to 2.11.
1035
1036=item C<Thread::Semaphore>
1037
1038Upgraded from version 2.01 to 2.09.
1039
1040=item C<threads>
1041
ad1d1c50 1042Upgraded from version 1.67 to 1.73.
5a00ee6a 1043
1044=item C<threads::shared>
1045
1046Upgraded from version 1.14 to 1.29.
1047
1048=item C<Tie::RefHash>
1049
1050Upgraded from version 1.37 to 1.38.
1051
1052=item C<Tie::StdHandle>
1053
1054This has documentation changes, and has been assigned a version for the
1055first time: version 4.2.
1056
1057=item C<Time::HiRes>
1058
1059Upgraded from version 1.9711 to 1.9719.
1060
1061=item C<Time::Local>
1062
1063Upgraded from version 1.18 to 1.1901.
1064
1065=item C<Time::Piece>
1066
1067Upgraded from version 1.12 to 1.15.
1068
1069=item C<Unicode::Normalize>
1070
1071Upgraded from version 1.02 to 1.03.
1072
1073=item C<Unicode::UCD>
1074
1075Upgraded from version 0.25 to 0.27.
1076
1077C<charinfo()> now works on Unified CJK code points added to later versions
1078of Unicode.
1079
1080C<casefold()> has new fields returned to provide both a simpler interface
1081and previously missing information. The old fields are retained for
1082backwards compatibility. Information about Turkic-specific code points is
1083now returned.
1084
1085The documentation has been corrected and expanded.
1086
1087=item C<UNIVERSAL>
1088
1089Upgraded from version 1.04 to 1.05.
1090
eeab323f 1091C<< UNIVERSAL->import() >> is now deprecated.
ad1d1c50 1092
5a00ee6a 1093=item C<Win32>
1094
1095Upgraded from version 0.34 to 0.39.
1096
1097=item C<Win32API::File>
1098
1099Upgraded from version 0.1001_01 to 0.1101.
1100
1101=item C<XSLoader>
1102
1103Upgraded from version 0.08 to 0.10.
1104
d7ea0f56 1105=item Upgrade to Class::ISA 0.34
1106
c3e6c235 1107=item Upgrade to Attribute::Handlers 0.87
d7ea0f56 1108
c3e6c235 1109=item Upgrade to AutoLoader 5.70
d7ea0f56 1110
1111=item Upgrade to IO::Zlib 1.10
1112
1113=item Update parent to CPAN version 0.223
1114
1115=item Update Log::Message::Simple to CPAN version 0.06
1116
1117=item Updated Math::BigRat to CPAN version 0.24
1118
1119=item Update Archive::Tar to CPAN version 1.54
1120
1121=item Update IPC::Cmd to CPAN version 0.50
1122
1123=item Updated CPANPLUS::Dist::Build to CPAN version 0.40
c3e6c235 1124
d7ea0f56 1125=item Updated Module::Loaded to CPAN version 0.06
1126
1127=item Upgrade Term::ANSIColor to 2.02
1128
1129=item Update Text::Balanced to 2.02
1130
1131=item Update Module::Build to 0.35
1132
c3e6c235 1133=item constant has been upgraded to 1.19.
d7ea0f56 1134
1135=item upgrade CGI from 3.43 to 3.45
1136
1137=item bump Safe version to 2.18
1138
1139=item Upgrade to threads::shared 1.31
1140
1141=item Update threads to 1.74
1142
1143=item autodie 2.06_01
1144
1145=item Synchronize with CPAN's Attribute::Handlers 0.86
1146
1147=item Synchronize AutoLoader with CPAN's 5.69
1148
1149=item ExtUtils::MakeMaker 6.55_02
1150
1151=item Final release of version-0.77 for inclusion in 5.10.1
1152
fd99c0b9 1153=item Upgrade to Encode 2.37
1154
1155=item Upgrade to Class::ISA 0.36 (Fixes installation directories only)
1156
1157=item Upgrade to PathTools 3.30_02 (with only core reorganization fixes)
1158
5a00ee6a 1159=back
1160
1161=head1 Utility Changes
1162
1163=over 4
1164
1165=item F<h2ph>
1166
1167Now looks in C<include-fixed> too, which is a recent addition to gcc's
1168search path.
1169
1170=item F<h2xs>
1171
1172No longer incorrectly treats enum values like macros (Daniel Burr).
1173
1174Now handles C++ style constants (C<//>) properly in enums. (A patch from
1175Rainer Weikusat was used; Daniel Burr also proposed a similar fix).
1176
1177=item F<perl5db.pl>
1178
1179C<LVALUE> subroutines now work under the debugger.
1180
1181The debugger now correctly handles proxy constant subroutines, and
1182subroutine stubs.
1183
ad1d1c50 1184=item F<perlbug>
1185
038a5866 1186F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out upstream bug
76e3c4a8 1187tracker URLs.
ad1d1c50 1188
1189Where the user names a module that their bug report is about, and we know the
1190URL for its upstream bug tracker, provide a message to the user explaining
1191that the core copies the CPAN version directly, and provide the URL for
1192reporting the bug directly to upstream.
1193
5a00ee6a 1194=item F<perlthanks>
1195
3141b5e1 1196Perl 5.11.0 added a new utility F<perlthanks>, which is a variant of
5a00ee6a 1197F<perlbug>, but for sending non-bug-reports to the authors and maintainers
1198of Perl. Getting nothing but bug reports can become a bit demoralising:
1199we'll see if this changes things.
1200
1201=back
1202
1203=head1 New Documentation
1204
1205=over 4
1206
1207=item L<perlhaiku>
1208
1209This contains instructions on how to build perl for the Haiku platform.
1210
1211=item L<perlmroapi>
1212
1213This describes the new interface for pluggable Method Resolution Orders.
1214
1215=item L<perlperf>
1216
1217This document, by Richard Foley, provides an introduction to the use of
1218performance and optimization techniques which can be used with particular
1219reference to perl programs.
1220
1221=item L<perlrepository>
1222
1223This describes how to access the perl source using the I<git> version
1224control system.
1225
1226=item L<perlthanks>
1227
1228This describes the new F<perlthanks> utility.
1229
1230=back
1231
1232=head1 Changes to Existing Documentation
1233
76e3c4a8 1234The various large F<Changes*> files (which listed every change made to perl
5a00ee6a 1235over the last 18 years) have been removed, and replaced by a small file,
76e3c4a8 1236also called F<Changes>, which just explains how that same information may
5a00ee6a 1237be extracted from the git version control system.
1238
1239The file F<Porting/patching.pod> has been deleted, as it mainly described
1240interacting with the old Perforce-based repository, which is now obsolete.
1241Information still relevant has been moved to L<perlrepository>.
1242
1243L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all
1244generated at build time, rather than being shipped as part of the release.
1245
c3e6c235 1246=over
ad1d1c50 1247
c3e6c235 1248=item *
ad1d1c50 1249
c3e6c235 1250Documented -X overloading.
ad1d1c50 1251
c3e6c235 1252=item *
ad1d1c50 1253
c3e6c235 1254Documented that C<when()> treats specially most of the filetest operators
ad1d1c50 1255
c3e6c235 1256=item *
1257
1258Documented when as a syntax modifier
1259
1260=item *
1261
1262Eliminated "Old Perl threads tutorial", which describes 5005 threads.
1263
1264F<pod/perlthrtut.pod> is the same material reworked for ithreads.
1265
1266=item *
1267
1268Correct previous documentation: v-strings are not deprecated
ad1d1c50 1269
1270With version objects, we need them to use MODULE VERSION syntax. This
1271patch removes the deprecation note.
1272
c3e6c235 1273=item *
1274
1275Added security contact information to L<perlsec>
1276
1277=back
7f0da121 1278
5a00ee6a 1279=head1 Performance Enhancements
1280
c3e6c235 1281
5a00ee6a 1282=over 4
1283
1284=item *
1285
1286A new internal cache means that C<isa()> will often be faster.
1287
1288=item *
1289
6f54462f 1290The implementation of C<C3> Method Resolution Order has been optimised -
c3e6c235 1291linearisation for classes with single inheritance is 40% faster. Performance
6f54462f 1292for multiple inheritance is unchanged.
1293
1294=item *
1295
5a00ee6a 1296Under C<use locale>, the locale-relevant information is now cached on
1297read-only values, such as the list returned by C<keys %hash>. This makes
1298operations such as C<sort keys %hash> in the scope of C<use locale> much
1299faster.
1300
1301=item *
1302
1303Empty C<DESTROY> methods are no longer called.
1304
ad1d1c50 1305=item *
1306
7a4b5c08 1307Faster C<Perl_sv_utf8_upgrade()>
ad1d1c50 1308
1309=item *
1310
7a4b5c08 1311Speed up C<keys> on empty hash
ad1d1c50 1312
5a00ee6a 1313=back
1314
1315=head1 Installation and Configuration Improvements
1316
1317=head2 F<ext/> reorganisation
1318
1319The layout of directories in F<ext> has been revised. Specifically, all
1320extensions are now flat, and at the top level, with C</> in pathnames
1321replaced by C<->, so that F<ext/Data/Dumper/> is now F<ext/Data-Dumper/>,
1322etc. The names of the extensions as specified to F<Configure>, and as
1323reported by C<%Config::Config> under the keys C<dynamic_ext>,
1324C<known_extensions>, C<nonxs_ext> and C<static_ext> have not changed, and
1325still use C</>. Hence this change will not have any affect once perl is
429ee0aa 1326installed. C<Safe> has been split out from being part of C<Opcode>, and
c3e6c235 1327C<mro> is now an extension in its own right.
429ee0aa 1328
1329Nearly all dual-life modules have been moved from F<lib> to F<ext>, and will
1330now appear as known C<nonxs_ext>. This will made no difference to the
1331structure of an installed perl, nor will the modules installed differ,
1332unless you run F<Configure> with options to specify an exact list of
1333extensions to build. In this case, you will rapidly become aware that you
1334need to add to your list, because various modules needed to complete the
1335build, such as C<ExtUtils::ParseXS>, have now become extensions, and
1336without them the build will fail well before it attempts to run the
1337regression tests.
5a00ee6a 1338
1339=head2 Configuration improvements
1340
1341If C<vendorlib> and C<vendorarch> are the same, then they are only added to
1342C<@INC> once.
1343
1344C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if
1345perl is built with C<-Dusedevel>.
1346
1347F<Configure> will enable use of C<-fstack-protector>, to provide protection
1348against stack-smashing attacks, if the compiler supports it.
1349
1350F<Configure> will now determine the correct prototypes for re-entrant
1351functions, and for C<gconvert>, if you are using a C++ compiler rather
1352than a C compiler.
1353
1354On Unix, if you build from a tree containing a git repository, the
1355configuration process will note the commit hash you have checked out, for
1356display in the output of C<perl -v> and C<perl -V>. Unpushed local commits
1357are automatically added to the list of local patches displayed by
1358C<perl -V>.
1359
1360=head2 Compilation improvements
1361
1362As part of the flattening of F<ext>, all extensions on all platforms are
1363built by F<make_ext.pl>. This replaces the Unix-specific
1364F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific
1365F<win32/buildext.pl>.
1366
1367=head2 Platform Specific Changes
1368
1369=over 4
1370
1371=item AIX
1372
7a4b5c08 1373Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from F<libbsd>.
5a00ee6a 1374
1375Removed F<libgdbm> for AIX 5L and 6.1. The F<libgdbm> is delivered as an
c3e6c235 1376optional package with the AIX Toolbox. Unfortunately the 64 bit version
5a00ee6a 1377is broken.
1378
1379Hints changes mean that AIX 4.2 should work again.
1380
1381=item Cygwin
1382
1383On Cygwin we now strip the last number from the DLL. This has been the
1384behaviour in the cygwin.com build for years. The hints files have been
1385updated.
1386
81afb674 1387=item DomainOS
1388
1389Support for Apollo DomainOS was removed in Perl 5.11.0
1390
5a00ee6a 1391=item FreeBSD
1392
1393The hints files now identify the correct threading libraries on FreeBSD 7
1394and later.
1395
1396=item Irix
1397
1398We now work around a bizarre preprocessor bug in the Irix 6.5 compiler:
1399C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't.
1400
1401=item Haiku
1402
1403Patches from the Haiku maintainers have been merged in. Perl should now
1404build on Haiku.
1405
81afb674 1406=item MiNT
1407
1408Support for Atari MiNT was removed in Perl 5.11.0.
1409
5a00ee6a 1410=item MirOS BSD
1411
1412Perl should now build on MirOS BSD.
1413
1414=item NetBSD
1415
1416Hints now supports versions 5.*.
1417
1418=item Stratus VOS
1419
1420Various changes from Stratus have been merged in.
1421
1422=item Symbian
1423
1424There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
1425
1426=item Win32
1427
1428Improved message window handling means that C<alarm> and C<kill> messages
1429will no longer be dropped under race conditions.
1430
1431=item VMS
1432
1433Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail
1434if C<$/> was set to a numeric reference (to indicate record-style reads).
1435This is now fixed.
1436
1437VMS now supports C<getgrgid>.
1438
1439Many improvements and cleanups have been made to the VMS file name handling
1440and conversion code.
1441
1442Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit
1443status in a VMS condition value for better interaction with GNV's bash
1444shell and other utilities that depend on POSIX exit values. See
1445L<perlvms/"$?"> for details.
1446
76e3c4a8 1447C<File::Copy> now detects Unix compatibility mode on VMS.
ad1d1c50 1448
5a00ee6a 1449=back
1450
1451=head1 Selected Bug Fixes
1452
1453=over 4
1454
038a5866 1455=item *
5a00ee6a 1456
ce979e27 1457C<-I> on shebang line now adds directories in front of @INC
5a00ee6a 1458as documented, and as does C<-I> when specified on the command-line.
5a00ee6a 1459
76e3c4a8 1460=item *
5a00ee6a 1461
76e3c4a8 1462C<kill> is now fatal when called on non-numeric process identifiers.
5a00ee6a 1463Previously, an 'undef' process identifier would be interpreted as a request to
1464kill process "0", which would terminate the current process group on POSIX
1465systems. Since process identifiers are always integers, killing a non-numeric
1466process is now fatal.
1467
1468=item *
1469
14705.10.0 inadvertently disabled an optimisation, which caused a measurable
1471performance drop in list assignment, such as is often used to assign
1472function parameters from C<@_>. The optimisation has been re-instated, and
1473the performance regression fixed.
1474
1475=item *
1476
1477Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038].
1478
1479=item *
1480
1481Some potential coredumps in PerlIO fixed [RT #57322,54828].
1482
1483=item *
1484
1485The debugger now works with lvalue subroutines.
1486
1487=item *
1488
1489The debugger's C<m> command was broken on modules that defined constants
1490[RT #61222].
1491
1492=item *
1493
7a4b5c08 1494C<crypt> and string complement could return tainted values for untainted
5a00ee6a 1495arguments [RT #59998].
1496
1497=item *
1498
038a5866 1499The C<-i>I<.suffix> command-line switch now recreates the file using
5a00ee6a 1500restricted permissions, before changing its mode to match the original
1501file. This eliminates a potential race condition [RT #60904].
1502
1503=item *
1504
1505On some UNIX systems, the value in C<$?> would not have the top bit set
1506(C<$? & 128>) even if the child core dumped.
1507
1508=item *
1509
038a5866 1510Under some circumstances, C<$^R> could incorrectly become undefined
5a00ee6a 1511[RT #57042].
1512
1513=item *
1514
a048364f 1515In the XS API, various hash functions, when passed a pre-computed hash where
1516the key is UTF-8, might result in an incorrect lookup.
5a00ee6a 1517
1518=item *
1519
a048364f 1520XS code including F<XSUB.h> before F<perl.h> gave a compile-time error
5a00ee6a 1521[RT #57176].
1522
1523=item *
1524
1525C<< $object->isa('Foo') >> would report false if the package C<Foo> didn't
1526exist, even if the object's C<@ISA> contained C<Foo>.
1527
1528=item *
1529
1530Various bugs in the new-to 5.10.0 mro code, triggered by manipulating
1531C<@ISA>, have been found and fixed.
1532
1533=item *
1534
1535Bitwise operations on references could crash the interpreter, e.g.
1536C<$x=\$y; $x |= "foo"> [RT #54956].
1537
1538=item *
1539
1540Patterns including alternation might be sensitive to the internal UTF-8
1541representation, e.g.
1542
1543 my $byte = chr(192);
1544 my $utf8 = chr(192); utf8::upgrade($utf8);
1545 $utf8 =~ /$byte|X}/i; # failed in 5.10.0
1546
1547=item *
1548
1549Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in
1550effect), double-quoted literal strings could be corrupted where a C<\xNN>,
1551C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value
1552greater than 255 [RT #59908].
1553
1554=item *
1555
1556C<B::Deparse> failed to correctly deparse various constructs:
1557C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488],
1558C<sub foo(_)> [RT #62484].
1559
1560=item *
1561
7a4b5c08 1562Using C<setpgrp> with no arguments could corrupt the perl stack.
5a00ee6a 1563
1564=item *
1565
1566The block form of C<eval> is now specifically trappable by C<Safe> and
1567C<ops>. Previously it was erroneously treated like string C<eval>.
1568
1569=item *
1570
1571In 5.10.0, the two characters C<[~> were sometimes parsed as the smart
1572match operator (C<~~>) [RT #63854].
1573
1574=item *
1575
1576In 5.10.0, the C<*> quantifier in patterns was sometimes treated as
1577C<{0,32767}> [RT #60034, #60464]. For example, this match would fail:
1578
1579 ("ab" x 32768) =~ /^(ab)*$/
1580
1581=item *
1582
1583C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924].
1584
1585=item *
1586
1587Using C<next> or C<last> to exit a C<given> block no longer produces a
1588spurious warning like the following:
1589
1590 Exiting given via last at foo.pl line 123
1591
1592=item *
1593
1594On Windows, C<'.\foo'> and C<'..\foo'> were treated differently than
1595C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492].
1596
1597=item *
1598
1599Assigning a format to a glob could corrupt the format; e.g.:
1600
1601 *bar=*foo{FORMAT}; # foo format now bad
1602
1603=item *
1604
1605Attempting to coerce a typeglob to a string or number could cause an
1606assertion failure. The correct error message is now generated,
1607C<Can't coerce GLOB to I<$type>>.
1608
1609=item *
1610
1611Under C<use filetest 'access'>, C<-x> was using the wrong access mode. This
1612has been fixed [RT #49003].
1613
1614=item *
1615
1616C<length> on a tied scalar that returned a Unicode value would not be
1617correct the first time. This has been fixed.
1618
1619=item *
1620
1621Using an array C<tie> inside in array C<tie> could SEGV. This has been
1622fixed. [RT #51636]
1623
1624=item *
1625
1626A race condition inside C<PerlIOStdio_close()> has been identified and
1627fixed. This used to cause various threading issues, including SEGVs.
1628
1629=item *
1630
1631In C<unpack>, the use of C<()> groups in scalar context was internally
1632placing a list on the interpreter's stack, which manifested in various
1633ways, including SEGVs. This is now fixed [RT #50256].
1634
1635=item *
1636
1637Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>.
1638These have all been fixed.
1639
1640=item *
1641
1642A 5.10.0 optimisation to clear the temporary stack within the implicit
1643loop of C<s///ge> has been reverted, as it turned out to be the cause of
c3e6c235 1644obscure bugs in seemingly unrelated parts of the interpreter [commit
5a00ee6a 1645ef0d4e17921ee3de].
1646
1647=item *
1648
1649The line numbers for warnings inside C<elsif> are now correct.
1650
1651=item *
1652
1653The C<..> operator now works correctly with ranges whose ends are at or
1654close to the values of the smallest and largest integers.
1655
1656=item *
1657
1658C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
1659This has been fixed [RT #54828].
1660
1661=item *
1662
1663An off-by-one error meant that C<index $str, ...> was effectively being
1664executed as C<index "$str\0", ...>. This has been fixed [RT #53746].
1665
1666=item *
1667
1668Various leaks associated with named captures in regexes have been fixed
1669[RT #57024].
1670
1671=item *
1672
1673A weak reference to a hash would leak. This was affecting C<DBI>
1674[RT #56908].
1675
1676=item *
1677
1678Using (?|) in a regex could cause a segfault [RT #59734].
1679
1680=item *
1681
1682Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520].
1683
1684=item *
1685
7a4b5c08 1686Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an
5a00ee6a 1687unaligned 64-bit access on the SPARC architecture [RT #60574].
1688
1689=item *
1690
1691In the 5.10.0 release, C<inc_version_list> would incorrectly list
1692C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order
1693[RT #67628].
1694
1695=item *
1696
1697In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value
1698[RT #52552].
1699
1700=item *
1701
1702In 5.10.0, C<printf> and C<sprintf> could produce the fatal error
1703C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings
1704[RT #62666].
1705
1706=item *
1707
1708In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be
1709missed (method cache issue) [RT #60220,60232].
1710
1711=item *
1712
1713In the 5.10.0 release, a combination of C<use feature> and C<//ee> could
1714cause a memory leak [RT #63110].
1715
1716=item *
1717
1718C<-C> on the shebang (C<#!>) line is once more permitted if it is also
1719specified on the command line. C<-C> on the shebang line used to be a
1720silent no-op I<if> it was not also on the command line, so perl 5.10.0
1721disallowed it, which broke some scripts. Now perl checks whether it is
1722also on the command line and only dies if it is not [RT #67880].
1723
1724=item *
1725
1726In 5.10.0, certain types of re-entrant regular expression could crash,
1727or cause the following assertion failure [RT #60508]:
1728
1729 Assertion rx->sublen >= (s - rx->subbeg) + i failed
1730
7f0da121 1731=item *
1732
1733Previously missing files from Unicode 5.1 Character Database are now included.
1734
01ad23f5 1735=item *
1736
1737C<TMPDIR> is now honored when opening an anonymous temporary file
1738
5a00ee6a 1739=back
1740
1741=head1 New or Changed Diagnostics
1742
1743=over 4
1744
1745=item C<panic: sv_chop %s>
1746
1747This new fatal error occurs when the C routine C<Perl_sv_chop()> was
1748passed a position that is not within the scalar's string buffer. This
1749could be caused by buggy XS code, and at this point recovery is not
1750possible.
1751
1752=item C<Can't locate package %s for the parents of %s>
1753
1754This warning has been removed. In general, it only got produced in
1755conjunction with other warnings, and removing it allowed an ISA lookup
1756optimisation to be added.
1757
1758=item C<v-string in use/require is non-portable>
1759
1760This warning has been removed.
1761
1762=item C<Deep recursion on subroutine "%s">
1763
1764It is now possible to change the depth threshold for this warning from the
1765default of 100, by recompiling the F<perl> binary, setting the C
1766pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
1767
1768=back
1769
1770=head1 Changed Internals
1771
1772=over 4
1773
1774=item *
1775
ef87f8cb 1776TODO: C<SVt_RV> is gone. RVs are now stored in IVs
1777
1778=item *
1779
1780TODO: REGEXPs are first class
1781
1782=item *
1783
1784TODO: OOK is reworked, such that an OOKed scalar is PV not PVIV
1785
1786=item *
1787
5a00ee6a 1788The J.R.R. Tolkien quotes at the head of C source file have been checked and
1789proper citations added, thanks to a patch from Tom Christiansen.
1790
1791=item *
1792
7a4b5c08 1793C<Perl_vcroak()> now accepts a null first argument. In addition, a full audit
5a00ee6a 1794was made of the "not NULL" compiler annotations, and those for several
1795other internal functions were corrected.
1796
1797=item *
1798
1799New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO>
1800have been added to formalise the temporary saving of the C<errno>
1801variable.
1802
1803=item *
1804
1805The function C<Perl_sv_insert_flags> has been added to augment
1806C<Perl_sv_insert>.
1807
1808=item *
1809
1810The function C<Perl_newSV_type(type)> has been added, equivalent to
1811C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>.
1812
1813=item *
1814
1815The function C<Perl_newSVpvn_flags()> has been added, equivalent to
1816C<Perl_newSVpvn()> and then performing the action relevant to the flag.
1817
1818Two flag bits are currently supported.
1819
1820=over 4
1821
1822=item C<SVf_UTF8>
1823
1824This will call C<SvUTF8_on()> for you. (Note that this does not convert an
1825sequence of ISO 8859-1 characters to UTF-8). A wrapper, C<newSVpvn_utf8()>
1826is available for this.
1827
1828=item C<SVs_TEMP>
1829
7a4b5c08 1830Call C<Perl_sv_2mortal()> on the new SV.
5a00ee6a 1831
1832=back
1833
1834There is also a wrapper that takes constant strings, C<newSVpvs_flags()>.
1835
1836=item *
1837
1838The function C<Perl_croak_xs_usage> has been added as a wrapper to
1839C<Perl_croak>.
1840
1841=item *
1842
1843The functions C<PerlIO_find_layer> and C<PerlIO_list_alloc> are now
1844exported.
1845
1846=item *
1847
1848C<PL_na> has been exterminated from the core code, replaced by local STRLEN
1849temporaries, or C<*_nolen()> calls. Either approach is faster than C<PL_na>,
1850which is a pointer deference into the interpreter structure under ithreads,
1851and a global variable otherwise.
1852
1853=item *
1854
7a4b5c08 1855C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()> on
5a00ee6a 1856the scalar. It now updates the linked list to remove each piece of magic
1857as it is freed.
1858
1859=item *
1860
1861Under ithreads, the regex in C<PL_reg_curpm> is now reference counted. This
1862eliminates a lot of hackish workarounds to cope with it not being reference
1863counted.
1864
1865=item *
1866
1867C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>.
1868This has been fixed.
1869
1870=item *
1871
1872The I<public> IV and NV flags are now not set if the string value has
1873trailing "garbage". This behaviour is consistent with not setting the
1874public IV or NV flags if the value is out of range for the type.
1875
1876=item *
1877
1878SV allocation tracing has been added to the diagnostics enabled by C<-Dm>.
1879The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if
1880that was enabled when the F<perl> binary was compiled.
1881
1882=item *
1883
d7ea0f56 1884Smartmatch resolution tracing has been added as a new diagnostic. Use C<-DM> to
1885enable it.
1886
7f0da121 1887
1888=item *
1889
1890A new debugging flag C<-DB> now dumps subroutine definitions, leaving
1891C<-Dx> for its original purpose of dumping syntax trees.
1892
d7ea0f56 1893=item *
1894
5a00ee6a 1895Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have been
1896replaced by C<NULL> in the core code, and non-dual-life modules, as C<NULL>
1897is clearer to those unfamiliar with the core code.
1898
1899=item *
1900
1901A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will
1902not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>,
1903C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without
1904casting away C<const>. This allows proper compile-time auditing of
1905C<const> correctness in the core, and helped picked up some errors (now
1906fixed).
1907
1908=item *
1909
1910Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the
1911stack and mortalizing them.
1912
1913=item *
1914
1915Use of the private structure C<mro_meta> has changed slightly. Nothing
1916outside the core should be accessing this directly anyway.
1917
1918=item *
1919
76e3c4a8 1920A new tool, F<Porting/expand-macro.pl> has been added, that allows you
5a00ee6a 1921to view how a C preprocessor macro would be expanded when compiled.
1922This is handy when trying to decode the macro hell that is the perl
1923guts.
1924
1925=back
1926
1927=head1 New Tests
1928
1929Many modules updated from CPAN incorporate new tests.
1930
1931Several tests that have the potential to hang forever if they fail now
1932incorporate a "watchdog" functionality that will kill them after a timeout,
1933which helps ensure that C<make test> and C<make test_harness> run to
1934completion automatically. (Jerry Hedden).
1935
1936Some core-specific tests have been added:
1937
1938=over 4
1939
1940=item t/comp/retainedlines.t
1941
1942Check that the debugger can retain source lines from C<eval>.
1943
1944=item t/io/perlio_fail.t
1945
1946Check that bad layers fail.
1947
1948=item t/io/perlio_leaks.t
1949
1950Check that PerlIO layers are not leaking.
1951
1952=item t/io/perlio_open.t
1953
1954Check that certain special forms of open work.
1955
1956=item t/io/perlio.t
1957
1958General PerlIO tests.
1959
1960=item t/io/pvbm.t
1961
1962Check that there is no unexpected interaction between the internal types
1963C<PVBM> and C<PVGV>.
1964
1965=item t/mro/package_aliases.t
1966
1967Check that mro works properly in the presence of aliased packages.
1968
1969=item t/op/dbm.t
1970
1971Tests for C<dbmopen> and C<dbmclose>.
1972
1973=item t/op/index_thr.t
1974
1975Tests for the interaction of C<index> and threads.
1976
1977=item t/op/pat_thr.t
1978
1979Tests for the interaction of esoteric patterns and threads.
1980
1981=item t/op/qr_gc.t
1982
1983Test that C<qr> doesn't leak.
1984
1985=item t/op/reg_email_thr.t
1986
1987Tests for the interaction of regex recursion and threads.
1988
1989=item t/op/regexp_qr_embed_thr.t
1990
1991Tests for the interaction of patterns with embedded C<qr//> and threads.
1992
1993=item t/op/regexp_unicode_prop.t
1994
1995Tests for Unicode properties in regular expressions.
1996
1997=item t/op/regexp_unicode_prop_thr.t
1998
1999Tests for the interaction of Unicode properties and threads.
2000
2001=item t/op/reg_nc_tie.t
2002
2003Test the tied methods of C<Tie::Hash::NamedCapture>.
2004
eeab323f 2005=item t/op/reg_posixcc.t
5a00ee6a 2006
2007Check that POSIX character classes behave consistently.
2008
2009=item t/op/re.t
2010
2011Check that exportable C<re> functions in F<universal.c> work.
2012
2013=item t/op/setpgrpstack.t
2014
2015Check that C<setpgrp> works.
2016
2017=item t/op/substr_thr.t
2018
2019Tests for the interaction of C<substr> and threads.
2020
2021=item t/op/upgrade.t
2022
2023Check that upgrading and assigning scalars works.
2024
2025=item t/uni/lex_utf8.t
2026
2027Check that Unicode in the lexer works.
2028
2029=item t/uni/tie.t
2030
2031Check that Unicode and C<tie> work.
2032
2033=back
2034
2035=head1 Known Problems
2036
2037This is a list of some significant unfixed bugs, which are regressions
2038from either 5.10.0 or 5.8.x.
2039
2040=over 4
2041
2042=item *
2043
2044C<List::Util::first> misbehaves in the presence of a lexical C<$_>
2045(typically introduced by C<my $_> or implicitly by C<given>). The variable
2046which gets set for each iteration is the package variable C<$_>, not the
2047lexical C<$_> [RT #67694].
2048
2049A similar issue may occur in other modules that provide functions which
2050take a block as their first argument, like
2051
2052 foo { ... $_ ...} list
2053
2054=item *
2055
2056The C<charnames> pragma may generate a run-time error when a regex is
2057interpolated [RT #56444]:
2058
2059 use charnames ':full';
2060 my $r1 = qr/\N{THAI CHARACTER SARA I}/;
2061 "foo" =~ $r1; # okay
2062 "foo" =~ /$r1+/; # runtime error
2063
2064A workaround is to generate the character outside of the regex:
2065
2066 my $a = "\N{THAI CHARACTER SARA I}";
2067 my $r1 = qr/$a/;
2068
2069=item *
2070
2071Some regexes may run much more slowly when run in a child thread compared
2072with the thread the pattern was compiled into [RT #55600].
2073
5a00ee6a 2074=back
2075
2076=head1 Deprecations
2077
2078The following items are now deprecated.
2079
2080=over 4
2081
2082=item *
2083
2084C<Switch> is buggy and should be avoided. From perl 5.11.0 onwards, it is
2085intended that any use of the core version of this module will emit a
2086warning, and that the module will eventually be removed from the core
2087(probably in perl 5.14.0). See L<perlsyn/"Switch statements"> for its
2088replacement.
2089
2090=item *
2091
0f97ff05 2092The following modules will be removed from the core distribution in a future
2093release, and should be installed from CPAN instead. Distributions on CPAN
2094which require these should add them to their prerequisites. The core versions
2095of these modules warnings will issue a deprecation warning.
2096
2097=over
2098
2099=item *
2100
3f369777 2101C<Class::ISA>
2102
2103=item *
2104
0f97ff05 2105C<Pod::Plainer>
2106
3f369777 2107=item *
2108
2109C<Shell>
2110
0f97ff05 2111=back
2112
20e7cb7b 2113Currently support to install from CPAN without a I<force> is C<TODO> in CPAN
2114and CPANPLUS. This will be addressed before 5.12.0 ships.
2115
0f97ff05 2116=item *
2117
ad1d1c50 2118C<suidperl> has been removed. It used to provide a mechanism to
5a00ee6a 2119emulate setuid permission bits on systems that don't support it properly.
2120
ad1d1c50 2121=item *
2122
2123Deprecate assignment to $[
2124
2125=item *
2126
2127Remove attrs, which has been deprecated since 1999/10/02.
2128
2129=item *
2130
2131Deprecate use of the attribute :locked on subroutines.
2132
2133=item *
2134
2135Deprecate using "locked" with the attributes pragma.
2136
2137=item *
2138
2139Deprecate using "unique" with the attributes pragma.
2140
2141=item *
2142
c3e6c235 2143warn if ++ or -- are unable to change the value because it's beyond the limit of representation
ad1d1c50 2144
2145This uses a new warnings category: "imprecision".
2146
ad1d1c50 2147=item *
2148
2149Make lc/uc/lcfirst/ucfirst warn when passed undef.
2150
2151=item *
2152
2153Show constant in "Useless use of a constant in void context"
2154
2155=item *
2156
2157Make the new warning report undef constants as undef
2158
2159=item *
2160
2161Add a new warning, "Prototype after '%s'"
2162
2163=item *
2164
2165Tweak the "Illegal character in prototype" warning so it's more precise when reporting illegal characters after _
2166
2167=item *
2168
2169Unintented interpolation of $\ in regex
2170
2171=item *
2172
2173Make overflow warnings in gmtime/localtime only occur when warnings are on
2174
2175=item *
2176
2177Improve mro merging error messages.
2178
2179They are now very similar to those produced by Algorithm::C3.
2180
2181=item *
2182
2183Amelioration of the error message "Unrecognized character %s in column %d"
2184
2185Changes the error message to "Unrecognized character %s; marked by <--
2186HERE after %s<-- HERE near column %d". This should make it a little
2187simpler to spot and correct the suspicious character.
2188
2189=item *
2190
2191Explicitely point to $. when it causes an uninitialized warning for ranges in scalar context
2192
d7ea0f56 2193=item *
2194
2195Removed vestigal support for Tenon Intersystems MachTen Unix layer for MacOS Classic.
c3e6c235 2196
d7ea0f56 2197=item *
2198
2199Removed the port to Atari MiNT. It's a dead platform that hasn't had any love since 5.005.
2200
2201
c3e6c235 2202=item *
d7ea0f56 2203
2204Deprecated numerous Perl 4-era libraries:
2205
2206F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>,
2207F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>,
2208F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>,
2209F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>,
2210F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>,
2211F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and
2212F<timelocal.pl> are all now deprecated. Using them will incur a warning.
2213
5a00ee6a 2214=back
2215
2216=head1 Acknowledgements
2217
0cd7f36e 2218Some of the work in this release was funded by a TPF grant funded by
2219Dijkmat BV, The Netherlands.
5a00ee6a 2220
2221Steffen Mueller and David Golden in particular helped getting CPAN modules
2222polished and synchronised with their in-core equivalents.
2223
2224Craig Berry was tireless in getting maint to run under VMS, no matter how
2225many times we broke it for him.
2226
2227The other core committers contributed most of the changes, and applied most
2228of the patches sent in by the hundreds of contributors listed in F<AUTHORS>.
7120b314 2229
ad1d1c50 2230Much of the work of categorizing changes in this perldelta file was contributed
2231by the following porters using changelogger.bestpractical.com:
2232
2233Nicholas Clark, leon, shawn, alexm, rjbs, rafl, Pedro Melo, brunorc,
2234anonymous, ☄, Tom Hukins, anonymous, Jesse, dagolden, Moritz Onken,
2235Mark Fowler, chorny, anonymous, tmtm
2236
5a00ee6a 2237Finally, thanks to Larry Wall, without whom none of this would be
2238necessary.
7120b314 2239
2240=head1 Reporting Bugs
2241
2242If you find what you think is a bug, you might check the articles
2243recently posted to the comp.lang.perl.misc newsgroup and the perl
5a00ee6a 2244bug database at http://rt.perl.org/perlbug/ . There may also be
7120b314 2245information at http://www.perl.org/ , the Perl Home Page.
2246
2247If you believe you have an unreported bug, please run the B<perlbug>
2248program included with your release. Be sure to trim your bug down
2249to a tiny but sufficient test case. Your bug report, along with the
2250output of C<perl -V>, will be sent off to perlbug@perl.org to be
2251analysed by the Perl porting team.
2252
49f8307e 2253If the bug you are reporting has security implications, which make it
2254inappropriate to send to a publicly archived mailing list, then please send
2255it to perl5-security-report@perl.org. This points to a closed subscription
2256unarchived mailing list, which includes all the core committers, who be able
2257to help assess the impact of issues, figure out a resolution, and help
2258co-ordinate the release of patches to mitigate or fix the problem across all
5a00ee6a 2259platforms on which Perl is supported. Please only use this address for
2260security issues in the Perl core, not for modules independently
2261distributed on CPAN.
49f8307e 2262
7120b314 2263=head1 SEE ALSO
2264
5a00ee6a 2265The F<Changes> file for an explanation of how to view exhaustive details
2266on what changed.
7120b314 2267
2268The F<INSTALL> file for how to build Perl.
2269
2270The F<README> file for general stuff.
2271
2272The F<Artistic> and F<Copying> files for copyright information.
2273
2274=cut
ad1d1c50 2275
2276