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