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