1PERL5180DELTA(1) Perl Programmers Reference Guide PERL5180DELTA(1)
2
3
4
6 perl5180delta - what is new for perl v5.18.0
7
9 This document describes differences between the v5.16.0 release and the
10 v5.18.0 release.
11
12 If you are upgrading from an earlier release such as v5.14.0, first
13 read perl5160delta, which describes differences between v5.14.0 and
14 v5.16.0.
15
17 New mechanism for experimental features
18 Newly-added experimental features will now require this incantation:
19
20 no warnings "experimental::feature_name";
21 use feature "feature_name"; # would warn without the prev line
22
23 There is a new warnings category, called "experimental", containing
24 warnings that the feature pragma emits when enabling experimental
25 features.
26
27 Newly-added experimental features will also be given special warning
28 IDs, which consist of "experimental::" followed by the name of the
29 feature. (The plan is to extend this mechanism eventually to all
30 warnings, to allow them to be enabled or disabled individually, and not
31 just by category.)
32
33 By saying
34
35 no warnings "experimental::feature_name";
36
37 you are taking responsibility for any breakage that future changes to,
38 or removal of, the feature may cause.
39
40 Since some features (like "~~" or "my $_") now emit experimental
41 warnings, and you may want to disable them in code that is also run on
42 perls that do not recognize these warning categories, consider using
43 the "if" pragma like this:
44
45 no if $] >= 5.018, warnings => "experimental::feature_name";
46
47 Existing experimental features may begin emitting these warnings, too.
48 Please consult perlexperiment for information on which features are
49 considered experimental.
50
51 Hash overhaul
52 Changes to the implementation of hashes in perl v5.18.0 will be one of
53 the most visible changes to the behavior of existing code.
54
55 By default, two distinct hash variables with identical keys and values
56 may now provide their contents in a different order where it was
57 previously identical.
58
59 When encountering these changes, the key to cleaning up from them is to
60 accept that hashes are unordered collections and to act accordingly.
61
62 Hash randomization
63
64 The seed used by Perl's hash function is now random. This means that
65 the order which keys/values will be returned from functions like
66 "keys()", "values()", and "each()" will differ from run to run.
67
68 This change was introduced to make Perl's hashes more robust to
69 algorithmic complexity attacks, and also because we discovered that it
70 exposes hash ordering dependency bugs and makes them easier to track
71 down.
72
73 Toolchain maintainers might want to invest in additional infrastructure
74 to test for things like this. Running tests several times in a row and
75 then comparing results will make it easier to spot hash order
76 dependencies in code. Authors are strongly encouraged not to expose
77 the key order of Perl's hashes to insecure audiences.
78
79 Further, every hash has its own iteration order, which should make it
80 much more difficult to determine what the current hash seed is.
81
82 New hash functions
83
84 Perl v5.18 includes support for multiple hash functions, and changed
85 the default (to ONE_AT_A_TIME_HARD), you can choose a different
86 algorithm by defining a symbol at compile time. For a current list,
87 consult the INSTALL document. Note that as of Perl v5.18 we can only
88 recommend use of the default or SIPHASH. All the others are known to
89 have security issues and are for research purposes only.
90
91 PERL_HASH_SEED environment variable now takes a hex value
92
93 "PERL_HASH_SEED" no longer accepts an integer as a parameter; instead
94 the value is expected to be a binary value encoded in a hex string,
95 such as "0xf5867c55039dc724". This is to make the infrastructure
96 support hash seeds of arbitrary lengths, which might exceed that of an
97 integer. (SipHash uses a 16 byte seed.)
98
99 PERL_PERTURB_KEYS environment variable added
100
101 The "PERL_PERTURB_KEYS" environment variable allows one to control the
102 level of randomization applied to "keys" and friends.
103
104 When "PERL_PERTURB_KEYS" is 0, perl will not randomize the key order at
105 all. The chance that "keys" changes due to an insert will be the same
106 as in previous perls, basically only when the bucket size is changed.
107
108 When "PERL_PERTURB_KEYS" is 1, perl will randomize keys in a non-
109 repeatable way. The chance that "keys" changes due to an insert will be
110 very high. This is the most secure and default mode.
111
112 When "PERL_PERTURB_KEYS" is 2, perl will randomize keys in a repeatable
113 way. Repeated runs of the same program should produce the same output
114 every time.
115
116 "PERL_HASH_SEED" implies a non-default "PERL_PERTURB_KEYS" setting.
117 Setting "PERL_HASH_SEED=0" (exactly one 0) implies
118 "PERL_PERTURB_KEYS=0" (hash key randomization disabled); setting
119 "PERL_HASH_SEED" to any other value implies "PERL_PERTURB_KEYS=2"
120 (deterministic and repeatable hash key randomization). Specifying
121 "PERL_PERTURB_KEYS" explicitly to a different level overrides this
122 behavior.
123
124 Hash::Util::hash_seed() now returns a string
125
126 Hash::Util::hash_seed() now returns a string instead of an integer.
127 This is to make the infrastructure support hash seeds of arbitrary
128 lengths which might exceed that of an integer. (SipHash uses a 16 byte
129 seed.)
130
131 Output of PERL_HASH_SEED_DEBUG has been changed
132
133 The environment variable PERL_HASH_SEED_DEBUG now makes perl show both
134 the hash function perl was built with, and the seed, in hex, in use for
135 that process. Code parsing this output, should it exist, must change to
136 accommodate the new format. Example of the new format:
137
138 $ PERL_HASH_SEED_DEBUG=1 ./perl -e1
139 HASH_FUNCTION = MURMUR3 HASH_SEED = 0x1476bb9f
140
141 Upgrade to Unicode 6.2
142 Perl now supports Unicode 6.2. A list of changes from Unicode 6.1 is
143 at <http://www.unicode.org/versions/Unicode6.2.0>.
144
145 Character name aliases may now include non-Latin1-range characters
146 It is possible to define your own names for characters for use in
147 "\N{...}", "charnames::vianame()", etc. These names can now be
148 comprised of characters from the whole Unicode range. This allows for
149 names to be in your native language, and not just English. Certain
150 restrictions apply to the characters that may be used (you can't define
151 a name that has punctuation in it, for example). See "CUSTOM ALIASES"
152 in charnames.
153
154 New DTrace probes
155 The following new DTrace probes have been added:
156
157 • "op-entry"
158
159 • "loading-file"
160
161 • "loaded-file"
162
163 "${^LAST_FH}"
164 This new variable provides access to the filehandle that was last read.
165 This is the handle used by $. and by "tell" and "eof" without
166 arguments.
167
168 Regular Expression Set Operations
169 This is an experimental feature to allow matching against the union,
170 intersection, etc., of sets of code points, similar to
171 Unicode::Regex::Set. It can also be used to extend "/x" processing to
172 [bracketed] character classes, and as a replacement of user-defined
173 properties, allowing more complex expressions than they do. See
174 "Extended Bracketed Character Classes" in perlrecharclass.
175
176 Lexical subroutines
177 This new feature is still considered experimental. To enable it:
178
179 use 5.018;
180 no warnings "experimental::lexical_subs";
181 use feature "lexical_subs";
182
183 You can now declare subroutines with "state sub foo", "my sub foo", and
184 "our sub foo". ("state sub" requires that the "state" feature be
185 enabled, unless you write it as "CORE::state sub foo".)
186
187 "state sub" creates a subroutine visible within the lexical scope in
188 which it is declared. The subroutine is shared between calls to the
189 outer sub.
190
191 "my sub" declares a lexical subroutine that is created each time the
192 enclosing block is entered. "state sub" is generally slightly faster
193 than "my sub".
194
195 "our sub" declares a lexical alias to the package subroutine of the
196 same name.
197
198 For more information, see "Lexical Subroutines" in perlsub.
199
200 Computed Labels
201 The loop controls "next", "last" and "redo", and the special "dump"
202 operator, now allow arbitrary expressions to be used to compute labels
203 at run time. Previously, any argument that was not a constant was
204 treated as the empty string.
205
206 More CORE:: subs
207 Several more built-in functions have been added as subroutines to the
208 CORE:: namespace - namely, those non-overridable keywords that can be
209 implemented without custom parsers: "defined", "delete", "exists",
210 "glob", "pos", "prototype", "scalar", "split", "study", and "undef".
211
212 As some of these have prototypes, "prototype('CORE::...')" has been
213 changed to not make a distinction between overridable and non-
214 overridable keywords. This is to make "prototype('CORE::pos')"
215 consistent with "prototype(&CORE::pos)".
216
217 "kill" with negative signal names
218 "kill" has always allowed a negative signal number, which kills the
219 process group instead of a single process. It has also allowed signal
220 names. But it did not behave consistently, because negative signal
221 names were treated as 0. Now negative signals names like "-INT" are
222 supported and treated the same way as -2 [perl #112990].
223
225 See also: hash overhaul
226 Some of the changes in the hash overhaul were made to enhance security.
227 Please read that section.
228
229 "Storable" security warning in documentation
230 The documentation for "Storable" now includes a section which warns
231 readers of the danger of accepting Storable documents from untrusted
232 sources. The short version is that deserializing certain types of data
233 can lead to loading modules and other code execution. This is
234 documented behavior and wanted behavior, but this opens an attack
235 vector for malicious entities.
236
237 "Locale::Maketext" allowed code injection via a malicious template
238 If users could provide a translation string to Locale::Maketext, this
239 could be used to invoke arbitrary Perl subroutines available in the
240 current process.
241
242 This has been fixed, but it is still possible to invoke any method
243 provided by "Locale::Maketext" itself or a subclass that you are using.
244 One of these methods in turn will invoke the Perl core's "sprintf"
245 subroutine.
246
247 In summary, allowing users to provide translation strings without
248 auditing them is a bad idea.
249
250 This vulnerability is documented in CVE-2012-6329.
251
252 Avoid calling memset with a negative count
253 Poorly written perl code that allows an attacker to specify the count
254 to perl's "x" string repeat operator can already cause a memory
255 exhaustion denial-of-service attack. A flaw in versions of perl before
256 v5.15.5 can escalate that into a heap buffer overrun; coupled with
257 versions of glibc before 2.16, it possibly allows the execution of
258 arbitrary code.
259
260 The flaw addressed to this commit has been assigned identifier
261 CVE-2012-5195 and was researched by Tim Brown.
262
264 See also: hash overhaul
265 Some of the changes in the hash overhaul are not fully compatible with
266 previous versions of perl. Please read that section.
267
268 An unknown character name in "\N{...}" is now a syntax error
269 Previously, it warned, and the Unicode REPLACEMENT CHARACTER was
270 substituted. Unicode now recommends that this situation be a syntax
271 error. Also, the previous behavior led to some confusing warnings and
272 behaviors, and since the REPLACEMENT CHARACTER has no use other than as
273 a stand-in for some unknown character, any code that has this problem
274 is buggy.
275
276 Formerly deprecated characters in "\N{}" character name aliases are now
277 errors.
278 Since v5.12.0, it has been deprecated to use certain characters in
279 user-defined "\N{...}" character names. These now cause a syntax
280 error. For example, it is now an error to begin a name with a digit,
281 such as in
282
283 my $undraftable = "\N{4F}"; # Syntax error!
284
285 or to have commas anywhere in the name. See "CUSTOM ALIASES" in
286 charnames.
287
288 "\N{BELL}" now refers to U+1F514 instead of U+0007
289 Unicode 6.0 reused the name "BELL" for a different code point than it
290 traditionally had meant. Since Perl v5.14, use of this name still
291 referred to U+0007, but would raise a deprecation warning. Now, "BELL"
292 refers to U+1F514, and the name for U+0007 is "ALERT". All the
293 functions in charnames have been correspondingly updated.
294
295 New Restrictions in Multi-Character Case-Insensitive Matching in Regular
296 Expression Bracketed Character Classes
297 Unicode has now withdrawn their previous recommendation for regular
298 expressions to automatically handle cases where a single character can
299 match multiple characters case-insensitively, for example, the letter
300 LATIN SMALL LETTER SHARP S and the sequence "ss". This is because it
301 turns out to be impracticable to do this correctly in all
302 circumstances. Because Perl has tried to do this as best it can, it
303 will continue to do so. (We are considering an option to turn it off.)
304 However, a new restriction is being added on such matches when they
305 occur in [bracketed] character classes. People were specifying things
306 such as "/[\0-\xff]/i", and being surprised that it matches the two
307 character sequence "ss" (since LATIN SMALL LETTER SHARP S occurs in
308 this range). This behavior is also inconsistent with using a property
309 instead of a range: "\p{Block=Latin1}" also includes LATIN SMALL
310 LETTER SHARP S, but "/[\p{Block=Latin1}]/i" does not match "ss". The
311 new rule is that for there to be a multi-character case-insensitive
312 match within a bracketed character class, the character must be
313 explicitly listed, and not as an end point of a range. This more
314 closely obeys the Principle of Least Astonishment. See "Bracketed
315 Character Classes" in perlrecharclass. Note that a bug [perl #89774],
316 now fixed as part of this change, prevented the previous behavior from
317 working fully.
318
319 Explicit rules for variable names and identifiers
320 Due to an oversight, single character variable names in v5.16 were
321 completely unrestricted. This opened the door to several kinds of
322 insanity. As of v5.18, these now follow the rules of other
323 identifiers, in addition to accepting characters that match the
324 "\p{POSIX_Punct}" property.
325
326 There is no longer any difference in the parsing of identifiers
327 specified by using braces versus without braces. For instance, perl
328 used to allow "${foo:bar}" (with a single colon) but not $foo:bar. Now
329 that both are handled by a single code path, they are both treated the
330 same way: both are forbidden. Note that this change is about the range
331 of permissible literal identifiers, not other expressions.
332
333 Vertical tabs are now whitespace
334 No one could recall why "\s" didn't match "\cK", the vertical tab. Now
335 it does. Given the extreme rarity of that character, very little
336 breakage is expected. That said, here's what it means:
337
338 "\s" in a regex now matches a vertical tab in all circumstances.
339
340 Literal vertical tabs in a regex literal are ignored when the "/x"
341 modifier is used.
342
343 Leading vertical tabs, alone or mixed with other whitespace, are now
344 ignored when interpreting a string as a number. For example:
345
346 $dec = " \cK \t 123";
347 $hex = " \cK \t 0xF";
348
349 say 0 + $dec; # was 0 with warning, now 123
350 say int $dec; # was 0, now 123
351 say oct $hex; # was 0, now 15
352
353 "/(?{})/" and "/(??{})/" have been heavily reworked
354 The implementation of this feature has been almost completely
355 rewritten. Although its main intent is to fix bugs, some behaviors,
356 especially related to the scope of lexical variables, will have
357 changed. This is described more fully in the "Selected Bug Fixes"
358 section.
359
360 Stricter parsing of substitution replacement
361 It is no longer possible to abuse the way the parser parses "s///e"
362 like this:
363
364 %_=(_,"Just another ");
365 $_="Perl hacker,\n";
366 s//_}->{_/e;print
367
368 "given" now aliases the global $_
369 Instead of assigning to an implicit lexical $_, "given" now makes the
370 global $_ an alias for its argument, just like "foreach". However, it
371 still uses lexical $_ if there is lexical $_ in scope (again, just like
372 "foreach") [perl #114020].
373
374 The smartmatch family of features are now experimental
375 Smart match, added in v5.10.0 and significantly revised in v5.10.1, has
376 been a regular point of complaint. Although there are a number of ways
377 in which it is useful, it has also proven problematic and confusing for
378 both users and implementors of Perl. There have been a number of
379 proposals on how to best address the problem. It is clear that
380 smartmatch is almost certainly either going to change or go away in the
381 future. Relying on its current behavior is not recommended.
382
383 Warnings will now be issued when the parser sees "~~", "given", or
384 "when". To disable these warnings, you can add this line to the
385 appropriate scope:
386
387 no if $] >= 5.018, warnings => "experimental::smartmatch";
388
389 Consider, though, replacing the use of these features, as they may
390 change behavior again before becoming stable.
391
392 Lexical $_ is now experimental
393 Since it was introduced in Perl v5.10, it has caused much confusion
394 with no obvious solution:
395
396 • Various modules (e.g., List::Util) expect callback routines to use
397 the global $_. "use List::Util 'first'; my $_; first { $_ == 1 }
398 @list" does not work as one would expect.
399
400 • A "my $_" declaration earlier in the same file can cause confusing
401 closure warnings.
402
403 • The "_" subroutine prototype character allows called subroutines to
404 access your lexical $_, so it is not really private after all.
405
406 • Nevertheless, subroutines with a "(@)" prototype and methods cannot
407 access the caller's lexical $_, unless they are written in XS.
408
409 • But even XS routines cannot access a lexical $_ declared, not in
410 the calling subroutine, but in an outer scope, iff that subroutine
411 happened not to mention $_ or use any operators that default to $_.
412
413 It is our hope that lexical $_ can be rehabilitated, but this may cause
414 changes in its behavior. Please use it with caution until it becomes
415 stable.
416
417 readline() with "$/ = \N" now reads N characters, not N bytes
418 Previously, when reading from a stream with I/O layers such as
419 "encoding", the readline() function, otherwise known as the "<>"
420 operator, would read N bytes from the top-most layer. [perl #79960]
421
422 Now, N characters are read instead.
423
424 There is no change in behaviour when reading from streams with no extra
425 layers, since bytes map exactly to characters.
426
427 Overridden "glob" is now passed one argument
428 "glob" overrides used to be passed a magical undocumented second
429 argument that identified the caller. Nothing on CPAN was using this,
430 and it got in the way of a bug fix, so it was removed. If you really
431 need to identify the caller, see Devel::Callsite on CPAN.
432
433 Here doc parsing
434 The body of a here document inside a quote-like operator now always
435 begins on the line after the "<<foo" marker. Previously, it was
436 documented to begin on the line following the containing quote-like
437 operator, but that was only sometimes the case [perl #114040].
438
439 Alphanumeric operators must now be separated from the closing delimiter of
440 regular expressions
441 You may no longer write something like:
442
443 m/a/and 1
444
445 Instead you must write
446
447 m/a/ and 1
448
449 with whitespace separating the operator from the closing delimiter of
450 the regular expression. Not having whitespace has resulted in a
451 deprecation warning since Perl v5.14.0.
452
453 qw(...) can no longer be used as parentheses
454 "qw" lists used to fool the parser into thinking they were always
455 surrounded by parentheses. This permitted some surprising
456 constructions such as "foreach $x qw(a b c) {...}", which should really
457 be written "foreach $x (qw(a b c)) {...}". These would sometimes get
458 the lexer into the wrong state, so they didn't fully work, and the
459 similar "foreach qw(a b c) {...}" that one might expect to be permitted
460 never worked at all.
461
462 This side effect of "qw" has now been abolished. It has been
463 deprecated since Perl v5.13.11. It is now necessary to use real
464 parentheses everywhere that the grammar calls for them.
465
466 Interaction of lexical and default warnings
467 Turning on any lexical warnings used first to disable all default
468 warnings if lexical warnings were not already enabled:
469
470 $*; # deprecation warning
471 use warnings "void";
472 $#; # void warning; no deprecation warning
473
474 Now, the "debugging", "deprecated", "glob", "inplace" and "malloc"
475 warnings categories are left on when turning on lexical warnings
476 (unless they are turned off by "no warnings", of course).
477
478 This may cause deprecation warnings to occur in code that used to be
479 free of warnings.
480
481 Those are the only categories consisting only of default warnings.
482 Default warnings in other categories are still disabled by "use
483 warnings "category"", as we do not yet have the infrastructure for
484 controlling individual warnings.
485
486 "state sub" and "our sub"
487 Due to an accident of history, "state sub" and "our sub" were
488 equivalent to a plain "sub", so one could even create an anonymous sub
489 with "our sub { ... }". These are now disallowed outside of the
490 "lexical_subs" feature. Under the "lexical_subs" feature they have new
491 meanings described in "Lexical Subroutines" in perlsub.
492
493 Defined values stored in environment are forced to byte strings
494 A value stored in an environment variable has always been stringified
495 when inherited by child processes.
496
497 In this release, when assigning to %ENV, values are immediately
498 stringified, and converted to be only a byte string.
499
500 First, it is forced to be only a string. Then if the string is utf8
501 and the equivalent of "utf8::downgrade()" works, that result is used;
502 otherwise, the equivalent of "utf8::encode()" is used, and a warning is
503 issued about wide characters ("Diagnostics").
504
505 "require" dies for unreadable files
506 When "require" encounters an unreadable file, it now dies. It used to
507 ignore the file and continue searching the directories in @INC [perl
508 #113422].
509
510 "gv_fetchmeth_*" and SUPER
511 The various "gv_fetchmeth_*" XS functions used to treat a package whose
512 named ended with "::SUPER" specially. A method lookup on the
513 "Foo::SUPER" package would be treated as a "SUPER" method lookup on the
514 "Foo" package. This is no longer the case. To do a "SUPER" lookup,
515 pass the "Foo" stash and the "GV_SUPER" flag.
516
517 "split"'s first argument is more consistently interpreted
518 After some changes earlier in v5.17, "split"'s behavior has been
519 simplified: if the PATTERN argument evaluates to a string containing
520 one space, it is treated the way that a literal string containing one
521 space once was.
522
524 Module removals
525 The following modules will be removed from the core distribution in a
526 future release, and will at that time need to be installed from CPAN.
527 Distributions on CPAN which require these modules will need to list
528 them as prerequisites.
529
530 The core versions of these modules will now issue "deprecated"-category
531 warnings to alert you to this fact. To silence these deprecation
532 warnings, install the modules in question from CPAN.
533
534 Note that these are (with rare exceptions) fine modules that you are
535 encouraged to continue to use. Their disinclusion from core primarily
536 hinges on their necessity to bootstrapping a fully functional, CPAN-
537 capable Perl installation, not usually on concerns over their design.
538
539 encoding
540 The use of this pragma is now strongly discouraged. It conflates
541 the encoding of source text with the encoding of I/O data,
542 reinterprets escape sequences in source text (a questionable
543 choice), and introduces the UTF-8 bug to all runtime handling of
544 character strings. It is broken as designed and beyond repair.
545
546 For using non-ASCII literal characters in source text, please refer
547 to utf8. For dealing with textual I/O data, please refer to Encode
548 and open.
549
550 Archive::Extract
551 B::Lint
552 B::Lint::Debug
553 CPANPLUS and all included "CPANPLUS::*" modules
554 Devel::InnerPackage
555 Log::Message
556 Log::Message::Config
557 Log::Message::Handlers
558 Log::Message::Item
559 Log::Message::Simple
560 Module::Pluggable
561 Module::Pluggable::Object
562 Object::Accessor
563 Pod::LaTeX
564 Term::UI
565 Term::UI::History
566
567 Deprecated Utilities
568 The following utilities will be removed from the core distribution in a
569 future release as their associated modules have been deprecated. They
570 will remain available with the applicable CPAN distribution.
571
572 cpanp
573 "cpanp-run-perl"
574 cpan2dist
575 These items are part of the "CPANPLUS" distribution.
576
577 pod2latex
578 This item is part of the "Pod::LaTeX" distribution.
579
580 PL_sv_objcount
581 This interpreter-global variable used to track the total number of Perl
582 objects in the interpreter. It is no longer maintained and will be
583 removed altogether in Perl v5.20.
584
585 Five additional characters should be escaped in patterns with "/x"
586 When a regular expression pattern is compiled with "/x", Perl treats 6
587 characters as white space to ignore, such as SPACE and TAB. However,
588 Unicode recommends 11 characters be treated thusly. We will conform
589 with this in a future Perl version. In the meantime, use of any of the
590 missing characters will raise a deprecation warning, unless turned off.
591 The five characters are:
592
593 U+0085 NEXT LINE
594 U+200E LEFT-TO-RIGHT MARK
595 U+200F RIGHT-TO-LEFT MARK
596 U+2028 LINE SEPARATOR
597 U+2029 PARAGRAPH SEPARATOR
598
599 User-defined charnames with surprising whitespace
600 A user-defined character name with trailing or multiple spaces in a row
601 is likely a typo. This now generates a warning when defined, on the
602 assumption that uses of it will be unlikely to include the excess
603 whitespace.
604
605 Various XS-callable functions are now deprecated
606 All the functions used to classify characters will be removed from a
607 future version of Perl, and should not be used. With participating C
608 compilers (e.g., gcc), compiling any file that uses any of these will
609 generate a warning. These were not intended for public use; there are
610 equivalent, faster, macros for most of them.
611
612 See "Character classes" in perlapi. The complete list is:
613
614 "is_uni_alnum", "is_uni_alnumc", "is_uni_alnumc_lc", "is_uni_alnum_lc",
615 "is_uni_alpha", "is_uni_alpha_lc", "is_uni_ascii", "is_uni_ascii_lc",
616 "is_uni_blank", "is_uni_blank_lc", "is_uni_cntrl", "is_uni_cntrl_lc",
617 "is_uni_digit", "is_uni_digit_lc", "is_uni_graph", "is_uni_graph_lc",
618 "is_uni_idfirst", "is_uni_idfirst_lc", "is_uni_lower",
619 "is_uni_lower_lc", "is_uni_print", "is_uni_print_lc", "is_uni_punct",
620 "is_uni_punct_lc", "is_uni_space", "is_uni_space_lc", "is_uni_upper",
621 "is_uni_upper_lc", "is_uni_xdigit", "is_uni_xdigit_lc",
622 "is_utf8_alnum", "is_utf8_alnumc", "is_utf8_alpha", "is_utf8_ascii",
623 "is_utf8_blank", "is_utf8_char", "is_utf8_cntrl", "is_utf8_digit",
624 "is_utf8_graph", "is_utf8_idcont", "is_utf8_idfirst", "is_utf8_lower",
625 "is_utf8_mark", "is_utf8_perl_space", "is_utf8_perl_word",
626 "is_utf8_posix_digit", "is_utf8_print", "is_utf8_punct",
627 "is_utf8_space", "is_utf8_upper", "is_utf8_xdigit", "is_utf8_xidcont",
628 "is_utf8_xidfirst".
629
630 In addition these three functions that have never worked properly are
631 deprecated: "to_uni_lower_lc", "to_uni_title_lc", and
632 "to_uni_upper_lc".
633
634 Certain rare uses of backslashes within regexes are now deprecated
635 There are three pairs of characters that Perl recognizes as
636 metacharacters in regular expression patterns: "{}", "[]", and "()".
637 These can be used as well to delimit patterns, as in:
638
639 m{foo}
640 s(foo)(bar)
641
642 Since they are metacharacters, they have special meaning to regular
643 expression patterns, and it turns out that you can't turn off that
644 special meaning by the normal means of preceding them with a backslash,
645 if you use them, paired, within a pattern delimited by them. For
646 example, in
647
648 m{foo\{1,3\}}
649
650 the backslashes do not change the behavior, and this matches "f o"
651 followed by one to three more occurrences of "o".
652
653 Usages like this, where they are interpreted as metacharacters, are
654 exceedingly rare; we think there are none, for example, in all of CPAN.
655 Hence, this deprecation should affect very little code. It does give
656 notice, however, that any such code needs to change, which will in turn
657 allow us to change the behavior in future Perl versions so that the
658 backslashes do have an effect, and without fear that we are silently
659 breaking any existing code.
660
661 Splitting the tokens "(?" and "(*" in regular expressions
662 A deprecation warning is now raised if the "(" and "?" are separated by
663 white space or comments in "(?...)" regular expression constructs.
664 Similarly, if the "(" and "*" are separated in "(*VERB...)"
665 constructs.
666
667 Pre-PerlIO IO implementations
668 In theory, you can currently build perl without PerlIO. Instead, you'd
669 use a wrapper around stdio or sfio. In practice, this isn't very
670 useful. It's not well tested, and without any support for IO layers or
671 (thus) Unicode, it's not much of a perl. Building without PerlIO will
672 most likely be removed in the next version of perl.
673
674 PerlIO supports a "stdio" layer if stdio use is desired. Similarly a
675 sfio layer could be produced in the future, if needed.
676
678 • Platforms without support infrastructure
679
680 Both Windows CE and z/OS have been historically under-maintained,
681 and are currently neither successfully building nor regularly being
682 smoke tested. Efforts are underway to change this situation, but
683 it should not be taken for granted that the platforms are safe and
684 supported. If they do not become buildable and regularly smoked,
685 support for them may be actively removed in future releases. If
686 you have an interest in these platforms and you can lend your time,
687 expertise, or hardware to help support these platforms, please let
688 the perl development effort know by emailing
689 "perl5-porters@perl.org".
690
691 Some platforms that appear otherwise entirely dead are also on the
692 short list for removal between now and v5.20.0:
693
694 DG/UX
695 NeXT
696
697 We also think it likely that current versions of Perl will no
698 longer build AmigaOS, DJGPP, NetWare (natively), OS/2 and Plan 9.
699 If you are using Perl on such a platform and have an interest in
700 ensuring Perl's future on them, please contact us.
701
702 We believe that Perl has long been unable to build on mixed endian
703 architectures (such as PDP-11s), and intend to remove any remaining
704 support code. Similarly, code supporting the long umaintained GNU
705 dld will be removed soon if no-one makes themselves known as an
706 active user.
707
708 • Swapping of $< and $>
709
710 Perl has supported the idiom of swapping $< and $> (and likewise $(
711 and $)) to temporarily drop permissions since 5.0, like this:
712
713 ($<, $>) = ($>, $<);
714
715 However, this idiom modifies the real user/group id, which can have
716 undesirable side-effects, is no longer useful on any platform perl
717 supports and complicates the implementation of these variables and
718 list assignment in general.
719
720 As an alternative, assignment only to $> is recommended:
721
722 local $> = $<;
723
724 See also: Setuid Demystified
725 <http://www.cs.berkeley.edu/~daw/papers/setuid-usenix02.pdf>.
726
727 • "microperl", long broken and of unclear present purpose, will be
728 removed.
729
730 • Revamping "\Q" semantics in double-quotish strings when combined
731 with other escapes.
732
733 There are several bugs and inconsistencies involving combinations
734 of "\Q" and escapes like "\x", "\L", etc., within a "\Q...\E" pair.
735 These need to be fixed, and doing so will necessarily change
736 current behavior. The changes have not yet been settled.
737
738 • Use of $x, where "x" stands for any actual (non-printing) C0
739 control character will be disallowed in a future Perl version. Use
740 "${x}" instead (where again "x" stands for a control character), or
741 better, $^A , where "^" is a caret (CIRCUMFLEX ACCENT), and "A"
742 stands for any of the characters listed at the end of "OPERATOR
743 DIFFERENCES" in perlebcdic.
744
746 • Lists of lexical variable declarations ("my($x, $y)") are now
747 optimised down to a single op and are hence faster than before.
748
749 • A new C preprocessor define "NO_TAINT_SUPPORT" was added that, if
750 set, disables Perl's taint support altogether. Using the -T or -t
751 command line flags will cause a fatal error. Beware that both core
752 tests as well as many a CPAN distribution's tests will fail with
753 this change. On the upside, it provides a small performance
754 benefit due to reduced branching.
755
756 Do not enable this unless you know exactly what you are getting
757 yourself into.
758
759 • "pack" with constant arguments is now constant folded in most cases
760 [perl #113470].
761
762 • Speed up in regular expression matching against Unicode properties.
763 The largest gain is for "\X", the Unicode "extended grapheme
764 cluster." The gain for it is about 35% - 40%. Bracketed character
765 classes, e.g., "[0-9\x{100}]" containing code points above 255 are
766 also now faster.
767
768 • On platforms supporting it, several former macros are now
769 implemented as static inline functions. This should speed things up
770 slightly on non-GCC platforms.
771
772 • The optimisation of hashes in boolean context has been extended to
773 affect "scalar(%hash)", "%hash ? ... : ...", and "sub { %hash ||
774 ... }".
775
776 • Filetest operators manage the stack in a fractionally more
777 efficient manner.
778
779 • Globs used in a numeric context are now numified directly in most
780 cases, rather than being numified via stringification.
781
782 • The "x" repetition operator is now folded to a single constant at
783 compile time if called in scalar context with constant operands and
784 no parentheses around the left operand.
785
787 New Modules and Pragmata
788 • Config::Perl::V version 0.16 has been added as a dual-lifed module.
789 It provides structured data retrieval of "perl -V" output including
790 information only known to the "perl" binary and not available via
791 Config.
792
793 Updated Modules and Pragmata
794 For a complete list of updates, run:
795
796 $ corelist --diff 5.16.0 5.18.0
797
798 You can substitute your favorite version in place of 5.16.0, too.
799
800 • Archive::Extract has been upgraded to 0.68.
801
802 Work around an edge case on Linux with Busybox's unzip.
803
804 • Archive::Tar has been upgraded to 1.90.
805
806 ptar now supports the -T option as well as dashless options
807 [rt.cpan.org #75473], [rt.cpan.org #75475].
808
809 Auto-encode filenames marked as UTF-8 [rt.cpan.org #75474].
810
811 Don't use "tell" on IO::Zlib handles [rt.cpan.org #64339].
812
813 Don't try to "chown" on symlinks.
814
815 • autodie has been upgraded to 2.13.
816
817 "autodie" now plays nicely with the 'open' pragma.
818
819 • B has been upgraded to 1.42.
820
821 The "stashoff" method of COPs has been added. This provides
822 access to an internal field added in perl 5.16 under threaded
823 builds [perl #113034].
824
825 "B::COP::stashpv" now supports UTF-8 package names and embedded
826 NULs.
827
828 All "CVf_*" and "GVf_*" and more SV-related flag values are now
829 provided as constants in the "B::" namespace and available for
830 export. The default export list has not changed.
831
832 This makes the module work with the new pad API.
833
834 • B::Concise has been upgraded to 0.95.
835
836 The "-nobanner" option has been fixed, and "format"s can now be
837 dumped. When passed a sub name to dump, it will check also to see
838 whether it is the name of a format. If a sub and a format share
839 the same name, it will dump both.
840
841 This adds support for the new "OpMAYBE_TRUEBOOL" and "OPpTRUEBOOL"
842 flags.
843
844 • B::Debug has been upgraded to 1.18.
845
846 This adds support (experimentally) for "B::PADLIST", which was
847 added in Perl 5.17.4.
848
849 • B::Deparse has been upgraded to 1.20.
850
851 Avoid warning when run under "perl -w".
852
853 It now deparses loop controls with the correct precedence, and
854 multiple statements in a "format" line are also now deparsed
855 correctly.
856
857 This release suppresses trailing semicolons in formats.
858
859 This release adds stub deparsing for lexical subroutines.
860
861 It no longer dies when deparsing "sort" without arguments. It now
862 correctly omits the comma for "system $prog @args" and "exec $prog
863 @args".
864
865 • bignum, bigint and bigrat have been upgraded to 0.33.
866
867 The overrides for "hex" and "oct" have been rewritten, eliminating
868 several problems, and making one incompatible change:
869
870 • Formerly, whichever of "use bigint" or "use bigrat" was
871 compiled later would take precedence over the other, causing
872 "hex" and "oct" not to respect the other pragma when in scope.
873
874 • Using any of these three pragmata would cause "hex" and "oct"
875 anywhere else in the program to evaluate their arguments in
876 list context and prevent them from inferring $_ when called
877 without arguments.
878
879 • Using any of these three pragmata would make "oct("1234")"
880 return 1234 (for any number not beginning with 0) anywhere in
881 the program. Now "1234" is translated from octal to decimal,
882 whether within the pragma's scope or not.
883
884 • The global overrides that facilitate lexical use of "hex" and
885 "oct" now respect any existing overrides that were in place
886 before the new overrides were installed, falling back to them
887 outside of the scope of "use bignum".
888
889 • "use bignum "hex"", "use bignum "oct"" and similar invocations
890 for bigint and bigrat now export a "hex" or "oct" function,
891 instead of providing a global override.
892
893 • Carp has been upgraded to 1.29.
894
895 Carp is no longer confused when "caller" returns undef for a
896 package that has been deleted.
897
898 The "longmess()" and "shortmess()" functions are now documented.
899
900 • CGI has been upgraded to 3.63.
901
902 Unrecognized HTML escape sequences are now handled better,
903 problematic trailing newlines are no longer inserted after <form>
904 tags by "startform()" or "start_form()", and bogus "Insecure
905 Dependency" warnings appearing with some versions of perl are now
906 worked around.
907
908 • Class::Struct has been upgraded to 0.64.
909
910 The constructor now respects overridden accessor methods [perl
911 #29230].
912
913 • Compress::Raw::Bzip2 has been upgraded to 2.060.
914
915 The misuse of Perl's "magic" API has been fixed.
916
917 • Compress::Raw::Zlib has been upgraded to 2.060.
918
919 Upgrade bundled zlib to version 1.2.7.
920
921 Fix build failures on Irix, Solaris, and Win32, and also when
922 building as C++ [rt.cpan.org #69985], [rt.cpan.org #77030],
923 [rt.cpan.org #75222].
924
925 The misuse of Perl's "magic" API has been fixed.
926
927 "compress()", "uncompress()", "memGzip()" and "memGunzip()" have
928 been speeded up by making parameter validation more efficient.
929
930 • CPAN::Meta::Requirements has been upgraded to 2.122.
931
932 Treat undef requirements to "from_string_hash" as 0 (with a
933 warning).
934
935 Added "requirements_for_module" method.
936
937 • CPANPLUS has been upgraded to 0.9135.
938
939 Allow adding blib/script to PATH.
940
941 Save the history between invocations of the shell.
942
943 Handle multiple "makemakerargs" and "makeflags" arguments better.
944
945 This resolves issues with the SQLite source engine.
946
947 • Data::Dumper has been upgraded to 2.145.
948
949 It has been optimized to only build a seen-scalar hash as
950 necessary, thereby speeding up serialization drastically.
951
952 Additional tests were added in order to improve statement, branch,
953 condition and subroutine coverage. On the basis of the coverage
954 analysis, some of the internals of Dumper.pm were refactored.
955 Almost all methods are now documented.
956
957 • DB_File has been upgraded to 1.827.
958
959 The main Perl module no longer uses the "@_" construct.
960
961 • Devel::Peek has been upgraded to 1.11.
962
963 This fixes compilation with C++ compilers and makes the module work
964 with the new pad API.
965
966 • Digest::MD5 has been upgraded to 2.52.
967
968 Fix "Digest::Perl::MD5" OO fallback [rt.cpan.org #66634].
969
970 • Digest::SHA has been upgraded to 5.84.
971
972 This fixes a double-free bug, which might have caused
973 vulnerabilities in some cases.
974
975 • DynaLoader has been upgraded to 1.18.
976
977 This is due to a minor code change in the XS for the VMS
978 implementation.
979
980 This fixes warnings about using "CODE" sections without an "OUTPUT"
981 section.
982
983 • Encode has been upgraded to 2.49.
984
985 The Mac alias x-mac-ce has been added, and various bugs have been
986 fixed in Encode::Unicode, Encode::UTF7 and Encode::GSM0338.
987
988 • Env has been upgraded to 1.04.
989
990 Its SPLICE implementation no longer misbehaves in list context.
991
992 • ExtUtils::CBuilder has been upgraded to 0.280210.
993
994 Manifest files are now correctly embedded for those versions of
995 VC++ which make use of them. [perl #111782, #111798].
996
997 A list of symbols to export can now be passed to "link()" when on
998 Windows, as on other OSes [perl #115100].
999
1000 • ExtUtils::ParseXS has been upgraded to 3.18.
1001
1002 The generated C code now avoids unnecessarily incrementing
1003 "PL_amagic_generation" on Perl versions where it's done
1004 automatically (or on current Perl where the variable no longer
1005 exists).
1006
1007 This avoids a bogus warning for initialised XSUB non-parameters
1008 [perl #112776].
1009
1010 • File::Copy has been upgraded to 2.26.
1011
1012 "copy()" no longer zeros files when copying into the same
1013 directory, and also now fails (as it has long been documented to
1014 do) when attempting to copy a file over itself.
1015
1016 • File::DosGlob has been upgraded to 1.10.
1017
1018 The internal cache of file names that it keeps for each caller is
1019 now freed when that caller is freed. This means "use File::DosGlob
1020 'glob'; eval 'scalar <*>'" no longer leaks memory.
1021
1022 • File::Fetch has been upgraded to 0.38.
1023
1024 Added the 'file_default' option for URLs that do not have a file
1025 component.
1026
1027 Use "File::HomeDir" when available, and provide
1028 "PERL5_CPANPLUS_HOME" to override the autodetection.
1029
1030 Always re-fetch CHECKSUMS if "fetchdir" is set.
1031
1032 • File::Find has been upgraded to 1.23.
1033
1034 This fixes inconsistent unixy path handling on VMS.
1035
1036 Individual files may now appear in list of directories to be
1037 searched [perl #59750].
1038
1039 • File::Glob has been upgraded to 1.20.
1040
1041 File::Glob has had exactly the same fix as File::DosGlob. Since it
1042 is what Perl's own "glob" operator itself uses (except on VMS),
1043 this means "eval 'scalar <*>'" no longer leaks.
1044
1045 A space-separated list of patterns return long lists of results no
1046 longer results in memory corruption or crashes. This bug was
1047 introduced in Perl 5.16.0. [perl #114984]
1048
1049 • File::Spec::Unix has been upgraded to 3.40.
1050
1051 "abs2rel" could produce incorrect results when given two relative
1052 paths or the root directory twice [perl #111510].
1053
1054 • File::stat has been upgraded to 1.07.
1055
1056 "File::stat" ignores the filetest pragma, and warns when used in
1057 combination therewith. But it was not warning for "-r". This has
1058 been fixed [perl #111640].
1059
1060 "-p" now works, and does not return false for pipes [perl #111638].
1061
1062 Previously "File::stat"'s overloaded "-x" and "-X" operators did
1063 not give the correct results for directories or executable files
1064 when running as root. They had been treating executable permissions
1065 for root just like for any other user, performing group membership
1066 tests etc for files not owned by root. They now follow the correct
1067 Unix behaviour - for a directory they are always true, and for a
1068 file if any of the three execute permission bits are set then they
1069 report that root can execute the file. Perl's builtin "-x" and "-X"
1070 operators have always been correct.
1071
1072 • File::Temp has been upgraded to 0.23
1073
1074 Fixes various bugs involving directory removal. Defers unlinking
1075 tempfiles if the initial unlink fails, which fixes problems on NFS.
1076
1077 • GDBM_File has been upgraded to 1.15.
1078
1079 The undocumented optional fifth parameter to "TIEHASH" has been
1080 removed. This was intended to provide control of the callback used
1081 by "gdbm*" functions in case of fatal errors (such as filesystem
1082 problems), but did not work (and could never have worked). No code
1083 on CPAN even attempted to use it. The callback is now always the
1084 previous default, "croak". Problems on some platforms with how the
1085 "C" "croak" function is called have also been resolved.
1086
1087 • Hash::Util has been upgraded to 0.15.
1088
1089 "hash_unlocked" and "hashref_unlocked" now returns true if the hash
1090 is unlocked, instead of always returning false [perl #112126].
1091
1092 "hash_unlocked", "hashref_unlocked", "lock_hash_recurse" and
1093 "unlock_hash_recurse" are now exportable [perl #112126].
1094
1095 Two new functions, "hash_locked" and "hashref_locked", have been
1096 added. Oddly enough, these two functions were already exported,
1097 even though they did not exist [perl #112126].
1098
1099 • HTTP::Tiny has been upgraded to 0.025.
1100
1101 Add SSL verification features [github #6], [github #9].
1102
1103 Include the final URL in the response hashref.
1104
1105 Add "local_address" option.
1106
1107 This improves SSL support.
1108
1109 • IO has been upgraded to 1.28.
1110
1111 "sync()" can now be called on read-only file handles [perl #64772].
1112
1113 IO::Socket tries harder to cache or otherwise fetch socket
1114 information.
1115
1116 • IPC::Cmd has been upgraded to 0.80.
1117
1118 Use "POSIX::_exit" instead of "exit" in "run_forked" [rt.cpan.org
1119 #76901].
1120
1121 • IPC::Open3 has been upgraded to 1.13.
1122
1123 The "open3()" function no longer uses "POSIX::close()" to close
1124 file descriptors since that breaks the ref-counting of file
1125 descriptors done by PerlIO in cases where the file descriptors are
1126 shared by PerlIO streams, leading to attempts to close the file
1127 descriptors a second time when any such PerlIO streams are closed
1128 later on.
1129
1130 • Locale::Codes has been upgraded to 3.25.
1131
1132 It includes some new codes.
1133
1134 • Memoize has been upgraded to 1.03.
1135
1136 Fix the "MERGE" cache option.
1137
1138 • Module::Build has been upgraded to 0.4003.
1139
1140 Fixed bug where modules without $VERSION might have a version of
1141 '0' listed in 'provides' metadata, which will be rejected by PAUSE.
1142
1143 Fixed bug in PodParser to allow numerals in module names.
1144
1145 Fixed bug where giving arguments twice led to them becoming arrays,
1146 resulting in install paths like ARRAY(0xdeadbeef)/lib/Foo.pm.
1147
1148 A minor bug fix allows markup to be used around the leading "Name"
1149 in a POD "abstract" line, and some documentation improvements have
1150 been made.
1151
1152 • Module::CoreList has been upgraded to 2.90
1153
1154 Version information is now stored as a delta, which greatly reduces
1155 the size of the CoreList.pm file.
1156
1157 This restores compatibility with older versions of perl and cleans
1158 up the corelist data for various modules.
1159
1160 • Module::Load::Conditional has been upgraded to 0.54.
1161
1162 Fix use of "requires" on perls installed to a path with spaces.
1163
1164 Various enhancements include the new use of Module::Metadata.
1165
1166 • Module::Metadata has been upgraded to 1.000011.
1167
1168 The creation of a Module::Metadata object for a typical module file
1169 has been sped up by about 40%, and some spurious warnings about
1170 $VERSIONs have been suppressed.
1171
1172 • Module::Pluggable has been upgraded to 4.7.
1173
1174 Amongst other changes, triggers are now allowed on events, which
1175 gives a powerful way to modify behaviour.
1176
1177 • Net::Ping has been upgraded to 2.41.
1178
1179 This fixes some test failures on Windows.
1180
1181 • Opcode has been upgraded to 1.25.
1182
1183 Reflect the removal of the boolkeys opcode and the addition of the
1184 clonecv, introcv and padcv opcodes.
1185
1186 • overload has been upgraded to 1.22.
1187
1188 "no overload" now warns for invalid arguments, just like "use
1189 overload".
1190
1191 • PerlIO::encoding has been upgraded to 0.16.
1192
1193 This is the module implementing the ":encoding(...)" I/O layer. It
1194 no longer corrupts memory or crashes when the encoding back-end
1195 reallocates the buffer or gives it a typeglob or shared hash key
1196 scalar.
1197
1198 • PerlIO::scalar has been upgraded to 0.16.
1199
1200 The buffer scalar supplied may now only contain code points 0xFF or
1201 lower. [perl #109828]
1202
1203 • Perl::OSType has been upgraded to 1.003.
1204
1205 This fixes a bug detecting the VOS operating system.
1206
1207 • Pod::Html has been upgraded to 1.18.
1208
1209 The option "--libpods" has been reinstated. It is deprecated, and
1210 its use does nothing other than issue a warning that it is no
1211 longer supported.
1212
1213 Since the HTML files generated by pod2html claim to have a UTF-8
1214 charset, actually write the files out using UTF-8 [perl #111446].
1215
1216 • Pod::Simple has been upgraded to 3.28.
1217
1218 Numerous improvements have been made, mostly to Pod::Simple::XHTML,
1219 which also has a compatibility change: the "codes_in_verbatim"
1220 option is now disabled by default. See cpan/Pod-Simple/ChangeLog
1221 for the full details.
1222
1223 • re has been upgraded to 0.23
1224
1225 Single character [class]es like "/[s]/" or "/[s]/i" are now
1226 optimized as if they did not have the brackets, i.e. "/s/" or
1227 "/s/i".
1228
1229 See note about "op_comp" in the "Internal Changes" section below.
1230
1231 • Safe has been upgraded to 2.35.
1232
1233 Fix interactions with "Devel::Cover".
1234
1235 Don't eval code under "no strict".
1236
1237 • Scalar::Util has been upgraded to version 1.27.
1238
1239 Fix an overloading issue with "sum".
1240
1241 "first" and "reduce" now check the callback first (so &first(1) is
1242 disallowed).
1243
1244 Fix "tainted" on magical values [rt.cpan.org #55763].
1245
1246 Fix "sum" on previously magical values [rt.cpan.org #61118].
1247
1248 Fix reading past the end of a fixed buffer [rt.cpan.org #72700].
1249
1250 • Search::Dict has been upgraded to 1.07.
1251
1252 No longer require "stat" on filehandles.
1253
1254 Use "fc" for casefolding.
1255
1256 • Socket has been upgraded to 2.009.
1257
1258 Constants and functions required for IP multicast source group
1259 membership have been added.
1260
1261 "unpack_sockaddr_in()" and "unpack_sockaddr_in6()" now return just
1262 the IP address in scalar context, and "inet_ntop()" now guards
1263 against incorrect length scalars being passed in.
1264
1265 This fixes an uninitialized memory read.
1266
1267 • Storable has been upgraded to 2.41.
1268
1269 Modifying $_[0] within "STORABLE_freeze" no longer results in
1270 crashes [perl #112358].
1271
1272 An object whose class implements "STORABLE_attach" is now thawed
1273 only once when there are multiple references to it in the structure
1274 being thawed [perl #111918].
1275
1276 Restricted hashes were not always thawed correctly [perl #73972].
1277
1278 Storable would croak when freezing a blessed REF object with a
1279 "STORABLE_freeze()" method [perl #113880].
1280
1281 It can now freeze and thaw vstrings correctly. This causes a
1282 slight incompatible change in the storage format, so the format
1283 version has increased to 2.9.
1284
1285 This contains various bugfixes, including compatibility fixes for
1286 older versions of Perl and vstring handling.
1287
1288 • Sys::Syslog has been upgraded to 0.32.
1289
1290 This contains several bug fixes relating to "getservbyname()",
1291 "setlogsock()"and log levels in "syslog()", together with fixes for
1292 Windows, Haiku-OS and GNU/kFreeBSD. See cpan/Sys-Syslog/Changes
1293 for the full details.
1294
1295 • Term::ANSIColor has been upgraded to 4.02.
1296
1297 Add support for italics.
1298
1299 Improve error handling.
1300
1301 • Term::ReadLine has been upgraded to 1.10. This fixes the use of
1302 the cpan and cpanp shells on Windows in the event that the current
1303 drive happens to contain a \dev\tty file.
1304
1305 • Test::Harness has been upgraded to 3.26.
1306
1307 Fix glob semantics on Win32 [rt.cpan.org #49732].
1308
1309 Don't use "Win32::GetShortPathName" when calling perl [rt.cpan.org
1310 #47890].
1311
1312 Ignore -T when reading shebang [rt.cpan.org #64404].
1313
1314 Handle the case where we don't know the wait status of the test
1315 more gracefully.
1316
1317 Make the test summary 'ok' line overridable so that it can be
1318 changed to a plugin to make the output of prove idempotent.
1319
1320 Don't run world-writable files.
1321
1322 • Text::Tabs and Text::Wrap have been upgraded to 2012.0818. Support
1323 for Unicode combining characters has been added to them both.
1324
1325 • threads::shared has been upgraded to 1.31.
1326
1327 This adds the option to warn about or ignore attempts to clone
1328 structures that can't be cloned, as opposed to just unconditionally
1329 dying in that case.
1330
1331 This adds support for dual-valued values as created by
1332 Scalar::Util::dualvar.
1333
1334 • Tie::StdHandle has been upgraded to 4.3.
1335
1336 "READ" now respects the offset argument to "read" [perl #112826].
1337
1338 • Time::Local has been upgraded to 1.2300.
1339
1340 Seconds values greater than 59 but less than 60 no longer cause
1341 "timegm()" and "timelocal()" to croak.
1342
1343 • Unicode::UCD has been upgraded to 0.53.
1344
1345 This adds a function all_casefolds() that returns all the
1346 casefolds.
1347
1348 • Win32 has been upgraded to 0.47.
1349
1350 New APIs have been added for getting and setting the current code
1351 page.
1352
1353 Removed Modules and Pragmata
1354 • Version::Requirements has been removed from the core distribution.
1355 It is available under a different name: CPAN::Meta::Requirements.
1356
1358 Changes to Existing Documentation
1359 perlcheat
1360
1361 • perlcheat has been reorganized, and a few new sections were added.
1362
1363 perldata
1364
1365 • Now explicitly documents the behaviour of hash initializer lists
1366 that contain duplicate keys.
1367
1368 perldiag
1369
1370 • The explanation of symbolic references being prevented by "strict
1371 refs" now doesn't assume that the reader knows what symbolic
1372 references are.
1373
1374 perlfaq
1375
1376 • perlfaq has been synchronized with version 5.0150040 from CPAN.
1377
1378 perlfunc
1379
1380 • The return value of "pipe" is now documented.
1381
1382 • Clarified documentation of "our".
1383
1384 perlop
1385
1386 • Loop control verbs ("dump", "goto", "next", "last" and "redo") have
1387 always had the same precedence as assignment operators, but this
1388 was not documented until now.
1389
1390 Diagnostics
1391
1392 The following additions or changes have been made to diagnostic output,
1393 including warnings and fatal error messages. For the complete list of
1394 diagnostic messages, see perldiag.
1395
1396 New Diagnostics
1397 New Errors
1398
1399 • Unterminated delimiter for here document
1400
1401 This message now occurs when a here document label has an initial
1402 quotation mark but the final quotation mark is missing.
1403
1404 This replaces a bogus and misleading error message about not
1405 finding the label itself [perl #114104].
1406
1407 • panic: child pseudo-process was never scheduled
1408
1409 This error is thrown when a child pseudo-process in the ithreads
1410 implementation on Windows was not scheduled within the time period
1411 allowed and therefore was not able to initialize properly [perl
1412 #88840].
1413
1414 • Group name must start with a non-digit word character in regex;
1415 marked by <-- HERE in m/%s/
1416
1417 This error has been added for "(?&0)", which is invalid. It used
1418 to produce an incomprehensible error message [perl #101666].
1419
1420 • Can't use an undefined value as a subroutine reference
1421
1422 Calling an undefined value as a subroutine now produces this error
1423 message. It used to, but was accidentally disabled, first in Perl
1424 5.004 for non-magical variables, and then in Perl v5.14 for magical
1425 (e.g., tied) variables. It has now been restored. In the mean
1426 time, undef was treated as an empty string [perl #113576].
1427
1428 • Experimental "%s" subs not enabled
1429
1430 To use lexical subs, you must first enable them:
1431
1432 no warnings 'experimental::lexical_subs';
1433 use feature 'lexical_subs';
1434 my sub foo { ... }
1435
1436 New Warnings
1437
1438 • 'Strings with code points over 0xFF may not be mapped into in-
1439 memory file handles'
1440
1441 • '%s' resolved to '\o{%s}%d'
1442
1443 • 'Trailing white-space in a charnames alias definition is
1444 deprecated'
1445
1446 • 'A sequence of multiple spaces in a charnames alias definition is
1447 deprecated'
1448
1449 • 'Passing malformed UTF-8 to "%s" is deprecated'
1450
1451 • Subroutine "&%s" is not available
1452
1453 (W closure) During compilation, an inner named subroutine or eval
1454 is attempting to capture an outer lexical subroutine that is not
1455 currently available. This can happen for one of two reasons.
1456 First, the lexical subroutine may be declared in an outer anonymous
1457 subroutine that has not yet been created. (Remember that named
1458 subs are created at compile time, while anonymous subs are created
1459 at run-time.) For example,
1460
1461 sub { my sub a {...} sub f { \&a } }
1462
1463 At the time that f is created, it can't capture the current the "a"
1464 sub, since the anonymous subroutine hasn't been created yet.
1465 Conversely, the following won't give a warning since the anonymous
1466 subroutine has by now been created and is live:
1467
1468 sub { my sub a {...} eval 'sub f { \&a }' }->();
1469
1470 The second situation is caused by an eval accessing a variable that
1471 has gone out of scope, for example,
1472
1473 sub f {
1474 my sub a {...}
1475 sub { eval '\&a' }
1476 }
1477 f()->();
1478
1479 Here, when the '\&a' in the eval is being compiled, f() is not
1480 currently being executed, so its &a is not available for capture.
1481
1482 • "%s" subroutine &%s masks earlier declaration in same %s
1483
1484 (W misc) A "my" or "state" subroutine has been redeclared in the
1485 current scope or statement, effectively eliminating all access to
1486 the previous instance. This is almost always a typographical
1487 error. Note that the earlier subroutine will still exist until the
1488 end of the scope or until all closure references to it are
1489 destroyed.
1490
1491 • The %s feature is experimental
1492
1493 (S experimental) This warning is emitted if you enable an
1494 experimental feature via "use feature". Simply suppress the
1495 warning if you want to use the feature, but know that in doing so
1496 you are taking the risk of using an experimental feature which may
1497 change or be removed in a future Perl version:
1498
1499 no warnings "experimental::lexical_subs";
1500 use feature "lexical_subs";
1501
1502 • sleep(%u) too large
1503
1504 (W overflow) You called "sleep" with a number that was larger than
1505 it can reliably handle and "sleep" probably slept for less time
1506 than requested.
1507
1508 • Wide character in setenv
1509
1510 Attempts to put wide characters into environment variables via %ENV
1511 now provoke this warning.
1512
1513 • "Invalid negative number (%s) in chr"
1514
1515 "chr()" now warns when passed a negative value [perl #83048].
1516
1517 • "Integer overflow in srand"
1518
1519 "srand()" now warns when passed a value that doesn't fit in a "UV"
1520 (since the value will be truncated rather than overflowing) [perl
1521 #40605].
1522
1523 • "-i used with no filenames on the command line, reading from STDIN"
1524
1525 Running perl with the "-i" flag now warns if no input files are
1526 provided on the command line [perl #113410].
1527
1528 Changes to Existing Diagnostics
1529 • $* is no longer supported
1530
1531 The warning that use of $* and $# is no longer supported is now
1532 generated for every location that references them. Previously it
1533 would fail to be generated if another variable using the same
1534 typeglob was seen first (e.g. "@*" before $*), and would not be
1535 generated for the second and subsequent uses. (It's hard to fix
1536 the failure to generate warnings at all without also generating
1537 them every time, and warning every time is consistent with the
1538 warnings that $[ used to generate.)
1539
1540 • The warnings for "\b{" and "\B{" were added. They are a
1541 deprecation warning which should be turned off by that category.
1542 One should not have to turn off regular regexp warnings as well to
1543 get rid of these.
1544
1545 • Constant(%s): Call to &{$^H{%s}} did not return a defined value
1546
1547 Constant overloading that returns "undef" results in this error
1548 message. For numeric constants, it used to say "Constant(undef)".
1549 "undef" has been replaced with the number itself.
1550
1551 • The error produced when a module cannot be loaded now includes a
1552 hint that the module may need to be installed: "Can't locate
1553 hopping.pm in @INC (you may need to install the hopping module)
1554 (@INC contains: ...)"
1555
1556 • vector argument not supported with alpha versions
1557
1558 This warning was not suppressible, even with "no warnings". Now it
1559 is suppressible, and has been moved from the "internal" category to
1560 the "printf" category.
1561
1562 • "Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/"
1563
1564 This fatal error has been turned into a warning that reads:
1565
1566 Quantifier {n,m} with n > m can't match in regex
1567
1568 (W regexp) Minima should be less than or equal to maxima. If you
1569 really want your regexp to match something 0 times, just put {0}.
1570
1571 • The "Runaway prototype" warning that occurs in bizarre cases has
1572 been removed as being unhelpful and inconsistent.
1573
1574 • The "Not a format reference" error has been removed, as the only
1575 case in which it could be triggered was a bug.
1576
1577 • The "Unable to create sub named %s" error has been removed for the
1578 same reason.
1579
1580 • The 'Can't use "my %s" in sort comparison' error has been
1581 downgraded to a warning, '"my %s" used in sort comparison' (with
1582 'state' instead of 'my' for state variables). In addition, the
1583 heuristics for guessing whether lexical $a or $b has been misused
1584 have been improved to generate fewer false positives. Lexical $a
1585 and $b are no longer disallowed if they are outside the sort block.
1586 Also, a named unary or list operator inside the sort block no
1587 longer causes the $a or $b to be ignored [perl #86136].
1588
1590 h2xs
1591
1592 • h2xs no longer produces invalid code for empty defines. [perl
1593 #20636]
1594
1596 • Added "useversionedarchname" option to Configure
1597
1598 When set, it includes 'api_versionstring' in 'archname'. E.g.
1599 x86_64-linux-5.13.6-thread-multi. It is unset by default.
1600
1601 This feature was requested by Tim Bunce, who observed that
1602 "INSTALL_BASE" creates a library structure that does not
1603 differentiate by perl version. Instead, it places architecture
1604 specific files in "$install_base/lib/perl5/$archname". This makes
1605 it difficult to use a common "INSTALL_BASE" library path with
1606 multiple versions of perl.
1607
1608 By setting "-Duseversionedarchname", the $archname will be distinct
1609 for architecture and API version, allowing mixed use of
1610 "INSTALL_BASE".
1611
1612 • Add a "PERL_NO_INLINE_FUNCTIONS" option
1613
1614 If "PERL_NO_INLINE_FUNCTIONS" is defined, don't include "inline.h"
1615
1616 This permits test code to include the perl headers for definitions
1617 without creating a link dependency on the perl library (which may
1618 not exist yet).
1619
1620 • Configure will honour the external "MAILDOMAIN" environment
1621 variable, if set.
1622
1623 • "installman" no longer ignores the silent option
1624
1625 • Both "META.yml" and "META.json" files are now included in the
1626 distribution.
1627
1628 • Configure will now correctly detect "isblank()" when compiling with
1629 a C++ compiler.
1630
1631 • The pager detection in Configure has been improved to allow
1632 responses which specify options after the program name, e.g.
1633 /usr/bin/less -R, if the user accepts the default value. This
1634 helps perldoc when handling ANSI escapes [perl #72156].
1635
1637 • The test suite now has a section for tests that require very large
1638 amounts of memory. These tests won't run by default; they can be
1639 enabled by setting the "PERL_TEST_MEMORY" environment variable to
1640 the number of gibibytes of memory that may be safely used.
1641
1643 Discontinued Platforms
1644 BeOS
1645 BeOS was an operating system for personal computers developed by Be
1646 Inc, initially for their BeBox hardware. The OS Haiku was written
1647 as an open source replacement for/continuation of BeOS, and its
1648 perl port is current and actively maintained.
1649
1650 UTS Global
1651 Support code relating to UTS global has been removed. UTS was a
1652 mainframe version of System V created by Amdahl, subsequently sold
1653 to UTS Global. The port has not been touched since before Perl
1654 v5.8.0, and UTS Global is now defunct.
1655
1656 VM/ESA
1657 Support for VM/ESA has been removed. The port was tested on 2.3.0,
1658 which IBM ended service on in March 2002. 2.4.0 ended service in
1659 June 2003, and was superseded by Z/VM. The current version of Z/VM
1660 is V6.2.0, and scheduled for end of service on 2015/04/30.
1661
1662 MPE/IX
1663 Support for MPE/IX has been removed.
1664
1665 EPOC
1666 Support code relating to EPOC has been removed. EPOC was a family
1667 of operating systems developed by Psion for mobile devices. It was
1668 the predecessor of Symbian. The port was last updated in April
1669 2002.
1670
1671 Rhapsody
1672 Support for Rhapsody has been removed.
1673
1674 Platform-Specific Notes
1675 AIX
1676
1677 Configure now always adds "-qlanglvl=extc99" to the CC flags on AIX
1678 when using xlC. This will make it easier to compile a number of XS-
1679 based modules that assume C99 [perl #113778].
1680
1681 clang++
1682
1683 There is now a workaround for a compiler bug that prevented compiling
1684 with clang++ since Perl v5.15.7 [perl #112786].
1685
1686 C++
1687
1688 When compiling the Perl core as C++ (which is only semi-supported), the
1689 mathom functions are now compiled as "extern "C"", to ensure proper
1690 binary compatibility. (However, binary compatibility isn't generally
1691 guaranteed anyway in the situations where this would matter.)
1692
1693 Darwin
1694
1695 Stop hardcoding an alignment on 8 byte boundaries to fix builds using
1696 -Dusemorebits.
1697
1698 Haiku
1699
1700 Perl should now work out of the box on Haiku R1 Alpha 4.
1701
1702 MidnightBSD
1703
1704 "libc_r" was removed from recent versions of MidnightBSD and older
1705 versions work better with "pthread". Threading is now enabled using
1706 "pthread" which corrects build errors with threading enabled on
1707 0.4-CURRENT.
1708
1709 Solaris
1710
1711 In Configure, avoid running sed commands with flags not supported on
1712 Solaris.
1713
1714 VMS
1715
1716 • Where possible, the case of filenames and command-line arguments is
1717 now preserved by enabling the CRTL features
1718 "DECC$EFS_CASE_PRESERVE" and "DECC$ARGV_PARSE_STYLE" at start-up
1719 time. The latter only takes effect when extended parse is enabled
1720 in the process from which Perl is run.
1721
1722 • The character set for Extended Filename Syntax (EFS) is now enabled
1723 by default on VMS. Among other things, this provides better
1724 handling of dots in directory names, multiple dots in filenames,
1725 and spaces in filenames. To obtain the old behavior, set the
1726 logical name "DECC$EFS_CHARSET" to "DISABLE".
1727
1728 • Fixed linking on builds configured with "-Dusemymalloc=y".
1729
1730 • Experimental support for building Perl with the HP C++ compiler is
1731 available by configuring with "-Dusecxx".
1732
1733 • All C header files from the top-level directory of the distribution
1734 are now installed on VMS, providing consistency with a long-
1735 standing practice on other platforms. Previously only a subset were
1736 installed, which broke non-core extension builds for extensions
1737 that depended on the missing include files.
1738
1739 • Quotes are now removed from the command verb (but not the
1740 parameters) for commands spawned via "system", backticks, or a
1741 piped "open". Previously, quotes on the verb were passed through
1742 to DCL, which would fail to recognize the command. Also, if the
1743 verb is actually a path to an image or command procedure on an
1744 ODS-5 volume, quoting it now allows the path to contain spaces.
1745
1746 • The a2p build has been fixed for the HP C++ compiler on OpenVMS.
1747
1748 Win32
1749
1750 • Perl can now be built using Microsoft's Visual C++ 2012 compiler by
1751 specifying CCTYPE=MSVC110 (or MSVC110FREE if you are using the free
1752 Express edition for Windows Desktop) in win32/Makefile.
1753
1754 • The option to build without "USE_SOCKETS_AS_HANDLES" has been
1755 removed.
1756
1757 • Fixed a problem where perl could crash while cleaning up threads
1758 (including the main thread) in threaded debugging builds on Win32
1759 and possibly other platforms [perl #114496].
1760
1761 • A rare race condition that would lead to sleep taking more time
1762 than requested, and possibly even hanging, has been fixed [perl
1763 #33096].
1764
1765 • "link" on Win32 now attempts to set $! to more appropriate values
1766 based on the Win32 API error code. [perl #112272]
1767
1768 Perl no longer mangles the environment block, e.g. when launching a
1769 new sub-process, when the environment contains non-ASCII
1770 characters. Known problems still remain, however, when the
1771 environment contains characters outside of the current ANSI
1772 codepage (e.g. see the item about Unicode in %ENV in
1773 <http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/todo.pod>).
1774 [perl #113536]
1775
1776 • Building perl with some Windows compilers used to fail due to a
1777 problem with miniperl's "glob" operator (which uses the "perlglob"
1778 program) deleting the PATH environment variable [perl #113798].
1779
1780 • A new makefile option, "USE_64_BIT_INT", has been added to the
1781 Windows makefiles. Set this to "define" when building a 32-bit
1782 perl if you want it to use 64-bit integers.
1783
1784 Machine code size reductions, already made to the DLLs of XS
1785 modules in Perl v5.17.2, have now been extended to the perl DLL
1786 itself.
1787
1788 Building with VC++ 6.0 was inadvertently broken in Perl v5.17.2 but
1789 has now been fixed again.
1790
1791 WinCE
1792
1793 Building on WinCE is now possible once again, although more work is
1794 required to fully restore a clean build.
1795
1797 • Synonyms for the misleadingly named "av_len()" have been created:
1798 "av_top_index()" and "av_tindex". All three of these return the
1799 number of the highest index in the array, not the number of
1800 elements it contains.
1801
1802 • SvUPGRADE() is no longer an expression. Originally this macro (and
1803 its underlying function, sv_upgrade()) were documented as boolean,
1804 although in reality they always croaked on error and never returned
1805 false. In 2005 the documentation was updated to specify a void
1806 return value, but SvUPGRADE() was left always returning 1 for
1807 backwards compatibility. This has now been removed, and SvUPGRADE()
1808 is now a statement with no return value.
1809
1810 So this is now a syntax error:
1811
1812 if (!SvUPGRADE(sv)) { croak(...); }
1813
1814 If you have code like that, simply replace it with
1815
1816 SvUPGRADE(sv);
1817
1818 or to avoid compiler warnings with older perls, possibly
1819
1820 (void)SvUPGRADE(sv);
1821
1822 • Perl has a new copy-on-write mechanism that allows any SvPOK scalar
1823 to be upgraded to a copy-on-write scalar. A reference count on the
1824 string buffer is stored in the string buffer itself. This feature
1825 is not enabled by default.
1826
1827 It can be enabled in a perl build by running Configure with
1828 -Accflags=-DPERL_NEW_COPY_ON_WRITE, and we would encourage XS
1829 authors to try their code with such an enabled perl, and provide
1830 feedback. Unfortunately, there is not yet a good guide to updating
1831 XS code to cope with COW. Until such a document is available,
1832 consult the perl5-porters mailing list.
1833
1834 It breaks a few XS modules by allowing copy-on-write scalars to go
1835 through code paths that never encountered them before.
1836
1837 • Copy-on-write no longer uses the SvFAKE and SvREADONLY flags.
1838 Hence, SvREADONLY indicates a true read-only SV.
1839
1840 Use the SvIsCOW macro (as before) to identify a copy-on-write
1841 scalar.
1842
1843 • "PL_glob_index" is gone.
1844
1845 • The private Perl_croak_no_modify has had its context parameter
1846 removed. It is now has a void prototype. Users of the public API
1847 croak_no_modify remain unaffected.
1848
1849 • Copy-on-write (shared hash key) scalars are no longer marked read-
1850 only. "SvREADONLY" returns false on such an SV, but "SvIsCOW"
1851 still returns true.
1852
1853 • A new op type, "OP_PADRANGE" has been introduced. The perl
1854 peephole optimiser will, where possible, substitute a single
1855 padrange op for a pushmark followed by one or more pad ops, and
1856 possibly also skipping list and nextstate ops. In addition, the op
1857 can carry out the tasks associated with the RHS of a "my(...) = @_"
1858 assignment, so those ops may be optimised away too.
1859
1860 • Case-insensitive matching inside a [bracketed] character class with
1861 a multi-character fold no longer excludes one of the possibilities
1862 in the circumstances that it used to. [perl #89774].
1863
1864 • "PL_formfeed" has been removed.
1865
1866 • The regular expression engine no longer reads one byte past the end
1867 of the target string. While for all internally well-formed scalars
1868 this should never have been a problem, this change facilitates
1869 clever tricks with string buffers in CPAN modules. [perl #73542]
1870
1871 • Inside a BEGIN block, "PL_compcv" now points to the currently-
1872 compiling subroutine, rather than the BEGIN block itself.
1873
1874 • "mg_length" has been deprecated.
1875
1876 • "sv_len" now always returns a byte count and "sv_len_utf8" a
1877 character count. Previously, "sv_len" and "sv_len_utf8" were both
1878 buggy and would sometimes returns bytes and sometimes characters.
1879 "sv_len_utf8" no longer assumes that its argument is in UTF-8.
1880 Neither of these creates UTF-8 caches for tied or overloaded values
1881 or for non-PVs any more.
1882
1883 • "sv_mortalcopy" now copies string buffers of shared hash key
1884 scalars when called from XS modules [perl #79824].
1885
1886 • The new "RXf_MODIFIES_VARS" flag can be set by custom regular
1887 expression engines to indicate that the execution of the regular
1888 expression may cause variables to be modified. This lets "s///"
1889 know to skip certain optimisations. Perl's own regular expression
1890 engine sets this flag for the special backtracking verbs that set
1891 $REGMARK and $REGERROR.
1892
1893 • The APIs for accessing lexical pads have changed considerably.
1894
1895 "PADLIST"s are now longer "AV"s, but their own type instead.
1896 "PADLIST"s now contain a "PAD" and a "PADNAMELIST" of "PADNAME"s,
1897 rather than "AV"s for the pad and the list of pad names. "PAD"s,
1898 "PADNAMELIST"s, and "PADNAME"s are to be accessed as such through
1899 the newly added pad API instead of the plain "AV" and "SV" APIs.
1900 See perlapi for details.
1901
1902 • In the regex API, the numbered capture callbacks are passed an
1903 index indicating what match variable is being accessed. There are
1904 special index values for the "$`, $&, $&" variables. Previously the
1905 same three values were used to retrieve "${^PREMATCH}, ${^MATCH},
1906 ${^POSTMATCH}" too, but these have now been assigned three separate
1907 values. See "Numbered capture callbacks" in perlreapi.
1908
1909 • "PL_sawampersand" was previously a boolean indicating that any of
1910 "$`, $&, $&" had been seen; it now contains three one-bit flags
1911 indicating the presence of each of the variables individually.
1912
1913 • The "CV *" typemap entry now supports "&{}" overloading and
1914 typeglobs, just like "&{...}" [perl #96872].
1915
1916 • The "SVf_AMAGIC" flag to indicate overloading is now on the stash,
1917 not the object. It is now set automatically whenever a method or
1918 @ISA changes, so its meaning has changed, too. It now means
1919 "potentially overloaded". When the overload table is calculated,
1920 the flag is automatically turned off if there is no overloading, so
1921 there should be no noticeable slowdown.
1922
1923 The staleness of the overload tables is now checked when overload
1924 methods are invoked, rather than during "bless".
1925
1926 "A" magic is gone. The changes to the handling of the "SVf_AMAGIC"
1927 flag eliminate the need for it.
1928
1929 "PL_amagic_generation" has been removed as no longer necessary.
1930 For XS modules, it is now a macro alias to "PL_na".
1931
1932 The fallback overload setting is now stored in a stash entry
1933 separate from overloadedness itself.
1934
1935 • The character-processing code has been cleaned up in places. The
1936 changes should be operationally invisible.
1937
1938 • The "study" function was made a no-op in v5.16. It was simply
1939 disabled via a "return" statement; the code was left in place. Now
1940 the code supporting what "study" used to do has been removed.
1941
1942 • Under threaded perls, there is no longer a separate PV allocated
1943 for every COP to store its package name ("cop->stashpv"). Instead,
1944 there is an offset ("cop->stashoff") into the new "PL_stashpad"
1945 array, which holds stash pointers.
1946
1947 • In the pluggable regex API, the "regexp_engine" struct has acquired
1948 a new field "op_comp", which is currently just for perl's internal
1949 use, and should be initialized to NULL by other regex plugin
1950 modules.
1951
1952 • A new function "alloccopstash" has been added to the API, but is
1953 considered experimental. See perlapi.
1954
1955 • Perl used to implement get magic in a way that would sometimes hide
1956 bugs in code that could call mg_get() too many times on magical
1957 values. This hiding of errors no longer occurs, so long-standing
1958 bugs may become visible now. If you see magic-related errors in XS
1959 code, check to make sure it, together with the Perl API functions
1960 it uses, calls mg_get() only once on SvGMAGICAL() values.
1961
1962 • OP allocation for CVs now uses a slab allocator. This simplifies
1963 memory management for OPs allocated to a CV, so cleaning up after a
1964 compilation error is simpler and safer [perl #111462][perl
1965 #112312].
1966
1967 • "PERL_DEBUG_READONLY_OPS" has been rewritten to work with the new
1968 slab allocator, allowing it to catch more violations than before.
1969
1970 • The old slab allocator for ops, which was only enabled for
1971 "PERL_IMPLICIT_SYS" and "PERL_DEBUG_READONLY_OPS", has been
1972 retired.
1973
1975 • Here document terminators no longer require a terminating newline
1976 character when they occur at the end of a file. This was already
1977 the case at the end of a string eval [perl #65838].
1978
1979 • "-DPERL_GLOBAL_STRUCT" builds now free the global struct after
1980 they've finished using it.
1981
1982 • A trailing '/' on a path in @INC will no longer have an additional
1983 '/' appended.
1984
1985 • The ":crlf" layer now works when unread data doesn't fit into its
1986 own buffer. [perl #112244].
1987
1988 • "ungetc()" now handles UTF-8 encoded data. [perl #116322].
1989
1990 • A bug in the core typemap caused any C types that map to the T_BOOL
1991 core typemap entry to not be set, updated, or modified when the
1992 T_BOOL variable was used in an OUTPUT: section with an exception
1993 for RETVAL. T_BOOL in an INPUT: section was not affected. Using a
1994 T_BOOL return type for an XSUB (RETVAL) was not affected. A side
1995 effect of fixing this bug is, if a T_BOOL is specified in the
1996 OUTPUT: section (which previous did nothing to the SV), and a read
1997 only SV (literal) is passed to the XSUB, croaks like "Modification
1998 of a read-only value attempted" will happen. [perl #115796]
1999
2000 • On many platforms, providing a directory name as the script name
2001 caused perl to do nothing and report success. It should now
2002 universally report an error and exit nonzero. [perl #61362]
2003
2004 • "sort {undef} ..." under fatal warnings no longer crashes. It had
2005 begun crashing in Perl v5.16.
2006
2007 • Stashes blessed into each other ("bless \%Foo::, 'Bar'; bless
2008 \%Bar::, 'Foo'") no longer result in double frees. This bug
2009 started happening in Perl v5.16.
2010
2011 • Numerous memory leaks have been fixed, mostly involving fatal
2012 warnings and syntax errors.
2013
2014 • Some failed regular expression matches such as "'f' =~ /../g" were
2015 not resetting "pos". Also, "match-once" patterns ("m?...?g")
2016 failed to reset it, too, when invoked a second time [perl #23180].
2017
2018 • Several bugs involving "local *ISA" and "local *Foo::" causing
2019 stale MRO caches have been fixed.
2020
2021 • Defining a subroutine when its typeglob has been aliased no longer
2022 results in stale method caches. This bug was introduced in Perl
2023 v5.10.
2024
2025 • Localising a typeglob containing a subroutine when the typeglob's
2026 package has been deleted from its parent stash no longer produces
2027 an error. This bug was introduced in Perl v5.14.
2028
2029 • Under some circumstances, "local *method=..." would fail to reset
2030 method caches upon scope exit.
2031
2032 • "/[.foo.]/" is no longer an error, but produces a warning (as
2033 before) and is treated as "/[.fo]/" [perl #115818].
2034
2035 • "goto $tied_var" now calls FETCH before deciding what type of goto
2036 (subroutine or label) this is.
2037
2038 • Renaming packages through glob assignment ("*Foo:: = *Bar::; *Bar::
2039 = *Baz::") in combination with "m?...?" and "reset" no longer makes
2040 threaded builds crash.
2041
2042 • A number of bugs related to assigning a list to hash have been
2043 fixed. Many of these involve lists with repeated keys like "(1, 1,
2044 1, 1)".
2045
2046 • The expression "scalar(%h = (1, 1, 1, 1))" now returns 4, not
2047 2.
2048
2049 • The return value of "%h = (1, 1, 1)" in list context was wrong.
2050 Previously this would return "(1, undef, 1)", now it returns
2051 "(1, undef)".
2052
2053 • Perl now issues the same warning on "($s, %h) = (1, {})" as it
2054 does for "(%h) = ({})", "Reference found where even-sized list
2055 expected".
2056
2057 • A number of additional edge cases in list assignment to hashes
2058 were corrected. For more details see commit 23b7025ebc.
2059
2060 • Attributes applied to lexical variables no longer leak memory.
2061 [perl #114764]
2062
2063 • "dump", "goto", "last", "next", "redo" or "require" followed by a
2064 bareword (or version) and then an infix operator is no longer a
2065 syntax error. It used to be for those infix operators (like "+")
2066 that have a different meaning where a term is expected. [perl
2067 #105924]
2068
2069 • "require a::b . 1" and "require a::b + 1" no longer produce
2070 erroneous ambiguity warnings. [perl #107002]
2071
2072 • Class method calls are now allowed on any string, and not just
2073 strings beginning with an alphanumeric character. [perl #105922]
2074
2075 • An empty pattern created with "qr//" used in "m///" no longer
2076 triggers the "empty pattern reuses last pattern" behaviour. [perl
2077 #96230]
2078
2079 • Tying a hash during iteration no longer results in a memory leak.
2080
2081 • Freeing a tied hash during iteration no longer results in a memory
2082 leak.
2083
2084 • List assignment to a tied array or hash that dies on STORE no
2085 longer results in a memory leak.
2086
2087 • If the hint hash ("%^H") is tied, compile-time scope entry (which
2088 copies the hint hash) no longer leaks memory if FETCH dies. [perl
2089 #107000]
2090
2091 • Constant folding no longer inappropriately triggers the special
2092 "split " "" behaviour. [perl #94490]
2093
2094 • "defined scalar(@array)", "defined do { &foo }", and similar
2095 constructs now treat the argument to "defined" as a simple scalar.
2096 [perl #97466]
2097
2098 • Running a custom debugging that defines no *DB::DB glob or provides
2099 a subroutine stub for &DB::DB no longer results in a crash, but an
2100 error instead. [perl #114990]
2101
2102 • "reset """ now matches its documentation. "reset" only resets
2103 "m?...?" patterns when called with no argument. An empty string
2104 for an argument now does nothing. (It used to be treated as no
2105 argument.) [perl #97958]
2106
2107 • "printf" with an argument returning an empty list no longer reads
2108 past the end of the stack, resulting in erratic behaviour. [perl
2109 #77094]
2110
2111 • "--subname" no longer produces erroneous ambiguity warnings. [perl
2112 #77240]
2113
2114 • "v10" is now allowed as a label or package name. This was
2115 inadvertently broken when v-strings were added in Perl v5.6. [perl
2116 #56880]
2117
2118 • "length", "pos", "substr" and "sprintf" could be confused by ties,
2119 overloading, references and typeglobs if the stringification of
2120 such changed the internal representation to or from UTF-8. [perl
2121 #114410]
2122
2123 • utf8::encode now calls FETCH and STORE on tied variables.
2124 utf8::decode now calls STORE (it was already calling FETCH).
2125
2126 • "$tied =~ s/$non_utf8/$utf8/" no longer loops infinitely if the
2127 tied variable returns a Latin-1 string, shared hash key scalar, or
2128 reference or typeglob that stringifies as ASCII or Latin-1. This
2129 was a regression from v5.12.
2130
2131 • "s///" without /e is now better at detecting when it needs to
2132 forego certain optimisations, fixing some buggy cases:
2133
2134 • Match variables in certain constructs ("&&", "||", ".." and
2135 others) in the replacement part; e.g., "s/(.)/$l{$a||$1}/g".
2136 [perl #26986]
2137
2138 • Aliases to match variables in the replacement.
2139
2140 • $REGERROR or $REGMARK in the replacement. [perl #49190]
2141
2142 • An empty pattern ("s//$foo/") that causes the last-successful
2143 pattern to be used, when that pattern contains code blocks that
2144 modify the variables in the replacement.
2145
2146 • The taintedness of the replacement string no longer affects the
2147 taintedness of the return value of "s///e".
2148
2149 • The $| autoflush variable is created on-the-fly when needed. If
2150 this happened (e.g., if it was mentioned in a module or eval) when
2151 the currently-selected filehandle was a typeglob with an empty IO
2152 slot, it used to crash. [perl #115206]
2153
2154 • Line numbers at the end of a string eval are no longer off by one.
2155 [perl #114658]
2156
2157 • @INC filters (subroutines returned by subroutines in @INC) that set
2158 $_ to a copy-on-write scalar no longer cause the parser to modify
2159 that string buffer in place.
2160
2161 • "length($object)" no longer returns the undefined value if the
2162 object has string overloading that returns undef. [perl #115260]
2163
2164 • The use of "PL_stashcache", the stash name lookup cache for method
2165 calls, has been restored,
2166
2167 Commit da6b625f78f5f133 in August 2011 inadvertently broke the code
2168 that looks up values in "PL_stashcache". As it's only a cache,
2169 quite correctly everything carried on working without it.
2170
2171 • The error "Can't localize through a reference" had disappeared in
2172 v5.16.0 when "local %$ref" appeared on the last line of an lvalue
2173 subroutine. This error disappeared for "\local %$ref" in perl
2174 v5.8.1. It has now been restored.
2175
2176 • The parsing of here-docs has been improved significantly, fixing
2177 several parsing bugs and crashes and one memory leak, and
2178 correcting wrong subsequent line numbers under certain conditions.
2179
2180 • Inside an eval, the error message for an unterminated here-doc no
2181 longer has a newline in the middle of it [perl #70836].
2182
2183 • A substitution inside a substitution pattern ("s/${s|||}//") no
2184 longer confuses the parser.
2185
2186 • It may be an odd place to allow comments, but "s//"" # hello/e" has
2187 always worked, unless there happens to be a null character before
2188 the first #. Now it works even in the presence of nulls.
2189
2190 • An invalid range in "tr///" or "y///" no longer results in a memory
2191 leak.
2192
2193 • String eval no longer treats a semicolon-delimited quote-like
2194 operator at the very end ("eval 'q;;'") as a syntax error.
2195
2196 • "warn {$_ => 1} + 1" is no longer a syntax error. The parser used
2197 to get confused with certain list operators followed by an
2198 anonymous hash and then an infix operator that shares its form with
2199 a unary operator.
2200
2201 • "(caller $n)[6]" (which gives the text of the eval) used to return
2202 the actual parser buffer. Modifying it could result in crashes.
2203 Now it always returns a copy. The string returned no longer has
2204 "\n;" tacked on to the end. The returned text also includes here-
2205 doc bodies, which used to be omitted.
2206
2207 • The UTF-8 position cache is now reset when accessing magical
2208 variables, to avoid the string buffer and the UTF-8 position cache
2209 getting out of sync [perl #114410].
2210
2211 • Various cases of get magic being called twice for magical UTF-8
2212 strings have been fixed.
2213
2214 • This code (when not in the presence of $& etc)
2215
2216 $_ = 'x' x 1_000_000;
2217 1 while /(.)/;
2218
2219 used to skip the buffer copy for performance reasons, but suffered
2220 from $1 etc changing if the original string changed. That's now
2221 been fixed.
2222
2223 • Perl doesn't use PerlIO anymore to report out of memory messages,
2224 as PerlIO might attempt to allocate more memory.
2225
2226 • In a regular expression, if something is quantified with "{n,m}"
2227 where "n > m", it can't possibly match. Previously this was a
2228 fatal error, but now is merely a warning (and that something won't
2229 match). [perl #82954].
2230
2231 • It used to be possible for formats defined in subroutines that have
2232 subsequently been undefined and redefined to close over variables
2233 in the wrong pad (the newly-defined enclosing sub), resulting in
2234 crashes or "Bizarre copy" errors.
2235
2236 • Redefinition of XSUBs at run time could produce warnings with the
2237 wrong line number.
2238
2239 • The %vd sprintf format does not support version objects for alpha
2240 versions. It used to output the format itself (%vd) when passed an
2241 alpha version, and also emit an "Invalid conversion in printf"
2242 warning. It no longer does, but produces the empty string in the
2243 output. It also no longer leaks memory in this case.
2244
2245 • "$obj->SUPER::method" calls in the main package could fail if the
2246 SUPER package had already been accessed by other means.
2247
2248 • Stash aliasing ("*foo:: = *bar::") no longer causes SUPER calls to
2249 ignore changes to methods or @ISA or use the wrong package.
2250
2251 • Method calls on packages whose names end in ::SUPER are no longer
2252 treated as SUPER method calls, resulting in failure to find the
2253 method. Furthermore, defining subroutines in such packages no
2254 longer causes them to be found by SUPER method calls on the
2255 containing package [perl #114924].
2256
2257 • "\w" now matches the code points U+200C (ZERO WIDTH NON-JOINER) and
2258 U+200D (ZERO WIDTH JOINER). "\W" no longer matches these. This
2259 change is because Unicode corrected their definition of what "\w"
2260 should match.
2261
2262 • "dump LABEL" no longer leaks its label.
2263
2264 • Constant folding no longer changes the behaviour of functions like
2265 "stat()" and "truncate()" that can take either filenames or
2266 handles. "stat 1 ? foo : bar" nows treats its argument as a file
2267 name (since it is an arbitrary expression), rather than the handle
2268 "foo".
2269
2270 • "truncate FOO, $len" no longer falls back to treating "FOO" as a
2271 file name if the filehandle has been deleted. This was broken in
2272 Perl v5.16.0.
2273
2274 • Subroutine redefinitions after sub-to-glob and glob-to-glob
2275 assignments no longer cause double frees or panic messages.
2276
2277 • "s///" now turns vstrings into plain strings when performing a
2278 substitution, even if the resulting string is the same ("s/a/a/").
2279
2280 • Prototype mismatch warnings no longer erroneously treat constant
2281 subs as having no prototype when they actually have "".
2282
2283 • Constant subroutines and forward declarations no longer prevent
2284 prototype mismatch warnings from omitting the sub name.
2285
2286 • "undef" on a subroutine now clears call checkers.
2287
2288 • The "ref" operator started leaking memory on blessed objects in
2289 Perl v5.16.0. This has been fixed [perl #114340].
2290
2291 • "use" no longer tries to parse its arguments as a statement, making
2292 "use constant { () };" a syntax error [perl #114222].
2293
2294 • On debugging builds, "uninitialized" warnings inside formats no
2295 longer cause assertion failures.
2296
2297 • On debugging builds, subroutines nested inside formats no longer
2298 cause assertion failures [perl #78550].
2299
2300 • Formats and "use" statements are now permitted inside formats.
2301
2302 • "print $x" and "sub { print $x }->()" now always produce the same
2303 output. It was possible for the latter to refuse to close over $x
2304 if the variable was not active; e.g., if it was defined outside a
2305 currently-running named subroutine.
2306
2307 • Similarly, "print $x" and "print eval '$x'" now produce the same
2308 output. This also allows "my $x if 0" variables to be seen in the
2309 debugger [perl #114018].
2310
2311 • Formats called recursively no longer stomp on their own lexical
2312 variables, but each recursive call has its own set of lexicals.
2313
2314 • Attempting to free an active format or the handle associated with
2315 it no longer results in a crash.
2316
2317 • Format parsing no longer gets confused by braces, semicolons and
2318 low-precedence operators. It used to be possible to use braces as
2319 format delimiters (instead of "=" and "."), but only sometimes.
2320 Semicolons and low-precedence operators in format argument lines no
2321 longer confuse the parser into ignoring the line's return value.
2322 In format argument lines, braces can now be used for anonymous
2323 hashes, instead of being treated always as "do" blocks.
2324
2325 • Formats can now be nested inside code blocks in regular expressions
2326 and other quoted constructs ("/(?{...})/" and "qq/${...}/") [perl
2327 #114040].
2328
2329 • Formats are no longer created after compilation errors.
2330
2331 • Under debugging builds, the -DA command line option started
2332 crashing in Perl v5.16.0. It has been fixed [perl #114368].
2333
2334 • A potential deadlock scenario involving the premature termination
2335 of a pseudo- forked child in a Windows build with ithreads enabled
2336 has been fixed. This resolves the common problem of the
2337 t/op/fork.t test hanging on Windows [perl #88840].
2338
2339 • The code which generates errors from "require()" could potentially
2340 read one or two bytes before the start of the filename for
2341 filenames less than three bytes long and ending "/\.p?\z/". This
2342 has now been fixed. Note that it could never have happened with
2343 module names given to "use()" or "require()" anyway.
2344
2345 • The handling of pathnames of modules given to "require()" has been
2346 made thread-safe on VMS.
2347
2348 • Non-blocking sockets have been fixed on VMS.
2349
2350 • Pod can now be nested in code inside a quoted construct outside of
2351 a string eval. This used to work only within string evals [perl
2352 #114040].
2353
2354 • "goto ''" now looks for an empty label, producing the "goto must
2355 have label" error message, instead of exiting the program [perl
2356 #111794].
2357
2358 • "goto "\0"" now dies with "Can't find label" instead of "goto must
2359 have label".
2360
2361 • The C function "hv_store" used to result in crashes when used on
2362 "%^H" [perl #111000].
2363
2364 • A call checker attached to a closure prototype via
2365 "cv_set_call_checker" is now copied to closures cloned from it. So
2366 "cv_set_call_checker" now works inside an attribute handler for a
2367 closure.
2368
2369 • Writing to $^N used to have no effect. Now it croaks with
2370 "Modification of a read-only value" by default, but that can be
2371 overridden by a custom regular expression engine, as with $1 [perl
2372 #112184].
2373
2374 • "undef" on a control character glob ("undef *^H") no longer emits
2375 an erroneous warning about ambiguity [perl #112456].
2376
2377 • For efficiency's sake, many operators and built-in functions return
2378 the same scalar each time. Lvalue subroutines and subroutines in
2379 the CORE:: namespace were allowing this implementation detail to
2380 leak through. "print &CORE::uc("a"), &CORE::uc("b")" used to print
2381 "BB". The same thing would happen with an lvalue subroutine
2382 returning the return value of "uc". Now the value is copied in
2383 such cases.
2384
2385 • "method {}" syntax with an empty block or a block returning an
2386 empty list used to crash or use some random value left on the stack
2387 as its invocant. Now it produces an error.
2388
2389 • "vec" now works with extremely large offsets (>2 GB) [perl
2390 #111730].
2391
2392 • Changes to overload settings now take effect immediately, as do
2393 changes to inheritance that affect overloading. They used to take
2394 effect only after "bless".
2395
2396 Objects that were created before a class had any overloading used
2397 to remain non-overloaded even if the class gained overloading
2398 through "use overload" or @ISA changes, and even after "bless".
2399 This has been fixed [perl #112708].
2400
2401 • Classes with overloading can now inherit fallback values.
2402
2403 • Overloading was not respecting a fallback value of 0 if there were
2404 overloaded objects on both sides of an assignment operator like
2405 "+=" [perl #111856].
2406
2407 • "pos" now croaks with hash and array arguments, instead of
2408 producing erroneous warnings.
2409
2410 • "while(each %h)" now implies "while(defined($_ = each %h))", like
2411 "readline" and "readdir".
2412
2413 • Subs in the CORE:: namespace no longer crash after "undef *_" when
2414 called with no argument list (&CORE::time with no parentheses).
2415
2416 • "unpack" no longer produces the "'/' must follow a numeric type in
2417 unpack" error when it is the data that are at fault [perl #60204].
2418
2419 • "join" and "@array" now call FETCH only once on a tied $" [perl
2420 #8931].
2421
2422 • Some subroutine calls generated by compiling core ops affected by a
2423 "CORE::GLOBAL" override had op checking performed twice. The
2424 checking is always idempotent for pure Perl code, but the double
2425 checking can matter when custom call checkers are involved.
2426
2427 • A race condition used to exist around fork that could cause a
2428 signal sent to the parent to be handled by both parent and child.
2429 Signals are now blocked briefly around fork to prevent this from
2430 happening [perl #82580].
2431
2432 • The implementation of code blocks in regular expressions, such as
2433 "(?{})" and "(??{})", has been heavily reworked to eliminate a
2434 whole slew of bugs. The main user-visible changes are:
2435
2436 • Code blocks within patterns are now parsed in the same pass as
2437 the surrounding code; in particular it is no longer necessary
2438 to have balanced braces: this now works:
2439
2440 /(?{ $x='{' })/
2441
2442 This means that this error message is no longer generated:
2443
2444 Sequence (?{...}) not terminated or not {}-balanced in regex
2445
2446 but a new error may be seen:
2447
2448 Sequence (?{...}) not terminated with ')'
2449
2450 In addition, literal code blocks within run-time patterns are
2451 only compiled once, at perl compile-time:
2452
2453 for my $p (...) {
2454 # this 'FOO' block of code is compiled once,
2455 # at the same time as the surrounding 'for' loop
2456 /$p{(?{FOO;})/;
2457 }
2458
2459 • Lexical variables are now sane as regards scope, recursion and
2460 closure behavior. In particular, "/A(?{B})C/" behaves (from a
2461 closure viewpoint) exactly like "/A/ && do { B } && /C/", while
2462 "qr/A(?{B})C/" is like "sub {/A/ && do { B } && /C/}". So this
2463 code now works how you might expect, creating three regexes
2464 that match 0, 1, and 2:
2465
2466 for my $i (0..2) {
2467 push @r, qr/^(??{$i})$/;
2468 }
2469 "1" =~ $r[1]; # matches
2470
2471 • The "use re 'eval'" pragma is now only required for code blocks
2472 defined at runtime; in particular in the following, the text of
2473 the $r pattern is still interpolated into the new pattern and
2474 recompiled, but the individual compiled code-blocks within $r
2475 are reused rather than being recompiled, and "use re 'eval'"
2476 isn't needed any more:
2477
2478 my $r = qr/abc(?{....})def/;
2479 /xyz$r/;
2480
2481 • Flow control operators no longer crash. Each code block runs in
2482 a new dynamic scope, so "next" etc. will not see any enclosing
2483 loops. "return" returns a value from the code block, not from
2484 any enclosing subroutine.
2485
2486 • Perl normally caches the compilation of run-time patterns, and
2487 doesn't recompile if the pattern hasn't changed, but this is
2488 now disabled if required for the correct behavior of closures.
2489 For example:
2490
2491 my $code = '(??{$x})';
2492 for my $x (1..3) {
2493 # recompile to see fresh value of $x each time
2494 $x =~ /$code/;
2495 }
2496
2497 • The "/msix" and "(?msix)" etc. flags are now propagated into
2498 the return value from "(??{})"; this now works:
2499
2500 "AB" =~ /a(??{'b'})/i;
2501
2502 • Warnings and errors will appear to come from the surrounding
2503 code (or for run-time code blocks, from an eval) rather than
2504 from an "re_eval":
2505
2506 use re 'eval'; $c = '(?{ warn "foo" })'; /$c/;
2507 /(?{ warn "foo" })/;
2508
2509 formerly gave:
2510
2511 foo at (re_eval 1) line 1.
2512 foo at (re_eval 2) line 1.
2513
2514 and now gives:
2515
2516 foo at (eval 1) line 1.
2517 foo at /some/prog line 2.
2518
2519 • Perl now can be recompiled to use any Unicode version. In v5.16,
2520 it worked on Unicodes 6.0 and 6.1, but there were various bugs if
2521 earlier releases were used; the older the release the more
2522 problems.
2523
2524 • "vec" no longer produces "uninitialized" warnings in lvalue context
2525 [perl #9423].
2526
2527 • An optimization involving fixed strings in regular expressions
2528 could cause a severe performance penalty in edge cases. This has
2529 been fixed [perl #76546].
2530
2531 • In certain cases, including empty subpatterns within a regular
2532 expression (such as "(?:)" or "(?:|)") could disable some
2533 optimizations. This has been fixed.
2534
2535 • The "Can't find an opnumber" message that "prototype" produces when
2536 passed a string like "CORE::nonexistent_keyword" now passes UTF-8
2537 and embedded NULs through unchanged [perl #97478].
2538
2539 • "prototype" now treats magical variables like $1 the same way as
2540 non-magical variables when checking for the CORE:: prefix, instead
2541 of treating them as subroutine names.
2542
2543 • Under threaded perls, a runtime code block in a regular expression
2544 could corrupt the package name stored in the op tree, resulting in
2545 bad reads in "caller", and possibly crashes [perl #113060].
2546
2547 • Referencing a closure prototype ("\&{$_[1]}" in an attribute
2548 handler for a closure) no longer results in a copy of the
2549 subroutine (or assertion failures on debugging builds).
2550
2551 • "eval '__PACKAGE__'" now returns the right answer on threaded
2552 builds if the current package has been assigned over (as in
2553 "*ThisPackage:: = *ThatPackage::") [perl #78742].
2554
2555 • If a package is deleted by code that it calls, it is possible for
2556 "caller" to see a stack frame belonging to that deleted package.
2557 "caller" could crash if the stash's memory address was reused for a
2558 scalar and a substitution was performed on the same scalar [perl
2559 #113486].
2560
2561 • "UNIVERSAL::can" no longer treats its first argument differently
2562 depending on whether it is a string or number internally.
2563
2564 • "open" with "<&" for the mode checks to see whether the third
2565 argument is a number, in determining whether to treat it as a file
2566 descriptor or a handle name. Magical variables like $1 were always
2567 failing the numeric check and being treated as handle names.
2568
2569 • "warn"'s handling of magical variables ($1, ties) has undergone
2570 several fixes. "FETCH" is only called once now on a tied argument
2571 or a tied $@ [perl #97480]. Tied variables returning objects that
2572 stringify as "" are no longer ignored. A tied $@ that happened to
2573 return a reference the previous time it was used is no longer
2574 ignored.
2575
2576 • "warn """ now treats $@ with a number in it the same way,
2577 regardless of whether it happened via "$@=3" or "$@="3"". It used
2578 to ignore the former. Now it appends "\t...caught", as it has
2579 always done with "$@="3"".
2580
2581 • Numeric operators on magical variables (e.g., "$1 + 1") used to use
2582 floating point operations even where integer operations were more
2583 appropriate, resulting in loss of accuracy on 64-bit platforms
2584 [perl #109542].
2585
2586 • Unary negation no longer treats a string as a number if the string
2587 happened to be used as a number at some point. So, if $x contains
2588 the string "dogs", "-$x" returns "-dogs" even if "$y=0+$x" has
2589 happened at some point.
2590
2591 • In Perl v5.14, "-'-10'" was fixed to return "10", not "+10". But
2592 magical variables ($1, ties) were not fixed till now [perl #57706].
2593
2594 • Unary negation now treats strings consistently, regardless of the
2595 internal "UTF8" flag.
2596
2597 • A regression introduced in Perl v5.16.0 involving
2598 "tr/SEARCHLIST/REPLACEMENTLIST/" has been fixed. Only the first
2599 instance is supposed to be meaningful if a character appears more
2600 than once in "SEARCHLIST". Under some circumstances, the final
2601 instance was overriding all earlier ones. [perl #113584]
2602
2603 • Regular expressions like "qr/\87/" previously silently inserted a
2604 NUL character, thus matching as if it had been written
2605 "qr/\00087/". Now it matches as if it had been written as
2606 "qr/87/", with a message that the sequence "\8" is unrecognized.
2607
2608 • "__SUB__" now works in special blocks ("BEGIN", "END", etc.).
2609
2610 • Thread creation on Windows could theoretically result in a crash if
2611 done inside a "BEGIN" block. It still does not work properly, but
2612 it no longer crashes [perl #111610].
2613
2614 • "\&{''}" (with the empty string) now autovivifies a stub like any
2615 other sub name, and no longer produces the "Unable to create sub"
2616 error [perl #94476].
2617
2618 • A regression introduced in v5.14.0 has been fixed, in which some
2619 calls to the "re" module would clobber $_ [perl #113750].
2620
2621 • "do FILE" now always either sets or clears $@, even when the file
2622 can't be read. This ensures that testing $@ first (as recommended
2623 by the documentation) always returns the correct result.
2624
2625 • The array iterator used for the "each @array" construct is now
2626 correctly reset when @array is cleared [perl #75596]. This happens,
2627 for example, when the array is globally assigned to, as in "@array
2628 = (...)", but not when its values are assigned to. In terms of the
2629 XS API, it means that "av_clear()" will now reset the iterator.
2630
2631 This mirrors the behaviour of the hash iterator when the hash is
2632 cleared.
2633
2634 • "$class->can", "$class->isa", and "$class->DOES" now return correct
2635 results, regardless of whether that package referred to by $class
2636 exists [perl #47113].
2637
2638 • Arriving signals no longer clear $@ [perl #45173].
2639
2640 • Allow "my ()" declarations with an empty variable list [perl
2641 #113554].
2642
2643 • During parsing, subs declared after errors no longer leave stubs
2644 [perl #113712].
2645
2646 • Closures containing no string evals no longer hang on to their
2647 containing subroutines, allowing variables closed over by outer
2648 subroutines to be freed when the outer sub is freed, even if the
2649 inner sub still exists [perl #89544].
2650
2651 • Duplication of in-memory filehandles by opening with a "<&=" or
2652 ">&=" mode stopped working properly in v5.16.0. It was causing the
2653 new handle to reference a different scalar variable. This has been
2654 fixed [perl #113764].
2655
2656 • "qr//" expressions no longer crash with custom regular expression
2657 engines that do not set "offs" at regular expression compilation
2658 time [perl #112962].
2659
2660 • "delete local" no longer crashes with certain magical arrays and
2661 hashes [perl #112966].
2662
2663 • "local" on elements of certain magical arrays and hashes used not
2664 to arrange to have the element deleted on scope exit, even if the
2665 element did not exist before "local".
2666
2667 • "scalar(write)" no longer returns multiple items [perl #73690].
2668
2669 • String to floating point conversions no longer misparse certain
2670 strings under "use locale" [perl #109318].
2671
2672 • @INC filters that die no longer leak memory [perl #92252].
2673
2674 • The implementations of overloaded operations are now called in the
2675 correct context. This allows, among other things, being able to
2676 properly override "<>" [perl #47119].
2677
2678 • Specifying only the "fallback" key when calling "use overload" now
2679 behaves properly [perl #113010].
2680
2681 • "sub foo { my $a = 0; while ($a) { ... } }" and "sub foo { while
2682 (0) { ... } }" now return the same thing [perl #73618].
2683
2684 • String negation now behaves the same under "use integer;" as it
2685 does without [perl #113012].
2686
2687 • "chr" now returns the Unicode replacement character (U+FFFD) for
2688 -1, regardless of the internal representation. -1 used to wrap if
2689 the argument was tied or a string internally.
2690
2691 • Using a "format" after its enclosing sub was freed could crash as
2692 of perl v5.12.0, if the format referenced lexical variables from
2693 the outer sub.
2694
2695 • Using a "format" after its enclosing sub was undefined could crash
2696 as of perl v5.10.0, if the format referenced lexical variables from
2697 the outer sub.
2698
2699 • Using a "format" defined inside a closure, which format references
2700 lexical variables from outside, never really worked unless the
2701 "write" call was directly inside the closure. In v5.10.0 it even
2702 started crashing. Now the copy of that closure nearest the top of
2703 the call stack is used to find those variables.
2704
2705 • Formats that close over variables in special blocks no longer crash
2706 if a stub exists with the same name as the special block before the
2707 special block is compiled.
2708
2709 • The parser no longer gets confused, treating "eval foo ()" as a
2710 syntax error if preceded by "print;" [perl #16249].
2711
2712 • The return value of "syscall" is no longer truncated on 64-bit
2713 platforms [perl #113980].
2714
2715 • Constant folding no longer causes "print 1 ? FOO : BAR" to print to
2716 the FOO handle [perl #78064].
2717
2718 • "do subname" now calls the named subroutine and uses the file name
2719 it returns, instead of opening a file named "subname".
2720
2721 • Subroutines looked up by rv2cv check hooks (registered by XS
2722 modules) are now taken into consideration when determining whether
2723 "foo bar" should be the sub call "foo(bar)" or the method call
2724 ""bar"->foo".
2725
2726 • "CORE::foo::bar" is no longer treated specially, allowing global
2727 overrides to be called directly via "CORE::GLOBAL::uc(...)" [perl
2728 #113016].
2729
2730 • Calling an undefined sub whose typeglob has been undefined now
2731 produces the customary "Undefined subroutine called" error, instead
2732 of "Not a CODE reference".
2733
2734 • Two bugs involving @ISA have been fixed. "*ISA =
2735 *glob_without_array" and "undef *ISA; @{*ISA}" would prevent future
2736 modifications to @ISA from updating the internal caches used to
2737 look up methods. The *glob_without_array case was a regression
2738 from Perl v5.12.
2739
2740 • Regular expression optimisations sometimes caused "$" with "/m" to
2741 produce failed or incorrect matches [perl #114068].
2742
2743 • "__SUB__" now works in a "sort" block when the enclosing subroutine
2744 is predeclared with "sub foo;" syntax [perl #113710].
2745
2746 • Unicode properties only apply to Unicode code points, which leads
2747 to some subtleties when regular expressions are matched against
2748 above-Unicode code points. There is a warning generated to draw
2749 your attention to this. However, this warning was being generated
2750 inappropriately in some cases, such as when a program was being
2751 parsed. Non-Unicode matches such as "\w" and "[:word:]" should not
2752 generate the warning, as their definitions don't limit them to
2753 apply to only Unicode code points. Now the message is only
2754 generated when matching against "\p{}" and "\P{}". There remains a
2755 bug, [perl #114148], for the very few properties in Unicode that
2756 match just a single code point. The warning is not generated if
2757 they are matched against an above-Unicode code point.
2758
2759 • Uninitialized warnings mentioning hash elements would only mention
2760 the element name if it was not in the first bucket of the hash, due
2761 to an off-by-one error.
2762
2763 • A regular expression optimizer bug could cause multiline "^" to
2764 behave incorrectly in the presence of line breaks, such that
2765 ""/\n\n" =~ m#\A(?:^/$)#im" would not match [perl #115242].
2766
2767 • Failed "fork" in list context no longer corrupts the stack. "@a =
2768 (1, 2, fork, 3)" used to gobble up the 2 and assign "(1, undef, 3)"
2769 if the "fork" call failed.
2770
2771 • Numerous memory leaks have been fixed, mostly involving tied
2772 variables that die, regular expression character classes and code
2773 blocks, and syntax errors.
2774
2775 • Assigning a regular expression ("${qr//}") to a variable that
2776 happens to hold a floating point number no longer causes assertion
2777 failures on debugging builds.
2778
2779 • Assigning a regular expression to a scalar containing a number no
2780 longer causes subsequent numification to produce random numbers.
2781
2782 • Assigning a regular expression to a magic variable no longer wipes
2783 away the magic. This was a regression from v5.10.
2784
2785 • Assigning a regular expression to a blessed scalar no longer
2786 results in crashes. This was also a regression from v5.10.
2787
2788 • Regular expression can now be assigned to tied hash and array
2789 elements with flattening into strings.
2790
2791 • Numifying a regular expression no longer results in an
2792 uninitialized warning.
2793
2794 • Negative array indices no longer cause EXISTS methods of tied
2795 variables to be ignored. This was a regression from v5.12.
2796
2797 • Negative array indices no longer result in crashes on arrays tied
2798 to non-objects.
2799
2800 • "$byte_overload .= $utf8" no longer results in doubly-encoded UTF-8
2801 if the left-hand scalar happened to have produced a UTF-8 string
2802 the last time overloading was invoked.
2803
2804 • "goto &sub" now uses the current value of @_, instead of using the
2805 array the subroutine was originally called with. This means "local
2806 @_ = (...); goto &sub" now works [perl #43077].
2807
2808 • If a debugger is invoked recursively, it no longer stomps on its
2809 own lexical variables. Formerly under recursion all calls would
2810 share the same set of lexical variables [perl #115742].
2811
2812 • *_{ARRAY} returned from a subroutine no longer spontaneously
2813 becomes empty.
2814
2815 • When using "say" to print to a tied filehandle, the value of "$\"
2816 is correctly localized, even if it was previously undef. [perl
2817 #119927]
2818
2820 • UTF8-flagged strings in %ENV on HP-UX 11.00 are buggy
2821
2822 The interaction of UTF8-flagged strings and %ENV on HP-UX 11.00 is
2823 currently dodgy in some not-yet-fully-diagnosed way. Expect test
2824 failures in t/op/magic.t, followed by unknown behavior when storing
2825 wide characters in the environment.
2826
2828 Hojung Yoon (AMORETTE), 24, of Seoul, South Korea, went to his long
2829 rest on May 8, 2013 with llama figurine and autographed TIMTOADY card.
2830 He was a brilliant young Perl 5 & 6 hacker and a devoted member of
2831 Seoul.pm. He programmed Perl, talked Perl, ate Perl, and loved Perl.
2832 We believe that he is still programming in Perl with his broken IBM
2833 laptop somewhere. He will be missed.
2834
2836 Perl v5.18.0 represents approximately 12 months of development since
2837 Perl v5.16.0 and contains approximately 400,000 lines of changes across
2838 2,100 files from 113 authors.
2839
2840 Perl continues to flourish into its third decade thanks to a vibrant
2841 community of users and developers. The following people are known to
2842 have contributed the improvements that became Perl v5.18.0:
2843
2844 Aaron Crane, Aaron Trevena, Abhijit Menon-Sen, Adrian M. Enache, Alan
2845 Haggai Alavi, Alexandr Ciornii, Andrew Tam, Andy Dougherty, Anton
2846 Nikishaev, Aristotle Pagaltzis, Augustina Blair, Bob Ernst, Brad
2847 Gilbert, Breno G. de Oliveira, Brian Carlson, Brian Fraser, Charlie
2848 Gonzalez, Chip Salzenberg, Chris 'BinGOs' Williams, Christian Hansen,
2849 Colin Kuskie, Craig A. Berry, Dagfinn Ilmari Mannsaaker, Daniel Dragan,
2850 Daniel Perrett, Darin McBride, Dave Rolsky, David Golden, David
2851 Leadbeater, David Mitchell, David Nicol, Dominic Hargreaves, E.
2852 Choroba, Eric Brine, Evan Miller, Father Chrysostomos, Florian Ragwitz,
2853 Francois Perrad, George Greer, Goro Fuji, H.Merijn Brand, Herbert
2854 Breunung, Hugo van der Sanden, Igor Zaytsev, James E Keenan, Jan
2855 Dubois, Jasmine Ahuja, Jerry D. Hedden, Jess Robinson, Jesse Luehrs,
2856 Joaquin Ferrero, Joel Berger, John Goodyear, John Peacock, Karen
2857 Etheridge, Karl Williamson, Karthik Rajagopalan, Kent Fredric, Leon
2858 Timmermans, Lucas Holt, Lukas Mai, Marcus Holland-Moritz, Markus
2859 Jansen, Martin Hasch, Matthew Horsfall, Max Maischein, Michael G
2860 Schwern, Michael Schroeder, Moritz Lenz, Nicholas Clark, Niko Tyni,
2861 Oleg Nesterov, Patrik Haegglund, Paul Green, Paul Johnson, Paul
2862 Marquess, Peter Martini, Rafael Garcia-Suarez, Reini Urban, Renee
2863 Baecker, Rhesa Rozendaal, Ricardo Signes, Robin Barker, Ronald J.
2864 Kimball, Ruslan Zakirov, Salvador Fandin~o, Sawyer X, Scott Lanning,
2865 Sergey Alekseev, Shawn M Moore, Shirakata Kentaro, Shlomi Fish,
2866 Sisyphus, Smylers, Steffen Mueller, Steve Hay, Steve Peters, Steven
2867 Schubiger, Sullivan Beck, Sven Strickroth, Sebastien Aperghis-Tramoni,
2868 Thomas Sibley, Tobias Leich, Tom Wyant, Tony Cook, Vadim Konovalov,
2869 Vincent Pit, Volker Schatz, Walt Mankowski, Yves Orton, Zefram.
2870
2871 The list above is almost certainly incomplete as it is automatically
2872 generated from version control history. In particular, it does not
2873 include the names of the (very much appreciated) contributors who
2874 reported issues to the Perl bug tracker.
2875
2876 Many of the changes included in this version originated in the CPAN
2877 modules included in Perl's core. We're grateful to the entire CPAN
2878 community for helping Perl to flourish.
2879
2880 For a more complete list of all of Perl's historical contributors,
2881 please see the AUTHORS file in the Perl source distribution.
2882
2884 If you find what you think is a bug, you might check the articles
2885 recently posted to the comp.lang.perl.misc newsgroup and the perl bug
2886 database at http://rt.perl.org/perlbug/ . There may also be
2887 information at http://www.perl.org/ , the Perl Home Page.
2888
2889 If you believe you have an unreported bug, please run the perlbug
2890 program included with your release. Be sure to trim your bug down to a
2891 tiny but sufficient test case. Your bug report, along with the output
2892 of "perl -V", will be sent off to perlbug@perl.org to be analysed by
2893 the Perl porting team.
2894
2895 If the bug you are reporting has security implications, which make it
2896 inappropriate to send to a publicly archived mailing list, then please
2897 send it to perl5-security-report@perl.org. This points to a closed
2898 subscription unarchived mailing list, which includes all the core
2899 committers, who will be able to help assess the impact of issues,
2900 figure out a resolution, and help co-ordinate the release of patches to
2901 mitigate or fix the problem across all platforms on which Perl is
2902 supported. Please only use this address for security issues in the
2903 Perl core, not for modules independently distributed on CPAN.
2904
2906 The Changes file for an explanation of how to view exhaustive details
2907 on what changed.
2908
2909 The INSTALL file for how to build Perl.
2910
2911 The README file for general stuff.
2912
2913 The Artistic and Copying files for copyright information.
2914
2915
2916
2917perl v5.32.1 2021-05-31 PERL5180DELTA(1)