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