Debian Codegraph @

upstream/debian-unstable/man1/perl5160delta.1

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