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