This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module::CoreList for v5.15.7
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
52deee2e 5perldelta - what is new for perl v5.15.7
ad32999b 6
52deee2e 7=head1 DESCRIPTION
ad32999b 8
52deee2e
DR
9This document describes differences between the 5.15.6 release and
10the 5.15.7 release.
ad32999b 11
52deee2e
DR
12If you are upgrading from an earlier release such as 5.15.5, first read
13L<perl5156delta>, which describes differences between 5.15.5 and
145.15.6.
a3f52e2e 15
52deee2e 16=head1 Core Enhancements
d1fb015b 17
fbb93542
KW
18=head2 C<use charnames> no longer needed for C<\N{I<name>}>
19
20The C<charnames> module is now automatically loaded when needed as if
21the C<:full> and C<:short> options had been specified. See
22L<charnames>.
23
8c85651d
KW
24=head2 Improved performance for Unicode properties in regular expressions
25
26Matching a code point against a Unicode property is now done via a
27binary search instead of linear. This means for example that the worst
28case for a 1000 item property is 10 probes instead of 1000. This
29inefficiency has been compensated for in the past by permanently storing
30in a hash the results of a given probe plus the results for the adjacent
3164 code points, under the theory that near-by code points are likely to
32be searched for. A separate hash was used for each mention of a Unicode
33property in each regular expression. Thus, C<qr/\p{foo}abc\p{foo}/>
34would generate two hashes. Any probes in one instance would be unknown
35to the other, and the hashes could expand separately to be quite large
36if the regular expression were used on many different widely-separated
37code points. This can lead to running out of memory in extreme cases.
38Now, however, there is just one hash shared by all instances of a given
39property. This means that if C<\p{foo}> is matched against "A" in one
40regular expression in a thread, the result will be known immediately to
41all regular expressions, and the relentless march of using up memory is
42slowed considerably.
43
52deee2e 44=head1 Deprecations
7f28d7ed 45
ef337e16
CBW
46=head2 Deprecated Modules
47
48=over
49
50=item L<Version::Requirements>
51
52Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
53which is a drop-in replacement. It will be deleted from perl.git blead
54in v5.17.0.
55
56=back
57
52deee2e 58=head1 Performance Enhancements
66008486 59
52deee2e 60=over 4
66008486
FC
61
62=item *
63
39de7394
FC
64Version declarations with the C<use> keyword (e.g., C<use 5.012>) are now
65faster, as they enable features without loading F<feature.pm>.
66008486 66
cadced9f
FC
67=item *
68
69C<local $_> is faster now, as it no longer iterates through magic that it
70is not going to copy anyway.
71
66008486
FC
72=back
73
52deee2e 74=head1 Modules and Pragmata
84b2a83e 75
52deee2e
DR
76XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
77go here. If Module::CoreList is updated, generate an initial draft of the
78following sections using F<Porting/corelist-perldelta.pl>, which prints stub
79entries to STDOUT. Results can be pasted in place of the '=head2' entries
80below. A paragraph summary for important changes should then be added by hand.
81In an ideal world, dual-life modules would have a F<Changes> file that could be
82cribbed.
541cb22c 83
52deee2e 84[ Within each section, list entries as a =item entry ]
541cb22c 85
e3c71926 86=head2 Updated Modules and Pragmata
6d110ad0 87
e3c71926 88=over 4
6d110ad0
FC
89
90=item *
91
6f103008
FC
92L<B::Deparse> has been upgraded from version 1.10 to version 1.11.
93
6ee63c28 94It now deparses C<open('random string')> correctly. It used to omit the
6f103008
FC
95quotation marks, which did not work if the string were not a valid
96identifier [perl #91416].
97
6ee63c28
FC
98A similar bug also affected hash and array elements such as
99C<< 'random string'->[0] >>, which would deparse as C<$random string[0]>.
100This has been fixed.
101
cb1728ed
FC
102Those same syntaxes used to drop the package name from variables beginning
103with a punctuation mark, as in C<< "foo::]"->{$key} >>. This, too, has
104been fixed.
105
36a6a135
FC
106B::Deparse no longer hangs when deparsing a program with stash
107circularities, such as C<BEGIN { *Acme::Acme:: = *Acme:: }> [perl #91384].
108
109C</$s[1]/> used to be deparsed as C<$s[1]> if @s were a lexical variable
2e120742
FC
110[perl #81424]. Similarly, C</$#s/> would be deparsed as C<$#s> for both
111lexical and package variables. These has been fixed.
36a6a135
FC
112
113The C</applaud> regular expression flags are no longer omitted.
114
e3ed6ae8
FC
115Feature hints are now deparsed with C<use feature> rather than C<%^H>
116assignments.
117
ea88c40c 118A regression in 1.10 that caused C<ambient_pragmas> to disable strict mode
025130bf
FC
119in obscure cases has been fixed.
120
c7235129
FC
121Strict mode is now fully deparsed, including subs and vars [perl #24027].
122
a7106152
FC
123The global variables C<$(>, C<$|> and C<$)> are now deparsed with braces
124(i.e., C<${(}>) in regular expressions [perl #86060].
125
ea88c40c
FC
126C<continue> blocks after C<for> loops are now deparsed correctly, as they
127were back in 0.67 (included with Perl 5.8.5) [perl #108224]
128
6f103008
FC
129=item *
130
7f92e913
CBW
131L<CGI> has been upgraded from version 3.58 to version 3.59.
132
133We no longer read from STDIN when the Content-Length is not set, preventing
134requests with no Content-Length from freezing in some cases. This is consistent
135with the CGI RFC 3875, and is also consistent with CGI::Simple. However, the old
136behavior may have been expected by some command-line uses of CGI.pm.
137
138=item *
139
2b283575
CBW
140L<CPAN::Meta> has been upgraded from version 2.112621 to version 2.113640.
141
142Version::Requirements has now been merged as CPAN::Meta::Requirements.
143
144=item *
145
ce6b844f 146L<CPANPLUS> has been upgraded from version 0.9113 to version 0.9116.
7f41f337 147
88c5c971
CBW
148=item *
149
8f12b018
FC
150L<Data::Dumper> has been upgraded from version 2.135_01 to version
1512.135_03.
152
153It can now dump vstrings [perl #101162].
154
26afcec5
FC
155The nameless typeglob (C<*{""}>) is now dumped properly.
156
8f12b018
FC
157=item *
158
d7fbd56d
FC
159L<diagnostics> has been upgraded from version 1.26 to version 1.27.
160
161See the entry for splain in the L</Utility Changes> section, for the
162changes. The diagnostics module and the splain utility are actually one
163and the same.
164
165=item *
166
711a3903
FC
167L<ExtUtils::Packlist> has been upgraded from version 1.45 to version 1.46.
168
169It no longer produces "used once" warnings when the C<read> and C<write>
170methods are called while the main program is still compiling (e.g., from
171within a BEGIN block) [perl #107410] [rt.cpan.org #50315].
172
173=item *
174
6ba817f3
CBW
175L<ExtUtils::ParseXS> has been upgraded from version 3.08 to version 3.12.
176
177=item *
178
6b339779
CBW
179L<Locale::Maketext> has been upgraded from version 1.21 to version 1.22.
180
181=item *
182
b240fc0f
CBW
183L<Module::CoreList> has been upgraded from version 2.59 to version 2.60.
184
185=item *
186
4e6ab4ad
CBW
187L<Module::Pluggable> has been upgraded from version 3.9 to version 4.0.
188
189=item *
190
79e10968
FC
191L<overload> has been upgraded from version 1.16 to version 1.17.
192
193C<overload::Overloaded> no longer calls C<can> on the class, but uses
194another means to determine whether the object has overloading. It was
195never correct for it to call C<can>, as overloading does not respect
196AUTOLOAD. So classes that autoload methods and implement C<can> no longer
197have to account for overloading [perl #40333].
198
ea88c40c
FC
199A warning is now produced for invalid arguments. See L</New Diagnostics>.
200
79e10968
FC
201=item *
202
329d453a 203L<perlfaq> has been upgraded from version 5.0150036 to version 5.0150038.
9d055b1a
CBW
204
205=item *
206
cadced9f
FC
207L<PerlIO::scalar> has been upgraded from version 0.12 to version 0.13.
208
209(This is the module that implements C<< open $fh, '>', \$scalar >>.)
210
211It no longer assumes during C<seek> that $scalar is a string internally.
6fd65695
FC
212If it didn't crash, it was close to doing so [perl #92706]. Also, the
213internal print routine no longer assumes that the position set by C<seek>
214is valid, but extends the string to that position, filling the intervening
215bytes (between the old length and the seek position) with nulls
216[perl #78980].
cadced9f
FC
217
218Printing to an in-memory handle now works if the $scalar holds a reference,
219stringifying the reference before modifying it. References used to be
220treated as empty strings.
221
222Printing to an in-memory handle no longer crashes if the $scalar happens to
223hold a number internally, but no string buffer.
224
07feb684
FC
225Printing to an in-memory handle no longer creates scalars that confuse the regular expression engine [perl #108398].
226
cadced9f
FC
227=item *
228
632c5d30
NC
229L<Pod::Html> has been upgraded from version 1.12 to 1.13
230
231=item *
232
60ffae32 233L<POSIX> has been upgraded from version 1.27 to version 1.29.
4e6e9b23
FC
234
235C<sigsuspend> and C<pause> now run signals handle before returning, as the
236whole point of these two functions is to wait until a signal has
237arrived, and then return I<after> it has been triggered. Delayed, or
238"safe", signals were preventing that from happening, possibly resulting in
239race conditions [perl #107216].
60ffae32
CBW
240C<POSIX::sleep> is now a direct call into the underlying OS C<sleep>
241function, instead of being a Perl wrapper on C<CORE::sleep>. C<POSIX::dup2>
242now returns the correct value on Win32 (I<i.e.> the file descriptor).
243C<POSIX::SigSet> C<sigsuspend> and C<sigpending> and C<POSIX::pause> now
244dispatch safe signals immediately before returning to their caller.
4e6e9b23
FC
245
246=item *
247
1887da8c
RS
248L<Pod::Perldoc> has been upgraded from version 3.15_01 to version 3.15_15.
249
250=item *
251
88c5c971
CBW
252L<Term::UI> has been upgraded from version 0.26 to version 0.30.
253
c0504019
TR
254=item *
255
256L<Tie::File> has been upgraded from version 0.96 to version 0.98.
257
937a45d0
KW
258=item *
259
260L<Unicode::UCD> has been upgraded from version 0.37 to version 0.38.
261This changes the output of C<prop_invmap()> for the Name_Alias property
262to reflect the changes that are planned for Unicode 6.1, so that there
263won't be a format change when upgrading to 6.1. Briefly, a second
264component of each alias is added that gives the type of alias it is.
265Examples are at L<Unicode::UCD/prop_invmap()>.
266
ef337e16
CBW
267=item *
268
269L<Version::Requirements> has been upgraded from version 0.101020 to version 0.101021.
270
271Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
272which is a drop-in replacement.
273
7f28d7ed 274=back
679b54e7 275
52deee2e 276=head1 Documentation
3c7c5233 277
52deee2e 278=head2 Changes to Existing Documentation
a71d67b1 279
cadced9f
FC
280=head3 L<perlfunc>
281
282=over 4
283
284=item *
285
286C<dbmopen> treats a 0 mode as a special case, that prevents a nonexistent
287file from being created. This has been the case since Perl 5.000, but was
288never documented anywhere. Now the perlfunc entry mentions it
289[perl #90064].
290
291=item *
292
293The entry for C<split> has been rewritten. It is now far clearer than
294before.
295
296=back
297
298=head3 L<perlop> and L<perlsyn>
7e7629fa 299
52deee2e 300=over 4
7e7629fa
FC
301
302=item *
303
cadced9f
FC
304Documentation of the smartmatch operator has been reworked and moved from
305perlsyn to perlop where it belongs.
306
307=item *
308
309Documentation of the ellipsis statement (C<...>) has been reworked and
310moved from perlop to perlsyn.
c2654555 311
52deee2e 312=back
85ca3be7 313
52deee2e 314=head1 Diagnostics
85ca3be7 315
52deee2e
DR
316The following additions or changes have been made to diagnostic output,
317including warnings and fatal error messages. For the complete list of
318diagnostic messages, see L<perldiag>.
7788a270 319
52deee2e 320=head2 New Diagnostics
a3e88ad7 321
52deee2e 322=head3 New Errors
6138a722 323
0aaeb177 324=over 4
be539103 325
a47fb3fe
CBW
326=item *
327
4888c563
FC
328L<Cannot set tied @DB::args|perldiag/"Cannot set tied @DB::args">
329
330This error occurs when C<caller> tries to set C<@DB::args> but finds it
331tied. Before this error was added, it used to crash instead.
a3f52e2e 332
52272450
FC
333=item *
334
335L<Cannot tie unreifiable array|perldiag/"Cannot tie unreifiable array">
336
337This error is part of a safety check that the C<tie> operator does before
338tying a special array like C<@_>. You should never see this message.
339
0aaeb177 340=back
a3f52e2e 341
52deee2e 342=head3 New Warnings
a47fb3fe 343
0aaeb177 344=over 4
7ef25837 345
6d110ad0
FC
346=item *
347
604a99bd
NC
348L<defined(@array) is deprecated|perldiag/"defined(@array) is deprecated">
349
350The long-deprecated C<defined(@array)> now also warns for package variables.
351Previously it only issued a warning for lexical variables.
6d110ad0 352
ea88c40c
FC
353=item *
354
355L<Useless use of \E|perldiag/"Useless use of \E">
356
357C<\E> does nothing unless preceded by C<\Q>, C<\L> or C<\U>.
358
359=item *
360
361L<overload arg '%s' is invalid|perldiag/"overload arg '%s' is invalid">
362
363This warning, in the "overload" category, is produced when the overload
364pragma is given an argument it doesn't recognize, presumably a mistyped
365operator.
366
6d110ad0
FC
367=back
368
cadced9f
FC
369=head2 Removals
370
371=over 4
372
373=item *
374
375"sort is now a reserved word"
376
377This error used to occur when C<sort> was called without arguments, followed by C<;> or C<)>. (E.g., C<sort;> would die, but C<{sort}> was
378OK.) This error message was added in Perl 3 to catch code like
379C<close(sort)> which would no longer work. More than two decades later,
380this message is no longer appropriate. Now C<sort> without arguments is
381always allowed, and returns an empty list, as it did in those cases where
382it was already allowed [perl #90030].
383
384=back
385
0aaeb177 386=head1 Utility Changes
9cfd094e 387
d7fbd56d 388=head3 L<splain>
0aaeb177 389
e3c71926 390=over 4
b53e16ae
FC
391
392=item *
393
d7fbd56d
FC
394splain no longer emits backtraces with the first line number repeated.
395This:
396
397 Uncaught exception from user code:
398 Cannot fwiddle the fwuddle at -e line 1.
399 at -e line 1
400 main::baz() called at -e line 1
401 main::bar() called at -e line 1
402 main::foo() called at -e line 1
403
404has become this:
405
406 Uncaught exception from user code:
407 Cannot fwiddle the fwuddle at -e line 1.
408 main::baz() called at -e line 1
409 main::bar() called at -e line 1
410 main::foo() called at -e line 1
ba91b4f3 411
b18aa002
FC
412=item *
413
66056247 414Some error messages consist of multiple lines that are listed as separate
b18aa002
FC
415entries in L<perldiag>. splain has been taught to find the separate
416entries in these cases, instead of simply failing to find the message.
417
52deee2e 418=back
ba91b4f3 419
52deee2e 420=head1 Configuration and Compilation
f4912a50 421
0aaeb177 422=over 4
a3f52e2e
FC
423
424=item *
425
3e975088
NC
426The Pod files for the perl FAQ, L<perlxs>, L<perlxstut> and L<perldoc>
427are once again correctly installed in the same directory as the other core
428Pods.
429
430=for 5.16.0 This isn't a regression from 5.14.x, so don't mention this.
a3f52e2e 431
0aaeb177 432=back
a3f52e2e 433
52deee2e 434=head1 Testing
a3f52e2e 435
0aaeb177 436=over 4
ad32999b 437
f4912a50 438=item *
ad32999b 439
48eabb99
NC
440F<t/porting/utils.t> now tests that various utility scripts compile cleanly.
441During development, this avoids the embarrassment of inadvertently pushing a
442commit which breaks code which isn't otherwise tested by the regression test
443suite. For example, F<installperl> and F<installman>, needed by
444C<make install>, are tested here.
c15f899f 445
7f28d7ed 446=back
ad32999b 447
52deee2e 448=head1 Internal Changes
d6b99bf4 449
52deee2e 450=over 4
8aade7da 451
c7b728ca
SF
452=item *
453
39de7394
FC
454There are now feature bundle hints in C<PL_hints> (C<$^H>) that version
455declarations use, to avoid having to load F<feature.pm>. One setting of
456the hint bits indicates a "custom" feature bundle, which means that the
457entries in C<%^H> still apply. F<feature.pm> uses that.
458
459The C<HINT_FEATURE_MASK> macro is defined in F<perl.h> along with other
460hints. Other macros for setting and testing features and bundles are in
461the new F<feature.h>. C<FEATURE_IS_ENABLED> (which has moved to
462F<feature.h>) is no longer used throughout the codebase, but more specific
463macros, e.g., C<FEATURE_SAY_IS_ENABLED>, that are defined in F<feature.h>.
464
465=item *
466
467F<lib/feature.pm> is now a generated file, created by the new
468F<regen/feature.pl> script, which also generates F<feature.h>.
5dd80d85 469
52272450
FC
470=item *
471
472Tied arrays are now always C<AvREAL>. If C<@_> or C<DB::args> is tied, it
473is reified first, to make sure this is always the case.
474
52deee2e 475=back
5dd80d85 476
52deee2e 477=head1 Selected Bug Fixes
c7b728ca 478
52deee2e 479=over 4
84b2a83e 480
5343a617 481=item * "b . COND" in the debugger has been fixed
84b2a83e 482
5343a617
SF
483Breaking on the current line with C<b . COND> was broken by previous work and
484has now been fixed.
84b2a83e 485
07f0992c
FC
486=item * Tying C<%^H>
487
90bf1576
FC
488Tying C<%^H> no longer causes perl to crash or ignore
489the contents of C<%^H> when entering a compilation
07f0992c
FC
490scope [perl #106282].
491
36a6a135
FC
492=item * C<~> on vstrings
493
494The bitwise complement operator (and possibly other operators, too) when
495passed a vstring would leave vstring magic attached to the return value,
496even though the string had changed. This meant that
497C<< version->new(~v1.2.3) >> would create a version looking like "v1.2.3"
498even though the string passed to C<< version->new >> was actually
499"\376\375\374". This also caused L<B::Deparse> to deparse C<~v1.2.3>
500incorrectly, without the C<~> [perl #29070].
501
502=item * Vstrings blowing away magic
503
504Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then
505assigning something else used to blow away all the magic. This meant that
506tied variables would come undone, C<$!> would stop getting updated on
507failed system calls, C<$|> would stop setting autoflush, and other
508mischief would take place. This has been fixed.
509
a32fcfdc
FC
510=item * C<newHVhv> and tied hashes
511
512The C<newHVhv> XS function now works on tied hashes, instead of crashing or
513returning an empty hash.
514
063b2a72
FC
515=item * Hashes will null elements
516
517It is possible from XS code to create hashes with elements that have no
518values. Perl itself sometimes creates such hashes, but they are rarely
519visible to Perl code. The hash element and slice operators used to crash
520when handling these in lvalue context. These have been fixed. They now
521produce a "Modification of non-creatable hash value attempted" error
522message.
523
8c7dd470
FC
524=item * No warning for C<open(foo::bar)>
525
526When one writes C<open foo || die>, which used to work in Perl 4, a
527"Precedence problem" warning is produced. This warning used erroneously to
66056247
FC
528apply to fully-qualified bareword handle names not followed by C<||>. This
529has been corrected.
8c7dd470 530
f7606f70
FC
531=item * C<select> and package aliasing
532
533After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument
534would sometimes return a name that could not be used to refer to the
535filehandle, or sometimes it would return C<undef> even when a filehandle
536was selected. Now it returns a typeglob reference in such cases.
537
c0a5c448
FC
538=item * C<PerlIO::get_layers> and tied variables
539
540C<PerlIO::get_layers> no longer ignores FETCH on tied variables as it used
12d5b6c4
FC
541to most of the time [perl #97956].
542
543=item * C<PerlIO::get_layers> and numbers
544
545C<PerlIO::get_layers> no longer ignores some arguments that it thinks are
546numeric, while treating others as filehandle names. It is now consistent
547for flat scalars (i.e., not references).
c0a5c448 548
3ba4cf6c
FC
549=item * Lvalue subs and strict mode
550
551Lvalue sub calls that are not determined to be such at compile time
552(C<&$name> or &{"name"}) are no longer exempt from strict refs if they
553occur in the last statement of an lvalue subroutine [perl #102486].
554
555=item * Non-lvalue sub calls in potentially lvalue context
556
557Sub calls whose subs are not visible at compile time, if
558they occurred in the last statement of an lvalue subroutine,
559would reject non-lvalue subroutines and die with "Can't modify non-lvalue
560subroutine call" [perl #102486].
561
562Non-lvalue sub calls whose subs I<are> visible at compile time exhibited
563the opposite bug. If the call occurred in the last statement of an lvalue
564subroutine, there would be no error when the lvalue sub was called in
565lvalue context. Perl would blindly assign to the temporary value returned
566by the non-lvalue subroutine.
567
568=item * AUTOLOADing lvalue subs
569
570C<AUTOLOAD> routines used to take precedence over the actual sub being
571called (i.e., when autoloading wasn't needed), for sub calls in lvalue or
572potential lvalue context, if the subroutine was not visible at compile
573time.
574
4888c563
FC
575=item * C<caller> and tied C<@DB::args>
576
577C<caller> sets C<@DB::args> to the subroutine arguments when called from
578the DB package. It used to crash when doing so if C<@DB::args> happened to
579be tied. Now it croaks instead.
580
52272450
FC
581=item * Tying C<@_>
582
583Under debugging builds, this code:
584
585 sub TIEARRAY{bless[]}
586 sub {
587 tie @_, "";
588 \@_;
589 }->(1);
590
591use to produce an "av_reify called on tied array" warning. It doesn't any
592more.
593
ad266194
FC
594=item * Unrecognised switches on C<#!> line
595
596If a switch, such as B<-x>, that cannot occur on the C<#!> line is used
66056247 597there, perl dies with "Can't emulate...".
ad266194
FC
598
599It used to produce the same message for switches that perl did not
600recognise at all, whether on the command line or the C<#!> line.
601
602Now it produces the "Unrecognized switch" error message [perl #104288].
603
17b27d32
FC
604=item * C<system> and SIGCHLD
605
606C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the
607signal handler from stealing the exit status [perl #105700].
608
b0e9fc93
FC
609=item * Deleting methods via C<delete>
610
611Deletion of methods via C<delete $Class::{method}> syntax used to update
612method caches if called in void context, but not scalar or list context.
613Now it always updates those caches.
614
d563d34b
FC
615=item * Hash element deletion and destructors
616
617When hash elements are deleted in void context, the internal hash entry is
66056247 618now freed before the value is freed, to prevent destructors called by that
d563d34b
FC
619latter freeing from seeing the hash in an inconsistent state. It was
620possible to cause double-frees if the destructor freed the hash itself
621[perl #100340].
622
6e555b9a
FC
623=item * C<(s)printf>'s %n formatting code
624
625The %n formatting code, which causes the number of characters to be
626assigned to the next argument to C<printf> or C<sprintf> now actually
627assigns the number of characters, instead of the number of bytes.
628
629It also works now with special lvalue functions like C<substr> and with
b484d00e 630nonexistent hash and array elements [perl #3471, #103492].
6e555b9a 631
ac8fb82c
FC
632=item * Typeglobs and threads
633
634Typeglobs returned from threads are no longer cloned if the parent thread
635already has a glob with the same name. This means that returned
636subroutines will now assign to the right package variables [perl #107366].
637
711a3903
FC
638=item * C<local $_>
639
640In Perl 5.14, C<local $_> was changed to create a new variable not tied to
641anything, even if $_ was tied before that. But, due to an oversight, it
642would still call FETCH once on a tied $_ before replacing it with the new
643variable. This has been fixed [perl #105912].
644
cadced9f
FC
645=item * Returning tied variables
646
647When returning a value from a non-lvalue subroutine, Perl copies the value.
648Sometimes it cheats for the sake of speed, and does not copy the value if
649it makes no observable difference. This optimisation was erroneously
650allowing the copy to be skipped on tied variables, causing a difference in
651behaviour depending on the tied variable's reference count. This has been
652fixed [perl #95548].
653
654=item * C<{@a = sort}> no longer crashes
655
656This particular piece of code (C<sort> with no arguments assigned to an
657array, inside a block with no C<;>) started crashing in an earlier 5.15.x
658release. It has been fixed.
659
660=item * C<utf8::decode> and read-only scalars
661
662C<utf8::decode> now refuses to modify read-only scalars [perl #91850].
663
664=item * C<dbmopen> with undefined mode
665
666C<dbmopen> now only warns once, rather than three times, if the mode
667argument is C<undef> [perl #90064].
668
669=item * Freeing an aggregate during list assignment
670
671If list assignment to a hash or array triggered destructors that freed the
672hash or array itself, a crash would ensue. This is no longer the case
673[perl #107440].
674
838cf719
FC
675=item * Confused internal bookkeeping with @ISA arrays
676
677Creating a weak reference to an @ISA array or accessing the array index
678(C<$#ISA>) could result in confused internal bookkeeping for elements
679subsequently added to the @ISA array. For instance, creating a weak
680reference to the element itself could push that weak reference on to @ISA;
681and elements added after use of C<$#ISA> would be ignored by method lookup
682[perl #85670].
683
684=item * DELETE on scalar ties
685
686Tying an element of %ENV or C<%^H> and then deleting that element would
687result in a call to the tie object's DELETE method, even though tying the
688element itself is supposed to be equivalent to tying a scalar (the element
689is, of course, a scalar) [perl #67490].
690
691=item * Freeing $_ inside C<grep> or C<map>
692
693Freeing $_ inside a C<grep> or C<map> block or a code block embedded in a
694regular expression used to result in double frees [perl #92254, #92256].
695
b00f6edb
FC
696=item * Warnings with C<+=>
697
698The C<+=> operator does not usually warn when the left-hand side is
699C<undef>, but it was doing so for tied variables. This has been fixed
700[perl #44895].
701
66056247 702=item * Tying and autovivification
7a3fd9ed
FC
703
704When Perl autovivifies an element of a tied array or hash (which entails
705calling STORE with a new reference), it now calls FETCH immediately after
706the STORE, instead of assuming that FETCH would have returned the same
707reference. This can make it easier to implement tied objects [perl #35865, #43011].
708
1a50d74b
FC
709=item * C<@&> and C<$&>
710
711Mentioning a variable named "&" other than C<$&> (i.e., C<@&> or C<%&>) no
712longer stops C<$&> from working. The same applies to variables named "'"
713and "`" [perl #24237].
714
ea88c40c
FC
715=item * Stacked filetests
716
717C<-T> and C<-B> now work when stacked up with other filetest operators
718[perl #77388].
719
720=item * Filetests and stat buffers
721
722Perl keeps several internal variables to keep track of the last stat
723buffer, from which file(handle) it originated, what type it was, and
724whether the last stat succeeded.
725
726There were various cases where these could get out of synch, resulting in
727inconsistent or erratic behaviour in edge cases (every mention of C<-T>
728applies to C<-B> as well):
729
730=over
731
732=item *
733
734C<-T I<HANDLE>>, even though it does a C<stat>, was not resetting the last
735stat type, so an C<lstat _> following it would merrily return the wrong
736results. Also, it was not setting the success status.
737
738=item *
739
740Freeing the handle last used by C<stat> or a filetest could result in
741S<C<-T _>> using an unrelated handle.
742
743=item *
744
745C<stat> with an IO reference (as returned by C<*STDIO{IO}>, for instance)
746would not reset the stat type.
747
748=item *
749
750C<stat> with an IO reference was not recording the filehandle for
751S<C<-T _>> to use.
752
753=item *
754
755The presence of fatal warnings could cause the stat buffer not to be reset
756for a filetest operator on an unopened filehandle or C<-l> on any handle.
757
758=item *
759
760Fatal warnings would stop C<-T> from setting C<$!>.
761
762=item *
763
764When the last stat was on an unreadable file, C<-T _> is supposed to
765return C<undef>, leaving the last stat buffer unchanged. But it was
766setting the stat type, causing C<lstat _> to stop working.
767
768=item *
769
770C<-T I<FILENAME>> was not resetting the internal stat buffers for
771unreadable files.
772
773=back
774
775These have all been fixed.
776
777=item * C<defined *{"!"}>
778
779An earlier 5.15.x release caused this construct to stop the C<%!> hash
780from working. Likewise C<defined *{"+"}> and C<defined *{"-"}> caused
781C<%+> and C<%->, respectively, to stop working. This has been fixed.
782
783=item * C<-T _> with no preceding C<stat>
784
785This used to produce a confusing "uninitialized" warning, even though there
786is no visible uninitialized value to speak of.
787
788=item * C<stat I<HANDLE>> and fstat failures
789
790If the operating system's C<fstat> function failed, C<stat> would warn
791about an unopened handle, even though that was not the case. This has been
792fixed.
793
794=item * C<lstat I<IOREF>>
795
796C<lstat> is documented to fall back to C<stat> (with a warning) when given
797a filehandle. When passed an IO reference, it was actually doing the
798equivalent of S<C<stat _>> and ignoring the handle.
799
485495c3
FC
800=item * Crashes with warnings
801
802Two warning messages that mention variable names started crashing in
fbed6467 8035.15.5, but have been fixed [perl #106726, #107656].
485495c3 804
18af289e
FC
805=item * Bitwise assignment operators and copy-on-write
806
4bcb627b 807In 5.14.0, the bitwise assignment operators C<|=>, C<^=> and C<&=> started
18af289e
FC
808leaving the left-hand side undefined if it happened to be a copy-on-write
809string. This has been fixed [perl #108480].
810
1ac442bc
KW
811=item * Three problematic Unicode characters now work better in regex pattern matching under C</i>
812
813In the past, three Unicode characters:
814LATIN SMALL LETTER SHARP S,
815GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
816and
817GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
818along with the sequences that they fold to
819(including "ss" in the case of LATIN SMALL LETTER SHARP S),
820did not properly match under C</i>. 5.14.0 fixed some of these cases,
821but introduced others, including a panic when one of the characters or
822sequences was used in the C<(?(DEFINE)> regular expression predicate.
823The known bugs that were introduced in 5.14 have now been fixed; as well
824as some other edge cases that have never worked until now. All these
825involve using the characters and sequences outside bracketed character
c0154fe2
KW
826classes under C</i>. This closes [perl #98546].
827
828There remain known problems when using certain characters with
829multi-character folds inside bracketed character classes, including such
830constructs as C<qr/[\N{LATIN SMALL LETTER SHARP}a-z]/i>. These
831remaining bugs are addressed in [perl #89774].
1ac442bc 832
52deee2e 833=back
84b2a83e 834
52deee2e 835=head1 Acknowledgements
8fe05716 836
7ae580ab 837Perl 5.15.7 represents approximately 4 weeks of development since Perl 5.15.6
7629e1de 838and contains approximately 51,000 lines of changes across 480 files from 30
7ae580ab
CBW
839authors.
840
841Perl continues to flourish into its third decade thanks to a vibrant community
842of users and developers. The following people are known to have contributed the
843improvements that became Perl 5.15.7:
844
7629e1de
CBW
845Alberto Simões, Bo Lindbergh, Brian Fraser, Chris 'BinGOs' Williams, Craig A.
846Berry, Dave Rolsky, David Mitchell, Eric Brine, Father Chrysostomos, Florian
847Ragwitz, H.Merijn Brand, Hojung Youn, James E Keenan, Joel Berger, Joshua ben
848Jore, Karl Williamson, Leon Timmermans, Matthew Horsfall, Michael Witten,
849Nicholas Clark, Reini Urban, Ricardo Signes, Shlomi Fish, Steffen Müller,
850Steffen Schwigon, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Ævar
851Arnfjörð Bjarmason.
7ae580ab
CBW
852
853The list above is almost certainly incomplete as it is automatically generated
854from version control history. In particular, it does not include the names of
855the (very much appreciated) contributors who reported issues to the Perl bug
856tracker.
857
858Many of the changes included in this version originated in the CPAN modules
859included in Perl's core. We're grateful to the entire CPAN community for
860helping Perl to flourish.
861
862For a more complete list of all of Perl's historical contributors, please see
863the F<AUTHORS> file in the Perl source distribution.
29cf780c 864
44691e6f
AB
865=head1 Reporting Bugs
866
867If you find what you think is a bug, you might check the articles
52deee2e
DR
868recently posted to the comp.lang.perl.misc newsgroup and the perl
869bug database at http://rt.perl.org/perlbug/ . There may also be
44691e6f
AB
870information at http://www.perl.org/ , the Perl Home Page.
871
872If you believe you have an unreported bug, please run the L<perlbug>
52deee2e
DR
873program included with your release. Be sure to trim your bug down
874to a tiny but sufficient test case. Your bug report, along with the
875output of C<perl -V>, will be sent off to perlbug@perl.org to be
876analysed by the Perl porting team.
44691e6f
AB
877
878If the bug you are reporting has security implications, which make it
52deee2e
DR
879inappropriate to send to a publicly archived mailing list, then please send
880it to perl5-security-report@perl.org. This points to a closed subscription
881unarchived mailing list, which includes
882all the core committers, who will be able
883to help assess the impact of issues, figure out a resolution, and help
884co-ordinate the release of patches to mitigate or fix the problem across all
885platforms on which Perl is supported. Please only use this address for
886security issues in the Perl core, not for modules independently
887distributed on CPAN.
44691e6f
AB
888
889=head1 SEE ALSO
890
52deee2e
DR
891The F<Changes> file for an explanation of how to view exhaustive details
892on what changed.
44691e6f
AB
893
894The F<INSTALL> file for how to build Perl.
895
896The F<README> file for general stuff.
897
898The F<Artistic> and F<Copying> files for copyright information.
899
900=cut