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