This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for #108480: $cow |= number
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for comment
4 This has been completed up to 1a50d74bac4, except for:
5 8629c11317 smueller Escape double-quotes in generated #line directives
6 8dc67a69b  shlomif  perl -d: display lines inside subroutines.
7 3dfd1b5cd2 leont    Export PerlIOBase_open
8
9 =head1 NAME
10
11 [ this is a template for a new perldelta file. Any text flagged as
12 XXX needs to be processed before release. ]
13
14 perldelta - what is new for perl v5.15.7
15
16 =head1 DESCRIPTION
17
18 This document describes differences between the 5.15.6 release and
19 the 5.15.7 release.
20
21 If you are upgrading from an earlier release such as 5.15.5, first read
22 L<perl5156delta>, which describes differences between 5.15.5 and
23 5.15.6.
24
25 =head1 Notice
26
27 XXX Any important notices here
28
29 =head1 Core Enhancements
30
31 XXX New core language features go here. Summarise user-visible core language
32 enhancements. Particularly prominent performance optimisations could go
33 here, but most should go in the L</Performance Enhancements> section.
34
35 [ List each enhancement as a =head2 entry ]
36
37 =head2 C<use charnames> no longer needed for C<\N{I<name>}>
38
39 The C<charnames> module is now automatically loaded when needed as if
40 the C<:full> and C<:short> options had been specified.  See
41 L<charnames>.
42
43 =head2 Improved performance for Unicode properties in regular expressions
44
45 Matching a code point against a Unicode property is now done via a
46 binary search instead of linear.  This means for example that the worst
47 case for a 1000 item property is 10 probes instead of 1000.  This
48 inefficiency has been compensated for in the past by permanently storing
49 in a hash the results of a given probe plus the results for the adjacent
50 64 code points, under the theory that near-by code points are likely to
51 be searched for.  A separate hash was used for each mention of a Unicode
52 property in each regular expression.  Thus, C<qr/\p{foo}abc\p{foo}/>
53 would generate two hashes.  Any probes in one instance would be unknown
54 to the other, and the hashes could expand separately to be quite large
55 if the regular expression were used on many different widely-separated
56 code points.  This can lead to running out of memory in extreme cases.
57 Now, however, there is just one hash shared by all instances of a given
58 property.  This means that if C<\p{foo}> is matched against "A" in one
59 regular expression in a thread, the result will be known immediately to
60 all regular expressions, and the relentless march of using up memory is
61 slowed considerably.
62
63 =head1 Security
64
65 XXX Any security-related notices go here.  In particular, any security
66 vulnerabilities closed should be noted here rather than in the
67 L</Selected Bug Fixes> section.
68
69 [ List each security issue as a =head2 entry ]
70
71 =head1 Incompatible Changes
72
73 XXX For a release on a stable branch, this section aspires to be:
74
75     There are no changes intentionally incompatible with 5.XXX.XXX
76     If any exist, they are bugs, and we request that you submit a
77     report.  See L</Reporting Bugs> below.
78
79 [ List each incompatible change as a =head2 entry ]
80
81 =head1 Deprecations
82
83 XXX Any deprecated features, syntax, modules etc. should be listed here.
84 In particular, deprecated modules should be listed here even if they are
85 listed as an updated module in the L</Modules and Pragmata> section.
86
87 [ List each deprecation as a =head2 entry ]
88
89 =head2 Deprecated Modules
90
91 =over
92
93 =item L<Version::Requirements>
94
95 Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
96 which is a drop-in replacement. It will be deleted from perl.git blead
97 in v5.17.0.
98
99 =back
100
101 =head1 Performance Enhancements
102
103 XXX Changes which enhance performance without changing behaviour go here. There
104 may well be none in a stable release.
105
106 [ List each enhancement as a =item entry ]
107
108 =over 4
109
110 =item *
111
112 Version declarations with the C<use> keyword (e.g., C<use 5.012>) are now
113 faster, as they enable features without loading F<feature.pm>.
114
115 =item *
116
117 C<local $_> is faster now, as it no longer iterates through magic that it
118 is not going to copy anyway.
119
120 =back
121
122 =head1 Modules and Pragmata
123
124 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
125 go here.  If Module::CoreList is updated, generate an initial draft of the
126 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
127 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
128 below.  A paragraph summary for important changes should then be added by hand.
129 In an ideal world, dual-life modules would have a F<Changes> file that could be
130 cribbed.
131
132 [ Within each section, list entries as a =item entry ]
133
134 =head2 New Modules and Pragmata
135
136 =over 4
137
138 =item *
139
140 XXX
141
142 =back
143
144 =head2 Updated Modules and Pragmata
145
146 =over 4
147
148 =item *
149
150 L<B::Deparse> has been upgraded from version 1.10 to version 1.11.
151
152 It now deparses C<open('random string')> correctly.  It used to omit the
153 quotation marks, which did not work if the string were not a valid
154 identifier [perl #91416].
155
156 A similar bug also affected hash and array elements such as
157 C<< 'random string'->[0] >>, which would deparse as C<$random string[0]>.
158 This has been fixed.
159
160 Those same syntaxes used to drop the package name from variables beginning
161 with a punctuation mark, as in C<< "foo::]"->{$key} >>.  This, too, has
162 been fixed.
163
164 B::Deparse no longer hangs when deparsing a program with stash
165 circularities, such as C<BEGIN { *Acme::Acme:: = *Acme:: }> [perl #91384].
166
167 C</$s[1]/> used to be deparsed as C<$s[1]> if @s were a lexical variable
168 [perl #81424].  Similarly, C</$#s/> would be deparsed as C<$#s> for both
169 lexical and package variables.  These has been fixed.
170
171 The C</applaud> regular expression flags are no longer omitted.
172
173 Feature hints are now deparsed with C<use feature> rather than C<%^H>
174 assignments.
175
176 A regression in 1.10 that caused C<ambient_pragmas> to disable strict mode
177 in obscure cases has been fixed.
178
179 Strict mode is now fully deparsed, including subs and vars [perl #24027].
180
181 The global variables C<$(>, C<$|> and C<$)> are now deparsed with braces
182 (i.e., C<${(}>) in regular expressions [perl #86060].
183
184 C<continue> blocks after C<for> loops are now deparsed correctly, as they
185 were back in 0.67 (included with Perl 5.8.5) [perl #108224]
186
187 =item *
188
189 L<CGI> has been upgraded from version 3.58 to version 3.59.
190
191 We no longer read from STDIN when the Content-Length is not set, preventing
192 requests with no Content-Length from freezing in some cases. This is consistent
193 with the CGI RFC 3875, and is also consistent with CGI::Simple. However, the old
194 behavior may have been expected by some command-line uses of CGI.pm.
195
196 =item *
197
198 L<CPAN::Meta> has been upgraded from version 2.112621 to version 2.113640.
199
200 Version::Requirements has now been merged as CPAN::Meta::Requirements.
201
202 =item *
203
204 L<CPANPLUS> has been upgraded from version 0.9113 to version 0.9116.
205
206 =item *
207
208 L<Data::Dumper> has been upgraded from version 2.135_01 to version
209 2.135_03.
210
211 It can now dump vstrings [perl #101162].
212
213 The nameless typeglob (C<*{""}>) is now dumped properly.
214
215 =item *
216
217 L<diagnostics> has been upgraded from version 1.26 to version 1.27.
218
219 See the entry for splain in the L</Utility Changes> section, for the
220 changes.  The diagnostics module and the splain utility are actually one
221 and the same.
222
223 =item *
224
225 L<ExtUtils::Packlist> has been upgraded from version 1.45 to version 1.46.
226
227 It no longer produces "used once" warnings when the C<read> and C<write>
228 methods are called while the main program is still compiling (e.g., from
229 within a BEGIN block) [perl #107410] [rt.cpan.org #50315].
230
231 =item *
232
233 L<Locale::Maketext> has been upgraded from version 1.21 to version 1.22.
234
235 =item *
236
237 L<Module::Pluggable> has been upgraded from version 3.9 to version 4.0.
238
239 =item *
240
241 L<overload> has been upgraded from version 1.16 to version 1.17.
242
243 C<overload::Overloaded> no longer calls C<can> on the class, but uses
244 another means to determine whether the object has overloading.  It was
245 never correct for it to call C<can>, as overloading does not respect
246 AUTOLOAD.  So classes that autoload methods and implement C<can> no longer
247 have to account for overloading [perl #40333].
248
249 A warning is now produced for invalid arguments.  See L</New Diagnostics>.
250
251 =item *
252
253 L<perlfaq> has been upgraded from version 5.0150036 to version 5.0150037.
254
255 =item *
256
257 L<PerlIO::scalar> has been upgraded from version 0.12 to version 0.13.
258
259 (This is the module that implements C<< open $fh, '>', \$scalar >>.)
260
261 It no longer assumes during C<seek> that $scalar is a string internally.
262 If it didn't crash, it was close to doing so [perl #92706].
263
264 Printing to an in-memory handle now works if the $scalar holds a reference,
265 stringifying the reference before modifying it.  References used to be
266 treated as empty strings.
267
268 Printing to an in-memory handle no longer crashes if the $scalar happens to
269 hold a number internally, but no string buffer.
270
271 =item *
272
273 L<Pod::Html> has been upgraded from version 1.12 to 1.13
274
275 =item *
276
277 L<POSIX> has been upgraded from version 1.27 to version 1.29.
278
279 C<sigsuspend> and C<pause> now run signals handle before returning, as the
280 whole point of these two functions is to wait until a signal has
281 arrived, and then return I<after> it has been triggered.  Delayed, or
282 "safe", signals were preventing that from happening, possibly resulting in
283 race conditions [perl #107216].
284 C<POSIX::sleep> is now a direct call into the underlying OS C<sleep>
285 function, instead of being a Perl wrapper on C<CORE::sleep>. C<POSIX::dup2>
286 now returns the correct value on Win32 (I<i.e.> the file descriptor).
287 C<POSIX::SigSet> C<sigsuspend> and C<sigpending> and C<POSIX::pause> now
288 dispatch safe signals immediately before returning to their caller.
289
290 =item *
291
292 L<Pod::Perldoc> has been upgraded from version 3.15_01 to version 3.15_15.
293
294 =item *
295
296 L<Term::UI> has been upgraded from version 0.26 to version 0.30.
297
298 =item *
299
300 L<Tie::File> has been upgraded from version 0.96 to version 0.98.
301
302 =item *
303
304 L<Unicode::UCD> has been upgraded from version 0.37 to version 0.38.
305 This changes the output of C<prop_invmap()> for the Name_Alias property
306 to reflect the changes that are planned for Unicode 6.1, so that there
307 won't be a format change when upgrading to 6.1.  Briefly, a second
308 component of each alias is added that gives the type of alias it is.
309 Examples are at L<Unicode::UCD/prop_invmap()>.
310
311 =item *
312
313 L<Version::Requirements> has been upgraded from version 0.101020 to version 0.101021.
314
315 Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
316 which is a drop-in replacement.
317
318 =back
319
320 =head2 Removed Modules and Pragmata
321
322 =over 4
323
324 =item *
325
326 XXX
327
328 =back
329
330 =head1 Documentation
331
332 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
333 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
334
335 =head2 New Documentation
336
337 XXX Changes which create B<new> files in F<pod/> go here.
338
339 =head3 L<XXX>
340
341 XXX Description of the purpose of the new file here
342
343 =head2 Changes to Existing Documentation
344
345 XXX Changes which significantly change existing files in F<pod/> go here.
346 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
347 section.
348
349 =head3 L<perlfunc>
350
351 =over 4
352
353 =item *
354
355 C<dbmopen> treats a 0 mode as a special case, that prevents a nonexistent
356 file from being created.  This has been the case since Perl 5.000, but was
357 never documented anywhere.  Now the perlfunc entry mentions it
358 [perl #90064].
359
360 =item *
361
362 The entry for C<split> has been rewritten.  It is now far clearer than
363 before.
364
365 =back
366
367 =head3 L<perlop> and L<perlsyn>
368
369 =over 4
370
371 =item *
372
373 Documentation of the smartmatch operator has been reworked and moved from
374 perlsyn to perlop where it belongs.
375
376 =item *
377
378 Documentation of the ellipsis statement (C<...>) has been reworked and
379 moved from perlop to perlsyn.
380
381 =back
382
383 =head1 Diagnostics
384
385 The following additions or changes have been made to diagnostic output,
386 including warnings and fatal error messages.  For the complete list of
387 diagnostic messages, see L<perldiag>.
388
389 XXX New or changed warnings emitted by the core's C<C> code go here. Also
390 include any changes in L<perldiag> that reconcile it to the C<C> code.
391
392 [ Within each section, list entries as a =item entry that links to perldiag,
393   e.g.
394
395   =item *
396
397   L<Invalid version object|perldiag/"Invalid version object">
398 ]
399
400 =head2 New Diagnostics
401
402 =head3 New Errors
403
404 =over 4
405
406 =item *
407
408 L<Cannot set tied @DB::args|perldiag/"Cannot set tied @DB::args">
409
410 This error occurs when C<caller> tries to set C<@DB::args> but finds it
411 tied.  Before this error was added, it used to crash instead.
412
413 =item *
414
415 L<Cannot tie unreifiable array|perldiag/"Cannot tie unreifiable array">
416
417 This error is part of a safety check that the C<tie> operator does before
418 tying a special array like C<@_>.  You should never see this message.
419
420 =back
421
422 =head3 New Warnings
423
424 =over 4
425
426 =item *
427
428 L<defined(@array) is deprecated|perldiag/"defined(@array) is deprecated">
429
430 The long-deprecated C<defined(@array)> now also warns for package variables.
431 Previously it only issued a warning for lexical variables.
432
433 =item *
434
435 L<Useless use of \E|perldiag/"Useless use of \E">
436
437 C<\E> does nothing unless preceded by C<\Q>, C<\L> or C<\U>.
438
439 =item *
440
441 L<overload arg '%s' is invalid|perldiag/"overload arg '%s' is invalid">
442
443 This warning, in the "overload" category, is produced when the overload
444 pragma is given an argument it doesn't recognize, presumably a mistyped
445 operator.
446
447 =back
448
449 =head2 Changes to Existing Diagnostics
450
451 XXX Changes (i.e. rewording) of diagnostic messages go here
452
453 =over 4
454
455 =item *
456
457 XXX Describe change here
458
459 =back
460
461 =head2 Removals
462
463 =over 4
464
465 =item *
466
467 "sort is now a reserved word"
468
469 This error used to occur when C<sort> was called without arguments, followed by C<;> or C<)>.  (E.g., C<sort;> would die, but C<{sort}> was
470 OK.)  This error message was added in Perl 3 to catch code like
471 C<close(sort)> which would no longer work.  More than two decades later,
472 this message is no longer appropriate.  Now C<sort> without arguments is
473 always allowed, and returns an empty list, as it did in those cases where
474 it was already allowed [perl #90030].
475
476 =back
477
478 =head1 Utility Changes
479
480 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
481 here. Most of these are built within the directories F<utils> and F<x2p>.
482
483 [ List utility changes as a =head3 entry for each utility and =item
484 entries for each change
485 Use L<XXX> with program names to get proper documentation linking. ]
486
487 =head3 L<splain>
488
489 =over 4
490
491 =item *
492
493 splain no longer emits backtraces with the first line number repeated.
494 This:
495
496     Uncaught exception from user code:
497             Cannot fwiddle the fwuddle at -e line 1.
498      at -e line 1
499             main::baz() called at -e line 1
500             main::bar() called at -e line 1
501             main::foo() called at -e line 1
502
503 has become this:
504
505     Uncaught exception from user code:
506             Cannot fwiddle the fwuddle at -e line 1.
507             main::baz() called at -e line 1
508             main::bar() called at -e line 1
509             main::foo() called at -e line 1
510
511 =item *
512
513 Some error messages consist of multiple lines that are listed as separate
514 entries in L<perldiag>.  splain has been taught to find the separate
515 entries in these cases, instead of simply failing to find the message.
516
517 =back
518
519 =head1 Configuration and Compilation
520
521 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
522 go here.  Any other changes to the Perl build process should be listed here.
523 However, any platform-specific changes should be listed in the
524 L</Platform Support> section, instead.
525
526 [ List changes as a =item entry ].
527
528 =over 4
529
530 =item *
531
532 The Pod files for the perl FAQ, L<perlxs>, L<perlxstut> and L<perldoc>
533 are once again correctly installed in the same directory as the other core
534 Pods.
535
536 =for 5.16.0 This isn't a regression from 5.14.x, so don't mention this.
537
538 =back
539
540 =head1 Testing
541
542 XXX Any significant changes to the testing of a freshly built perl should be
543 listed here.  Changes which create B<new> files in F<t/> go here as do any
544 large changes to the testing harness (e.g. when parallel testing was added).
545 Changes to existing files in F<t/> aren't worth summarising, although the bugs
546 that they represent may be covered elsewhere.
547
548 [ List each test improvement as a =item entry ]
549
550 =over 4
551
552 =item *
553
554 F<t/porting/utils.t> now tests that various utility scripts compile cleanly.
555 During development, this avoids the embarrassment of inadvertently pushing a
556 commit which breaks code which isn't otherwise tested by the regression test
557 suite. For example, F<installperl> and F<installman>, needed by
558 C<make install>, are tested here.
559
560 =back
561
562 =head1 Platform Support
563
564 XXX Any changes to platform support should be listed in the sections below.
565
566 [ Within the sections, list each platform as a =item entry with specific
567 changes as paragraphs below it. ]
568
569 =head2 New Platforms
570
571 XXX List any platforms that this version of perl compiles on, that previous
572 versions did not. These will either be enabled by new files in the F<hints/>
573 directories, or new subdirectories and F<README> files at the top level of the
574 source tree.
575
576 =over 4
577
578 =item XXX-some-platform
579
580 XXX
581
582 =back
583
584 =head2 Discontinued Platforms
585
586 XXX List any platforms that this version of perl no longer compiles on.
587
588 =over 4
589
590 =item XXX-some-platform
591
592 XXX
593
594 =back
595
596 =head2 Platform-Specific Notes
597
598 XXX List any changes for specific platforms. This could include configuration
599 and compilation changes or changes in portability/compatibility.  However,
600 changes within modules for platforms should generally be listed in the
601 L</Modules and Pragmata> section.
602
603 =over 4
604
605 =item XXX-some-platform
606
607 XXX
608
609 =back
610
611 =head1 Internal Changes
612
613 XXX Changes which affect the interface available to C<XS> code go here.
614 Other significant internal changes for future core maintainers should
615 be noted as well.
616
617 [ List each change as a =item entry ]
618
619 =over 4
620
621 =item *
622
623 There are now feature bundle hints in C<PL_hints> (C<$^H>) that version
624 declarations use, to avoid having to load F<feature.pm>.  One setting of
625 the hint bits indicates a "custom" feature bundle, which means that the
626 entries in C<%^H> still apply.  F<feature.pm> uses that.
627
628 The C<HINT_FEATURE_MASK> macro is defined in F<perl.h> along with other
629 hints.  Other macros for setting and testing features and bundles are in
630 the new F<feature.h>.  C<FEATURE_IS_ENABLED> (which has moved to
631 F<feature.h>) is no longer used throughout the codebase, but more specific
632 macros, e.g., C<FEATURE_SAY_IS_ENABLED>, that are defined in F<feature.h>.
633
634 =item *
635
636 F<lib/feature.pm> is now a generated file, created by the new
637 F<regen/feature.pl> script, which also generates F<feature.h>.
638
639 =item *
640
641 Tied arrays are now always C<AvREAL>.  If C<@_> or C<DB::args> is tied, it
642 is reified first, to make sure this is always the case.
643
644 =back
645
646 =head1 Selected Bug Fixes
647
648 XXX Important bug fixes in the core language are summarised here.
649 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
650 L</Modules and Pragmata>.
651
652 [ List each fix as a =item entry ]
653
654 =over 4
655
656 =item * "b . COND" in the debugger has been fixed
657
658 Breaking on the current line with C<b . COND> was broken by previous work and
659 has now been fixed.
660
661 =item * Tying C<%^H>
662
663 Tying C<%^H> no longer causes perl to crash or ignore
664 the contents of C<%^H> when entering a compilation
665 scope [perl #106282].
666
667 =item * C<~> on vstrings
668
669 The bitwise complement operator (and possibly other operators, too) when
670 passed a vstring would leave vstring magic attached to the return value,
671 even though the string had changed.  This meant that
672 C<< version->new(~v1.2.3) >> would create a version looking like "v1.2.3"
673 even though the string passed to C<< version->new >> was actually
674 "\376\375\374".  This also caused L<B::Deparse> to deparse C<~v1.2.3>
675 incorrectly, without the C<~> [perl #29070].
676
677 =item * Vstrings blowing away magic
678
679 Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then
680 assigning something else used to blow away all the magic.  This meant that
681 tied variables would come undone, C<$!> would stop getting updated on
682 failed system calls, C<$|> would stop setting autoflush, and other
683 mischief would take place.  This has been fixed.
684
685 =item * C<newHVhv> and tied hashes
686
687 The C<newHVhv> XS function now works on tied hashes, instead of crashing or
688 returning an empty hash.
689
690 =item * Hashes will null elements
691
692 It is possible from XS code to create hashes with elements that have no
693 values.  Perl itself sometimes creates such hashes, but they are rarely
694 visible to Perl code.  The hash element and slice operators used to crash
695 when handling these in lvalue context.  These have been fixed.  They now
696 produce a "Modification of non-creatable hash value attempted" error
697 message.
698
699 =item * No warning for C<open(foo::bar)>
700
701 When one writes C<open foo || die>, which used to work in Perl 4, a
702 "Precedence problem" warning is produced.  This warning used erroneously to
703 apply to fully-qualified bareword handle names not followed by C<||>.  This
704 has been corrected.
705
706 =item * C<select> and package aliasing
707
708 After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument
709 would sometimes return a name that could not be used to refer to the
710 filehandle, or sometimes it would return C<undef> even when a filehandle
711 was selected.  Now it returns a typeglob reference in such cases.
712
713 =item * C<PerlIO::get_layers> and tied variables
714
715 C<PerlIO::get_layers> no longer ignores FETCH on tied variables as it used
716 to most of the time [perl #97956].
717
718 =item * C<PerlIO::get_layers> and numbers
719
720 C<PerlIO::get_layers> no longer ignores some arguments that it thinks are
721 numeric, while treating others as filehandle names.  It is now consistent
722 for flat scalars (i.e., not references).
723
724 =item * Lvalue subs and strict mode
725
726 Lvalue sub calls that are not determined to be such at compile time
727 (C<&$name> or &{"name"}) are no longer exempt from strict refs if they
728 occur in the last statement of an lvalue subroutine [perl #102486].
729
730 =item * Non-lvalue sub calls in potentially lvalue context
731
732 Sub calls whose subs are not visible at compile time, if
733 they occurred in the last statement of an lvalue subroutine,
734 would reject non-lvalue subroutines and die with "Can't modify non-lvalue
735 subroutine call" [perl #102486].
736
737 Non-lvalue sub calls whose subs I<are> visible at compile time exhibited
738 the opposite bug.  If the call occurred in the last statement of an lvalue
739 subroutine, there would be no error when the lvalue sub was called in
740 lvalue context.  Perl would blindly assign to the temporary value returned
741 by the non-lvalue subroutine.
742
743 =item * AUTOLOADing lvalue subs
744
745 C<AUTOLOAD> routines used to take precedence over the actual sub being
746 called (i.e., when autoloading wasn't needed), for sub calls in lvalue or
747 potential lvalue context, if the subroutine was not visible at compile
748 time.
749
750 =item * C<caller> and tied C<@DB::args>
751
752 C<caller> sets C<@DB::args> to the subroutine arguments when called from
753 the DB package.  It used to crash when doing so if C<@DB::args> happened to
754 be tied.  Now it croaks instead.
755
756 =item * Tying C<@_>
757
758 Under debugging builds, this code:
759
760   sub TIEARRAY{bless[]}
761   sub {
762     tie @_, "";
763     \@_;
764   }->(1);
765
766 use to produce an "av_reify called on tied array" warning.  It doesn't any
767 more.
768
769 =item * Unrecognised switches on C<#!> line
770
771 If a switch, such as B<-x>, that cannot occur on the C<#!> line is used
772 there, perl dies with "Can't emulate...".
773
774 It used to produce the same message for switches that perl did not
775 recognise at all, whether on the command line or the C<#!> line.
776
777 Now it produces the "Unrecognized switch" error message [perl #104288].
778
779 =item * C<system> and SIGCHLD
780
781 C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the
782 signal handler from stealing the exit status [perl #105700].
783
784 =item * Deleting methods via C<delete>
785
786 Deletion of methods via C<delete $Class::{method}> syntax used to update
787 method caches if called in void context, but not scalar or list context.
788 Now it always updates those caches.
789
790 =item * Hash element deletion and destructors
791
792 When hash elements are deleted in void context, the internal hash entry is
793 now freed before the value is freed, to prevent destructors called by that
794 latter freeing from seeing the hash in an inconsistent state.  It was
795 possible to cause double-frees if the destructor freed the hash itself
796 [perl #100340].
797
798 =item * C<(s)printf>'s %n formatting code
799
800 The %n formatting code, which causes the number of characters to be
801 assigned to the next argument to C<printf> or C<sprintf> now actually
802 assigns the number of characters, instead of the number of bytes.
803
804 It also works now with special lvalue functions like C<substr> and with
805 nonexistent hash and array elements [perl #103492].
806
807 =item * Typeglobs and threads
808
809 Typeglobs returned from threads are no longer cloned if the parent thread
810 already has a glob with the same name.  This means that returned
811 subroutines will now assign to the right package variables [perl #107366].
812
813 =item * C<local $_>
814
815 In Perl 5.14, C<local $_> was changed to create a new variable not tied to
816 anything, even if $_ was tied before that.  But, due to an oversight, it
817 would still call FETCH once on a tied $_ before replacing it with the new
818 variable.  This has been fixed [perl #105912].
819
820 =item * Returning tied variables
821
822 When returning a value from a non-lvalue subroutine, Perl copies the value.
823 Sometimes it cheats for the sake of speed, and does not copy the value if
824 it makes no observable difference.  This optimisation was erroneously
825 allowing the copy to be skipped on tied variables, causing a difference in
826 behaviour depending on the tied variable's reference count.  This has been
827 fixed [perl #95548].
828
829 =item * C<{@a = sort}> no longer crashes
830
831 This particular piece of code (C<sort> with no arguments assigned to an
832 array, inside a block with no C<;>) started crashing in an earlier 5.15.x
833 release.  It has been fixed.
834
835 =item * C<utf8::decode> and read-only scalars
836
837 C<utf8::decode> now refuses to modify read-only scalars [perl #91850].
838
839 =item * C<dbmopen> with undefined mode
840
841 C<dbmopen> now only warns once, rather than three times, if the mode
842 argument is C<undef> [perl #90064].
843
844 =item * Freeing an aggregate during list assignment
845
846 If list assignment to a hash or array triggered destructors that freed the
847 hash or array itself, a crash would ensue.  This is no longer the case
848 [perl #107440].
849
850 =item * Confused internal bookkeeping with @ISA arrays
851
852 Creating a weak reference to an @ISA array or accessing the array index
853 (C<$#ISA>) could result in confused internal bookkeeping for elements
854 subsequently added to the @ISA array.  For instance, creating a weak
855 reference to the element itself could push that weak reference on to @ISA;
856 and elements added after use of C<$#ISA> would be ignored by method lookup
857 [perl #85670].
858
859 =item * DELETE on scalar ties
860
861 Tying an element of %ENV or C<%^H> and then deleting that element would
862 result in a call to the tie object's DELETE method, even though tying the
863 element itself is supposed to be equivalent to tying a scalar (the element
864 is, of course, a scalar) [perl #67490].
865
866 =item * Freeing $_ inside C<grep> or C<map>
867
868 Freeing $_ inside a C<grep> or C<map> block or a code block embedded in a
869 regular expression used to result in double frees [perl #92254, #92256].
870
871 =item * Warnings with C<+=>
872
873 The C<+=> operator does not usually warn when the left-hand side is
874 C<undef>, but it was doing so for tied variables.  This has been fixed
875 [perl #44895].
876
877 =item * Tying and autovivification
878
879 When Perl autovivifies an element of a tied array or hash (which entails
880 calling STORE with a new reference), it now calls FETCH immediately after
881 the STORE, instead of assuming that FETCH would have returned the same
882 reference.  This can make it easier to implement tied objects [perl #35865, #43011].
883
884 =item * C<@&> and C<$&>
885
886 Mentioning a variable named "&" other than C<$&> (i.e., C<@&> or C<%&>) no
887 longer stops C<$&> from working.  The same applies to variables named "'"
888 and "`" [perl #24237].
889
890 =item * Stacked filetests
891
892 C<-T> and C<-B> now work when stacked up with other filetest operators
893 [perl #77388].
894
895 =item * Filetests and stat buffers
896
897 Perl keeps several internal variables to keep track of the last stat
898 buffer, from which file(handle) it originated, what type it was, and
899 whether the last stat succeeded.
900
901 There were various cases where these could get out of synch, resulting in
902 inconsistent or erratic behaviour in edge cases (every mention of C<-T>
903 applies to C<-B> as well):
904
905 =over
906
907 =item *
908
909 C<-T I<HANDLE>>, even though it does a C<stat>, was not resetting the last
910 stat type, so an C<lstat _> following it would merrily return the wrong
911 results.  Also, it was not setting the success status.
912
913 =item *
914
915 Freeing the handle last used by C<stat> or a filetest could result in
916 S<C<-T _>> using an unrelated handle.
917
918 =item *
919
920 C<stat> with an IO reference (as returned by C<*STDIO{IO}>, for instance)
921 would not reset the stat type.
922
923 =item *
924
925 C<stat> with an IO reference was not recording the filehandle for
926 S<C<-T _>> to use.
927
928 =item *
929
930 The presence of fatal warnings could cause the stat buffer not to be reset
931 for a filetest operator on an unopened filehandle or C<-l> on any handle.
932
933 =item *
934
935 Fatal warnings would stop C<-T> from setting C<$!>.
936
937 =item *
938
939 When the last stat was on an unreadable file, C<-T _> is supposed to
940 return C<undef>, leaving the last stat buffer unchanged.  But it was
941 setting the stat type, causing C<lstat _> to stop working.
942
943 =item *
944
945 C<-T I<FILENAME>> was not resetting the internal stat buffers for
946 unreadable files.
947
948 =back
949
950 These have all been fixed.
951
952 =item * C<defined *{"!"}>
953
954 An earlier 5.15.x release caused this construct to stop the C<%!> hash
955 from working.  Likewise C<defined *{"+"}> and C<defined *{"-"}> caused
956 C<%+> and C<%->, respectively, to stop working.  This has been fixed.
957
958 =item * C<-T _> with no preceding C<stat>
959
960 This used to produce a confusing "uninitialized" warning, even though there
961 is no visible uninitialized value to speak of.
962
963 =item * C<stat I<HANDLE>> and fstat failures
964
965 If the operating system's C<fstat> function failed, C<stat> would warn
966 about an unopened handle, even though that was not the case.  This has been
967 fixed.
968
969 =item * C<lstat I<IOREF>>
970
971 C<lstat> is documented to fall back to C<stat> (with a warning) when given
972 a filehandle.  When passed an IO reference, it was actually doing the
973 equivalent of S<C<stat _>> and ignoring the handle.
974
975 =item * Crashes with warnings
976
977 Two warning messages that mention variable names started crashing in
978 5.15.5, but have been fixed [perl #106726].
979
980 =item * Bitwise assignment operators and copy-on-write
981
982 In 5.14.0, the bitwise assignment operators C<|=>, C<^=> and C<&=> starting
983 leaving the left-hand side undefined if it happened to be a copy-on-write
984 string.  This has been fixed [perl #108480].
985
986 =back
987
988 =head1 Known Problems
989
990 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
991 tests that had to be C<TODO>ed for the release would be noted here, unless
992 they were specific to a particular platform (see below).
993
994 This is a list of some significant unfixed bugs, which are regressions
995 from either 5.XXX.XXX or 5.XXX.XXX.
996
997 [ List each fix as a =item entry ]
998
999 =over 4
1000
1001 =item *
1002
1003 XXX
1004
1005 =back
1006
1007 =head1 Obituary
1008
1009 XXX If any significant core contributor has died, we've added a short obituary
1010 here.
1011
1012 =head1 Acknowledgements
1013
1014 XXX Generate this with:
1015
1016   perl Porting/acknowledgements.pl v5.15.6..HEAD
1017
1018 =head1 Reporting Bugs
1019
1020 If you find what you think is a bug, you might check the articles
1021 recently posted to the comp.lang.perl.misc newsgroup and the perl
1022 bug database at http://rt.perl.org/perlbug/ .  There may also be
1023 information at http://www.perl.org/ , the Perl Home Page.
1024
1025 If you believe you have an unreported bug, please run the L<perlbug>
1026 program included with your release.  Be sure to trim your bug down
1027 to a tiny but sufficient test case.  Your bug report, along with the
1028 output of C<perl -V>, will be sent off to perlbug@perl.org to be
1029 analysed by the Perl porting team.
1030
1031 If the bug you are reporting has security implications, which make it
1032 inappropriate to send to a publicly archived mailing list, then please send
1033 it to perl5-security-report@perl.org. This points to a closed subscription
1034 unarchived mailing list, which includes
1035 all the core committers, who will be able
1036 to help assess the impact of issues, figure out a resolution, and help
1037 co-ordinate the release of patches to mitigate or fix the problem across all
1038 platforms on which Perl is supported. Please only use this address for
1039 security issues in the Perl core, not for modules independently
1040 distributed on CPAN.
1041
1042 =head1 SEE ALSO
1043
1044 The F<Changes> file for an explanation of how to view exhaustive details
1045 on what changed.
1046
1047 The F<INSTALL> file for how to build Perl.
1048
1049 The F<README> file for general stuff.
1050
1051 The F<Artistic> and F<Copying> files for copyright information.
1052
1053 =cut