This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
import perl5171delta content to perl5180delta
[perl5.git] / Porting / perl5180delta.pod
CommitLineData
e5ba1bf1
FC
1=encoding utf8
2
3=head1 NAME
4
0bba4573 5perl5180delta - what is new for perl v5.18.0
e5ba1bf1
FC
6
7=head1 DESCRIPTION
8
0bba4573 9This document describes differences between the 5.16.0 release and the 5.18.0
e5ba1bf1
FC
10release.
11
0bba4573
RS
12If you are upgrading from an earlier release such as 5.14.0, first read
13L<perl5140delta>, which describes differences between 5.12.0 and 5.14.0.
e5ba1bf1
FC
14
15=head1 Notice
16
17XXX Any important notices here
18
19=head1 Core Enhancements
20
0fef449b
RS
21=head2 More CORE:: subs
22
23Several more built-in functions have been added as subroutines to the
24CORE:: namespace, namely, those non-overridable keywords that can be
25implemented without custom parsers: C<defined>, C<delete>, C<exists>,
26C<glob>, C<pos>, C<protoytpe>, C<scalar>, C<split>, C<study>, and C<undef>.
27
28As some of these have prototypes, C<prototype('CORE::...')> has been
29changed to not make a distinction between overridable and non-overridable
30keywords. This is to make C<prototype('CORE::pos')> consistent with
31C<prototype(&CORE::pos)>.
e5ba1bf1 32
e5ba1bf1
FC
33
34=head1 Security
35
36XXX Any security-related notices go here. In particular, any security
37vulnerabilities closed should be noted here rather than in the
38L</Selected Bug Fixes> section.
39
40[ List each security issue as a =head2 entry ]
41
42=head1 Incompatible Changes
43
0bba4573
RS
44=head2 qw(...) can no longer be used as parentheses
45
46C<qw> lists used to fool the parser into thinking they were always
47surrounded by parentheses. This permitted some surprising constructions
48such as C<foreach $x qw(a b c) {...}>, which should really be written
49C<foreach $x (qw(a b c)) {...}>. These would sometimes get the lexer into
50the wrong state, so they didn't fully work, and the similar C<foreach qw(a
51b c) {...}> that one might expect to be permitted never worked at all.
52
53This side effect of C<qw> has now been abolished. It has been deprecated
54since Perl 5.13.11. It is now necessary to use real parentheses
55everywhere that the grammar calls for them.
e5ba1bf1 56
0bba4573 57=head2 C<\s> in regular expressions now matches a Vertical Tab
e5ba1bf1 58
0bba4573 59[ XXX ]
e5ba1bf1 60
0fef449b
RS
61=head2 C</(?{})/> and C</(??{})/> have been heavily reworked
62
63The implementation of this feature has been almost completely rewritten.
64Although its main intent is to fix bugs, some behaviors, especially
65related to the scope of lexical variables, will have changed. This is
66described more fully in the L</Selected Bug Fixes> section.
67
68=head2 C<\N{BELL}> now refers to U+1F514 instead of U+0007
69
70Unicode 6.0 reused the name "BELL" for a different code point than it
71traditionally had meant. Since Perl v5.14, use of this name still
72referred to U+0007, but would raise a deprecation warning. Now, "BELL"
73refers to U+1F514, and the name for U+0007 is "ALERT". All the
74functions in L<charnames> have been correspondingly updated.
75
76=head2 Alphanumeric operators must now be separated from the closing
77delimiter of regular expressions
78
79You may no longer write something like:
80
81 m/a/and 1
82
83Instead you must write
84
85 m/a/ and 1
86
87with whitespace separating the operator from the closing delimiter of
88the regular expression. Not having whitespace has resulted in a
89deprecation warning since Perl v5.14.0.
90
91=head2 C<require> dies for unreadable files
92
93When C<require> encounters an unreadable file, it now dies. It used to
94ignore the file and continue searching the directories in @INC
95[perl #113422].
96
97=head2 Upgrade to the Unicode 6.2 beta
98
99Unicode 6.2 is proposing some changes that may very well break some CPAN
100modules. The timing of this nicely coincides with Perl's being early in the
101release cycle. This commit takes the current beta 6.2, adds the proposed
102changes that aren't yet in it, and subtracts the changes that would affect \X
103processing, as those turn out to have errors, and may have to be rethought.
104Unicode has been notified of these problems.
105
106This will allow us to gather data as to whether or not the proposed changes
107cause us problems. These will be presented to Unicode to aid in their final
108decision as to whether or not to go forward with the changes.
109
110These changes will be replaced by the final version of Unicode 6.2 before
1115.18.0 is released.
112
e5ba1bf1
FC
113=head1 Deprecations
114
115XXX Any deprecated features, syntax, modules etc. should be listed here. In
116particular, deprecated modules should be listed here even if they are listed as
117an updated module in the L</Modules and Pragmata> section.
118
119[ List each deprecation as a =head2 entry ]
120
121=head1 Performance Enhancements
122
123XXX Changes which enhance performance without changing behaviour go here.
124There may well be none in a stable release.
125
126[ List each enhancement as a =item entry ]
127
128=over 4
129
130=item *
131
0bba4573
RS
132Filetest ops manage the stack in a fractionally more efficient manner.
133
134=item *
135
136Globs used in a numeric context are now numerified directly in most cases,
137rather than being numerified via stringification.
e5ba1bf1 138
0fef449b
RS
139=item *
140
141The C<x> repetition operator is now folded to a single constant at compile
142time if called in scalar context with constant operands and no parentheses
143around the left operand.
144
e5ba1bf1
FC
145=back
146
147=head1 Modules and Pragmata
148
149XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
150go here. If Module::CoreList is updated, generate an initial draft of the
151following sections using F<Porting/corelist-perldelta.pl>, which prints stub
152entries to STDOUT. Results can be pasted in place of the '=head2' entries
153below. A paragraph summary for important changes should then be added by hand.
154In an ideal world, dual-life modules would have a F<Changes> file that could be
155cribbed.
156
157[ Within each section, list entries as a =item entry ]
158
159=head2 New Modules and Pragmata
160
161=over 4
162
163=item *
164
165XXX
166
167=back
168
169=head2 Updated Modules and Pragmata
170
171=over 4
172
173=item *
174
175L<XXX> has been upgraded from version A.xx to B.yy.
176
177=back
178
179=head2 Removed Modules and Pragmata
180
0bba4573 181=over
e5ba1bf1
FC
182
183=item *
184
0bba4573
RS
185L<Version::Requirements> has been removed from the core distribution. It is
186available under a different name: L<CPAN::Meta::Requirements>.
e5ba1bf1
FC
187
188=back
189
190=head1 Documentation
191
192XXX Changes to files in F<pod/> go here. Consider grouping entries by
193file and be sure to link to the appropriate page, e.g. L<perlfunc>.
194
195=head2 New Documentation
196
197XXX Changes which create B<new> files in F<pod/> go here.
198
199=head3 L<XXX>
200
201XXX Description of the purpose of the new file here
202
203=head2 Changes to Existing Documentation
204
0bba4573 205=head3 L<perldata>
e5ba1bf1 206
0bba4573
RS
207=over 4
208
209=item *
210
211Now explicitly documents the behaviour of hash initializer lists that
212contain duplicate keys.
213
214=back
215
216=head3 L<perldiag>
217
218=over 4
219
220=item *
221
222The explanation of symbolic references being prevented by "strict refs"
223now doesn't assume that the reader knows what symbolic references are.
224
225=back
226
227=head3 L<perlfunc>
e5ba1bf1
FC
228
229=over 4
230
231=item *
232
0bba4573 233The return value of C<pipe> is now documented.
e5ba1bf1
FC
234
235=back
236
0fef449b
RS
237=head3 L<perlfaq>
238
239=over 4
240
241=item *
242
243L<perlfaq> has been synchronized with version 5.0150040 from CPAN.
244
245=back
246
247=head3 L<perlcheat>
248
249=over 4
250
251=item *
252
253L<perlcheat> has been reorganized, and a few new sections were added.
254
255=back
256
0bba4573 257=head3 Diagnostics
e5ba1bf1
FC
258
259The following additions or changes have been made to diagnostic output,
260including warnings and fatal error messages. For the complete list of
261diagnostic messages, see L<perldiag>.
262
263XXX New or changed warnings emitted by the core's C<C> code go here. Also
264include any changes in L<perldiag> that reconcile it to the C<C> code.
265
266=head2 New Diagnostics
267
268XXX Newly added diagnostic messages go under here, separated into New Errors
269and New Warnings
270
271=head3 New Errors
272
273=over 4
274
275=item *
276
277XXX L<message|perldiag/"message">
278
279=back
280
281=head3 New Warnings
282
283=over 4
284
285=item *
286
287XXX L<message|perldiag/"message">
288
289=back
290
291=head2 Changes to Existing Diagnostics
292
293XXX Changes (i.e. rewording) of diagnostic messages go here
294
295=over 4
296
297=item *
298
0fef449b
RS
299The "Runaway prototype" warning that occurs in bizarre cases has been
300removed as being unhelpful and inconsistent.
301
302=item *
303
304The "Not a format reference" error has been removed, as the only case in
305which it could be triggered was a bug.
306
307=item *
308
309The "Unable to create sub named %s" error has been removed for the same
310reason.
e5ba1bf1
FC
311
312=back
313
314=head1 Utility Changes
315
316XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
317Most of these are built within the directories F<utils> and F<x2p>.
318
319[ List utility changes as a =head3 entry for each utility and =item
320entries for each change
321Use L<XXX> with program names to get proper documentation linking. ]
322
323=head3 L<XXX>
324
325=over 4
326
327=item *
328
329XXX
330
331=back
332
333=head1 Configuration and Compilation
334
335XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
336go here. Any other changes to the Perl build process should be listed here.
337However, any platform-specific changes should be listed in the
338L</Platform Support> section, instead.
339
340[ List changes as a =item entry ].
341
342=over 4
343
344=item *
345
346XXX
347
348=back
349
350=head1 Testing
351
352XXX Any significant changes to the testing of a freshly built perl should be
353listed here. Changes which create B<new> files in F<t/> go here as do any
354large changes to the testing harness (e.g. when parallel testing was added).
355Changes to existing files in F<t/> aren't worth summarizing, although the bugs
356that they represent may be covered elsewhere.
357
358[ List each test improvement as a =item entry ]
359
360=over 4
361
362=item *
363
0bba4573
RS
364The test suite now has a section for tests that require very large amounts
365of memory. These tests won't run by default; they can be enabled by
366setting the C<PERL_TEST_MEMORY> environment variable to the number of
367gibibytes of memory that may be safely used.
e5ba1bf1
FC
368
369=back
370
371=head1 Platform Support
372
373XXX Any changes to platform support should be listed in the sections below.
374
375[ Within the sections, list each platform as a =item entry with specific
376changes as paragraphs below it. ]
377
378=head2 New Platforms
379
380XXX List any platforms that this version of perl compiles on, that previous
381versions did not. These will either be enabled by new files in the F<hints/>
382directories, or new subdirectories and F<README> files at the top level of the
383source tree.
384
385=over 4
386
387=item XXX-some-platform
388
389XXX
390
391=back
392
393=head2 Discontinued Platforms
394
395XXX List any platforms that this version of perl no longer compiles on.
396
397=over 4
398
399=item XXX-some-platform
400
401XXX
402
403=back
404
405=head2 Platform-Specific Notes
406
407XXX List any changes for specific platforms. This could include configuration
408and compilation changes or changes in portability/compatibility. However,
409changes within modules for platforms should generally be listed in the
410L</Modules and Pragmata> section.
411
412=over 4
413
0bba4573 414=item clang++
e5ba1bf1 415
0bba4573
RS
416There is now a workaround for a compiler bug that prevented compiling
417with clang++ since Perl 5.15.7 [perl #112786].
418
419=item C++
420
421When compiling the Perl core as C++ (which is only semi-supported), the
422mathom functions are now compiled as C<extern "C">, to ensure proper
423binary compatibility. (However, binary compatibility isn't generally
424guaranteed anyway in the situations where this would matter.)
425
426=item VMS
427
428It should now be possible to compile Perl as C++ on VMS.
e5ba1bf1 429
0fef449b
RS
430=item Win32
431
432C<link> on Win32 now attempts to set C<$!> to more appropriate values
433based on the Win32 API error code. [perl #112272]
434
435Perl no longer mangles the environment block, e.g. when launching a new
436sub-process, when the environment contains non-ASCII characters. Known
437problems still remain, however, when the environment contains characters
438outside of the current ANSI codepage (e.g. see the item about Unicode in
439C<%ENV> in L<http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/todo.pod>).
440[perl #113536]
441
442=item VMS
443
444All C header files from the top-level directory of the distribution are now
445installed on VMS, providing consistency with a long-standing practice on other
446platforms. Previously only a subset were installed, which broke non-core
447extension builds for extensions that depended on the missing include files.
448
e5ba1bf1
FC
449=back
450
451=head1 Internal Changes
452
0bba4573 453=over
e5ba1bf1 454
0bba4573 455=item *
e5ba1bf1 456
0bba4573
RS
457The C<CV *> typemap entry now supports C<&{}> overloading and typeglobs,
458just like C<&{...}> [perl #96872].
e5ba1bf1
FC
459
460=item *
461
0bba4573
RS
462The C<SVf_AMAGIC> flag to indicate overloading is now on the stash, not the
463object. It is now set automatically whenever a method or @ISA changes, so
464its meaning has changed, too. It now means "potentially overloaded". When
465the overload table is calculated, the flag is automatically turned off if
466there is no overloading, so there should be no noticeable slowdown.
467
468The staleness of the overload tables is now checked when overload methods
469are invoked, rather than during C<bless>.
470
471"A" magic is gone. The changes to the handling of the C<SVf_AMAGIC> flag
472eliminate the need for it.
473
474C<PL_amagic_generation> has been removed as no longer necessary. For XS
475modules, it is now a macro alias to C<PL_na>.
476
477The fallback overload setting is now stored in a stash entry separate from
478overloadedness itself.
479
480=item *
481
482The character-processing code has been cleaned up in places. The changes
483should be operationally invisible.
e5ba1bf1 484
0fef449b
RS
485=item *
486
487The C<study> function was made a no-op in 5.16. It was simply disabled via
488a C<return> statement; the code was left in place. Now the code supporting
489what C<study> used to do has been removed.
490
491=item *
492
493Under threaded perls, there is no longer a separate PV allocated for every
494COP to store its package name (C<< cop->stashpv >>). Instead, there is an
495offset (C<< cop->stashoff >>) into the new C<PL_stashpad> array, which
496holds stash pointers.
497
498=item *
499
500In the pluggable regex API, the C<regexp_engine> struct has acquired a new
501field C<op_comp>, which is currently just for perl's internal use, and
502should be initialised to NULL by other regex plugin modules.
503
504=item *
505
506A new function C<alloccoptash> has been added to the API, but is considered
507experimental. See L<perlapi>.
508
e5ba1bf1
FC
509=back
510
511=head1 Selected Bug Fixes
512
513XXX Important bug fixes in the core language are summarized here. Bug fixes in
514files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
515
516[ List each fix as a =item entry ]
517
518=over 4
519
520=item *
521
0bba4573
RS
522C<goto ''> now looks for an empty label, producing the "goto must have
523label" error message, instead of exiting the program [perl #111794].
e5ba1bf1 524
0bba4573 525=item *
e5ba1bf1 526
0bba4573
RS
527C<goto "\0"> now dies with "Can't find label" instead of "goto must have
528label".
e5ba1bf1 529
0bba4573 530=item *
e5ba1bf1 531
0bba4573
RS
532The C function C<hv_store> used to result in crashes when used on C<%^H>
533[perl #111000].
e5ba1bf1 534
0bba4573
RS
535=item *
536
537A call checker attached to a closure prototype via C<cv_set_call_checker>
538is now copied to closures cloned from it. So C<cv_set_call_checker> now
539works inside an attribute handler for a closure.
e5ba1bf1
FC
540
541=item *
542
0bba4573
RS
543Writing to C<$^N> used to have no effect. Now it croaks with "Modification
544of a read-only value" by default, but that can be overridden by a custom
545regular expression engine, as with C<$1> [perl #112184].
546
23dd6e2e
FC
547=item *
548
0bba4573
RS
549C<undef> on a control character glob (C<undef *^H>) no longer emits an
550erroneous warning about ambiguity [perl #112456].
23dd6e2e 551
0bba4573
RS
552=item *
553
554For efficiency's sake, many operators and built-in functions return the
555same scalar each time. Lvalue subroutines and subroutines in the CORE::
556namespace were allowing this implementation detail to leak through.
557C<print &CORE::uc("a"), &CORE::uc("b")> used to print "BB". The same thing
558would happen with an lvalue subroutine returning the return value of C<uc>.
559Now the value is copied in such cases.
23dd6e2e
FC
560
561=item *
562
0bba4573
RS
563C<method {}> syntax with an empty block or a block returning an empty list
564used to crash or use some random value left on the stack as its invocant.
565Now it produces an error.
b92848b5 566
0f023b5a
FC
567=item *
568
0bba4573 569C<vec> now works with extremely large offsets (E<gt>2 GB) [perl #111730].
0f023b5a
FC
570
571=item *
572
0bba4573
RS
573Changes to overload settings now take effect immediately, as do changes to
574inheritance that affect overloading. They used to take effect only after
575C<bless>.
576
577Objects that were created before a class had any overloading used to remain
578non-overloaded even if the class gained overloading through C<use overload>
579or @ISA changes, and even after C<bless>. This has been fixed
580[perl #112708].
c53e3a75
FC
581
582=item *
583
0bba4573 584Classes with overloading can now inherit fallback values.
c53e3a75
FC
585
586=item *
587
0bba4573
RS
588Overloading was not respecting a fallback value of 0 if there were
589overloaded objects on both sides of an assignment operator like C<+=>
590[perl #111856].
0f023b5a
FC
591
592=item *
593
0bba4573
RS
594C<pos> now croaks with hash and array arguments, instead of producing
595erroneous warnings.
0f023b5a
FC
596
597=item *
598
0bba4573
RS
599C<while(each %h)> now implies C<while(defined($_ = each %h))>, like
600C<readline> and C<readdir>.
0f023b5a 601
0bba4573
RS
602=item *
603
604Subs in the CORE:: namespace no longer crash after C<undef *_> when called
605with no argument list (C<&CORE::time> with no parentheses).
606
607=item *
608
609Unicode 6.1 published an incorrect alias for one of the
610Canonical_Combining_Class property's values (which range between 0 and
611254). The alias C<CCC133> should have been C<CCC132>. Perl now
612overrides the data file furnished by Unicode to give the correct value.
613
614=item *
615
616C<unpack> no longer produces the "'/' must follow a numeric type in unpack"
617error when it is the data that are at fault [perl #60204].
618
619=item *
620
621C<join> and C<"@array"> now call FETCH only once on a tied C<$">
622[perl #8931].
623
624=item *
625
626Some subroutine calls generated by compiling core ops affected by a
627C<CORE::GLOBAL> override had op checking performed twice. The checking
628is always idempotent for pure Perl code, but the double checking can
629matter when custom call checkers are involved.
630
631=item *
632
633A race condition used to exist around fork that could cause a signal sent to
634the parent to be handled by both parent and child. Signals are now blocked
635briefly around fork to prevent this from happening [perl #82580].
e5ba1bf1 636
0fef449b
RS
637=item *
638
639The implementation of code blocks in regular expressions, such as C<(?{})>
640and C<(??{})>, has been heavily reworked to eliminate a whole slew of bugs.
641The main user-visible changes are:
642
643=over 4
644
645=item *
646
647Code blocks within patterns are now parsed in the same pass as the
648surrounding code; in particular it is no longer necessary to have balanced
649braces: this now works:
650
651 /(?{ $x='{' })/
652
653This means that this error message is longer generated:
654
655 Sequence (?{...}) not terminated or not {}-balanced in regex
656
657but a new error may be seen:
658
659 Sequence (?{...}) not terminated with ')'
660
661In addition, literal code blocks within run-time patterns are only
662compiled once, at perl compile-time:
663
664 for my $p (...) {
665 # this 'FOO' block of code is compiled once,
666 # at the same time as the surrounding 'for' loop
667 /$p{(?{FOO;})/;
668 }
669
670=item *
671
672Lexical variables are now sane as regards scope, recursion and closure
673behavior. In particular, C</A(?{B})C/> behaves (from a closure viewpoint)
674exactly like C</A/ && do { B } && /C/>, while C<qr/A(?{B})C/> is like
675C<sub {/A/ && do { B } && /C/}>. So this code now works how you might
676expect, creating three regexes that match 0, 1, and 2:
677
678 for my $i (0..2) {
679 push @r, qr/^(??{$i})$/;
680 }
681 "1" =~ $r[1]; # matches
682
683=item *
684
685The C<use re 'eval'> pragma is now only required for code blocks defined
686at runtime; in particular in the following, the text of the C<$r> pattern is
687still interpolated into the new pattern and recompiled, but the individual
688compiled code-blocks within C<$r> are reused rather than being recompiled,
689and C<use re 'eval'> isn't needed any more:
690
691 my $r = qr/abc(?{....})def/;
692 /xyz$r/;
693
694=item *
695
696Flow control operators no longer crash. Each code block runs in a new
697dynamic scope, so C<next> etc. will not see
698any enclosing loops. C<return> returns a value
699from the code block, not from any enclosing subroutine.
700
701=item *
702
703Perl normally caches the compilation of run-time patterns, and doesn't
704recompile if the pattern hasn't changed, but this is now disabled if
705required for the correct behavior of closures. For example:
706
707 my $code = '(??{$x})';
708 for my $x (1..3) {
709 # recompile to see fresh value of $x each time
710 $x =~ /$code/;
711 }
712
713
714=item *
715
716The C</msix> and C<(?msix)> etc. flags are now propagated into the return
717value from C<(??{})>; this now works:
718
719 "AB" =~ /a(??{'b'})/i;
720
721=item *
722
723Warnings and errors will appear to come from the surrounding code (or for
724run-time code blocks, from an eval) rather than from an C<re_eval>:
725
726 use re 'eval'; $c = '(?{ warn "foo" })'; /$c/;
727 /(?{ warn "foo" })/;
728
729formerly gave:
730
731 foo at (re_eval 1) line 1.
732 foo at (re_eval 2) line 1.
733
734and now gives:
735
736 foo at (eval 1) line 1.
737 foo at /some/prog line 2.
738
739=back
740
741=item *
742
743Perl now works as well as can be expected on all releases of Unicode so
744far. In v5.16, it worked on Unicodes 6.0 and 6.1, but there were
745various bugs for earlier releases; the older the release the more
746problems.
747
748=item *
749
750C<vec> no longer produces "uninitialized" warnings in lvalue context
751[perl #9423].
752
753=item *
754
755An optimization involving fixed strings in regular expressions could cause
756a severe performance penalty in edge cases. This has been fixed
757[perl #76546].
758
759=item *
760
761In certain cases, including empty subpatterns within a regular expression (such
762as C<(?:)> or C<(?:|)>) could disable some optimizations. This has been fixed.
763
764=item *
765
766The "Can't find an opnumber" message that C<prototype> produces when passed
767a string like "CORE::nonexistent_keyword" now passes UTF-8 and embedded
768NULs through unchanged [perl #97478].
769
770=item *
771
772C<prototype> now treats magical variables like C<$1> the same way as
773non-magical variables when checking for the CORE:: prefix, instead of
774treating them as subroutine names.
775
776=item *
777
778Under threaded perls, a runtime code block in a regular expression could
779corrupt the package name stored in the op tree, resulting in bad reads
780in C<caller>, and possibly crashes [perl #113060].
781
782=item *
783
784Referencing a closure prototype (C<\&{$_[1]}> in an attribute handler for a
785closure) no longer results in a copy of the subroutine (or assertion
786failures on debugging builds).
787
788=item *
789
790C<eval '__PACKAGE__'> now returns the right answer on threaded builds if
791the current package has been assigned over (as in
792C<*ThisPackage:: = *ThatPackage::>) [perl #78742].
793
794=item *
795
796If a package is deleted by code that it calls, it is possible for C<caller>
797to see a stack frame belonging to that deleted package. C<caller> could
798crash if the stash's memory address was reused for a scalar and a
799substitution was performed on the same scalar [perl #113486].
800
801=item *
802
803C<UNIVERSAL::can> no longer treats its first argument differently
804depending on whether it is a string or number internally.
805
806=item *
807
808C<open> with C<< <& >> for the mode checks to see whether the third argument is
809a number, in determining whether to treat it as a file descriptor or a handle
810name. Magical variables like C<$1> were always failing the numeric check and
811being treated as handle names.
812
813=item *
814
815C<warn>'s handling of magical variables (C<$1>, ties) has undergone several
816fixes. C<FETCH> is only called once now on a tied argument or a tied C<$@>
817[perl #97480]. Tied variables returning objects that stringify as "" are
818no longer ignored. A tied C<$@> that happened to return a reference the
819I<previous> time it was used is no longer ignored.
820
821=item *
822
823C<warn ""> now treats C<$@> with a number in it the same way, regardless of
824whether it happened via C<$@=3> or C<$@="3">. It used to ignore the
825former. Now it appends "\t...caught", as it has always done with
826C<$@="3">.
827
828=item *
829
830Numeric operators on magical variables (e.g., S<C<$1 + 1>>) used to use
831floating point operations even where integer operations were more appropriate,
832resulting in loss of accuracy on 64-bit platforms [perl #109542].
833
834=item *
835
836Unary negation no longer treats a string as a number if the string happened
837to be used as a number at some point. So, if C<$x> contains the string "dogs",
838C<-$x> returns "-dogs" even if C<$y=0+$x> has happened at some point.
839
840=item *
841
842In Perl 5.14, C<-'-10'> was fixed to return "10", not "+10". But magical
843variables (C<$1>, ties) were not fixed till now [perl #57706].
844
845=item *
846
847Unary negation now treats strings consistently, regardless of the internal
848C<UTF8> flag.
849
850=item *
851
852A regression introduced in Perl v5.16.0 involving
853C<tr/I<SEARCHLIST>/I<REPLACEMENTLIST>/> has been fixed. Only the first
854instance is supposed to be meaningful if a character appears more than
855once in C<I<SEARCHLIST>>. Under some circumstances, the final instance
856was overriding all earlier ones. [perl #113584]
857
858=item *
859
860Regular expressions like C<qr/\87/> previously silently inserted a NUL
861character, thus matching as if it had been written C<qr/\00087/>. Now it
862matches as if it had been written as C<qr/87/>, with a message that the
863sequence C<"\8"> is unrecognized.
864
865=item *
866
867C<__SUB__> now works in special blocks (C<BEGIN>, C<END>, etc.).
868
869=item *
870
871Thread creation on Windows could theoretically result in a crash if done
872inside a C<BEGIN> block. It still does not work properly, but it no longer
873crashes [perl #111610].
874
875=item *
876
877C<\&{''}> (with the empty string) now autovivifies a stub like any other
878sub name, and no longer produces the "Unable to create sub" error
879[perl #94476].
880
e5ba1bf1
FC
881=back
882
0bba4573 883=head1 Known Problems
e5ba1bf1 884
0bba4573
RS
885XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
886tests that had to be C<TODO>ed for the release would be noted here. Unfixed
887platform specific bugs also go here.
888
889[ List each fix as a =item entry ]
890
891=over 4
892
893=item *
894
895XXX
896
897=back
e5ba1bf1
FC
898
899=head1 Acknowledgements
900
901XXX Generate this with:
902
de3d8d88 903 perl Porting/acknowledgements.pl v5.17.12..HEAD
e5ba1bf1
FC
904
905=head1 Reporting Bugs
906
907If you find what you think is a bug, you might check the articles recently
908posted to the comp.lang.perl.misc newsgroup and the perl bug database at
909http://rt.perl.org/perlbug/ . There may also be information at
910http://www.perl.org/ , the Perl Home Page.
911
912If you believe you have an unreported bug, please run the L<perlbug> program
913included with your release. Be sure to trim your bug down to a tiny but
914sufficient test case. Your bug report, along with the output of C<perl -V>,
915will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
916
917If the bug you are reporting has security implications, which make it
918inappropriate to send to a publicly archived mailing list, then please send it
919to perl5-security-report@perl.org. This points to a closed subscription
920unarchived mailing list, which includes all the core committers, who will be
921able to help assess the impact of issues, figure out a resolution, and help
922co-ordinate the release of patches to mitigate or fix the problem across all
923platforms on which Perl is supported. Please only use this address for
924security issues in the Perl core, not for modules independently distributed on
925CPAN.
926
927=head1 SEE ALSO
928
929The F<Changes> file for an explanation of how to view exhaustive details on
930what changed.
931
932The F<INSTALL> file for how to build Perl.
933
934The F<README> file for general stuff.
935
936The F<Artistic> and F<Copying> files for copyright information.
937
938=cut