This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Locale-Maketext to 1.20
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
e3c71926 5perldelta - what is new for perl v5.15.5
760696b8 6
5438d4b8 7=head1 DESCRIPTION
5cd408a2 8
e3c71926
FR
9This document describes differences between the 5.15.4 release and
10the 5.15.5 release.
5cd408a2 11
3432e5a1 12If you are upgrading from an earlier release such as 5.15.3, first read
e3c71926 13L<perl5154delta>, which describes differences between 5.15.3 and
3432e5a1 145.15.4.
062678b2 15
e3c71926 16=head1 Core Enhancements
6d110ad0 17
ad32999b
FC
18=head2 More consistent C<eval>
19
20The C<eval> operator sometimes treats a string argument as a sequence of
21characters and sometimes as a sequence of bytes, depending on the internal
22encoding. The internal encoding is not supposed to make any difference,
23but there is code that relies on this inconsistency.
24
25Under C<use v5.15> and higher, the C<unicode_eval> and C<evalbytes>
26features resolve this. The C<unicode_eval> feature causes C<eval $string>
27to treat the string always as Unicode. The C<evalbytes> features provides
28a function, itself called C<evalbytes>, which evaluates its argument always
29as a string of bytes.
30
31These features also fix oddities with source filters leaking to outer
32dynamic scopes.
33
34See L<feature> for more detail.
35
a3f52e2e
FC
36=head2 C<$[> is back
37
38The C<$[> variable is back again, but is now implemented as a module, so
39programs that do not mention it (i.e., most of them), will not incur any
ad32999b
FC
40run-time penalty. In a later release in the 5.15 branch it might be
41disabled in the scope of C<use v5.16>.
a3f52e2e
FC
42
43The new implementation has some bug fixes. See L<arybase>.
6d110ad0 44
e3c71926 45=head1 Security
6d110ad0 46
2e7ab03e 47=head2 Privileges are now set correctly when assigning to C<$(>
6d110ad0 48
347e96f6
SH
49A hypothetical bug (probably non-exploitable in practice) due to the
50incorrect setting of the effective group ID while setting C<$(> has been
51fixed. The bug would only have affected systems that have C<setresgid()>
52but not C<setregid()>, but no such systems are known of.
6d110ad0 53
e3c71926 54=head1 Incompatible Changes
6d110ad0 55
b132e3dc
KW
56=head2 Certain deprecated Unicode properties are no longer supported by default
57
58Perl should never have exposed certain Unicode properties that are used
59by Unicode internally and not meant to be publicly available. Use of
60these has generated deprecated warning messages since Perl 5.12. The
61removed properties are Other_Alphabetic,
62Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend,
63Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and
64Other_Uppercase.
65
66Perl may be recompiled to include any or all of them; instructions are
67given in
68L<perluniprops/Unicode character properties that are NOT accepted by Perl>.
69
ad32999b
FC
70=head2 Dereferencing IO thingies as typeglobs
71
72The C<*{...}> operator, when passed a reference to an IO thingy (as in
73C<*{*STDIN{IO}}>), creates a new typeglob containing just that IO object.
74
75Previously, it would stringify as an empty string, but some operators would
76treat it as undefined, producing an "uninitialized" warning.
77
78Having a typeglob appear as an empty string is a side effect of the
79implementation that has caused various bugs over the years.
80
81The solution was to make it stringify like a normal anonymous typeglob,
2e7ab03e 82like those produced by C<< open($foo->{bar}, ...) >> [perl #96326].
ad32999b 83
e3c71926 84=head1 Deprecations
6d110ad0 85
ae92a9ae
KW
86=head2 Don't read the Unicode data base files in F<lib/unicore>
87
88It is now deprecated to directly read the Unicode data base files.
89These are stored in the F<lib/unicore> directory. Instead, you should
90use the new functions in L<Unicode::UCD>. These provide a stable API,
b132e3dc
KW
91and give complete information. (This API is, however, subject to change
92somewhat during the 5.15 development cycle, as we gain experience and
93get feedback from using it.)
94
95Perl may at some point in the future change or remove the files. The
96file most likely for applications to have used is F<lib/unicore/ToDigit.pl>.
97L<Unicode::UCD/prop_invmap()> can be used to get at its data instead.
ae92a9ae 98
e3c71926 99=head1 Performance Enhancements
6d110ad0 100
e3c71926 101=over 4
6d110ad0
FC
102
103=item *
104
a3f52e2e
FC
105Due to changes in L<File::Glob>, Perl's C<glob> function and its
106C<< <...> >> equivalent are now much faster. The splitting of the pattern
107into words has been rewritten in C, resulting in speed-ups of 20% in some
108cases.
109
110This does not affect VMS, as it does not use File::Glob.
6d110ad0 111
e3c71926 112=back
6d110ad0 113
e3c71926 114=head1 Modules and Pragmata
6d110ad0 115
e3c71926 116=head2 New Modules and Pragmata
6d110ad0 117
e3c71926 118=over 4
6d110ad0
FC
119
120=item *
121
a3f52e2e 122L<arybase> -- this new module implements the C<$[> variable.
6d110ad0
FC
123
124=back
125
e3c71926 126=head2 Updated Modules and Pragmata
6d110ad0 127
e3c71926 128=over 4
6d110ad0
FC
129
130=item *
131
ac73ea1e
CBW
132L<Archive::Extract> has been upgraded from version 0.56 to version 0.58.
133
134=item *
135
6138a722
SH
136L<B::Concise> has been upgraded from version 0.86 to version 0.87.
137
138=item *
139
140L<B::Deparse> has been upgraded from version 1.08 to version 1.09.
a3f52e2e 141
ad32999b
FC
142It now correctly deparses C<CORE::do>, C<CORE::glob> and slices of empty
143lists.
a3f52e2e
FC
144
145=item *
146
cc947deb 147L<CGI> has been upgraded from version 3.55 to version 3.58.
3e3c678a
CBW
148
149Use public and documented FCGI.pm API in CGI::Fast
150CGI::Fast was using an FCGI API that was deprecated and removed from
151documentation more than ten years ago. Usage of this deprecated API with
2e7ab03e 152FCGI E<gt>= 0.70 or FCGI E<lt>= 0.73 introduces a security issue.
3e3c678a
CBW
153L<https://rt.cpan.org/Public/Bug/Display.html?id=68380>
154L<http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-2766>
155
156=item *
157
6138a722
SH
158L<charnames> has been upgraded from version 1.23 to version 1.24.
159
160=item *
161
a32349f5 162L<Compress::Raw::Bzip2> has been upgraded from version 2.037 to version 2.042.
00d0325c
CBW
163
164=item *
165
54172f84 166L<Compress::Raw::Zlib> has been upgraded from version 2.037 to version 2.042.
949ade47
CBW
167
168=item *
169
aad9a0d9 170L<Compress::Zlib> has been upgraded from version 2.037 to version 2.042.
ad4795e7
CBW
171
172=item *
173
e6bd4dde
CBW
174L<CPANPLUS> has been upgraded from version 0.9111 to version 0.9112.
175
176=item *
177
aba0546e
CBW
178L<CPANPLUS::Dist::Build> has been upgraded from version 0.58 to version 0.60.
179
180=item *
181
a0780036
CBW
182L<Digest::SHA> has been upgraded from version 5.62 to version 5.63.
183
184Added code to allow very large data inputs all at once, which had previously been
185limited to several hundred megabytes at a time
186
187=item *
188
6138a722
SH
189L<Errno> has been upgraded from version 1.14 to version 1.15.
190
347e96f6
SH
191Choosing an archname containing a @, $ or % character no longer results in
192unintended interpolation in Errno's architecture check.
193
6138a722
SH
194=item *
195
f3640611 196L<ExtUtils::MakeMaker> has been upgraded from version 6.61_01 to version 6.63_02.
00441cfa
CBW
197
198=item *
199
6138a722
SH
200L<feature> has been upgraded from version 1.22 to version 1.23.
201
202=item *
203
204L<File::DosGlob> has been upgraded from version 1.05 to version 1.06.
205
206=item *
207
208L<File::Glob> has been upgraded from version 1.13 to version 1.14.
a3f52e2e
FC
209
210It has a new C<:bsd_glob> export tag, intended to replace C<:glob>. Like
211C<:glob> it overrides C<glob> with a function that does not split the glob
212pattern into words, but, unlike C<:glob>, it iterates properly in scalar
213context, instead of returning the last file.
214
215There are other changes affecting Perl's own C<glob> operator (which uses
216File::Glob internally, except on VMS). See L</Performance Enhancements>
217and L</Selected Bug Fixes>.
218
219=item *
220
6ce52845 221L<HTTP::Tiny> has been upgraded from version 0.013 to version 0.016.
35265876
CBW
222
223Adds additional shorthand methods for all common HTTP verbs,
224a C<post_form()> method for POST-ing x-www-form-urlencoded data and
225a C<www_form_urlencode()> utility method.
6d110ad0 226
be539103
CBW
227=item *
228
6138a722
SH
229L<Opcode> has been upgraded from version 1.20 to version 1.21.
230
231=item *
232
be539103
CBW
233L<perlfaq> has been upgraded from version 5.0150035 to version 5.0150036.
234
a47fb3fe
CBW
235=item *
236
a3f52e2e
FC
237L<Socket> as been upgraded from version 1.94_01 to 1.94_02.
238
239It has new functions and constants for handling IPv6 sockets:
240
241 pack_ipv6_mreq
242 unpack_ipv6_mreq
243 IPV6_ADD_MEMBERSHIP
244 IPV6_DROP_MEMBERSHIP
245 IPV6_MTU
246 IPV6_MTU_DISCOVER
247 IPV6_MULTICAST_HOPS
248 IPV6_MULTICAST_IF
249 IPV6_MULTICAST_LOOP
250 IPV6_UNICAST_HOPS
251 IPV6_V6ONLY
252
253=item *
254
ad32999b
FC
255L<Storable> has been upgraded from version 2.32 to 2.33.
256
257The ability to add a fake entry to %INC to prevent Log::Agent from loading
258has been restored. In version 2.27 (included with perl 5.14.0), Storable
259starting producing an error instead.
260
261=item *
262
6138a722
SH
263L<strict> has been upgraded from version 1.04 to version 1.05.
264
265=item *
266
46267efc 267L<Unicode::Collate> has been upgraded from version 0.80 to version 0.85.
a47fb3fe 268
46267efc
CBW
269Locales updated to CLDR 2.0: mk, mt, nb, nn, ro, ru, sk, sr, sv, uk,
270zh__pinyin, zh__stroke
271Newly supported locales: bn, fa, ml, mr, or, pa, sa, si, si__dictionary,
d88bd77a 272sr_Latn, sv__reformed, ta, te, th, ur, wae.
a47fb3fe 273
7ef25837
KW
274=item *
275
276L<Unicode::UCD> has been upgraded from version 0.36 to version 0.37.
6138a722 277
62b3b855 278This adds four new functions: C<prop_aliases()>, and
7ef25837 279C<prop_value_aliases()> which are used to find all the Unicode-approved
681d705c 280synonyms for property names, or to convert from one name to another;
62b3b855
KW
281C<prop_invlist> which returns all the code points matching a given
282Unicode binary property; and C<prop_invmap> which returns the complete
283specification of a given Unicode property.
7ef25837 284
6d110ad0
FC
285=item *
286
6138a722 287L<UNIVERSAL> has been upgraded from version 1.09 to version 1.10.
6d110ad0
FC
288
289=back
290
e3c71926
FR
291=head1 Diagnostics
292
293The following additions or changes have been made to diagnostic output,
294including warnings and fatal error messages. For the complete list of
295diagnostic messages, see L<perldiag>.
6d110ad0 296
e3c71926 297=head2 New Diagnostics
46dd4080 298
e3c71926 299=head3 New Errors
d6cf2367 300
63ac71b9 301=over 4
e46d9735
CBW
302
303=item *
304
6138a722
SH
305L<Source filters apply only to byte streams|perldiag/"Source filters apply only to byte streams">
306
307This new error occurs when you try to activate a source filter (usually by
308loading a source filter module) within a string passed to C<eval> under the
309C<unicode_eval> feature.
310
311=item *
312
313L<That use of $[ is unsupported|perldiag/"That use of $[ is unsupported">
314
315This previously removed error has been restored with the re-implementation
316of C<$[> as a module.
828d6195 317
3432e5a1 318=back
83307084 319
e3c71926 320=head3 New Warnings
d39de893 321
3432e5a1 322=over 4
39afdc5a
CBW
323
324=item *
325
dd14f06c
FC
326L<length() used on %s|perldiag/length() used on %s>
327
328This new warning occurs when C<length> is used on an array or hash, instead
329of C<scalar(@array)> or C<scalar(keys %hash)>.
330
331=item *
332
ad32999b
FC
333L<$[ used in %s (did you mean $] ?)|perldiag/"$[ used in %s (did you mean $] ?)">
334
335This new warning exists to catch the mistaken use of C<$[> in version
336checks. C<$]>, not C<$[>, contains the version number. C<$[> in a numeric
337comparison is almost always wrong.
666c7ca6 338
6138a722
SH
339=item *
340
2e7ab03e 341L<Use of assignment to $[ is deprecated|perldiag/"Use of assignment to $[ is deprecated">
6138a722
SH
342
343This previously removed warning has been restored with the re-implementation
344of C<$[> as a module.
345
e3c71926 346=back
7b8e5ef0 347
e3c71926 348=head2 Changes to Existing Diagnostics
91710846 349
e3c71926 350=over 4
91710846
DG
351
352=item *
353
e859651c
FC
354The uninitialized warning for C<y///r> when C<$_> is implicit and undefined
355now mentions the variable name, just like the non-/r variation of the
356operator.
a2fa999d 357
f81e39ef
FC
358=item *
359
360The "Applying pattern match..." or similar warning produced when an array
361or hash is on the left-hand side of the C<=~> operator now mentions the
362name of the variable.
363
e3c71926 364=back
a2fa999d 365
6138a722 366=head1 Configuration and Compilation
bd65daab 367
e3c71926 368=over 4
bd65daab 369
3f2cb5bf
SM
370=item *
371
531ba486
NC
372F<pod/buildtoc>, used by the build process to build L<perltoc>, has been
373refactored and simplified. It now only contains code to build L<perltoc>;
374the code to regenerate Makefiles has been moved to F<Porting/pod_rules.pl>.
6138a722 375It's a bug if this change has any material effect on the build process.
b420b12a 376
3432e5a1 377=back
b420b12a 378
e3c71926 379=head1 Platform Support
b53e16ae 380
347e96f6 381=head2 Platform-Specific Notes
3432e5a1 382
d6cf2367
FC
383=over 4
384
347e96f6 385=item GNU/Hurd
9cfd094e 386
347e96f6
SH
387Numerous build and test failures on GNU/Hurd have been resolved with hints
388for building DBM modules, detection of the library search path, and enabling
389of large file support.
e3c71926 390
347e96f6 391=item OpenVOS
9cfd094e 392
347e96f6
SH
393Perl is now built with dynamic linking on OpenVOS, the minimum supported
394version of which is now Release 17.1.0.
95f7e41f 395
347e96f6 396=item SunOS
95f7e41f 397
347e96f6
SH
398The CC workshop C++ compiler is now detected and used on systems that ship
399without cc.
df5b44bd 400
63ac71b9 401=back
310913d4 402
3432e5a1 403=head1 Internal Changes
d6cf2367 404
e3c71926 405=over 4
b53e16ae
FC
406
407=item *
408
a3f52e2e 409C<PL_curstash> is now reference-counted.
b53e16ae 410
3432e5a1 411=back
60092ce4 412
3432e5a1 413=head1 Selected Bug Fixes
309aab3a 414
e3c71926 415=over 4
b53e16ae
FC
416
417=item *
418
a3f52e2e
FC
419Perl now holds an extra reference count on the package that code is
420currently compiling in. This means that the following code no longer crashes [perl #101486]:
421
422 package Foo;
423 BEGIN {*Foo:: = *Bar::}
424 sub foo;
425
426=item *
427
428F<dumpvar.pl>, and consequently the C<x> command in the debugger, have been
429fixed to handle objects blessed into classes whose names contain "=". The
430contents of such objects used not to be dumped [perl #101814].
431
432=item *
433
434The C<x> repetition operator no longer crashes on 64-bit builds with large
2e7ab03e 435repeat counts [perl #94560].
a3f52e2e
FC
436
437=item *
438
439A fix to C<glob> under miniperl (used to configure modules when perl itself
440is built) in Perl 5.15.3 stopped C<< <~> >> from returning the home
441directory, because it cleared %ENV before calling csh. Now C<$ENV{HOME}>
442is preserved. This fix probably does not affect anything. If
443L<File::Glob> fails to load for some reason, Perl reverts to using csh.
444So it would apply in that case.
445
446=item *
447
448On OSes other than VMS, Perl's C<glob> operator (and the C<< <...> >> form)
449use L<File::Glob> underneath. L<File::Glob> splits the pattern into words,
450before feeding each word to its C<bsd_glob> function.
451
452There were several inconsistencies in the way the split was done. Now
453quotation marks (' and ") are always treated as shell-style word delimiters
454(that allow whitespace as part of a word) and backslashes are always
455preserved, unless they exist to escape quotation marks. Before, those
456would only sometimes be the case, depending on whether the pattern
457contained whitespace. Also, escaped whitespace at the end of the pattern
ad32999b 458is no longer stripped [perl #40470].
a3f52e2e
FC
459
460=item *
461
462C<CORE::glob> now works as a way to call the default globbing function. It
463used to respect overrides, despite the C<CORE::> prefix.
464
465=item *
466
467In 5.14, C</[[:lower:]]/i> and C</[[:upper:]]/i> no longer matched the
468opposite case. This has been fixed [perl #101970].
469
470=item *
471
472A regular expression match with an overloaded object on the right-hand side
473would in some cases stringify the object too many times.
474
475=item *
476
477The C-level C<pregcomp> function could become confused as to whether the
478pattern was in UTF8 if the pattern was an overloaded, tied, or otherwise
479magical scalar [perl #101940].
ca955add 480
bbdd8bad
KW
481=item *
482
483A regression has been fixed that was introduced in 5.14, in C</i>
484regular expression matching, in which a match improperly fails if the
485pattern is in UTF-8, the target string is not, and a Latin-1 character
486precedes a character in the string that should match the pattern. [perl
487#101710]
488
ad32999b
FC
489=item *
490
491C<@{"..."} = reverse ...> started crashing in 5.15.3. This has been fixed.
492
493=item *
494
495C<ref> in a tainted expression started producing an "sv_upgrade" error in
4965.15.4. This has been fixed.
497
498=item *
499
500Weak references to lexical hashes going out of scope were not going stale
501(becoming undefined), but continued to point to the hash.
502
503=item *
504
505Weak references to lexical variables going out of scope are now broken
506before any magical methods (e.g., DESTROY on a tie object) are called.
507This prevents such methods from modifying the variable that will be seen
508the next time the scope is entered.
509
510=item *
511
512A C<keys> optimisation in Perl 5.12.0 to make it faster on empty hashes
513caused C<each> not to reset the iterator if called after the last element
514was deleted. This has been fixed.
515
516=item *
517
518The C<#line 42 foo> directive used not to update the arrays of lines used
519by the debugger if it occurred in a string eval. This was partially fixed
520in 5.14, but it only worked for a single C<#line 42 foo> in each eval. Now
521it works for multiple.
522
523=item *
524
525String eval used not to localise C<%^H> when compiling its argument if it
526was empty at the time the C<eval> call itself was compiled. This could
527lead to scary side effects, like C<use re "/m"> enabling other flags that
528the surrounding code was trying to enable for its caller [perl #68750].
529
3973654e
FC
530=item *
531
532Creating a BEGIN block from XS code (via C<newXS> or C<newATTRSUB>) would,
533on completion, make the hints of the current compiling code the current
534hints. This could cause warnings to occur in a non-warning scope.
535
cca38fda
FC
536=item *
537
538C<eval $string> and C<require> no longer localise hints (C<$^H> and C<%^H>)
539at run time, but only during compilation of the $string or required file.
540This makes C<BEGIN { $^H{foo}=7 }> equivalent to
541C<BEGIN { eval '$^H{foo}=7' }> [perl #70151].
542
9c7c1651
FC
543=item *
544
545When subroutine calls are intercepted by the debugger, the name of the
546subroutine or a reference to it is stored in C<$DB::sub>, for the debugger
547to access. In some cases (such as C<$foo = *bar; undef *bar; &$foo>)
548C<$DB::sub> would be set to a name that could not be used to find the
549subroutine, and so the debugger's attempt to call it would fail. Now the
550check to see whether a reference is needed is more robust, so those
551problems should not happen anymore [rt.cpan.org #69862].
552
fce59cd4
FC
553=item *
554
555Localising a tied scalar that returns a typeglob no longer stops it from
556being tied till the end of the scope.
557
b9e83cd1
FC
558=item *
559
560When C<open> is called with three arguments, the third being a file handle
561(as in C<< open $fh, ">&", $fh2 >>), if the third argument is tied or a
562reference to a tied variable, FETCH is now called exactly once, instead of
5630, 2, or 3 times (all of which could occur in various circumstances).
564
bf19b80e
FC
565=item *
566
0e82bbcd
FC
567C<sort> no longer ignores FETCH when passed a reference to a tied glob for
568the comparison routine.
bf19b80e 569
65b66aa9
FC
570=item *
571
572Warnings emitted by C<sort> when a custom comparison routine returns a
573non-numeric value now show the line number of the C<sort> operator, rather
574than the last line of the comparison routine. The warnings also occur now
575only if warnings are enabled in the scope where C<sort> occurs. Previously
576the warnings would occur if enabled in the comparison routine's scope.
577
b53e16ae
FC
578=item *
579
347e96f6
SH
580C<Internals::SvREFCNT> now behaves consistently in 'get' and 'set' scenarios
581[perl #103222] and also treats the reference count as unsigned.
b53e16ae 582
63ac71b9 583=back
bbc28bfc 584
e3c71926 585=head1 Acknowledgements
a777c865 586
e3c71926 587XXX Generate this with:
a777c865 588
e3c71926 589 perl Porting/acknowledgements.pl v5.15.4..HEAD
29cf780c 590
44691e6f
AB
591=head1 Reporting Bugs
592
593If you find what you think is a bug, you might check the articles
34dc2ec0 594recently posted to the comp.lang.perl.misc newsgroup and the perl
44691e6f
AB
595bug database at http://rt.perl.org/perlbug/ . There may also be
596information at http://www.perl.org/ , the Perl Home Page.
597
598If you believe you have an unreported bug, please run the L<perlbug>
599program included with your release. Be sure to trim your bug down
600to a tiny but sufficient test case. Your bug report, along with the
601output of C<perl -V>, will be sent off to perlbug@perl.org to be
602analysed by the Perl porting team.
603
604If the bug you are reporting has security implications, which make it
605inappropriate to send to a publicly archived mailing list, then please send
34dc2ec0 606it to perl5-security-report@perl.org. This points to a closed subscription
b4707b2a
FC
607unarchived mailing list, which includes
608all the core committers, who will be able
44691e6f
AB
609to help assess the impact of issues, figure out a resolution, and help
610co-ordinate the release of patches to mitigate or fix the problem across all
34dc2ec0
DM
611platforms on which Perl is supported. Please only use this address for
612security issues in the Perl core, not for modules independently
44691e6f
AB
613distributed on CPAN.
614
615=head1 SEE ALSO
616
617The F<Changes> file for an explanation of how to view exhaustive details
618on what changed.
619
620The F<INSTALL> file for how to build Perl.
621
622The F<README> file for general stuff.
623
624The F<Artistic> and F<Copying> files for copyright information.
625
626=cut