This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: add a missing "if" to clarify bugfix
[perl5.git] / Porting / perl5160delta.pod
CommitLineData
30682cc3
RS
1=encoding utf8
2
3=head1 NAME
4
92221470 5perl5160delta - what is new for perl v5.16.0
30682cc3
RS
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.14.0 release and
10the 5.16.0 release.
11
12If you are upgrading from an earlier release such as 5.12.0, first read
13L<perl5140delta>, which describes differences between 5.12.0 and
145.14.0.
15
16=head1 Notice
17
0d0f20ee
RS
18As described in L<perlpolicy>, the release of Perl 5.16.0 marks the
19official end of support for Perl 5.12. Users of Perl 5.12 or earlier
20should consider upgrading to a more recent release of Perl.
30682cc3
RS
21
22=head1 Core Enhancements
23
412912b6
RS
24=head2 C<use I<VERSION>>
25
26As of this release, version declarations like C<use v5.16> now disable
27all features before enabling the new feature bundle. This means that
28the following holds true:
29
30 use 5.016;
a4574d2e 31 # only 5.16 features enabled here
412912b6 32 use 5.014;
a4574d2e 33 # only 5.14 features enabled here (not 5.16)
412912b6
RS
34
35C<use v5.12> and higher continue to enable strict, but explicit C<use
36strict> and C<no strict> now override the version declaration, even
37when they come first:
38
39 no strict;
40 use 5.012;
41 # no strict here
42
43There is a new ":default" feature bundle that represents the set of
44features enabled before any version declaration or C<use feature> has
45been seen. Version declarations below 5.10 now enable the ":default"
46feature set. This does not actually change the behaviour of C<use
47v5.8>, because features added to the ":default" set are those that were
48traditionally enabled by default, before they could be turned off.
49
6c0587ef
FC
50C<< no feature >> now resets to the default feature set. To disable all
51features (which is likely to be a pretty special-purpose request, since
52it presumably won't match any named set of semantics) you can now
53write C<< no feature ':all' >>.
54
412912b6
RS
55C<$[> is now disabled under C<use v5.16>. It is part of the default
56feature set and can be turned on or off explicitly with C<use feature
57'array_base'>.
58
a4574d2e
RS
59=head2 C<__SUB__>
60
61The new C<__SUB__> token, available under the C<current_sub> feature
021c503d 62(see L<feature>) or C<use v5.16>, returns a reference to the current
a4574d2e 63subroutine, making it easier to write recursive closures.
412912b6 64
a4574d2e 65=head2 New and Improved Built-ins
412912b6 66
a4574d2e
RS
67=head3 More consistent C<eval>
68
69The C<eval> operator sometimes treats a string argument as a sequence of
70characters and sometimes as a sequence of bytes, depending on the
71internal encoding. The internal encoding is not supposed to make any
72difference, but there is code that relies on this inconsistency.
73
74The new C<unicode_eval> and C<evalbytes> features (enabled under C<use
da7ea579 755.16.0>) resolve this. The C<unicode_eval> feature causes C<eval
a4574d2e
RS
76$string> to treat the string always as Unicode. The C<evalbytes>
77features provides a function, itself called C<evalbytes>, which
78evaluates its argument always as a string of bytes.
79
80These features also fix oddities with source filters leaking to outer
81dynamic scopes.
82
83See L<feature> for more detail.
84
85=head3 C<substr> lvalue revamp
86
22ae2565 87=for comment Does this belong here, or under Incomptable Changes?
412912b6
RS
88
89When C<substr> is called in lvalue or potential lvalue context with two
90or three arguments, a special lvalue scalar is returned that modifies
91the original string (the first argument) when assigned to.
92
93Previously, the offsets (the second and third arguments) passed to
94C<substr> would be converted immediately to match the string, negative
95offsets being translated to positive and offsets beyond the end of the
96string being truncated.
97
98Now, the offsets are recorded without modification in the special
99lvalue scalar that is returned, and the original string is not even
100looked at by C<substr> itself, but only when the returned lvalue is
101read or modified.
102
22ae2565 103These changes result in an incompatible change:
412912b6
RS
104
105If the original string changes length after the call to C<substr> but
106before assignment to its return value, negative offsets will remember
107their position from the end of the string, affecting code like this:
108
109 my $string = "string";
110 my $lvalue = \substr $string, -4, 2;
111 print $lvalue, "\n"; # prints "ri"
112 $string = "bailing twine";
113 print $lvalue, "\n"; # prints "wi"; used to print "il"
114
115The same thing happens with an omitted third argument. The returned
116lvalue will always extend to the end of the string, even if the string
117becomes longer.
118
22ae2565
FC
119Since this change also allowed many bugs to be fixed (see
120L</Fixes to the C<substr> operator>), and since the behaviour
121of negative offsets has never been specified, so the
412912b6
RS
122change was deemed acceptable.
123
a4574d2e 124=head3 Return value of C<tied>
412912b6
RS
125
126The value returned by C<tied> on a tied variable is now the actual
127scalar that holds the object to which the variable is tied. This
128allows ties to be weakened with C<Scalar::Util::weaken(tied
129$tied_variable)>.
130
a4574d2e 131=head2 Unicode Support
412912b6 132
77649ca9
RS
133=head3 Supports (I<almost>) Unicode 6.1
134
135Besides the addition of whole new scripts, and new characters in
136existing scripts, this new version of Unicode, as always, makes some
137changes to existing characters. One change that may trip up some
138applications is that the General Category of two characters in the
139Latin-1 range, PILCROW SIGN and SECTION SIGN, has been changed from
140Other_Symbol to Other_Punctuation. The same change has been made for
141a character in each of Tibetan, Ethiopic, and Aegean.
142The code points U+3248..U+324F (CIRCLED NUMBER TEN ON BLACK SQUARE
143through CIRCLED NUMBER EIGHTY ON BLACK SQUARE) have had their General
144Category changed from Other_Symbol to Other_Numeric. The Line Break
145property has changes for Hebrew and Japanese; and as a consequence of
146other changes in 6.1, the Perl regular expression construct C<\X> now
147works differently for some characters in Thai and Lao.
148
149New aliases (synonyms) have been defined for many property values;
7adddc81 150these, along with the previously existing ones, are all cross-indexed in
77649ca9
RS
151L<perluniprops>.
152
153The return value of C<charnames::viacode()> is affected by other
154changes:
155
156 Code point Old Name New Name
157 U+000A LINE FEED (LF) LINE FEED
158 U+000C FORM FEED (FF) FORM FEED
159 U+000D CARRIAGE RETURN (CR) CARRIAGE RETURN
160 U+0085 NEXT LINE (NEL) NEXT LINE
161 U+008E SINGLE-SHIFT 2 SINGLE-SHIFT-2
162 U+008F SINGLE-SHIFT 3 SINGLE-SHIFT-3
163 U+0091 PRIVATE USE 1 PRIVATE USE-1
164 U+0092 PRIVATE USE 2 PRIVATE USE-2
165 U+2118 SCRIPT CAPITAL P WEIERSTRASS ELLIPTIC FUNCTION
166
167Perl will accept any of these names as input, but
168C<charnames::viacode()> now returns the new name of each pair. The
169change for U+2118 is considered by Unicode to be a correction, that is
170the original name was a mistake (but again, it will remain forever valid
171to use it to refer to U+2118). But most of these changes are the
172fallout of the mistake Unicode 6.0 made in naming a character used in
7adddc81
FC
173Japanese cell phones to be "BELL", which conflicts with the longstanding
174industry use of (and Unicode's recommendation to use) that name
77649ca9
RS
175to mean the ASCII control character at U+0007. As a result, that name
176has been deprecated in Perl since v5.14; and any use of it will raise a
177warning message (unless turned off). The name "ALERT" is now the
178preferred name for this code point, with "BEL" being an acceptable short
179form. The name for the new cell phone character, at code point U+1F514,
180remains undefined in this version of Perl (hence we don't quite
181implement all of Unicode 6.1), but starting in v5.18, BELL will mean
182this character, and not U+0007.
183
184Unicode has taken steps to make sure that this sort of mistake does not
185happen again. The Standard now includes all the generally accepted
186names and abbreviations for control characters, whereas previously it
187didn't (though there were recommended names for most of them, which Perl
188used). This means that most of those recommended names are now
189officially in the Standard. Unicode did not recommend names for the
190four code points listed above between U+008E and U+008F, and in
191standardizing them Unicode subtly changed the names that Perl had
192previously given them, by replacing the final blank in each name by a
193hyphen. Unicode also officially accepts names that Perl had deprecated,
194such as FILE SEPARATOR. Now the only deprecated name is BELL.
195Finally, Perl now uses the new official names instead of the old
196(now considered obsolete) names for the first four code points in the
197list above (the ones which have the parentheses in them).
198
199Now that the names have been placed in the Unicode standard, these kinds
200of changes should not happen again, though corrections, such as to
201U+2118, are still possible.
202
203Unicode also added some name abbreviations, which Perl now accepts:
204SP for SPACE;
205TAB for CHARACTER TABULATION;
206NEW LINE, END OF LINE, NL, and EOL for LINE FEED;
207LOCKING-SHIFT ONE for SHIFT OUT;
208LOCKING-SHIFT ZERO for SHIFT IN;
209and ZWNBSP for ZERO WIDTH NO-BREAK SPACE.
210
211More details on this version of Unicode are provided in
212L<http://www.unicode.org/versions/Unicode6.1.0/>.
213
a4574d2e 214=head3 C<use charnames> is no longer needed for C<\N{I<name>}>
12477442 215
a4574d2e
RS
216When C<\N{I<name>}> is encountered, the C<charnames> module is now
217automatically loaded when needed as if the C<:full> and C<:short>
218options had been specified. See L<charnames> for more information.
12477442 219
021c503d
RS
220=head3 C<\N{...}> can now have Unicode loose name matching
221
222This is described in the C<charnames> item in
223L</Updated Modules and Pragmata> below.
224
a4574d2e 225=head3 Unicode Symbol Names
12477442
RS
226
227Perl now has proper support for Unicode in symbol names. It used to be
228that C<*{$foo}> would ignore the internal UTF8 flag and use the bytes of
229the underlying representation to look up the symbol. That meant that
230C<*{"\x{100}"}> and C<*{"\xc4\x80"}> would return the same thing. All
231these parts of Perl have been fixed to account for Unicode:
232
233=over
234
235=item *
236
237Method names (including those passed to C<use overload>)
238
239=item *
240
241Typeglob names (including names of variables, subroutines and filehandles)
242
243=item *
244
245Package names
246
247=item *
248
12477442
RS
249C<goto>
250
251=item *
252
253Symbolic dereferencing
254
255=item *
256
257Second argument to C<bless()> and C<tie()>
258
259=item *
260
261Return value of C<ref()>
262
263=item *
264
12477442
RS
265Subroutine prototypes
266
267=item *
268
269Attributes
270
a4574d2e
RS
271=item *
272
273Various warnings and error messages that mention variable names or values,
274methods, etc.
275
276=back
277
278In addition, a parsing bug has been fixed that prevented C<*{é}> from
279implicitly quoting the name, but instead interpreted it as C<*{+é}>, which
280would cause a strict violation.
281
282C<*{"*a::b"}> automatically strips off the * if it is followed by an ASCII
283letter. That has been extended to all Unicode identifier characters.
284
da7ea579
RS
285One-character non-ASCII non-punctuation variables (like C<$é>) are now
286subject to "Used only once" warnings. They used to be exempt, as they
287was treated as punctuation variables.
a4574d2e
RS
288
289Also, single-character Unicode punctuation variables (like $‰) are now
da7ea579 290supported [perl #69032].
a4574d2e 291
77649ca9
RS
292=head3 Improved ability to mix locales and Unicode, including UTF-8 locales
293
294An optional parameter has been added to C<use locale>
295
296 use locale ':not_characters';
297
298which tells Perl to use all but the C<LC_CTYPE> and C<LC_COLLATE>
299portions of the current locale. Instead, the character set is assumed
300to be Unicode. This allows locales and Unicode to be seamlessly mixed,
301including the increasingly frequent UTF-8 locales. When using this
302hybrid form of locales, the C<:locale> layer to the L<open> pragma can
303be used to interface with the file system, and there are CPAN modules
304available for ARGV and environment variable conversions.
305
306Full details are in L<perllocale>.
307
308=head3 New function C<fc> and corresponding escape sequence C<\F> for Unicode foldcase
309
310Unicode foldcase is an extension to lowercase that gives better results
311when comparing two strings case-insensitively. It has long been used
312internally in regular expression C</i> matching. Now it is available
313explicitly through the new C<fc> function call (enabled by
314S<C<"use feature 'fc'">>, or C<use v5.16>, or explicitly callable via
315C<CORE::fc>) or through the new C<\F> sequence in double-quotish
316strings.
317
318Full details are in L<perlfunc/fc>.
319
320=head3 The Unicode C<Script_Extensions> property is now supported.
a4574d2e
RS
321
322New in Unicode 6.0, this is an improved C<Script> property. Details
323are in L<perlunicode/Scripts>.
324
a4574d2e
RS
325=head2 XS Changes
326
021c503d 327=head3 Improved typemaps for Some Builtin Types
a4574d2e
RS
328
329Most XS authors will be aware that there is a longstanding bug in the
330OUTPUT typemap for T_AVREF (C<AV*>), T_HVREF (C<HV*>), T_CVREF (C<CV*>),
331and T_SVREF (C<SVREF> or C<\$foo>) that requires manually decrementing
332the reference count of the return value instead of the typemap taking
4d6200df
FC
333care of this. For backwards-compatibility, this cannot be changed in the
334default typemaps. But we now provide additional typemaps
a4574d2e
RS
335C<T_AVREF_REFCOUNT_FIXED>, etc. that do not exhibit this bug. Using
336them in your extension is as simple as having one line in your
337C<TYPEMAP> section:
338
339 HV* T_HVREF_REFCOUNT_FIXED
340
341=head3 C<is_utf8_char()>
342
343The XS-callable function C<is_utf8_char()>, when presented with
344malformed UTF-8 input, can read up to 12 bytes beyond the end of the
345string. This cannot be fixed without changing its API. It is not
346called from CPAN. The documentation now describes how to use it
347safely.
348
77649ca9
RS
349=head3 Added C<is_utf8_char_buf()>
350
351This function is designed to replace the deprecated L</is_utf8_char()>
352function. It includes an extra parameter to make sure it doesn't read
353past the end of the input buffer.
354
a4574d2e
RS
355=head3 Other C<is_utf8_foo()> functions, as well as C<utf8_to_foo()>, etc.
356
357Most of the other XS-callable functions that take UTF-8 encoded input
358implicitly assume that the UTF-8 is valid (not malformed) in regards to
359buffer length. Do not do things such as change a character's case or
360see if it is alphanumeric without first being sure that it is valid
361UTF-8. This can be safely done for a whole string by using one of the
362functions C<is_utf8_string()>, C<is_utf8_string_loc()>, and
363C<is_utf8_string_loclen()>.
364
021c503d
RS
365=head3 New Pad API
366
367Many new functions have been added to the API for manipulating lexical
368pads. See L<perlapi/Pad Data Structures> for more information.
369
a4574d2e
RS
370=head2 Changes to Special Variables
371
021c503d
RS
372=head3 C<$$> can be assigned to
373
374C<$$> was made read-only in Perl 5.8.0. But only sometimes: C<local $$>
375would make it writable again. Some CPAN modules were using C<local $$> or
376XS code to bypass the read-only check, so there is no reason to keep C<$$>
377read-only. (This change also allowed a bug to be fixed while maintaining
378backward compatibility.)
379
380=head3 C<$^X> converted to an absolute path on FreeBSD, OS X and Solaris
381
382C<$^X> is now converted to an absolute path on OS X, FreeBSD (without
4d6200df 383needing F</proc> mounted) and Solaris 10 and 11. This augments the
021c503d
RS
384previous approach of using F</proc> on Linux, FreeBSD and NetBSD
385(in all cases, where mounted).
386
387This makes relocatable perl installations more useful on these platforms.
388(See "Relocatable @INC" in F<INSTALL>)
a4574d2e
RS
389
390=head2 Debugger Changes
391
392=head3 Features inside the debugger
393
394The current Perl's L<feature> bundle is now enabled for commands entered
395in the interactive debugger.
396
397=head3 New option for the debugger's B<t> command
398
399The B<t> command in the debugger, which toggles tracing mode, now
400accepts a numeric argument that determines how many levels of subroutine
401calls to trace.
402
403=head3 C<enable> and C<disable>
404
405The debugger now has C<disable> and C<enable> commands for disabling
da7ea579 406existing breakpoints and re-enabling them. See L<perldebug>.
a4574d2e
RS
407
408=head3 Breakpoints with file names
409
410The debugger's "b" command for setting breakpoints now allows a line
411number to be prefixed with a file name. See
412L<perldebug/"b [file]:[line] [condition]">.
413
414=head2 The C<CORE> Namespace
415
a40c91f0 416=head3 The C<CORE::> prefix
a4574d2e
RS
417
418The C<CORE::> prefix can now be used on keywords enabled by
a40c91f0 419L<feature.pm|feature>, even outside the scope of C<use feature>.
a4574d2e 420
a40c91f0 421=head3 Subroutines in the C<CORE> namespace
a4574d2e 422
a40c91f0
FC
423Many Perl keywords are now available as subroutines in the CORE namespace.
424This allows them to be aliased:
425
426 BEGIN { *entangle = \&CORE::tie }
427 entangle $variable, $package, @args;
428
429And for prototypes to be bypassed:
430
431 sub mytie(\[%$*@]$@) {
432 my ($ref, $pack, @args) = @_;
433 ... do something ...
434 goto &CORE::tie;
435 }
436
437Some of these cannot be called through references or via C<&foo> syntax,
438but must be called as barewords.
439
440See L<CORE> for details.
a4574d2e
RS
441
442=head2 Other Changes
443
021c503d
RS
444=head3 Anonymous handles
445
446Automatically generated file handles are now named __ANONIO__ when the
447variable name cannot be determined, rather than $__ANONIO__.
448
449=head3 Autoloaded sort Subroutines
450
451Custom sort subroutines can now be autoloaded [perl #30661]:
452
453 sub AUTOLOAD { ... }
454 @sorted = sort foo @list; # uses AUTOLOAD
455
456=head3 C<continue> no longer requires the "switch" feature
457
458The C<continue> keyword has two meanings. It can introduce a C<continue>
459block after a loop, or it can exit the current C<when> block. Up till now,
460the latter meaning was only valid with the "switch" feature enabled, and
461was a syntax error otherwise. Since the main purpose of feature.pm is to
462avoid conflicts with user-defined subroutines, there is no reason for
463C<continue> to depend on it.
464
021c503d
RS
465=head3 DTrace probes for interpreter phase change
466
467The C<phase-change> probes will fire when the interpreter's phase
4d6200df
FC
468changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
469the new phase name; C<arg1> is the old one. This is useful mostly
021c503d
RS
470for limiting your instrumentation to one or more of: compile time,
471run time, destruct time.
472
473=head3 C<__FILE__()> Syntax
474
475The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
476with an empty pair of parentheses after them. This makes them parse the
477same way as C<time>, C<fork> and other built-in functions.
a4574d2e 478
f4ff5ee7
FC
479=head3 The C<\$> prototype accepts any scalar lvalue
480
481The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
482argument. Previously they only accepted scalars beginning with C<$> and
483hash and array elements. This change makes them consistent with the way
484the built-in C<read> and C<recv> functions (among others) parse their
485arguments. This means that one can override the built-in functions with
486custom subroutines that parse their arguments the same way.
487
488=head3 C<_> in subroutine prototypes
77649ca9
RS
489
490The C<_> character in subroutine prototypes is now allowed before C<@> or
491C<%>.
492
a4574d2e
RS
493=head1 Security
494
77649ca9
RS
495=head2 Use C<is_utf8_char_buf()> and not C<is_utf8_char()>
496
497The latter function is now deprecated because its API is insufficient to
498guarantee that it doesn't read (up to 12 bytes in the worst case) beyond
499the end of its input string. See
500L<is_utf8_char_buf()|/Added is_utf8_char_buf()>.
501
a4574d2e
RS
502=head2 C<File::Glob::bsd_glob()> memory error with GLOB_ALTDIRFUNC (CVE-2011-2728).
503
504Calling C<File::Glob::bsd_glob> with the unsupported flag
505GLOB_ALTDIRFUNC would cause an access violation / segfault. A Perl
506program that accepts a flags value from an external source could expose
507itself to denial of service or arbitrary code execution attacks. There
508are no known exploits in the wild. The problem has been corrected by
509explicitly disabling all unsupported flags and setting unused function
510pointers to null. Bug reported by Clément Lecigne.
511
512=head2 Privileges are now set correctly when assigning to C<$(>
513
514A hypothetical bug (probably non-exploitable in practice) due to the
515incorrect setting of the effective group ID while setting C<$(> has been
516fixed. The bug would only have affected systems that have C<setresgid()>
517but not C<setregid()>, but no such systems are known of.
518
519=head1 Deprecations
520
521=head2 Don't read the Unicode data base files in F<lib/unicore>
522
523It is now deprecated to directly read the Unicode data base files.
524These are stored in the F<lib/unicore> directory. Instead, you should
525use the new functions in L<Unicode::UCD>. These provide a stable API,
021c503d 526and give complete information.
a4574d2e
RS
527
528Perl may at some point in the future change or remove the files. The
529file most likely for applications to have used is
530F<lib/unicore/ToDigit.pl>. L<Unicode::UCD/prop_invmap()> can be used to
531get at its data instead.
532
77649ca9
RS
533=head2 C<is_utf8_char()>
534
535This function is deprecated because it could read beyond the end of the
536input string. Use the new L<is_utf8_char_buf()|/Added is_utf8_char_buf()>
537instead.
538
a4574d2e
RS
539=head1 Future Deprecations
540
2200e649 541This section serves as a notice of features that are I<likely> to be
021c503d
RS
542removed or L<deprecated|perlpolicy/deprecated> in the next release of
543perl (5.18.0). If your code depends on these features, you should
544contact the Perl 5 Porters via the L<mailing
a4574d2e
RS
545list|http://lists.perl.org/list/perl5-porters.html> or L<perlbug> to
546explain your use case and inform the deprecation process.
547
548=head2 Core Modules
549
550These modules may be marked as deprecated I<from the core>. This only
551means that they will no longer be installed by default with the core
552distribution, but will remain available on the CPAN.
553
554=over
555
021c503d 556=item *
a4574d2e 557
021c503d 558CPANPLUS
a4574d2e 559
021c503d 560=item *
a4574d2e 561
021c503d 562Filter::Simple
a4574d2e 563
021c503d 564=item *
a4574d2e 565
021c503d 566PerlIO::mmap
a4574d2e 567
021c503d 568=item *
a4574d2e 569
021c503d 570Pod::Parser, Pod::LaTeX
a4574d2e 571
021c503d 572=item *
a4574d2e 573
021c503d 574SelfLoader
a4574d2e 575
021c503d 576=item *
a4574d2e 577
021c503d 578Text::Soundex
a4574d2e 579
021c503d 580=item *
a4574d2e 581
021c503d 582Thread.pm
a4574d2e
RS
583
584=back
585
021c503d 586=head2 Platforms with no supporting programmers:
12477442 587
2200e649
FC
588These platforms will probably have their
589special build support removed during the
021c503d 5905.17.0 development series.
12477442
RS
591
592=over
593
594=item *
595
021c503d 596BeOS
12477442
RS
597
598=item *
599
021c503d 600djgpp
12477442
RS
601
602=item *
603
021c503d 604dgux
12477442
RS
605
606=item *
607
021c503d 608EPOC
12477442
RS
609
610=item *
611
021c503d 612MPE/iX
12477442
RS
613
614=item *
615
021c503d 616Rhapsody
12477442
RS
617
618=item *
619
021c503d 620UTS
12477442
RS
621
622=item *
623
021c503d 624VM/ESA
12477442
RS
625
626=back
627
021c503d 628=head2 Other Future Deprecations
a14d7d4a 629
021c503d 630=over
ccad93fd 631
021c503d 632=item *
ccad93fd 633
021c503d 634Swapping of $< and $>
ccad93fd 635
da7ea579
RS
636For more information about this future deprecation, see L<the relevant RT
637ticket|https://rt.perl.org/rt3/Ticket/Display.html?id=96212>.
ccad93fd 638
021c503d 639=item *
ccad93fd 640
021c503d 641sfio, stdio
ccad93fd 642
6d365783
FC
643=item *
644
645Unescaped literal C<< "{" >> in regular expressions.
646
ddfbda00
FC
647It is planned starting in v5.20 to require a literal C<"{"> to be
648escaped by, for example, preceding it with a backslash. In v5.18, a
649deprecated warning message will be emitted for all such uses. Note that
650this only affects patterns which are to match a literal C<"{">. Other
651uses of this character, such as part of a quantifier or sequence like in
652the ones below are completely unaffected:
653
654 /foo{3,5}/
655 /\p{Alphabetic}/
656 /\N{DIGIT ZERO}
657
658The removal of this will allow extensions to pattern syntax, and better
659error checking of existing syntax. See L<perlre/Quantifiers> for an
660example.
661
021c503d 662=back
30682cc3 663
021c503d 664=head1 Incompatible Changes
94c11dd4 665
77649ca9
RS
666=head2 Special blocks called in void context
667
668Special blocks (C<BEGIN>, C<CHECK>, C<INIT>, C<UNITCHECK>, C<END>) are now
669called in void context. This avoids wasteful copying of the result of the
670last statement [perl #108794].
671
672=head2 The C<overloading> pragma and regexp objects
673
674With C<no overloading>, regular expression objects returned by C<qr//> are
675now stringified as "Regexp=REGEXP(0xbe600d)" instead of the regular
676expression itself [perl #108780].
677
678=head2 Two XS typemap Entries removed
679
680Two presumably unused XS typemap entries have been removed from the
4d6200df 681core typemap: T_DATAUNIT and T_CALLBACK. If you are, against all odds,
77649ca9
RS
682a user of these, please see the instructions on how to regain them
683in L<perlxstypemap>.
684
685=head2 Unicode 6.1 has incompatibilities with Unicode 6.0
686
687These are detailed in L</Supports (almost) Unicode 6.1> above.
16737d47
KW
688You can compile this version of Perl to use Unicode 6.0. See
689L<perlunicode/Hacking Perl to work on earlier Unicode versions (for very serious hackers only)>.
77649ca9 690
021c503d 691=head2 Borland compiler
94c11dd4 692
021c503d
RS
693All support for the Borland compiler has been dropped. The code had not
694worked for a long time anyway.
30682cc3 695
b325a3a2
RS
696=head2 Certain deprecated Unicode properties are no longer supported by default
697
698Perl should never have exposed certain Unicode properties that are used
699by Unicode internally and not meant to be publicly available. Use of
700these has generated deprecated warning messages since Perl 5.12. The
701removed properties are Other_Alphabetic,
702Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend,
703Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and
704Other_Uppercase.
705
706Perl may be recompiled to include any or all of them; instructions are
707given in
708L<perluniprops/Unicode character properties that are NOT accepted by Perl>.
709
710=head2 Dereferencing IO thingies as typeglobs
711
712The C<*{...}> operator, when passed a reference to an IO thingy (as in
713C<*{*STDIN{IO}}>), creates a new typeglob containing just that IO object.
b325a3a2
RS
714Previously, it would stringify as an empty string, but some operators would
715treat it as undefined, producing an "uninitialized" warning.
13eda273 716Now it stringifies as __ANONIO__ [perl #96326].
b325a3a2 717
4bbade93
RS
718=head2 User-defined case changing operations.
719
720This feature was deprecated in Perl 5.14, and has now been removed.
721The CPAN module L<Unicode::Casing> provides better functionality without
722the drawbacks that this feature had, as are detailed in the 5.14
723documentation:
724L<http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>
725
726=head2 XSUBs are now 'static'
727
728XSUB C functions are now 'static', that is, they are not visible from
4d6200df 729outside the compilation unit. Users can use the new C<XS_EXTERNAL(name)>
4bbade93
RS
730and C<XS_INTERNAL(name)> macros to pick the desired linking behaviour.
731The ordinary C<XS(name)> declaration for XSUBs will continue to declare
732non-'static' XSUBs for compatibility, but the XS compiler,
733C<ExtUtils::ParseXS> (C<xsubpp>) will emit 'static' XSUBs by default.
734C<ExtUtils::ParseXS>'s behaviour can be reconfigured from XS using the
270edcef 735C<EXPORT_XSUB_SYMBOLS> keyword. See L<perlxs> for details.
4bbade93 736
4bbade93
RS
737=head2 Weakening read-only references
738
739Weakening read-only references is no longer permitted. It should never
ef85823e 740have worked anyway, and in some cases could result in crashes.
4bbade93 741
a14d7d4a
RS
742=head2 Tying scalars that hold typeglobs
743
744Attempting to tie a scalar after a typeglob was assigned to it would
745instead tie the handle in the typeglob's IO slot. This meant that it was
746impossible to tie the scalar itself. Similar problems affected C<tied> and
747C<untie>: C<tied $scalar> would return false on a tied scalar if the last
748thing returned was a typeglob, and C<untie $scalar> on such a tied scalar
749would do nothing.
30682cc3 750
a14d7d4a
RS
751We fixed this problem before Perl 5.14.0, but it caused problems with some
752CPAN modules, so we put in a deprecation cycle instead.
30682cc3 753
a14d7d4a
RS
754Now the deprecation has been removed and this bug has been fixed. So
755C<tie $scalar> will always tie the scalar, not the handle it holds. To tie
756the handle, use C<tie *$scalar> (with an explicit asterisk). The same
757applies to C<tied *$scalar> and C<untie *$scalar>.
758
759=head2 IPC::Open3 no longer provides C<xfork()>, C<xclose_on_exec()>
760and C<xpipe_anon()>
761
762All three functions were private, undocumented and unexported. They do
763not appear to be used by any code on CPAN. Two have been inlined and one
764deleted entirely.
765
766=head2 C<$$> no longer caches PID
767
3af03643 768Previously, if one called fork(3) from C, Perl's
4d6200df 769notion of C<$$> could go out of sync with what getpid() returns. By always
a14d7d4a
RS
770fetching the value of C<$$> via getpid(), this potential bug is eliminated.
771Code that depends on the caching behavior will break. As described in
3af03643
FC
772L<Core Enhancements|/C<$$> can be assigned to>,
773C<$$> is now writable, but it will be reset during a
a14d7d4a 774fork.
30682cc3 775
77649ca9
RS
776=head2 C<$$> and C<getppid()> no longer emulate POSIX semantics under LinuxThreads
777
778The POSIX emulation of C<$$> and C<getppid()> under the obsolete
2a94ed8e
FC
779LinuxThreads implementation has been removed.
780This only impacts users of Linux 2.4 and
77649ca9
RS
781users of Debian GNU/kFreeBSD up to and including 6.0, not the vast
782majority of Linux installations that use NPTL threads.
783
37194c1a 784This means that C<getppid()>, like C<$$>, is now always guaranteed to
77649ca9
RS
785return the OS's idea of the current state of the process, not perl's
786cached version of it.
787
788See the documentation for L<$$|perlvar/$$> for details.
789
790=head2 C<< $< >>, C<< $> >>, C<$(> and C<$)> are no longer cached
791
37194c1a 792Similarly to the changes to C<$$> and C<getppid()>, the internal
77649ca9
RS
793caching of C<< $< >>, C<< $> >>, C<$(> and C<$)> has been removed.
794
795When we cached these values our idea of what they were would drift out
37194c1a 796of sync with reality if someone (e.g., someone embedding perl) called
04bd4d55 797C<sete?[ug]id()> without updating C<PL_e?[ug]id>. Having to deal with
77649ca9
RS
798this complexity wasn't worth it given how cheap the C<gete?[ug]id()>
799system call is.
800
801This change will break a handful of CPAN modules that use the XS-level
802C<PL_uid>, C<PL_gid>, C<PL_euid> or C<PL_egid> variables.
803
804The fix for those breakages is to use C<PerlProc_gete?[ug]id()> to
805retrieve them (e.g. C<PerlProc_getuid()>), and not to assign to
4d6200df 806C<PL_e?[ug]id> if you change the UID/GID/EUID/EGID. There is no longer
77649ca9
RS
807any need to do so since perl will always retrieve the up-to-date
808version of those values from the OS.
809
810=head2 Which Non-ASCII characters get quoted by C<quotemeta> and C<\Q> has changed
811
812This is unlikely to result in a real problem, as Perl does not attach
813special meaning to any non-ASCII character, so it is currently
814irrelevant which are quoted or not. This change fixes bug [perl #77654] and
815bring Perl's behavior more into line with Unicode's recommendations.
816See L<perlfunc/quotemeta>.
817
a4574d2e 818=head1 Performance Enhancements
6c3c09b8
RS
819
820=over
821
a4574d2e 822=item *
6c3c09b8 823
a4574d2e 824Improved performance for Unicode properties in regular expressions
6c3c09b8 825
a4574d2e 826=for comment Can this be compacted some? -- rjbs, 2012-02-20
6c3c09b8 827
a4574d2e
RS
828Matching a code point against a Unicode property is now done via a
829binary search instead of linear. This means for example that the worst
830case for a 1000 item property is 10 probes instead of 1000. This
831inefficiency has been compensated for in the past by permanently storing
832in a hash the results of a given probe plus the results for the adjacent
83364 code points, under the theory that near-by code points are likely to
834be searched for. A separate hash was used for each mention of a Unicode
835property in each regular expression. Thus, C<qr/\p{foo}abc\p{foo}/>
836would generate two hashes. Any probes in one instance would be unknown
837to the other, and the hashes could expand separately to be quite large
838if the regular expression were used on many different widely-separated
839code points. This can lead to running out of memory in extreme cases.
840Now, however, there is just one hash shared by all instances of a given
841property. This means that if C<\p{foo}> is matched against "A" in one
842regular expression in a thread, the result will be known immediately to
843all regular expressions, and the relentless march of using up memory is
844slowed considerably.
6c3c09b8 845
a4574d2e 846=item *
6c3c09b8 847
a4574d2e
RS
848Version declarations with the C<use> keyword (e.g., C<use 5.012>) are now
849faster, as they enable features without loading F<feature.pm>.
6c3c09b8 850
a4574d2e 851=item *
6c3c09b8 852
a4574d2e
RS
853C<local $_> is faster now, as it no longer iterates through magic that it
854is not going to copy anyway.
6c3c09b8 855
a4574d2e 856=item *
6c3c09b8 857
a4574d2e
RS
858Perl 5.12.0 sped up the destruction of objects whose classes define
859empty C<DESTROY> methods (to prevent autoloading), by simply not
860calling such empty methods. This release takes this optimisation a
861step further, by not calling any C<DESTROY> method that begins with a
862C<return> statement. This can be useful for destructors that are only
863used for debugging:
6c3c09b8 864
a4574d2e
RS
865 use constant DEBUG => 1;
866 sub DESTROY { return unless DEBUG; ... }
6c3c09b8 867
a4574d2e
RS
868Constant-folding will reduce the first statement to C<return;> if DEBUG
869is set to 0, triggering this optimisation.
6c3c09b8 870
a4574d2e 871=item *
6c3c09b8 872
a4574d2e
RS
873Assigning to a variable that holds a typeglob or copy-on-write scalar
874is now much faster. Previously the typeglob would be stringified or
875the copy-on-write scalar would be copied before being clobbered.
6c3c09b8 876
a4574d2e 877=item *
6c3c09b8 878
a4574d2e
RS
879Assignment to C<substr> in void context is now more than twice its
880previous speed. Instead of creating and returning a special lvalue
881scalar that is then assigned to, C<substr> modifies the original string
882itself.
6c3c09b8 883
a4574d2e 884=item *
6c3c09b8 885
a4574d2e
RS
886C<substr> no longer calculates a value to return when called in void
887context.
6c3c09b8 888
ccad93fd 889=item *
30682cc3 890
a4574d2e
RS
891Due to changes in L<File::Glob>, Perl's C<glob> function and its C<<
892<...> >> equivalent are now much faster. The splitting of the pattern
893into words has been rewritten in C, resulting in speed-ups of 20% in
894some cases.
b325a3a2 895
49f99971 896This does not affect C<glob> on VMS, as it does not use File::Glob.
b325a3a2
RS
897
898=item *
899
ccad93fd
RS
900The short-circuiting operators C<&&>, C<||>, and C<//>, when chained
901(such as C<$a || $b || $c>), are now considerably faster to short-circuit,
902due to reduced optree traversal.
30682cc3
RS
903
904=item *
905
ccad93fd
RS
906The implementation of C<s///r> makes one fewer copy of the scalar's value.
907
908=item *
909
021c503d 910C<study> is now a no-op.
ccad93fd
RS
911
912=item *
913
914Recursive calls to lvalue subroutines in lvalue scalar context use less
915memory.
30682cc3
RS
916
917=back
918
919=head1 Modules and Pragmata
920
cb82babd
RS
921=head2 Deprecated Modules
922
923=over
924
925=item L<Version::Requirements>
926
da7ea579 927Version::Requirements is now DEPRECATED, use L<CPAN::Meta::Requirements>,
4d6200df 928which is a drop-in replacement. It will be deleted from perl.git blead
cb82babd
RS
929in v5.17.0.
930
931=back
932
30682cc3
RS
933=head2 New Modules and Pragmata
934
935=over 4
936
937=item *
938
b325a3a2 939L<arybase> -- this new module implements the C<$[> variable.
30682cc3 940
77649ca9
RS
941=item *
942
943C<PerlIO::mmap> 0.010 has been added to the Perl core.
944
945The C<mmap> PerlIO layer is no longer implemented by perl itself, but has
946been moved out into the new L<PerlIO::mmap> module.
947
30682cc3
RS
948=back
949
950=head2 Updated Modules and Pragmata
951
952=over 4
953
954=item *
955
956L<XXX> has been upgraded from version 0.69 to version 0.70.
957
958=back
959
960=head2 Removed Modules and Pragmata
961
a14d7d4a
RS
962As promised in Perl 5.14.0's release notes, the following modules have
963been removed from the core distribution, and if needed should be installed
964from CPAN instead.
965
966=over
30682cc3
RS
967
968=item *
969
021c503d
RS
970C<Devel::DProf> has been removed from the Perl core. Prior version was
97120110228.00.
a14d7d4a
RS
972
973=item *
974
975C<Shell> has been removed from the Perl core. Prior version was 0.72_01.
30682cc3
RS
976
977=back
978
979=head1 Documentation
980
30682cc3
RS
981=head2 New Documentation
982
ccad93fd 983=head3 L<perldtrace>
30682cc3 984
ccad93fd
RS
985L<perldtrace> describes Perl's DTrace support, listing the provided probes
986and gives examples of their use.
30682cc3 987
94c11dd4
RS
988=head3 L<perlexperiment>
989
990This document is intended to provide a list of experimental features in
991Perl. It is still a work in progress.
992
021c503d
RS
993=head3 L<perlootut>
994
4d6200df 995This a new OO tutorial. It focuses on basic OO concepts, and then recommends
021c503d
RS
996that readers choose an OO framework from CPAN.
997
77649ca9
RS
998=head3 L<perlxstypemap>
999
1000The new manual describes the XS typemapping mechanism in unprecedented
1001detail and combines new documentation with information extracted from
1002L<perlxs> and the previously unofficial list of all core typemaps.
1003
30682cc3
RS
1004=head2 Changes to Existing Documentation
1005
021c503d
RS
1006=head3 L<perlapi>
1007
1008=over 4
1009
1010=item *
1011
1012The HV API has long accepted negative lengths to indicate that the key is
1013in UTF8. Now this is documented.
1014
1015=item *
1016
1017The C<boolSV()> macro is now documented.
1018
1019=back
1020
cb82babd
RS
1021=head3 L<perlfunc>
1022
1023=over 4
1024
1025=item *
1026
1027C<dbmopen> treats a 0 mode as a special case, that prevents a nonexistent
1028file from being created. This has been the case since Perl 5.000, but was
1029never documented anywhere. Now the perlfunc entry mentions it
1030[perl #90064].
1031
1032=item *
1033
021c503d
RS
1034As an accident of history, C<open $fh, "<:", ...> applies the default
1035layers for the platform (C<:raw> on Unix, C<:crlf> on Windows), ignoring
1036whatever is declared by L<open.pm|open>. This seems such a useful feature
1037it has been documented in L<perlfunc|perlfunc/open> and L<open>.
1038
1039=item *
1040
cb82babd
RS
1041The entry for C<split> has been rewritten. It is now far clearer than
1042before.
1043
1044=back
1045
021c503d 1046=head3 L<perlguts>
cb82babd
RS
1047
1048=over 4
1049
1050=item *
1051
021c503d
RS
1052A new section, L<Autoloading with XSUBs|perlguts/Autoloading with XSUBs>,
1053has been added, which explains the two APIs for accessing the name of the
1054autoloaded sub.
cb82babd
RS
1055
1056=item *
1057
021c503d
RS
1058Some of the function descriptions in L<perlguts> were confusing, as it was
1059not clear whether they referred to the function above or below the
1060description. This has been clarified [perl #91790].
cb82babd
RS
1061
1062=back
1063
021c503d 1064=head3 L<perlobj>
412912b6
RS
1065
1066=over 4
1067
1068=item *
1069
021c503d
RS
1070This document has been rewritten from scratch, and its coverage of various OO
1071concepts has been expanded.
412912b6
RS
1072
1073=back
1074
021c503d 1075=head3 L<perlop>
12477442
RS
1076
1077=over 4
1078
1079=item *
1080
021c503d
RS
1081Documentation of the smartmatch operator has been reworked and moved from
1082perlsyn to perlop where it belongs.
12477442 1083
021c503d
RS
1084It has also been corrected for the case of C<undef> on the left-hand
1085side. The list of different smart match behaviours had an item in the
1086wrong place.
12477442
RS
1087
1088=item *
1089
021c503d
RS
1090Documentation of the ellipsis statement (C<...>) has been reworked and
1091moved from perlop to perlsyn.
12477442
RS
1092
1093=item *
1094
021c503d
RS
1095The explanation of bitwise operators has been expanded to explain how they
1096work on Unicode strings (5.14.1).
12477442
RS
1097
1098=item *
1099
021c503d 1100More examples for C<m//g> have been added (5.14.1).
4bbade93
RS
1101
1102=item *
1103
021c503d 1104The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1).
4bbade93
RS
1105
1106=back
1107
1108=head3 L<perlpragma>
1109
1110=over 4
1111
1112=item *
1113
1114There is now a standard convention for naming keys in the C<%^H>,
1115documented under L<Key naming|perlpragma/Key naming>.
1116
1117=back
1118
021c503d 1119=head3 L<perlsec/Laundering and Detecting Tainted Data>
30682cc3 1120
021c503d 1121=over 4
ccad93fd
RS
1122
1123=item *
1124
021c503d
RS
1125The example function for checking for taintedness contained a subtle
1126error. C<$@> needs to be localized to prevent its changing this
1127global's value outside the function. The preferred method to check for
1128this remains L<Scalar::Util/tainted>.
ccad93fd
RS
1129
1130=back
1131
1132=head3 L<perllol>
1133
1134=over
1135
1136=item *
1137
1138L<perllol> has been expanded with examples using the new C<push $scalar>
1139syntax introduced in Perl 5.14.0 (5.14.1).
1140
1141=back
1142
1143=head3 L<perlmod>
1144
1145=over
1146
1147=item *
1148
1149L<perlmod> now states explicitly that some types of explicit symbol table
1150manipulation are not supported. This codifies what was effectively already
1151the case [perl #78074].
1152
1153=back
1154
ccad93fd
RS
1155=head3 L<perlpodstyle>
1156
1157=over 4
1158
1159=item *
1160
1161The tips on which formatting codes to use have been corrected and greatly
1162expanded.
1163
1164=item *
1165
1166There are now a couple of example one-liners for previewing POD files after
1167they have been edited.
1168
1169=back
1170
021c503d 1171=head3 L<perlre>
ccad93fd
RS
1172
1173=over
1174
1175=item *
1176
021c503d
RS
1177The C<(*COMMIT)> directive is now listed in the right section
1178(L<Verbs without an argument|perlre/Verbs without an argument>).
94c11dd4 1179
ccad93fd
RS
1180=back
1181
021c503d 1182=head3 L<perlrun>
ccad93fd
RS
1183
1184=over
1185
1186=item *
1187
021c503d
RS
1188L<perlrun> has undergone a significant clean-up. Most notably, the
1189B<-0x...> form of the B<-0> flag has been clarified, and the final section
1190on environment variables has been corrected and expanded (5.14.1).
ccad93fd
RS
1191
1192=back
1193
021c503d 1194=head3 L<perlsub>
ccad93fd
RS
1195
1196=over
1197
1198=item *
1199
021c503d
RS
1200The ($;) prototype syntax, which has existed for rather a long time, is now
1201documented in L<perlsub>. It allows a unary function to have the same
1202precedence as a list operator.
ccad93fd
RS
1203
1204=back
1205
1206=head3 L<perltie>
1207
1208=over
1209
1210=item *
1211
24391d94 1212The required syntax for tying handles has been documented.
ccad93fd
RS
1213
1214=back
1215
1216=head3 L<perlvar>
1217
1218=over
1219
1220=item *
1221
1222The documentation for L<$!|perlvar/$!> has been corrected and clarified.
1223It used to state that $! could be C<undef>, which is not the case. It was
1224also unclear as to whether system calls set C's C<errno> or Perl's C<$!>
1225[perl #91614].
1226
1227=item *
1228
1229Documentation for L<$$|perlvar/$$> has been amended with additional
1230cautions regarding changing the process ID.
1231
1232=back
30682cc3 1233
021c503d
RS
1234=head3 Other Changes
1235
30682cc3
RS
1236=over 4
1237
1238=item *
1239
ccad93fd
RS
1240L<perlxs> was extended with documentation on inline typemaps.
1241
1242=item *
1243
1244L<perlref> has a new L<Circular References|perlref/Circular References>
1245section explaining how circularities may not be freed and how to solve that
1246with weak references.
1247
1248=item *
1249
ccad93fd
RS
1250Parts of L<perlapi> were clarified, and Perl equivalents of some C
1251functions have been added as an additional mode of exposition.
1252
1253=item *
1254
1255A few parts of L<perlre> and L<perlrecharclass> were clarified.
30682cc3
RS
1256
1257=back
1258
4bbade93
RS
1259=head2 Removed Documentation
1260
1261=head3 Old OO Documentation
1262
1263All the old OO tutorials, perltoot, perltooc, and perlboot, have been
a4574d2e
RS
1264removed. The perlbot (bag of object tricks) document has been removed
1265as well.
4bbade93
RS
1266
1267=head3 Development Deltas
1268
021c503d
RS
1269The perldelta files for development releases are no longer packaged with
1270perl. These can still be found in the perl source code repository.
4bbade93 1271
30682cc3
RS
1272=head1 Diagnostics
1273
1274The following additions or changes have been made to diagnostic output,
1275including warnings and fatal error messages. For the complete list of
1276diagnostic messages, see L<perldiag>.
1277
30682cc3
RS
1278=head2 New Diagnostics
1279
30682cc3
RS
1280=head3 New Errors
1281
1282=over 4
1283
1284=item *
1285
cb82babd
RS
1286L<Cannot set tied @DB::args|perldiag/"Cannot set tied @DB::args">
1287
1288This error occurs when C<caller> tries to set C<@DB::args> but finds it
1289tied. Before this error was added, it used to crash instead.
1290
1291=item *
1292
1293L<Cannot tie unreifiable array|perldiag/"Cannot tie unreifiable array">
1294
1295This error is part of a safety check that the C<tie> operator does before
1296tying a special array like C<@_>. You should never see this message.
1297
1298=item *
1299
94c11dd4
RS
1300L<&CORE::%s cannot be called directly|perldiag/"&CORE::%s cannot be called directly">
1301
10c3c9ec 1302This occurs when a subroutine in the C<CORE::> namespace is called
4dbfa257 1303with C<&foo> syntax or through a reference. Some subroutines
94c11dd4 1304in this package cannot yet be called that way, but must be
10c3c9ec 1305called as barewords. See L</Subroutines in the C<CORE> namespace>, above.
30682cc3 1306
98a0da08
FC
1307=item *
1308
1309L<Source filters apply only to byte streams|perldiag/"Source filters apply only to byte streams">
1310
1311This new error occurs when you try to activate a source filter (usually by
1312loading a source filter module) within a string passed to C<eval> under the
1313C<unicode_eval> feature.
1314
30682cc3
RS
1315=back
1316
1317=head3 New Warnings
1318
1319=over 4
1320
b325a3a2
RS
1321=item *
1322
cb82babd
RS
1323L<defined(@array) is deprecated|perldiag/"defined(@array) is deprecated">
1324
1325The long-deprecated C<defined(@array)> now also warns for package variables.
1326Previously it only issued a warning for lexical variables.
1327
1328=item *
1329
98a0da08 1330L<length() used on %s|perldiag/length() used on %s>
cb82babd 1331
98a0da08
FC
1332This new warning occurs when C<length> is used on an array or hash, instead
1333of C<scalar(@array)> or C<scalar(keys %hash)>.
cb82babd
RS
1334
1335=item *
1336
98a0da08 1337L<lvalue attribute %s already-defined subroutine|perldiag/"lvalue attribute %s already-defined subroutine">
cb82babd 1338
98a0da08
FC
1339L<attributes.pm|attributes> now emits this warning when the :lvalue
1340attribute is applied to a Perl subroutine that has already been defined, as
1341doing so can have unexpected side-effects.
cb82babd 1342
cb82babd
RS
1343=item *
1344
98a0da08 1345L<overload arg '%s' is invalid|perldiag/"overload arg '%s' is invalid">
30682cc3 1346
98a0da08
FC
1347This warning, in the "overload" category, is produced when the overload
1348pragma is given an argument it doesn't recognize, presumably a mistyped
1349operator.
a14d7d4a 1350
b325a3a2
RS
1351=item *
1352
98a0da08 1353L<$[ used in %s (did you mean $] ?)|perldiag/"$[ used in %s (did you mean $] ?)">
b325a3a2 1354
98a0da08
FC
1355This new warning exists to catch the mistaken use of C<$[> in version
1356checks. C<$]>, not C<$[>, contains the version number.
b325a3a2
RS
1357
1358=item *
1359
98a0da08 1360L<Useless assignment to a temporary|perldiag/"Useless assignment to a temporary">
b325a3a2 1361
98a0da08
FC
1362Assigning to a temporary scalar returned
1363from an lvalue subroutine now produces this
1364warning [perl #31946].
b325a3a2
RS
1365
1366=item *
1367
98a0da08 1368L<Useless use of \E|perldiag/"Useless use of \E">
6d365783 1369
98a0da08 1370C<\E> does nothing unless preceded by C<\Q>, C<\L> or C<\U>.
6d365783 1371
a14d7d4a 1372=back
30682cc3 1373
482daec9 1374=head2 Removed Errors
cb82babd
RS
1375
1376=over
1377
1378=item *
1379
1380"sort is now a reserved word"
1381
a4574d2e
RS
1382This error used to occur when C<sort> was called without arguments,
1383followed by C<;> or C<)>. (E.g., C<sort;> would die, but C<{sort}> was
cb82babd
RS
1384OK.) This error message was added in Perl 3 to catch code like
1385C<close(sort)> which would no longer work. More than two decades later,
1386this message is no longer appropriate. Now C<sort> without arguments is
a4574d2e
RS
1387always allowed, and returns an empty list, as it did in those cases
1388where it was already allowed [perl #90030].
cb82babd
RS
1389
1390=back
1391
30682cc3
RS
1392=head2 Changes to Existing Diagnostics
1393
ccad93fd
RS
1394=over 4
1395
1396=item *
1397
1154aa6d
FC
1398The "Applying pattern match..." or similar warning produced when an
1399array or hash is on the left-hand side of the C<=~> operator now
1400mentions the name of the variable.
9f6b5e9d
FC
1401
1402=item *
1403
412912b6
RS
1404The "Attempt to free non-existent shared string" has had the spelling
1405of "non-existent" corrected to "nonexistent". It was already listed
1406with the correct spelling in L<perldiag>.
1407
1408=item *
1409
412912b6 1410The error messages for using C<default> and C<when> outside of a
a4574d2e
RS
1411topicalizer have been standardised to match the messages for C<continue>
1412and loop controls. They now read 'Can't "default" outside a
1413topicalizer' and 'Can't "when" outside a topicalizer'. They both used
1414to be 'Can't use when() outside a topicalizer' [perl #91514].
412912b6
RS
1415
1416=item *
1417
1154aa6d
FC
1418The message, "Code point 0x%X is not Unicode, no properties match it;
1419all inverse properties do" has been changed to "Code point 0x%X is not
1420Unicode, all \p{} matches fail; all \P{} matches succeed".
b325a3a2
RS
1421
1422=item *
1423
1154aa6d
FC
1424Redefinition warnings for constant subroutines used to be mandatory,
1425even occurring under C<no warnings>. Now they respect the L<warnings>
1426pragma.
1427
1428=item *
1429
1430The "glob failed" warning message is now suppressible via C<no warnings>
1431[perl #111656].
b325a3a2
RS
1432
1433=item *
1434
ccad93fd
RS
1435The L<Invalid version format|perldiag/"Invalid version format (%s)">
1436error message now says "negative version number" within the parentheses,
1437rather than "non-numeric data", for negative numbers.
1438
1439=item *
1440
1441The two warnings
1442L<Possible attempt to put comments in qw() list|perldiag/"Possible attempt to put comments in qw() list">
1443and
1444L<Possible attempt to separate words with commas|perldiag/"Possible attempt to separate words with commas">
021c503d
RS
1445are no longer mutually exclusive: the same C<qw> construct may produce
1446both.
30682cc3 1447
021c503d 1448=item *
412912b6 1449
1154aa6d
FC
1450The uninitialized warning for C<y///r> when C<$_> is implicit and
1451undefined now mentions the variable name, just like the non-/r variation
1452of the operator.
1453
1454=item *
1455
1456The 'Use of "foo" without parentheses is ambiguous' warning has been
1457extended to apply also to user-defined subroutines with a (;$)
1458prototype, and not just to built-in functions.
412912b6
RS
1459
1460=item *
30682cc3 1461
021c503d
RS
1462Warnings that mention the names of lexical (C<my>) variables with
1463Unicode characters in them now respect the presence or absence of the
1464C<:utf8> layer on the output handle, instead of outputting UTF8
1465regardless. Also, the correct names are included in the strings passed
1466to C<$SIG{__WARN__}> handlers, rather than the raw UTF8 bytes.
412912b6
RS
1467
1468=back
30682cc3 1469
021c503d
RS
1470=head1 Utility Changes
1471
4bbade93 1472=head3 L<h2ph>
30682cc3
RS
1473
1474=over 4
1475
1476=item *
1477
4bbade93
RS
1478L<h2ph> used to generate code of the form
1479
412912b6
RS
1480 unless(defined(&FOO)) {
1481 sub FOO () {42;}
1482 }
4bbade93
RS
1483
1484But the subroutine is a compile-time declaration, and is hence unaffected
1485by the condition. It has now been corrected to emit a string C<eval>
1486around the subroutine [perl #99368].
30682cc3
RS
1487
1488=back
1489
cb82babd
RS
1490=head3 L<splain>
1491
1492=over 4
1493
1494=item *
1495
a4574d2e
RS
1496F<splain> no longer emits backtraces with the first line number repeated.
1497
cb82babd
RS
1498This:
1499
1500 Uncaught exception from user code:
1501 Cannot fwiddle the fwuddle at -e line 1.
1502 at -e line 1
1503 main::baz() called at -e line 1
1504 main::bar() called at -e line 1
1505 main::foo() called at -e line 1
1506
1507has become this:
1508
1509 Uncaught exception from user code:
1510 Cannot fwiddle the fwuddle at -e line 1.
1511 main::baz() called at -e line 1
1512 main::bar() called at -e line 1
1513 main::foo() called at -e line 1
1514
1515=item *
1516
1517Some error messages consist of multiple lines that are listed as separate
1518entries in L<perldiag>. splain has been taught to find the separate
1519entries in these cases, instead of simply failing to find the message.
1520
1521=back
1522
021c503d
RS
1523=head3 L<zipdetails>
1524
1525=over 4
1526
1527=item *
1528
d0af4845
FC
1529This is a new utility, included as part of an
1530L<IO::Compress::Base> upgrade.
1531
021c503d
RS
1532L<zipdetails> displays information about the internal record structure
1533of the zip file. It is not concerned with displaying any details of
1534the compressed data stored in the zip file.
1535
1536=back
1537
30682cc3
RS
1538=head1 Configuration and Compilation
1539
a14d7d4a 1540=over 4
30682cc3 1541
a14d7d4a 1542=item *
30682cc3 1543
a4574d2e 1544The C<-Dusesitecustomize> and C<-Duserelocatableinc> options now work
412912b6
RS
1545together properly.
1546
1547=item *
1548
a14d7d4a
RS
1549F<regexp.h> has been modified for compatibility with GCC's B<-Werror>
1550option, as used by some projects that include perl's header files (5.14.1).
30682cc3
RS
1551
1552=item *
1553
a14d7d4a
RS
1554C<USE_LOCALE{,_COLLATE,_CTYPE,_NUMERIC}> have been added the output of perl -V
1555as they have affect the behaviour of the interpreter binary (albeit only
1556in a small area).
1557
1558=item *
1559
1560The code and tests for L<IPC::Open2> have been moved from F<ext/IPC-Open2>
1561into F<ext/IPC-Open3>, as C<IPC::Open2::open2()> is implemented as a thin
1562wrapper around C<IPC::Open3::_open3()>, and hence is very tightly coupled to
1563it.
1564
1565=item *
1566
1567The magic types and magic vtables are now generated from data in a new script
4d6200df
FC
1568F<regen/mg_vtable.pl>, instead of being
1569maintained by hand. As different EBCDIC
a14d7d4a
RS
1570variants can't agree on the code point for '~', the character to code point
1571conversion is done at build time by F<generate_uudmap> to a new generated header
4d6200df 1572F<mg_data.h>. C<PL_vtbl_bm> and C<PL_vtbl_fm> are now defined by the
a14d7d4a
RS
1573pre-processor as C<PL_vtbl_regexp>, instead of being distinct C variables.
1574C<PL_vtbl_sig> has been removed.
1575
1576=item *
1577
4d6200df
FC
1578Building with C<-DPERL_GLOBAL_STRUCT>
1579works again. This configuration is not
a14d7d4a
RS
1580generally used.
1581
1582=item *
1583
1584Perl configured with I<MAD> now correctly frees C<MADPROP> structures when
4d6200df
FC
1585OPs are freed. C<MADPROP>s are now allocated with
1586C<PerlMemShared_malloc()>
a14d7d4a
RS
1587
1588=back
30682cc3 1589
30682cc3
RS
1590=head1 Platform Support
1591
30682cc3
RS
1592=head2 Platform-Specific Notes
1593
77649ca9
RS
1594=head3 Cygwin
1595
1596=over 4
1597
1598=item *
1599
4d6200df 1600Since version 1.7, Cygwin supports native UTF-8 paths. If Perl is built
77649ca9
RS
1601under that environment, directory and filenames will be UTF-8 encoded.
1602
4c29740d
FC
1603Cygwin does not initialize all original Win32 environment variables. See
1604F<README.cygwin> for a discussion of the newly-added
1605C<Cygwin::sync_winenv()> function [perl #110190] and for
77649ca9
RS
1606further links.
1607
1608=back
1609
412912b6
RS
1610=head3 VMS
1611
30682cc3
RS
1612=over 4
1613
412912b6 1614=item *
30682cc3 1615
4bbade93
RS
1616Remove unnecessary includes, fix miscellaneous compiler warnings and
1617close some unclosed comments on F<vms/vms.c>.
1618
1619Remove sockadapt layer from the VMS build.
30682cc3 1620
412912b6
RS
1621=item *
1622
412912b6
RS
1623Explicit support for VMS versions prior to v7.0 and DEC C versions
1624prior to v6.0 has been removed.
1625
1626=item *
1627
1628Since Perl 5.10.1, the home-grown C<stat> wrapper has been unable to
1629distinguish between a directory name containing an underscore and an
1630otherwise-identical filename containing a dot in the same position
1631(e.g., t/test_pl as a directory and t/test.pl as a file). This problem
1632has been corrected.
1633
77649ca9
RS
1634=item *
1635
1636The build on VMS now allows names of the resulting symbols in C code for
1637Perl longer than 31 characters. Symbols like
1638C<Perl__it_was_the_best_of_times_it_was_the_worst_of_times> can now be
1639created freely without causing the VMS linker to seize up.
1640
412912b6
RS
1641=back
1642
1643=head3 GNU/Hurd
b325a3a2
RS
1644
1645Numerous build and test failures on GNU/Hurd have been resolved with hints
1646for building DBM modules, detection of the library search path, and enabling
1647of large file support.
1648
412912b6 1649=head3 OpenVOS
b325a3a2
RS
1650
1651Perl is now built with dynamic linking on OpenVOS, the minimum supported
1652version of which is now Release 17.1.0.
1653
412912b6 1654=head3 SunOS
b325a3a2
RS
1655
1656The CC workshop C++ compiler is now detected and used on systems that ship
1657without cc.
1658
30682cc3
RS
1659=head1 Internal Changes
1660
4bbade93 1661=over 4
30682cc3 1662
4bbade93 1663=item *
30682cc3 1664
cb82babd
RS
1665There are now feature bundle hints in C<PL_hints> (C<$^H>) that version
1666declarations use, to avoid having to load F<feature.pm>. One setting of
1667the hint bits indicates a "custom" feature bundle, which means that the
1668entries in C<%^H> still apply. F<feature.pm> uses that.
1669
1670The C<HINT_FEATURE_MASK> macro is defined in F<perl.h> along with other
1671hints. Other macros for setting and testing features and bundles are in
1672the new F<feature.h>. C<FEATURE_IS_ENABLED> (which has moved to
1673F<feature.h>) is no longer used throughout the codebase, but more specific
1674macros, e.g., C<FEATURE_SAY_IS_ENABLED>, that are defined in F<feature.h>.
1675
1676=item *
1677
1678F<lib/feature.pm> is now a generated file, created by the new
1679F<regen/feature.pl> script, which also generates F<feature.h>.
1680
1681=item *
1682
1683Tied arrays are now always C<AvREAL>. If C<@_> or C<DB::args> is tied, it
1684is reified first, to make sure this is always the case.
1685
cb82babd
RS
1686=item *
1687
4bbade93
RS
1688The C<is_gv_magical_sv> function has been eliminated and merged with
1689C<gv_fetchpvn_flags>. It used to be called to determine whether a GV
1690should be autovivified in rvalue context. Now it has been replaced with a
1691new C<GV_ADDMG> flag (not part of the API).
30682cc3
RS
1692
1693=item *
1694
4bbade93
RS
1695Padlists are now marked C<AvREAL>; i.e., reference-counted. They have
1696always been reference-counted, but were not marked real, because F<pad.c>
1697did its own clean-up, instead of using the usual clean-up code in F<sv.c>.
1698That caused problems in thread cloning, so now the C<AvREAL> flag is on,
1699but is turned off in F<pad.c> right before the padlist is freed (after
1700F<pad.c> has done its custom freeing of the pads).
1701
1702=item *
1703
1704All the C files that make up the Perl core have been converted to UTF-8.
30682cc3
RS
1705
1706=back
1707
1708=head1 Selected Bug Fixes
1709
e87b7063 1710=head2 Regular expressions
30682cc3 1711
0d0f20ee 1712=for comment Is it possible to merge some of these items?
b77d6b93 1713
30682cc3
RS
1714=over 4
1715
1716=item *
1717
77649ca9
RS
1718C</[[:ascii:]]/> and C</[[:blank:]]/> now use locale rules under
1719C<use locale> when the platform supports that. Previously, they used
1720the platform's native character set.
1721
1722=item *
1723
77649ca9
RS
1724C<m/[[:ascii:]]/i> and C</\p{ASCII}/i> now match identically (when not
1725under a differing locale). This fixes a regression introduced in 5.14
1726in which the first expression could match characters outside of ASCII,
1727such as the KELVIN SIGN.
1728
1729=item *
1730
1d1e229c
FC
1731C</.*/g> would sometimes refuse to match at the end of a string that ends
1732with "\n". This has been fixed [perl #109206].
1733
1734=item *
1735
77649ca9
RS
1736Starting with 5.12.0, Perl used to get its internal bookkeeping muddled up
1737after assigning C<${ qr// }> to a hash element and locking it with
1738L<Hash::Util>. This could result in double frees, crashes or erratic
1739behaviour.
1740
1741=item *
1742
a14d7d4a
RS
1743The new (in 5.14.0) regular expression modifier C</a> when repeated like
1744C</aa> forbids the characters outside the ASCII range that match
1745characters inside that range from matching under C</i>. This did not
1746work under some circumstances, all involving alternation, such as:
1747
1748 "\N{KELVIN SIGN}" =~ /k|foo/iaa;
1749
1750succeeded inappropriately. This is now fixed.
1751
1752=item *
1753
17545.14.0 introduced some memory leaks in regular expression character
4d6200df 1755classes such as C<[\w\s]>, which have now been fixed. (5.14.1)
a14d7d4a
RS
1756
1757=item *
1758
1759An edge case in regular expression matching could potentially loop.
1760This happened only under C</i> in bracketed character classes that have
1761characters with multi-character folds, and the target string to match
1762against includes the first portion of the fold, followed by another
1763character that has a multi-character fold that begins with the remaining
1764portion of the fold, plus some more.
1765
1766 "s\N{U+DF}" =~ /[\x{DF}foo]/i
1767
1768is one such case. C<\xDF> folds to C<"ss">. (5.14.1)
1769
1770=item *
1771
1772A few characters in regular expression pattern matches did not
1773match correctly in some circumstances, all involving C</i>. The
1774affected characters are:
1775COMBINING GREEK YPOGEGRAMMENI,
1776GREEK CAPITAL LETTER IOTA,
1777GREEK CAPITAL LETTER UPSILON,
1778GREEK PROSGEGRAMMENI,
1779GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA,
1780GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
1781GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA,
1782GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
1783LATIN SMALL LETTER LONG S,
1784LATIN SMALL LIGATURE LONG S T,
1785and
1786LATIN SMALL LIGATURE ST.
1787
1788=item *
1789
a4b68579
FC
1790A memory leak regression in regular expression compilation
1791under threading has been fixed.
a14d7d4a 1792
77649ca9
RS
1793=item *
1794
a4b68579
FC
1795A regression introduced in 5.13.6 has
1796been fixed. This involved an inverted
77649ca9 1797bracketed character class in a regular expression that consisted solely
a4b68579 1798of a Unicode property. That property wasn't getting inverted outside the
77649ca9
RS
1799Latin1 range.
1800
b77d6b93
FC
1801=item *
1802
1803Three problematic Unicode characters now work better in regex pattern matching under C</i>
1804
1805In the past, three Unicode characters:
1806LATIN SMALL LETTER SHARP S,
1807GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
1808and
1809GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
1810along with the sequences that they fold to
1811(including "ss" in the case of LATIN SMALL LETTER SHARP S),
1812did not properly match under C</i>. 5.14.0 fixed some of these cases,
1813but introduced others, including a panic when one of the characters or
1814sequences was used in the C<(?(DEFINE)> regular expression predicate.
1815The known bugs that were introduced in 5.14 have now been fixed; as well
1816as some other edge cases that have never worked until now. All these
1817involve using the characters and sequences outside bracketed character
1818classes under C</i>. This closes [perl #98546].
1819
1820There remain known problems when using certain characters with
1821multi-character folds inside bracketed character classes, including such
1822constructs as C<qr/[\N{LATIN SMALL LETTER SHARP}a-z]/i>. These
1823remaining bugs are addressed in [perl #89774].
1824
1825=item *
1826
1827RT #78266: The regex engine has been leaking memory when accessing
1828named captures that weren't matched as part of a regex ever since 5.10
1829when they were introduced, e.g. this would consume over a hundred MB of
1830memory:
1831
1832 for (1..10_000_000) {
1833 if ("foo" =~ /(foo|(?<capture>bar))?/) {
1834 my $capture = $+{capture}
1835 }
1836 }
1837 system "ps -o rss $$"'
1838
1839=item *
1840
1841In 5.14, C</[[:lower:]]/i> and C</[[:upper:]]/i> no longer matched the
1842opposite case. This has been fixed [perl #101970].
1843
1844=item *
1845
1846A regular expression match with an overloaded object on the right-hand side
1847would in some cases stringify the object too many times.
1848
1849=item *
1850
1851A regression has been fixed that was introduced in 5.14, in C</i>
1852regular expression matching, in which a match improperly fails if the
1853pattern is in UTF-8, the target string is not, and a Latin-1 character
1854precedes a character in the string that should match the pattern.
1855[perl #101710]
1856
1857=item *
1858
1859In case-insensitive regular expression pattern matching, no longer on
1860UTF-8 encoded strings does the scan for the start of match only look at
1861the first possible position. This caused matches such as
1862C<"f\x{FB00}" =~ /ff/i> to fail.
1863
1864=item *
1865
1866The regexp optimiser no longer crashes on debugging builds when merging
1867fixed-string nodes with inconvenient contents.
1868
1869=item *
1870
1871A panic involving the combination of the regular expression modifiers
1872C</aa> and the C<\b> escape sequence introduced in 5.14.0 has been
1873fixed [perl #95964].
1874
1875=item *
1876
1877The combination of the regular expression modifiers C</aa> and the C<\b>
1878and C<\B> escape sequences did not work properly on UTF-8 encoded
1879strings. All non-ASCII characters under C</aa> should be treated as
1880non-word characters, but what was happening was that Unicode rules were
1881used to determine wordness/non-wordness for non-ASCII characters. This
1882is now fixed [perl #95968].
1883
1884=item *
1885
1886C<< (?foo: ...) >> no longer loses passed in character set.
1887
1888=item *
1889
1890The trie optimisation used to have problems with alternations containing
1891an empty C<(?:)>, causing C<< "x" =~ /\A(?>(?:(?:)A|B|C?x))\z/ >> not to
1892match, whereas it should [perl #111842].
1893
081d8988
FC
1894=item *
1895
1896Use of lexical (C<my>) variables in code blocks embedded in regular
1897expressions will no longer result in memory corruption or crashes.
1898
1899Nevertheless, these code blocks are still experimental, as there are still
1900problems with the wrong variables being closed over (in loops for instance)
1901and with abnormal exiting (e.g., C<die>) causing memory corruption.
1902
1903=item *
1904
1905The C<\h>, C<\H>, C<\v> and C<\V> regular expression metacharacters used to
1906cause a panic error message when attempting to match at the end of the
1907string [perl #96354].
1908
1c6fad2d
FC
1909=item *
1910
1911The abbreviations for four C1 control characters C<MW> C<PM>, C<RI>, and
1912C<ST> were previously unrecognized by C<\N{}>, vianame(), and
1913string_vianame().
1914
e87b7063
RS
1915=item *
1916
1917Mentioning a variable named "&" other than C<$&> (i.e., C<@&> or C<%&>) no
1918longer stops C<$&> from working. The same applies to variables named "'"
1919and "`" [perl #24237].
1920
1921=item *
1922
1923Creating a C<UNIVERSAL::AUTOLOAD> sub no longer stops C<%+>, C<%-> and
1924C<%!> from working some of the time [perl #105024].
1925
a14d7d4a
RS
1926=back
1927
1928=head2 Formats
1929
1930=over
1931
1932=item *
1933
1934A number of edge cases have been fixed with formats and C<formline>;
1935in particular, where the format itself is potentially variable (such as
1936with ties and overloading), and where the format and data differ in their
801284b1 1937encoding. In both these cases, it used to possible for the output to be
a14d7d4a
RS
1938corrupted [perl #91032].
1939
1940=item *
1941
1942C<formline> no longer converts its argument into a string in-place. So
1943passing a reference to C<formline> no longer destroys the reference
1944[perl #79532].
1945
8dd333f3
FC
1946=item *
1947
1948Assignment to C<$^A> (the format output accumulator) now recalculates
1949the number of lines output.
1950
a14d7d4a
RS
1951=back
1952
1953=head2 Copy-on-write scalars
1954
5290772f
FC
1955Copy-on-write or shared hash key scalars
1956were introduced in 5.8.0, but most Perl code
a14d7d4a
RS
1957did not encounter them (they were used mostly internally). Perl
19585.10.0 extended them, such that assigning C<__PACKAGE__> or a
1959hash key to a scalar would make it copy-on-write. Several parts
1960of Perl were not updated to account for them, but have now been fixed.
1961
1962=over
1963
1964=item *
1965
1966C<utf8::decode> had a nasty bug that would modify copy-on-write scalars'
1967string buffers in place (i.e., skipping the copy). This could result in
1968hashes having two elements with the same key [perl #91834].
1969
1970=item *
1971
1972Lvalue subroutines were not allowing COW scalars to be returned. This was
1973fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context
1974was not fixed until this release.
1975
1976=item *
1977
1978Elements of restricted hashes (see the L<fields> pragma) containing
1979copy-on-write values couldn't be deleted, nor could such hashes be cleared
1980(C<%hash = ()>).
1981
1982=item *
1983
1984Localising a tied variable used to make it read-only if it contained a
1985copy-on-write string.
1986
1987=item *
1988
5290772f
FC
1989Assigning a copy-on-write string to a stash
1990element no longer causes a double free. Regardless of this change, the
1991results of such assignments are still undefined.
1992
1993=item *
1994
1995Assigning a copy-on-write string to a tied variable no longer stops that
1996variable from being tied if it happens to be a PVMG or PVLV internally.
1997
1998=item *
1999
2000Doing a substitution on a tied variable returning a copy-on-write
2001scalar used to cause an assertion failure or an "Attempt to free
2002nonexistent shared string" warning.
2003
2004=item *
2005
2006This one is a regression from 5.12: In 5.14.0, the bitwise assignment
2007operators C<|=>, C<^=> and C<&=> started leaving the left-hand side
2008undefined if it happened to be a copy-on-write string [perl #108480].
2009
2010=item *
2011
a14d7d4a
RS
2012L<Storable>, L<Devel::Peek> and L<PerlIO::scalar> had similar problems.
2013See L</Updated Modules and Pragmata>, above.
2014
2015=back
2016
4ad239c3 2017=head2 Lvalue subroutines
a14d7d4a 2018
a14d7d4a
RS
2019=over
2020
2021=item *
2022
2023Explicit return now returns the actual argument passed to return, instead
8b541984 2024of copying it [perl #72724, #72706].
a14d7d4a 2025
a14d7d4a
RS
2026=item *
2027
2028Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on
2029the left-hand side of C<=>) for the last statement and the arguments to
2030return. Since lvalue subroutines are not always called in lvalue context,
2031this restriction has been lifted.
2032
2033=item *
2034
2035Lvalue subroutines are less restrictive as to what values can be returned.
2036It used to croak on values returned by C<shift> and C<delete> and from
2037other subroutines, but no longer does so [perl #71172].
2038
2039=item *
2040
2041Empty lvalue subroutines (C<sub :lvalue {}>) used to return C<@_> in list
2042context. In fact, all subroutines used to, but regular subs were fixed in
2043Perl 5.8.2. Now lvalue subroutines have been likewise fixed.
2044
2045=item *
2046
0fe29a63
FC
2047Autovivification now works on values returned from lvalue subroutines
2048[perl #7946], as does returning C<keys> in lvalue context.
2049
2050=item *
2051
a14d7d4a
RS
2052Lvalue subroutines used to copy their return values in rvalue context. Not
2053only was this a waste of CPU cycles, but it also caused bugs. A C<($)>
2054prototype would cause an lvalue sub to copy its return value [perl #51408],
2055and C<while(lvalue_sub() =~ m/.../g) { ... }> would loop endlessly
2056[perl #78680].
2057
2058=item *
2059
4ad239c3
FC
2060When called in potential lvalue context
2061(e.g., subroutine arguments or a list
0fe29a63 2062passed to C<for>), lvalue subroutines used to copy
a14d7d4a
RS
2063any read-only value that was returned. E.g., C< sub :lvalue { $] } >
2064would not return C<$]>, but a copy of it.
2065
2066=item *
2067
0fe29a63
FC
2068When called in potential lvalue context, an lvalue subroutine returning
2069arrays or hashes used to bind the arrays or hashes to scalar variables,
2070resulting in bugs. This was fixed in 5.14.0 if an array were the first
2071thing returned from the subroutine (but not for C<$scalar, @array> or
2072hashes being returned). Now a more general fix has been applied
2073[perl #23790].
a14d7d4a 2074
77649ca9
RS
2075=item *
2076
2077Method calls whose arguments were all surrounded with C<my()> or C<our()>
2078(as in C<< $object->method(my($a,$b)) >>) used to force lvalue context on
2079the subroutine. This would prevent lvalue methods from returning certain
2080values.
2081
4ad239c3
FC
2082=item *
2083
2084Lvalue sub calls that are not determined to be such at compile time
2085(C<&$name> or &{"name"}) are no longer exempt from strict refs if they
2086occur in the last statement of an lvalue subroutine [perl #102486].
2087
2088=item *
2089
2090Sub calls whose subs are not visible at compile time, if
2091they occurred in the last statement of an lvalue subroutine,
2092would reject non-lvalue subroutines and die with "Can't modify non-lvalue
2093subroutine call" [perl #102486].
2094
2095Non-lvalue sub calls whose subs I<are> visible at compile time exhibited
2096the opposite bug. If the call occurred in the last statement of an lvalue
2097subroutine, there would be no error when the lvalue sub was called in
2098lvalue context. Perl would blindly assign to the temporary value returned
2099by the non-lvalue subroutine.
2100
2101=item *
2102
2103C<AUTOLOAD> routines used to take precedence over the actual sub being
2104called (i.e., when autoloading wasn't needed), for sub calls in lvalue or
2105potential lvalue context, if the subroutine was not visible at compile
2106time.
2107
2108=item *
2109
0fe29a63
FC
2110Applying the C<:lvalue> attribute to an XSUB or to an aliased subroutine
2111stub with C<< sub foo :lvalue; >> syntax stopped working in Perl 5.12.
2112This has been fixed.
2113
2114=item *
2115
4ad239c3
FC
2116Applying the :lvalue attribute to subroutine that is already defined does
2117not work properly, as the attribute changes the way the sub is compiled.
2118Hence, Perl 5.12 began warning when an attempt is made to apply the
2119attribute to an already defined sub. In such cases, the attribute is
2120discarded.
2121
2122But the change in 5.12 missed the case where custom attributes are also
2123present: that case still silently and ineffectively applied the attribute.
2124That omission has now been corrected. C<sub foo :lvalue :Whatever> (when
2125C<foo> is already defined) now warns about the :lvalue attribute, and does
2126not apply it.
2127
2128=item *
2129
2130A bug affecting lvalue context propagation through nested lvalue subroutine
2131calls has been fixed. Previously, returning a value in nested rvalue
2132context would be treated as lvalue context by the inner subroutine call,
2133resulting in some values (such as read-only values) being rejected.
2134
a14d7d4a
RS
2135=back
2136
85adda6e
FC
2137=head2 Compile-time hints
2138
2139=over
2140
2141=item *
2142
2143Tying C<%^H> no longer causes perl to crash or ignore the contents of
2144C<%^H> when entering a compilation scope [perl #106282].
2145
2146=item *
2147
9320cecf 2148C<eval $string> and C<require> used not to
4d8a5d3f 2149localise C<%^H> during compilation if it
85adda6e
FC
2150was empty at the time the C<eval> call itself was compiled. This could
2151lead to scary side effects, like C<use re "/m"> enabling other flags that
2152the surrounding code was trying to enable for its caller [perl #68750].
2153
2154=item *
2155
9320cecf
FC
2156C<eval $string> and C<require> no longer localise hints (C<$^H> and C<%^H>)
2157at run time, but only during compilation of the $string or required file.
2158This makes C<BEGIN { $^H{foo}=7 }> equivalent to
2159C<BEGIN { eval '$^H{foo}=7' }> [perl #70151].
2160
2161=item *
2162
85adda6e
FC
2163Creating a BEGIN block from XS code (via C<newXS> or C<newATTRSUB>) would,
2164on completion, make the hints of the current compiling code the current
2165hints. This could cause warnings to occur in a non-warning scope.
2166
2167=back
2168
3949715f 2169=head2 Fixes related to hashes and arrays
a14d7d4a
RS
2170
2171=over
2172
2173=item *
2174
2175A bug has been fixed that would cause a "Use of freed value in iteration"
2176error if the next two hash elements that would be iterated over are
2177deleted [perl #85026]. (5.14.1)
2178
2179=item *
2180
a14d7d4a 2181Deleting the current hash iterator (the hash element that would be returend
cbd5afc5
FC
2182by the next call to C<each>) in void context used not to free it
2183[perl #85026].
3949715f
FC
2184
2185=item *
2186
3949715f
FC
2187Deletion of methods via C<delete $Class::{method}> syntax used to update
2188method caches if called in void context, but not scalar or list context.
3949715f
FC
2189
2190=item *
2191
3949715f
FC
2192When hash elements are deleted in void context, the internal hash entry is
2193now freed before the value is freed, to prevent destructors called by that
2194latter freeing from seeing the hash in an inconsistent state. It was
2195possible to cause double-frees if the destructor freed the hash itself
2196[perl #100340].
2197
2198=item *
2199
cbd5afc5
FC
2200A C<keys> optimisation in Perl 5.12.0 to make it faster on empty hashes
2201caused C<each> not to reset the iterator if called after the last element
2202was deleted.
3949715f 2203
cbd5afc5
FC
2204=item *
2205
2206Freeing deeply nested hashes no longer crashes [perl #44225].
3949715f
FC
2207
2208=item *
2209
cbd5afc5
FC
2210It is possible from XS code to create hashes with elements that have no
2211values. The hash element and slice operators used to crash
2212when handling these in lvalue context. They now
2213produce a "Modification of non-creatable hash value attempted" error
2214message.
2215
2216=item *
2217
2218If list assignment to a hash or array triggered destructors that freed the
2219hash or array itself, a crash would ensue. This is no longer the case
2220[perl #107440].
3949715f
FC
2221
2222=item *
2223
2224It used to be possible to free the typeglob of a localised array or hash
2225(e.g., C<local @{"x"}; delete $::{x}>), resulting in a crash on scope exit.
2226
b7967cca
FC
2227=item *
2228
2229Some core bugs affecting L<Hash::Util> have been fixed: locking a hash
2230element that is a glob copy no longer causes subsequent assignment to it to
2231corrupt the glob, and unlocking a hash element that holds a copy-on-write
2232scalar no longer causes modifications to that scalar to modify other
2233scalars that were sharing the same string buffer.
2234
a14d7d4a
RS
2235=back
2236
12fab0b9
FC
2237=head2 Weak references
2238
2239=over
2240
2241=item *
2242
2243Weakening the first argument to an automatically-invoked C<DESTROY> method
2244could result in erroneous "DESTROY created new reference" errors or
2245crashes. Now it is an error to weaken a read-only reference.
2246
2247=item *
2248
2249Weak references to lexical hashes going out of scope were not going stale
2250(becoming undefined), but continued to point to the hash.
2251
2252=item *
2253
2254Weak references to lexical variables going out of scope are now broken
2255before any magical methods (e.g., DESTROY on a tie object) are called.
2256This prevents such methods from modifying the variable that will be seen
2257the next time the scope is entered.
2258
2259=item *
2260
2261Creating a weak reference to an @ISA array or accessing the array index
2262(C<$#ISA>) could result in confused internal bookkeeping for elements
2263subsequently added to the @ISA array. For instance, creating a weak
2264reference to the element itself could push that weak reference on to @ISA;
2265and elements added after use of C<$#ISA> would be ignored by method lookup
2266[perl #85670].
2267
2268=back
2269
c99e5913 2270=head2 Support for embedded nulls
021c503d
RS
2271
2272Some parts of Perl did not work correctly with nulls (C<chr 0>) embedded in
2273strings. That meant that, for instance, C<< $m = "a\0b"; foo->$m >> would
2274call the "a" method, instead of the actual method name contained in $m.
2275These parts of perl have been fixed to support nulls:
2276
2277=over
2278
2279=item *
2280
2281Method names
2282
2283=item *
2284
bf90dc88 2285Typeglob names (including filehandle and subroutine names)
021c503d
RS
2286
2287=item *
2288
bf90dc88 2289Package names, including the return value of C<ref()>
021c503d
RS
2290
2291=item *
2292
2293Typeglob elements (C<*foo{"THING\0stuff"}>)
2294
2295=item *
2296
2297Signal names
2298
2299=item *
2300
2301Various warnings and error messages that mention variable names or values,
2302methods, etc.
2303
2304=back
2305
2306One side effect of these changes is that blessing into "\0" no longer
2307causes C<ref()> to return false.
2308
200b6340
FC
2309=head2 Filetests and C<stat>
2310
2311The term "filetests" refers to the operators that consist of a hyphen
2312followed by a single letter: C<-r>, C<-x>, C<-M>, etc. The term "stacked"
2313when applied to filetests means followed by another filetest operator
2314sharing the same operand, as in C<-r -x -w $fooo>.
2315
2316=over
2317
2318=item *
2319
d2b8dc24
FC
2320C<stat> produces more consistent warnings. It no longer warns for "_"
2321[perl #71002] and no longer skips the warning at times for other unopened
5d27fa85
FC
2322handles. It no longer warns about an unopened handle when the operating
2323system's C<fstat> function fails.
2324
2325=item *
2326
2327C<stat> would sometimes return negative numbers for large inode numbers,
2328because it was using the wrong internal C type. [perl #84590]
2329
2330=item *
2331
2332C<lstat> is documented to fall back to C<stat> (with a warning) when given
2333a filehandle. When passed an IO reference, it was actually doing the
2334equivalent of S<C<stat _>> and ignoring the handle.
200b6340
FC
2335
2336=item *
2337
d2b8dc24
FC
2338C<-T _> with no preceding C<stat> used to produce a
2339confusing "uninitialized" warning, even though there
200b6340
FC
2340is no visible uninitialized value to speak of.
2341
2342=item *
2343
5d27fa85
FC
2344C<-T>, C<-B>, C<-l> and C<-t> now work
2345when stacked with other filetest operators
d2b8dc24 2346[perl #77388].
200b6340
FC
2347
2348=item *
2349
5d27fa85
FC
2350In 5.14.0, filetest ops (C<-r>, C<-x>, etc.) started calling FETCH on a
2351tied argument belonging to the previous argument to a list operator, if
2352called with a bareword argument or no argument at all. This has been
2353fixed, so C<push @foo, $tied, -r> no longer calls FETCH on C<$tied>.
2354
2355=item *
2356
2357In Perl 5.6, C<-l> followed by anything other than a bareword would treat
2358its argument as a file name. That was changed in 5.8 for glob references
2359(C<\*foo>), but not for globs themselves (C<*foo>). C<-l> started
2360returning C<undef> for glob references without setting the last
2361stat buffer that the "_" handle uses, but only if warnings
2362were turned on. With warnings off, it was the same as 5.6.
2363In other words, it was simply buggy and inconsistent. Now the 5.6
2364behaviour has been restored.
2365
2366=item *
2367
e45e6487
FC
2368C<-l> followed by a bareword no longer "eats" the previous argument to
2369the list operator in whose argument list it resides. Hence,
2370C<print "bar", -l foo> now actually prints "bar", because C<-l>
2371on longer eats it.
2372
2373=item *
2374
200b6340
FC
2375Perl keeps several internal variables to keep track of the last stat
2376buffer, from which file(handle) it originated, what type it was, and
2377whether the last stat succeeded.
2378
2379There were various cases where these could get out of synch, resulting in
2380inconsistent or erratic behaviour in edge cases (every mention of C<-T>
2381applies to C<-B> as well):
2382
2383=over
2384
2385=item *
2386
2387C<-T I<HANDLE>>, even though it does a C<stat>, was not resetting the last
2388stat type, so an C<lstat _> following it would merrily return the wrong
2389results. Also, it was not setting the success status.
2390
2391=item *
2392
2393Freeing the handle last used by C<stat> or a filetest could result in
2394S<C<-T _>> using an unrelated handle.
2395
2396=item *
2397
d2b8dc24
FC
2398C<stat> with an IO reference would not reset the stat type or record the
2399filehandle for S<C<-T _>> to use.
200b6340
FC
2400
2401=item *
2402
d2b8dc24 2403Fatal warnings could cause the stat buffer not to be reset
200b6340 2404for a filetest operator on an unopened filehandle or C<-l> on any handle.
d2b8dc24 2405Fatal warnings also stopped C<-T> from setting C<$!>.
200b6340
FC
2406
2407=item *
2408
2409When the last stat was on an unreadable file, C<-T _> is supposed to
2410return C<undef>, leaving the last stat buffer unchanged. But it was
2411setting the stat type, causing C<lstat _> to stop working.
2412
2413=item *
2414
2415C<-T I<FILENAME>> was not resetting the internal stat buffers for
2416unreadable files.
2417
2418=back
2419
2420These have all been fixed.
2421
200b6340
FC
2422=back
2423
2f2cde2e
FC
2424=head2 Version objects and vstrings
2425
2426=over
2427
2428=item *
2429
2430The bitwise complement operator (and possibly other operators, too) when
2431passed a vstring would leave vstring magic attached to the return value,
2432even though the string had changed. This meant that
2433C<< version->new(~v1.2.3) >> would create a version looking like "v1.2.3"
2434even though the string passed to C<< version->new >> was actually
2435"\376\375\374". This also caused L<B::Deparse> to deparse C<~v1.2.3>
2436incorrectly, without the C<~> [perl #29070].
2437
2438=item *
2439
2440Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then
2441assigning something else used to blow away all the magic. This meant that
2442tied variables would come undone, C<$!> would stop getting updated on
2443failed system calls, C<$|> would stop setting autoflush, and other
2444mischief would take place. This has been fixed.
2445
2446=item *
2447
2448C<< version->new("version") >> and C<printf "%vd", "version"> no longer
2449crash [perl #102586].
2450
2451=item *
2452
2453Version comparisons, such as those that happen implicitly with C<use
2454v5.43>, no longer cause locale settings to change [perl #105784].
2455
2456=item *
2457
2458Version objects no longer cause memory leaks in boolean context
2459[perl #109762].
2460
2461=back
2462
977d6e9a
FC
2463=head2 Tied variables
2464
2465=over
2466
2467=item *
2468
ae073b6b
FC
2469Various cases in which FETCH was being ignored or called too many times
2470have been fixed:
977d6e9a 2471
ae073b6b 2472=over
977d6e9a
FC
2473
2474=item *
2475
ae073b6b 2476C<PerlIO::get_layers> [perl #97956]
977d6e9a
FC
2477
2478=item *
2479
ae073b6b
FC
2480C<$tied =~ y/a/b/>, C<chop $tied> and C<chomp $tied> when $tied holds a
2481reference.
977d6e9a
FC
2482
2483=item *
2484
841ee14b
RS
2485When calling C<local $_> [perl #105912]
2486
2487=item *
2488
ae073b6b 2489Four-argument C<select>
977d6e9a
FC
2490
2491=item *
2492
ae073b6b 2493A tied buffer passed to C<sysread>
977d6e9a
FC
2494
2495=item *
2496
ae073b6b 2497C<< $tied .= <> >>
977d6e9a
FC
2498
2499=item *
2500
ae073b6b
FC
2501Three-argument C<open>, the third being a tied file handle
2502(as in C<< open $fh, ">&", $tied >>)
977d6e9a
FC
2503
2504=item *
2505
ae073b6b 2506C<sort> with a reference to a tied glob for the comparison routine.
977d6e9a
FC
2507
2508=item *
2509
ae073b6b 2510C<..> and C<...> in list context [perl #53554].
977d6e9a
FC
2511
2512=item *
2513
ae073b6b
FC
2514C<${$tied}>, C<@{$tied}>, C<%{$tied}> and C<*{$tied}> where the tied
2515variable returns a string (C<&{}> was unaffected)
977d6e9a
FC
2516
2517=item *
2518
ae073b6b 2519C<defined ${ $tied_variable }>
977d6e9a
FC
2520
2521=item *
2522
ae073b6b
FC
2523Various functions that take a filehandle argument in rvalue context
2524(C<close>, C<readline>, etc.) [perl #97482]
977d6e9a
FC
2525
2526=item *
2527
ae073b6b
FC
2528Some cases of dereferencing a complex expression, such as
2529C<${ (), $tied } = 1>, used to call C<FETCH> multiple times, but now call
2530it once.
977d6e9a
FC
2531
2532=item *
2533
ae073b6b
FC
2534C<$tied-E<gt>method> where $tied returns a package name--even resulting in
2535a failure to call the method, due to memory corruption
977d6e9a
FC
2536
2537=item *
2538
ae073b6b 2539Assignments like C<*$tied = \&{"..."}> and C<*glob = $tied>
977d6e9a
FC
2540
2541=item *
2542
ae073b6b
FC
2543C<chdir>, C<chmod>, C<chown>, C<utime>, C<truncate>, C<stat>, C<lstat> and
2544the filetest ops (C<-r>, C<-x>, etc.)
2545
2546=back
977d6e9a
FC
2547
2548=item *
2549
ae073b6b
FC
2550C<caller> sets C<@DB::args> to the subroutine arguments when called from
2551the DB package. It used to crash when doing so if C<@DB::args> happened to
2552be tied. Now it croaks instead.
977d6e9a
FC
2553
2554=item *
2555
ae073b6b
FC
2556Tying an element of %ENV or C<%^H> and then deleting that element would
2557result in a call to the tie object's DELETE method, even though tying the
2558element itself is supposed to be equivalent to tying a scalar (the element
2559is, of course, a scalar) [perl #67490].
977d6e9a
FC
2560
2561=item *
2562
ae073b6b
FC
2563When Perl autovivifies an element of a tied array or hash (which entails
2564calling STORE with a new reference), it now calls FETCH immediately after
2565the STORE, instead of assuming that FETCH would have returned the same
2566reference. This can make it easier to implement tied objects [perl #35865, #43011].
977d6e9a
FC
2567
2568=item *
2569
ae073b6b
FC
2570Four-argument C<select> no longer produces its "Non-string passed as
2571bitmask" warning on tied or tainted variables that are strings.
977d6e9a
FC
2572
2573=item *
2574
ae073b6b
FC
2575Localising a tied scalar that returns a typeglob no longer stops it from
2576being tied till the end of the scope.
977d6e9a
FC
2577
2578=item *
2579
ae073b6b
FC
2580Attempting to C<goto> out of a tied handle method used to cause memory
2581corruption or crashes. Now it produces an error message instead
2582[perl #8611].
977d6e9a
FC
2583
2584=item *
2585
2586A bug has been fixed that occurs when a tied variable is used as a
2587subroutine reference: if the last thing assigned to or returned from the
2588variable was a reference or typeglob, the C<\&$tied> could either crash or
2589return the wrong subroutine. The reference case is a regression introduced
2590in Perl 5.10.0. For typeglobs, it has probably never worked till now.
2591
2592=back
2593
b81fe5e9 2594=head2 "Uninitialized" warnings
a14d7d4a
RS
2595
2596=over
2597
021c503d
RS
2598=item *
2599
ae073b6b
FC
2600Various functions that take a filehandle argument in rvalue context
2601(C<close>, C<readline>, etc.) used to warn twice for an undefined handle
2602[perl #97482].
2603
2604=item *
2605
b81fe5e9
FC
2606C<dbmopen> now only warns once, rather than three times, if the mode
2607argument is C<undef> [perl #90064].
2608
2609=item *
2610
2611The C<+=> operator does not usually warn when the left-hand side is
2612C<undef>, but it was doing so for tied variables. This has been fixed
2613[perl #44895].
2614
2615=item *
2616
2617A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized"
2618warnings to report the wrong variable if the operator in question had
2619two operands and one was C<%{...}> or C<@{...}>. This has been fixed
2620[perl #103766].
2621
2622=item *
2623
2624C<..> and C<...> in list context now mention the name of the variable in
2625"uninitialized" warnings for string (as opposed to numeric) ranges.
2626
2627=back
2628
edc1ae43 2629=head2 Last-accessed filehandle
021c503d
RS
2630
2631Perl has an internal variable that stores the last filehandle to be
2632accessed. It is used by C<$.> and by C<tell> and C<eof> without
2633arguments.
2634
edc1ae43
FC
2635=over
2636
2637=item *
2638
021c503d
RS
2639It used to be possible to set this internal variable to a glob copy and
2640then modify that glob copy to be something other than a glob, and still
2641have the last-accessed filehandle associated with the variable after
2642assigning a glob to it again:
2643
2644 my $foo = *STDOUT; # $foo is a glob copy
2645 <$foo>; # $foo is now the last-accessed handle
2646 $foo = 3; # no longer a glob
2647 $foo = *STDERR; # still the last-accessed handle
2648
2649Now the C<$foo = 3> assignment unsets that internal variable, so there
2650is no last-accessed filehandle, just as if C<< <$foo> >> had never
2651happened.
2652
edc1ae43
FC
2653This also prevents some unrelated handle from becoming the last-accessed
2654handle if $foo falls out of scope and the same internal SV gets used for
2655another handle [perl #97988].
2656
2657=item *
2658
2659A regression in 5.14 caused these statements not to set that internal
2660variable:
2661
2662 my $fh = *STDOUT;
2663 tell $fh;
2664 eof $fh;
2665 seek $fh, 0,0;
2666 tell *$fh;
2667 eof *$fh;
2668 seek *$fh, 0,0;
2669 readline *$fh;
2670
2671This is now fixed, but C<tell *{ *$fh }> still has the problem, and it
2672is not clear how to fix it [perl #106536].
2673
2674=back
2675
288a601f
FC
2676=head2 Redefinition warnings
2677
2678=over
2679
2680=item *
2681
2682Subroutines from the C<autouse> namespace are once more exempt from
2683redefinition warnings. This used to work in 5.005, but was broken in
26845.6 for most subroutines. For subs created via XS that redefine
2685subroutines from the C<autouse> package, this stopped working in 5.10.
2686
2687=item *
2688
2689New XSUBs now produce redefinition warnings if they overwrite existing
2690subs, as they did in 5.8.x. (The C<autouse> logic was reversed in
26915.10-14. Only subroutines from the C<autouse> namespace would warn
2692when clobbered.)
2693
2694=item *
2695
2696C<newCONSTSUB> used to use compile-time warning hints, instead of
2697run-time hints. The following code should never produce a redefinition
2698warning, but it used to, if C<newCONSTSUB> redefined an existing
2699subroutine:
2700
2701 use warnings;
2702 BEGIN {
2703 no warnings;
2704 some_XS_function_that_calls_new_CONSTSUB();
2705 }
2706
2707=item *
2708
2709Redefinition warnings for constant subroutines are on by default (what
2710are known as severe warnings in L<perldiag>). This was only the case
2711when it was a glob assignment or declaration of a Perl subroutine that
2712caused the warning. If the creation of XSUBs triggered the warning, it
2713was not a default warning. This has been corrected.
2714
2715=item *
2716
2717The internal check to see whether a redefinition warning should occur
2718used to emit "uninitialized" warnings in cases like this:
2719
2720 use warnings "uninitialized";
2721 use constant {u => undef, v => undef};
2722 sub foo(){u}
2723 sub foo(){v}
2724
2725=back
2726
78c5646a
FC
2727=head2 Overloading
2728
2729=over
2730
2731=item *
2732
2733Arithmetic assignment (C<$left += $right>) involving overloaded objects
2734that rely on the 'nomethod' override no longer segfault when the left
2735operand is not overloaded.
2736
2737=item *
2738
2739Errors that occur when methods cannot be found during overloading now
2740mention the correct package name, as they did in 5.8.x, instead of
2741erroneously mentioning the "overload" package, as they have since 5.10.0.
2742
2743=item *
2744
2745Undefining C<%overload::> no longer causes a crash.
2746
2747=back
2748
fdf8c809
FC
2749=head2 Fixes to the C<sort> operator
2750
2751=over
2752
2753=item *
2754
2755C<sort> was not treating C<sub {}> and C<sub {()}> as equivalent when
2756such a sub was provided as the comparison routine. It used to croak on
2757C<sub {()}>.
2758
2759=item *
2760
2761C<sort> now works once more with custom sort routines that are XSUBs. It
2762stopped working in 5.10.0.
2763
2764=item *
2765
2766C<sort> with a constant for a custom sort routine, although it produces
2767unsorted results, no longer crashes. It started crashing in 5.10.0.
2768
2769=item *
2770
2771Warnings emitted by C<sort> when a custom comparison routine returns a
2772non-numeric value now contain "in sort" and show the line number of the
2773C<sort> operator, rather than the last line of the comparison routine. The
2774warnings also occur now only if warnings are enabled in the scope where
2775C<sort> occurs. Previously the warnings would occur if enabled in the
2776comparison routine's scope.
2777
2778=item *
2779
2780C<< sort { $a <=> $b } >>, which is optimised internally, now produces
2781"uninitialized" warnings for NaNs (not-a-number values), since C<< <=> >>
2782returns C<undef> for those. This brings it in line with
2783S<C<< sort { 1; $a <=> $b } >>> and other more complex cases, which are not
2784optimised [perl #94390].
2785
2786=back
2787
ad275677
FC
2788=head2 Fixes affecting the debugger
2789
2790=over
2791
2792=item *
2793
2794F<dumpvar.pl>, and consequently the C<x> command in the debugger, have been
2795fixed to handle objects blessed into classes whose names contain "=". The
2796contents of such objects used not to be dumped [perl #101814].
2797
2798=item *
2799
2800The "R" command for restarting a debugger session has been fixed to work on
2801Windows, or any other system lacking a C<POSIX::_SC_OPEN_MAX> constant
2802[perl #87740].
2803
2804=item *
2805
2806The C<#line 42 foo> directive used not to update the arrays of lines used
2807by the debugger if it occurred in a string eval. This was partially fixed
2808in 5.14, but it only worked for a single C<#line 42 foo> in each eval. Now
2809it works for multiple.
2810
2811=item *
2812
2813When subroutine calls are intercepted by the debugger, the name of the
2814subroutine or a reference to it is stored in C<$DB::sub>, for the debugger
2815to access. In some cases (such as C<$foo = *bar; undef *bar; &$foo>)
2816C<$DB::sub> would be set to a name that could not be used to find the
2817subroutine, and so the debugger's attempt to call it would fail. Now the
2818check to see whether a reference is needed is more robust, so those
2819problems should not happen anymore [rt.cpan.org #69862].
2820
2821=item *
2822
2823Every subroutine has a filename associated with it that the debugger uses.
2824The one associated with constant subroutines used to be misallocated when
2825cloned under threads. Consequently, debugging threaded applications could
2826result in memory corruption [perl #96126].
2827
2828=back
2829
39ae1ea7
FC
2830=head2 Fixes to the C<glob> operator
2831
2832=over
2833
2834=item *
2835
2836On OSes other than VMS, Perl's C<glob> operator (and the C<< <...> >> form)
2837use L<File::Glob> underneath. L<File::Glob> splits the pattern into words,
2838before feeding each word to its C<bsd_glob> function.
2839
2840There were several inconsistencies in the way the split was done. Now
2841quotation marks (' and ") are always treated as shell-style word delimiters
2842(that allow whitespace as part of a word) and backslashes are always
2843preserved, unless they exist to escape quotation marks. Before, those
2844would only sometimes be the case, depending on whether the pattern
2845contained whitespace. Also, escaped whitespace at the end of the pattern
2846is no longer stripped [perl #40470].
2847
2848=item *
2849
2850C<CORE::glob> now works as a way to call the default globbing function. It
2851used to respect overrides, despite the C<CORE::> prefix.
2852
2853=item *
2854
2855Under miniperl (used to configure modules when perl itself is built),
2856C<glob> now clears %ENV before calling csh, since the latter croaks on some
2857systems if it does not like the contents of the LS_COLORS enviroment
2858variable [perl #98662].
2859
2860=back
2861
10ba0d31
FC
2862=head2 Prototypes of built-in keywords
2863
22ae2565
FC
2864=over
2865
10ba0d31
FC
2866=item *
2867
2868The C<prototype> function no longer dies for the C<__FILE__>, C<__LINE__>
2869and C<__PACKAGE__> directives. It now returns an empty-string prototype
2870for them, because they are syntactically indistinguishable from nullary
2871functions like C<time>.
2872
2873=item *
2874
2875C<prototype> now returns C<undef> for all overridable infix operators,
2876such as C<eq>, which are not callable in any way resembling functions.
2877It used to return incorrect prototypes for some and die for others
2878[perl #94984].
2879
2880=item *
2881
2882The prototypes of several built-in functions--C<getprotobynumber>, C<lock>,
2883C<not> and C<select>--have been corrected, or at least are now closer to
2884reality than before.
2885
10ba0d31
FC
2886=back
2887
4fad228f
FC
2888=head2 Bugs involving the dereferencing operators
2889
2890=over
2891
2892=item *
2893
2894C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
2895return true for most, but not all built-in variables, if
2896they had not been used yet. This bug affected C<${^GLOBAL_PHASE}> and
2897C<${^UTF8CACHE}>, among others. It also used to return false if the
2898package name was given as well (C<${"::!"}>) [perl #97978, #97492].
2899
2900=item *
2901
2902Perl 5.10.0 introduced a similar bug: C<defined(*{"foo"})> where "foo"
2903represents the name of a built-in global variable used to return false if
2904the variable had never been used before, but only on the I<first> call.
2905This, too, has been fixed.
2906
2907=item *
2908
2909Since 5.6.0, C<*{ ... }> has been inconsistent in how it treats undefined
2910values. It would die in strict mode or lvalue context for most undefined
2911values, but would be treated as the empty string (with a warning) for the
2912specific scalar return by C<undef()> (C<&PL_sv_undef> internally). This
2913has been corrected. C<undef()> is now treated like other undefined
2914scalars, as in Perl 5.005.
2915
2916=back
2917
fbd7c082
FC
2918=head2 Threading bugs
2919
2920=over
2921
2922=item *
2923
2924Typeglobs returned from threads are no longer cloned if the parent thread
2925already has a glob with the same name. This means that returned
2926subroutines will now assign to the right package variables [perl #107366].
2927
2928=item *
2929
2930Some cases of threads crashing due to memory allocation during cloning have
2931been fixed [perl #90006].
2932
2933=item *
2934
2935Thread joining would sometimes emit "Attempt to free unreferenced scalar"
2936warnings if C<caller> had been used from the C<DB> package prior to thread
2937creation [perl #98092].
2938
2939=item *
2940
2941Locking a subroutine (via C<lock &sub>) is no longer a compile-time error
2942for regular subs. For lvalue subroutines, it no longer tries to return the
2943sub as a scalar, resulting in strange side effects like C<ref \$_>
2944returning "CODE" in some instances.
2945
2946C<lock &sub> is now a run-time error if L<threads::shared> is loaded (a
2947no-op otherwise), but that may be rectified in a future version.
2948
2949=back
2950
22ae2565
FC
2951=head2 Fixes to C<given> and C<when>
2952
2953=over
2954
2955=item *
2956
2957C<given> was not scoping its implicit $_ properly, resulting in memory
2958leaks or "Variable is not available" warnings [perl #94682].
2959
2960=item *
2961
2962C<given> was not calling set-magic on the implicit lexical C<$_> that it
2963uses. This meant, for example, that C<pos> would be remembered from one
2964execution of the same C<given> block to the next, even if the input were a
2965different variable [perl #84526].
2966
2967=item *
2968
2969C<when> blocks are now capable of returning variables declared inside the
2970enclosing C<given> block [perl #93548].
2971
2972=back
2973
2974=head2 Fixes to the C<substr> operator
2975
2976=over
2977
2978=item *
2979
2980Tied (and otherwise magical) variables are no longer exempt from the
2981"Attempt to use reference as lvalue in substr" warning.
2982
2983=item *
2984
2985That warning now occurs when the returned lvalue is assigned to, not
2986when C<substr> itself is called. This only makes a difference if the
2987return value of C<substr> is referenced and assigned to later.
2988
2989=item *
2990
2991Passing a substring of a read-only value or a typeglob to a function
2992(potential lvalue context) no longer causes an immediate "Can't coerce"
2993or "Modification of a read-only value" error. That error only occurs
2994if and when the value passed is assigned to.
2995
2996The same thing happens with the "substr outside of string" error. If
2997the lvalue is only read, not written to, it is now just a warning, as
2998with rvalue C<substr>.
2999
3000=item *
3001
3002C<substr> assignments no longer call FETCH twice if the first argument
3003is a tied variable, just once.
3004
3005=back
3006
61f055fd
FC
3007=head2 Fixes affecting the C API
3008
3009=over
3010
3011=item *
3012
3013The C<newHVhv> XS function now works on tied hashes, instead of crashing or
3014returning an empty hash.
3015
3016=item *
3017
3018The C<SvIsCOW> C macro now returns false for read-only copies of typeglobs,
3019such as those created by:
3020
3021 $hash{elem} = *foo;
3022 Hash::Util::lock_value %hash, 'elem';
3023
3024It used to return true.
3025
3026=item *
3027
3028The C<SvPVutf8> C function no longer tries to modify its argument,
3029resulting in errors [perl #108994].
3030
3031=item *
3032
3033C<SvPVutf8> now works properly with magical variables.
3034
3035=item *
3036
3037C<SvPVbyte> now works properly non-PVs.
3038
d38c78ed
FC
3039=item *
3040
3041When presented with malformed UTF-8 input, the XS-callable functions
3042C<is_utf8_string()>, C<is_utf8_string_loc()>, and
3043C<is_utf8_string_loclen()> could read beyond the end of the input
3044string by up to 12 bytes. This no longer happens. [perl #32080].
3045However, currently, C<is_utf8_char()> still has this defect, see
3046L</is_utf8_char()> above.
3047
fb83b884
FC
3048=item *
3049
3050The C-level C<pregcomp> function could become confused as to whether the
3051pattern was in UTF8 if the pattern was an overloaded, tied, or otherwise
3052magical scalar [perl #101940].
3053
61f055fd
FC
3054=back
3055
edc1ae43
FC
3056=head2 Other notable fixes
3057
3058=over
3059
021c503d 3060=item *
cb82babd 3061
77649ca9
RS
3062C<~~> now correctly handles the precedence of Any~~Object, and is not tricked
3063by an overloaded object on the left-hand side.
3064
3065=item *
3066
77649ca9
RS
3067C<quotemeta> now quotes consistently the same non-ASCII characters under
3068C<use feature 'unicode_strings'>, regardless of whether the string is
3069encoded in UTF-8 or not, hence fixing the last vestiges (we hope) of the
3070infamous L<perlunicode/The "Unicode Bug">. [perl #77654].
3071
3072Which of these code points is quoted has changed, based on Unicode's
3073recommendations. See L<perlfunc/quotemeta> for details.
3074
3075=item *
3076
cb82babd
RS
3077When one writes C<open foo || die>, which used to work in Perl 4, a
3078"Precedence problem" warning is produced. This warning used erroneously to
3079apply to fully-qualified bareword handle names not followed by C<||>. This
3080has been corrected.
3081
021c503d
RS
3082=item *
3083
cb82babd
RS
3084After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument
3085would sometimes return a name that could not be used to refer to the
3086filehandle, or sometimes it would return C<undef> even when a filehandle
3087was selected. Now it returns a typeglob reference in such cases.
3088
021c503d
RS
3089=item *
3090
cb82babd
RS
3091C<PerlIO::get_layers> no longer ignores some arguments that it thinks are
3092numeric, while treating others as filehandle names. It is now consistent
3093for flat scalars (i.e., not references).
3094
021c503d
RS
3095=item *
3096
021c503d 3097Unrecognised switches on C<#!> line
cb82babd
RS
3098
3099If a switch, such as B<-x>, that cannot occur on the C<#!> line is used
3100there, perl dies with "Can't emulate...".
3101
3102It used to produce the same message for switches that perl did not
3103recognise at all, whether on the command line or the C<#!> line.
3104
3105Now it produces the "Unrecognized switch" error message [perl #104288].
3106
021c503d
RS
3107=item *
3108
cb82babd
RS
3109C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the
3110signal handler from stealing the exit status [perl #105700].
3111
021c503d
RS
3112=item *
3113
cd4adf6c 3114The %n formatting code for C<printf> and C<sprintf>, which causes the number
3e91afe7 3115of characters to be assigned to the next argument, now actually
cb82babd
RS
3116assigns the number of characters, instead of the number of bytes.
3117
3118It also works now with special lvalue functions like C<substr> and with
3119nonexistent hash and array elements [perl #3471, #103492].
3120
021c503d
RS
3121=item *
3122
8b80cdcf
FC
3123Perl skips copying values returned from a subroutine, for the sake of
3124speed, if doing so would make no observable difference. Due to faulty
3125logic, this would happen with the
3126result of C<delete>, C<shift> or C<splice>, even if the result was
3127referenced elsewhere. It also did so with tied variables about to be freed
3128[perl #91844, #95548].
cb82babd 3129
021c503d 3130=item *
cb82babd
RS
3131
3132C<utf8::decode> now refuses to modify read-only scalars [perl #91850].
3133
021c503d
RS
3134=item *
3135
3c8a1310
FC
3136Freeing $_ inside a C<grep> or C<map> block, a code block embedded in a
3137regular expression, or an @INC filter (a subroutine returned by a
3138subroutine in @INC) used to result in double frees or crashes
3139[perl #91880, #92254, #92256].
cb82babd 3140
021c503d
RS
3141=item *
3142
021c503d
RS
3143C<eval> returns C<undef> in scalar context or an empty list in list
3144context when there is a run-time error. When C<eval> was passed a
3145string in list context and a syntax error occurred, it used to return a
3146list containing a single undefined element. Now it returns an empty
3147list in list context for all errors [perl #80630].
412912b6
RS
3148
3149=item *
3150
3151C<goto &func> no longer crashes, but produces an error message, when
3152the unwinding of the current subroutine's scope fires a destructor that
3153undefines the subroutine being "goneto" [perl #99850].
3154
3155=item *
3156
b325a3a2 3157Perl now holds an extra reference count on the package that code is
cdea750a
RS
3158currently compiling in. This means that the following code no longer
3159crashes [perl #101486]:
b325a3a2
RS
3160
3161 package Foo;
3162 BEGIN {*Foo:: = *Bar::}
3163 sub foo;
3164
3165=item *
3166
b325a3a2
RS
3167The C<x> repetition operator no longer crashes on 64-bit builds with large
3168repeat counts [perl #94560].
3169
3170=item *
3171
b325a3a2
RS
3172Calling C<require> on an implicit C<$_> when C<*CORE::GLOBAL::require> has
3173been overridden does not segfault anymore, and C<$_> is now passed to the
3174overriding subroutine [perl #78260].
3175
3176=item *
3177
12477442
RS
3178In Perl 5.14.0, C<$tainted ~~ @array> stopped working properly. Sometimes
3179it would erroneously fail (when C<$tainted> contained a string that occurs
3180in the array I<after> the first element) or erroneously succeed (when
3181C<undef> occurred after the first element) [perl #93590].
3182
3183=item *
3184
12477442
RS
3185C<use> and C<require> are no longer affected by the I/O layers active in
3186the caller's scope (enabled by L<open.pm|open>) [perl #96008].
3187
3188=item *
3189
12477442
RS
3190C<our $::é; $é> (which is invalid) no longer produces the "Compilation
3191error at lib/utf8_heavy.pl..." error message, which it started emitting in
31925.10.0 [perl #99984].
3193
3194=item *
3195
12477442
RS
3196On 64-bit systems, C<read()> now understands large string offsets beyond
3197the 32-bit range.
3198
3199=item *
3200
3201Errors that occur when processing subroutine attributes no longer cause the
3202subroutine's op tree to leak.
3203
3204=item *
3205
a14d7d4a
RS
3206Passing the same constant subroutine to both C<index> and C<formline> no
3207longer causes one or the other to fail [perl #89218]. (5.14.1)
3208
3209=item *
3210
3211List assignment to lexical variables declared with attributes in the same
3212statement (C<my ($x,@y) : blimp = (72,94)>) stopped working in Perl 5.8.0.
3213It has now been fixed.
3214
3215=item *
3216
3217Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of
3218a pack template equivalent to "U0" if the input string was empty. This has
3219been fixed [perl #90160].
3220
3221=item *
3222
3223Destructors on objects were not called during global destruction on objects
3224that were not referenced by any scalars. This could happen if an array
3225element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
3226blessed variable (C<bless \my @a; sub foo { @a }>).
3227
3228Now there is an extra pass during global destruction to fire destructors on
3229any objects that might be left after the usual passes that check for
3230objects referenced by scalars [perl #36347].
3231
a14d7d4a
RS
3232=item *
3233
a14d7d4a
RS
3234Fixed a case where it was possible that a freed buffer may have been read
3235from when parsing a here document [perl #90128]. (5.14.1)
3236
3237=item *
3238
a14d7d4a
RS
3239C<each(I<ARRAY>)> is now wrapped in C<defined(...)>, like C<each(I<HASH>)>,
3240inside a C<while> condition [perl #90888].
3241
3242=item *
a14d7d4a 3243
ccad93fd
RS
3244A problem with context propagation when a C<do> block is an argument to
3245C<return> has been fixed. It used to cause C<undef> to be returned in
3246some cases of a C<return> inside an C<if> block which itself is followed by
3247another C<return>.
3248
3249=item *
3250
3251Calling C<index> with a tainted constant no longer causes constants in
3252subsequently compiled code to become tainted [perl #64804].
3253
3254=item *
3255
94c11dd4
RS
3256Infinite loops like C<1 while 1> used to stop C<strict 'subs'> mode from
3257working for the rest of the block.t
3258
3259=item *
3260
94c11dd4
RS
3261For list assignments like C<($a,$b) = ($b,$a)>, Perl has to make a copy of
3262the items on the right-hand side before assignment them to the left. For
3263efficiency's sake, it assigns the values on the right straight to the items
0ecf7720
RS
3264on the left if no one variable is mentioned on both sides, as in C<($a,$b) =
3265($c,$d)>. The logic for determining when it can cheat was faulty, in that
3266C<&&> and C<||> on the right-hand side could fool it. So C<($a,$b) =
3267$some_true_value && ($b,$a)> would end up assigning the value of C<$b> to
3268both scalars.
94c11dd4
RS
3269
3270=item *
3271
3272Perl no longer tries to apply lvalue context to the string in
3273C<("string", $variable) ||= 1> (which used to be an error). Since the
3274left-hand side of C<||=> is evaluated in scalar context, that's a scalar
3275comma operator, which gives all but the last item void context. There is
3276no such thing as void lvalue context, so it was a mistake for Perl to try
3277to force it [perl #96942].
3278
3279=item *
3280
94c11dd4
RS
3281C<caller> no longer leaks memory when called from the DB package if
3282C<@DB::args> was assigned to after the first call to C<caller>. L<Carp>
3283was triggering this bug [perl #97010].
3284
4bbade93 3285=item *
30682cc3 3286
4bbade93
RS
3287C<close> and similar filehandle functions, when called on built-in global
3288variables (like C<$+>), used to die if the variable happened to hold the
3289undefined value, instead of producing the usual "Use of uninitialized
3290value" warning.
3291
3292=item *
3293
3294When autovivified file handles were introduced in Perl 5.6.0, C<readline>
3295was inadvertently made to autovivify when called as C<readline($foo)> (but
3296not as C<E<lt>$fooE<gt>>). It has now been fixed never to autovivify.
3297
3298=item *
3299
4bbade93
RS
3300Calling an undefined anonymous subroutine (e.g., what $x holds after
3301C<undef &{$x = sub{}}>) used to cause a "Not a CODE reference" error, which
3302has been corrected to "Undefined subroutine called" [perl #71154].
3303
3304=item *
3305
3306Causing C<@DB::args> to be freed between uses of C<caller> no longer
3307results in a crash [perl #93320].
3308
3309=item *
3310
4bbade93
RS
3311C<setpgrp($foo)> used to be equivalent to C<($foo, setpgrp)>, because
3312C<setpgrp> was ignoring its argument if there was just one. Now it is
3313equivalent to C<setpgrp($foo,0)>.
3314
3315=item *
30682cc3 3316
4bbade93
RS
3317C<shmread> was not setting the scalar flags correctly when reading from
3318shared memory, causing the existing cached numeric representation in the
3319scalar to persist [perl #98480].
3320
3321=item *
3322
4bbade93
RS
3323C<++> and C<--> now work on copies of globs, instead of dying.
3324
3325=item *
3326
021c503d
RS
3327C<splice()> doesn't warn when truncating
3328
3329You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
3330worrying about warnings.
3331
77649ca9
RS
3332=item *
3333
d005e6a6 3334C<< $$ >> is no longer tainted. Since this value comes directly from
6d365783
FC
3335C<< getpid() >>, it is always safe.
3336
3337=item *
3338
3339The parser no longer leaks a filehandle if STDIN was closed before parsing
3340started [perl #37033].
3341
3342=item *
3343
6d365783 3344C<< die; >> with a non-reference, non-string, or magical (e.g., tainted)
cdea750a 3345value in $@ now properly propagates that value [perl #111654].
6d365783 3346
4bbade93
RS
3347=back
3348
3349=head1 Known Problems
30682cc3
RS
3350
3351=over 4
3352
3353=item *
3354
4bbade93
RS
3355On Solaris, we have two kinds of failure.
3356
3357If F<make> is Sun's F<make≥>, we get an error about a badly formed macro
4d6200df
FC
3358assignment in the F<Makefile>. That happens when F<./Configure> tries to
3359make depends. F<Configure> then exits 0, but further F<make>-ing fails.
4bbade93
RS
3360
3361If F<make> is F<gmake>, F<Configure> completes, then we get errors related
3362to F</usr/include/stdbool.h>
30682cc3 3363
04e04589
FC
3364=item *
3365
3366The following CPAN modules have test failures with perl 5.16. Patches have
3367been submitted for all of these, so hopefully there will be new releases
3368soon:
3369
3370=over
3371
3372=item *
3373
3374L<Date::Pcalc> version 6.1
3375
3376=item *
3377
3378L<Encode::JP::Mobile> version 0.27
3379
3380=item *
3381
3382L<Module::CPANTS::Analyse> version 0.85
3383
3384This fails due to problems in L<Module::Find> 0.10 and L<File::MMagic>
33851.27.
3386
3387=item *
3388
3389L<PerlIO::Util> version 0.72
3390
04e04589
FC
3391=back
3392
30682cc3
RS
3393=back
3394
30682cc3
RS
3395=head1 Acknowledgements
3396
3397XXX Generate this with:
3398
021c503d 3399 perl Porting/acknowledgements.pl v5.14.0..HEAD
30682cc3
RS
3400
3401=head1 Reporting Bugs
3402
3403If you find what you think is a bug, you might check the articles
3404recently posted to the comp.lang.perl.misc newsgroup and the perl
021c503d
RS
3405bug database at L<http://rt.perl.org/perlbug/>. There may also be
3406information at L<http://www.perl.org/>, the Perl Home Page.
30682cc3
RS
3407
3408If you believe you have an unreported bug, please run the L<perlbug>
3409program included with your release. Be sure to trim your bug down
3410to a tiny but sufficient test case. Your bug report, along with the
3411output of C<perl -V>, will be sent off to perlbug@perl.org to be
3412analysed by the Perl porting team.
3413
3414If the bug you are reporting has security implications, which make it
021c503d 3415inappropriate to send to a publicly archived mailing list, then please
4d6200df 3416send it to perl5-security-report@perl.org. This points to a closed
021c503d
RS
3417subscription unarchived mailing list, which includes all the core
3418committers, who will be able to help assess the impact of issues, figure
3419out a resolution, and help co-ordinate the release of patches to
3420mitigate or fix the problem across all platforms on which Perl is
4d6200df 3421supported. Please only use this address for security issues in the Perl
021c503d 3422core, not for modules independently distributed on CPAN.
30682cc3
RS
3423
3424=head1 SEE ALSO
3425
3426The F<Changes> file for an explanation of how to view exhaustive details
3427on what changed.
3428
3429The F<INSTALL> file for how to build Perl.
3430
3431The F<README> file for general stuff.
3432
3433The F<Artistic> and F<Copying> files for copyright information.
3434
3435=cut