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