This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
two perldelta fixes
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 [ this is a template for a new perldelta file. Any text flagged as
6 XXX needs to be processed before release. ]
7
8 perldelta - what is new for perl v5.15.0
9
10 =for comment
11 This has been completed up to 3ed94dc04.
12
13 =head1 DESCRIPTION
14
15 This document describes differences between the 5.15.0 release and
16 the 5.14.0 release.
17
18 If you are upgrading from an earlier release such as 5.YYY.YYY, first read
19 L<perl5YYYdelta>, which describes differences between 5.ZZZ.ZZZ and
20 5.YYY.YYY.
21
22 Some of the changes have been included in Perl 5.14.1.  These are
23 indicated with a "(5.14.1)" marker.
24
25 XXX compare this perldelta to 5.14.1 and double check the notation
26
27 =head1 Notice
28
29 XXX Any important notices here
30
31 =head1 Core Enhancements
32
33 XXX New core language features go here. Summarise user-visible core language
34 enhancements. Particularly prominent performance optimisations could go
35 here, but most should go in the L</Performance Enhancements> section.
36
37 [ List each enhancement as a =head2 entry ]
38
39 =head2 C<CORE::> works on all keywords
40
41 The C<CORE::> prefix can now be used on keywords enabled by
42 L<feature.pm|feature>, even outside the scope of C<use feature>.
43
44 =head2 C<continue> no longer requires the "switch" feature
45
46 The C<continue> keyword has two meanings.  It can introduce a C<continue>
47 block after a loop, or it can exit the current C<when> block.  Up till now,
48 the latter meaning was only valid with the "switch" feature enabled, and
49 was a syntax error otherwise.  Since the main purpose of feature.pm is to
50 avoid conflicts with user-defined subroutines, there is no reason for
51 C<continue> to depend on it.
52
53 =head2 C<$$> can be assigned to
54
55 C<$$> was made read-only in Perl 5.8.0.  But only sometimes: C<local $$>
56 would make it writable again.  Some CPAN modules were using C<local $$> or
57 XS code to bypass the read-only check, so there is no reason to keep C<$$>
58 read-only.  (This change also allowed a bug to be fixed while maintaining
59 backward compatibility.)
60
61 =head2 Features inside the debugger
62
63 The current Perl's feature bundle is now enabled for commands entered in
64 the interactive debugger.
65
66 =head2 C<\N{...}> can now have Unicode loose name matching
67
68 This is described in the C<charnames> item in
69 L</Updated Modules and Pragmata> below.
70
71 =head2 Breakpoints with file names
72
73 The debugger's "b" command for setting breakpoints now allows a line number
74 to be prefixed with a file name.  See
75 L<perldebug/"b [file]:[line] [condition]">.
76
77 =head1 Security
78
79 XXX Any security-related notices go here.  In particular, any security
80 vulnerabilities closed should be noted here rather than in the
81 L</Selected Bug Fixes> section.
82
83 [ List each security issue as a =head2 entry ]
84
85 =head1 Incompatible Changes
86
87 [ List each incompatible change as a =head2 entry ]
88
89 =head2 Tying scalars that hold typeglobs
90
91 Attempting to tie a scalar after a typeglob was assigned to it would
92 instead tie the handle in the typeglob's IO slot.  This meant that it was
93 impossible to tie the scalar itself.  Similar problems affected C<tied> and
94 C<untie>: C<tied $scalar> would return false on a tied scalar if the last
95 thing returned was a typeglob, and C<untie $scalar> on such a tied scalar
96 would do nothing.
97
98 We fixed this problem before Perl 5.14.0, but it caused problems with some
99 CPAN modules, so we put in a deprecation cycle instead.
100
101 Now the deprecation has been removed and this bug has been fixed.  So
102 C<tie $scalar> will always tie the scalar, not the handle it holds.  To tie
103 the handle, use C<tie *$scalar> (with an explicit asterisk).  The same
104 applies to C<tied *$scalar> and C<untie *$scalar>.
105
106 =head2 IPC::Open3 no longer provides C<xfork()>, C<xclose_on_exec()>
107 and C<xpipe_anon()>
108
109 All three functions were private, undocumented and unexported.  They do
110 not appear to be used by any code on CPAN.  Two have been inlined and one
111 deleted entirely.
112
113 =head2 C<$$> no longer caches PID
114
115 Previously, if one embeds Perl or uses XS and calls fork(3) from C, Perls
116 notion of C<$$> could go out of sync with what getpid() returns. By always
117 fetching the value of C<$$> via getpid(), this potential bug is eliminated.
118 Code that depends on the caching behavior will break.  As described in
119 L</Core Enhancements>, C<$$> is now writable, but it will be reset during a
120 fork.
121
122 =head1 Deprecations
123
124 XXX Any deprecated features, syntax, modules etc. should be listed here.
125 In particular, deprecated modules should be listed here even if they are
126 listed as an updated module in the L</Modules and Pragmata> section.
127
128 [ List each deprecation as a =head2 entry ]
129
130 =head1 Performance Enhancements
131
132 XXX Changes which enhance performance without changing behaviour go here. There
133 may well be none in a stable release.
134
135 [ List each enhancement as a =item entry ]
136
137 =over 4
138
139 =item *
140
141 XXX
142
143 =back
144
145 =head1 Modules and Pragmata
146
147 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
148 go here.  If Module::CoreList is updated, generate an initial draft of the
149 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
150 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
151 below.  A paragraph summary for important changes should then be added by hand.
152 In an ideal world, dual-life modules would have a F<Changes> file that could be
153 cribbed.
154
155 [ Within each section, list entries as a =item entry ]
156
157 =head2 New Modules and Pragmata
158
159 =over 4
160
161 =item *
162
163 XXX
164
165 =back
166
167 =head2 Updated Modules and Pragmata
168
169 =over 4
170
171 =item *
172
173 L<constant> has been updated from version 1.21 to 1.22.
174
175 =item *
176
177 L<Archive::Extract> has been upgraded from version 0.48 to version 0.52
178
179 Includes a fix for FreeBSD to only use C<unzip> if it is located in
180 C</usr/local/bin>, as FreeBSD 9.0 will ship with a limited C<unzip> in
181 C</usr/bin>.
182
183 =item *
184
185 L<Attribute::Handlers> updated from version 0.88 to 0.91
186
187 =item *
188
189 L<B> has been upgraded from version 1.29 to version 1.30.
190
191 =item *
192
193 L<B::Deparse> has been upgraded from version 1.03 to 1.05.
194
195 It addresses two regressions in Perl 5.14.0:
196
197 =over
198
199 =item *
200
201 Deparsing of the C<glob> operator and its diamond (C<< <> >>) form now
202 works again [RT #90898] (5.14.1).
203
204 =item *
205
206 The presence of subroutines named C<::::> or C<::::::> no longer causes
207 B::Deparse to hang (5.14.1).
208
209 =back
210
211 Plus a few other bugs:
212
213 =over
214
215 =item *
216
217 Deparsing of handle C<keys>, C<each> and C<value> with a scalar argument
218 now works [RT #91008].
219
220 =item *
221
222 C<readpipe> followed by a complex expression (as opposed to a simple scalar
223 variable) now works.
224
225 =item *
226
227 It now puts C<CORE::> in front of overridable core keywords if they
228 conflict with user-defined subroutines.
229
230 =item *
231
232 Deparsing assignment to an lvalue method specified as a variable
233 (C<< $obj->$method = ... >>) used not to work [RT #62498].
234
235 =back
236
237 =item *
238
239 L<CGI> has been upgraded from version 3.52 to version 3.54
240
241 The DELETE HTTP verb is now supported.
242
243 =item *
244
245 L<Compress::Zlib> has been upgraded from version 2.033 to version 2.035
246
247 =item *
248
249 L<Compress::Raw::Bzip2> has been upgraded from version 2.033 to version 2.035
250
251 =item *
252
253 L<Compress::Raw::Zlib> has been upgraded from version 2.033 to version 2.035
254
255 =item *
256
257 L<CPAN::Meta> has been upgraded from version 2.110440 to version 2.110930
258
259 =item *
260
261 L<CPANPLUS> has been upgraded from version 0.9103 to version 0.9105
262
263 Now understands specifying modules to install in the format 'Module/Type.pm'
264
265 =item *
266
267 L<CPANPLUS::Dist::Build> has been upgraded from version 0.54 to version 0.56
268
269 =item *
270
271 L<Data::Dumper> has been upgraded from version 2.128 to 2.131.
272
273 =item *
274
275 L<DB_File> has been upgraded from version 1.821 to version 1.822
276
277 Warnings are now in sync with perl's
278
279 =item *
280
281 L<Digest::SHA> has been upgraded from version 5.61 to version 5.62
282
283 No longer loads L<MIME::Base64> as this was unnecessary.
284
285 =item *
286
287 L<Devel::Peek> has been upgraded from version 1.07 to 1.08.
288
289 Its C<fill_mstats> function no longer refuses to write to copy-on-write
290 scalars.
291
292 =item *
293
294 L<Encode> has been upgraded from version 2.42 to version 2.43
295
296 Missing aliases added, a deep recursion error fixed and various
297 documentation updates.
298
299 =item *
300
301 L<ExtUtils::CBuilder> updated from version 0.280203 to 0.280204.  The new version
302 append CFLAGS and LDFLAGS to their Config.pm counterparts.
303
304 =item *
305
306 L<Filter::Util::Call> has been upgraded from version 1.08 to version 1.39
307
308 C<decrypt> fixed to work with v5.14.0
309
310 =item *
311
312 L<Filter::Simple> updated from version 0.85 to 0.87
313
314 =item *
315
316 L<FindBin> updated from version 1.50 to 1.51.
317
318 It no longer returns a wrong result if a script of the same name as the
319 current one exists in the path and is executable.
320
321 =item *
322
323 L<JSON::PP> has been upgraded from version 2.27105 to version 2.27200
324
325 Fixed C<incr_parse> decoding string more correctly.
326
327 =item *
328
329 L<I18N::LangTags> has been upgraded from version 0.35_01 to version 0.36.
330
331 Fix broken URLs for RFCs.
332
333 =item *
334
335 L<IPC::Open3> has been upgraded from version 1.10 to version 1.11.
336
337 =over 4
338
339 =item *
340
341 Fixes a bug which prevented use of C<open3> on Windows when C<*STDIN>,
342 C<*STDOUT> or C<*STDERR> had been localized.
343
344 =item *
345
346 Fixes a bug which prevented duplicating numeric file descriptors on Windows.
347
348 =back
349
350 =item *
351
352 L<Math::BigFloat> has been upgraded from version 1.993 to 1.994.
353
354 The C<numify> method has been corrected to return a normalised Perl number
355 (the result of C<0 + $thing>), instead of a string [rt.cpan.org #66732].
356
357 =item *
358
359 L<Math::BigInt> has been upgraded from version 1.994 to 1.995.
360
361 It provides a new C<bsgn> method that complements the C<babs> method.
362
363 It fixes the internal C<objectify> function's handling of "foreign objects"
364 so they are converted to the appropriate class (Math::BigInt or
365 Math::BigFloat).
366
367 =item *
368
369 L<Math::Complex> has been upgraded from version 1.56 to version 1.57.
370
371 Correct copy constructor usage.
372 Fix polarwise formatting with numeric format specifier.
373 More stable C<great_circle_direction> algorithm.
374
375 =item *
376
377 L<Module::CoreList> has been upgraded from version 2.49 to 2.50.
378
379 Updated for v5.12.4.
380
381 =item *
382
383 L<mro> has been updated to remove two broken URLs in the documentation.
384
385 =item *
386
387 L<Object::Accessor> has been upgraded from version 0.38 to version 0.42
388
389 Eliminated use of C<exists> on array elements which has been deprecated.
390
391 =item *
392
393 L<ODBM_File> has been upgraded from version 1.10 to version 1.11.
394
395 The XS code is now compiled with C<PERL_NO_GET_CONTEXT>, which will aid
396 performance under ithreads.
397
398 =item *
399
400 L<PerlIO::encoding> has been upgraded from version 0.14 to 0.15
401
402 =item *
403
404 L<PerlIO::scalar> has been upgraded from version 0.11 to 0.12.
405
406 It fixes a problem with C<< open my $fh, ">", \$scalar >> not working if
407 C<$scalar> is a copy-on-write scalar.
408
409 It also fixes a hang that occurs with C<readline> or C<< <$fh> >> if a
410 typeglob has been assigned to $scalar [RT #92258].
411
412 =item *
413
414 L<Pod::Perldoc> has been upgraded from version 3.15_03 to 3.15_05.
415
416 It corrects the search paths on VMS [RT #90640].
417
418 =item *
419
420 L<Storable> has been upgraded from version 2.27 to version 2.28.
421
422 It no longer turns copy-on-write scalars into read-only scalars when
423 freezing and thawing.
424
425 =item *
426
427 L<Sys::Syslog> has been upgraded from version 0.27 to version 0.29
428
429 Large number of Request Tickets resolved.
430
431 =item *
432
433 L<Time::HiRes> has been upgraded from version 1.9721_01 to version 1.9722.
434
435 Portability fix, and avoiding some compiler warnings.
436
437 =item *
438
439 L<Unicode::Collate> has been upgraded from version 0.73 to version 0.76
440
441 Updated to CLDR 1.9.1
442
443 =item *
444
445 L<Unicode::Normalize> has been upgraded from version 1.10 to version 1.12
446
447 Fixes for the removal of F<unicore/CompositionExclusions.txt> from core.
448
449 =item *
450
451 L<XSLoader> has been upgraded from version 0.13 to version 0.15
452
453 Integrated changes from bleadperl
454
455 =item *
456
457 L<charnames> can now be invoked with a new option, C<:loose>,
458 which is like the existing C<:full> option, but enables Unicode loose
459 name matching.  This means that instead of
460 having to get the name of the code point or sequence you want exactly right,
461 you can fudge things somewhat.  This is especially useful when
462 you don't remember if the official Unicode name uses hyphens or
463 blanks between words.  Details are in L<charnames/LOOSE MATCHES>.
464
465 XXX
466
467 =back
468
469 =head2 Removed Modules and Pragmata
470
471 As promised in Perl 5.14.0's release notes, the following modules have
472 been removed from the core distribution, and if needed should be installed
473 from CPAN instead.
474
475 =over
476
477 =item *
478
479 L<Devel::DProf> has been removed from the Perl core.  Prior version was 20110228.00.
480
481 =item *
482
483 L<Shell> has been removed from the Perl core.  Prior version was 0.72_01.
484
485 =back
486
487 =head1 Documentation
488
489 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
490 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
491
492 =head2 New Documentation
493
494 XXX Changes which create B<new> files in F<pod/> go here.
495
496 =head3 L<XXX>
497
498 XXX Description of the purpose of the new file here
499
500 =head2 Changes to Existing Documentation
501
502 XXX Changes which significantly change existing files in F<pod/> go here.
503 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
504 section.
505
506 =head3 L<perlfork>
507
508 =over
509
510 =item *
511
512 Added portability caveats related to using C<kill> on forked process.
513
514 =back
515
516 =head3 L<perlfunc>
517
518 =over
519
520 =item *
521
522 C<given>, C<when> and C<default> are now listed in L<perlfunc> (5.14.1).
523
524 =item *
525
526 The examples for the C<select> function no longer use strings for file
527 handles.
528
529 =back
530
531 =head3 L<perlguts>
532
533 =over
534
535 =item *
536
537 Some of the function descriptions in L<perlguts> were confusing, as it was
538 not clear whether they referred to the function above or below the
539 description.  This has been clarified [RT #91790].
540
541 =back
542
543 =head3 L<perllol>
544
545 =over
546
547 =item *
548
549 L<perllol> has been expanded with examples using the new C<push $scalar>
550 syntax introduced in Perl 5.14.0 (5.14.1).
551
552 =back
553
554 =head3 L<perlmod>
555
556 =over
557
558 =item *
559
560 L<perlmod> now states explicitly that some types of explicit symbol table
561 manipulation are not supported.  This codifies what was effectively already
562 the case [RT #78074].
563
564 =back
565
566 =head3 L<perlop>
567
568 =over 4
569
570 =item *
571
572 The explanation of bitwise operators has been expanded to explain how they
573 work on Unicode strings (5.14.1).
574
575 =item *
576
577 The section on the triple-dot or yada-yada operator has been moved up, as
578 it used to separate two closely related sections about the comma operator
579 (5.14.1).
580
581 =item *
582
583 More examples for C<m//g> have been added (5.14.1).
584
585 =item *
586
587 The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1).
588
589 =back
590
591 =head3 L<perlpodstyle>
592
593 =over 4
594
595 =item *
596
597 The tips on which formatting codes to use have been corrected and greatly
598 expanded.
599
600 =item *
601
602 There are now a couple of example one-liners for previewing POD files after
603 they have been edited.
604
605 =back
606
607 =head3 L<perlre>
608
609 =over
610
611 =item *
612
613 The C<(*COMMIT)> directive is now listed in the right section
614 (L<Verbs without an argument|perlre/Verbs without an argument>).
615
616 =back
617
618 =head3 L<perlrun>
619
620 =over
621
622 =item *
623
624 L<perlrun> has undergone a significant clean-up.  Most notably, the
625 B<-0x...> form of the B<-0> flag has been clarified, and the final section
626 on environment variables has been corrected and expanded (5.14.1).
627
628 =back
629
630 =head3 L<perlvar>
631
632 =over
633
634 =item *
635
636 The documentation for L<$!|perlvar/$!> has been corrected and clarified.
637 It used to state that $! could be C<undef>, which is not the case.  It was
638 also unclear as to whether system calls set C's C<errno> or Perl's C<$!>
639 [RT #91614].
640
641 =back
642
643 =head3 L<POSIX>
644
645 =over
646
647 =item *
648
649 The invocation documentation for C<WIFEXITED>, C<WEXITSTATUS>,
650 C<WIFSIGNALED>, C<WTERMSIG>, C<WIFSTOPPED>, and C<WSTOPSIG> has been
651 corrected (5.14.1).
652
653 =back
654
655 =head1 Diagnostics
656
657 The following additions or changes have been made to diagnostic output,
658 including warnings and fatal error messages.  For the complete list of
659 diagnostic messages, see L<perldiag>.
660
661 XXX New or changed warnings emitted by the core's C<C> code go here. Also
662 include any changes in L<perldiag> that reconcile it to the C<C> code.
663
664 [ Within each section, list entries as a =item entry ]
665
666 =head2 New Diagnostics
667
668 XXX Newly added diagnostic messages go here
669
670 =head3 New Warnings
671
672 =over 4
673
674 =item L<Useless assignment to a temporary|perldiag/"Useless assignment to a temporary">
675
676 Assigning to a temporary returned from an XS lvalue subroutine now produces a
677 warning [RT #31946].
678
679 =back
680
681 =head2 Changes to Existing Diagnostics
682
683 XXX Changes (i.e. rewording) of diagnostic messages go here
684
685 =over 4
686
687 =item *
688
689 XXX
690
691 =back
692
693 =head1 Utility Changes
694
695 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
696 here. Most of these are built within the directories F<utils> and F<x2p>.
697
698 [ List utility changes as a =head3 entry for each utility and =item
699 entries for each change
700 Use L<XXX> with program names to get proper documentation linking. ]
701
702 =head3 L<XXX>
703
704 =over 4
705
706 =item *
707
708 XXX
709
710 =back
711
712 =head1 Configuration and Compilation
713
714 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
715 go here.  Any other changes to the Perl build process should be listed here.
716 However, any platform-specific changes should be listed in the
717 L</Platform Support> section, instead.
718
719 [ List changes as a =item entry ].
720
721 =over 4
722
723 =item *
724
725 F<regexp.h> has been modified for compatibility with GCC's B<-Werror>
726 option, as used by some projects that include perl's header files (5.14.1).
727
728 =item *
729
730 USE_LOCALE{,_COLLATE,_CTYPE,_NUMERIC} have been added the output of perl -V
731 as they have affect the behaviour of the interpreter binary (albeit only
732 in a small area).
733
734 =item *
735
736 The code and tests for L<IPC::Open2> have been moved from F<ext/IPC-Open2>
737 into F<ext/IPC-Open3>, as C<IPC::Open2::open2()> is implemented as a thin
738 wrapper around C<IPC::Open3::_open3()>, and hence is very tightly coupled to
739 it.
740
741 =back
742
743 =head1 Testing
744
745 XXX Any significant changes to the testing of a freshly built perl should be
746 listed here.  Changes which create B<new> files in F<t/> go here as do any
747 large changes to the testing harness (e.g. when parallel testing was added).
748 Changes to existing files in F<t/> aren't worth summarising, although the bugs
749 that they represent may be covered elsewhere.
750
751 [ List each test improvement as a =item entry ]
752
753 =over 4
754
755 =item *
756
757 XXX
758
759 =back
760
761 =head1 Platform Support
762
763 XXX Any changes to platform support should be listed in the sections below.
764
765 [ Within the sections, list each platform as a =item entry with specific
766 changes as paragraphs below it. ]
767
768 =head2 New Platforms
769
770 XXX List any platforms that this version of perl compiles on, that previous
771 versions did not. These will either be enabled by new files in the F<hints/>
772 directories, or new subdirectories and F<README> files at the top level of the
773 source tree.
774
775 =over 4
776
777 =item GNU/Hurd
778
779 =over
780
781 =item *
782
783 No longer overrides possible extra $ccflags values given to Configure
784 on GNU/Hurd.  C.f. Bug-Debian: http://bugs.debian.org/587901
785
786 =back
787
788 =item Mac OS X
789
790 Clarified Apple Developer Tools requirements in F<README.macosx>
791
792 =item MSWin32
793
794 Supplied F<makefile.mk> patched to support gcc-4.x.x and README.win32
795 updated accordingly. [RT #91354]
796
797 =item Solaris
798
799 Updated the list of required packages for building perl to reflect Solaris 9
800 and 10 in README.solaris [RT #90850]
801
802 =back
803
804 =head2 Discontinued Platforms
805
806 XXX List any platforms that this version of perl no longer compiles on.
807
808 =over 4
809
810 =item XXX-some-platform
811
812 XXX
813
814 =back
815
816 =head2 Platform-Specific Notes
817
818 XXX List any changes for specific platforms. This could include configuration
819 and compilation changes or changes in portability/compatibility.  However,
820 changes within modules for platforms should generally be listed in the
821 L</Modules and Pragmata> section.
822
823 =head3 Ubuntu Linux
824
825 =over 4
826
827 =item *
828
829 The L<ODBM_File> installation process has been updated with the new library
830 paths on Ubuntu natty [RT #90106].
831
832 =item *
833
834 I<h2ph> now gets the include paths from gcc correctly.  This stopped
835 working when Ubuntu switched to a "multiarch" setup [RT #90122].
836
837 =back
838
839 =head1 Internal Changes
840
841 XXX Changes which affect the interface available to C<XS> code go here.
842 Other significant internal changes for future core maintainers should
843 be noted as well.
844
845 =over 4
846
847 =item *
848
849 When empting a hash of its elements (e.g. via undef(%h), or %h=()), HvARRAY
850 field is no longer temporarily zeroed.  Any destructors called on the freed
851 elements see the remaining elements. Thus, %h=() becomes more like C<delete
852 $h{$_} for keys %h>.
853
854 =item *
855
856 The compiled representation of formats is now stored via the C<mg_ptr> of
857 their C<PERL_MAGIC_fm>. Previously it was stored in the string buffer,
858 beyond C<SvLEN()>, the regular end of the string. C<SvCOMPILED()> and
859 C<SvCOMPILED_{on,off}()> now exist solely for compatibility for XS code.
860 The first is always 0, the other two now no-ops.
861
862 =item *
863
864 Boyer-Moore compiled scalars are now PVMGs, and the Boyer-Moore tables are now
865 stored via the mg_ptr of their C<PERL_MAGIC_bm>. Previously they were PVGVs,
866 with the tables stored in the string buffer, beyond C<SvLEN()>. This eliminates
867 the last place where the core stores data beyond C<SvLEN()>.
868
869 =item *
870
871 Simplified logic in C<Perl_sv_magic()> introduces a small change of
872 behaviour for error cases involving unknown magic types. Previously, if
873 C<Perl_sv_magic()> was passed a magic type unknown to it, it would
874
875 =over
876
877 =item 1.
878
879 Croak "Modification of a read-only value attempted" if read only
880
881 =item 2.
882
883 Return without error if the SV happened to already have this magic
884
885 =item 3.
886
887 otherwise croak "Don't know how to handle magic of type \\%o"
888
889 =back
890
891 Now it will always croak "Don't know how to handle magic of type \\%o", even
892 on read only values, or SVs which already have the unknown magic type.
893
894 =back
895
896 =head1 Selected Bug Fixes
897
898 XXX Important bug fixes in the core language are summarised here.
899 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
900 L</Modules and Pragmata>.
901
902 [ List each fix as a =item entry ]
903
904 =head2 Regular expressions and character classes
905
906 =over 4
907
908 =item *
909
910 The new (in 5.14.0) regular expression modifier C</a> when repeated like
911 C</aa> forbids the characters outside the ASCII range that match
912 characters inside that range from matching under C</i>.  This did not
913 work under some circumstances, all involving alternation, such as:
914
915  "\N{KELVIN SIGN}" =~ /k|foo/iaa;
916
917 succeeded inappropriately.  This is now fixed.
918
919 =item *
920
921 5.14.0 introduced some memory leaks in regular expression character
922 classes such as C<[\w\s]>, which have now been fixed
923
924 =item *
925
926 An edge case in regular expression matching could potentially loop.
927 This happened only under C</i> in bracketed character classes that have
928 characters with multi-character folds, and the target string to match
929 against includes the first portion of the fold, followed by another
930 character that has a multi-character fold that begins with the remaining
931 portion of the fold, plus some more.
932
933  "s\N{U+DF}" =~ /[\x{DF}foo]/i
934
935 is one such case.  C<\xDF> folds to C<"ss">
936
937 =item *
938
939 A few characters in regular expression pattern matches did not
940 match correctly in some circumstances, all involving C</i>.  The
941 affected characters are:
942 COMBINING GREEK YPOGEGRAMMENI,
943 GREEK CAPITAL LETTER IOTA,
944 GREEK CAPITAL LETTER UPSILON,
945 GREEK PROSGEGRAMMENI,
946 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA,
947 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
948 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA,
949 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
950 LATIN SMALL LETTER LONG S,
951 LATIN SMALL LIGATURE LONG S T,
952 and
953 LATIN SMALL LIGATURE ST.
954
955 =item *
956
957 Fixed memory leak regression in regular expression compilation
958 under threading
959
960 =back
961
962 =head2 Formats
963
964 =over
965
966 =item *
967
968 A number of edge cases have been fixed with formats and C<formline>;
969 in particular, where the format itself is potentially variable (such as
970 with ties and overloading), and where the format and data differ in their
971 encoding. In both these cases, it used to possible for the output to be
972 corrupted [RT #91032].
973
974 =item *
975
976 C<formline> no longer converts its argument into a string in-place.  So
977 passing a reference to C<formline> no longer destroys the reference
978 [RT #79532].
979
980 =back
981
982 =head2 Copy-on-write scalars
983
984 Copy-on-write scalars were introduced in 5.8.0, but most Perl code
985 did not encounter them (they were used mostly internally).  Perl
986 5.10.0 extended them, such that assigning C<__PACKAGE__> or a
987 hash key to a scalar would make it copy-on-write.  Several parts
988 of Perl were not updated to account for them, but have now been fixed.
989
990 =over
991
992 =item *
993
994 C<utf8::decode> had a nasty bug that would modify copy-on-write scalars'
995 string buffers in place (i.e., skipping the copy).  This could result in
996 hashes having two elements with the same key [RT #91834].
997
998 =item *
999
1000 Lvalue subroutines were not allowing COW scalars to be returned.  This was
1001 fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context
1002 was not fixed until this release.
1003
1004 =item *
1005
1006 Elements of restricted hashes (see the L<fields> pragma) containing
1007 copy-on-write values couldn't be deleted, nor could such hashes be cleared
1008 (C<%hash = ()>).
1009
1010 =item *
1011
1012 Localising a tied variable used to make it read-only if it contained a
1013 copy-on-write string.
1014
1015 =item *
1016
1017 L<Storable>, L<Devel::Peek> and L<PerlIO::scalar> had similar problems.
1018 See L</Updated Modules and Pragmata>, above.
1019
1020 =back
1021
1022 =head2 lvalue subroutines
1023
1024 There have been various fixes to lvalue subroutines.
1025
1026 =over
1027
1028 =item *
1029
1030 Explicit return now returns the actual argument passed to return, instead
1031 of copying it [RT #72724] [RT #72706].
1032
1033 B<Note:> There are still some discrepancies between explicit and implicit
1034 return, which will hopefully be resolved soon.  So the exact behaviour is
1035 not set in stone yet.
1036
1037 =item *
1038
1039 Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on
1040 the left-hand side of C<=>) for the last statement and the arguments to
1041 return.  Since lvalue subroutines are not always called in lvalue context,
1042 this restriction has been lifted.
1043
1044 =item *
1045
1046 Lvalue subroutines are less restrictive as to what values can be returned.
1047 It used to croak on values returned by C<shift> and C<delete> and from
1048 other subroutines, but no longer does so [RT #71172].
1049
1050 =item *
1051
1052 Empty lvalue subroutines (C<sub :lvalue {}>) used to return C<@_> in list
1053 context.  In fact, all subroutines used to, but regular subs were fixed in
1054 Perl 5.8.2.  Now lvalue subroutines have been likewise fixed.
1055
1056 =item *
1057
1058 Lvalue subroutines used to copy their return values in rvalue context.  Not
1059 only was this a waste of CPU cycles, but it also caused bugs.  A C<($)>
1060 prototype would cause an lvalue sub to copy its return value [RT #51408],
1061 and C<while(lvalue_sub() =~ m/.../g) { ... }> would loop endlessly
1062 [RT #78680].
1063
1064 =item *
1065
1066 Autovivification now works on values returned from lvalue subroutines
1067 [RT #7946].
1068
1069 =item *
1070
1071 When called in pass-by-reference context (e.g., subroutine arguments or a list
1072 passed to C<for>), an lvalue subroutine returning arrays or hashes used to bind
1073 the arrays (or hashes) to scalar variables--something that is not supposed to
1074 happen.  This could result in "Bizarre copy of ARRAY" errors or C<print>
1075 ignoring its arguments.  It also made nonsensical code like C<@{\$_}> "work".
1076 This was fixed in 5.14.0 if an array were the first thing returned from the
1077 subroutine (but not for C<$scalar, @array> or hashes being returned).  Now a
1078 more general fix has been applied [RT #23790].
1079
1080 =item *
1081
1082 When called in pass-by-reference context, lvalue subroutines used to copy
1083 any read-only value that were returned.  E.g., C< sub :lvalue { $] } >
1084 would not return C<$]>, but a copy of it.
1085
1086 =item *
1087
1088 Assignment to C<keys> returned from an lvalue sub used not to work, but now
1089 it does.
1090
1091 =item *
1092
1093 Applying the C<:lvalue> attribute to an XSUB or to an aliased subroutine
1094 stub with C<< sub foo :lvalue; >> syntax stopped working in Perl 5.12.
1095 This has been fixed.
1096
1097 =back
1098
1099 =head2 Fixes related to hashes
1100
1101 =over
1102
1103 =item *
1104
1105 A bug has been fixed that would cause a "Use of freed value in iteration"
1106 error if the next two hash elements that would be iterated over are
1107 deleted [RT #85026].
1108
1109 =item *
1110
1111 Freeing deeply nested hashes no longer crashes [RT #44225].
1112
1113 =item *
1114
1115 Deleting the current hash iterator (the hash element that would be returend
1116 by the next call to C<each>) in void context used not to free it.  The hash
1117 would continue to reference it until the next iteration.  This has been
1118 fixed [RT #85026].
1119
1120 =back
1121
1122 =head2 Other notable fixes
1123
1124 =over
1125
1126 =item *
1127
1128 Passing the same constant subroutine to both C<index> and C<formline> no
1129 longer causes one or the other to fail [RT #89218].
1130
1131 =item *
1132
1133 List assignment to lexical variables declared with attributes in the same
1134 statement (C<my ($x,@y) : blimp = (72,94)>) stopped working in Perl 5.8.0.
1135 It has now been fixed.
1136
1137 =item *
1138
1139 Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of
1140 a pack template equivalent to "U0" if the input string was empty.  This has
1141 been fixed [RT #90160].
1142
1143 =item *
1144
1145 Destructors on objects were not called during global destruction on objects
1146 that were not referenced by any scalars.  This could happen if an array
1147 element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
1148 blessed variable (C<bless \my @a; sub foo { @a }>).
1149
1150 Now there is an extra pass during global destruction to fire destructors on
1151 any objects that might be left after the usual passes that check for
1152 objects referenced by scalars [RT #36347].
1153
1154 This bug fix was added in Perl 5.13.9, but caused problems with some CPAN
1155 modules that were relying on the bug.  Since it was so close to Perl
1156 5.14.0, the fix was reverted in 5.13.10, to allow more time for the modules
1157 to adapt.  Hopefully they will be fixed soon (see L</Known Problems>,
1158 below).
1159
1160 =item *
1161
1162 C<given> was not calling set-magic on the implicit lexical C<$_> that it
1163 uses.  This meant, for example, that C<pos> would be remembered from one
1164 execution of the same C<given> block to the next, even if the input were a
1165 different variable [RT #84526].
1166
1167 =item *
1168
1169 The "R" command for restarting a debugger session has been fixed to work on
1170 Windows, or any other system lacking a C<POSIX::_SC_OPEN_MAX> constant
1171 [RT #87740].
1172
1173 =item *
1174
1175 Fixed a case where it was possible that a freed buffer may have been read
1176 from when parsing a here document [RT #90128].
1177
1178 =item *
1179
1180 The C<study> function could become confused if fed a string longer than
1181 2**31 characters.  Now it simply skips such strings.
1182
1183 =item *
1184
1185 C<each(I<ARRAY>)> is now wrapped in C<defined(...)>, like C<each(I<HASH>)>,
1186 inside a C<while> condition [RT #90888].
1187
1188 =item *
1189
1190 In @INC filters (subroutines returned by subroutines in @INC), $_ used to
1191 misbehave: If returned from a subroutine, it would not be copied, but the
1192 variable itself would be returned; and freeing $_ (e.g., with C<undef *_>)
1193 would cause perl to crash.  This has been fixed [RT #91880].
1194
1195 =item *
1196
1197 An ASCII single quote (') in a symbol name is meant to be equivalent to a
1198 double colon (::) except at the end of the name.  It was not equivalent if
1199 followed by a null character, but now it is [RT #88138].
1200
1201 =item *
1202
1203 The abbreviations for four C1 control characters
1204 C<MW>
1205 C<PM>,
1206 C<RI>,
1207 and
1208 C<ST>
1209 were previously unrecognized by C<\N{}>,
1210 vianame(), and string_vianame().
1211
1212 =item *
1213
1214 Some cases of threads crashing due to memory allocation during cloning have
1215 been fixed [RT #90006].
1216
1217 =item *
1218
1219 Attempting to C<goto> out of a tied handle method used to cause memory
1220 corruption or crashes.  Now it produces an error message instead
1221 [RT #8611].
1222
1223 =item *
1224
1225 Perl skips copying values returned from a subroutine if it thinks the value
1226 is not in use elsewhere.  Due to faulty logic, this would happen with the
1227 result of C<delete>, C<shift> or C<splice>, even if the result was
1228 referenced elsewhere.  So C<< \sub { delete $_[0] }->($x) >> would return a
1229 reference to C<$x>.  This has been fixed [RT #91844].
1230
1231 =back
1232
1233 =head2 Additional fixes by ticket number
1234
1235 XXX Prefix these with "\n=item *\n" once the list is final
1236
1237 Fixed RT #88822: Test failure t/re_fold_grind.t with bleadperl
1238 Fixed RT #89896: Locale::Maketext test failure
1239
1240 XXX Comments from FC: I do not think these two are necessary.
1241
1242 =head1 Known Problems
1243
1244 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
1245 tests that had to be C<TODO>ed for the release would be noted here, unless
1246 they were specific to a particular platform (see below).
1247
1248 This is a list of some significant unfixed bugs, which are regressions
1249 from either 5.XXX.XXX or 5.XXX.XXX.
1250
1251 [ List each fix as a =item entry ]
1252
1253 =over 4
1254
1255 =item *
1256
1257 The fix for RT #36347 causes test failures for C<Gtk2> and C<Tk> on some
1258 systems [RT #82542].
1259
1260 =item *
1261
1262 The changes to C<tie> cause test failures for the C<JS> module.
1263
1264 =back
1265
1266 =head1 Obituary
1267
1268 XXX If any significant core contributor has died, we've added a short obituary
1269 here.
1270
1271 =head1 Acknowledgements
1272
1273 XXX The list of people to thank goes here.
1274
1275 =head1 Reporting Bugs
1276
1277 If you find what you think is a bug, you might check the articles
1278 recently posted to the comp.lang.perl.misc newsgroup and the perl
1279 bug database at http://rt.perl.org/perlbug/ .  There may also be
1280 information at http://www.perl.org/ , the Perl Home Page.
1281
1282 If you believe you have an unreported bug, please run the L<perlbug>
1283 program included with your release.  Be sure to trim your bug down
1284 to a tiny but sufficient test case.  Your bug report, along with the
1285 output of C<perl -V>, will be sent off to perlbug@perl.org to be
1286 analysed by the Perl porting team.
1287
1288 If the bug you are reporting has security implications, which make it
1289 inappropriate to send to a publicly archived mailing list, then please send
1290 it to perl5-security-report@perl.org. This points to a closed subscription
1291 unarchived mailing list, which includes all the core committers, who are able
1292 to help assess the impact of issues, figure out a resolution, and help
1293 co-ordinate the release of patches to mitigate or fix the problem across all
1294 platforms on which Perl is supported. Please only use this address for
1295 security issues in the Perl core, not for modules independently
1296 distributed on CPAN.
1297
1298 =head1 SEE ALSO
1299
1300 The F<Changes> file for an explanation of how to view exhaustive details
1301 on what changed.
1302
1303 The F<INSTALL> file for how to build Perl.
1304
1305 The F<README> file for general stuff.
1306
1307 The F<Artistic> and F<Copying> files for copyright information.
1308
1309 =cut