This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: rewording
[perl5.git] / pod / perl5110delta.pod
CommitLineData
fa7da8f7
NC
1=encoding utf8
2
7120b314
NC
3=head1 NAME
4
5a00ee6a 5perl5110delta - what is new for perl v5.11.0
7120b314
NC
6
7=head1 DESCRIPTION
8
5a00ee6a
JV
9This document describes differences between the 5.10.0 release and
10the 5.11.0 development release.
7120b314
NC
11
12=head1 Incompatible Changes
13
6fa80ea2
YO
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
c69ca1d4 35change them to the relevant property name (by removing the word 'Posix' from the current name).
6fa80ea2
YO
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
c69ca1d4 66to true your environment when testing.
6fa80ea2
YO
67
68
c3e6c235
JV
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
RGS
74=head2 Switch statement changes
75
76The handling of complex expressions by the C<given>/C<when> switch
a98ccf1e
NC
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
RGS
80in a smart match:
81
82=over 4
83
8b8da387
RGS
84=item flip-flop operators
85
98814a2b
RGS
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
JV
97 when (/^=begin/ .. /^=end/) {
98 # do something
99 }
8b8da387
RGS
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
RGS
111the smart match operator, that naturally also modify the behaviour
112of the switch statements where smart matching is implicitly used.
a98ccf1e
NC
113These changers were also made for the 5.10.1 release, and will remain in
114subsequent 5.10 releases.
8b8da387
RGS
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
RGS
123consistency or usefulness in several cases. While the general backwards
124compatibility is maintained, several changes must be noted:
8b8da387
RGS
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
RGS
138array), instead of passing the whole hash or array as a reference to
139the subroutine.
140
141=item *
142
ee18cc6c
RGS
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
RGS
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
RGS
173across arrays is not broken, as well as the other behaviours with complex
174types (coderefs, hashes, regexes). Thus, writers of overloading routines
ee18cc6c
RGS
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
RGS
178
179C<~~> will now refuse to work on objects that do not overload it (in order
665f5e98
RGS
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
RGS
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
RGS
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
JV
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
NC
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
JV
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
JV
259=item *
260
261C<length undef> now returns undef.
262
7f0da121
JV
263=item *
264
265Unsupported private C API functions are now declared "static" to prevent
c3e6c235 266leakage to Perl's public API.
7f0da121
JV
267
268=item *
269
c3e6c235
JV
270To support the bootstrapping process, F<miniperl> no longer builds with
271UTF-8 support in the regexp engine.
272
7f0da121
JV
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
JV
281=item *
282
283A space or a newline is now required after a C<"#line XXX"> directive.
284
fd99c0b9
JV
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
JV
293=back
294
7120b314
NC
295=head1 Core Enhancements
296
5a00ee6a
JV
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
JV
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
JV
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
RGS
313
314This pragma allows you to lexically disable or enable overloading
315for some or all operations. (Yuval Kogman)
316
71e9c532
RGS
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
RGS
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
NC
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
JV
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
RGS
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
JV
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
JV
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
JV
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
278eac9e 385=head2 C<$,> flexibility
c3e6c235
JV
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
JV
397=head2 C<delete local>
398
e74a3e73 399C<delete local> now allows you to locally delete a hash entry.
c3e6c235
JV
400
401=head2 New support for Abstract namespace sockets
7f0da121 402
7f0da121
JV
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
NC
409=head1 Modules and Pragmata
410
7f0da121
JV
411=head2 Dual-lifed modules moved
412
18fd877a 413Dual-lifed modules maintained primarily in the Perl core now live in dist/.
7f0da121
JV
414Dual-lifed modules maintained primarily on CPAN now live in cpan/
415
07e28eec 416In previous releases of Perl, it was customary to enumerate all module
6c79d1d2
JV
417changes in this section of the C<perldelta> file. From 5.11.0 forward
418only notable updates (such as new or deprecated modules ) will be
07e28eec 419listed in this section. For a complete reference to the versions of
6c79d1d2
JV
420modules shipped in a given release of perl, please see L<Module::CoreList>.
421
5a00ee6a
JV
422=head2 New Modules and Pragmata
423
424=over 4
425
426=item C<autodie>
427
428This is a new lexically-scoped alternative for the C<Fatal> module.
429The bundled version is 2.06_01. Note that in this release, using a string
430eval when C<autodie> is in effect can cause the autodie behaviour to leak
431into the surrounding scope. See L<autodie/"BUGS"> for more details.
432
433=item C<Compress::Raw::Bzip2>
434
435This has been added to the core (version 2.020).
436
437=item C<parent>
438
439This pragma establishes an ISA relationship with base classes at compile
440time. It provides the key feature of C<base> without the feature creep.
441
442=item C<Parse::CPAN::Meta>
443
444This has been added to the core (version 1.39).
445
446=back
447
1839a850
RGS
448=head2 Pragmata Changes
449
450=over 4
451
452=item C<overloading>
453
454See L</"The C<overloading> pragma"> above.
455
5a00ee6a
JV
456=item C<attrs>
457
42f099ed
NC
458The C<attrs> pragma has been removed. It had been marked as deprecated since
4595.6.0.
5a00ee6a 460
5a00ee6a
JV
461=item C<charnames>
462
5a00ee6a
JV
463The Unicode F<NameAliases.txt> database file has been added. This has the
464effect of adding some extra C<\N> character names that formerly wouldn't
465have been recognised; for example, C<"\N{LATIN CAPITAL LETTER GHA}">.
466
5a00ee6a
JV
467=item C<feature>
468
469The meaning of the C<:5.10> and C<:5.10.X> feature bundles has
470changed slightly. The last component, if any (i.e. C<X>) is simply ignored.
471This is predicated on the assumption that new features will not, in
472general, be added to maintenance releases. So C<:5.10> and C<:5.10.X>
473have identical effect. This is a change to the behaviour documented for
4745.10.0.
475
f7fa8439
NC
476=item C<mro>
477
478Upgraded from version 1.00 to 1.01. Performance for single inheritance is 40%
479faster - see L</"Performance Enhancements"> below.
480
481C<mro> is now implemented as an XS extension. The documented interface has not
482changed. Code relying on the implementation detail that some C<mro::>
483methods happened to be available at all times gets to "keep both pieces".
484
1839a850
RGS
485=back
486
5a00ee6a 487=head2 Updated Modules
02569b83
RGS
488
489=over 4
490
5a00ee6a
JV
491=item C<ExtUtils::MakeMaker>
492
493Upgraded from version 6.42 to 6.55_02.
494
495Note that C<ExtUtils::MakeMaker::bytes> and C<ExtUtils::MakeMaker::vmsish>
496have been removed from this distribution.
497
5a00ee6a
JV
498=item C<Test::Harness>
499
500Upgraded from version 2.64 to 3.17.
501
502Note that one side-effect of the 2.x to 3.x upgrade is that the
503experimental C<Test::Harness::Straps> module (and its supporting
504C<Assert>, C<Iterator>, C<Point> and C<Results> modules) have been
505removed. If you still need this, then they are available in the
506(unmaintained) C<Test-Harness-Straps> distribution on CPAN.
507
5a00ee6a
JV
508=item C<UNIVERSAL>
509
510Upgraded from version 1.04 to 1.05.
511
07e28eec 512C<< UNIVERSAL-E<gt>import() >> is now deprecated.
ad1d1c50 513
5a00ee6a
JV
514=back
515
516=head1 Utility Changes
517
518=over 4
519
520=item F<h2ph>
521
522Now looks in C<include-fixed> too, which is a recent addition to gcc's
523search path.
524
525=item F<h2xs>
526
527No longer incorrectly treats enum values like macros (Daniel Burr).
528
529Now handles C++ style constants (C<//>) properly in enums. (A patch from
530Rainer Weikusat was used; Daniel Burr also proposed a similar fix).
531
532=item F<perl5db.pl>
533
534C<LVALUE> subroutines now work under the debugger.
535
536The debugger now correctly handles proxy constant subroutines, and
537subroutine stubs.
538
ad1d1c50
JV
539=item F<perlbug>
540
038a5866 541F<perlbug> now uses C<%Module::CoreList::bug_tracker> to print out upstream bug
76e3c4a8 542tracker URLs.
ad1d1c50
JV
543
544Where the user names a module that their bug report is about, and we know the
545URL for its upstream bug tracker, provide a message to the user explaining
546that the core copies the CPAN version directly, and provide the URL for
547reporting the bug directly to upstream.
548
5a00ee6a
JV
549=item F<perlthanks>
550
3141b5e1 551Perl 5.11.0 added a new utility F<perlthanks>, which is a variant of
5a00ee6a
JV
552F<perlbug>, but for sending non-bug-reports to the authors and maintainers
553of Perl. Getting nothing but bug reports can become a bit demoralising:
554we'll see if this changes things.
555
556=back
557
558=head1 New Documentation
559
560=over 4
561
562=item L<perlhaiku>
563
564This contains instructions on how to build perl for the Haiku platform.
565
566=item L<perlmroapi>
567
568This describes the new interface for pluggable Method Resolution Orders.
569
570=item L<perlperf>
571
572This document, by Richard Foley, provides an introduction to the use of
573performance and optimization techniques which can be used with particular
574reference to perl programs.
575
576=item L<perlrepository>
577
578This describes how to access the perl source using the I<git> version
579control system.
580
5a00ee6a
JV
581=back
582
583=head1 Changes to Existing Documentation
584
76e3c4a8 585The various large F<Changes*> files (which listed every change made to perl
5a00ee6a 586over the last 18 years) have been removed, and replaced by a small file,
76e3c4a8 587also called F<Changes>, which just explains how that same information may
5a00ee6a
JV
588be extracted from the git version control system.
589
590The file F<Porting/patching.pod> has been deleted, as it mainly described
591interacting with the old Perforce-based repository, which is now obsolete.
592Information still relevant has been moved to L<perlrepository>.
593
594L<perlapi>, L<perlintern>, L<perlmodlib> and L<perltoc> are now all
595generated at build time, rather than being shipped as part of the release.
596
c3e6c235 597=over
ad1d1c50 598
c3e6c235 599=item *
ad1d1c50 600
c3e6c235 601Documented -X overloading.
ad1d1c50 602
c3e6c235 603=item *
ad1d1c50 604
c3e6c235 605Documented that C<when()> treats specially most of the filetest operators
ad1d1c50 606
c3e6c235
JV
607=item *
608
609Documented when as a syntax modifier
610
611=item *
612
613Eliminated "Old Perl threads tutorial", which describes 5005 threads.
614
615F<pod/perlthrtut.pod> is the same material reworked for ithreads.
616
617=item *
618
619Correct previous documentation: v-strings are not deprecated
ad1d1c50
JV
620
621With version objects, we need them to use MODULE VERSION syntax. This
622patch removes the deprecation note.
623
c3e6c235
JV
624=item *
625
626Added security contact information to L<perlsec>
627
628=back
7f0da121 629
5a00ee6a
JV
630=head1 Performance Enhancements
631
c3e6c235 632
5a00ee6a
JV
633=over 4
634
635=item *
636
637A new internal cache means that C<isa()> will often be faster.
638
639=item *
640
6f54462f 641The implementation of C<C3> Method Resolution Order has been optimised -
c3e6c235 642linearisation for classes with single inheritance is 40% faster. Performance
6f54462f
NC
643for multiple inheritance is unchanged.
644
645=item *
646
5a00ee6a
JV
647Under C<use locale>, the locale-relevant information is now cached on
648read-only values, such as the list returned by C<keys %hash>. This makes
649operations such as C<sort keys %hash> in the scope of C<use locale> much
650faster.
651
652=item *
653
654Empty C<DESTROY> methods are no longer called.
655
ad1d1c50
JV
656=item *
657
7a4b5c08 658Faster C<Perl_sv_utf8_upgrade()>
ad1d1c50
JV
659
660=item *
661
7a4b5c08 662Speed up C<keys> on empty hash
ad1d1c50 663
5a00ee6a
JV
664=back
665
666=head1 Installation and Configuration Improvements
667
668=head2 F<ext/> reorganisation
669
670The layout of directories in F<ext> has been revised. Specifically, all
671extensions are now flat, and at the top level, with C</> in pathnames
672replaced by C<->, so that F<ext/Data/Dumper/> is now F<ext/Data-Dumper/>,
673etc. The names of the extensions as specified to F<Configure>, and as
674reported by C<%Config::Config> under the keys C<dynamic_ext>,
675C<known_extensions>, C<nonxs_ext> and C<static_ext> have not changed, and
676still use C</>. Hence this change will not have any affect once perl is
429ee0aa 677installed. C<Safe> has been split out from being part of C<Opcode>, and
c3e6c235 678C<mro> is now an extension in its own right.
429ee0aa
NC
679
680Nearly all dual-life modules have been moved from F<lib> to F<ext>, and will
681now appear as known C<nonxs_ext>. This will made no difference to the
682structure of an installed perl, nor will the modules installed differ,
683unless you run F<Configure> with options to specify an exact list of
684extensions to build. In this case, you will rapidly become aware that you
685need to add to your list, because various modules needed to complete the
686build, such as C<ExtUtils::ParseXS>, have now become extensions, and
687without them the build will fail well before it attempts to run the
688regression tests.
5a00ee6a
JV
689
690=head2 Configuration improvements
691
692If C<vendorlib> and C<vendorarch> are the same, then they are only added to
693C<@INC> once.
694
695C<$Config{usedevel}> and the C-level C<PERL_USE_DEVEL> are now defined if
696perl is built with C<-Dusedevel>.
697
698F<Configure> will enable use of C<-fstack-protector>, to provide protection
699against stack-smashing attacks, if the compiler supports it.
700
701F<Configure> will now determine the correct prototypes for re-entrant
702functions, and for C<gconvert>, if you are using a C++ compiler rather
703than a C compiler.
704
705On Unix, if you build from a tree containing a git repository, the
706configuration process will note the commit hash you have checked out, for
707display in the output of C<perl -v> and C<perl -V>. Unpushed local commits
708are automatically added to the list of local patches displayed by
709C<perl -V>.
710
711=head2 Compilation improvements
712
713As part of the flattening of F<ext>, all extensions on all platforms are
714built by F<make_ext.pl>. This replaces the Unix-specific
715F<ext/util/make_ext>, VMS-specific F<make_ext.com> and Win32-specific
716F<win32/buildext.pl>.
717
718=head2 Platform Specific Changes
719
720=over 4
721
722=item AIX
723
7a4b5c08 724Removed F<libbsd> for AIX 5L and 6.1. Only C<flock()> was used from F<libbsd>.
5a00ee6a
JV
725
726Removed F<libgdbm> for AIX 5L and 6.1. The F<libgdbm> is delivered as an
c3e6c235 727optional package with the AIX Toolbox. Unfortunately the 64 bit version
5a00ee6a
JV
728is broken.
729
730Hints changes mean that AIX 4.2 should work again.
731
732=item Cygwin
733
734On Cygwin we now strip the last number from the DLL. This has been the
735behaviour in the cygwin.com build for years. The hints files have been
736updated.
737
81afb674
JV
738=item DomainOS
739
740Support for Apollo DomainOS was removed in Perl 5.11.0
741
5a00ee6a
JV
742=item FreeBSD
743
744The hints files now identify the correct threading libraries on FreeBSD 7
745and later.
746
747=item Irix
748
749We now work around a bizarre preprocessor bug in the Irix 6.5 compiler:
750C<cc -E -> unfortunately goes into K&R mode, but C<cc -E file.c> doesn't.
751
752=item Haiku
753
754Patches from the Haiku maintainers have been merged in. Perl should now
755build on Haiku.
756
7e35aa2a
JV
757=item MachTen
758
759Support for Tenon Intersystems MachTen Unix layer for MacOS Classic was
760removed in Perl 5.11.0
761
81afb674
JV
762=item MiNT
763
764Support for Atari MiNT was removed in Perl 5.11.0.
765
5a00ee6a
JV
766=item MirOS BSD
767
768Perl should now build on MirOS BSD.
769
770=item NetBSD
771
772Hints now supports versions 5.*.
773
774=item Stratus VOS
775
776Various changes from Stratus have been merged in.
777
778=item Symbian
779
780There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
781
782=item Win32
783
784Improved message window handling means that C<alarm> and C<kill> messages
785will no longer be dropped under race conditions.
786
787=item VMS
788
789Reads from the in-memory temporary files of C<PerlIO::scalar> used to fail
790if C<$/> was set to a numeric reference (to indicate record-style reads).
791This is now fixed.
792
793VMS now supports C<getgrgid>.
794
795Many improvements and cleanups have been made to the VMS file name handling
796and conversion code.
797
798Enabling the C<PERL_VMS_POSIX_EXIT> logical name now encodes a POSIX exit
799status in a VMS condition value for better interaction with GNV's bash
800shell and other utilities that depend on POSIX exit values. See
801L<perlvms/"$?"> for details.
802
76e3c4a8 803C<File::Copy> now detects Unix compatibility mode on VMS.
ad1d1c50 804
5a00ee6a
JV
805=back
806
807=head1 Selected Bug Fixes
808
809=over 4
810
038a5866 811=item *
5a00ee6a 812
ce979e27 813C<-I> on shebang line now adds directories in front of @INC
5a00ee6a 814as documented, and as does C<-I> when specified on the command-line.
5a00ee6a 815
76e3c4a8 816=item *
5a00ee6a 817
76e3c4a8 818C<kill> is now fatal when called on non-numeric process identifiers.
5a00ee6a
JV
819Previously, an 'undef' process identifier would be interpreted as a request to
820kill process "0", which would terminate the current process group on POSIX
821systems. Since process identifiers are always integers, killing a non-numeric
822process is now fatal.
823
824=item *
825
8265.10.0 inadvertently disabled an optimisation, which caused a measurable
827performance drop in list assignment, such as is often used to assign
828function parameters from C<@_>. The optimisation has been re-instated, and
829the performance regression fixed.
830
831=item *
832
833Fixed memory leak on C<while (1) { map 1, 1 }> [RT #53038].
834
835=item *
836
837Some potential coredumps in PerlIO fixed [RT #57322,54828].
838
839=item *
840
841The debugger now works with lvalue subroutines.
842
843=item *
844
845The debugger's C<m> command was broken on modules that defined constants
846[RT #61222].
847
848=item *
849
7a4b5c08 850C<crypt> and string complement could return tainted values for untainted
5a00ee6a
JV
851arguments [RT #59998].
852
853=item *
854
038a5866 855The C<-i>I<.suffix> command-line switch now recreates the file using
5a00ee6a
JV
856restricted permissions, before changing its mode to match the original
857file. This eliminates a potential race condition [RT #60904].
858
859=item *
860
e1020413 861On some Unix systems, the value in C<$?> would not have the top bit set
5a00ee6a
JV
862(C<$? & 128>) even if the child core dumped.
863
864=item *
865
038a5866 866Under some circumstances, C<$^R> could incorrectly become undefined
5a00ee6a
JV
867[RT #57042].
868
869=item *
870
a048364f
NC
871In the XS API, various hash functions, when passed a pre-computed hash where
872the key is UTF-8, might result in an incorrect lookup.
5a00ee6a
JV
873
874=item *
875
a048364f 876XS code including F<XSUB.h> before F<perl.h> gave a compile-time error
5a00ee6a
JV
877[RT #57176].
878
879=item *
880
07e28eec 881C<< $object-E<gt>isa('Foo') >> would report false if the package C<Foo> didn't
5a00ee6a
JV
882exist, even if the object's C<@ISA> contained C<Foo>.
883
884=item *
885
886Various bugs in the new-to 5.10.0 mro code, triggered by manipulating
887C<@ISA>, have been found and fixed.
888
889=item *
890
891Bitwise operations on references could crash the interpreter, e.g.
892C<$x=\$y; $x |= "foo"> [RT #54956].
893
894=item *
895
896Patterns including alternation might be sensitive to the internal UTF-8
897representation, e.g.
898
899 my $byte = chr(192);
900 my $utf8 = chr(192); utf8::upgrade($utf8);
901 $utf8 =~ /$byte|X}/i; # failed in 5.10.0
902
903=item *
904
905Within UTF8-encoded Perl source files (i.e. where C<use utf8> is in
906effect), double-quoted literal strings could be corrupted where a C<\xNN>,
907C<\0NNN> or C<\N{}> is followed by a literal character with ordinal value
908greater than 255 [RT #59908].
909
910=item *
911
912C<B::Deparse> failed to correctly deparse various constructs:
913C<readpipe STRING> [RT #62428], C<CORE::require(STRING)> [RT #62488],
914C<sub foo(_)> [RT #62484].
915
916=item *
917
7a4b5c08 918Using C<setpgrp> with no arguments could corrupt the perl stack.
5a00ee6a
JV
919
920=item *
921
922The block form of C<eval> is now specifically trappable by C<Safe> and
923C<ops>. Previously it was erroneously treated like string C<eval>.
924
925=item *
926
927In 5.10.0, the two characters C<[~> were sometimes parsed as the smart
928match operator (C<~~>) [RT #63854].
929
930=item *
931
932In 5.10.0, the C<*> quantifier in patterns was sometimes treated as
933C<{0,32767}> [RT #60034, #60464]. For example, this match would fail:
934
935 ("ab" x 32768) =~ /^(ab)*$/
936
937=item *
938
939C<shmget> was limited to a 32 bit segment size on a 64 bit OS [RT #63924].
940
941=item *
942
943Using C<next> or C<last> to exit a C<given> block no longer produces a
944spurious warning like the following:
945
946 Exiting given via last at foo.pl line 123
947
948=item *
949
950On Windows, C<'.\foo'> and C<'..\foo'> were treated differently than
951C<'./foo'> and C<'../foo'> by C<do> and C<require> [RT #63492].
952
953=item *
954
955Assigning a format to a glob could corrupt the format; e.g.:
956
957 *bar=*foo{FORMAT}; # foo format now bad
958
959=item *
960
961Attempting to coerce a typeglob to a string or number could cause an
962assertion failure. The correct error message is now generated,
963C<Can't coerce GLOB to I<$type>>.
964
965=item *
966
967Under C<use filetest 'access'>, C<-x> was using the wrong access mode. This
968has been fixed [RT #49003].
969
970=item *
971
972C<length> on a tied scalar that returned a Unicode value would not be
973correct the first time. This has been fixed.
974
975=item *
976
977Using an array C<tie> inside in array C<tie> could SEGV. This has been
978fixed. [RT #51636]
979
980=item *
981
982A race condition inside C<PerlIOStdio_close()> has been identified and
983fixed. This used to cause various threading issues, including SEGVs.
984
985=item *
986
987In C<unpack>, the use of C<()> groups in scalar context was internally
988placing a list on the interpreter's stack, which manifested in various
989ways, including SEGVs. This is now fixed [RT #50256].
990
991=item *
992
993Magic was called twice in C<substr>, C<\&$x>, C<tie $x, $m> and C<chop>.
994These have all been fixed.
995
996=item *
997
998A 5.10.0 optimisation to clear the temporary stack within the implicit
999loop of C<s///ge> has been reverted, as it turned out to be the cause of
c3e6c235 1000obscure bugs in seemingly unrelated parts of the interpreter [commit
5a00ee6a
JV
1001ef0d4e17921ee3de].
1002
1003=item *
1004
1005The line numbers for warnings inside C<elsif> are now correct.
1006
1007=item *
1008
1009The C<..> operator now works correctly with ranges whose ends are at or
1010close to the values of the smallest and largest integers.
1011
1012=item *
1013
1014C<binmode STDIN, ':raw'> could lead to segmentation faults on some platforms.
1015This has been fixed [RT #54828].
1016
1017=item *
1018
1019An off-by-one error meant that C<index $str, ...> was effectively being
1020executed as C<index "$str\0", ...>. This has been fixed [RT #53746].
1021
1022=item *
1023
1024Various leaks associated with named captures in regexes have been fixed
1025[RT #57024].
1026
1027=item *
1028
1029A weak reference to a hash would leak. This was affecting C<DBI>
1030[RT #56908].
1031
1032=item *
1033
1034Using (?|) in a regex could cause a segfault [RT #59734].
1035
1036=item *
1037
1038Use of a UTF-8 C<tr//> within a closure could cause a segfault [RT #61520].
1039
1040=item *
1041
7a4b5c08 1042Calling C<Perl_sv_chop()> or otherwise upgrading an SV could result in an
5a00ee6a
JV
1043unaligned 64-bit access on the SPARC architecture [RT #60574].
1044
1045=item *
1046
1047In the 5.10.0 release, C<inc_version_list> would incorrectly list
1048C<5.10.*> after C<5.8.*>; this affected the C<@INC> search order
1049[RT #67628].
1050
1051=item *
1052
1053In 5.10.0, C<pack "a*", $tainted_value> returned a non-tainted value
1054[RT #52552].
1055
1056=item *
1057
1058In 5.10.0, C<printf> and C<sprintf> could produce the fatal error
1059C<panic: utf8_mg_pos_cache_update> when printing UTF-8 strings
1060[RT #62666].
1061
1062=item *
1063
1064In the 5.10.0 release, a dynamically created C<AUTOLOAD> method might be
1065missed (method cache issue) [RT #60220,60232].
1066
1067=item *
1068
1069In the 5.10.0 release, a combination of C<use feature> and C<//ee> could
1070cause a memory leak [RT #63110].
1071
1072=item *
1073
1074C<-C> on the shebang (C<#!>) line is once more permitted if it is also
1075specified on the command line. C<-C> on the shebang line used to be a
1076silent no-op I<if> it was not also on the command line, so perl 5.10.0
1077disallowed it, which broke some scripts. Now perl checks whether it is
1078also on the command line and only dies if it is not [RT #67880].
1079
1080=item *
1081
1082In 5.10.0, certain types of re-entrant regular expression could crash,
1083or cause the following assertion failure [RT #60508]:
1084
1085 Assertion rx->sublen >= (s - rx->subbeg) + i failed
1086
7f0da121
JV
1087=item *
1088
1089Previously missing files from Unicode 5.1 Character Database are now included.
1090
01ad23f5
JV
1091=item *
1092
1093C<TMPDIR> is now honored when opening an anonymous temporary file
1094
5a00ee6a
JV
1095=back
1096
1097=head1 New or Changed Diagnostics
1098
1099=over 4
1100
1101=item C<panic: sv_chop %s>
1102
1103This new fatal error occurs when the C routine C<Perl_sv_chop()> was
1104passed a position that is not within the scalar's string buffer. This
1105could be caused by buggy XS code, and at this point recovery is not
1106possible.
1107
1108=item C<Can't locate package %s for the parents of %s>
1109
1110This warning has been removed. In general, it only got produced in
1111conjunction with other warnings, and removing it allowed an ISA lookup
1112optimisation to be added.
1113
1114=item C<v-string in use/require is non-portable>
1115
1116This warning has been removed.
1117
1118=item C<Deep recursion on subroutine "%s">
1119
1120It is now possible to change the depth threshold for this warning from the
1121default of 100, by recompiling the F<perl> binary, setting the C
1122pre-processor macro C<PERL_SUB_DEPTH_WARN> to the desired value.
1123
1124=back
1125
1126=head1 Changed Internals
1127
1128=over 4
1129
1130=item *
1131
ef87f8cb
NC
1132TODO: C<SVt_RV> is gone. RVs are now stored in IVs
1133
1134=item *
1135
1136TODO: REGEXPs are first class
1137
1138=item *
1139
1140TODO: OOK is reworked, such that an OOKed scalar is PV not PVIV
1141
1142=item *
1143
5a00ee6a
JV
1144The J.R.R. Tolkien quotes at the head of C source file have been checked and
1145proper citations added, thanks to a patch from Tom Christiansen.
1146
1147=item *
1148
7a4b5c08 1149C<Perl_vcroak()> now accepts a null first argument. In addition, a full audit
5a00ee6a
JV
1150was made of the "not NULL" compiler annotations, and those for several
1151other internal functions were corrected.
1152
1153=item *
1154
1155New macros C<dSAVEDERRNO>, C<dSAVE_ERRNO>, C<SAVE_ERRNO>, C<RESTORE_ERRNO>
1156have been added to formalise the temporary saving of the C<errno>
1157variable.
1158
1159=item *
1160
1161The function C<Perl_sv_insert_flags> has been added to augment
1162C<Perl_sv_insert>.
1163
1164=item *
1165
1166The function C<Perl_newSV_type(type)> has been added, equivalent to
1167C<Perl_newSV()> followed by C<Perl_sv_upgrade(type)>.
1168
1169=item *
1170
1171The function C<Perl_newSVpvn_flags()> has been added, equivalent to
1172C<Perl_newSVpvn()> and then performing the action relevant to the flag.
1173
1174Two flag bits are currently supported.
1175
1176=over 4
1177
1178=item C<SVf_UTF8>
1179
1180This will call C<SvUTF8_on()> for you. (Note that this does not convert an
1181sequence of ISO 8859-1 characters to UTF-8). A wrapper, C<newSVpvn_utf8()>
1182is available for this.
1183
1184=item C<SVs_TEMP>
1185
7a4b5c08 1186Call C<Perl_sv_2mortal()> on the new SV.
5a00ee6a
JV
1187
1188=back
1189
1190There is also a wrapper that takes constant strings, C<newSVpvs_flags()>.
1191
1192=item *
1193
1194The function C<Perl_croak_xs_usage> has been added as a wrapper to
1195C<Perl_croak>.
1196
1197=item *
1198
1199The functions C<PerlIO_find_layer> and C<PerlIO_list_alloc> are now
1200exported.
1201
1202=item *
1203
1204C<PL_na> has been exterminated from the core code, replaced by local STRLEN
1205temporaries, or C<*_nolen()> calls. Either approach is faster than C<PL_na>,
1206which is a pointer deference into the interpreter structure under ithreads,
1207and a global variable otherwise.
1208
1209=item *
1210
7a4b5c08 1211C<Perl_mg_free()> used to leave freed memory accessible via C<SvMAGIC()> on
5a00ee6a
JV
1212the scalar. It now updates the linked list to remove each piece of magic
1213as it is freed.
1214
1215=item *
1216
1217Under ithreads, the regex in C<PL_reg_curpm> is now reference counted. This
1218eliminates a lot of hackish workarounds to cope with it not being reference
1219counted.
1220
1221=item *
1222
1223C<Perl_mg_magical()> would sometimes incorrectly turn on C<SvRMAGICAL()>.
1224This has been fixed.
1225
1226=item *
1227
1228The I<public> IV and NV flags are now not set if the string value has
1229trailing "garbage". This behaviour is consistent with not setting the
1230public IV or NV flags if the value is out of range for the type.
1231
1232=item *
1233
1234SV allocation tracing has been added to the diagnostics enabled by C<-Dm>.
1235The tracing can alternatively output via the C<PERL_MEM_LOG> mechanism, if
1236that was enabled when the F<perl> binary was compiled.
1237
1238=item *
1239
d7ea0f56
JV
1240Smartmatch resolution tracing has been added as a new diagnostic. Use C<-DM> to
1241enable it.
1242
7f0da121
JV
1243
1244=item *
1245
1246A new debugging flag C<-DB> now dumps subroutine definitions, leaving
1247C<-Dx> for its original purpose of dumping syntax trees.
1248
d7ea0f56
JV
1249=item *
1250
5a00ee6a
JV
1251Uses of C<Nullav>, C<Nullcv>, C<Nullhv>, C<Nullop>, C<Nullsv> etc have been
1252replaced by C<NULL> in the core code, and non-dual-life modules, as C<NULL>
1253is clearer to those unfamiliar with the core code.
1254
1255=item *
1256
1257A macro C<MUTABLE_PTR(p)> has been added, which on (non-pedantic) gcc will
1258not cast away C<const>, returning a C<void *>. Macros C<MUTABLE_SV(av)>,
1259C<MUTABLE_SV(cv)> etc build on this, casting to C<AV *> etc without
1260casting away C<const>. This allows proper compile-time auditing of
1261C<const> correctness in the core, and helped picked up some errors (now
1262fixed).
1263
1264=item *
1265
1266Macros C<mPUSHs()> and C<mXPUSHs()> have been added, for pushing SVs on the
1267stack and mortalizing them.
1268
1269=item *
1270
1271Use of the private structure C<mro_meta> has changed slightly. Nothing
1272outside the core should be accessing this directly anyway.
1273
1274=item *
1275
76e3c4a8 1276A new tool, F<Porting/expand-macro.pl> has been added, that allows you
5a00ee6a
JV
1277to view how a C preprocessor macro would be expanded when compiled.
1278This is handy when trying to decode the macro hell that is the perl
1279guts.
1280
1281=back
1282
1283=head1 New Tests
1284
1285Many modules updated from CPAN incorporate new tests.
1286
1287Several tests that have the potential to hang forever if they fail now
1288incorporate a "watchdog" functionality that will kill them after a timeout,
1289which helps ensure that C<make test> and C<make test_harness> run to
1290completion automatically. (Jerry Hedden).
1291
1292Some core-specific tests have been added:
1293
1294=over 4
1295
1296=item t/comp/retainedlines.t
1297
1298Check that the debugger can retain source lines from C<eval>.
1299
1300=item t/io/perlio_fail.t
1301
1302Check that bad layers fail.
1303
1304=item t/io/perlio_leaks.t
1305
1306Check that PerlIO layers are not leaking.
1307
1308=item t/io/perlio_open.t
1309
1310Check that certain special forms of open work.
1311
1312=item t/io/perlio.t
1313
1314General PerlIO tests.
1315
1316=item t/io/pvbm.t
1317
1318Check that there is no unexpected interaction between the internal types
1319C<PVBM> and C<PVGV>.
1320
1321=item t/mro/package_aliases.t
1322
1323Check that mro works properly in the presence of aliased packages.
1324
1325=item t/op/dbm.t
1326
1327Tests for C<dbmopen> and C<dbmclose>.
1328
1329=item t/op/index_thr.t
1330
1331Tests for the interaction of C<index> and threads.
1332
1333=item t/op/pat_thr.t
1334
1335Tests for the interaction of esoteric patterns and threads.
1336
1337=item t/op/qr_gc.t
1338
1339Test that C<qr> doesn't leak.
1340
1341=item t/op/reg_email_thr.t
1342
1343Tests for the interaction of regex recursion and threads.
1344
1345=item t/op/regexp_qr_embed_thr.t
1346
1347Tests for the interaction of patterns with embedded C<qr//> and threads.
1348
1349=item t/op/regexp_unicode_prop.t
1350
1351Tests for Unicode properties in regular expressions.
1352
1353=item t/op/regexp_unicode_prop_thr.t
1354
1355Tests for the interaction of Unicode properties and threads.
1356
1357=item t/op/reg_nc_tie.t
1358
1359Test the tied methods of C<Tie::Hash::NamedCapture>.
1360
eeab323f 1361=item t/op/reg_posixcc.t
5a00ee6a
JV
1362
1363Check that POSIX character classes behave consistently.
1364
1365=item t/op/re.t
1366
1367Check that exportable C<re> functions in F<universal.c> work.
1368
1369=item t/op/setpgrpstack.t
1370
1371Check that C<setpgrp> works.
1372
1373=item t/op/substr_thr.t
1374
1375Tests for the interaction of C<substr> and threads.
1376
1377=item t/op/upgrade.t
1378
1379Check that upgrading and assigning scalars works.
1380
1381=item t/uni/lex_utf8.t
1382
1383Check that Unicode in the lexer works.
1384
1385=item t/uni/tie.t
1386
1387Check that Unicode and C<tie> work.
1388
1389=back
1390
1391=head1 Known Problems
1392
1393This is a list of some significant unfixed bugs, which are regressions
1394from either 5.10.0 or 5.8.x.
1395
1396=over 4
1397
1398=item *
1399
1400C<List::Util::first> misbehaves in the presence of a lexical C<$_>
1401(typically introduced by C<my $_> or implicitly by C<given>). The variable
1402which gets set for each iteration is the package variable C<$_>, not the
1403lexical C<$_> [RT #67694].
1404
1405A similar issue may occur in other modules that provide functions which
1406take a block as their first argument, like
1407
1408 foo { ... $_ ...} list
1409
1410=item *
1411
1412The C<charnames> pragma may generate a run-time error when a regex is
1413interpolated [RT #56444]:
1414
1415 use charnames ':full';
1416 my $r1 = qr/\N{THAI CHARACTER SARA I}/;
1417 "foo" =~ $r1; # okay
1418 "foo" =~ /$r1+/; # runtime error
1419
1420A workaround is to generate the character outside of the regex:
1421
1422 my $a = "\N{THAI CHARACTER SARA I}";
1423 my $r1 = qr/$a/;
1424
1425=item *
1426
1427Some regexes may run much more slowly when run in a child thread compared
1428with the thread the pattern was compiled into [RT #55600].
1429
5a00ee6a
JV
1430=back
1431
1432=head1 Deprecations
1433
1434The following items are now deprecated.
1435
1436=over 4
1437
1438=item *
1439
1440C<Switch> is buggy and should be avoided. From perl 5.11.0 onwards, it is
1441intended that any use of the core version of this module will emit a
1442warning, and that the module will eventually be removed from the core
1443(probably in perl 5.14.0). See L<perlsyn/"Switch statements"> for its
1444replacement.
1445
1446=item *
1447
0f97ff05
NC
1448The following modules will be removed from the core distribution in a future
1449release, and should be installed from CPAN instead. Distributions on CPAN
1450which require these should add them to their prerequisites. The core versions
1451of these modules warnings will issue a deprecation warning.
1452
1453=over
1454
1455=item *
1456
3f369777
NC
1457C<Class::ISA>
1458
1459=item *
1460
0f97ff05
NC
1461C<Pod::Plainer>
1462
3f369777
NC
1463=item *
1464
1465C<Shell>
1466
0f97ff05
NC
1467=back
1468
20e7cb7b
NC
1469Currently support to install from CPAN without a I<force> is C<TODO> in CPAN
1470and CPANPLUS. This will be addressed before 5.12.0 ships.
1471
0f97ff05
NC
1472=item *
1473
ad1d1c50 1474C<suidperl> has been removed. It used to provide a mechanism to
5a00ee6a
JV
1475emulate setuid permission bits on systems that don't support it properly.
1476
ad1d1c50
JV
1477=item *
1478
1479Deprecate assignment to $[
1480
1481=item *
1482
1483Remove attrs, which has been deprecated since 1999/10/02.
1484
1485=item *
1486
1487Deprecate use of the attribute :locked on subroutines.
1488
1489=item *
1490
1491Deprecate using "locked" with the attributes pragma.
1492
1493=item *
1494
1495Deprecate using "unique" with the attributes pragma.
1496
1497=item *
1498
c3e6c235 1499warn if ++ or -- are unable to change the value because it's beyond the limit of representation
ad1d1c50
JV
1500
1501This uses a new warnings category: "imprecision".
1502
ad1d1c50
JV
1503=item *
1504
1505Make lc/uc/lcfirst/ucfirst warn when passed undef.
1506
1507=item *
1508
1509Show constant in "Useless use of a constant in void context"
1510
1511=item *
1512
1513Make the new warning report undef constants as undef
1514
1515=item *
1516
1517Add a new warning, "Prototype after '%s'"
1518
1519=item *
1520
1521Tweak the "Illegal character in prototype" warning so it's more precise when reporting illegal characters after _
1522
1523=item *
1524
278eac9e 1525Unintended interpolation of $\ in regex
ad1d1c50
JV
1526
1527=item *
1528
1529Make overflow warnings in gmtime/localtime only occur when warnings are on
1530
1531=item *
1532
1533Improve mro merging error messages.
1534
1535They are now very similar to those produced by Algorithm::C3.
1536
1537=item *
1538
1539Amelioration of the error message "Unrecognized character %s in column %d"
1540
07e28eec
JV
1541Changes the error message to "Unrecognized character %s; marked by E<lt>--
1542HERE after %sE<lt>-- HERE near column %d". This should make it a little
ad1d1c50
JV
1543simpler to spot and correct the suspicious character.
1544
1545=item *
1546
c69ca1d4 1547Explicitly point to $. when it causes an uninitialized warning for ranges in scalar context
ad1d1c50 1548
d7ea0f56 1549
c3e6c235 1550=item *
d7ea0f56
JV
1551
1552Deprecated numerous Perl 4-era libraries:
1553
1554F<termcap.pl>, F<tainted.pl>, F<stat.pl>, F<shellwords.pl>, F<pwd.pl>,
1555F<open3.pl>, F<open2.pl>, F<newgetopt.pl>, F<look.pl>, F<find.pl>,
1556F<finddepth.pl>, F<importenv.pl>, F<hostname.pl>, F<getopts.pl>,
1557F<getopt.pl>, F<getcwd.pl>, F<flush.pl>, F<fastcwd.pl>, F<exceptions.pl>,
1558F<ctime.pl>, F<complete.pl>, F<cacheout.pl>, F<bigrat.pl>, F<bigint.pl>,
1559F<bigfloat.pl>, F<assert.pl>, F<abbrev.pl>, F<dotsh.pl>, and
1560F<timelocal.pl> are all now deprecated. Using them will incur a warning.
1561
5a00ee6a
JV
1562=back
1563
1564=head1 Acknowledgements
1565
0cd7f36e
NC
1566Some of the work in this release was funded by a TPF grant funded by
1567Dijkmat BV, The Netherlands.
5a00ee6a
JV
1568
1569Steffen Mueller and David Golden in particular helped getting CPAN modules
1570polished and synchronised with their in-core equivalents.
1571
1572Craig Berry was tireless in getting maint to run under VMS, no matter how
1573many times we broke it for him.
1574
1575The other core committers contributed most of the changes, and applied most
1576of the patches sent in by the hundreds of contributors listed in F<AUTHORS>.
7120b314 1577
ad1d1c50
JV
1578Much of the work of categorizing changes in this perldelta file was contributed
1579by the following porters using changelogger.bestpractical.com:
1580
1581Nicholas Clark, leon, shawn, alexm, rjbs, rafl, Pedro Melo, brunorc,
1582anonymous, ☄, Tom Hukins, anonymous, Jesse, dagolden, Moritz Onken,
1583Mark Fowler, chorny, anonymous, tmtm
1584
5a00ee6a
JV
1585Finally, thanks to Larry Wall, without whom none of this would be
1586necessary.
7120b314
NC
1587
1588=head1 Reporting Bugs
1589
1590If you find what you think is a bug, you might check the articles
1591recently posted to the comp.lang.perl.misc newsgroup and the perl
5a00ee6a 1592bug database at http://rt.perl.org/perlbug/ . There may also be
7120b314
NC
1593information at http://www.perl.org/ , the Perl Home Page.
1594
1595If you believe you have an unreported bug, please run the B<perlbug>
1596program included with your release. Be sure to trim your bug down
1597to a tiny but sufficient test case. Your bug report, along with the
1598output of C<perl -V>, will be sent off to perlbug@perl.org to be
1599analysed by the Perl porting team.
1600
49f8307e
NC
1601If the bug you are reporting has security implications, which make it
1602inappropriate to send to a publicly archived mailing list, then please send
1603it to perl5-security-report@perl.org. This points to a closed subscription
1604unarchived mailing list, which includes all the core committers, who be able
1605to help assess the impact of issues, figure out a resolution, and help
1606co-ordinate the release of patches to mitigate or fix the problem across all
5a00ee6a
JV
1607platforms on which Perl is supported. Please only use this address for
1608security issues in the Perl core, not for modules independently
1609distributed on CPAN.
49f8307e 1610
7120b314
NC
1611=head1 SEE ALSO
1612
5a00ee6a
JV
1613The F<Changes> file for an explanation of how to view exhaustive details
1614on what changed.
7120b314
NC
1615
1616The F<INSTALL> file for how to build Perl.
1617
1618The F<README> file for general stuff.
1619
1620The F<Artistic> and F<Copying> files for copyright information.
1621
1622=cut
ad1d1c50
JV
1623
1624