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