Debian Codegraph @

upstream/mageia-cauldron/man1/perl5160delta.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "PERL5160DELTA 1"
61 .TH PERL5160DELTA 1 2025-06-24 "perl v5.42.0" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 perl5160delta \- what is new for perl v5.16.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes differences between the 5.14.0 release and
71 the 5.16.0 release.
72 .PP
73 If you are upgrading from an earlier release such as 5.12.0, first read
74 perl5140delta, which describes differences between 5.12.0 and
75 5.14.0.
76 .PP
77 Some bug fixes in this release have been backported to later
78 releases of 5.14.x. Those are indicated with the 5.14.x version in
79 parentheses.
80 .SH Notice
81 .IX Header "Notice"
82 With the release of Perl 5.16.0, the 5.12.x series of releases is now out of
83 its support period. There may be future 5.12.x releases, but only in the
84 event of a critical security issue. Users of Perl 5.12 or earlier should
85 consider upgrading to a more recent release of Perl.
86 .PP
87 This policy is described in greater detail in
88 perlpolicy.
89 .SH "Core Enhancements"
90 .IX Header "Core Enhancements"
91 .ie n .SS """use \fIVERSION\fP"""
92 .el .SS "\f(CWuse \fP\f(CIVERSION\fP\f(CW\fP"
93 .IX Subsection "use VERSION"
94 As of this release, version declarations like \f(CW\*(C`use v5.16\*(C'\fR now disable
95 all features before enabling the new feature bundle. This means that
96 the following holds true:
97 .PP
98 .Vb 4
99 \& use 5.016;
100 \& # only 5.16 features enabled here
101 \& use 5.014;
102 \& # only 5.14 features enabled here (not 5.16)
103 .Ve
104 .PP
105 \&\f(CW\*(C`use v5.12\*(C'\fR and higher continue to enable strict, but explicit \f(CW\*(C`use
106 strict\*(C'\fR and \f(CW\*(C`no strict\*(C'\fR now override the version declaration, even
107 when they come first:
108 .PP
109 .Vb 3
110 \& no strict;
111 \& use 5.012;
112 \& # no strict here
113 .Ve
114 .PP
115 There is a new ":default" feature bundle that represents the set of
116 features enabled before any version declaration or \f(CW\*(C`use feature\*(C'\fR has
117 been seen. Version declarations below 5.10 now enable the ":default"
118 feature set. This does not actually change the behavior of \f(CW\*(C`use
119 v5.8\*(C'\fR, because features added to the ":default" set are those that were
120 traditionally enabled by default, before they could be turned off.
121 .PP
122 \&\f(CW\*(C`no feature\*(C'\fR now resets to the default feature set. To disable all
123 features (which is likely to be a pretty special\-purpose request, since
124 it presumably won\*(Aqt match any named set of semantics) you can now
125 write \f(CW\*(C`no feature \*(Aq:all\*(Aq\*(C'\fR.
126 .PP
127 \&\f(CW$[\fR is now disabled under \f(CW\*(C`use v5.16\*(C'\fR. It is part of the default
128 feature set and can be turned on or off explicitly with \f(CWuse feature
129 \&\*(Aqarray_base\*(Aq\fR.
130 .ie n .SS """_\|_SUB_\|_"""
131 .el .SS \f(CW_\|_SUB_\|_\fP
132 .IX Subsection "__SUB__"
133 The new \f(CW\*(C`_\|_SUB_\|_\*(C'\fR token, available under the \f(CW\*(C`current_sub\*(C'\fR feature
134 (see feature) or \f(CW\*(C`use v5.16\*(C'\fR, returns a reference to the current
135 subroutine, making it easier to write recursive closures.
136 .SS "New and Improved Built\-ins"
137 .IX Subsection "New and Improved Built-ins"
138 \fIMore consistent \fR\f(CI\*(C`eval\*(C'\fR
139 .IX Subsection "More consistent eval"
140 .PP
141 The \f(CW\*(C`eval\*(C'\fR operator sometimes treats a string argument as a sequence of
142 characters and sometimes as a sequence of bytes, depending on the
143 internal encoding. The internal encoding is not supposed to make any
144 difference, but there is code that relies on this inconsistency.
145 .PP
146 The new \f(CW\*(C`unicode_eval\*(C'\fR and \f(CW\*(C`evalbytes\*(C'\fR features (enabled under \f(CWuse
147 5.16.0\fR) resolve this. The \f(CW\*(C`unicode_eval\*(C'\fR feature causes \f(CWeval
148 $string\fR to treat the string always as Unicode. The \f(CW\*(C`evalbytes\*(C'\fR
149 features provides a function, itself called \f(CW\*(C`evalbytes\*(C'\fR, which
150 evaluates its argument always as a string of bytes.
151 .PP
152 These features also fix oddities with source filters leaking to outer
153 dynamic scopes.
154 .PP
155 See feature for more detail.
156 .PP
157 \fR\f(CI\*(C`substr\*(C'\fR\fI lvalue revamp\fR
158 .IX Subsection "substr lvalue revamp"
159 .PP
160 When \f(CW\*(C`substr\*(C'\fR is called in lvalue or potential lvalue context with two
161 or three arguments, a special lvalue scalar is returned that modifies
162 the original string (the first argument) when assigned to.
163 .PP
164 Previously, the offsets (the second and third arguments) passed to
165 \&\f(CW\*(C`substr\*(C'\fR would be converted immediately to match the string, negative
166 offsets being translated to positive and offsets beyond the end of the
167 string being truncated.
168 .PP
169 Now, the offsets are recorded without modification in the special
170 lvalue scalar that is returned, and the original string is not even
171 looked at by \f(CW\*(C`substr\*(C'\fR itself, but only when the returned lvalue is
172 read or modified.
173 .PP
174 These changes result in an incompatible change:
175 .PP
176 If the original string changes length after the call to \f(CW\*(C`substr\*(C'\fR but
177 before assignment to its return value, negative offsets will remember
178 their position from the end of the string, affecting code like this:
179 .PP
180 .Vb 5
181 \& my $string = "string";
182 \& my $lvalue = \esubstr $string, \-4, 2;
183 \& print $$lvalue, "\en"; # prints "ri"
184 \& $string = "bailing twine";
185 \& print $$lvalue, "\en"; # prints "wi"; used to print "il"
186 .Ve
187 .PP
188 The same thing happens with an omitted third argument. The returned
189 lvalue will always extend to the end of the string, even if the string
190 becomes longer.
191 .PP
192 Since this change also allowed many bugs to be fixed (see
193 "The \f(CW\*(C`substr\*(C'\fR operator"), and since the behavior
194 of negative offsets has never been specified, the
195 change was deemed acceptable.
196 .PP
197 \fIReturn value of \fR\f(CI\*(C`tied\*(C'\fR
198 .IX Subsection "Return value of tied"
199 .PP
200 The value returned by \f(CW\*(C`tied\*(C'\fR on a tied variable is now the actual
201 scalar that holds the object to which the variable is tied. This
202 lets ties be weakened with \f(CW\*(C`Scalar::Util::weaken(tied
203 $tied_variable)\*(C'\fR.
204 .SS "Unicode Support"
205 .IX Subsection "Unicode Support"
206 \fISupports (almost) Unicode 6.1\fR
207 .IX Subsection "Supports (almost) Unicode 6.1"
208 .PP
209 Besides the addition of whole new scripts, and new characters in
210 existing scripts, this new version of Unicode, as always, makes some
211 changes to existing characters. One change that may trip up some
212 applications is that the General Category of two characters in the
213 Latin\-1 range, PILCROW SIGN and SECTION SIGN, has been changed from
214 Other_Symbol to Other_Punctuation. The same change has been made for
215 a character in each of Tibetan, Ethiopic, and Aegean.
216 The code points U+3248..U+324F (CIRCLED NUMBER TEN ON BLACK SQUARE
217 through CIRCLED NUMBER EIGHTY ON BLACK SQUARE) have had their General
218 Category changed from Other_Symbol to Other_Numeric. The Line Break
219 property has changes for Hebrew and Japanese; and because of
220 other changes in 6.1, the Perl regular expression construct \f(CW\*(C`\eX\*(C'\fR now
221 works differently for some characters in Thai and Lao.
222 .PP
223 New aliases (synonyms) have been defined for many property values;
224 these, along with the previously existing ones, are all cross\-indexed in
225 perluniprops.
226 .PP
227 The return value of \f(CWcharnames::viacode()\fR is affected by other
228 changes:
229 .PP
230 .Vb 10
231 \& Code point Old Name New Name
232 \& U+000A LINE FEED (LF) LINE FEED
233 \& U+000C FORM FEED (FF) FORM FEED
234 \& U+000D CARRIAGE RETURN (CR) CARRIAGE RETURN
235 \& U+0085 NEXT LINE (NEL) NEXT LINE
236 \& U+008E SINGLE\-SHIFT 2 SINGLE\-SHIFT\-2
237 \& U+008F SINGLE\-SHIFT 3 SINGLE\-SHIFT\-3
238 \& U+0091 PRIVATE USE 1 PRIVATE USE\-1
239 \& U+0092 PRIVATE USE 2 PRIVATE USE\-2
240 \& U+2118 SCRIPT CAPITAL P WEIERSTRASS ELLIPTIC FUNCTION
241 .Ve
242 .PP
243 Perl will accept any of these names as input, but
244 \&\f(CWcharnames::viacode()\fR now returns the new name of each pair. The
245 change for U+2118 is considered by Unicode to be a correction, that is
246 the original name was a mistake (but again, it will remain forever valid
247 to use it to refer to U+2118). But most of these changes are the
248 fallout of the mistake Unicode 6.0 made in naming a character used in
249 Japanese cell phones to be "BELL", which conflicts with the longstanding
250 industry use of (and Unicode\*(Aqs recommendation to use) that name
251 to mean the ASCII control character at U+0007. Therefore, that name
252 has been deprecated in Perl since v5.14, and any use of it will raise a
253 warning message (unless turned off). The name "ALERT" is now the
254 preferred name for this code point, with "BEL" an acceptable short
255 form. The name for the new cell phone character, at code point U+1F514,
256 remains undefined in this version of Perl (hence we don\*(Aqt
257 implement quite all of Unicode 6.1), but starting in v5.18, BELL will mean
258 this character, and not U+0007.
259 .PP
260 Unicode has taken steps to make sure that this sort of mistake does not
261 happen again. The Standard now includes all generally accepted
262 names and abbreviations for control characters, whereas previously it
263 didn\*(Aqt (though there were recommended names for most of them, which Perl
264 used). This means that most of those recommended names are now
265 officially in the Standard. Unicode did not recommend names for the
266 four code points listed above between U+008E and U+008F, and in
267 standardizing them Unicode subtly changed the names that Perl had
268 previously given them, by replacing the final blank in each name by a
269 hyphen. Unicode also officially accepts names that Perl had deprecated,
270 such as FILE SEPARATOR. Now the only deprecated name is BELL.
271 Finally, Perl now uses the new official names instead of the old
272 (now considered obsolete) names for the first four code points in the
273 list above (the ones which have the parentheses in them).
274 .PP
275 Now that the names have been placed in the Unicode standard, these kinds
276 of changes should not happen again, though corrections, such as to
277 U+2118, are still possible.
278 .PP
279 Unicode also added some name abbreviations, which Perl now accepts:
280 SP for SPACE;
281 TAB for CHARACTER TABULATION;
282 NEW LINE, END OF LINE, NL, and EOL for LINE FEED;
283 LOCKING\-SHIFT ONE for SHIFT OUT;
284 LOCKING\-SHIFT ZERO for SHIFT IN;
285 and ZWNBSP for ZERO WIDTH NO\-BREAK SPACE.
286 .PP
287 More details on this version of Unicode are provided in
288 <http://www.unicode.org/versions/Unicode6.1.0/>.
289 .PP
290 \fR\f(CI\*(C`use charnames\*(C'\fR\fI is no longer needed for \fR\f(CI\*(C`\eN{name}\*(C'\fR\fI\fR
291 .IX Subsection "use charnames is no longer needed for N{name}"
292 .PP
293 When \f(CW\*(C`\eN{\fR\f(CIname\fR\f(CW}\*(C'\fR is encountered, the \f(CW\*(C`charnames\*(C'\fR module is now
294 automatically loaded when needed as if the \f(CW\*(C`:full\*(C'\fR and \f(CW\*(C`:short\*(C'\fR
295 options had been specified. See charnames for more information.
296 .PP
297 \fR\f(CI\*(C`\eN{...}\*(C'\fR\fI can now have Unicode loose name matching\fR
298 .IX Subsection "N{...} can now have Unicode loose name matching"
299 .PP
300 This is described in the \f(CW\*(C`charnames\*(C'\fR item in
301 "Updated Modules and Pragmata" below.
302 .PP
303 \fIUnicode Symbol Names\fR
304 .IX Subsection "Unicode Symbol Names"
305 .PP
306 Perl now has proper support for Unicode in symbol names. It used to be
307 that \f(CW\*(C`*{$foo}\*(C'\fR would ignore the internal UTF8 flag and use the bytes of
308 the underlying representation to look up the symbol. That meant that
309 \&\f(CW\*(C`*{"\ex{100}"}\*(C'\fR and \f(CW\*(C`*{"\exc4\ex80"}\*(C'\fR would return the same thing. All
310 these parts of Perl have been fixed to account for Unicode:
311 .IP \(bu 4
312 Method names (including those passed to \f(CW\*(C`use overload\*(C'\fR)
313 .IP \(bu 4
314 Typeglob names (including names of variables, subroutines, and filehandles)
315 .IP \(bu 4
316 Package names
317 .IP \(bu 4
318 \&\f(CW\*(C`goto\*(C'\fR
319 .IP \(bu 4
320 Symbolic dereferencing
321 .IP \(bu 4
322 Second argument to \f(CWbless()\fR and \f(CWtie()\fR
323 .IP \(bu 4
324 Return value of \f(CWref()\fR
325 .IP \(bu 4
326 Subroutine prototypes
327 .IP \(bu 4
328 Attributes
329 .IP \(bu 4
330 Various warnings and error messages that mention variable names or values,
331 methods, etc.
332 .PP
333 In addition, a parsing bug has been fixed that prevented \f(CW\*(C`*{é}\*(C'\fR from
334 implicitly quoting the name, but instead interpreted it as \f(CW\*(C`*{+é}\*(C'\fR, which
335 would cause a strict violation.
336 .PP
337 \&\f(CW\*(C`*{"*a::b"}\*(C'\fR automatically strips off the * if it is followed by an ASCII
338 letter. That has been extended to all Unicode identifier characters.
339 .PP
340 One\-character non\-ASCII non\-punctuation variables (like \f(CW$é\fR) are now
341 subject to "Used only once" warnings. They used to be exempt, as they
342 were treated as punctuation variables.
343 .PP
344 Also, single\-character Unicode punctuation variables (like \f(CW$‰\fR) are now
345 supported [perl #69032].
346 .PP
347 \fIImproved ability to mix locales and Unicode, including UTF\-8 locales\fR
348 .IX Subsection "Improved ability to mix locales and Unicode, including UTF-8 locales"
349 .PP
350 An optional parameter has been added to \f(CW\*(C`use locale\*(C'\fR
351 .PP
352 .Vb 1
353 \& use locale \*(Aq:not_characters\*(Aq;
354 .Ve
355 .PP
356 which tells Perl to use all but the \f(CW\*(C`LC_CTYPE\*(C'\fR and \f(CW\*(C`LC_COLLATE\*(C'\fR
357 portions of the current locale. Instead, the character set is assumed
358 to be Unicode. This lets locales and Unicode be seamlessly mixed,
359 including the increasingly frequent UTF\-8 locales. When using this
360 hybrid form of locales, the \f(CW\*(C`:locale\*(C'\fR layer to the open pragma can
361 be used to interface with the file system, and there are CPAN modules
362 available for ARGV and environment variable conversions.
363 .PP
364 Full details are in perllocale.
365 .PP
366 \fINew function \fR\f(CI\*(C`fc\*(C'\fR\fI and corresponding escape sequence \fR\f(CI\*(C`\eF\*(C'\fR\fI for Unicode foldcase\fR
367 .IX Subsection "New function fc and corresponding escape sequence F for Unicode foldcase"
368 .PP
369 Unicode foldcase is an extension to lowercase that gives better results
370 when comparing two strings case\-insensitively. It has long been used
371 internally in regular expression \f(CW\*(C`/i\*(C'\fR matching. Now it is available
372 explicitly through the new \f(CW\*(C`fc\*(C'\fR function call (enabled by
373 \&\f(CW"use\ feature\ \*(Aqfc\*(Aq"\fR, or \f(CW\*(C`use v5.16\*(C'\fR, or explicitly callable via
374 \&\f(CW\*(C`CORE::fc\*(C'\fR) or through the new \f(CW\*(C`\eF\*(C'\fR sequence in double\-quotish
375 strings.
376 .PP
377 Full details are in "fc" in perlfunc.
378 .PP
379 \fIThe Unicode \fR\f(CI\*(C`Script_Extensions\*(C'\fR\fI property is now supported\fR
380 .IX Subsection "The Unicode Script_Extensions property is now supported"
381 .PP
382 New in Unicode 6.0, this is an improved \f(CW\*(C`Script\*(C'\fR property. Details
383 are in "Scripts" in perlunicode.
384 .SS "XS Changes"
385 .IX Subsection "XS Changes"
386 \fIImproved typemaps for Some Builtin Types\fR
387 .IX Subsection "Improved typemaps for Some Builtin Types"
388 .PP
389 Most XS authors will know there is a longstanding bug in the
390 OUTPUT typemap for T_AVREF (\f(CW\*(C`AV*\*(C'\fR), T_HVREF (\f(CW\*(C`HV*\*(C'\fR), T_CVREF (\f(CW\*(C`CV*\*(C'\fR),
391 and T_SVREF (\f(CW\*(C`SVREF\*(C'\fR or \f(CW\*(C`\e$foo\*(C'\fR) that requires manually decrementing
392 the reference count of the return value instead of the typemap taking
393 care of this. For backwards\-compatibility, this cannot be changed in the
394 default typemaps. But we now provide additional typemaps
395 \&\f(CW\*(C`T_AVREF_REFCOUNT_FIXED\*(C'\fR, etc. that do not exhibit this bug. Using
396 them in your extension is as simple as having one line in your
397 \&\f(CW\*(C`TYPEMAP\*(C'\fR section:
398 .PP
399 .Vb 1
400 \& HV* T_HVREF_REFCOUNT_FIXED
401 .Ve
402 .PP
403 \fR\f(CIis_utf8_char()\fR\fI\fR
404 .IX Subsection "is_utf8_char()"
405 .PP
406 The XS\-callable function \f(CWis_utf8_char()\fR, when presented with
407 malformed UTF\-8 input, can read up to 12 bytes beyond the end of the
408 string. This cannot be fixed without changing its API, and so its
409 use is now deprecated. Use \f(CWis_utf8_char_buf()\fR (described just below)
410 instead.
411 .PP
412 \fIAdded \fR\f(CIis_utf8_char_buf()\fR
413 .IX Subsection "Added is_utf8_char_buf()"
414 .PP
415 This function is designed to replace the deprecated "\fBis_utf8_char()\fR"
416 function. It includes an extra parameter to make sure it doesn\*(Aqt read
417 past the end of the input buffer.
418 .PP
419 \fIOther \fR\f(CIis_utf8_foo()\fR\fI functions, as well as \fR\f(CIutf8_to_foo()\fR\fI, etc.\fR
420 .IX Subsection "Other is_utf8_foo() functions, as well as utf8_to_foo(), etc."
421 .PP
422 Most other XS\-callable functions that take UTF\-8 encoded input
423 implicitly assume that the UTF\-8 is valid (not malformed) with respect to
424 buffer length. Do not do things such as change a character\*(Aqs case or
425 see if it is alphanumeric without first being sure that it is valid
426 UTF\-8. This can be safely done for a whole string by using one of the
427 functions \f(CWis_utf8_string()\fR, \f(CWis_utf8_string_loc()\fR, and
428 \&\f(CWis_utf8_string_loclen()\fR.
429 .PP
430 \fINew Pad API\fR
431 .IX Subsection "New Pad API"
432 .PP
433 Many new functions have been added to the API for manipulating lexical
434 pads. See "Pad Data Structures" in perlapi for more information.
435 .SS "Changes to Special Variables"
436 .IX Subsection "Changes to Special Variables"
437 \fR\f(CI$$\fR\fI can be assigned to\fR
438 .IX Subsection "$$ can be assigned to"
439 .PP
440 \&\f(CW$$\fR was made read\-only in Perl 5.8.0. But only sometimes: \f(CW\*(C`local $$\*(C'\fR
441 would make it writable again. Some CPAN modules were using \f(CW\*(C`local $$\*(C'\fR or
442 XS code to bypass the read\-only check, so there is no reason to keep \f(CW$$\fR
443 read\-only. (This change also allowed a bug to be fixed while maintaining
444 backward compatibility.)
445 .PP
446 \fR\f(CI$^X\fR\fI converted to an absolute path on FreeBSD, OS X and Solaris\fR
447 .IX Subsection "$^X converted to an absolute path on FreeBSD, OS X and Solaris"
448 .PP
449 \&\f(CW$^X\fR is now converted to an absolute path on OS X, FreeBSD (without
450 needing \fI/proc\fR mounted) and Solaris 10 and 11. This augments the
451 previous approach of using \fI/proc\fR on Linux, FreeBSD, and NetBSD
452 (in all cases, where mounted).
453 .PP
454 This makes relocatable perl installations more useful on these platforms.
455 (See "Relocatable \f(CW@INC\fR" in \fIINSTALL\fR)
456 .SS "Debugger Changes"
457 .IX Subsection "Debugger Changes"
458 \fIFeatures inside the debugger\fR
459 .IX Subsection "Features inside the debugger"
460 .PP
461 The current Perl\*(Aqs feature bundle is now enabled for commands entered
462 in the interactive debugger.
463 .PP
464 \fINew option for the debugger\*(Aqs \fR\f(BIt\fR\fI command\fR
465 .IX Subsection "New option for the debugger's t command"
466 .PP
467 The \fBt\fR command in the debugger, which toggles tracing mode, now
468 accepts a numeric argument that determines how many levels of subroutine
469 calls to trace.
470 .PP
471 \fR\f(CI\*(C`enable\*(C'\fR\fI and \fR\f(CI\*(C`disable\*(C'\fR\fI\fR
472 .IX Subsection "enable and disable"
473 .PP
474 The debugger now has \f(CW\*(C`disable\*(C'\fR and \f(CW\*(C`enable\*(C'\fR commands for disabling
475 existing breakpoints and re\-enabling them. See perldebug.
476 .PP
477 \fIBreakpoints with file names\fR
478 .IX Subsection "Breakpoints with file names"
479 .PP
480 The debugger\*(Aqs "b" command for setting breakpoints now lets a line
481 number be prefixed with a file name. See
482 "b [file]:[line] [condition]" in perldebug.
483 .ie n .SS "The ""CORE"" Namespace"
484 .el .SS "The \f(CWCORE\fP Namespace"
485 .IX Subsection "The CORE Namespace"
486 \fIThe \fR\f(CI\*(C`CORE::\*(C'\fR\fI prefix\fR
487 .IX Subsection "The CORE:: prefix"
488 .PP
489 The \f(CW\*(C`CORE::\*(C'\fR prefix can now be used on keywords enabled by
490 feature.pm, even outside the scope of \f(CW\*(C`use feature\*(C'\fR.
491 .PP
492 \fISubroutines in the \fR\f(CI\*(C`CORE\*(C'\fR\fI namespace\fR
493 .IX Subsection "Subroutines in the CORE namespace"
494 .PP
495 Many Perl keywords are now available as subroutines in the CORE namespace.
496 This lets them be aliased:
497 .PP
498 .Vb 2
499 \& BEGIN { *entangle = \e&CORE::tie }
500 \& entangle $variable, $package, @args;
501 .Ve
502 .PP
503 And for prototypes to be bypassed:
504 .PP
505 .Vb 5
506 \& sub mytie(\e[%$*@]$@) {
507 \& my ($ref, $pack, @args) = @_;
508 \& ... do something ...
509 \& goto &CORE::tie;
510 \& }
511 .Ve
512 .PP
513 Some of these cannot be called through references or via \f(CW&foo\fR syntax,
514 but must be called as barewords.
515 .PP
516 See CORE for details.
517 .SS "Other Changes"
518 .IX Subsection "Other Changes"
519 \fIAnonymous handles\fR
520 .IX Subsection "Anonymous handles"
521 .PP
522 Automatically generated file handles are now named _\|_ANONIO_\|_ when the
523 variable name cannot be determined, rather than \f(CW$_\fR\|_ANONIO_\|_.
524 .PP
525 \fIAutoloaded sort Subroutines\fR
526 .IX Subsection "Autoloaded sort Subroutines"
527 .PP
528 Custom sort subroutines can now be autoloaded [perl #30661]:
529 .PP
530 .Vb 2
531 \& sub AUTOLOAD { ... }
532 \& @sorted = sort foo @list; # uses AUTOLOAD
533 .Ve
534 .PP
535 \fR\f(CI\*(C`continue\*(C'\fR\fI no longer requires the "switch" feature\fR
536 .IX Subsection "continue no longer requires the ""switch"" feature"
537 .PP
538 The \f(CW\*(C`continue\*(C'\fR keyword has two meanings. It can introduce a \f(CW\*(C`continue\*(C'\fR
539 block after a loop, or it can exit the current \f(CW\*(C`when\*(C'\fR block. Up to now,
540 the latter meaning was valid only with the "switch" feature enabled, and
541 was a syntax error otherwise. Since the main purpose of feature.pm is to
542 avoid conflicts with user\-defined subroutines, there is no reason for
543 \&\f(CW\*(C`continue\*(C'\fR to depend on it.
544 .PP
545 \fIDTrace probes for interpreter phase change\fR
546 .IX Subsection "DTrace probes for interpreter phase change"
547 .PP
548 The \f(CW\*(C`phase\-change\*(C'\fR probes will fire when the interpreter\*(Aqs phase
549 changes, which tracks the \f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR variable. \f(CW\*(C`arg0\*(C'\fR is
550 the new phase name; \f(CW\*(C`arg1\*(C'\fR is the old one. This is useful
551 for limiting your instrumentation to one or more of: compile time,
552 run time, or destruct time.
553 .PP
554 \fR\f(CI\*(C`_\|_FILE_\|_()\*(C'\fR\fI Syntax\fR
555 .IX Subsection "__FILE__() Syntax"
556 .PP
557 The \f(CW\*(C`_\|_FILE_\|_\*(C'\fR, \f(CW\*(C`_\|_LINE_\|_\*(C'\fR and \f(CW\*(C`_\|_PACKAGE_\|_\*(C'\fR tokens can now be written
558 with an empty pair of parentheses after them. This makes them parse the
559 same way as \f(CW\*(C`time\*(C'\fR, \f(CW\*(C`fork\*(C'\fR and other built\-in functions.
560 .PP
561 \fIThe \fR\f(CI\*(C`\e$\*(C'\fR\fI prototype accepts any scalar lvalue\fR
562 .IX Subsection "The $ prototype accepts any scalar lvalue"
563 .PP
564 The \f(CW\*(C`\e$\*(C'\fR and \f(CW\*(C`\e[$]\*(C'\fR subroutine prototypes now accept any scalar lvalue
565 argument. Previously they accepted only scalars beginning with \f(CW\*(C`$\*(C'\fR and
566 hash and array elements. This change makes them consistent with the way
567 the built\-in \f(CW\*(C`read\*(C'\fR and \f(CW\*(C`recv\*(C'\fR functions (among others) parse their
568 arguments. This means that one can override the built\-in functions with
569 custom subroutines that parse their arguments the same way.
570 .PP
571 \fR\f(CI\*(C`_\*(C'\fR\fI in subroutine prototypes\fR
572 .IX Subsection "_ in subroutine prototypes"
573 .PP
574 The \f(CW\*(C`_\*(C'\fR character in subroutine prototypes is now allowed before \f(CW\*(C`@\*(C'\fR or
575 \&\f(CW\*(C`%\*(C'\fR.
576 .SH Security
577 .IX Header "Security"
578 .ie n .SS "Use is_utf8_char_buf() and not is_utf8_char()"
579 .el .SS "Use \f(CWis_utf8_char_buf()\fP and not \f(CWis_utf8_char()\fP"
580 .IX Subsection "Use is_utf8_char_buf() and not is_utf8_char()"
581 The latter function is now deprecated because its API is insufficient to
582 guarantee that it doesn\*(Aqt read (up to 12 bytes in the worst case) beyond
583 the end of its input string. See
584 \&\fBis_utf8_char_buf()\fR.
585 .SS "Malformed UTF\-8 input could cause attempts to read beyond the end of the buffer"
586 .IX Subsection "Malformed UTF-8 input could cause attempts to read beyond the end of the buffer"
587 Two new XS\-accessible functions, \f(CWutf8_to_uvchr_buf()\fR and
588 \&\f(CWutf8_to_uvuni_buf()\fR are now available to prevent this, and the Perl
589 core has been converted to use them.
590 See "Internal Changes".
591 .ie n .SS "File::Glob::bsd_glob() memory error with GLOB_ALTDIRFUNC (CVE\-2011\-2728)"
592 .el .SS "\f(CWFile::Glob::bsd_glob()\fP memory error with GLOB_ALTDIRFUNC (CVE\-2011\-2728)"
593 .IX Subsection "File::Glob::bsd_glob() memory error with GLOB_ALTDIRFUNC (CVE-2011-2728)"
594 Calling \f(CW\*(C`File::Glob::bsd_glob\*(C'\fR with the unsupported flag
595 GLOB_ALTDIRFUNC would cause an access violation / segfault. A Perl
596 program that accepts a flags value from an external source could expose
597 itself to denial of service or arbitrary code execution attacks. There
598 are no known exploits in the wild. The problem has been corrected by
599 explicitly disabling all unsupported flags and setting unused function
600 pointers to null. Bug reported by Clément Lecigne. (5.14.2)
601 .ie n .SS "Privileges are now set correctly when assigning to $("
602 .el .SS "Privileges are now set correctly when assigning to \f(CW$(\fP"
603 .IX Subsection "Privileges are now set correctly when assigning to $("
604 A hypothetical bug (probably unexploitable in practice) because the
605 incorrect setting of the effective group ID while setting \f(CW$(\fR has been
606 fixed. The bug would have affected only systems that have \f(CWsetresgid()\fR
607 but not \f(CWsetregid()\fR, but no such systems are known to exist.
608 .SH Deprecations
609 .IX Header "Deprecations"
610 .SS "Don\*(Aqt read the Unicode data base files in \fIlib/unicore\fP"
611 .IX Subsection "Don't read the Unicode data base files in lib/unicore"
612 It is now deprecated to directly read the Unicode data base files.
613 These are stored in the \fIlib/unicore\fR directory. Instead, you should
614 use the new functions in Unicode::UCD. These provide a stable API,
615 and give complete information.
616 .PP
617 Perl may at some point in the future change or remove these files. The
618 file which applications were most likely to have used is
619 \&\fIlib/unicore/ToDigit.pl\fR. "\fBprop_invmap()\fR" in Unicode::UCD can be used to
620 get at its data instead.
621 .ie n .SS "XS functions is_utf8_char(), utf8_to_uvchr() and utf8_to_uvuni()"
622 .el .SS "XS functions \f(CWis_utf8_char()\fP, \f(CWutf8_to_uvchr()\fP and \f(CWutf8_to_uvuni()\fP"
623 .IX Subsection "XS functions is_utf8_char(), utf8_to_uvchr() and utf8_to_uvuni()"
624 This function is deprecated because it could read beyond the end of the
625 input string. Use the new \fBis_utf8_char_buf()\fR,
626 \&\f(CWutf8_to_uvchr_buf()\fR and \f(CWutf8_to_uvuni_buf()\fR instead.
627 .SH "Future Deprecations"
628 .IX Header "Future Deprecations"
629 This section serves as a notice of features that are \fIlikely\fR to be
630 removed or deprecated in the next release of
631 perl (5.18.0). If your code depends on these features, you should
632 contact the Perl 5 Porters via the mailing
633 list <http://lists.perl.org/list/perl5-porters.html> or perlbug to
634 explain your use case and inform the deprecation process.
635 .SS "Core Modules"
636 .IX Subsection "Core Modules"
637 These modules may be marked as deprecated \fIfrom the core\fR. This only
638 means that they will no longer be installed by default with the core
639 distribution, but will remain available on the CPAN.
640 .IP \(bu 4
641 CPANPLUS
642 .IP \(bu 4
643 Filter::Simple
644 .IP \(bu 4
645 PerlIO::mmap
646 .IP \(bu 4
647 Pod::LaTeX
648 .IP \(bu 4
649 Pod::Parser
650 .IP \(bu 4
651 SelfLoader
652 .IP \(bu 4
653 Text::Soundex
654 .IP \(bu 4
655 Thread.pm
656 .SS "Platforms with no supporting programmers"
657 .IX Subsection "Platforms with no supporting programmers"
658 These platforms will probably have their
659 special build support removed during the
660 5.17.0 development series.
661 .IP \(bu 4
662 BeOS
663 .IP \(bu 4
664 djgpp
665 .IP \(bu 4
666 dgux
667 .IP \(bu 4
668 EPOC
669 .IP \(bu 4
670 MPE/iX
671 .IP \(bu 4
672 Rhapsody
673 .IP \(bu 4
674 UTS
675 .IP \(bu 4
676 VM/ESA
677 .SS "Other Future Deprecations"
678 .IX Subsection "Other Future Deprecations"
679 .IP \(bu 4
680 Swapping of $< and $>
681 .Sp
682 For more information about this future deprecation, see the relevant RT
683 ticket <https://github.com/Perl/perl5/issues/11547>.
684 .IP \(bu 4
685 sfio, stdio
686 .Sp
687 Perl supports being built without PerlIO proper, using a stdio or sfio
688 wrapper instead. A perl build like this will not support IO layers and
689 thus Unicode IO, making it rather handicapped.
690 .Sp
691 PerlIO supports a \f(CW\*(C`stdio\*(C'\fR layer if stdio use is desired, and similarly a
692 sfio layer could be produced.
693 .IP \(bu 4
694 Unescaped literal \f(CW"{"\fR in regular expressions.
695 .Sp
696 Starting with v5.20, it is planned to require a literal \f(CW"{"\fR to be
697 escaped, for example by preceding it with a backslash. In v5.18, a
698 deprecated warning message will be emitted for all such uses.
699 This affects only patterns that are to match a literal \f(CW"{"\fR. Other
700 uses of this character, such as part of a quantifier or sequence as in
701 those below, are completely unaffected:
702 .Sp
703 .Vb 3
704 \& /foo{3,5}/
705 \& /\ep{Alphabetic}/
706 \& /\eN{DIGIT ZERO}
707 .Ve
708 .Sp
709 Removing this will permit extensions to Perl\*(Aqs pattern syntax and better
710 error checking for existing syntax. See "Quantifiers" in perlre for an
711 example.
712 .IP \(bu 4
713 Revamping \f(CW"\eQ"\fR semantics in double\-quotish strings when combined with other escapes.
714 .Sp
715 There are several bugs and inconsistencies involving combinations
716 of \f(CW\*(C`\eQ\*(C'\fR and escapes like \f(CW\*(C`\ex\*(C'\fR, \f(CW\*(C`\eL\*(C'\fR, etc., within a \f(CW\*(C`\eQ...\eE\*(C'\fR pair.
717 These need to be fixed, and doing so will necessarily change current
718 behavior. The changes have not yet been settled.
719 .SH "Incompatible Changes"
720 .IX Header "Incompatible Changes"
721 .SS "Special blocks called in void context"
722 .IX Subsection "Special blocks called in void context"
723 Special blocks (\f(CW\*(C`BEGIN\*(C'\fR, \f(CW\*(C`CHECK\*(C'\fR, \f(CW\*(C`INIT\*(C'\fR, \f(CW\*(C`UNITCHECK\*(C'\fR, \f(CW\*(C`END\*(C'\fR) are now
724 called in void context. This avoids wasteful copying of the result of the
725 last statement [perl #108794].
726 .ie n .SS "The ""overloading"" pragma and regexp objects"
727 .el .SS "The \f(CWoverloading\fP pragma and regexp objects"
728 .IX Subsection "The overloading pragma and regexp objects"
729 With \f(CW\*(C`no overloading\*(C'\fR, regular expression objects returned by \f(CW\*(C`qr//\*(C'\fR are
730 now stringified as "Regexp=REGEXP(0xbe600d)" instead of the regular
731 expression itself [perl #108780].
732 .SS "Two XS typemap Entries removed"
733 .IX Subsection "Two XS typemap Entries removed"
734 Two presumably unused XS typemap entries have been removed from the
735 core typemap: T_DATAUNIT and T_CALLBACK. If you are, against all odds,
736 a user of these, please see the instructions on how to restore them
737 in perlxstypemap.
738 .SS "Unicode 6.1 has incompatibilities with Unicode 6.0"
739 .IX Subsection "Unicode 6.1 has incompatibilities with Unicode 6.0"
740 These are detailed in "Supports (almost) Unicode 6.1" above.
741 You can compile this version of Perl to use Unicode 6.0. See
742 "Hacking Perl to work on earlier Unicode versions (for very serious hackers only)" in perlunicode.
743 .SS "Borland compiler"
744 .IX Subsection "Borland compiler"
745 All support for the Borland compiler has been dropped. The code had not
746 worked for a long time anyway.
747 .SS "Certain deprecated Unicode properties are no longer supported by default"
748 .IX Subsection "Certain deprecated Unicode properties are no longer supported by default"
749 Perl should never have exposed certain Unicode properties that are used
750 by Unicode internally and not meant to be publicly available. Use of
751 these has generated deprecated warning messages since Perl 5.12. The
752 removed properties are Other_Alphabetic,
753 Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend,
754 Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and
755 Other_Uppercase.
756 .PP
757 Perl may be recompiled to include any or all of them; instructions are
758 given in
759 "Unicode character properties that are NOT accepted by Perl" in perluniprops.
760 .SS "Dereferencing IO thingies as typeglobs"
761 .IX Subsection "Dereferencing IO thingies as typeglobs"
762 The \f(CW\*(C`*{...}\*(C'\fR operator, when passed a reference to an IO thingy (as in
763 \&\f(CW\*(C`*{*STDIN{IO}}\*(C'\fR), creates a new typeglob containing just that IO object.
764 Previously, it would stringify as an empty string, but some operators would
765 treat it as undefined, producing an "uninitialized" warning.
766 Now it stringifies as _\|_ANONIO_\|_ [perl #96326].
767 .SS "User\-defined case\-changing operations"
768 .IX Subsection "User-defined case-changing operations"
769 This feature was deprecated in Perl 5.14, and has now been removed.
770 The CPAN module Unicode::Casing provides better functionality without
771 the drawbacks that this feature had, as are detailed in the 5.14
772 documentation:
773 <http://perldoc.perl.org/5.14.0/perlunicode.html#User\-Defined\-Case\-Mappings\-%28for\-serious\-hackers\-only%29>
774 .SS "XSUBs are now \*(Aqstatic\*(Aq"
775 .IX Subsection "XSUBs are now 'static'"
776 XSUB C functions are now \*(Aqstatic\*(Aq, that is, they are not visible from
777 outside the compilation unit. Users can use the new \f(CWXS_EXTERNAL(name)\fR
778 and \f(CWXS_INTERNAL(name)\fR macros to pick the desired linking behavior.
779 The ordinary \f(CWXS(name)\fR declaration for XSUBs will continue to declare
780 non\-\*(Aqstatic\*(Aq XSUBs for compatibility, but the XS compiler,
781 ExtUtils::ParseXS (\f(CW\*(C`xsubpp\*(C'\fR) will emit \*(Aqstatic\*(Aq XSUBs by default.
782 ExtUtils::ParseXS\*(Aqs behavior can be reconfigured from XS using the
783 \&\f(CW\*(C`EXPORT_XSUB_SYMBOLS\*(C'\fR keyword. See perlxs for details.
784 .SS "Weakening read\-only references"
785 .IX Subsection "Weakening read-only references"
786 Weakening read\-only references is no longer permitted. It should never
787 have worked anyway, and could sometimes result in crashes.
788 .SS "Tying scalars that hold typeglobs"
789 .IX Subsection "Tying scalars that hold typeglobs"
790 Attempting to tie a scalar after a typeglob was assigned to it would
791 instead tie the handle in the typeglob\*(Aqs IO slot. This meant that it was
792 impossible to tie the scalar itself. Similar problems affected \f(CW\*(C`tied\*(C'\fR and
793 \&\f(CW\*(C`untie\*(C'\fR: \f(CW\*(C`tied $scalar\*(C'\fR would return false on a tied scalar if the last
794 thing returned was a typeglob, and \f(CW\*(C`untie $scalar\*(C'\fR on such a tied scalar
795 would do nothing.
796 .PP
797 We fixed this problem before Perl 5.14.0, but it caused problems with some
798 CPAN modules, so we put in a deprecation cycle instead.
799 .PP
800 Now the deprecation has been removed and this bug has been fixed. So
801 \&\f(CW\*(C`tie $scalar\*(C'\fR will always tie the scalar, not the handle it holds. To tie
802 the handle, use \f(CW\*(C`tie *$scalar\*(C'\fR (with an explicit asterisk). The same
803 applies to \f(CW\*(C`tied *$scalar\*(C'\fR and \f(CW\*(C`untie *$scalar\*(C'\fR.
804 .ie n .SS "IPC::Open3 no longer provides xfork(), xclose_on_exec() and xpipe_anon()"
805 .el .SS "IPC::Open3 no longer provides \f(CWxfork()\fP, \f(CWxclose_on_exec()\fP and \f(CWxpipe_anon()\fP"
806 .IX Subsection "IPC::Open3 no longer provides xfork(), xclose_on_exec() and xpipe_anon()"
807 All three functions were private, undocumented, and unexported. They do
808 not appear to be used by any code on CPAN. Two have been inlined and one
809 deleted entirely.
810 .ie n .SS "$$ no longer caches PID"
811 .el .SS "\f(CW$$\fP no longer caches PID"
812 .IX Subsection "$$ no longer caches PID"
813 Previously, if one called \fBfork\fR\|(3) from C, Perl\*(Aqs
814 notion of \f(CW$$\fR could go out of sync with what \fBgetpid()\fR returns. By always
815 fetching the value of \f(CW$$\fR via \fBgetpid()\fR, this potential bug is eliminated.
816 Code that depends on the caching behavior will break. As described in
817 Core Enhancements,
818 \&\f(CW$$\fR is now writable, but it will be reset during a
819 fork.
820 .ie n .SS "$$ and getppid() no longer emulate POSIX semantics under LinuxThreads"
821 .el .SS "\f(CW$$\fP and \f(CWgetppid()\fP no longer emulate POSIX semantics under LinuxThreads"
822 .IX Subsection "$$ and getppid() no longer emulate POSIX semantics under LinuxThreads"
823 The POSIX emulation of \f(CW$$\fR and \f(CWgetppid()\fR under the obsolete
824 LinuxThreads implementation has been removed.
825 This only impacts users of Linux 2.4 and
826 users of Debian GNU/kFreeBSD up to and including 6.0, not the vast
827 majority of Linux installations that use NPTL threads.
828 .PP
829 This means that \f(CWgetppid()\fR, like \f(CW$$\fR, is now always guaranteed to
830 return the OS\*(Aqs idea of the current state of the process, not perl\*(Aqs
831 cached version of it.
832 .PP
833 See the documentation for $$ for details.
834 .ie n .SS "$<, $>, $( and $) are no longer cached"
835 .el .SS "\f(CW$<\fP, \f(CW$>\fP, \f(CW$(\fP and \f(CW$)\fP are no longer cached"
836 .IX Subsection "$<, $>, $( and $) are no longer cached"
837 Similarly to the changes to \f(CW$$\fR and \f(CWgetppid()\fR, the internal
838 caching of \f(CW$<\fR, \f(CW$>\fR, \f(CW$(\fR and \f(CW$)\fR has been removed.
839 .PP
840 When we cached these values our idea of what they were would drift out
841 of sync with reality if someone (e.g., someone embedding perl) called
842 \&\f(CW\*(C`sete?[ug]id()\*(C'\fR without updating \f(CW\*(C`PL_e?[ug]id\*(C'\fR. Having to deal with
843 this complexity wasn\*(Aqt worth it given how cheap the \f(CW\*(C`gete?[ug]id()\*(C'\fR
844 system call is.
845 .PP
846 This change will break a handful of CPAN modules that use the XS\-level
847 \&\f(CW\*(C`PL_uid\*(C'\fR, \f(CW\*(C`PL_gid\*(C'\fR, \f(CW\*(C`PL_euid\*(C'\fR or \f(CW\*(C`PL_egid\*(C'\fR variables.
848 .PP
849 The fix for those breakages is to use \f(CW\*(C`PerlProc_gete?[ug]id()\*(C'\fR to
850 retrieve them (e.g., \f(CWPerlProc_getuid()\fR), and not to assign to
851 \&\f(CW\*(C`PL_e?[ug]id\*(C'\fR if you change the UID/GID/EUID/EGID. There is no longer
852 any need to do so since perl will always retrieve the up\-to\-date
853 version of those values from the OS.
854 .ie n .SS "Which Non\-ASCII characters get quoted by ""quotemeta"" and ""\eQ"" has changed"
855 .el .SS "Which Non\-ASCII characters get quoted by \f(CWquotemeta\fP and \f(CW\eQ\fP has changed"
856 .IX Subsection "Which Non-ASCII characters get quoted by quotemeta and Q has changed"
857 This is unlikely to result in a real problem, as Perl does not attach
858 special meaning to any non\-ASCII character, so it is currently
859 irrelevant which are quoted or not. This change fixes bug [perl #77654] and
860 brings Perl\*(Aqs behavior more into line with Unicode\*(Aqs recommendations.
861 See "quotemeta" in perlfunc.
862 .SH "Performance Enhancements"
863 .IX Header "Performance Enhancements"
864 .IP \(bu 4
865 Improved performance for Unicode properties in regular expressions
866 .Sp
867 Matching a code point against a Unicode property is now done via a
868 binary search instead of linear. This means for example that the worst
869 case for a 1000 item property is 10 probes instead of 1000. This
870 inefficiency has been compensated for in the past by permanently storing
871 in a hash the results of a given probe plus the results for the adjacent
872 64 code points, under the theory that near\-by code points are likely to
873 be searched for. A separate hash was used for each mention of a Unicode
874 property in each regular expression. Thus, \f(CW\*(C`qr/\ep{foo}abc\ep{foo}/\*(C'\fR
875 would generate two hashes. Any probes in one instance would be unknown
876 to the other, and the hashes could expand separately to be quite large
877 if the regular expression were used on many different widely\-separated
878 code points.
879 Now, however, there is just one hash shared by all instances of a given
880 property. This means that if \f(CW\*(C`\ep{foo}\*(C'\fR is matched against "A" in one
881 regular expression in a thread, the result will be known immediately to
882 all regular expressions, and the relentless march of using up memory is
883 slowed considerably.
884 .IP \(bu 4
885 Version declarations with the \f(CW\*(C`use\*(C'\fR keyword (e.g., \f(CW\*(C`use 5.012\*(C'\fR) are now
886 faster, as they enable features without loading \fIfeature.pm\fR.
887 .IP \(bu 4
888 \&\f(CW\*(C`local $_\*(C'\fR is faster now, as it no longer iterates through magic that it
889 is not going to copy anyway.
890 .IP \(bu 4
891 Perl 5.12.0 sped up the destruction of objects whose classes define
892 empty \f(CW\*(C`DESTROY\*(C'\fR methods (to prevent autoloading), by simply not
893 calling such empty methods. This release takes this optimization a
894 step further, by not calling any \f(CW\*(C`DESTROY\*(C'\fR method that begins with a
895 \&\f(CW\*(C`return\*(C'\fR statement. This can be useful for destructors that are only
896 used for debugging:
897 .Sp
898 .Vb 2
899 \& use constant DEBUG => 1;
900 \& sub DESTROY { return unless DEBUG; ... }
901 .Ve
902 .Sp
903 Constant\-folding will reduce the first statement to \f(CW\*(C`return;\*(C'\fR if DEBUG
904 is set to 0, triggering this optimization.
905 .IP \(bu 4
906 Assigning to a variable that holds a typeglob or copy\-on\-write scalar
907 is now much faster. Previously the typeglob would be stringified or
908 the copy\-on\-write scalar would be copied before being clobbered.
909 .IP \(bu 4
910 Assignment to \f(CW\*(C`substr\*(C'\fR in void context is now more than twice its
911 previous speed. Instead of creating and returning a special lvalue
912 scalar that is then assigned to, \f(CW\*(C`substr\*(C'\fR modifies the original string
913 itself.
914 .IP \(bu 4
915 \&\f(CW\*(C`substr\*(C'\fR no longer calculates a value to return when called in void
916 context.
917 .IP \(bu 4
918 Due to changes in File::Glob, Perl\*(Aqs \f(CW\*(C`glob\*(C'\fR function and its \f(CW\*(C`<...>\*(C'\fR equivalent are now much faster. The splitting of the pattern
919 into words has been rewritten in C, resulting in speed\-ups of 20% for
920 some cases.
921 .Sp
922 This does not affect \f(CW\*(C`glob\*(C'\fR on VMS, as it does not use File::Glob.
923 .IP \(bu 4
924 The short\-circuiting operators \f(CW\*(C`&&\*(C'\fR, \f(CW\*(C`||\*(C'\fR, and \f(CW\*(C`//\*(C'\fR, when chained
925 (such as \f(CW\*(C`$a || $b || $c\*(C'\fR), are now considerably faster to short\-circuit,
926 due to reduced optree traversal.
927 .IP \(bu 4
928 The implementation of \f(CW\*(C`s///r\*(C'\fR makes one fewer copy of the scalar\*(Aqs value.
929 .IP \(bu 4
930 Recursive calls to lvalue subroutines in lvalue scalar context use less
931 memory.
932 .SH "Modules and Pragmata"
933 .IX Header "Modules and Pragmata"
934 .SS "Deprecated Modules"
935 .IX Subsection "Deprecated Modules"
936 .IP Version::Requirements 4
937 .IX Item "Version::Requirements"
938 Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements,
939 which is a drop\-in replacement. It will be deleted from perl.git blead
940 in v5.17.0.
941 .SS "New Modules and Pragmata"
942 .IX Subsection "New Modules and Pragmata"
943 .IP \(bu 4
944 arybase \-\- this new module implements the \f(CW$[\fR variable.
945 .IP \(bu 4
946 PerlIO::mmap 0.010 has been added to the Perl core.
947 .Sp
948 The \f(CW\*(C`mmap\*(C'\fR PerlIO layer is no longer implemented by perl itself, but has
949 been moved out into the new PerlIO::mmap module.
950 .SS "Updated Modules and Pragmata"
951 .IX Subsection "Updated Modules and Pragmata"
952 This is only an overview of selected module updates. For a complete list of
953 updates, run:
954 .PP
955 .Vb 1
956 \& $ corelist \-\-diff 5.14.0 5.16.0
957 .Ve
958 .PP
959 You can substitute your favorite version in place of 5.14.0, too.
960 .IP \(bu 4
961 Archive::Extract has been upgraded from version 0.48 to 0.58.
962 .Sp
963 Includes a fix for FreeBSD to only use \f(CW\*(C`unzip\*(C'\fR if it is located in
964 \&\f(CW\*(C`/usr/local/bin\*(C'\fR, as FreeBSD 9.0 will ship with a limited \f(CW\*(C`unzip\*(C'\fR in
965 \&\f(CW\*(C`/usr/bin\*(C'\fR.
966 .IP \(bu 4
967 Archive::Tar has been upgraded from version 1.76 to 1.82.
968 .Sp
969 Adjustments to handle files >8gb (>0777777777777 octal) and a feature
970 to return the MD5SUM of files in the archive.
971 .IP \(bu 4
972 base has been upgraded from version 2.16 to 2.18.
973 .Sp
974 \&\f(CW\*(C`base\*(C'\fR no longer sets a module\*(Aqs \f(CW$VERSION\fR to "\-1" when a module it
975 loads does not define a \f(CW$VERSION\fR. This change has been made because
976 "\-1" is not a valid version number under the new "lax" criteria used
977 internally by \f(CW\*(C`UNIVERSAL::VERSION\*(C'\fR. (See version for more on "lax"
978 version criteria.)
979 .Sp
980 \&\f(CW\*(C`base\*(C'\fR no longer internally skips loading modules it has already loaded
981 and instead relies on \f(CW\*(C`require\*(C'\fR to inspect \f(CW%INC\fR. This fixes a bug
982 when \f(CW\*(C`base\*(C'\fR is used with code that clear \f(CW%INC\fR to force a module to
983 be reloaded.
984 .IP \(bu 4
985 Carp has been upgraded from version 1.20 to 1.26.
986 .Sp
987 It now includes last read filehandle info and puts a dot after the file
988 and line number, just like errors from \f(CW\*(C`die\*(C'\fR [perl #106538].
989 .IP \(bu 4
990 charnames has been updated from version 1.18 to 1.30.
991 .Sp
992 \&\f(CW\*(C`charnames\*(C'\fR can now be invoked with a new option, \f(CW\*(C`:loose\*(C'\fR,
993 which is like the existing \f(CW\*(C`:full\*(C'\fR option, but enables Unicode loose
994 name matching. Details are in "LOOSE MATCHES" in charnames.
995 .IP \(bu 4
996 B::Deparse has been upgraded from version 1.03 to 1.14. This fixes
997 numerous deparsing bugs.
998 .IP \(bu 4
999 CGI has been upgraded from version 3.52 to 3.59.
1000 .Sp
1001 It uses the public and documented FCGI.pm API in CGI::Fast. CGI::Fast was
1002 using an FCGI API that was deprecated and removed from documentation
1003 more than ten years ago. Usage of this deprecated API with FCGI >=
1004 0.70 or FCGI <= 0.73 introduces a security issue.
1005 <https://rt.cpan.org/Public/Bug/Display.html?id=68380>
1006 <http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE\-2011\-2766>
1007 .Sp
1008 Things that may break your code:
1009 .Sp
1010 \&\f(CWurl()\fR was fixed to return \f(CW\*(C`PATH_INFO\*(C'\fR when it is explicitly requested
1011 with either the \f(CW\*(C`path=>1\*(C'\fR or \f(CW\*(C`path_info=>1\*(C'\fR flag.
1012 .Sp
1013 If your code is running under mod_rewrite (or compatible) and you are
1014 calling \f(CWself_url()\fR or you are calling \f(CWurl()\fR and passing
1015 \&\f(CW\*(C`path_info=>1\*(C'\fR, these methods will actually be returning
1016 \&\f(CW\*(C`PATH_INFO\*(C'\fR now, as you have explicitly requested or \f(CWself_url()\fR
1017 has requested on your behalf.
1018 .Sp
1019 The \f(CW\*(C`PATH_INFO\*(C'\fR has been omitted in such URLs since the issue was
1020 introduced in the 3.12 release in December, 2005.
1021 .Sp
1022 This bug is so old your application may have come to depend on it or
1023 workaround it. Check for application before upgrading to this release.
1024 .Sp
1025 Examples of affected method calls:
1026 .Sp
1027 .Vb 5
1028 \& $q\->url(\-absolute => 1, \-query => 1, \-path_info => 1);
1029 \& $q\->url(\-path=>1);
1030 \& $q\->url(\-full=>1,\-path=>1);
1031 \& $q\->url(\-rewrite=>1,\-path=>1);
1032 \& $q\->self_url();
1033 .Ve
1034 .Sp
1035 We no longer read from STDIN when the Content\-Length is not set,
1036 preventing requests with no Content\-Length from sometimes freezing.
1037 This is consistent with the CGI RFC 3875, and is also consistent with
1038 CGI::Simple. However, the old behavior may have been expected by some
1039 command\-line uses of CGI.pm.
1040 .Sp
1041 In addition, the DELETE HTTP verb is now supported.
1042 .IP \(bu 4
1043 Compress::Zlib has been upgraded from version 2.035 to 2.048.
1044 .Sp
1045 IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA
1046 (method 14). There is a fix for a CRC issue in IO::Compress::Unzip and
1047 it supports Streamed Stored context now. And fixed a Zip64 issue in
1048 IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.
1049 .IP \(bu 4
1050 Digest::SHA has been upgraded from version 5.61 to 5.71.
1051 .Sp
1052 Added BITS mode to the addfile method and shasum. This makes
1053 partial\-byte inputs possible via files/STDIN and lets shasum check
1054 all 8074 NIST Msg vectors, where previously special programming was
1055 required to do this.
1056 .IP \(bu 4
1057 Encode has been upgraded from version 2.42 to 2.44.
1058 .Sp
1059 Missing aliases added, a deep recursion error fixed and various
1060 documentation updates.
1061 .Sp
1062 Addressed \*(Aqdecode_xs n\-byte heap\-overflow\*(Aq security bug in Unicode.xs
1063 (CVE\-2011\-2939). (5.14.2)
1064 .IP \(bu 4
1065 ExtUtils::CBuilder updated from version 0.280203 to 0.280206.
1066 .Sp
1067 The new version appends CFLAGS and LDFLAGS to their Config.pm
1068 counterparts.
1069 .IP \(bu 4
1070 ExtUtils::ParseXS has been upgraded from version 2.2210 to 3.16.
1071 .Sp
1072 Much of ExtUtils::ParseXS, the module behind the XS compiler \f(CW\*(C`xsubpp\*(C'\fR,
1073 was rewritten and cleaned up. It has been made somewhat more extensible
1074 and now finally uses strictures.
1075 .Sp
1076 The typemap logic has been moved into a separate module,
1077 ExtUtils::Typemaps. See "New Modules and Pragmata", above.
1078 .Sp
1079 For a complete set of changes, please see the ExtUtils::ParseXS
1080 changelog, available on the CPAN.
1081 .IP \(bu 4
1082 File::Glob has been upgraded from version 1.12 to 1.17.
1083 .Sp
1084 On Windows, tilde (~) expansion now checks the \f(CW\*(C`USERPROFILE\*(C'\fR environment
1085 variable, after checking \f(CW\*(C`HOME\*(C'\fR.
1086 .Sp
1087 It has a new \f(CW\*(C`:bsd_glob\*(C'\fR export tag, intended to replace \f(CW\*(C`:glob\*(C'\fR. Like
1088 \&\f(CW\*(C`:glob\*(C'\fR it overrides \f(CW\*(C`glob\*(C'\fR with a function that does not split the glob
1089 pattern into words, but, unlike \f(CW\*(C`:glob\*(C'\fR, it iterates properly in scalar
1090 context, instead of returning the last file.
1091 .Sp
1092 There are other changes affecting Perl\*(Aqs own \f(CW\*(C`glob\*(C'\fR operator (which uses
1093 File::Glob internally, except on VMS). See "Performance Enhancements"
1094 and "Selected Bug Fixes".
1095 .IP \(bu 4
1096 FindBin updated from version 1.50 to 1.51.
1097 .Sp
1098 It no longer returns a wrong result if a script of the same name as the
1099 current one exists in the path and is executable.
1100 .IP \(bu 4
1101 HTTP::Tiny has been upgraded from version 0.012 to 0.017.
1102 .Sp
1103 Added support for using \f(CW$ENV{http_proxy}\fR to set the default proxy host.
1104 .Sp
1105 Adds additional shorthand methods for all common HTTP verbs,
1106 a \f(CWpost_form()\fR method for POST\-ing x\-www\-form\-urlencoded data and
1107 a \f(CWwww_form_urlencode()\fR utility method.
1108 .IP \(bu 4
1109 IO has been upgraded from version 1.25_04 to 1.25_06, and IO::Handle
1110 from version 1.31 to 1.33.
1111 .Sp
1112 Together, these upgrades fix a problem with IO::Handle\*(Aqs \f(CW\*(C`getline\*(C'\fR and
1113 \&\f(CW\*(C`getlines\*(C'\fR methods. When these methods are called on the special ARGV
1114 handle, the next file is automatically opened, as happens with the built\-in
1115 \&\f(CW\*(C`<>\*(C'\fR and \f(CW\*(C`readline\*(C'\fR functions. But, unlike the built\-ins, these
1116 methods were not respecting the caller\*(Aqs use of the open pragma and
1117 applying the appropriate I/O layers to the newly\-opened file
1118 [rt.cpan.org #66474].
1119 .IP \(bu 4
1120 IPC::Cmd has been upgraded from version 0.70 to 0.76.
1121 .Sp
1122 Capturing of command output (both \f(CW\*(C`STDOUT\*(C'\fR and \f(CW\*(C`STDERR\*(C'\fR) is now supported
1123 using IPC::Open3 on MSWin32 without requiring IPC::Run.
1124 .IP \(bu 4
1125 IPC::Open3 has been upgraded from version 1.09 to 1.12.
1126 .Sp
1127 Fixes a bug which prevented use of \f(CW\*(C`open3\*(C'\fR on Windows when \f(CW*STDIN\fR,
1128 \&\f(CW*STDOUT\fR or \f(CW*STDERR\fR had been localized.
1129 .Sp
1130 Fixes a bug which prevented duplicating numeric file descriptors on Windows.
1131 .Sp
1132 \&\f(CW\*(C`open3\*(C'\fR with "\-" for the program name works once more. This was broken in
1133 version 1.06 (and hence in Perl 5.14.0) [perl #95748].
1134 .IP \(bu 4
1135 Locale::Codes has been upgraded from version 3.16 to 3.21.
1136 .Sp
1137 Added Language Extension codes (langext) and Language Variation codes (langvar)
1138 as defined in the IANA language registry.
1139 .Sp
1140 Added language codes from ISO 639\-5
1141 .Sp
1142 Added language/script codes from the IANA language subtag registry
1143 .Sp
1144 Fixed an uninitialized value warning [rt.cpan.org #67438].
1145 .Sp
1146 Fixed the return value for the all_XXX_codes and all_XXX_names functions
1147 [rt.cpan.org #69100].
1148 .Sp
1149 Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to allow
1150 for cleaner future additions. The original four modules (Locale::Language,
1151 Locale::Currency, Locale::Country, Locale::Script) will continue to work, but
1152 all new sets of codes will be added in the Locale::Codes namespace.
1153 .Sp
1154 The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now
1155 support retired codes. All codesets may be specified by a constant or
1156 by their name now. Previously, they were specified only by a constant.
1157 .Sp
1158 The alias_code function exists for backward compatibility. It has been
1159 replaced by rename_country_code. The alias_code function will be
1160 removed some time after September, 2013.
1161 .Sp
1162 All work is now done in the central module (Locale::Codes). Previously,
1163 some was still done in the wrapper modules (Locale::Codes::*). Added
1164 Language Family codes (langfam) as defined in ISO 639\-5.
1165 .IP \(bu 4
1166 Math::BigFloat has been upgraded from version 1.993 to 1.997.
1167 .Sp
1168 The \f(CW\*(C`numify\*(C'\fR method has been corrected to return a normalized Perl number
1169 (the result of \f(CW\*(C`0 + $thing\*(C'\fR), instead of a string [rt.cpan.org #66732].
1170 .IP \(bu 4
1171 Math::BigInt has been upgraded from version 1.994 to 1.998.
1172 .Sp
1173 It provides a new \f(CW\*(C`bsgn\*(C'\fR method that complements the \f(CW\*(C`babs\*(C'\fR method.
1174 .Sp
1175 It fixes the internal \f(CW\*(C`objectify\*(C'\fR function\*(Aqs handling of "foreign objects"
1176 so they are converted to the appropriate class (Math::BigInt or
1177 Math::BigFloat).
1178 .IP \(bu 4
1179 Math::BigRat has been upgraded from version 0.2602 to 0.2603.
1180 .Sp
1181 \&\f(CWint()\fR on a Math::BigRat object containing \-1/2 now creates a
1182 Math::BigInt containing 0, rather than \-0. Math::BigInt does not even
1183 support negative zero, so the resulting object was actually malformed
1184 [perl #95530].
1185 .IP \(bu 4
1186 Math::Complex has been upgraded from version 1.56 to 1.59
1187 and Math::Trig from version 1.2 to 1.22.
1188 .Sp
1189 Fixes include: correct copy constructor usage; fix polarwise formatting with
1190 numeric format specifier; and more stable \f(CW\*(C`great_circle_direction\*(C'\fR algorithm.
1191 .IP \(bu 4
1192 Module::CoreList has been upgraded from version 2.51 to 2.66.
1193 .Sp
1194 The \f(CW\*(C`corelist\*(C'\fR utility now understands the \f(CW\*(C`\-r\*(C'\fR option for displaying
1195 Perl release dates and the \f(CW\*(C`\-\-diff\*(C'\fR option to print the set of modlib
1196 changes between two perl distributions.
1197 .IP \(bu 4
1198 Module::Metadata has been upgraded from version 1.000004 to 1.000009.
1199 .Sp
1200 Adds \f(CW\*(C`provides\*(C'\fR method to generate a CPAN META provides data structure
1201 correctly; use of \f(CW\*(C`package_versions_from_directory\*(C'\fR is discouraged.
1202 .IP \(bu 4
1203 ODBM_File has been upgraded from version 1.10 to 1.12.
1204 .Sp
1205 The XS code is now compiled with \f(CW\*(C`PERL_NO_GET_CONTEXT\*(C'\fR, which will aid
1206 performance under ithreads.
1207 .IP \(bu 4
1208 open has been upgraded from version 1.08 to 1.10.
1209 .Sp
1210 It no longer turns off layers on standard handles when invoked without the
1211 ":std" directive. Similarly, when invoked \fIwith\fR the ":std" directive, it
1212 now clears layers on STDERR before applying the new ones, and not just on
1213 STDIN and STDOUT [perl #92728].
1214 .IP \(bu 4
1215 overload has been upgraded from version 1.13 to 1.18.
1216 .Sp
1217 \&\f(CW\*(C`overload::Overloaded\*(C'\fR no longer calls \f(CW\*(C`can\*(C'\fR on the class, but uses
1218 another means to determine whether the object has overloading. It was
1219 never correct for it to call \f(CW\*(C`can\*(C'\fR, as overloading does not respect
1220 AUTOLOAD. So classes that autoload methods and implement \f(CW\*(C`can\*(C'\fR no longer
1221 have to account for overloading [perl #40333].
1222 .Sp
1223 A warning is now produced for invalid arguments. See "New Diagnostics".
1224 .IP \(bu 4
1225 PerlIO::scalar has been upgraded from version 0.11 to 0.14.
1226 .Sp
1227 (This is the module that implements \f(CW\*(C`open $fh, \*(Aq>\*(Aq, \e$scalar\*(C'\fR.)
1228 .Sp
1229 It fixes a problem with \f(CW\*(C`open my $fh, ">", \e$scalar\*(C'\fR not working if
1230 \&\f(CW$scalar\fR is a copy\-on\-write scalar. (5.14.2)
1231 .Sp
1232 It also fixes a hang that occurs with \f(CW\*(C`readline\*(C'\fR or \f(CW\*(C`<$fh>\*(C'\fR if a
1233 typeglob has been assigned to \f(CW$scalar\fR [perl #92258].
1234 .Sp
1235 It no longer assumes during \f(CW\*(C`seek\*(C'\fR that \f(CW$scalar\fR is a string internally.
1236 If it didn\*(Aqt crash, it was close to doing so [perl #92706]. Also, the
1237 internal print routine no longer assumes that the position set by \f(CW\*(C`seek\*(C'\fR
1238 is valid, but extends the string to that position, filling the intervening
1239 bytes (between the old length and the seek position) with nulls
1240 [perl #78980].
1241 .Sp
1242 Printing to an in\-memory handle now works if the \f(CW$scalar\fR holds a reference,
1243 stringifying the reference before modifying it. References used to be
1244 treated as empty strings.
1245 .Sp
1246 Printing to an in\-memory handle no longer crashes if the \f(CW$scalar\fR happens to
1247 hold a number internally, but no string buffer.
1248 .Sp
1249 Printing to an in\-memory handle no longer creates scalars that confuse
1250 the regular expression engine [perl #108398].
1251 .IP \(bu 4
1252 Pod::Functions has been upgraded from version 1.04 to 1.05.
1253 .Sp
1254 \&\fIFunctions.pm\fR is now generated at perl build time from annotations in
1255 \&\fIperlfunc.pod\fR. This will ensure that Pod::Functions and perlfunc
1256 remain in synchronisation.
1257 .IP \(bu 4
1258 Pod::Html has been upgraded from version 1.11 to 1.1502.
1259 .Sp
1260 This is an extensive rewrite of Pod::Html to use Pod::Simple under
1261 the hood. The output has changed significantly.
1262 .IP \(bu 4
1263 Pod::Perldoc has been upgraded from version 3.15_03 to 3.17.
1264 .Sp
1265 It corrects the search paths on VMS [perl #90640]. (5.14.1)
1266 .Sp
1267 The \fB\-v\fR option now fetches the right section for \f(CW$0\fR.
1268 .Sp
1269 This upgrade has numerous significant fixes. Consult its changelog on
1270 the CPAN for more information.
1271 .IP \(bu 4
1272 POSIX has been upgraded from version 1.24 to 1.30.
1273 .Sp
1274 POSIX no longer uses AutoLoader. Any code which was relying on this
1275 implementation detail was buggy, and may fail because of this change.
1276 The module\*(Aqs Perl code has been considerably simplified, roughly halving
1277 the number of lines, with no change in functionality. The XS code has
1278 been refactored to reduce the size of the shared object by about 12%,
1279 with no change in functionality. More POSIX functions now have tests.
1280 .Sp
1281 \&\f(CW\*(C`sigsuspend\*(C'\fR and \f(CW\*(C`pause\*(C'\fR now run signal handlers before returning, as the
1282 whole point of these two functions is to wait until a signal has
1283 arrived, and then return \fIafter\fR it has been triggered. Delayed, or
1284 "safe", signals were preventing that from happening, possibly resulting in
1285 race conditions [perl #107216].
1286 .Sp
1287 \&\f(CW\*(C`POSIX::sleep\*(C'\fR is now a direct call into the underlying OS \f(CW\*(C`sleep\*(C'\fR
1288 function, instead of being a Perl wrapper on \f(CW\*(C`CORE::sleep\*(C'\fR.
1289 \&\f(CW\*(C`POSIX::dup2\*(C'\fR now returns the correct value on Win32 (\fIi.e.\fR, the file
1290 descriptor). \f(CW\*(C`POSIX::SigSet\*(C'\fR \f(CW\*(C`sigsuspend\*(C'\fR and \f(CW\*(C`sigpending\*(C'\fR and
1291 \&\f(CW\*(C`POSIX::pause\*(C'\fR now dispatch safe signals immediately before returning to
1292 their caller.
1293 .Sp
1294 \&\f(CW\*(C`POSIX::Termios::setattr\*(C'\fR now defaults the third argument to \f(CW\*(C`TCSANOW\*(C'\fR,
1295 instead of 0. On most platforms \f(CW\*(C`TCSANOW\*(C'\fR is defined to be 0, but on some
1296 0 is not a valid parameter, which caused a call with defaults to fail.
1297 .IP \(bu 4
1298 Socket has been upgraded from version 1.94 to 2.001.
1299 .Sp
1300 It has new functions and constants for handling IPv6 sockets:
1301 .Sp
1302 .Vb 11
1303 \& pack_ipv6_mreq
1304 \& unpack_ipv6_mreq
1305 \& IPV6_ADD_MEMBERSHIP
1306 \& IPV6_DROP_MEMBERSHIP
1307 \& IPV6_MTU
1308 \& IPV6_MTU_DISCOVER
1309 \& IPV6_MULTICAST_HOPS
1310 \& IPV6_MULTICAST_IF
1311 \& IPV6_MULTICAST_LOOP
1312 \& IPV6_UNICAST_HOPS
1313 \& IPV6_V6ONLY
1314 .Ve
1315 .IP \(bu 4
1316 Storable has been upgraded from version 2.27 to 2.34.
1317 .Sp
1318 It no longer turns copy\-on\-write scalars into read\-only scalars when
1319 freezing and thawing.
1320 .IP \(bu 4
1321 Sys::Syslog has been upgraded from version 0.27 to 0.29.
1322 .Sp
1323 This upgrade closes many outstanding bugs.
1324 .IP \(bu 4
1325 Term::ANSIColor has been upgraded from version 3.00 to 3.01.
1326 .Sp
1327 Only interpret an initial array reference as a list of colors, not any initial
1328 reference, allowing the colored function to work properly on objects with
1329 stringification defined.
1330 .IP \(bu 4
1331 Term::ReadLine has been upgraded from version 1.07 to 1.09.
1332 .Sp
1333 Term::ReadLine now supports any event loop, including unpublished ones and
1334 simple IO::Select, loops without the need to rewrite existing code for
1335 any particular framework [perl #108470].
1336 .IP \(bu 4
1337 threads::shared has been upgraded from version 1.37 to 1.40.
1338 .Sp
1339 Destructors on shared objects used to be ignored sometimes if the objects
1340 were referenced only by shared data structures. This has been mostly
1341 fixed, but destructors may still be ignored if the objects still exist at
1342 global destruction time [perl #98204].
1343 .IP \(bu 4
1344 Unicode::Collate has been upgraded from version 0.73 to 0.89.
1345 .Sp
1346 Updated to CLDR 1.9.1
1347 .Sp
1348 Locales updated to CLDR 2.0: mk, mt, nb, nn, ro, ru, sk, sr, sv, uk,
1349 zh_\|_pinyin, zh_\|_stroke
1350 .Sp
1351 Newly supported locales: bn, fa, ml, mr, or, pa, sa, si, si_\|_dictionary,
1352 sr_Latn, sv_\|_reformed, ta, te, th, ur, wae.
1353 .Sp
1354 Tailored compatibility ideographs as well as unified ideographs for the
1355 locales: ja, ko, zh_\|_big5han, zh_\|_gb2312han, zh_\|_pinyin, zh_\|_stroke.
1356 .Sp
1357 Locale/*.pl files are now searched for in \f(CW@INC\fR.
1358 .IP \(bu 4
1359 Unicode::Normalize has been upgraded from version 1.10 to 1.14.
1360 .Sp
1361 Fixes for the removal of \fIunicore/CompositionExclusions.txt\fR from core.
1362 .IP \(bu 4
1363 Unicode::UCD has been upgraded from version 0.32 to 0.43.
1364 .Sp
1365 This adds four new functions: \f(CWprop_aliases()\fR and
1366 \&\f(CWprop_value_aliases()\fR, which are used to find all Unicode\-approved
1367 synonyms for property names, or to convert from one name to another;
1368 \&\f(CW\*(C`prop_invlist\*(C'\fR which returns all code points matching a given
1369 Unicode binary property; and \f(CW\*(C`prop_invmap\*(C'\fR which returns the complete
1370 specification of a given Unicode property.
1371 .IP \(bu 4
1372 Win32API::File has been upgraded from version 0.1101 to 0.1200.
1373 .Sp
1374 Added SetStdHandle and GetStdHandle functions
1375 .SS "Removed Modules and Pragmata"
1376 .IX Subsection "Removed Modules and Pragmata"
1377 As promised in Perl 5.14.0\*(Aqs release notes, the following modules have
1378 been removed from the core distribution, and if needed should be installed
1379 from CPAN instead.
1380 .IP \(bu 4
1381 Devel::DProf has been removed from the Perl core. Prior version was
1382 20110228.00.
1383 .IP \(bu 4
1384 Shell has been removed from the Perl core. Prior version was 0.72_01.
1385 .IP \(bu 4
1386 Several old perl4\-style libraries which have been deprecated with 5.14
1387 are now removed:
1388 .Sp
1389 .Vb 5
1390 \& abbrev.pl assert.pl bigfloat.pl bigint.pl bigrat.pl cacheout.pl
1391 \& complete.pl ctime.pl dotsh.pl exceptions.pl fastcwd.pl flush.pl
1392 \& getcwd.pl getopt.pl getopts.pl hostname.pl importenv.pl
1393 \& lib/find{,depth}.pl look.pl newgetopt.pl open2.pl open3.pl
1394 \& pwd.pl shellwords.pl stat.pl tainted.pl termcap.pl timelocal.pl
1395 .Ve
1396 .Sp
1397 They can be found on CPAN as Perl4::CoreLibs.
1398 .SH Documentation
1399 .IX Header "Documentation"
1400 .SS "New Documentation"
1401 .IX Subsection "New Documentation"
1402 \fIperldtrace\fR
1403 .IX Subsection "perldtrace"
1404 .PP
1405 perldtrace describes Perl\*(Aqs DTrace support, listing the provided probes
1406 and gives examples of their use.
1407 .PP
1408 \fIperlexperiment\fR
1409 .IX Subsection "perlexperiment"
1410 .PP
1411 This document is intended to provide a list of experimental features in
1412 Perl. It is still a work in progress.
1413 .PP
1414 \fIperlootut\fR
1415 .IX Subsection "perlootut"
1416 .PP
1417 This a new OO tutorial. It focuses on basic OO concepts, and then recommends
1418 that readers choose an OO framework from CPAN.
1419 .PP
1420 \fIperlxstypemap\fR
1421 .IX Subsection "perlxstypemap"
1422 .PP
1423 The new manual describes the XS typemapping mechanism in unprecedented
1424 detail and combines new documentation with information extracted from
1425 perlxs and the previously unofficial list of all core typemaps.
1426 .SS "Changes to Existing Documentation"
1427 .IX Subsection "Changes to Existing Documentation"
1428 \fIperlapi\fR
1429 .IX Subsection "perlapi"
1430 .IP \(bu 4
1431 The HV API has long accepted negative lengths to show that the key is
1432 in UTF8. This is now documented.
1433 .IP \(bu 4
1434 The \f(CWboolSV()\fR macro is now documented.
1435 .PP
1436 \fIperlfunc\fR
1437 .IX Subsection "perlfunc"
1438 .IP \(bu 4
1439 \&\f(CW\*(C`dbmopen\*(C'\fR treats a 0 mode as a special case, that prevents a nonexistent
1440 file from being created. This has been the case since Perl 5.000, but was
1441 never documented anywhere. Now the perlfunc entry mentions it
1442 [perl #90064].
1443 .IP \(bu 4
1444 As an accident of history, \f(CW\*(C`open $fh, \*(Aq<:\*(Aq, ...\*(C'\fR applies the default
1445 layers for the platform (\f(CW\*(C`:raw\*(C'\fR on Unix, \f(CW\*(C`:crlf\*(C'\fR on Windows), ignoring
1446 whatever is declared by open.pm. This seems such a useful feature
1447 it has been documented in perlfunc and open.
1448 .IP \(bu 4
1449 The entry for \f(CW\*(C`split\*(C'\fR has been rewritten. It is now far clearer than
1450 before.
1451 .PP
1452 \fIperlguts\fR
1453 .IX Subsection "perlguts"
1454 .IP \(bu 4
1455 A new section, Autoloading with XSUBs,
1456 has been added, which explains the two APIs for accessing the name of the
1457 autoloaded sub.
1458 .IP \(bu 4
1459 Some function descriptions in perlguts were confusing, as it was
1460 not clear whether they referred to the function above or below the
1461 description. This has been clarified [perl #91790].
1462 .PP
1463 \fIperlobj\fR
1464 .IX Subsection "perlobj"
1465 .IP \(bu 4
1466 This document has been rewritten from scratch, and its coverage of various OO
1467 concepts has been expanded.
1468 .PP
1469 \fIperlop\fR
1470 .IX Subsection "perlop"
1471 .IP \(bu 4
1472 Documentation of the smartmatch operator has been reworked and moved from
1473 perlsyn to perlop where it belongs.
1474 .Sp
1475 It has also been corrected for the case of \f(CW\*(C`undef\*(C'\fR on the left\-hand
1476 side. The list of different smart match behaviors had an item in the
1477 wrong place.
1478 .IP \(bu 4
1479 Documentation of the ellipsis statement (\f(CW\*(C`...\*(C'\fR) has been reworked and
1480 moved from perlop to perlsyn.
1481 .IP \(bu 4
1482 The explanation of bitwise operators has been expanded to explain how they
1483 work on Unicode strings (5.14.1).
1484 .IP \(bu 4
1485 More examples for \f(CW\*(C`m//g\*(C'\fR have been added (5.14.1).
1486 .IP \(bu 4
1487 The \f(CW\*(C`<<\eFOO\*(C'\fR here\-doc syntax has been documented (5.14.1).
1488 .PP
1489 \fIperlpragma\fR
1490 .IX Subsection "perlpragma"
1491 .IP \(bu 4
1492 There is now a standard convention for naming keys in the \f(CW\*(C`%^H\*(C'\fR,
1493 documented under Key naming.
1494 .PP
1495 \fI"Laundering and Detecting Tainted Data" in perlsec\fR
1496 .IX Subsection """Laundering and Detecting Tainted Data"" in perlsec"
1497 .IP \(bu 4
1498 The example function for checking for taintedness contained a subtle
1499 error. \f(CW$@\fR needs to be localized to prevent its changing this
1500 global\*(Aqs value outside the function. The preferred method to check for
1501 this remains "tainted" in Scalar::Util.
1502 .PP
1503 \fIperllol\fR
1504 .IX Subsection "perllol"
1505 .IP \(bu 4
1506 perllol has been expanded with examples using the new \f(CW\*(C`push $scalar\*(C'\fR
1507 syntax introduced in Perl 5.14.0 (5.14.1).
1508 .PP
1509 \fIperlmod\fR
1510 .IX Subsection "perlmod"
1511 .IP \(bu 4
1512 perlmod now states explicitly that some types of explicit symbol table
1513 manipulation are not supported. This codifies what was effectively already
1514 the case [perl #78074].
1515 .PP
1516 \fIperlpodstyle\fR
1517 .IX Subsection "perlpodstyle"
1518 .IP \(bu 4
1519 The tips on which formatting codes to use have been corrected and greatly
1520 expanded.
1521 .IP \(bu 4
1522 There are now a couple of example one\-liners for previewing POD files after
1523 they have been edited.
1524 .PP
1525 \fIperlre\fR
1526 .IX Subsection "perlre"
1527 .IP \(bu 4
1528 The \f(CW\*(C`(*COMMIT)\*(C'\fR directive is now listed in the right section
1529 (Verbs without an argument).
1530 .PP
1531 \fIperlrun\fR
1532 .IX Subsection "perlrun"
1533 .IP \(bu 4
1534 perlrun has undergone a significant clean\-up. Most notably, the
1535 \&\fB\-0x...\fR form of the \fB\-0\fR flag has been clarified, and the final section
1536 on environment variables has been corrected and expanded (5.14.1).
1537 .PP
1538 \fIperlsub\fR
1539 .IX Subsection "perlsub"
1540 .IP \(bu 4
1541 The ($;) prototype syntax, which has existed for rather a long time, is now
1542 documented in perlsub. It lets a unary function have the same
1543 precedence as a list operator.
1544 .PP
1545 \fIperltie\fR
1546 .IX Subsection "perltie"
1547 .IP \(bu 4
1548 The required syntax for tying handles has been documented.
1549 .PP
1550 \fIperlvar\fR
1551 .IX Subsection "perlvar"
1552 .IP \(bu 4
1553 The documentation for $! has been corrected and clarified.
1554 It used to state that $! could be \f(CW\*(C`undef\*(C'\fR, which is not the case. It was
1555 also unclear whether system calls set C\*(Aqs \f(CW\*(C`errno\*(C'\fR or Perl\*(Aqs \f(CW$!\fR
1556 [perl #91614].
1557 .IP \(bu 4
1558 Documentation for $$ has been amended with additional
1559 cautions regarding changing the process ID.
1560 .PP
1561 \fIOther Changes\fR
1562 .IX Subsection "Other Changes"
1563 .IP \(bu 4
1564 perlxs was extended with documentation on inline typemaps.
1565 .IP \(bu 4
1566 perlref has a new Circular References
1567 section explaining how circularities may not be freed and how to solve that
1568 with weak references.
1569 .IP \(bu 4
1570 Parts of perlapi were clarified, and Perl equivalents of some C
1571 functions have been added as an additional mode of exposition.
1572 .IP \(bu 4
1573 A few parts of perlre and perlrecharclass were clarified.
1574 .SS "Removed Documentation"
1575 .IX Subsection "Removed Documentation"
1576 \fIOld OO Documentation\fR
1577 .IX Subsection "Old OO Documentation"
1578 .PP
1579 The old OO tutorials, perltoot, perltooc, and perlboot, have been
1580 removed. The perlbot (bag of object tricks) document has been removed
1581 as well.
1582 .PP
1583 \fIDevelopment Deltas\fR
1584 .IX Subsection "Development Deltas"
1585 .PP
1586 The perldelta files for development releases are no longer packaged with
1587 perl. These can still be found in the perl source code repository.
1588 .SH Diagnostics
1589 .IX Header "Diagnostics"
1590 The following additions or changes have been made to diagnostic output,
1591 including warnings and fatal error messages. For the complete list of
1592 diagnostic messages, see perldiag.
1593 .SS "New Diagnostics"
1594 .IX Subsection "New Diagnostics"
1595 \fINew Errors\fR
1596 .IX Subsection "New Errors"
1597 .IP \(bu 4
1598 Cannot set tied \f(CW@DB::args\fR
1599 .Sp
1600 This error occurs when \f(CW\*(C`caller\*(C'\fR tries to set \f(CW@DB::args\fR but finds it
1601 tied. Before this error was added, it used to crash instead.
1602 .IP \(bu 4
1603 Cannot tie unreifiable array
1604 .Sp
1605 This error is part of a safety check that the \f(CW\*(C`tie\*(C'\fR operator does before
1606 tying a special array like \f(CW@_\fR. You should never see this message.
1607 .IP \(bu 4
1608 &CORE::%s cannot be called directly
1609 .Sp
1610 This occurs when a subroutine in the \f(CW\*(C`CORE::\*(C'\fR namespace is called
1611 with \f(CW&foo\fR syntax or through a reference. Some subroutines
1612 in this package cannot yet be called that way, but must be
1613 called as barewords. See "Subroutines in the \f(CW\*(C`CORE\*(C'\fR namespace", above.
1614 .IP \(bu 4
1615 Source filters apply only to byte streams
1616 .Sp
1617 This new error occurs when you try to activate a source filter (usually by
1618 loading a source filter module) within a string passed to \f(CW\*(C`eval\*(C'\fR under the
1619 \&\f(CW\*(C`unicode_eval\*(C'\fR feature.
1620 .PP
1621 \fINew Warnings\fR
1622 .IX Subsection "New Warnings"
1623 .IP \(bu 4
1624 defined(@array) is deprecated
1625 .Sp
1626 The long\-deprecated \f(CWdefined(@array)\fR now also warns for package variables.
1627 Previously it issued a warning for lexical variables only.
1628 .IP \(bu 4
1629 \&\fBlength()\fR used on \f(CW%s\fR
1630 .Sp
1631 This new warning occurs when \f(CW\*(C`length\*(C'\fR is used on an array or hash, instead
1632 of \f(CWscalar(@array)\fR or \f(CW\*(C`scalar(keys %hash)\*(C'\fR.
1633 .IP \(bu 4
1634 lvalue attribute \f(CW%s\fR already\-defined subroutine
1635 .Sp
1636 attributes.pm now emits this warning when the :lvalue
1637 attribute is applied to a Perl subroutine that has already been defined, as
1638 doing so can have unexpected side\-effects.
1639 .IP \(bu 4
1640 overload arg \*(Aq%s\*(Aq is invalid
1641 .Sp
1642 This warning, in the "overload" category, is produced when the overload
1643 pragma is given an argument it doesn\*(Aqt recognize, presumably a mistyped
1644 operator.
1645 .IP \(bu 4
1646 $[ used in \f(CW%s\fR (did you mean $] ?)
1647 .Sp
1648 This new warning exists to catch the mistaken use of \f(CW$[\fR in version
1649 checks. \f(CW$]\fR, not \f(CW$[\fR, contains the version number.
1650 .IP \(bu 4
1651 Useless assignment to a temporary
1652 .Sp
1653 Assigning to a temporary scalar returned
1654 from an lvalue subroutine now produces this
1655 warning [perl #31946].
1656 .IP \(bu 4
1657 Useless use of \eE
1658 .Sp
1659 \&\f(CW\*(C`\eE\*(C'\fR does nothing unless preceded by \f(CW\*(C`\eQ\*(C'\fR, \f(CW\*(C`\eL\*(C'\fR or \f(CW\*(C`\eU\*(C'\fR.
1660 .SS "Removed Errors"
1661 .IX Subsection "Removed Errors"
1662 .IP \(bu 4
1663 "sort is now a reserved word"
1664 .Sp
1665 This error used to occur when \f(CW\*(C`sort\*(C'\fR was called without arguments,
1666 followed by \f(CW\*(C`;\*(C'\fR or \f(CW\*(C`)\*(C'\fR. (E.g., \f(CW\*(C`sort;\*(C'\fR would die, but \f(CW\*(C`{sort}\*(C'\fR was
1667 OK.) This error message was added in Perl 3 to catch code like
1668 \&\f(CWclose(sort)\fR which would no longer work. More than two decades later,
1669 this message is no longer appropriate. Now \f(CW\*(C`sort\*(C'\fR without arguments is
1670 always allowed, and returns an empty list, as it did in those cases
1671 where it was already allowed [perl #90030].
1672 .SS "Changes to Existing Diagnostics"
1673 .IX Subsection "Changes to Existing Diagnostics"
1674 .IP \(bu 4
1675 The "Applying pattern match..." or similar warning produced when an
1676 array or hash is on the left\-hand side of the \f(CW\*(C`=~\*(C'\fR operator now
1677 mentions the name of the variable.
1678 .IP \(bu 4
1679 The "Attempt to free non\-existent shared string" has had the spelling
1680 of "non\-existent" corrected to "nonexistent". It was already listed
1681 with the correct spelling in perldiag.
1682 .IP \(bu 4
1683 The error messages for using \f(CW\*(C`default\*(C'\fR and \f(CW\*(C`when\*(C'\fR outside a
1684 topicalizer have been standardized to match the messages for \f(CW\*(C`continue\*(C'\fR
1685 and loop controls. They now read \*(AqCan\*(Aqt "default" outside a
1686 topicalizer\*(Aq and \*(AqCan\*(Aqt "when" outside a topicalizer\*(Aq. They both used
1687 to be \*(AqCan\*(Aqt use \fBwhen()\fR outside a topicalizer\*(Aq [perl #91514].
1688 .IP \(bu 4
1689 The message, "Code point 0x%X is not Unicode, no properties match it;
1690 all inverse properties do" has been changed to "Code point 0x%X is not
1691 Unicode, all \ep{} matches fail; all \eP{} matches succeed".
1692 .IP \(bu 4
1693 Redefinition warnings for constant subroutines used to be mandatory,
1694 even occurring under \f(CW\*(C`no warnings\*(C'\fR. Now they respect the warnings
1695 pragma.
1696 .IP \(bu 4
1697 The "glob failed" warning message is now suppressible via \f(CW\*(C`no warnings\*(C'\fR
1698 [perl #111656].
1699 .IP \(bu 4
1700 The Invalid version format
1701 error message now says "negative version number" within the parentheses,
1702 rather than "non\-numeric data", for negative numbers.
1703 .IP \(bu 4
1704 The two warnings
1705 Possible attempt to put comments in \fBqw()\fR list
1706 and
1707 Possible attempt to separate words with commas
1708 are no longer mutually exclusive: the same \f(CW\*(C`qw\*(C'\fR construct may produce
1709 both.
1710 .IP \(bu 4
1711 The uninitialized warning for \f(CW\*(C`y///r\*(C'\fR when \f(CW$_\fR is implicit and
1712 undefined now mentions the variable name, just like the non\-/r variation
1713 of the operator.
1714 .IP \(bu 4
1715 The \*(AqUse of "foo" without parentheses is ambiguous\*(Aq warning has been
1716 extended to apply also to user\-defined subroutines with a (;$)
1717 prototype, and not just to built\-in functions.
1718 .IP \(bu 4
1719 Warnings that mention the names of lexical (\f(CW\*(C`my\*(C'\fR) variables with
1720 Unicode characters in them now respect the presence or absence of the
1721 \&\f(CW\*(C`:utf8\*(C'\fR layer on the output handle, instead of outputting UTF8
1722 regardless. Also, the correct names are included in the strings passed
1723 to \f(CW$SIG{_\|_WARN_\|_}\fR handlers, rather than the raw UTF8 bytes.
1724 .SH "Utility Changes"
1725 .IX Header "Utility Changes"
1726 \fIh2ph\fR
1727 .IX Subsection "h2ph"
1728 .IP \(bu 4
1729 h2ph used to generate code of the form
1730 .Sp
1731 .Vb 3
1732 \& unless(defined(&FOO)) {
1733 \& sub FOO () {42;}
1734 \& }
1735 .Ve
1736 .Sp
1737 But the subroutine is a compile\-time declaration, and is hence unaffected
1738 by the condition. It has now been corrected to emit a string \f(CW\*(C`eval\*(C'\fR
1739 around the subroutine [perl #99368].
1740 .PP
1741 \fIsplain\fR
1742 .IX Subsection "splain"
1743 .IP \(bu 4
1744 \&\fIsplain\fR no longer emits backtraces with the first line number repeated.
1745 .Sp
1746 This:
1747 .Sp
1748 .Vb 6
1749 \& Uncaught exception from user code:
1750 \& Cannot fwiddle the fwuddle at \-e line 1.
1751 \& at \-e line 1
1752 \& main::baz() called at \-e line 1
1753 \& main::bar() called at \-e line 1
1754 \& main::foo() called at \-e line 1
1755 .Ve
1756 .Sp
1757 has become this:
1758 .Sp
1759 .Vb 5
1760 \& Uncaught exception from user code:
1761 \& Cannot fwiddle the fwuddle at \-e line 1.
1762 \& main::baz() called at \-e line 1
1763 \& main::bar() called at \-e line 1
1764 \& main::foo() called at \-e line 1
1765 .Ve
1766 .IP \(bu 4
1767 Some error messages consist of multiple lines that are listed as separate
1768 entries in perldiag. splain has been taught to find the separate
1769 entries in these cases, instead of simply failing to find the message.
1770 .PP
1771 \fIzipdetails\fR
1772 .IX Subsection "zipdetails"
1773 .IP \(bu 4
1774 This is a new utility, included as part of an
1775 IO::Compress::Base upgrade.
1776 .Sp
1777 zipdetails displays information about the internal record structure
1778 of the zip file. It is not concerned with displaying any details of
1779 the compressed data stored in the zip file.
1780 .SH "Configuration and Compilation"
1781 .IX Header "Configuration and Compilation"
1782 .IP \(bu 4
1783 \&\fIregexp.h\fR has been modified for compatibility with GCC\*(Aqs \fB\-Werror\fR
1784 option, as used by some projects that include perl\*(Aqs header files (5.14.1).
1785 .IP \(bu 4
1786 \&\f(CW\*(C`USE_LOCALE{,_COLLATE,_CTYPE,_NUMERIC}\*(C'\fR have been added the output of perl \-V
1787 as they have affect the behavior of the interpreter binary (albeit
1788 in only a small area).
1789 .IP \(bu 4
1790 The code and tests for IPC::Open2 have been moved from \fIext/IPC\-Open2\fR
1791 into \fIext/IPC\-Open3\fR, as \f(CWIPC::Open2::open2()\fR is implemented as a thin
1792 wrapper around \f(CWIPC::Open3::_open3()\fR, and hence is very tightly coupled to
1793 it.
1794 .IP \(bu 4
1795 The magic types and magic vtables are now generated from data in a new script
1796 \&\fIregen/mg_vtable.pl\fR, instead of being maintained by hand. As different
1797 EBCDIC variants can\*(Aqt agree on the code point for \*(Aq~\*(Aq, the character to code
1798 point conversion is done at build time by \fIgenerate_uudmap\fR to a new generated
1799 header \fImg_data.h\fR. \f(CW\*(C`PL_vtbl_bm\*(C'\fR and \f(CW\*(C`PL_vtbl_fm\*(C'\fR are now defined by the
1800 pre\-processor as \f(CW\*(C`PL_vtbl_regexp\*(C'\fR, instead of being distinct C variables.
1801 \&\f(CW\*(C`PL_vtbl_sig\*(C'\fR has been removed.
1802 .IP \(bu 4
1803 Building with \f(CW\*(C`\-DPERL_GLOBAL_STRUCT\*(C'\fR works again. This configuration is not
1804 generally used.
1805 .IP \(bu 4
1806 Perl configured with \fIMAD\fR now correctly frees \f(CW\*(C`MADPROP\*(C'\fR structures when
1807 OPs are freed. \f(CW\*(C`MADPROP\*(C'\fRs are now allocated with \f(CWPerlMemShared_malloc()\fR
1808 .IP \(bu 4
1809 \&\fImakedef.pl\fR has been refactored. This should have no noticeable effect on
1810 any of the platforms that use it as part of their build (AIX, VMS, Win32).
1811 .IP \(bu 4
1812 \&\f(CW\*(C`useperlio\*(C'\fR can no longer be disabled.
1813 .IP \(bu 4
1814 The file \fIglobal.sym\fR is no longer needed, and has been removed. It
1815 contained a list of all exported functions, one of the files generated by
1816 \&\fIregen/embed.pl\fR from data in \fIembed.fnc\fR and \fIregen/opcodes\fR. The code
1817 has been refactored so that the only user of \fIglobal.sym\fR, \fImakedef.pl\fR,
1818 now reads \fIembed.fnc\fR and \fIregen/opcodes\fR directly, removing the need to
1819 store the list of exported functions in an intermediate file.
1820 .Sp
1821 As \fIglobal.sym\fR was never installed, this change should not be visible
1822 outside the build process.
1823 .IP \(bu 4
1824 \&\fIpod/buildtoc\fR, used by the build process to build perltoc, has been
1825 refactored and simplified. It now contains only code to build perltoc;
1826 the code to regenerate Makefiles has been moved to \fIPorting/pod_rules.pl\fR.
1827 It\*(Aqs a bug if this change has any material effect on the build process.
1828 .IP \(bu 4
1829 \&\fIpod/roffitall\fR is now built by \fIpod/buildtoc\fR, instead of being
1830 shipped with the distribution. Its list of manpages is now generated
1831 (and therefore current). See also RT #103202 for an unresolved related
1832 issue.
1833 .IP \(bu 4
1834 The man page for \f(CW\*(C`XS::Typemap\*(C'\fR is no longer installed. \f(CW\*(C`XS::Typemap\*(C'\fR
1835 is a test module which is not installed, hence installing its
1836 documentation makes no sense.
1837 .IP \(bu 4
1838 The \-Dusesitecustomize and \-Duserelocatableinc options now work
1839 together properly.
1840 .SH "Platform Support"
1841 .IX Header "Platform Support"
1842 .SS "Platform\-Specific Notes"
1843 .IX Subsection "Platform-Specific Notes"
1844 \fICygwin\fR
1845 .IX Subsection "Cygwin"
1846 .IP \(bu 4
1847 Since version 1.7, Cygwin supports native UTF\-8 paths. If Perl is built
1848 under that environment, directory and filenames will be UTF\-8 encoded.
1849 .IP \(bu 4
1850 Cygwin does not initialize all original Win32 environment variables. See
1851 \&\fIREADME.cygwin\fR for a discussion of the newly\-added
1852 \&\f(CWCygwin::sync_winenv()\fR function [perl #110190] and for
1853 further links.
1854 .PP
1855 \fIHP\-UX\fR
1856 .IX Subsection "HP-UX"
1857 .IP \(bu 4
1858 HP\-UX PA\-RISC/64 now supports gcc\-4.x
1859 .Sp
1860 A fix to correct the socketsize now makes the test suite pass on HP\-UX
1861 PA\-RISC for 64bitall builds. (5.14.2)
1862 .PP
1863 \fIVMS\fR
1864 .IX Subsection "VMS"
1865 .IP \(bu 4
1866 Remove unnecessary includes, fix miscellaneous compiler warnings and
1867 close some unclosed comments on \fIvms/vms.c\fR.
1868 .IP \(bu 4
1869 Remove sockadapt layer from the VMS build.
1870 .IP \(bu 4
1871 Explicit support for VMS versions before v7.0 and DEC C versions
1872 before v6.0 has been removed.
1873 .IP \(bu 4
1874 Since Perl 5.10.1, the home\-grown \f(CW\*(C`stat\*(C'\fR wrapper has been unable to
1875 distinguish between a directory name containing an underscore and an
1876 otherwise\-identical filename containing a dot in the same position
1877 (e.g., t/test_pl as a directory and t/test.pl as a file). This problem
1878 has been corrected.
1879 .IP \(bu 4
1880 The build on VMS now permits names of the resulting symbols in C code for
1881 Perl longer than 31 characters. Symbols like
1882 \&\f(CW\*(C`Perl_\|_it_was_the_best_of_times_it_was_the_worst_of_times\*(C'\fR can now be
1883 created freely without causing the VMS linker to seize up.
1884 .PP
1885 \fIGNU/Hurd\fR
1886 .IX Subsection "GNU/Hurd"
1887 .IP \(bu 4
1888 Numerous build and test failures on GNU/Hurd have been resolved with hints
1889 for building DBM modules, detection of the library search path, and enabling
1890 of large file support.
1891 .PP
1892 \fIOpenVOS\fR
1893 .IX Subsection "OpenVOS"
1894 .IP \(bu 4
1895 Perl is now built with dynamic linking on OpenVOS, the minimum supported
1896 version of which is now Release 17.1.0.
1897 .PP
1898 \fISunOS\fR
1899 .IX Subsection "SunOS"
1900 .PP
1901 The CC workshop C++ compiler is now detected and used on systems that ship
1902 without cc.
1903 .SH "Internal Changes"
1904 .IX Header "Internal Changes"
1905 .IP \(bu 4
1906 The compiled representation of formats is now stored via the \f(CW\*(C`mg_ptr\*(C'\fR of
1907 their \f(CW\*(C`PERL_MAGIC_fm\*(C'\fR. Previously it was stored in the string buffer,
1908 beyond \f(CWSvLEN()\fR, the regular end of the string. \f(CWSvCOMPILED()\fR and
1909 \&\f(CW\*(C`SvCOMPILED_{on,off}()\*(C'\fR now exist solely for compatibility for XS code.
1910 The first is always 0, the other two now no\-ops. (5.14.1)
1911 .IP \(bu 4
1912 Some global variables have been marked \f(CW\*(C`const\*(C'\fR, members in the interpreter
1913 structure have been re\-ordered, and the opcodes have been re\-ordered. The
1914 op \f(CW\*(C`OP_AELEMFAST\*(C'\fR has been split into \f(CW\*(C`OP_AELEMFAST\*(C'\fR and \f(CW\*(C`OP_AELEMFAST_LEX\*(C'\fR.
1915 .IP \(bu 4
1916 When empting a hash of its elements (e.g., via undef(%h), or \f(CW%h\fR=()), HvARRAY
1917 field is no longer temporarily zeroed. Any destructors called on the freed
1918 elements see the remaining elements. Thus, \f(CW%h\fR=() becomes more like
1919 \&\f(CW\*(C`delete $h{$_} for keys %h\*(C'\fR.
1920 .IP \(bu 4
1921 Boyer\-Moore compiled scalars are now PVMGs, and the Boyer\-Moore tables are now
1922 stored via the mg_ptr of their \f(CW\*(C`PERL_MAGIC_bm\*(C'\fR.
1923 Previously they were PVGVs, with the tables stored in
1924 the string buffer, beyond \f(CWSvLEN()\fR. This eliminates
1925 the last place where the core stores data beyond \f(CWSvLEN()\fR.
1926 .IP \(bu 4
1927 Simplified logic in \f(CWPerl_sv_magic()\fR introduces a small change of
1928 behavior for error cases involving unknown magic types. Previously, if
1929 \&\f(CWPerl_sv_magic()\fR was passed a magic type unknown to it, it would
1930 .RS 4
1931 .IP 1. 4
1932 Croak "Modification of a read\-only value attempted" if read only
1933 .IP 2. 4
1934 Return without error if the SV happened to already have this magic
1935 .IP 3. 4
1936 otherwise croak "Don\*(Aqt know how to handle magic of type \e\e%o"
1937 .RE
1938 .RS 4
1939 .Sp
1940 Now it will always croak "Don\*(Aqt know how to handle magic of type \e\e%o", even
1941 on read\-only values, or SVs which already have the unknown magic type.
1942 .RE
1943 .IP \(bu 4
1944 The experimental \f(CW\*(C`fetch_cop_label\*(C'\fR function has been renamed to
1945 \&\f(CW\*(C`cop_fetch_label\*(C'\fR.
1946 .IP \(bu 4
1947 The \f(CW\*(C`cop_store_label\*(C'\fR function has been added to the API, but is
1948 experimental.
1949 .IP \(bu 4
1950 \&\fIembedvar.h\fR has been simplified, and one level of macro indirection for
1951 PL_* variables has been removed for the default (non\-multiplicity)
1952 configuration. PERLVAR*() macros now directly expand their arguments to
1953 tokens such as \f(CW\*(C`PL_defgv\*(C'\fR, instead of expanding to \f(CW\*(C`PL_Idefgv\*(C'\fR, with
1954 \&\fIembedvar.h\fR defining a macro to map \f(CW\*(C`PL_Idefgv\*(C'\fR to \f(CW\*(C`PL_defgv\*(C'\fR. XS code
1955 which has unwarranted chumminess with the implementation may need updating.
1956 .IP \(bu 4
1957 An API has been added to explicitly choose whether to export XSUB
1958 symbols. More detail can be found in the comments for commit e64345f8.
1959 .IP \(bu 4
1960 The \f(CW\*(C`is_gv_magical_sv\*(C'\fR function has been eliminated and merged with
1961 \&\f(CW\*(C`gv_fetchpvn_flags\*(C'\fR. It used to be called to determine whether a GV
1962 should be autovivified in rvalue context. Now it has been replaced with a
1963 new \f(CW\*(C`GV_ADDMG\*(C'\fR flag (not part of the API).
1964 .IP \(bu 4
1965 The returned code point from the function \f(CWutf8n_to_uvuni()\fR
1966 when the input is malformed UTF\-8, malformations are allowed, and
1967 \&\f(CW\*(C`utf8\*(C'\fR warnings are off is now the Unicode REPLACEMENT CHARACTER
1968 whenever the malformation is such that no well\-defined code point can be
1969 computed. Previously the returned value was essentially garbage. The
1970 only malformations that have well\-defined values are a zero\-length
1971 string (0 is the return), and overlong UTF\-8 sequences.
1972 .IP \(bu 4
1973 Padlists are now marked \f(CW\*(C`AvREAL\*(C'\fR; i.e., reference\-counted. They have
1974 always been reference\-counted, but were not marked real, because \fIpad.c\fR
1975 did its own clean\-up, instead of using the usual clean\-up code in \fIsv.c\fR.
1976 That caused problems in thread cloning, so now the \f(CW\*(C`AvREAL\*(C'\fR flag is on,
1977 but is turned off in \fIpad.c\fR right before the padlist is freed (after
1978 \&\fIpad.c\fR has done its custom freeing of the pads).
1979 .IP \(bu 4
1980 All C files that make up the Perl core have been converted to UTF\-8.
1981 .IP \(bu 4
1982 These new functions have been added as part of the work on Unicode symbols:
1983 .Sp
1984 .Vb 10
1985 \& HvNAMELEN
1986 \& HvNAMEUTF8
1987 \& HvENAMELEN
1988 \& HvENAMEUTF8
1989 \& gv_init_pv
1990 \& gv_init_pvn
1991 \& gv_init_pvsv
1992 \& gv_fetchmeth_pv
1993 \& gv_fetchmeth_pvn
1994 \& gv_fetchmeth_sv
1995 \& gv_fetchmeth_pv_autoload
1996 \& gv_fetchmeth_pvn_autoload
1997 \& gv_fetchmeth_sv_autoload
1998 \& gv_fetchmethod_pv_flags
1999 \& gv_fetchmethod_pvn_flags
2000 \& gv_fetchmethod_sv_flags
2001 \& gv_autoload_pv
2002 \& gv_autoload_pvn
2003 \& gv_autoload_sv
2004 \& newGVgen_flags
2005 \& sv_derived_from_pv
2006 \& sv_derived_from_pvn
2007 \& sv_derived_from_sv
2008 \& sv_does_pv
2009 \& sv_does_pvn
2010 \& sv_does_sv
2011 \& whichsig_pv
2012 \& whichsig_pvn
2013 \& whichsig_sv
2014 \& newCONSTSUB_flags
2015 .Ve
2016 .Sp
2017 The gv_fetchmethod_*_flags functions, like gv_fetchmethod_flags, are
2018 experimental and may change in a future release.
2019 .IP \(bu 4
2020 The following functions were added. These are \fInot\fR part of the API:
2021 .Sp
2022 .Vb 9
2023 \& GvNAMEUTF8
2024 \& GvENAMELEN
2025 \& GvENAME_HEK
2026 \& CopSTASH_flags
2027 \& CopSTASH_flags_set
2028 \& PmopSTASH_flags
2029 \& PmopSTASH_flags_set
2030 \& sv_sethek
2031 \& HEKfARG
2032 .Ve
2033 .Sp
2034 There is also a \f(CW\*(C`HEKf\*(C'\fR macro corresponding to \f(CW\*(C`SVf\*(C'\fR, for
2035 interpolating HEKs in formatted strings.
2036 .IP \(bu 4
2037 \&\f(CW\*(C`sv_catpvn_flags\*(C'\fR takes a couple of new internal\-only flags,
2038 \&\f(CW\*(C`SV_CATBYTES\*(C'\fR and \f(CW\*(C`SV_CATUTF8\*(C'\fR, which tell it whether the char array to
2039 be concatenated is UTF8. This allows for more efficient concatenation than
2040 creating temporary SVs to pass to \f(CW\*(C`sv_catsv\*(C'\fR.
2041 .IP \(bu 4
2042 For XS AUTOLOAD subs, \f(CW$AUTOLOAD\fR is set once more, as it was in 5.6.0. This
2043 is in addition to setting \f(CWSvPVX(cv)\fR, for compatibility with 5.8 to 5.14.
2044 See "Autoloading with XSUBs" in perlguts.
2045 .IP \(bu 4
2046 Perl now checks whether the array (the linearized isa) returned by a MRO
2047 plugin begins with the name of the class itself, for which the array was
2048 created, instead of assuming that it does. This prevents the first element
2049 from being skipped during method lookup. It also means that
2050 \&\f(CW\*(C`mro::get_linear_isa\*(C'\fR may return an array with one more element than the
2051 MRO plugin provided [perl #94306].
2052 .IP \(bu 4
2053 \&\f(CW\*(C`PL_curstash\*(C'\fR is now reference\-counted.
2054 .IP \(bu 4
2055 There are now feature bundle hints in \f(CW\*(C`PL_hints\*(C'\fR (\f(CW$^H\fR) that version
2056 declarations use, to avoid having to load \fIfeature.pm\fR. One setting of
2057 the hint bits indicates a "custom" feature bundle, which means that the
2058 entries in \f(CW\*(C`%^H\*(C'\fR still apply. \fIfeature.pm\fR uses that.
2059 .Sp
2060 The \f(CW\*(C`HINT_FEATURE_MASK\*(C'\fR macro is defined in \fIperl.h\fR along with other
2061 hints. Other macros for setting and testing features and bundles are in
2062 the new \fIfeature.h\fR. \f(CW\*(C`FEATURE_IS_ENABLED\*(C'\fR (which has moved to
2063 \&\fIfeature.h\fR) is no longer used throughout the codebase, but more specific
2064 macros, e.g., \f(CW\*(C`FEATURE_SAY_IS_ENABLED\*(C'\fR, that are defined in \fIfeature.h\fR.
2065 .IP \(bu 4
2066 \&\fIlib/feature.pm\fR is now a generated file, created by the new
2067 \&\fIregen/feature.pl\fR script, which also generates \fIfeature.h\fR.
2068 .IP \(bu 4
2069 Tied arrays are now always \f(CW\*(C`AvREAL\*(C'\fR. If \f(CW@_\fR or \f(CW\*(C`DB::args\*(C'\fR is tied, it
2070 is reified first, to make sure this is always the case.
2071 .IP \(bu 4
2072 Two new functions \f(CWutf8_to_uvchr_buf()\fR and \f(CWutf8_to_uvuni_buf()\fR have
2073 been added. These are the same as \f(CW\*(C`utf8_to_uvchr\*(C'\fR and
2074 \&\f(CW\*(C`utf8_to_uvuni\*(C'\fR (which are now deprecated), but take an extra parameter
2075 that is used to guard against reading beyond the end of the input
2076 string.
2077 See "utf8_to_uvchr_buf" in perlapi and "utf8_to_uvuni_buf" in perlapi.
2078 .IP \(bu 4
2079 The regular expression engine now does TRIE case insensitive matches
2080 under Unicode. This may change the output of \f(CW\*(C`use re \*(Aqdebug\*(Aq;\*(C'\fR,
2081 and will speed up various things.
2082 .IP \(bu 4
2083 There is a new \f(CWwrap_op_checker()\fR function, which provides a thread\-safe
2084 alternative to writing to \f(CW\*(C`PL_check\*(C'\fR directly.
2085 .SH "Selected Bug Fixes"
2086 .IX Header "Selected Bug Fixes"
2087 .SS "Array and hash"
2088 .IX Subsection "Array and hash"
2089 .IP \(bu 4
2090 A bug has been fixed that would cause a "Use of freed value in iteration"
2091 error if the next two hash elements that would be iterated over are
2092 deleted [perl #85026]. (5.14.1)
2093 .IP \(bu 4
2094 Deleting the current hash iterator (the hash element that would be returned
2095 by the next call to \f(CW\*(C`each\*(C'\fR) in void context used not to free it
2096 [perl #85026].
2097 .IP \(bu 4
2098 Deletion of methods via \f(CW\*(C`delete $Class::{method}\*(C'\fR syntax used to update
2099 method caches if called in void context, but not scalar or list context.
2100 .IP \(bu 4
2101 When hash elements are deleted in void context, the internal hash entry is
2102 now freed before the value is freed, to prevent destructors called by that
2103 latter freeing from seeing the hash in an inconsistent state. It was
2104 possible to cause double\-frees if the destructor freed the hash itself
2105 [perl #100340].
2106 .IP \(bu 4
2107 A \f(CW\*(C`keys\*(C'\fR optimization in Perl 5.12.0 to make it faster on empty hashes
2108 caused \f(CW\*(C`each\*(C'\fR not to reset the iterator if called after the last element
2109 was deleted.
2110 .IP \(bu 4
2111 Freeing deeply nested hashes no longer crashes [perl #44225].
2112 .IP \(bu 4
2113 It is possible from XS code to create hashes with elements that have no
2114 values. The hash element and slice operators used to crash
2115 when handling these in lvalue context. They now
2116 produce a "Modification of non\-creatable hash value attempted" error
2117 message.
2118 .IP \(bu 4
2119 If list assignment to a hash or array triggered destructors that freed the
2120 hash or array itself, a crash would ensue. This is no longer the case
2121 [perl #107440].
2122 .IP \(bu 4
2123 It used to be possible to free the typeglob of a localized array or hash
2124 (e.g., \f(CW\*(C`local @{"x"}; delete $::{x}\*(C'\fR), resulting in a crash on scope exit.
2125 .IP \(bu 4
2126 Some core bugs affecting Hash::Util have been fixed: locking a hash
2127 element that is a glob copy no longer causes the next assignment to it to
2128 corrupt the glob (5.14.2), and unlocking a hash element that holds a
2129 copy\-on\-write scalar no longer causes modifications to that scalar to
2130 modify other scalars that were sharing the same string buffer.
2131 .SS "C API fixes"
2132 .IX Subsection "C API fixes"
2133 .IP \(bu 4
2134 The \f(CW\*(C`newHVhv\*(C'\fR XS function now works on tied hashes, instead of crashing or
2135 returning an empty hash.
2136 .IP \(bu 4
2137 The \f(CW\*(C`SvIsCOW\*(C'\fR C macro now returns false for read\-only copies of typeglobs,
2138 such as those created by:
2139 .Sp
2140 .Vb 2
2141 \& $hash{elem} = *foo;
2142 \& Hash::Util::lock_value %hash, \*(Aqelem\*(Aq;
2143 .Ve
2144 .Sp
2145 It used to return true.
2146 .IP \(bu 4
2147 The \f(CW\*(C`SvPVutf8\*(C'\fR C function no longer tries to modify its argument,
2148 resulting in errors [perl #108994].
2149 .IP \(bu 4
2150 \&\f(CW\*(C`SvPVutf8\*(C'\fR now works properly with magical variables.
2151 .IP \(bu 4
2152 \&\f(CW\*(C`SvPVbyte\*(C'\fR now works properly non\-PVs.
2153 .IP \(bu 4
2154 When presented with malformed UTF\-8 input, the XS\-callable functions
2155 \&\f(CWis_utf8_string()\fR, \f(CWis_utf8_string_loc()\fR, and
2156 \&\f(CWis_utf8_string_loclen()\fR could read beyond the end of the input
2157 string by up to 12 bytes. This no longer happens. [perl #32080].
2158 However, currently, \f(CWis_utf8_char()\fR still has this defect, see
2159 "\fBis_utf8_char()\fR" above.
2160 .IP \(bu 4
2161 The C\-level \f(CW\*(C`pregcomp\*(C'\fR function could become confused about whether the
2162 pattern was in UTF8 if the pattern was an overloaded, tied, or otherwise
2163 magical scalar [perl #101940].
2164 .SS "Compile\-time hints"
2165 .IX Subsection "Compile-time hints"
2166 .IP \(bu 4
2167 Tying \f(CW\*(C`%^H\*(C'\fR no longer causes perl to crash or ignore the contents of
2168 \&\f(CW\*(C`%^H\*(C'\fR when entering a compilation scope [perl #106282].
2169 .IP \(bu 4
2170 \&\f(CW\*(C`eval $string\*(C'\fR and \f(CW\*(C`require\*(C'\fR used not to
2171 localize \f(CW\*(C`%^H\*(C'\fR during compilation if it
2172 was empty at the time the \f(CW\*(C`eval\*(C'\fR call itself was compiled. This could
2173 lead to scary side effects, like \f(CW\*(C`use re "/m"\*(C'\fR enabling other flags that
2174 the surrounding code was trying to enable for its caller [perl #68750].
2175 .IP \(bu 4
2176 \&\f(CW\*(C`eval $string\*(C'\fR and \f(CW\*(C`require\*(C'\fR no longer localize hints (\f(CW$^H\fR and \f(CW\*(C`%^H\*(C'\fR)
2177 at run time, but only during compilation of the \f(CW$string\fR or required file.
2178 This makes \f(CW\*(C`BEGIN { $^H{foo}=7 }\*(C'\fR equivalent to
2179 \&\f(CW\*(C`BEGIN { eval \*(Aq$^H{foo}=7\*(Aq }\*(C'\fR [perl #70151].
2180 .IP \(bu 4
2181 Creating a BEGIN block from XS code (via \f(CW\*(C`newXS\*(C'\fR or \f(CW\*(C`newATTRSUB\*(C'\fR) would,
2182 on completion, make the hints of the current compiling code the current
2183 hints. This could cause warnings to occur in a non\-warning scope.
2184 .SS "Copy\-on\-write scalars"
2185 .IX Subsection "Copy-on-write scalars"
2186 Copy\-on\-write or shared hash key scalars
2187 were introduced in 5.8.0, but most Perl code
2188 did not encounter them (they were used mostly internally). Perl
2189 5.10.0 extended them, such that assigning \f(CW\*(C`_\|_PACKAGE_\|_\*(C'\fR or a
2190 hash key to a scalar would make it copy\-on\-write. Several parts
2191 of Perl were not updated to account for them, but have now been fixed.
2192 .IP \(bu 4
2193 \&\f(CW\*(C`utf8::decode\*(C'\fR had a nasty bug that would modify copy\-on\-write scalars\*(Aq
2194 string buffers in place (i.e., skipping the copy). This could result in
2195 hashes having two elements with the same key [perl #91834]. (5.14.2)
2196 .IP \(bu 4
2197 Lvalue subroutines were not allowing COW scalars to be returned. This was
2198 fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context
2199 was not fixed until this release.
2200 .IP \(bu 4
2201 Elements of restricted hashes (see the fields pragma) containing
2202 copy\-on\-write values couldn\*(Aqt be deleted, nor could such hashes be cleared
2203 (\f(CW\*(C`%hash = ()\*(C'\fR). (5.14.2)
2204 .IP \(bu 4
2205 Localizing a tied variable used to make it read\-only if it contained a
2206 copy\-on\-write string. (5.14.2)
2207 .IP \(bu 4
2208 Assigning a copy\-on\-write string to a stash
2209 element no longer causes a double free. Regardless of this change, the
2210 results of such assignments are still undefined.
2211 .IP \(bu 4
2212 Assigning a copy\-on\-write string to a tied variable no longer stops that
2213 variable from being tied if it happens to be a PVMG or PVLV internally.
2214 .IP \(bu 4
2215 Doing a substitution on a tied variable returning a copy\-on\-write
2216 scalar used to cause an assertion failure or an "Attempt to free
2217 nonexistent shared string" warning.
2218 .IP \(bu 4
2219 This one is a regression from 5.12: In 5.14.0, the bitwise assignment
2220 operators \f(CW\*(C`|=\*(C'\fR, \f(CW\*(C`^=\*(C'\fR and \f(CW\*(C`&=\*(C'\fR started leaving the left\-hand side
2221 undefined if it happened to be a copy\-on\-write string [perl #108480].
2222 .IP \(bu 4
2223 Storable, Devel::Peek and PerlIO::scalar had similar problems.
2224 See "Updated Modules and Pragmata", above.
2225 .SS "The debugger"
2226 .IX Subsection "The debugger"
2227 .IP \(bu 4
2228 \&\fIdumpvar.pl\fR, and therefore the \f(CW\*(C`x\*(C'\fR command in the debugger, have been
2229 fixed to handle objects blessed into classes whose names contain "=". The
2230 contents of such objects used not to be dumped [perl #101814].
2231 .IP \(bu 4
2232 The "R" command for restarting a debugger session has been fixed to work on
2233 Windows, or any other system lacking a \f(CW\*(C`POSIX::_SC_OPEN_MAX\*(C'\fR constant
2234 [perl #87740].
2235 .IP \(bu 4
2236 The \f(CW\*(C`#line 42 foo\*(C'\fR directive used not to update the arrays of lines used
2237 by the debugger if it occurred in a string eval. This was partially fixed
2238 in 5.14, but it worked only for a single \f(CW\*(C`#line 42 foo\*(C'\fR in each eval. Now
2239 it works for multiple.
2240 .IP \(bu 4
2241 When subroutine calls are intercepted by the debugger, the name of the
2242 subroutine or a reference to it is stored in \f(CW$DB::sub\fR, for the debugger
2243 to access. Sometimes (such as \f(CW\*(C`$foo = *bar; undef *bar; &$foo\*(C'\fR)
2244 \&\f(CW$DB::sub\fR would be set to a name that could not be used to find the
2245 subroutine, and so the debugger\*(Aqs attempt to call it would fail. Now the
2246 check to see whether a reference is needed is more robust, so those
2247 problems should not happen anymore [rt.cpan.org #69862].
2248 .IP \(bu 4
2249 Every subroutine has a filename associated with it that the debugger uses.
2250 The one associated with constant subroutines used to be misallocated when
2251 cloned under threads. Consequently, debugging threaded applications could
2252 result in memory corruption [perl #96126].
2253 .SS "Dereferencing operators"
2254 .IX Subsection "Dereferencing operators"
2255 .IP \(bu 4
2256 \&\f(CWdefined(${"..."})\fR, \f(CWdefined(*{"..."})\fR, etc., used to
2257 return true for most, but not all built\-in variables, if
2258 they had not been used yet. This bug affected \f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR and
2259 \&\f(CW\*(C`${^UTF8CACHE}\*(C'\fR, among others. It also used to return false if the
2260 package name was given as well (\f(CW\*(C`${"::!"}\*(C'\fR) [perl #97978, #97492].
2261 .IP \(bu 4
2262 Perl 5.10.0 introduced a similar bug: \f(CWdefined(*{"foo"})\fR where "foo"
2263 represents the name of a built\-in global variable used to return false if
2264 the variable had never been used before, but only on the \fIfirst\fR call.
2265 This, too, has been fixed.
2266 .IP \(bu 4
2267 Since 5.6.0, \f(CW\*(C`*{ ... }\*(C'\fR has been inconsistent in how it treats undefined
2268 values. It would die in strict mode or lvalue context for most undefined
2269 values, but would be treated as the empty string (with a warning) for the
2270 specific scalar return by \f(CWundef()\fR (\f(CW&PL_sv_undef\fR internally). This
2271 has been corrected. \f(CWundef()\fR is now treated like other undefined
2272 scalars, as in Perl 5.005.
2273 .SS "Filehandle, last\-accessed"
2274 .IX Subsection "Filehandle, last-accessed"
2275 Perl has an internal variable that stores the last filehandle to be
2276 accessed. It is used by \f(CW$.\fR and by \f(CW\*(C`tell\*(C'\fR and \f(CW\*(C`eof\*(C'\fR without
2277 arguments.
2278 .IP \(bu 4
2279 It used to be possible to set this internal variable to a glob copy and
2280 then modify that glob copy to be something other than a glob, and still
2281 have the last\-accessed filehandle associated with the variable after
2282 assigning a glob to it again:
2283 .Sp
2284 .Vb 4
2285 \& my $foo = *STDOUT; # $foo is a glob copy
2286 \& <$foo>; # $foo is now the last\-accessed handle
2287 \& $foo = 3; # no longer a glob
2288 \& $foo = *STDERR; # still the last\-accessed handle
2289 .Ve
2290 .Sp
2291 Now the \f(CW\*(C`$foo = 3\*(C'\fR assignment unsets that internal variable, so there
2292 is no last\-accessed filehandle, just as if \f(CW\*(C`<$foo>\*(C'\fR had never
2293 happened.
2294 .Sp
2295 This also prevents some unrelated handle from becoming the last\-accessed
2296 handle if \f(CW$foo\fR falls out of scope and the same internal SV gets used for
2297 another handle [perl #97988].
2298 .IP \(bu 4
2299 A regression in 5.14 caused these statements not to set that internal
2300 variable:
2301 .Sp
2302 .Vb 8
2303 \& my $fh = *STDOUT;
2304 \& tell $fh;
2305 \& eof $fh;
2306 \& seek $fh, 0,0;
2307 \& tell *$fh;
2308 \& eof *$fh;
2309 \& seek *$fh, 0,0;
2310 \& readline *$fh;
2311 .Ve
2312 .Sp
2313 This is now fixed, but \f(CW\*(C`tell *{ *$fh }\*(C'\fR still has the problem, and it
2314 is not clear how to fix it [perl #106536].
2315 .ie n .SS "Filetests and ""stat"""
2316 .el .SS "Filetests and \f(CWstat\fP"
2317 .IX Subsection "Filetests and stat"
2318 The term "filetests" refers to the operators that consist of a hyphen
2319 followed by a single letter: \f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-x\*(C'\fR, \f(CW\*(C`\-M\*(C'\fR, etc. The term "stacked"
2320 when applied to filetests means followed by another filetest operator
2321 sharing the same operand, as in \f(CW\*(C`\-r \-x \-w $fooo\*(C'\fR.
2322 .IP \(bu 4
2323 \&\f(CW\*(C`stat\*(C'\fR produces more consistent warnings. It no longer warns for "_"
2324 [perl #71002] and no longer skips the warning at times for other unopened
2325 handles. It no longer warns about an unopened handle when the operating
2326 system\*(Aqs \f(CW\*(C`fstat\*(C'\fR function fails.
2327 .IP \(bu 4
2328 \&\f(CW\*(C`stat\*(C'\fR would sometimes return negative numbers for large inode numbers,
2329 because it was using the wrong internal C type. [perl #84590]
2330 .IP \(bu 4
2331 \&\f(CW\*(C`lstat\*(C'\fR is documented to fall back to \f(CW\*(C`stat\*(C'\fR (with a warning) when given
2332 a filehandle. When passed an IO reference, it was actually doing the
2333 equivalent of \f(CW\*(C`stat\ _\*(C'\fR and ignoring the handle.
2334 .IP \(bu 4
2335 \&\f(CW\*(C`\-T _\*(C'\fR with no preceding \f(CW\*(C`stat\*(C'\fR used to produce a
2336 confusing "uninitialized" warning, even though there
2337 is no visible uninitialized value to speak of.
2338 .IP \(bu 4
2339 \&\f(CW\*(C`\-T\*(C'\fR, \f(CW\*(C`\-B\*(C'\fR, \f(CW\*(C`\-l\*(C'\fR and \f(CW\*(C`\-t\*(C'\fR now work
2340 when stacked with other filetest operators
2341 [perl #77388].
2342 .IP \(bu 4
2343 In 5.14.0, filetest ops (\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-x\*(C'\fR, etc.) started calling FETCH on a
2344 tied argument belonging to the previous argument to a list operator, if
2345 called with a bareword argument or no argument at all. This has been
2346 fixed, so \f(CW\*(C`push @foo, $tied, \-r\*(C'\fR no longer calls FETCH on \f(CW$tied\fR.
2347 .IP \(bu 4
2348 In Perl 5.6, \f(CW\*(C`\-l\*(C'\fR followed by anything other than a bareword would treat
2349 its argument as a file name. That was changed in 5.8 for glob references
2350 (\f(CW\*(C`\e*foo\*(C'\fR), but not for globs themselves (\f(CW*foo\fR). \f(CW\*(C`\-l\*(C'\fR started
2351 returning \f(CW\*(C`undef\*(C'\fR for glob references without setting the last
2352 stat buffer that the "_" handle uses, but only if warnings
2353 were turned on. With warnings off, it was the same as 5.6.
2354 In other words, it was simply buggy and inconsistent. Now the 5.6
2355 behavior has been restored.
2356 .IP \(bu 4
2357 \&\f(CW\*(C`\-l\*(C'\fR followed by a bareword no longer "eats" the previous argument to
2358 the list operator in whose argument list it resides. Hence,
2359 \&\f(CW\*(C`print "bar", \-l foo\*(C'\fR now actually prints "bar", because \f(CW\*(C`\-l\*(C'\fR
2360 on longer eats it.
2361 .IP \(bu 4
2362 Perl keeps several internal variables to keep track of the last stat
2363 buffer, from which file(handle) it originated, what type it was, and
2364 whether the last stat succeeded.
2365 .Sp
2366 There were various cases where these could get out of synch, resulting in
2367 inconsistent or erratic behavior in edge cases (every mention of \f(CW\*(C`\-T\*(C'\fR
2368 applies to \f(CW\*(C`\-B\*(C'\fR as well):
2369 .RS 4
2370 .IP \(bu 4
2371 \&\f(CW\*(C`\-T \fR\f(CIHANDLE\fR\f(CW\*(C'\fR, even though it does a \f(CW\*(C`stat\*(C'\fR, was not resetting the last
2372 stat type, so an \f(CW\*(C`lstat _\*(C'\fR following it would merrily return the wrong
2373 results. Also, it was not setting the success status.
2374 .IP \(bu 4
2375 Freeing the handle last used by \f(CW\*(C`stat\*(C'\fR or a filetest could result in
2376 \&\f(CW\*(C`\-T\ _\*(C'\fR using an unrelated handle.
2377 .IP \(bu 4
2378 \&\f(CW\*(C`stat\*(C'\fR with an IO reference would not reset the stat type or record the
2379 filehandle for \f(CW\*(C`\-T\ _\*(C'\fR to use.
2380 .IP \(bu 4
2381 Fatal warnings could cause the stat buffer not to be reset
2382 for a filetest operator on an unopened filehandle or \f(CW\*(C`\-l\*(C'\fR on any handle.
2383 Fatal warnings also stopped \f(CW\*(C`\-T\*(C'\fR from setting \f(CW$!\fR.
2384 .IP \(bu 4
2385 When the last stat was on an unreadable file, \f(CW\*(C`\-T _\*(C'\fR is supposed to
2386 return \f(CW\*(C`undef\*(C'\fR, leaving the last stat buffer unchanged. But it was
2387 setting the stat type, causing \f(CW\*(C`lstat _\*(C'\fR to stop working.
2388 .IP \(bu 4
2389 \&\f(CW\*(C`\-T \fR\f(CIFILENAME\fR\f(CW\*(C'\fR was not resetting the internal stat buffers for
2390 unreadable files.
2391 .RE
2392 .RS 4
2393 .Sp
2394 These have all been fixed.
2395 .RE
2396 .SS Formats
2397 .IX Subsection "Formats"
2398 .IP \(bu 4
2399 Several edge cases have been fixed with formats and \f(CW\*(C`formline\*(C'\fR;
2400 in particular, where the format itself is potentially variable (such as
2401 with ties and overloading), and where the format and data differ in their
2402 encoding. In both these cases, it used to possible for the output to be
2403 corrupted [perl #91032].
2404 .IP \(bu 4
2405 \&\f(CW\*(C`formline\*(C'\fR no longer converts its argument into a string in\-place. So
2406 passing a reference to \f(CW\*(C`formline\*(C'\fR no longer destroys the reference
2407 [perl #79532].
2408 .IP \(bu 4
2409 Assignment to \f(CW$^A\fR (the format output accumulator) now recalculates
2410 the number of lines output.
2411 .ie n .SS """given"" and ""when"""
2412 .el .SS "\f(CWgiven\fP and \f(CWwhen\fP"
2413 .IX Subsection "given and when"
2414 .IP \(bu 4
2415 \&\f(CW\*(C`given\*(C'\fR was not scoping its implicit \f(CW$_\fR properly, resulting in memory
2416 leaks or "Variable is not available" warnings [perl #94682].
2417 .IP \(bu 4
2418 \&\f(CW\*(C`given\*(C'\fR was not calling set\-magic on the implicit lexical \f(CW$_\fR that it
2419 uses. This meant, for example, that \f(CW\*(C`pos\*(C'\fR would be remembered from one
2420 execution of the same \f(CW\*(C`given\*(C'\fR block to the next, even if the input were a
2421 different variable [perl #84526].
2422 .IP \(bu 4
2423 \&\f(CW\*(C`when\*(C'\fR blocks are now capable of returning variables declared inside the
2424 enclosing \f(CW\*(C`given\*(C'\fR block [perl #93548].
2425 .ie n .SS "The ""glob"" operator"
2426 .el .SS "The \f(CWglob\fP operator"
2427 .IX Subsection "The glob operator"
2428 .IP \(bu 4
2429 On OSes other than VMS, Perl\*(Aqs \f(CW\*(C`glob\*(C'\fR operator (and the \f(CW\*(C`<...>\*(C'\fR form)
2430 use File::Glob underneath. File::Glob splits the pattern into words,
2431 before feeding each word to its \f(CW\*(C`bsd_glob\*(C'\fR function.
2432 .Sp
2433 There were several inconsistencies in the way the split was done. Now
2434 quotation marks (\*(Aq and ") are always treated as shell\-style word delimiters
2435 (that allow whitespace as part of a word) and backslashes are always
2436 preserved, unless they exist to escape quotation marks. Before, those
2437 would only sometimes be the case, depending on whether the pattern
2438 contained whitespace. Also, escaped whitespace at the end of the pattern
2439 is no longer stripped [perl #40470].
2440 .IP \(bu 4
2441 \&\f(CW\*(C`CORE::glob\*(C'\fR now works as a way to call the default globbing function. It
2442 used to respect overrides, despite the \f(CW\*(C`CORE::\*(C'\fR prefix.
2443 .IP \(bu 4
2444 Under miniperl (used to configure modules when perl itself is built),
2445 \&\f(CW\*(C`glob\*(C'\fR now clears \f(CW%ENV\fR before calling csh, since the latter croaks on some
2446 systems if it does not like the contents of the LS_COLORS environment
2447 variable [perl #98662].
2448 .SS "Lvalue subroutines"
2449 .IX Subsection "Lvalue subroutines"
2450 .IP \(bu 4
2451 Explicit return now returns the actual argument passed to return, instead
2452 of copying it [perl #72724, #72706].
2453 .IP \(bu 4
2454 Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on
2455 the left\-hand side of \f(CW\*(C`=\*(C'\fR) for the last statement and the arguments to
2456 return. Since lvalue subroutines are not always called in lvalue context,
2457 this restriction has been lifted.
2458 .IP \(bu 4
2459 Lvalue subroutines are less restrictive about what values can be returned.
2460 It used to croak on values returned by \f(CW\*(C`shift\*(C'\fR and \f(CW\*(C`delete\*(C'\fR and from
2461 other subroutines, but no longer does so [perl #71172].
2462 .IP \(bu 4
2463 Empty lvalue subroutines (\f(CW\*(C`sub :lvalue {}\*(C'\fR) used to return \f(CW@_\fR in list
2464 context. All subroutines used to do this, but regular subs were fixed in
2465 Perl 5.8.2. Now lvalue subroutines have been likewise fixed.
2466 .IP \(bu 4
2467 Autovivification now works on values returned from lvalue subroutines
2468 [perl #7946], as does returning \f(CW\*(C`keys\*(C'\fR in lvalue context.
2469 .IP \(bu 4
2470 Lvalue subroutines used to copy their return values in rvalue context. Not
2471 only was this a waste of CPU cycles, but it also caused bugs. A \f(CW\*(C`($)\*(C'\fR
2472 prototype would cause an lvalue sub to copy its return value [perl #51408],
2473 and \f(CW\*(C`while(lvalue_sub() =~ m/.../g) { ... }\*(C'\fR would loop endlessly
2474 [perl #78680].
2475 .IP \(bu 4
2476 When called in potential lvalue context
2477 (e.g., subroutine arguments or a list
2478 passed to \f(CW\*(C`for\*(C'\fR), lvalue subroutines used to copy
2479 any read\-only value that was returned. E.g., \f(CW\*(C` sub :lvalue { $] } \*(C'\fR
2480 would not return \f(CW$]\fR, but a copy of it.
2481 .IP \(bu 4
2482 When called in potential lvalue context, an lvalue subroutine returning
2483 arrays or hashes used to bind the arrays or hashes to scalar variables,
2484 resulting in bugs. This was fixed in 5.14.0 if an array were the first
2485 thing returned from the subroutine (but not for \f(CW\*(C`$scalar, @array\*(C'\fR or
2486 hashes being returned). Now a more general fix has been applied
2487 [perl #23790].
2488 .IP \(bu 4
2489 Method calls whose arguments were all surrounded with \f(CWmy()\fR or \f(CWour()\fR
2490 (as in \f(CW\*(C`$object\->method(my($a,$b))\*(C'\fR) used to force lvalue context on
2491 the subroutine. This would prevent lvalue methods from returning certain
2492 values.
2493 .IP \(bu 4
2494 Lvalue sub calls that are not determined to be such at compile time
2495 (\f(CW&$name\fR or &{"name"}) are no longer exempt from strict refs if they
2496 occur in the last statement of an lvalue subroutine [perl #102486].
2497 .IP \(bu 4
2498 Sub calls whose subs are not visible at compile time, if
2499 they occurred in the last statement of an lvalue subroutine,
2500 would reject non\-lvalue subroutines and die with "Can\*(Aqt modify non\-lvalue
2501 subroutine call" [perl #102486].
2502 .Sp
2503 Non\-lvalue sub calls whose subs \fIare\fR visible at compile time exhibited
2504 the opposite bug. If the call occurred in the last statement of an lvalue
2505 subroutine, there would be no error when the lvalue sub was called in
2506 lvalue context. Perl would blindly assign to the temporary value returned
2507 by the non\-lvalue subroutine.
2508 .IP \(bu 4
2509 \&\f(CW\*(C`AUTOLOAD\*(C'\fR routines used to take precedence over the actual sub being
2510 called (i.e., when autoloading wasn\*(Aqt needed), for sub calls in lvalue or
2511 potential lvalue context, if the subroutine was not visible at compile
2512 time.
2513 .IP \(bu 4
2514 Applying the \f(CW\*(C`:lvalue\*(C'\fR attribute to an XSUB or to an aliased subroutine
2515 stub with \f(CW\*(C`sub foo :lvalue;\*(C'\fR syntax stopped working in Perl 5.12.
2516 This has been fixed.
2517 .IP \(bu 4
2518 Applying the :lvalue attribute to subroutine that is already defined does
2519 not work properly, as the attribute changes the way the sub is compiled.
2520 Hence, Perl 5.12 began warning when an attempt is made to apply the
2521 attribute to an already defined sub. In such cases, the attribute is
2522 discarded.
2523 .Sp
2524 But the change in 5.12 missed the case where custom attributes are also
2525 present: that case still silently and ineffectively applied the attribute.
2526 That omission has now been corrected. \f(CW\*(C`sub foo :lvalue :Whatever\*(C'\fR (when
2527 \&\f(CW\*(C`foo\*(C'\fR is already defined) now warns about the :lvalue attribute, and does
2528 not apply it.
2529 .IP \(bu 4
2530 A bug affecting lvalue context propagation through nested lvalue subroutine
2531 calls has been fixed. Previously, returning a value in nested rvalue
2532 context would be treated as lvalue context by the inner subroutine call,
2533 resulting in some values (such as read\-only values) being rejected.
2534 .SS Overloading
2535 .IX Subsection "Overloading"
2536 .IP \(bu 4
2537 Arithmetic assignment (\f(CW\*(C`$left += $right\*(C'\fR) involving overloaded objects
2538 that rely on the \*(Aqnomethod\*(Aq override no longer segfault when the left
2539 operand is not overloaded.
2540 .IP \(bu 4
2541 Errors that occur when methods cannot be found during overloading now
2542 mention the correct package name, as they did in 5.8.x, instead of
2543 erroneously mentioning the "overload" package, as they have since 5.10.0.
2544 .IP \(bu 4
2545 Undefining \f(CW%overload::\fR no longer causes a crash.
2546 .SS "Prototypes of built\-in keywords"
2547 .IX Subsection "Prototypes of built-in keywords"
2548 .IP \(bu 4
2549 The \f(CW\*(C`prototype\*(C'\fR function no longer dies for the \f(CW\*(C`_\|_FILE_\|_\*(C'\fR, \f(CW\*(C`_\|_LINE_\|_\*(C'\fR
2550 and \f(CW\*(C`_\|_PACKAGE_\|_\*(C'\fR directives. It now returns an empty\-string prototype
2551 for them, because they are syntactically indistinguishable from nullary
2552 functions like \f(CW\*(C`time\*(C'\fR.
2553 .IP \(bu 4
2554 \&\f(CW\*(C`prototype\*(C'\fR now returns \f(CW\*(C`undef\*(C'\fR for all overridable infix operators,
2555 such as \f(CW\*(C`eq\*(C'\fR, which are not callable in any way resembling functions.
2556 It used to return incorrect prototypes for some and die for others
2557 [perl #94984].
2558 .IP \(bu 4
2559 The prototypes of several built\-in functions\-\-\f(CW\*(C`getprotobynumber\*(C'\fR, \f(CW\*(C`lock\*(C'\fR,
2560 \&\f(CW\*(C`not\*(C'\fR and \f(CW\*(C`select\*(C'\fR\-\-have been corrected, or at least are now closer to
2561 reality than before.
2562 .SS "Regular expressions"
2563 .IX Subsection "Regular expressions"
2564 .IP \(bu 4
2565 \&\f(CW\*(C`/[[:ascii:]]/\*(C'\fR and \f(CW\*(C`/[[:blank:]]/\*(C'\fR now use locale rules under
2566 \&\f(CW\*(C`use locale\*(C'\fR when the platform supports that. Previously, they used
2567 the platform\*(Aqs native character set.
2568 .IP \(bu 4
2569 \&\f(CW\*(C`m/[[:ascii:]]/i\*(C'\fR and \f(CW\*(C`/\ep{ASCII}/i\*(C'\fR now match identically (when not
2570 under a differing locale). This fixes a regression introduced in 5.14
2571 in which the first expression could match characters outside of ASCII,
2572 such as the KELVIN SIGN.
2573 .IP \(bu 4
2574 \&\f(CW\*(C`/.*/g\*(C'\fR would sometimes refuse to match at the end of a string that ends
2575 with "\en". This has been fixed [perl #109206].
2576 .IP \(bu 4
2577 Starting with 5.12.0, Perl used to get its internal bookkeeping muddled up
2578 after assigning \f(CW\*(C`${ qr// }\*(C'\fR to a hash element and locking it with
2579 Hash::Util. This could result in double frees, crashes, or erratic
2580 behavior.
2581 .IP \(bu 4
2582 The new (in 5.14.0) regular expression modifier \f(CW\*(C`/a\*(C'\fR when repeated like
2583 \&\f(CW\*(C`/aa\*(C'\fR forbids the characters outside the ASCII range that match
2584 characters inside that range from matching under \f(CW\*(C`/i\*(C'\fR. This did not
2585 work under some circumstances, all involving alternation, such as:
2586 .Sp
2587 .Vb 1
2588 \& "\eN{KELVIN SIGN}" =~ /k|foo/iaa;
2589 .Ve
2590 .Sp
2591 succeeded inappropriately. This is now fixed.
2592 .IP \(bu 4
2593 5.14.0 introduced some memory leaks in regular expression character
2594 classes such as \f(CW\*(C`[\ew\es]\*(C'\fR, which have now been fixed. (5.14.1)
2595 .IP \(bu 4
2596 An edge case in regular expression matching could potentially loop.
2597 This happened only under \f(CW\*(C`/i\*(C'\fR in bracketed character classes that have
2598 characters with multi\-character folds, and the target string to match
2599 against includes the first portion of the fold, followed by another
2600 character that has a multi\-character fold that begins with the remaining
2601 portion of the fold, plus some more.
2602 .Sp
2603 .Vb 1
2604 \& "s\eN{U+DF}" =~ /[\ex{DF}foo]/i
2605 .Ve
2606 .Sp
2607 is one such case. \f(CW\*(C`\exDF\*(C'\fR folds to \f(CW"ss"\fR. (5.14.1)
2608 .IP \(bu 4
2609 A few characters in regular expression pattern matches did not
2610 match correctly in some circumstances, all involving \f(CW\*(C`/i\*(C'\fR. The
2611 affected characters are:
2612 COMBINING GREEK YPOGEGRAMMENI,
2613 GREEK CAPITAL LETTER IOTA,
2614 GREEK CAPITAL LETTER UPSILON,
2615 GREEK PROSGEGRAMMENI,
2616 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA,
2617 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
2618 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA,
2619 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
2620 LATIN SMALL LETTER LONG S,
2621 LATIN SMALL LIGATURE LONG S T,
2622 and
2623 LATIN SMALL LIGATURE ST.
2624 .IP \(bu 4
2625 A memory leak regression in regular expression compilation
2626 under threading has been fixed.
2627 .IP \(bu 4
2628 A regression introduced in 5.14.0 has
2629 been fixed. This involved an inverted
2630 bracketed character class in a regular expression that consisted solely
2631 of a Unicode property. That property wasn\*(Aqt getting inverted outside the
2632 Latin1 range.
2633 .IP \(bu 4
2634 Three problematic Unicode characters now work better in regex pattern matching under \f(CW\*(C`/i\*(C'\fR.
2635 .Sp
2636 In the past, three Unicode characters:
2637 LATIN SMALL LETTER SHARP S,
2638 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS,
2639 and
2640 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS,
2641 along with the sequences that they fold to
2642 (including "ss" for LATIN SMALL LETTER SHARP S),
2643 did not properly match under \f(CW\*(C`/i\*(C'\fR. 5.14.0 fixed some of these cases,
2644 but introduced others, including a panic when one of the characters or
2645 sequences was used in the \f(CW\*(C`(?(DEFINE)\*(C'\fR regular expression predicate.
2646 The known bugs that were introduced in 5.14 have now been fixed; as well
2647 as some other edge cases that have never worked until now. These all
2648 involve using the characters and sequences outside bracketed character
2649 classes under \f(CW\*(C`/i\*(C'\fR. This closes [perl #98546].
2650 .Sp
2651 There remain known problems when using certain characters with
2652 multi\-character folds inside bracketed character classes, including such
2653 constructs as \f(CW\*(C`qr/[\eN{LATIN SMALL LETTER SHARP}a\-z]/i\*(C'\fR. These
2654 remaining bugs are addressed in [perl #89774].
2655 .IP \(bu 4
2656 RT #78266: The regex engine has been leaking memory when accessing
2657 named captures that weren\*(Aqt matched as part of a regex ever since 5.10
2658 when they were introduced; e.g., this would consume over a hundred MB of
2659 memory:
2660 .Sp
2661 .Vb 6
2662 \& for (1..10_000_000) {
2663 \& if ("foo" =~ /(foo|(?<capture>bar))?/) {
2664 \& my $capture = $+{capture}
2665 \& }
2666 \& }
2667 \& system "ps \-o rss $$"\*(Aq
2668 .Ve
2669 .IP \(bu 4
2670 In 5.14, \f(CW\*(C`/[[:lower:]]/i\*(C'\fR and \f(CW\*(C`/[[:upper:]]/i\*(C'\fR no longer matched the
2671 opposite case. This has been fixed [perl #101970].
2672 .IP \(bu 4
2673 A regular expression match with an overloaded object on the right\-hand side
2674 would sometimes stringify the object too many times.
2675 .IP \(bu 4
2676 A regression has been fixed that was introduced in 5.14, in \f(CW\*(C`/i\*(C'\fR
2677 regular expression matching, in which a match improperly fails if the
2678 pattern is in UTF\-8, the target string is not, and a Latin\-1 character
2679 precedes a character in the string that should match the pattern.
2680 [perl #101710]
2681 .IP \(bu 4
2682 In case\-insensitive regular expression pattern matching, no longer on
2683 UTF\-8 encoded strings does the scan for the start of match look only at
2684 the first possible position. This caused matches such as
2685 \&\f(CW\*(C`"f\ex{FB00}" =~ /ff/i\*(C'\fR to fail.
2686 .IP \(bu 4
2687 The regexp optimizer no longer crashes on debugging builds when merging
2688 fixed\-string nodes with inconvenient contents.
2689 .IP \(bu 4
2690 A panic involving the combination of the regular expression modifiers
2691 \&\f(CW\*(C`/aa\*(C'\fR and the \f(CW\*(C`\eb\*(C'\fR escape sequence introduced in 5.14.0 has been
2692 fixed [perl #95964]. (5.14.2)
2693 .IP \(bu 4
2694 The combination of the regular expression modifiers \f(CW\*(C`/aa\*(C'\fR and the \f(CW\*(C`\eb\*(C'\fR
2695 and \f(CW\*(C`\eB\*(C'\fR escape sequences did not work properly on UTF\-8 encoded
2696 strings. All non\-ASCII characters under \f(CW\*(C`/aa\*(C'\fR should be treated as
2697 non\-word characters, but what was happening was that Unicode rules were
2698 used to determine wordness/non\-wordness for non\-ASCII characters. This
2699 is now fixed [perl #95968].
2700 .IP \(bu 4
2701 \&\f(CW\*(C`(?foo: ...)\*(C'\fR no longer loses passed in character set.
2702 .IP \(bu 4
2703 The trie optimization used to have problems with alternations containing
2704 an empty \f(CW\*(C`(?:)\*(C'\fR, causing \f(CW\*(C`"x" =~ /\eA(?>(?:(?:)A|B|C?x))\ez/\*(C'\fR not to
2705 match, whereas it should [perl #111842].
2706 .IP \(bu 4
2707 Use of lexical (\f(CW\*(C`my\*(C'\fR) variables in code blocks embedded in regular
2708 expressions will no longer result in memory corruption or crashes.
2709 .Sp
2710 Nevertheless, these code blocks are still experimental, as there are still
2711 problems with the wrong variables being closed over (in loops for instance)
2712 and with abnormal exiting (e.g., \f(CW\*(C`die\*(C'\fR) causing memory corruption.
2713 .IP \(bu 4
2714 The \f(CW\*(C`\eh\*(C'\fR, \f(CW\*(C`\eH\*(C'\fR, \f(CW\*(C`\ev\*(C'\fR and \f(CW\*(C`\eV\*(C'\fR regular expression metacharacters used to
2715 cause a panic error message when trying to match at the end of the
2716 string [perl #96354].
2717 .IP \(bu 4
2718 The abbreviations for four C1 control characters \f(CW\*(C`MW\*(C'\fR \f(CW\*(C`PM\*(C'\fR, \f(CW\*(C`RI\*(C'\fR, and
2719 \&\f(CW\*(C`ST\*(C'\fR were previously unrecognized by \f(CW\*(C`\eN{}\*(C'\fR, \fBvianame()\fR, and
2720 \&\fBstring_vianame()\fR.
2721 .IP \(bu 4
2722 Mentioning a variable named "&" other than \f(CW$&\fR (i.e., \f(CW\*(C`@&\*(C'\fR or \f(CW\*(C`%&\*(C'\fR) no
2723 longer stops \f(CW$&\fR from working. The same applies to variables named "\*(Aq"
2724 and "\`" [perl #24237].
2725 .IP \(bu 4
2726 Creating a \f(CW\*(C`UNIVERSAL::AUTOLOAD\*(C'\fR sub no longer stops \f(CW\*(C`%+\*(C'\fR, \f(CW\*(C`%\-\*(C'\fR and
2727 \&\f(CW\*(C`%!\*(C'\fR from working some of the time [perl #105024].
2728 .SS Smartmatching
2729 .IX Subsection "Smartmatching"
2730 .IP \(bu 4
2731 \&\f(CW\*(C`~~\*(C'\fR now correctly handles the precedence of Any~~Object, and is not tricked
2732 by an overloaded object on the left\-hand side.
2733 .IP \(bu 4
2734 In Perl 5.14.0, \f(CW\*(C`$tainted ~~ @array\*(C'\fR stopped working properly. Sometimes
2735 it would erroneously fail (when \f(CW$tainted\fR contained a string that occurs
2736 in the array \fIafter\fR the first element) or erroneously succeed (when
2737 \&\f(CW\*(C`undef\*(C'\fR occurred after the first element) [perl #93590].
2738 .ie n .SS "The ""sort"" operator"
2739 .el .SS "The \f(CWsort\fP operator"
2740 .IX Subsection "The sort operator"
2741 .IP \(bu 4
2742 \&\f(CW\*(C`sort\*(C'\fR was not treating \f(CW\*(C`sub {}\*(C'\fR and \f(CW\*(C`sub {()}\*(C'\fR as equivalent when
2743 such a sub was provided as the comparison routine. It used to croak on
2744 \&\f(CW\*(C`sub {()}\*(C'\fR.
2745 .IP \(bu 4
2746 \&\f(CW\*(C`sort\*(C'\fR now works once more with custom sort routines that are XSUBs. It
2747 stopped working in 5.10.0.
2748 .IP \(bu 4
2749 \&\f(CW\*(C`sort\*(C'\fR with a constant for a custom sort routine, although it produces
2750 unsorted results, no longer crashes. It started crashing in 5.10.0.
2751 .IP \(bu 4
2752 Warnings emitted by \f(CW\*(C`sort\*(C'\fR when a custom comparison routine returns a
2753 non\-numeric value now contain "in sort" and show the line number of the
2754 \&\f(CW\*(C`sort\*(C'\fR operator, rather than the last line of the comparison routine. The
2755 warnings also now occur only if warnings are enabled in the scope where
2756 \&\f(CW\*(C`sort\*(C'\fR occurs. Previously the warnings would occur if enabled in the
2757 comparison routine\*(Aqs scope.
2758 .IP \(bu 4
2759 \&\f(CW\*(C`sort { $a <=> $b }\*(C'\fR, which is optimized internally, now produces
2760 "uninitialized" warnings for NaNs (not\-a\-number values), since \f(CW\*(C`<=>\*(C'\fR
2761 returns \f(CW\*(C`undef\*(C'\fR for those. This brings it in line with
2762 \&\f(CW\*(C`sort\ {\ 1;\ $a\ <=>\ $b\ }\*(C'\fR and other more complex cases, which are not
2763 optimized [perl #94390].
2764 .ie n .SS "The ""substr"" operator"
2765 .el .SS "The \f(CWsubstr\fP operator"
2766 .IX Subsection "The substr operator"
2767 .IP \(bu 4
2768 Tied (and otherwise magical) variables are no longer exempt from the
2769 "Attempt to use reference as lvalue in substr" warning.
2770 .IP \(bu 4
2771 That warning now occurs when the returned lvalue is assigned to, not
2772 when \f(CW\*(C`substr\*(C'\fR itself is called. This makes a difference only if the
2773 return value of \f(CW\*(C`substr\*(C'\fR is referenced and later assigned to.
2774 .IP \(bu 4
2775 Passing a substring of a read\-only value or a typeglob to a function
2776 (potential lvalue context) no longer causes an immediate "Can\*(Aqt coerce"
2777 or "Modification of a read\-only value" error. That error occurs only
2778 if the passed value is assigned to.
2779 .Sp
2780 The same thing happens with the "substr outside of string" error. If
2781 the lvalue is only read from, not written to, it is now just a warning, as
2782 with rvalue \f(CW\*(C`substr\*(C'\fR.
2783 .IP \(bu 4
2784 \&\f(CW\*(C`substr\*(C'\fR assignments no longer call FETCH twice if the first argument
2785 is a tied variable, just once.
2786 .SS "Support for embedded nulls"
2787 .IX Subsection "Support for embedded nulls"
2788 Some parts of Perl did not work correctly with nulls (\f(CW\*(C`chr 0\*(C'\fR) embedded in
2789 strings. That meant that, for instance, \f(CW\*(C`$m = "a\e0b"; foo\->$m\*(C'\fR would
2790 call the "a" method, instead of the actual method name contained in \f(CW$m\fR.
2791 These parts of perl have been fixed to support nulls:
2792 .IP \(bu 4
2793 Method names
2794 .IP \(bu 4
2795 Typeglob names (including filehandle and subroutine names)
2796 .IP \(bu 4
2797 Package names, including the return value of \f(CWref()\fR
2798 .IP \(bu 4
2799 Typeglob elements (\f(CW*foo{"THING\e0stuff"}\fR)
2800 .IP \(bu 4
2801 Signal names
2802 .IP \(bu 4
2803 Various warnings and error messages that mention variable names or values,
2804 methods, etc.
2805 .PP
2806 One side effect of these changes is that blessing into "\e0" no longer
2807 causes \f(CWref()\fR to return false.
2808 .SS "Threading bugs"
2809 .IX Subsection "Threading bugs"
2810 .IP \(bu 4
2811 Typeglobs returned from threads are no longer cloned if the parent thread
2812 already has a glob with the same name. This means that returned
2813 subroutines will now assign to the right package variables [perl #107366].
2814 .IP \(bu 4
2815 Some cases of threads crashing due to memory allocation during cloning have
2816 been fixed [perl #90006].
2817 .IP \(bu 4
2818 Thread joining would sometimes emit "Attempt to free unreferenced scalar"
2819 warnings if \f(CW\*(C`caller\*(C'\fR had been used from the \f(CW\*(C`DB\*(C'\fR package before thread
2820 creation [perl #98092].
2821 .IP \(bu 4
2822 Locking a subroutine (via \f(CW\*(C`lock &sub\*(C'\fR) is no longer a compile\-time error
2823 for regular subs. For lvalue subroutines, it no longer tries to return the
2824 sub as a scalar, resulting in strange side effects like \f(CW\*(C`ref \e$_\*(C'\fR
2825 returning "CODE" in some instances.
2826 .Sp
2827 \&\f(CW\*(C`lock &sub\*(C'\fR is now a run\-time error if threads::shared is loaded (a
2828 no\-op otherwise), but that may be rectified in a future version.
2829 .SS "Tied variables"
2830 .IX Subsection "Tied variables"
2831 .IP \(bu 4
2832 Various cases in which FETCH was being ignored or called too many times
2833 have been fixed:
2834 .RS 4
2835 .IP \(bu 4
2836 \&\f(CW\*(C`PerlIO::get_layers\*(C'\fR [perl #97956]
2837 .IP \(bu 4
2838 \&\f(CW\*(C`$tied =~ y/a/b/\*(C'\fR, \f(CW\*(C`chop $tied\*(C'\fR and \f(CW\*(C`chomp $tied\*(C'\fR when \f(CW$tied\fR holds a
2839 reference.
2840 .IP \(bu 4
2841 When calling \f(CW\*(C`local $_\*(C'\fR [perl #105912]
2842 .IP \(bu 4
2843 Four\-argument \f(CW\*(C`select\*(C'\fR
2844 .IP \(bu 4
2845 A tied buffer passed to \f(CW\*(C`sysread\*(C'\fR
2846 .IP \(bu 4
2847 \&\f(CW\*(C`$tied .= <>\*(C'\fR
2848 .IP \(bu 4
2849 Three\-argument \f(CW\*(C`open\*(C'\fR, the third being a tied file handle
2850 (as in \f(CW\*(C`open $fh, ">&", $tied\*(C'\fR)
2851 .IP \(bu 4
2852 \&\f(CW\*(C`sort\*(C'\fR with a reference to a tied glob for the comparison routine.
2853 .IP \(bu 4
2854 \&\f(CW\*(C`..\*(C'\fR and \f(CW\*(C`...\*(C'\fR in list context [perl #53554].
2855 .IP \(bu 4
2856 \&\f(CW\*(C`${$tied}\*(C'\fR, \f(CW\*(C`@{$tied}\*(C'\fR, \f(CW\*(C`%{$tied}\*(C'\fR and \f(CW\*(C`*{$tied}\*(C'\fR where the tied
2857 variable returns a string (\f(CW\*(C`&{}\*(C'\fR was unaffected)
2858 .IP \(bu 4
2859 \&\f(CW\*(C`defined ${ $tied_variable }\*(C'\fR
2860 .IP \(bu 4
2861 Various functions that take a filehandle argument in rvalue context
2862 (\f(CW\*(C`close\*(C'\fR, \f(CW\*(C`readline\*(C'\fR, etc.) [perl #97482]
2863 .IP \(bu 4
2864 Some cases of dereferencing a complex expression, such as
2865 \&\f(CW\*(C`${ (), $tied } = 1\*(C'\fR, used to call \f(CW\*(C`FETCH\*(C'\fR multiple times, but now call
2866 it once.
2867 .IP \(bu 4
2868 \&\f(CW\*(C`$tied\->method\*(C'\fR where \f(CW$tied\fR returns a package name\-\-even resulting in
2869 a failure to call the method, due to memory corruption
2870 .IP \(bu 4
2871 Assignments like \f(CW\*(C`*$tied = \e&{"..."}\*(C'\fR and \f(CW\*(C`*glob = $tied\*(C'\fR
2872 .IP \(bu 4
2873 \&\f(CW\*(C`chdir\*(C'\fR, \f(CW\*(C`chmod\*(C'\fR, \f(CW\*(C`chown\*(C'\fR, \f(CW\*(C`utime\*(C'\fR, \f(CW\*(C`truncate\*(C'\fR, \f(CW\*(C`stat\*(C'\fR, \f(CW\*(C`lstat\*(C'\fR and
2874 the filetest ops (\f(CW\*(C`\-r\*(C'\fR, \f(CW\*(C`\-x\*(C'\fR, etc.)
2875 .RE
2876 .RS 4
2877 .RE
2878 .IP \(bu 4
2879 \&\f(CW\*(C`caller\*(C'\fR sets \f(CW@DB::args\fR to the subroutine arguments when called from
2880 the DB package. It used to crash when doing so if \f(CW@DB::args\fR happened to
2881 be tied. Now it croaks instead.
2882 .IP \(bu 4
2883 Tying an element of \f(CW%ENV\fR or \f(CW\*(C`%^H\*(C'\fR and then deleting that element would
2884 result in a call to the tie object\*(Aqs DELETE method, even though tying the
2885 element itself is supposed to be equivalent to tying a scalar (the element
2886 is, of course, a scalar) [perl #67490].
2887 .IP \(bu 4
2888 When Perl autovivifies an element of a tied array or hash (which entails
2889 calling STORE with a new reference), it now calls FETCH immediately after
2890 the STORE, instead of assuming that FETCH would have returned the same
2891 reference. This can make it easier to implement tied objects [perl #35865, #43011].
2892 .IP \(bu 4
2893 Four\-argument \f(CW\*(C`select\*(C'\fR no longer produces its "Non\-string passed as
2894 bitmask" warning on tied or tainted variables that are strings.
2895 .IP \(bu 4
2896 Localizing a tied scalar that returns a typeglob no longer stops it from
2897 being tied till the end of the scope.
2898 .IP \(bu 4
2899 Attempting to \f(CW\*(C`goto\*(C'\fR out of a tied handle method used to cause memory
2900 corruption or crashes. Now it produces an error message instead
2901 [perl #8611].
2902 .IP \(bu 4
2903 A bug has been fixed that occurs when a tied variable is used as a
2904 subroutine reference: if the last thing assigned to or returned from the
2905 variable was a reference or typeglob, the \f(CW\*(C`\e&$tied\*(C'\fR could either crash or
2906 return the wrong subroutine. The reference case is a regression introduced
2907 in Perl 5.10.0. For typeglobs, it has probably never worked till now.
2908 .SS "Version objects and vstrings"
2909 .IX Subsection "Version objects and vstrings"
2910 .IP \(bu 4
2911 The bitwise complement operator (and possibly other operators, too) when
2912 passed a vstring would leave vstring magic attached to the return value,
2913 even though the string had changed. This meant that
2914 \&\f(CW\*(C`version\->new(~v1.2.3)\*(C'\fR would create a version looking like "v1.2.3"
2915 even though the string passed to \f(CW\*(C`version\->new\*(C'\fR was actually
2916 "\e376\e375\e374". This also caused B::Deparse to deparse \f(CW\*(C`~v1.2.3\*(C'\fR
2917 incorrectly, without the \f(CW\*(C`~\*(C'\fR [perl #29070].
2918 .IP \(bu 4
2919 Assigning a vstring to a magic (e.g., tied, \f(CW$!\fR) variable and then
2920 assigning something else used to blow away all magic. This meant that
2921 tied variables would come undone, \f(CW$!\fR would stop getting updated on
2922 failed system calls, \f(CW$|\fR would stop setting autoflush, and other
2923 mischief would take place. This has been fixed.
2924 .IP \(bu 4
2925 \&\f(CW\*(C`version\->new("version")\*(C'\fR and \f(CW\*(C`printf "%vd", "version"\*(C'\fR no longer
2926 crash [perl #102586].
2927 .IP \(bu 4
2928 Version comparisons, such as those that happen implicitly with \f(CW\*(C`use
2929 v5.43\*(C'\fR, no longer cause locale settings to change [perl #105784].
2930 .IP \(bu 4
2931 Version objects no longer cause memory leaks in boolean context
2932 [perl #109762].
2933 .SS "Warnings, redefinition"
2934 .IX Subsection "Warnings, redefinition"
2935 .IP \(bu 4
2936 Subroutines from the \f(CW\*(C`autouse\*(C'\fR namespace are once more exempt from
2937 redefinition warnings. This used to work in 5.005, but was broken in
2938 5.6 for most subroutines. For subs created via XS that redefine
2939 subroutines from the \f(CW\*(C`autouse\*(C'\fR package, this stopped working in 5.10.
2940 .IP \(bu 4
2941 New XSUBs now produce redefinition warnings if they overwrite existing
2942 subs, as they did in 5.8.x. (The \f(CW\*(C`autouse\*(C'\fR logic was reversed in
2943 5.10\-14. Only subroutines from the \f(CW\*(C`autouse\*(C'\fR namespace would warn
2944 when clobbered.)
2945 .IP \(bu 4
2946 \&\f(CW\*(C`newCONSTSUB\*(C'\fR used to use compile\-time warning hints, instead of
2947 run\-time hints. The following code should never produce a redefinition
2948 warning, but it used to, if \f(CW\*(C`newCONSTSUB\*(C'\fR redefined an existing
2949 subroutine:
2950 .Sp
2951 .Vb 5
2952 \& use warnings;
2953 \& BEGIN {
2954 \& no warnings;
2955 \& some_XS_function_that_calls_new_CONSTSUB();
2956 \& }
2957 .Ve
2958 .IP \(bu 4
2959 Redefinition warnings for constant subroutines are on by default (what
2960 are known as severe warnings in perldiag). This occurred only
2961 when it was a glob assignment or declaration of a Perl subroutine that
2962 caused the warning. If the creation of XSUBs triggered the warning, it
2963 was not a default warning. This has been corrected.
2964 .IP \(bu 4
2965 The internal check to see whether a redefinition warning should occur
2966 used to emit "uninitialized" warnings in cases like this:
2967 .Sp
2968 .Vb 4
2969 \& use warnings "uninitialized";
2970 \& use constant {u => undef, v => undef};
2971 \& sub foo(){u}
2972 \& sub foo(){v}
2973 .Ve
2974 .SS "Warnings, ""Uninitialized"""
2975 .IX Subsection "Warnings, ""Uninitialized"""
2976 .IP \(bu 4
2977 Various functions that take a filehandle argument in rvalue context
2978 (\f(CW\*(C`close\*(C'\fR, \f(CW\*(C`readline\*(C'\fR, etc.) used to warn twice for an undefined handle
2979 [perl #97482].
2980 .IP \(bu 4
2981 \&\f(CW\*(C`dbmopen\*(C'\fR now only warns once, rather than three times, if the mode
2982 argument is \f(CW\*(C`undef\*(C'\fR [perl #90064].
2983 .IP \(bu 4
2984 The \f(CW\*(C`+=\*(C'\fR operator does not usually warn when the left\-hand side is
2985 \&\f(CW\*(C`undef\*(C'\fR, but it was doing so for tied variables. This has been fixed
2986 [perl #44895].
2987 .IP \(bu 4
2988 A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized"
2989 warnings to report the wrong variable if the operator in question had
2990 two operands and one was \f(CW\*(C`%{...}\*(C'\fR or \f(CW\*(C`@{...}\*(C'\fR. This has been fixed
2991 [perl #103766].
2992 .IP \(bu 4
2993 \&\f(CW\*(C`..\*(C'\fR and \f(CW\*(C`...\*(C'\fR in list context now mention the name of the variable in
2994 "uninitialized" warnings for string (as opposed to numeric) ranges.
2995 .SS "Weak references"
2996 .IX Subsection "Weak references"
2997 .IP \(bu 4
2998 Weakening the first argument to an automatically\-invoked \f(CW\*(C`DESTROY\*(C'\fR method
2999 could result in erroneous "DESTROY created new reference" errors or
3000 crashes. Now it is an error to weaken a read\-only reference.
3001 .IP \(bu 4
3002 Weak references to lexical hashes going out of scope were not going stale
3003 (becoming undefined), but continued to point to the hash.
3004 .IP \(bu 4
3005 Weak references to lexical variables going out of scope are now broken
3006 before any magical methods (e.g., DESTROY on a tie object) are called.
3007 This prevents such methods from modifying the variable that will be seen
3008 the next time the scope is entered.
3009 .IP \(bu 4
3010 Creating a weak reference to an \f(CW@ISA\fR array or accessing the array index
3011 (\f(CW$#ISA\fR) could result in confused internal bookkeeping for elements
3012 later added to the \f(CW@ISA\fR array. For instance, creating a weak
3013 reference to the element itself could push that weak reference on to \f(CW@ISA\fR;
3014 and elements added after use of \f(CW$#ISA\fR would be ignored by method lookup
3015 [perl #85670].
3016 .SS "Other notable fixes"
3017 .IX Subsection "Other notable fixes"
3018 .IP \(bu 4
3019 \&\f(CW\*(C`quotemeta\*(C'\fR now quotes consistently the same non\-ASCII characters under
3020 \&\f(CW\*(C`use feature \*(Aqunicode_strings\*(Aq\*(C'\fR, regardless of whether the string is
3021 encoded in UTF\-8 or not, hence fixing the last vestiges (we hope) of the
3022 notorious "The "Unicode Bug"" in perlunicode. [perl #77654].
3023 .Sp
3024 Which of these code points is quoted has changed, based on Unicode\*(Aqs
3025 recommendations. See "quotemeta" in perlfunc for details.
3026 .IP \(bu 4
3027 \&\f(CW\*(C`study\*(C'\fR is now a no\-op, presumably fixing all outstanding bugs related to
3028 study causing regex matches to behave incorrectly!
3029 .IP \(bu 4
3030 When one writes \f(CW\*(C`open foo || die\*(C'\fR, which used to work in Perl 4, a
3031 "Precedence problem" warning is produced. This warning used erroneously to
3032 apply to fully\-qualified bareword handle names not followed by \f(CW\*(C`||\*(C'\fR. This
3033 has been corrected.
3034 .IP \(bu 4
3035 After package aliasing (\f(CW\*(C`*foo:: = *bar::\*(C'\fR), \f(CW\*(C`select\*(C'\fR with 0 or 1 argument
3036 would sometimes return a name that could not be used to refer to the
3037 filehandle, or sometimes it would return \f(CW\*(C`undef\*(C'\fR even when a filehandle
3038 was selected. Now it returns a typeglob reference in such cases.
3039 .IP \(bu 4
3040 \&\f(CW\*(C`PerlIO::get_layers\*(C'\fR no longer ignores some arguments that it thinks are
3041 numeric, while treating others as filehandle names. It is now consistent
3042 for flat scalars (i.e., not references).
3043 .IP \(bu 4
3044 Unrecognized switches on \f(CW\*(C`#!\*(C'\fR line
3045 .Sp
3046 If a switch, such as \fB\-x\fR, that cannot occur on the \f(CW\*(C`#!\*(C'\fR line is used
3047 there, perl dies with "Can\*(Aqt emulate...".
3048 .Sp
3049 It used to produce the same message for switches that perl did not
3050 recognize at all, whether on the command line or the \f(CW\*(C`#!\*(C'\fR line.
3051 .Sp
3052 Now it produces the "Unrecognized switch" error message [perl #104288].
3053 .IP \(bu 4
3054 \&\f(CW\*(C`system\*(C'\fR now temporarily blocks the SIGCHLD signal handler, to prevent the
3055 signal handler from stealing the exit status [perl #105700].
3056 .IP \(bu 4
3057 The \f(CW%n\fR formatting code for \f(CW\*(C`printf\*(C'\fR and \f(CW\*(C`sprintf\*(C'\fR, which causes the number
3058 of characters to be assigned to the next argument, now actually
3059 assigns the number of characters, instead of the number of bytes.
3060 .Sp
3061 It also works now with special lvalue functions like \f(CW\*(C`substr\*(C'\fR and with
3062 nonexistent hash and array elements [perl #3471, #103492].
3063 .IP \(bu 4
3064 Perl skips copying values returned from a subroutine, for the sake of
3065 speed, if doing so would make no observable difference. Because of faulty
3066 logic, this would happen with the
3067 result of \f(CW\*(C`delete\*(C'\fR, \f(CW\*(C`shift\*(C'\fR or \f(CW\*(C`splice\*(C'\fR, even if the result was
3068 referenced elsewhere. It also did so with tied variables about to be freed
3069 [perl #91844, #95548].
3070 .IP \(bu 4
3071 \&\f(CW\*(C`utf8::decode\*(C'\fR now refuses to modify read\-only scalars [perl #91850].
3072 .IP \(bu 4
3073 Freeing \f(CW$_\fR inside a \f(CW\*(C`grep\*(C'\fR or \f(CW\*(C`map\*(C'\fR block, a code block embedded in a
3074 regular expression, or an \f(CW@INC\fR filter (a subroutine returned by a
3075 subroutine in \f(CW@INC\fR) used to result in double frees or crashes
3076 [perl #91880, #92254, #92256].
3077 .IP \(bu 4
3078 \&\f(CW\*(C`eval\*(C'\fR returns \f(CW\*(C`undef\*(C'\fR in scalar context or an empty list in list
3079 context when there is a run\-time error. When \f(CW\*(C`eval\*(C'\fR was passed a
3080 string in list context and a syntax error occurred, it used to return a
3081 list containing a single undefined element. Now it returns an empty
3082 list in list context for all errors [perl #80630].
3083 .IP \(bu 4
3084 \&\f(CW\*(C`goto &func\*(C'\fR no longer crashes, but produces an error message, when
3085 the unwinding of the current subroutine\*(Aqs scope fires a destructor that
3086 undefines the subroutine being "goneto" [perl #99850].
3087 .IP \(bu 4
3088 Perl now holds an extra reference count on the package that code is
3089 currently compiling in. This means that the following code no longer
3090 crashes [perl #101486]:
3091 .Sp
3092 .Vb 3
3093 \& package Foo;
3094 \& BEGIN {*Foo:: = *Bar::}
3095 \& sub foo;
3096 .Ve
3097 .IP \(bu 4
3098 The \f(CW\*(C`x\*(C'\fR repetition operator no longer crashes on 64\-bit builds with large
3099 repeat counts [perl #94560].
3100 .IP \(bu 4
3101 Calling \f(CW\*(C`require\*(C'\fR on an implicit \f(CW$_\fR when \f(CW*CORE::GLOBAL::require\fR has
3102 been overridden does not segfault anymore, and \f(CW$_\fR is now passed to the
3103 overriding subroutine [perl #78260].
3104 .IP \(bu 4
3105 \&\f(CW\*(C`use\*(C'\fR and \f(CW\*(C`require\*(C'\fR are no longer affected by the I/O layers active in
3106 the caller\*(Aqs scope (enabled by open.pm) [perl #96008].
3107 .IP \(bu 4
3108 \&\f(CW\*(C`our $::é; $é\*(C'\fR (which is invalid) no longer produces the "Compilation
3109 error at lib/utf8_heavy.pl..." error message, which it started emitting in
3110 5.10.0 [perl #99984].
3111 .IP \(bu 4
3112 On 64\-bit systems, \f(CWread()\fR now understands large string offsets beyond
3113 the 32\-bit range.
3114 .IP \(bu 4
3115 Errors that occur when processing subroutine attributes no longer cause the
3116 subroutine\*(Aqs op tree to leak.
3117 .IP \(bu 4
3118 Passing the same constant subroutine to both \f(CW\*(C`index\*(C'\fR and \f(CW\*(C`formline\*(C'\fR no
3119 longer causes one or the other to fail [perl #89218]. (5.14.1)
3120 .IP \(bu 4
3121 List assignment to lexical variables declared with attributes in the same
3122 statement (\f(CW\*(C`my ($x,@y) : blimp = (72,94)\*(C'\fR) stopped working in Perl 5.8.0.
3123 It has now been fixed.
3124 .IP \(bu 4
3125 Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of
3126 a pack template equivalent to "U0" if the input string was empty. This has
3127 been fixed [perl #90160]. (5.14.2)
3128 .IP \(bu 4
3129 Destructors on objects were not called during global destruction on objects
3130 that were not referenced by any scalars. This could happen if an array
3131 element were blessed (e.g., \f(CW\*(C`bless \e$a[0]\*(C'\fR) or if a closure referenced a
3132 blessed variable (\f(CW\*(C`bless \emy @a; sub foo { @a }\*(C'\fR).
3133 .Sp
3134 Now there is an extra pass during global destruction to fire destructors on
3135 any objects that might be left after the usual passes that check for
3136 objects referenced by scalars [perl #36347].
3137 .IP \(bu 4
3138 Fixed a case where it was possible that a freed buffer may have been read
3139 from when parsing a here document [perl #90128]. (5.14.1)
3140 .IP \(bu 4
3141 \&\f(CWeach(\fR\f(CIARRAY\fR\f(CW)\fR is now wrapped in \f(CWdefined(...)\fR, like \f(CWeach(\fR\f(CIHASH\fR\f(CW)\fR,
3142 inside a \f(CW\*(C`while\*(C'\fR condition [perl #90888].
3143 .IP \(bu 4
3144 A problem with context propagation when a \f(CW\*(C`do\*(C'\fR block is an argument to
3145 \&\f(CW\*(C`return\*(C'\fR has been fixed. It used to cause \f(CW\*(C`undef\*(C'\fR to be returned in
3146 certain cases of a \f(CW\*(C`return\*(C'\fR inside an \f(CW\*(C`if\*(C'\fR block which itself is followed by
3147 another \f(CW\*(C`return\*(C'\fR.
3148 .IP \(bu 4
3149 Calling \f(CW\*(C`index\*(C'\fR with a tainted constant no longer causes constants in
3150 subsequently compiled code to become tainted [perl #64804].
3151 .IP \(bu 4
3152 Infinite loops like \f(CW\*(C`1 while 1\*(C'\fR used to stop \f(CW\*(C`strict \*(Aqsubs\*(Aq\*(C'\fR mode from
3153 working for the rest of the block.
3154 .IP \(bu 4
3155 For list assignments like \f(CW\*(C`($a,$b) = ($b,$a)\*(C'\fR, Perl has to make a copy of
3156 the items on the right\-hand side before assignment them to the left. For
3157 efficiency\*(Aqs sake, it assigns the values on the right straight to the items
3158 on the left if no one variable is mentioned on both sides, as in \f(CW\*(C`($a,$b) =
3159 ($c,$d)\*(C'\fR. The logic for determining when it can cheat was faulty, in that
3160 \&\f(CW\*(C`&&\*(C'\fR and \f(CW\*(C`||\*(C'\fR on the right\-hand side could fool it. So \f(CW\*(C`($a,$b) =
3161 $some_true_value && ($b,$a)\*(C'\fR would end up assigning the value of \f(CW$b\fR to
3162 both scalars.
3163 .IP \(bu 4
3164 Perl no longer tries to apply lvalue context to the string in
3165 \&\f(CW\*(C`("string", $variable) ||= 1\*(C'\fR (which used to be an error). Since the
3166 left\-hand side of \f(CW\*(C`||=\*(C'\fR is evaluated in scalar context, that\*(Aqs a scalar
3167 comma operator, which gives all but the last item void context. There is
3168 no such thing as void lvalue context, so it was a mistake for Perl to try
3169 to force it [perl #96942].
3170 .IP \(bu 4
3171 \&\f(CW\*(C`caller\*(C'\fR no longer leaks memory when called from the DB package if
3172 \&\f(CW@DB::args\fR was assigned to after the first call to \f(CW\*(C`caller\*(C'\fR. Carp
3173 was triggering this bug [perl #97010]. (5.14.2)
3174 .IP \(bu 4
3175 \&\f(CW\*(C`close\*(C'\fR and similar filehandle functions, when called on built\-in global
3176 variables (like \f(CW$+\fR), used to die if the variable happened to hold the
3177 undefined value, instead of producing the usual "Use of uninitialized
3178 value" warning.
3179 .IP \(bu 4
3180 When autovivified file handles were introduced in Perl 5.6.0, \f(CW\*(C`readline\*(C'\fR
3181 was inadvertently made to autovivify when called as \f(CWreadline($foo)\fR (but
3182 not as \f(CW\*(C`<$foo>\*(C'\fR). It has now been fixed never to autovivify.
3183 .IP \(bu 4
3184 Calling an undefined anonymous subroutine (e.g., what \f(CW$x\fR holds after
3185 \&\f(CW\*(C`undef &{$x = sub{}}\*(C'\fR) used to cause a "Not a CODE reference" error, which
3186 has been corrected to "Undefined subroutine called" [perl #71154].
3187 .IP \(bu 4
3188 Causing \f(CW@DB::args\fR to be freed between uses of \f(CW\*(C`caller\*(C'\fR no longer
3189 results in a crash [perl #93320].
3190 .IP \(bu 4
3191 \&\f(CWsetpgrp($foo)\fR used to be equivalent to \f(CW\*(C`($foo, setpgrp)\*(C'\fR, because
3192 \&\f(CW\*(C`setpgrp\*(C'\fR was ignoring its argument if there was just one. Now it is
3193 equivalent to \f(CW\*(C`setpgrp($foo,0)\*(C'\fR.
3194 .IP \(bu 4
3195 \&\f(CW\*(C`shmread\*(C'\fR was not setting the scalar flags correctly when reading from
3196 shared memory, causing the existing cached numeric representation in the
3197 scalar to persist [perl #98480].
3198 .IP \(bu 4
3199 \&\f(CW\*(C`++\*(C'\fR and \f(CW\*(C`\-\-\*(C'\fR now work on copies of globs, instead of dying.
3200 .IP \(bu 4
3201 \&\f(CWsplice()\fR doesn\*(Aqt warn when truncating
3202 .Sp
3203 You can now limit the size of an array using \f(CW\*(C`splice(@a,MAX_LEN)\*(C'\fR without
3204 worrying about warnings.
3205 .IP \(bu 4
3206 \&\f(CW$$\fR is no longer tainted. Since this value comes directly from
3207 \&\f(CWgetpid()\fR, it is always safe.
3208 .IP \(bu 4
3209 The parser no longer leaks a filehandle if STDIN was closed before parsing
3210 started [perl #37033].
3211 .IP \(bu 4
3212 \&\f(CW\*(C`die;\*(C'\fR with a non\-reference, non\-string, or magical (e.g., tainted)
3213 value in $@ now properly propagates that value [perl #111654].
3214 .SH "Known Problems"
3215 .IX Header "Known Problems"
3216 .IP \(bu 4
3217 On Solaris, we have two kinds of failure.
3218 .Sp
3219 If \fImake\fR is Sun\*(Aqs \fImake\fR, we get an error about a badly formed macro
3220 assignment in the \fIMakefile\fR. That happens when \fI./Configure\fR tries to
3221 make depends. \fIConfigure\fR then exits 0, but further \fImake\fR\-ing fails.
3222 .Sp
3223 If \fImake\fR is \fIgmake\fR, \fIConfigure\fR completes, then we get errors related
3224 to \fI/usr/include/stdbool.h\fR
3225 .IP \(bu 4
3226 On Win32, a number of tests hang unless STDERR is redirected. The cause of
3227 this is still under investigation.
3228 .IP \(bu 4
3229 When building as root with a umask that prevents files from being
3230 other\-readable, \fIt/op/filetest.t\fR will fail. This is a test bug, not a
3231 bug in perl\*(Aqs behavior.
3232 .IP \(bu 4
3233 Configuring with a recent gcc and link\-time\-optimization, such as
3234 \&\f(CW\*(C`Configure \-Doptimize=\*(Aq\-O2 \-flto\*(Aq\*(C'\fR fails
3235 because the optimizer optimizes away some of Configure\*(Aqs tests. A
3236 workaround is to omit the \f(CW\*(C`\-flto\*(C'\fR flag when running Configure, but add
3237 it back in while actually building, something like
3238 .Sp
3239 .Vb 2
3240 \& sh Configure \-Doptimize=\-O2
3241 \& make OPTIMIZE=\*(Aq\-O2 \-flto\*(Aq
3242 .Ve
3243 .IP \(bu 4
3244 The following CPAN modules have test failures with perl 5.16. Patches have
3245 been submitted for all of these, so hopefully there will be new releases
3246 soon:
3247 .RS 4
3248 .IP \(bu 4
3249 Date::Pcalc version 6.1
3250 .IP \(bu 4
3251 Module::CPANTS::Analyse version 0.85
3252 .Sp
3253 This fails due to problems in Module::Find 0.10 and File::MMagic
3254 1.27.
3255 .IP \(bu 4
3256 PerlIO::Util version 0.72
3257 .RE
3258 .RS 4
3259 .RE
3260 .SH Acknowledgements
3261 .IX Header "Acknowledgements"
3262 Perl 5.16.0 represents approximately 12 months of development since Perl
3263 5.14.0 and contains approximately 590,000 lines of changes across 2,500
3264 files from 139 authors.
3265 .PP
3266 Perl continues to flourish into its third decade thanks to a vibrant
3267 community of users and developers. The following people are known to
3268 have contributed the improvements that became Perl 5.16.0:
3269 .PP
3270 Aaron Crane, Abhijit Menon\-Sen, Abigail, Alan Haggai Alavi, Alberto
3271 Simões, Alexandr Ciornii, Andreas König, Andy Dougherty, Aristotle
3272 Pagaltzis, Bo Johansson, Bo Lindbergh, Breno G. de Oliveira, brian d
3273 foy, Brian Fraser, Brian Greenfield, Carl Hayter, Chas. Owens,
3274 Chia\-liang Kao, Chip Salzenberg, Chris \*(AqBinGOs\*(Aq Williams, Christian
3275 Hansen, Christopher J. Madsen, chromatic, Claes Jacobsson, Claudio
3276 Ramirez, Craig A. Berry, Damian Conway, Daniel Kahn Gillmor, Darin
3277 McBride, Dave Rolsky, David Cantrell, David Golden, David Leadbeater,
3278 David Mitchell, Dee Newcum, Dennis Kaarsemaker, Dominic Hargreaves,
3279 Douglas Christopher Wilson, Eric Brine, Father Chrysostomos, Florian
3280 Ragwitz, Frederic Briere, George Greer, Gerard Goossen, Gisle Aas,
3281 H.Merijn Brand, Hojung Youn, Ian Goodacre, James E Keenan, Jan Dubois,
3282 Jerry D. Hedden, Jesse Luehrs, Jesse Vincent, Jilles Tjoelker, Jim
3283 Cromie, Jim Meyering, Joel Berger, Johan Vromans, Johannes Plunien, John
3284 Hawkinson, John P. Linderman, John Peacock, Joshua ben Jore, Juerd
3285 Waalboer, Karl Williamson, Karthik Rajagopalan, Keith Thompson, Kevin J.
3286 Woolley, Kevin Ryde, Laurent Dami, Leo Lapworth, Leon Brocard, Leon
3287 Timmermans, Louis Strous, Lukas Mai, Marc Green, Marcel Grünauer, Mark
3288 A. Stratman, Mark Dootson, Mark Jason Dominus, Martin Hasch, Matthew
3289 Horsfall, Max Maischein, Michael G Schwern, Michael Witten, Mike
3290 Sheldrake, Moritz Lenz, Nicholas Clark, Niko Tyni, Nuno Carvalho, Pau
3291 Amma, Paul Evans, Paul Green, Paul Johnson, Perlover, Peter John Acklam,
3292 Peter Martini, Peter Scott, Phil Monsen, Pino Toscano, Rafael
3293 Garcia\-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Robin Barker,
3294 Rodolfo Carvalho, Salvador Fandiño, Sam Kimbrel, Samuel Thibault, Shawn
3295 M Moore, Shigeya Suzuki, Shirakata Kentaro, Shlomi Fish, Sisyphus,
3296 Slaven Rezic, Spiros Denaxas, Steffen Müller, Steffen Schwigon, Stephen
3297 Bennett, Stephen Oberholtzer, Stevan Little, Steve Hay, Steve Peters,
3298 Thomas Sibley, Thorsten Glaser, Timothe Litt, Todd Rinaldo, Tom
3299 Christiansen, Tom Hukins, Tony Cook, Vadim Konovalov, Vincent Pit,
3300 Vladimir Timofeev, Walt Mankowski, Yves Orton, Zefram, Zsbán Ambrus,
3301 Ævar Arnfjörð Bjarmason.
3302 .PP
3303 The list above is almost certainly incomplete as it is automatically
3304 generated from version control history. In particular, it does not
3305 include the names of the (very much appreciated) contributors who
3306 reported issues to the Perl bug tracker.
3307 .PP
3308 Many of the changes included in this version originated in the CPAN
3309 modules included in Perl\*(Aqs core. We\*(Aqre grateful to the entire CPAN
3310 community for helping Perl to flourish.
3311 .PP
3312 For a more complete list of all of Perl\*(Aqs historical contributors,
3313 please see the \fIAUTHORS\fR file in the Perl source distribution.
3314 .SH "Reporting Bugs"
3315 .IX Header "Reporting Bugs"
3316 If you find what you think is a bug, you might check the articles
3317 recently posted to the comp.lang.perl.misc newsgroup and the perl
3318 bug database at <http://rt.perl.org/perlbug/>. There may also be
3319 information at <http://www.perl.org/>, the Perl Home Page.
3320 .PP
3321 If you believe you have an unreported bug, please run the perlbug
3322 program included with your release. Be sure to trim your bug down
3323 to a tiny but sufficient test case. Your bug report, along with the
3324 output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to [email protected] to be
3325 analysed by the Perl porting team.
3326 .PP
3327 If the bug you are reporting has security implications, which make it
3328 inappropriate to send to a publicly archived mailing list, then please
3329 send it to perl5\-security\[email protected]. This points to a closed
3330 subscription unarchived mailing list, which includes all core
3331 committers, who will be able to help assess the impact of issues, figure
3332 out a resolution, and help co\-ordinate the release of patches to
3333 mitigate or fix the problem across all platforms on which Perl is
3334 supported. Please use this address only for security issues in the Perl
3335 core, not for modules independently distributed on CPAN.
3336 .SH "SEE ALSO"
3337 .IX Header "SEE ALSO"
3338 The \fIChanges\fR file for an explanation of how to view exhaustive details
3339 on what changed.
3340 .PP
3341 The \fIINSTALL\fR file for how to build Perl.
3342 .PP
3343 The \fIREADME\fR file for general stuff.
3344 .PP
3345 The \fIArtistic\fR and \fICopying\fR files for copyright information.