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 comprised
148 of characters from the whole Unicode range. This allows for names to
149 be in your native language, and not just English. Certain restrictions
150 apply to the characters that may be used (you can't define a name that
151 has punctuation in it, for example). See "CUSTOM ALIASES" in
152 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 unmaintained 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") return
880 1234 (for any number not beginning with 0) anywhere in the
881 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 been
928 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 directory,
1013 and also now fails (as it has long been documented to do) when
1014 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 file
1124 descriptors since that breaks the ref-counting of file descriptors
1125 done by PerlIO in cases where the file descriptors are shared by
1126 PerlIO streams, leading to attempts to close the file descriptors a
1127 second time when any such PerlIO streams are closed later on.
1128
1129 • Locale::Codes has been upgraded to 3.25.
1130
1131 It includes some new codes.
1132
1133 • Memoize has been upgraded to 1.03.
1134
1135 Fix the "MERGE" cache option.
1136
1137 • Module::Build has been upgraded to 0.4003.
1138
1139 Fixed bug where modules without $VERSION might have a version of
1140 '0' listed in 'provides' metadata, which will be rejected by PAUSE.
1141
1142 Fixed bug in PodParser to allow numerals in module names.
1143
1144 Fixed bug where giving arguments twice led to them becoming arrays,
1145 resulting in install paths like ARRAY(0xdeadbeef)/lib/Foo.pm.
1146
1147 A minor bug fix allows markup to be used around the leading "Name"
1148 in a POD "abstract" line, and some documentation improvements have
1149 been made.
1150
1151 • Module::CoreList has been upgraded to 2.90
1152
1153 Version information is now stored as a delta, which greatly reduces
1154 the size of the CoreList.pm file.
1155
1156 This restores compatibility with older versions of perl and cleans
1157 up the corelist data for various modules.
1158
1159 • Module::Load::Conditional has been upgraded to 0.54.
1160
1161 Fix use of "requires" on perls installed to a path with spaces.
1162
1163 Various enhancements include the new use of Module::Metadata.
1164
1165 • Module::Metadata has been upgraded to 1.000011.
1166
1167 The creation of a Module::Metadata object for a typical module file
1168 has been sped up by about 40%, and some spurious warnings about
1169 $VERSIONs have been suppressed.
1170
1171 • Module::Pluggable has been upgraded to 4.7.
1172
1173 Amongst other changes, triggers are now allowed on events, which
1174 gives a powerful way to modify behaviour.
1175
1176 • Net::Ping has been upgraded to 2.41.
1177
1178 This fixes some test failures on Windows.
1179
1180 • Opcode has been upgraded to 1.25.
1181
1182 Reflect the removal of the boolkeys opcode and the addition of the
1183 clonecv, introcv and padcv opcodes.
1184
1185 • overload has been upgraded to 1.22.
1186
1187 "no overload" now warns for invalid arguments, just like "use
1188 overload".
1189
1190 • PerlIO::encoding has been upgraded to 0.16.
1191
1192 This is the module implementing the ":encoding(...)" I/O layer. It
1193 no longer corrupts memory or crashes when the encoding back-end
1194 reallocates the buffer or gives it a typeglob or shared hash key
1195 scalar.
1196
1197 • PerlIO::scalar has been upgraded to 0.16.
1198
1199 The buffer scalar supplied may now only contain code points 0xFF or
1200 lower. [perl #109828]
1201
1202 • Perl::OSType has been upgraded to 1.003.
1203
1204 This fixes a bug detecting the VOS operating system.
1205
1206 • Pod::Html has been upgraded to 1.18.
1207
1208 The option "--libpods" has been reinstated. It is deprecated, and
1209 its use does nothing other than issue a warning that it is no
1210 longer supported.
1211
1212 Since the HTML files generated by pod2html claim to have a UTF-8
1213 charset, actually write the files out using UTF-8 [perl #111446].
1214
1215 • Pod::Simple has been upgraded to 3.28.
1216
1217 Numerous improvements have been made, mostly to Pod::Simple::XHTML,
1218 which also has a compatibility change: the "codes_in_verbatim"
1219 option is now disabled by default. See cpan/Pod-Simple/ChangeLog
1220 for the full details.
1221
1222 • re has been upgraded to 0.23
1223
1224 Single character [class]es like "/[s]/" or "/[s]/i" are now
1225 optimized as if they did not have the brackets, i.e. "/s/" or
1226 "/s/i".
1227
1228 See note about "op_comp" in the "Internal Changes" section below.
1229
1230 • Safe has been upgraded to 2.35.
1231
1232 Fix interactions with "Devel::Cover".
1233
1234 Don't eval code under "no strict".
1235
1236 • Scalar::Util has been upgraded to version 1.27.
1237
1238 Fix an overloading issue with "sum".
1239
1240 "first" and "reduce" now check the callback first (so &first(1) is
1241 disallowed).
1242
1243 Fix "tainted" on magical values [rt.cpan.org #55763].
1244
1245 Fix "sum" on previously magical values [rt.cpan.org #61118].
1246
1247 Fix reading past the end of a fixed buffer [rt.cpan.org #72700].
1248
1249 • Search::Dict has been upgraded to 1.07.
1250
1251 No longer require "stat" on filehandles.
1252
1253 Use "fc" for casefolding.
1254
1255 • Socket has been upgraded to 2.009.
1256
1257 Constants and functions required for IP multicast source group
1258 membership have been added.
1259
1260 unpack_sockaddr_in() and unpack_sockaddr_in6() now return just the
1261 IP address in scalar context, and inet_ntop() now guards against
1262 incorrect length scalars being passed in.
1263
1264 This fixes an uninitialized memory read.
1265
1266 • Storable has been upgraded to 2.41.
1267
1268 Modifying $_[0] within "STORABLE_freeze" no longer results in
1269 crashes [perl #112358].
1270
1271 An object whose class implements "STORABLE_attach" is now thawed
1272 only once when there are multiple references to it in the structure
1273 being thawed [perl #111918].
1274
1275 Restricted hashes were not always thawed correctly [perl #73972].
1276
1277 Storable would croak when freezing a blessed REF object with a
1278 STORABLE_freeze() method [perl #113880].
1279
1280 It can now freeze and thaw vstrings correctly. This causes a
1281 slight incompatible change in the storage format, so the format
1282 version has increased to 2.9.
1283
1284 This contains various bugfixes, including compatibility fixes for
1285 older versions of Perl and vstring handling.
1286
1287 • Sys::Syslog has been upgraded to 0.32.
1288
1289 This contains several bug fixes relating to getservbyname(),
1290 setlogsock()and log levels in syslog(), together with fixes for
1291 Windows, Haiku-OS and GNU/kFreeBSD. See cpan/Sys-Syslog/Changes
1292 for the full details.
1293
1294 • Term::ANSIColor has been upgraded to 4.02.
1295
1296 Add support for italics.
1297
1298 Improve error handling.
1299
1300 • Term::ReadLine has been upgraded to 1.10. This fixes the use of
1301 the cpan and cpanp shells on Windows in the event that the current
1302 drive happens to contain a \dev\tty file.
1303
1304 • Test::Harness has been upgraded to 3.26.
1305
1306 Fix glob semantics on Win32 [rt.cpan.org #49732].
1307
1308 Don't use "Win32::GetShortPathName" when calling perl [rt.cpan.org
1309 #47890].
1310
1311 Ignore -T when reading shebang [rt.cpan.org #64404].
1312
1313 Handle the case where we don't know the wait status of the test
1314 more gracefully.
1315
1316 Make the test summary 'ok' line overridable so that it can be
1317 changed to a plugin to make the output of prove idempotent.
1318
1319 Don't run world-writable files.
1320
1321 • Text::Tabs and Text::Wrap have been upgraded to 2012.0818. Support
1322 for Unicode combining characters has been added to them both.
1323
1324 • threads::shared has been upgraded to 1.31.
1325
1326 This adds the option to warn about or ignore attempts to clone
1327 structures that can't be cloned, as opposed to just unconditionally
1328 dying in that case.
1329
1330 This adds support for dual-valued values as created by
1331 Scalar::Util::dualvar.
1332
1333 • Tie::StdHandle has been upgraded to 4.3.
1334
1335 "READ" now respects the offset argument to "read" [perl #112826].
1336
1337 • Time::Local has been upgraded to 1.2300.
1338
1339 Seconds values greater than 59 but less than 60 no longer cause
1340 timegm() and timelocal() to croak.
1341
1342 • Unicode::UCD has been upgraded to 0.53.
1343
1344 This adds a function all_casefolds() that returns all the
1345 casefolds.
1346
1347 • Win32 has been upgraded to 0.47.
1348
1349 New APIs have been added for getting and setting the current code
1350 page.
1351
1352 Removed Modules and Pragmata
1353 • Version::Requirements has been removed from the core distribution.
1354 It is available under a different name: CPAN::Meta::Requirements.
1355
1357 Changes to Existing Documentation
1358 perlcheat
1359
1360 • perlcheat has been reorganized, and a few new sections were added.
1361
1362 perldata
1363
1364 • Now explicitly documents the behaviour of hash initializer lists
1365 that contain duplicate keys.
1366
1367 perldiag
1368
1369 • The explanation of symbolic references being prevented by "strict
1370 refs" now doesn't assume that the reader knows what symbolic
1371 references are.
1372
1373 perlfaq
1374
1375 • perlfaq has been synchronized with version 5.0150040 from CPAN.
1376
1377 perlfunc
1378
1379 • The return value of "pipe" is now documented.
1380
1381 • Clarified documentation of "our".
1382
1383 perlop
1384
1385 • Loop control verbs ("dump", "goto", "next", "last" and "redo") have
1386 always had the same precedence as assignment operators, but this
1387 was not documented until now.
1388
1389 Diagnostics
1390
1391 The following additions or changes have been made to diagnostic output,
1392 including warnings and fatal error messages. For the complete list of
1393 diagnostic messages, see perldiag.
1394
1395 New Diagnostics
1396 New Errors
1397
1398 • Unterminated delimiter for here document
1399
1400 This message now occurs when a here document label has an initial
1401 quotation mark but the final quotation mark is missing.
1402
1403 This replaces a bogus and misleading error message about not
1404 finding the label itself [perl #114104].
1405
1406 • panic: child pseudo-process was never scheduled
1407
1408 This error is thrown when a child pseudo-process in the ithreads
1409 implementation on Windows was not scheduled within the time period
1410 allowed and therefore was not able to initialize properly [perl
1411 #88840].
1412
1413 • Group name must start with a non-digit word character in regex;
1414 marked by <-- HERE in m/%s/
1415
1416 This error has been added for "(?&0)", which is invalid. It used
1417 to produce an incomprehensible error message [perl #101666].
1418
1419 • Can't use an undefined value as a subroutine reference
1420
1421 Calling an undefined value as a subroutine now produces this error
1422 message. It used to, but was accidentally disabled, first in Perl
1423 5.004 for non-magical variables, and then in Perl v5.14 for magical
1424 (e.g., tied) variables. It has now been restored. In the mean
1425 time, undef was treated as an empty string [perl #113576].
1426
1427 • Experimental "%s" subs not enabled
1428
1429 To use lexical subs, you must first enable them:
1430
1431 no warnings 'experimental::lexical_subs';
1432 use feature 'lexical_subs';
1433 my sub foo { ... }
1434
1435 New Warnings
1436
1437 • 'Strings with code points over 0xFF may not be mapped into in-
1438 memory file handles'
1439
1440 • '%s' resolved to '\o{%s}%d'
1441
1442 • 'Trailing white-space in a charnames alias definition is
1443 deprecated'
1444
1445 • 'A sequence of multiple spaces in a charnames alias definition is
1446 deprecated'
1447
1448 • 'Passing malformed UTF-8 to "%s" is deprecated'
1449
1450 • Subroutine "&%s" is not available
1451
1452 (W closure) During compilation, an inner named subroutine or eval
1453 is attempting to capture an outer lexical subroutine that is not
1454 currently available. This can happen for one of two reasons.
1455 First, the lexical subroutine may be declared in an outer anonymous
1456 subroutine that has not yet been created. (Remember that named
1457 subs are created at compile time, while anonymous subs are created
1458 at run-time.) For example,
1459
1460 sub { my sub a {...} sub f { \&a } }
1461
1462 At the time that f is created, it can't capture the current the "a"
1463 sub, since the anonymous subroutine hasn't been created yet.
1464 Conversely, the following won't give a warning since the anonymous
1465 subroutine has by now been created and is live:
1466
1467 sub { my sub a {...} eval 'sub f { \&a }' }->();
1468
1469 The second situation is caused by an eval accessing a variable that
1470 has gone out of scope, for example,
1471
1472 sub f {
1473 my sub a {...}
1474 sub { eval '\&a' }
1475 }
1476 f()->();
1477
1478 Here, when the '\&a' in the eval is being compiled, f() is not
1479 currently being executed, so its &a is not available for capture.
1480
1481 • "%s" subroutine &%s masks earlier declaration in same %s
1482
1483 (W misc) A "my" or "state" subroutine has been redeclared in the
1484 current scope or statement, effectively eliminating all access to
1485 the previous instance. This is almost always a typographical
1486 error. Note that the earlier subroutine will still exist until the
1487 end of the scope or until all closure references to it are
1488 destroyed.
1489
1490 • The %s feature is experimental
1491
1492 (S experimental) This warning is emitted if you enable an
1493 experimental feature via "use feature". Simply suppress the
1494 warning if you want to use the feature, but know that in doing so
1495 you are taking the risk of using an experimental feature which may
1496 change or be removed in a future Perl version:
1497
1498 no warnings "experimental::lexical_subs";
1499 use feature "lexical_subs";
1500
1501 • sleep(%u) too large
1502
1503 (W overflow) You called "sleep" with a number that was larger than
1504 it can reliably handle and "sleep" probably slept for less time
1505 than requested.
1506
1507 • Wide character in setenv
1508
1509 Attempts to put wide characters into environment variables via %ENV
1510 now provoke this warning.
1511
1512 • "Invalid negative number (%s) in chr"
1513
1514 chr() now warns when passed a negative value [perl #83048].
1515
1516 • "Integer overflow in srand"
1517
1518 srand() now warns when passed a value that doesn't fit in a "UV"
1519 (since the value will be truncated rather than overflowing) [perl
1520 #40605].
1521
1522 • "-i used with no filenames on the command line, reading from STDIN"
1523
1524 Running perl with the "-i" flag now warns if no input files are
1525 provided on the command line [perl #113410].
1526
1527 Changes to Existing Diagnostics
1528 • $* is no longer supported
1529
1530 The warning that use of $* and $# is no longer supported is now
1531 generated for every location that references them. Previously it
1532 would fail to be generated if another variable using the same
1533 typeglob was seen first (e.g. "@*" before $*), and would not be
1534 generated for the second and subsequent uses. (It's hard to fix
1535 the failure to generate warnings at all without also generating
1536 them every time, and warning every time is consistent with the
1537 warnings that $[ used to generate.)
1538
1539 • The warnings for "\b{" and "\B{" were added. They are a
1540 deprecation warning which should be turned off by that category.
1541 One should not have to turn off regular regexp warnings as well to
1542 get rid of these.
1543
1544 • Constant(%s): Call to &{$^H{%s}} did not return a defined value
1545
1546 Constant overloading that returns "undef" results in this error
1547 message. For numeric constants, it used to say "Constant(undef)".
1548 "undef" has been replaced with the number itself.
1549
1550 • The error produced when a module cannot be loaded now includes a
1551 hint that the module may need to be installed: "Can't locate
1552 hopping.pm in @INC (you may need to install the hopping module)
1553 (@INC contains: ...)"
1554
1555 • vector argument not supported with alpha versions
1556
1557 This warning was not suppressible, even with "no warnings". Now it
1558 is suppressible, and has been moved from the "internal" category to
1559 the "printf" category.
1560
1561 • "Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/"
1562
1563 This fatal error has been turned into a warning that reads:
1564
1565 Quantifier {n,m} with n > m can't match in regex
1566
1567 (W regexp) Minima should be less than or equal to maxima. If you
1568 really want your regexp to match something 0 times, just put {0}.
1569
1570 • The "Runaway prototype" warning that occurs in bizarre cases has
1571 been removed as being unhelpful and inconsistent.
1572
1573 • The "Not a format reference" error has been removed, as the only
1574 case in which it could be triggered was a bug.
1575
1576 • The "Unable to create sub named %s" error has been removed for the
1577 same reason.
1578
1579 • The 'Can't use "my %s" in sort comparison' error has been
1580 downgraded to a warning, '"my %s" used in sort comparison' (with
1581 'state' instead of 'my' for state variables). In addition, the
1582 heuristics for guessing whether lexical $a or $b has been misused
1583 have been improved to generate fewer false positives. Lexical $a
1584 and $b are no longer disallowed if they are outside the sort block.
1585 Also, a named unary or list operator inside the sort block no
1586 longer causes the $a or $b to be ignored [perl #86136].
1587
1589 h2xs
1590
1591 • h2xs no longer produces invalid code for empty defines. [perl
1592 #20636]
1593
1595 • Added "useversionedarchname" option to Configure
1596
1597 When set, it includes 'api_versionstring' in 'archname'. E.g.
1598 x86_64-linux-5.13.6-thread-multi. It is unset by default.
1599
1600 This feature was requested by Tim Bunce, who observed that
1601 "INSTALL_BASE" creates a library structure that does not
1602 differentiate by perl version. Instead, it places architecture
1603 specific files in "$install_base/lib/perl5/$archname". This makes
1604 it difficult to use a common "INSTALL_BASE" library path with
1605 multiple versions of perl.
1606
1607 By setting "-Duseversionedarchname", the $archname will be distinct
1608 for architecture and API version, allowing mixed use of
1609 "INSTALL_BASE".
1610
1611 • Add a "PERL_NO_INLINE_FUNCTIONS" option
1612
1613 If "PERL_NO_INLINE_FUNCTIONS" is defined, don't include "inline.h"
1614
1615 This permits test code to include the perl headers for definitions
1616 without creating a link dependency on the perl library (which may
1617 not exist yet).
1618
1619 • Configure will honour the external "MAILDOMAIN" environment
1620 variable, if set.
1621
1622 • "installman" no longer ignores the silent option
1623
1624 • Both "META.yml" and "META.json" files are now included in the
1625 distribution.
1626
1627 • Configure will now correctly detect isblank() when compiling with a
1628 C++ compiler.
1629
1630 • The pager detection in Configure has been improved to allow
1631 responses which specify options after the program name, e.g.
1632 /usr/bin/less -R, if the user accepts the default value. This
1633 helps perldoc when handling ANSI escapes [perl #72156].
1634
1636 • The test suite now has a section for tests that require very large
1637 amounts of memory. These tests won't run by default; they can be
1638 enabled by setting the "PERL_TEST_MEMORY" environment variable to
1639 the number of gibibytes of memory that may be safely used.
1640
1642 Discontinued Platforms
1643 BeOS
1644 BeOS was an operating system for personal computers developed by Be
1645 Inc, initially for their BeBox hardware. The OS Haiku was written
1646 as an open source replacement for/continuation of BeOS, and its
1647 perl port is current and actively maintained.
1648
1649 UTS Global
1650 Support code relating to UTS global has been removed. UTS was a
1651 mainframe version of System V created by Amdahl, subsequently sold
1652 to UTS Global. The port has not been touched since before Perl
1653 v5.8.0, and UTS Global is now defunct.
1654
1655 VM/ESA
1656 Support for VM/ESA has been removed. The port was tested on 2.3.0,
1657 which IBM ended service on in March 2002. 2.4.0 ended service in
1658 June 2003, and was superseded by Z/VM. The current version of Z/VM
1659 is V6.2.0, and scheduled for end of service on 2015/04/30.
1660
1661 MPE/IX
1662 Support for MPE/IX has been removed.
1663
1664 EPOC
1665 Support code relating to EPOC has been removed. EPOC was a family
1666 of operating systems developed by Psion for mobile devices. It was
1667 the predecessor of Symbian. The port was last updated in April
1668 2002.
1669
1670 Rhapsody
1671 Support for Rhapsody has been removed.
1672
1673 Platform-Specific Notes
1674 AIX
1675
1676 Configure now always adds "-qlanglvl=extc99" to the CC flags on AIX
1677 when using xlC. This will make it easier to compile a number of XS-
1678 based modules that assume C99 [perl #113778].
1679
1680 clang++
1681
1682 There is now a workaround for a compiler bug that prevented compiling
1683 with clang++ since Perl v5.15.7 [perl #112786].
1684
1685 C++
1686
1687 When compiling the Perl core as C++ (which is only semi-supported), the
1688 mathom functions are now compiled as "extern "C"", to ensure proper
1689 binary compatibility. (However, binary compatibility isn't generally
1690 guaranteed anyway in the situations where this would matter.)
1691
1692 Darwin
1693
1694 Stop hardcoding an alignment on 8 byte boundaries to fix builds using
1695 -Dusemorebits.
1696
1697 Haiku
1698
1699 Perl should now work out of the box on Haiku R1 Alpha 4.
1700
1701 MidnightBSD
1702
1703 "libc_r" was removed from recent versions of MidnightBSD and older
1704 versions work better with "pthread". Threading is now enabled using
1705 "pthread" which corrects build errors with threading enabled on
1706 0.4-CURRENT.
1707
1708 Solaris
1709
1710 In Configure, avoid running sed commands with flags not supported on
1711 Solaris.
1712
1713 VMS
1714
1715 • Where possible, the case of filenames and command-line arguments is
1716 now preserved by enabling the CRTL features
1717 "DECC$EFS_CASE_PRESERVE" and "DECC$ARGV_PARSE_STYLE" at start-up
1718 time. The latter only takes effect when extended parse is enabled
1719 in the process from which Perl is run.
1720
1721 • The character set for Extended Filename Syntax (EFS) is now enabled
1722 by default on VMS. Among other things, this provides better
1723 handling of dots in directory names, multiple dots in filenames,
1724 and spaces in filenames. To obtain the old behavior, set the
1725 logical name "DECC$EFS_CHARSET" to "DISABLE".
1726
1727 • Fixed linking on builds configured with "-Dusemymalloc=y".
1728
1729 • Experimental support for building Perl with the HP C++ compiler is
1730 available by configuring with "-Dusecxx".
1731
1732 • All C header files from the top-level directory of the distribution
1733 are now installed on VMS, providing consistency with a long-
1734 standing practice on other platforms. Previously only a subset were
1735 installed, which broke non-core extension builds for extensions
1736 that depended on the missing include files.
1737
1738 • Quotes are now removed from the command verb (but not the
1739 parameters) for commands spawned via "system", backticks, or a
1740 piped "open". Previously, quotes on the verb were passed through
1741 to DCL, which would fail to recognize the command. Also, if the
1742 verb is actually a path to an image or command procedure on an
1743 ODS-5 volume, quoting it now allows the path to contain spaces.
1744
1745 • The a2p build has been fixed for the HP C++ compiler on OpenVMS.
1746
1747 Win32
1748
1749 • Perl can now be built using Microsoft's Visual C++ 2012 compiler by
1750 specifying CCTYPE=MSVC110 (or MSVC110FREE if you are using the free
1751 Express edition for Windows Desktop) in win32/Makefile.
1752
1753 • The option to build without "USE_SOCKETS_AS_HANDLES" has been
1754 removed.
1755
1756 • Fixed a problem where perl could crash while cleaning up threads
1757 (including the main thread) in threaded debugging builds on Win32
1758 and possibly other platforms [perl #114496].
1759
1760 • A rare race condition that would lead to sleep taking more time
1761 than requested, and possibly even hanging, has been fixed [perl
1762 #33096].
1763
1764 • "link" on Win32 now attempts to set $! to more appropriate values
1765 based on the Win32 API error code. [perl #112272]
1766
1767 Perl no longer mangles the environment block, e.g. when launching a
1768 new sub-process, when the environment contains non-ASCII
1769 characters. Known problems still remain, however, when the
1770 environment contains characters outside of the current ANSI
1771 codepage (e.g. see the item about Unicode in %ENV in
1772 <http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/todo.pod>).
1773 [perl #113536]
1774
1775 • Building perl with some Windows compilers used to fail due to a
1776 problem with miniperl's "glob" operator (which uses the "perlglob"
1777 program) deleting the PATH environment variable [perl #113798].
1778
1779 • A new makefile option, "USE_64_BIT_INT", has been added to the
1780 Windows makefiles. Set this to "define" when building a 32-bit
1781 perl if you want it to use 64-bit integers.
1782
1783 Machine code size reductions, already made to the DLLs of XS
1784 modules in Perl v5.17.2, have now been extended to the perl DLL
1785 itself.
1786
1787 Building with VC++ 6.0 was inadvertently broken in Perl v5.17.2 but
1788 has now been fixed again.
1789
1790 WinCE
1791
1792 Building on WinCE is now possible once again, although more work is
1793 required to fully restore a clean build.
1794
1796 • Synonyms for the misleadingly named av_len() have been created:
1797 av_top_index() and "av_tindex". All three of these return the
1798 number of the highest index in the array, not the number of
1799 elements it contains.
1800
1801 • SvUPGRADE() is no longer an expression. Originally this macro (and
1802 its underlying function, sv_upgrade()) were documented as boolean,
1803 although in reality they always croaked on error and never returned
1804 false. In 2005 the documentation was updated to specify a void
1805 return value, but SvUPGRADE() was left always returning 1 for
1806 backwards compatibility. This has now been removed, and SvUPGRADE()
1807 is now a statement with no return value.
1808
1809 So this is now a syntax error:
1810
1811 if (!SvUPGRADE(sv)) { croak(...); }
1812
1813 If you have code like that, simply replace it with
1814
1815 SvUPGRADE(sv);
1816
1817 or to avoid compiler warnings with older perls, possibly
1818
1819 (void)SvUPGRADE(sv);
1820
1821 • Perl has a new copy-on-write mechanism that allows any SvPOK scalar
1822 to be upgraded to a copy-on-write scalar. A reference count on the
1823 string buffer is stored in the string buffer itself. This feature
1824 is not enabled by default.
1825
1826 It can be enabled in a perl build by running Configure with
1827 -Accflags=-DPERL_NEW_COPY_ON_WRITE, and we would encourage XS
1828 authors to try their code with such an enabled perl, and provide
1829 feedback. Unfortunately, there is not yet a good guide to updating
1830 XS code to cope with COW. Until such a document is available,
1831 consult the perl5-porters mailing list.
1832
1833 It breaks a few XS modules by allowing copy-on-write scalars to go
1834 through code paths that never encountered them before.
1835
1836 • Copy-on-write no longer uses the SvFAKE and SvREADONLY flags.
1837 Hence, SvREADONLY indicates a true read-only SV.
1838
1839 Use the SvIsCOW macro (as before) to identify a copy-on-write
1840 scalar.
1841
1842 • "PL_glob_index" is gone.
1843
1844 • The private Perl_croak_no_modify has had its context parameter
1845 removed. It is now has a void prototype. Users of the public API
1846 croak_no_modify remain unaffected.
1847
1848 • Copy-on-write (shared hash key) scalars are no longer marked read-
1849 only. "SvREADONLY" returns false on such an SV, but "SvIsCOW"
1850 still returns true.
1851
1852 • A new op type, "OP_PADRANGE" has been introduced. The perl
1853 peephole optimiser will, where possible, substitute a single
1854 padrange op for a pushmark followed by one or more pad ops, and
1855 possibly also skipping list and nextstate ops. In addition, the op
1856 can carry out the tasks associated with the RHS of a "my(...) = @_"
1857 assignment, so those ops may be optimised away too.
1858
1859 • Case-insensitive matching inside a [bracketed] character class with
1860 a multi-character fold no longer excludes one of the possibilities
1861 in the circumstances that it used to. [perl #89774].
1862
1863 • "PL_formfeed" has been removed.
1864
1865 • The regular expression engine no longer reads one byte past the end
1866 of the target string. While for all internally well-formed scalars
1867 this should never have been a problem, this change facilitates
1868 clever tricks with string buffers in CPAN modules. [perl #73542]
1869
1870 • Inside a BEGIN block, "PL_compcv" now points to the currently-
1871 compiling subroutine, rather than the BEGIN block itself.
1872
1873 • "mg_length" has been deprecated.
1874
1875 • "sv_len" now always returns a byte count and "sv_len_utf8" a
1876 character count. Previously, "sv_len" and "sv_len_utf8" were both
1877 buggy and would sometimes returns bytes and sometimes characters.
1878 "sv_len_utf8" no longer assumes that its argument is in UTF-8.
1879 Neither of these creates UTF-8 caches for tied or overloaded values
1880 or for non-PVs any more.
1881
1882 • "sv_mortalcopy" now copies string buffers of shared hash key
1883 scalars when called from XS modules [perl #79824].
1884
1885 • The new "RXf_MODIFIES_VARS" flag can be set by custom regular
1886 expression engines to indicate that the execution of the regular
1887 expression may cause variables to be modified. This lets "s///"
1888 know to skip certain optimisations. Perl's own regular expression
1889 engine sets this flag for the special backtracking verbs that set
1890 $REGMARK and $REGERROR.
1891
1892 • The APIs for accessing lexical pads have changed considerably.
1893
1894 "PADLIST"s are now longer "AV"s, but their own type instead.
1895 "PADLIST"s now contain a "PAD" and a "PADNAMELIST" of "PADNAME"s,
1896 rather than "AV"s for the pad and the list of pad names. "PAD"s,
1897 "PADNAMELIST"s, and "PADNAME"s are to be accessed as such through
1898 the newly added pad API instead of the plain "AV" and "SV" APIs.
1899 See perlapi for details.
1900
1901 • In the regex API, the numbered capture callbacks are passed an
1902 index indicating what match variable is being accessed. There are
1903 special index values for the "$`, $&, $&" variables. Previously the
1904 same three values were used to retrieve "${^PREMATCH}, ${^MATCH},
1905 ${^POSTMATCH}" too, but these have now been assigned three separate
1906 values. See "Numbered capture callbacks" in perlreapi.
1907
1908 • "PL_sawampersand" was previously a boolean indicating that any of
1909 "$`, $&, $&" had been seen; it now contains three one-bit flags
1910 indicating the presence of each of the variables individually.
1911
1912 • The "CV *" typemap entry now supports "&{}" overloading and
1913 typeglobs, just like "&{...}" [perl #96872].
1914
1915 • The "SVf_AMAGIC" flag to indicate overloading is now on the stash,
1916 not the object. It is now set automatically whenever a method or
1917 @ISA changes, so its meaning has changed, too. It now means
1918 "potentially overloaded". When the overload table is calculated,
1919 the flag is automatically turned off if there is no overloading, so
1920 there should be no noticeable slowdown.
1921
1922 The staleness of the overload tables is now checked when overload
1923 methods are invoked, rather than during "bless".
1924
1925 "A" magic is gone. The changes to the handling of the "SVf_AMAGIC"
1926 flag eliminate the need for it.
1927
1928 "PL_amagic_generation" has been removed as no longer necessary.
1929 For XS modules, it is now a macro alias to "PL_na".
1930
1931 The fallback overload setting is now stored in a stash entry
1932 separate from overloadedness itself.
1933
1934 • The character-processing code has been cleaned up in places. The
1935 changes should be operationally invisible.
1936
1937 • The "study" function was made a no-op in v5.16. It was simply
1938 disabled via a "return" statement; the code was left in place. Now
1939 the code supporting what "study" used to do has been removed.
1940
1941 • Under threaded perls, there is no longer a separate PV allocated
1942 for every COP to store its package name ("cop->stashpv"). Instead,
1943 there is an offset ("cop->stashoff") into the new "PL_stashpad"
1944 array, which holds stash pointers.
1945
1946 • In the pluggable regex API, the "regexp_engine" struct has acquired
1947 a new field "op_comp", which is currently just for perl's internal
1948 use, and should be initialized to NULL by other regex plugin
1949 modules.
1950
1951 • A new function "alloccopstash" has been added to the API, but is
1952 considered experimental. See perlapi.
1953
1954 • Perl used to implement get magic in a way that would sometimes hide
1955 bugs in code that could call mg_get() too many times on magical
1956 values. This hiding of errors no longer occurs, so long-standing
1957 bugs may become visible now. If you see magic-related errors in XS
1958 code, check to make sure it, together with the Perl API functions
1959 it uses, calls mg_get() only once on SvGMAGICAL() values.
1960
1961 • OP allocation for CVs now uses a slab allocator. This simplifies
1962 memory management for OPs allocated to a CV, so cleaning up after a
1963 compilation error is simpler and safer [perl #111462][perl
1964 #112312].
1965
1966 • "PERL_DEBUG_READONLY_OPS" has been rewritten to work with the new
1967 slab allocator, allowing it to catch more violations than before.
1968
1969 • The old slab allocator for ops, which was only enabled for
1970 "PERL_IMPLICIT_SYS" and "PERL_DEBUG_READONLY_OPS", has been
1971 retired.
1972
1974 • Here document terminators no longer require a terminating newline
1975 character when they occur at the end of a file. This was already
1976 the case at the end of a string eval [perl #65838].
1977
1978 • "-DPERL_GLOBAL_STRUCT" builds now free the global struct after
1979 they've finished using it.
1980
1981 • A trailing '/' on a path in @INC will no longer have an additional
1982 '/' appended.
1983
1984 • The ":crlf" layer now works when unread data doesn't fit into its
1985 own buffer. [perl #112244].
1986
1987 • ungetc() now handles UTF-8 encoded data. [perl #116322].
1988
1989 • A bug in the core typemap caused any C types that map to the T_BOOL
1990 core typemap entry to not be set, updated, or modified when the
1991 T_BOOL variable was used in an OUTPUT: section with an exception
1992 for RETVAL. T_BOOL in an INPUT: section was not affected. Using a
1993 T_BOOL return type for an XSUB (RETVAL) was not affected. A side
1994 effect of fixing this bug is, if a T_BOOL is specified in the
1995 OUTPUT: section (which previous did nothing to the SV), and a read
1996 only SV (literal) is passed to the XSUB, croaks like "Modification
1997 of a read-only value attempted" will happen. [perl #115796]
1998
1999 • On many platforms, providing a directory name as the script name
2000 caused perl to do nothing and report success. It should now
2001 universally report an error and exit nonzero. [perl #61362]
2002
2003 • "sort {undef} ..." under fatal warnings no longer crashes. It had
2004 begun crashing in Perl v5.16.
2005
2006 • Stashes blessed into each other ("bless \%Foo::, 'Bar'; bless
2007 \%Bar::, 'Foo'") no longer result in double frees. This bug
2008 started happening in Perl v5.16.
2009
2010 • Numerous memory leaks have been fixed, mostly involving fatal
2011 warnings and syntax errors.
2012
2013 • Some failed regular expression matches such as "'f' =~ /../g" were
2014 not resetting "pos". Also, "match-once" patterns ("m?...?g")
2015 failed to reset it, too, when invoked a second time [perl #23180].
2016
2017 • Several bugs involving "local *ISA" and "local *Foo::" causing
2018 stale MRO caches have been fixed.
2019
2020 • Defining a subroutine when its typeglob has been aliased no longer
2021 results in stale method caches. This bug was introduced in Perl
2022 v5.10.
2023
2024 • Localising a typeglob containing a subroutine when the typeglob's
2025 package has been deleted from its parent stash no longer produces
2026 an error. This bug was introduced in Perl v5.14.
2027
2028 • Under some circumstances, "local *method=..." would fail to reset
2029 method caches upon scope exit.
2030
2031 • "/[.foo.]/" is no longer an error, but produces a warning (as
2032 before) and is treated as "/[.fo]/" [perl #115818].
2033
2034 • "goto $tied_var" now calls FETCH before deciding what type of goto
2035 (subroutine or label) this is.
2036
2037 • Renaming packages through glob assignment ("*Foo:: = *Bar::; *Bar::
2038 = *Baz::") in combination with "m?...?" and "reset" no longer makes
2039 threaded builds crash.
2040
2041 • A number of bugs related to assigning a list to hash have been
2042 fixed. Many of these involve lists with repeated keys like "(1, 1,
2043 1, 1)".
2044
2045 • The expression "scalar(%h = (1, 1, 1, 1))" now returns 4, not
2046 2.
2047
2048 • The return value of "%h = (1, 1, 1)" in list context was wrong.
2049 Previously this would return "(1, undef, 1)", now it returns
2050 "(1, undef)".
2051
2052 • Perl now issues the same warning on "($s, %h) = (1, {})" as it
2053 does for "(%h) = ({})", "Reference found where even-sized list
2054 expected".
2055
2056 • A number of additional edge cases in list assignment to hashes
2057 were corrected. For more details see commit 23b7025ebc.
2058
2059 • Attributes applied to lexical variables no longer leak memory.
2060 [perl #114764]
2061
2062 • "dump", "goto", "last", "next", "redo" or "require" followed by a
2063 bareword (or version) and then an infix operator is no longer a
2064 syntax error. It used to be for those infix operators (like "+")
2065 that have a different meaning where a term is expected. [perl
2066 #105924]
2067
2068 • "require a::b . 1" and "require a::b + 1" no longer produce
2069 erroneous ambiguity warnings. [perl #107002]
2070
2071 • Class method calls are now allowed on any string, and not just
2072 strings beginning with an alphanumeric character. [perl #105922]
2073
2074 • An empty pattern created with "qr//" used in "m///" no longer
2075 triggers the "empty pattern reuses last pattern" behaviour. [perl
2076 #96230]
2077
2078 • Tying a hash during iteration no longer results in a memory leak.
2079
2080 • Freeing a tied hash during iteration no longer results in a memory
2081 leak.
2082
2083 • List assignment to a tied array or hash that dies on STORE no
2084 longer results in a memory leak.
2085
2086 • If the hint hash ("%^H") is tied, compile-time scope entry (which
2087 copies the hint hash) no longer leaks memory if FETCH dies. [perl
2088 #107000]
2089
2090 • Constant folding no longer inappropriately triggers the special
2091 "split " "" behaviour. [perl #94490]
2092
2093 • "defined scalar(@array)", "defined do { &foo }", and similar
2094 constructs now treat the argument to "defined" as a simple scalar.
2095 [perl #97466]
2096
2097 • Running a custom debugging that defines no *DB::DB glob or provides
2098 a subroutine stub for &DB::DB no longer results in a crash, but an
2099 error instead. [perl #114990]
2100
2101 • "reset """ now matches its documentation. "reset" only resets
2102 "m?...?" patterns when called with no argument. An empty string
2103 for an argument now does nothing. (It used to be treated as no
2104 argument.) [perl #97958]
2105
2106 • "printf" with an argument returning an empty list no longer reads
2107 past the end of the stack, resulting in erratic behaviour. [perl
2108 #77094]
2109
2110 • "--subname" no longer produces erroneous ambiguity warnings. [perl
2111 #77240]
2112
2113 • "v10" is now allowed as a label or package name. This was
2114 inadvertently broken when v-strings were added in Perl v5.6. [perl
2115 #56880]
2116
2117 • "length", "pos", "substr" and "sprintf" could be confused by ties,
2118 overloading, references and typeglobs if the stringification of
2119 such changed the internal representation to or from UTF-8. [perl
2120 #114410]
2121
2122 • utf8::encode now calls FETCH and STORE on tied variables.
2123 utf8::decode now calls STORE (it was already calling FETCH).
2124
2125 • "$tied =~ s/$non_utf8/$utf8/" no longer loops infinitely if the
2126 tied variable returns a Latin-1 string, shared hash key scalar, or
2127 reference or typeglob that stringifies as ASCII or Latin-1. This
2128 was a regression from v5.12.
2129
2130 • "s///" without /e is now better at detecting when it needs to
2131 forego certain optimisations, fixing some buggy cases:
2132
2133 • Match variables in certain constructs ("&&", "||", ".." and
2134 others) in the replacement part; e.g., "s/(.)/$l{$a||$1}/g".
2135 [perl #26986]
2136
2137 • Aliases to match variables in the replacement.
2138
2139 • $REGERROR or $REGMARK in the replacement. [perl #49190]
2140
2141 • An empty pattern ("s//$foo/") that causes the last-successful
2142 pattern to be used, when that pattern contains code blocks that
2143 modify the variables in the replacement.
2144
2145 • The taintedness of the replacement string no longer affects the
2146 taintedness of the return value of "s///e".
2147
2148 • The $| autoflush variable is created on-the-fly when needed. If
2149 this happened (e.g., if it was mentioned in a module or eval) when
2150 the currently-selected filehandle was a typeglob with an empty IO
2151 slot, it used to crash. [perl #115206]
2152
2153 • Line numbers at the end of a string eval are no longer off by one.
2154 [perl #114658]
2155
2156 • @INC filters (subroutines returned by subroutines in @INC) that set
2157 $_ to a copy-on-write scalar no longer cause the parser to modify
2158 that string buffer in place.
2159
2160 • length($object) no longer returns the undefined value if the object
2161 has string overloading that returns undef. [perl #115260]
2162
2163 • The use of "PL_stashcache", the stash name lookup cache for method
2164 calls, has been restored,
2165
2166 Commit da6b625f78f5f133 in August 2011 inadvertently broke the code
2167 that looks up values in "PL_stashcache". As it's only a cache,
2168 quite correctly everything carried on working without it.
2169
2170 • The error "Can't localize through a reference" had disappeared in
2171 v5.16.0 when "local %$ref" appeared on the last line of an lvalue
2172 subroutine. This error disappeared for "\local %$ref" in perl
2173 v5.8.1. It has now been restored.
2174
2175 • The parsing of here-docs has been improved significantly, fixing
2176 several parsing bugs and crashes and one memory leak, and
2177 correcting wrong subsequent line numbers under certain conditions.
2178
2179 • Inside an eval, the error message for an unterminated here-doc no
2180 longer has a newline in the middle of it [perl #70836].
2181
2182 • A substitution inside a substitution pattern ("s/${s|||}//") no
2183 longer confuses the parser.
2184
2185 • It may be an odd place to allow comments, but "s//"" # hello/e" has
2186 always worked, unless there happens to be a null character before
2187 the first #. Now it works even in the presence of nulls.
2188
2189 • An invalid range in "tr///" or "y///" no longer results in a memory
2190 leak.
2191
2192 • String eval no longer treats a semicolon-delimited quote-like
2193 operator at the very end ("eval 'q;;'") as a syntax error.
2194
2195 • "warn {$_ => 1} + 1" is no longer a syntax error. The parser used
2196 to get confused with certain list operators followed by an
2197 anonymous hash and then an infix operator that shares its form with
2198 a unary operator.
2199
2200 • "(caller $n)[6]" (which gives the text of the eval) used to return
2201 the actual parser buffer. Modifying it could result in crashes.
2202 Now it always returns a copy. The string returned no longer has
2203 "\n;" tacked on to the end. The returned text also includes here-
2204 doc bodies, which used to be omitted.
2205
2206 • The UTF-8 position cache is now reset when accessing magical
2207 variables, to avoid the string buffer and the UTF-8 position cache
2208 getting out of sync [perl #114410].
2209
2210 • Various cases of get magic being called twice for magical UTF-8
2211 strings have been fixed.
2212
2213 • This code (when not in the presence of $& etc)
2214
2215 $_ = 'x' x 1_000_000;
2216 1 while /(.)/;
2217
2218 used to skip the buffer copy for performance reasons, but suffered
2219 from $1 etc changing if the original string changed. That's now
2220 been fixed.
2221
2222 • Perl doesn't use PerlIO anymore to report out of memory messages,
2223 as PerlIO might attempt to allocate more memory.
2224
2225 • In a regular expression, if something is quantified with "{n,m}"
2226 where "n > m", it can't possibly match. Previously this was a
2227 fatal error, but now is merely a warning (and that something won't
2228 match). [perl #82954].
2229
2230 • It used to be possible for formats defined in subroutines that have
2231 subsequently been undefined and redefined to close over variables
2232 in the wrong pad (the newly-defined enclosing sub), resulting in
2233 crashes or "Bizarre copy" errors.
2234
2235 • Redefinition of XSUBs at run time could produce warnings with the
2236 wrong line number.
2237
2238 • The %vd sprintf format does not support version objects for alpha
2239 versions. It used to output the format itself (%vd) when passed an
2240 alpha version, and also emit an "Invalid conversion in printf"
2241 warning. It no longer does, but produces the empty string in the
2242 output. It also no longer leaks memory in this case.
2243
2244 • "$obj->SUPER::method" calls in the main package could fail if the
2245 SUPER package had already been accessed by other means.
2246
2247 • Stash aliasing ("*foo:: = *bar::") no longer causes SUPER calls to
2248 ignore changes to methods or @ISA or use the wrong package.
2249
2250 • Method calls on packages whose names end in ::SUPER are no longer
2251 treated as SUPER method calls, resulting in failure to find the
2252 method. Furthermore, defining subroutines in such packages no
2253 longer causes them to be found by SUPER method calls on the
2254 containing package [perl #114924].
2255
2256 • "\w" now matches the code points U+200C (ZERO WIDTH NON-JOINER) and
2257 U+200D (ZERO WIDTH JOINER). "\W" no longer matches these. This
2258 change is because Unicode corrected their definition of what "\w"
2259 should match.
2260
2261 • "dump LABEL" no longer leaks its label.
2262
2263 • Constant folding no longer changes the behaviour of functions like
2264 stat() and truncate() that can take either filenames or handles.
2265 "stat 1 ? foo : bar" nows treats its argument as a file name (since
2266 it is an arbitrary expression), rather than the handle "foo".
2267
2268 • "truncate FOO, $len" no longer falls back to treating "FOO" as a
2269 file name if the filehandle has been deleted. This was broken in
2270 Perl v5.16.0.
2271
2272 • Subroutine redefinitions after sub-to-glob and glob-to-glob
2273 assignments no longer cause double frees or panic messages.
2274
2275 • "s///" now turns vstrings into plain strings when performing a
2276 substitution, even if the resulting string is the same ("s/a/a/").
2277
2278 • Prototype mismatch warnings no longer erroneously treat constant
2279 subs as having no prototype when they actually have "".
2280
2281 • Constant subroutines and forward declarations no longer prevent
2282 prototype mismatch warnings from omitting the sub name.
2283
2284 • "undef" on a subroutine now clears call checkers.
2285
2286 • The "ref" operator started leaking memory on blessed objects in
2287 Perl v5.16.0. This has been fixed [perl #114340].
2288
2289 • "use" no longer tries to parse its arguments as a statement, making
2290 "use constant { () };" a syntax error [perl #114222].
2291
2292 • On debugging builds, "uninitialized" warnings inside formats no
2293 longer cause assertion failures.
2294
2295 • On debugging builds, subroutines nested inside formats no longer
2296 cause assertion failures [perl #78550].
2297
2298 • Formats and "use" statements are now permitted inside formats.
2299
2300 • "print $x" and "sub { print $x }->()" now always produce the same
2301 output. It was possible for the latter to refuse to close over $x
2302 if the variable was not active; e.g., if it was defined outside a
2303 currently-running named subroutine.
2304
2305 • Similarly, "print $x" and "print eval '$x'" now produce the same
2306 output. This also allows "my $x if 0" variables to be seen in the
2307 debugger [perl #114018].
2308
2309 • Formats called recursively no longer stomp on their own lexical
2310 variables, but each recursive call has its own set of lexicals.
2311
2312 • Attempting to free an active format or the handle associated with
2313 it no longer results in a crash.
2314
2315 • Format parsing no longer gets confused by braces, semicolons and
2316 low-precedence operators. It used to be possible to use braces as
2317 format delimiters (instead of "=" and "."), but only sometimes.
2318 Semicolons and low-precedence operators in format argument lines no
2319 longer confuse the parser into ignoring the line's return value.
2320 In format argument lines, braces can now be used for anonymous
2321 hashes, instead of being treated always as "do" blocks.
2322
2323 • Formats can now be nested inside code blocks in regular expressions
2324 and other quoted constructs ("/(?{...})/" and "qq/${...}/") [perl
2325 #114040].
2326
2327 • Formats are no longer created after compilation errors.
2328
2329 • Under debugging builds, the -DA command line option started
2330 crashing in Perl v5.16.0. It has been fixed [perl #114368].
2331
2332 • A potential deadlock scenario involving the premature termination
2333 of a pseudo- forked child in a Windows build with ithreads enabled
2334 has been fixed. This resolves the common problem of the
2335 t/op/fork.t test hanging on Windows [perl #88840].
2336
2337 • The code which generates errors from require() could potentially
2338 read one or two bytes before the start of the filename for
2339 filenames less than three bytes long and ending "/\.p?\z/". This
2340 has now been fixed. Note that it could never have happened with
2341 module names given to use() or require() anyway.
2342
2343 • The handling of pathnames of modules given to require() has been
2344 made thread-safe on VMS.
2345
2346 • Non-blocking sockets have been fixed on VMS.
2347
2348 • Pod can now be nested in code inside a quoted construct outside of
2349 a string eval. This used to work only within string evals [perl
2350 #114040].
2351
2352 • "goto ''" now looks for an empty label, producing the "goto must
2353 have label" error message, instead of exiting the program [perl
2354 #111794].
2355
2356 • "goto "\0"" now dies with "Can't find label" instead of "goto must
2357 have label".
2358
2359 • The C function "hv_store" used to result in crashes when used on
2360 "%^H" [perl #111000].
2361
2362 • A call checker attached to a closure prototype via
2363 "cv_set_call_checker" is now copied to closures cloned from it. So
2364 "cv_set_call_checker" now works inside an attribute handler for a
2365 closure.
2366
2367 • Writing to $^N used to have no effect. Now it croaks with
2368 "Modification of a read-only value" by default, but that can be
2369 overridden by a custom regular expression engine, as with $1 [perl
2370 #112184].
2371
2372 • "undef" on a control character glob ("undef *^H") no longer emits
2373 an erroneous warning about ambiguity [perl #112456].
2374
2375 • For efficiency's sake, many operators and built-in functions return
2376 the same scalar each time. Lvalue subroutines and subroutines in
2377 the CORE:: namespace were allowing this implementation detail to
2378 leak through. "print &CORE::uc("a"), &CORE::uc("b")" used to print
2379 "BB". The same thing would happen with an lvalue subroutine
2380 returning the return value of "uc". Now the value is copied in
2381 such cases.
2382
2383 • "method {}" syntax with an empty block or a block returning an
2384 empty list used to crash or use some random value left on the stack
2385 as its invocant. Now it produces an error.
2386
2387 • "vec" now works with extremely large offsets (>2 GB) [perl
2388 #111730].
2389
2390 • Changes to overload settings now take effect immediately, as do
2391 changes to inheritance that affect overloading. They used to take
2392 effect only after "bless".
2393
2394 Objects that were created before a class had any overloading used
2395 to remain non-overloaded even if the class gained overloading
2396 through "use overload" or @ISA changes, and even after "bless".
2397 This has been fixed [perl #112708].
2398
2399 • Classes with overloading can now inherit fallback values.
2400
2401 • Overloading was not respecting a fallback value of 0 if there were
2402 overloaded objects on both sides of an assignment operator like
2403 "+=" [perl #111856].
2404
2405 • "pos" now croaks with hash and array arguments, instead of
2406 producing erroneous warnings.
2407
2408 • "while(each %h)" now implies "while(defined($_ = each %h))", like
2409 "readline" and "readdir".
2410
2411 • Subs in the CORE:: namespace no longer crash after "undef *_" when
2412 called with no argument list (&CORE::time with no parentheses).
2413
2414 • "unpack" no longer produces the "'/' must follow a numeric type in
2415 unpack" error when it is the data that are at fault [perl #60204].
2416
2417 • "join" and "@array" now call FETCH only once on a tied $" [perl
2418 #8931].
2419
2420 • Some subroutine calls generated by compiling core ops affected by a
2421 "CORE::GLOBAL" override had op checking performed twice. The
2422 checking is always idempotent for pure Perl code, but the double
2423 checking can matter when custom call checkers are involved.
2424
2425 • A race condition used to exist around fork that could cause a
2426 signal sent to the parent to be handled by both parent and child.
2427 Signals are now blocked briefly around fork to prevent this from
2428 happening [perl #82580].
2429
2430 • The implementation of code blocks in regular expressions, such as
2431 "(?{})" and "(??{})", has been heavily reworked to eliminate a
2432 whole slew of bugs. The main user-visible changes are:
2433
2434 • Code blocks within patterns are now parsed in the same pass as
2435 the surrounding code; in particular it is no longer necessary
2436 to have balanced braces: this now works:
2437
2438 /(?{ $x='{' })/
2439
2440 This means that this error message is no longer generated:
2441
2442 Sequence (?{...}) not terminated or not {}-balanced in regex
2443
2444 but a new error may be seen:
2445
2446 Sequence (?{...}) not terminated with ')'
2447
2448 In addition, literal code blocks within run-time patterns are
2449 only compiled once, at perl compile-time:
2450
2451 for my $p (...) {
2452 # this 'FOO' block of code is compiled once,
2453 # at the same time as the surrounding 'for' loop
2454 /$p{(?{FOO;})/;
2455 }
2456
2457 • Lexical variables are now sane as regards scope, recursion and
2458 closure behavior. In particular, "/A(?{B})C/" behaves (from a
2459 closure viewpoint) exactly like "/A/ && do { B } && /C/", while
2460 "qr/A(?{B})C/" is like "sub {/A/ && do { B } && /C/}". So this
2461 code now works how you might expect, creating three regexes
2462 that match 0, 1, and 2:
2463
2464 for my $i (0..2) {
2465 push @r, qr/^(??{$i})$/;
2466 }
2467 "1" =~ $r[1]; # matches
2468
2469 • The "use re 'eval'" pragma is now only required for code blocks
2470 defined at runtime; in particular in the following, the text of
2471 the $r pattern is still interpolated into the new pattern and
2472 recompiled, but the individual compiled code-blocks within $r
2473 are reused rather than being recompiled, and "use re 'eval'"
2474 isn't needed any more:
2475
2476 my $r = qr/abc(?{....})def/;
2477 /xyz$r/;
2478
2479 • Flow control operators no longer crash. Each code block runs in
2480 a new dynamic scope, so "next" etc. will not see any enclosing
2481 loops. "return" returns a value from the code block, not from
2482 any enclosing subroutine.
2483
2484 • Perl normally caches the compilation of run-time patterns, and
2485 doesn't recompile if the pattern hasn't changed, but this is
2486 now disabled if required for the correct behavior of closures.
2487 For example:
2488
2489 my $code = '(??{$x})';
2490 for my $x (1..3) {
2491 # recompile to see fresh value of $x each time
2492 $x =~ /$code/;
2493 }
2494
2495 • The "/msix" and "(?msix)" etc. flags are now propagated into
2496 the return value from "(??{})"; this now works:
2497
2498 "AB" =~ /a(??{'b'})/i;
2499
2500 • Warnings and errors will appear to come from the surrounding
2501 code (or for run-time code blocks, from an eval) rather than
2502 from an "re_eval":
2503
2504 use re 'eval'; $c = '(?{ warn "foo" })'; /$c/;
2505 /(?{ warn "foo" })/;
2506
2507 formerly gave:
2508
2509 foo at (re_eval 1) line 1.
2510 foo at (re_eval 2) line 1.
2511
2512 and now gives:
2513
2514 foo at (eval 1) line 1.
2515 foo at /some/prog line 2.
2516
2517 • Perl now can be recompiled to use any Unicode version. In v5.16,
2518 it worked on Unicodes 6.0 and 6.1, but there were various bugs if
2519 earlier releases were used; the older the release the more
2520 problems.
2521
2522 • "vec" no longer produces "uninitialized" warnings in lvalue context
2523 [perl #9423].
2524
2525 • An optimization involving fixed strings in regular expressions
2526 could cause a severe performance penalty in edge cases. This has
2527 been fixed [perl #76546].
2528
2529 • In certain cases, including empty subpatterns within a regular
2530 expression (such as "(?:)" or "(?:|)") could disable some
2531 optimizations. This has been fixed.
2532
2533 • The "Can't find an opnumber" message that "prototype" produces when
2534 passed a string like "CORE::nonexistent_keyword" now passes UTF-8
2535 and embedded NULs through unchanged [perl #97478].
2536
2537 • "prototype" now treats magical variables like $1 the same way as
2538 non-magical variables when checking for the CORE:: prefix, instead
2539 of treating them as subroutine names.
2540
2541 • Under threaded perls, a runtime code block in a regular expression
2542 could corrupt the package name stored in the op tree, resulting in
2543 bad reads in "caller", and possibly crashes [perl #113060].
2544
2545 • Referencing a closure prototype ("\&{$_[1]}" in an attribute
2546 handler for a closure) no longer results in a copy of the
2547 subroutine (or assertion failures on debugging builds).
2548
2549 • "eval '__PACKAGE__'" now returns the right answer on threaded
2550 builds if the current package has been assigned over (as in
2551 "*ThisPackage:: = *ThatPackage::") [perl #78742].
2552
2553 • If a package is deleted by code that it calls, it is possible for
2554 "caller" to see a stack frame belonging to that deleted package.
2555 "caller" could crash if the stash's memory address was reused for a
2556 scalar and a substitution was performed on the same scalar [perl
2557 #113486].
2558
2559 • "UNIVERSAL::can" no longer treats its first argument differently
2560 depending on whether it is a string or number internally.
2561
2562 • "open" with "<&" for the mode checks to see whether the third
2563 argument is a number, in determining whether to treat it as a file
2564 descriptor or a handle name. Magical variables like $1 were always
2565 failing the numeric check and being treated as handle names.
2566
2567 • "warn"'s handling of magical variables ($1, ties) has undergone
2568 several fixes. "FETCH" is only called once now on a tied argument
2569 or a tied $@ [perl #97480]. Tied variables returning objects that
2570 stringify as "" are no longer ignored. A tied $@ that happened to
2571 return a reference the previous time it was used is no longer
2572 ignored.
2573
2574 • "warn """ now treats $@ with a number in it the same way,
2575 regardless of whether it happened via "$@=3" or "$@="3"". It used
2576 to ignore the former. Now it appends "\t...caught", as it has
2577 always done with "$@="3"".
2578
2579 • Numeric operators on magical variables (e.g., "$1 + 1") used to use
2580 floating point operations even where integer operations were more
2581 appropriate, resulting in loss of accuracy on 64-bit platforms
2582 [perl #109542].
2583
2584 • Unary negation no longer treats a string as a number if the string
2585 happened to be used as a number at some point. So, if $x contains
2586 the string "dogs", "-$x" returns "-dogs" even if "$y=0+$x" has
2587 happened at some point.
2588
2589 • In Perl v5.14, "-'-10'" was fixed to return "10", not "+10". But
2590 magical variables ($1, ties) were not fixed till now [perl #57706].
2591
2592 • Unary negation now treats strings consistently, regardless of the
2593 internal "UTF8" flag.
2594
2595 • A regression introduced in Perl v5.16.0 involving
2596 "tr/SEARCHLIST/REPLACEMENTLIST/" has been fixed. Only the first
2597 instance is supposed to be meaningful if a character appears more
2598 than once in "SEARCHLIST". Under some circumstances, the final
2599 instance was overriding all earlier ones. [perl #113584]
2600
2601 • Regular expressions like "qr/\87/" previously silently inserted a
2602 NUL character, thus matching as if it had been written
2603 "qr/\00087/". Now it matches as if it had been written as
2604 "qr/87/", with a message that the sequence "\8" is unrecognized.
2605
2606 • "__SUB__" now works in special blocks ("BEGIN", "END", etc.).
2607
2608 • Thread creation on Windows could theoretically result in a crash if
2609 done inside a "BEGIN" block. It still does not work properly, but
2610 it no longer crashes [perl #111610].
2611
2612 • "\&{''}" (with the empty string) now autovivifies a stub like any
2613 other sub name, and no longer produces the "Unable to create sub"
2614 error [perl #94476].
2615
2616 • A regression introduced in v5.14.0 has been fixed, in which some
2617 calls to the "re" module would clobber $_ [perl #113750].
2618
2619 • "do FILE" now always either sets or clears $@, even when the file
2620 can't be read. This ensures that testing $@ first (as recommended
2621 by the documentation) always returns the correct result.
2622
2623 • The array iterator used for the "each @array" construct is now
2624 correctly reset when @array is cleared [perl #75596]. This happens,
2625 for example, when the array is globally assigned to, as in "@array
2626 = (...)", but not when its values are assigned to. In terms of the
2627 XS API, it means that av_clear() will now reset the iterator.
2628
2629 This mirrors the behaviour of the hash iterator when the hash is
2630 cleared.
2631
2632 • "$class->can", "$class->isa", and "$class->DOES" now return correct
2633 results, regardless of whether that package referred to by $class
2634 exists [perl #47113].
2635
2636 • Arriving signals no longer clear $@ [perl #45173].
2637
2638 • Allow "my ()" declarations with an empty variable list [perl
2639 #113554].
2640
2641 • During parsing, subs declared after errors no longer leave stubs
2642 [perl #113712].
2643
2644 • Closures containing no string evals no longer hang on to their
2645 containing subroutines, allowing variables closed over by outer
2646 subroutines to be freed when the outer sub is freed, even if the
2647 inner sub still exists [perl #89544].
2648
2649 • Duplication of in-memory filehandles by opening with a "<&=" or
2650 ">&=" mode stopped working properly in v5.16.0. It was causing the
2651 new handle to reference a different scalar variable. This has been
2652 fixed [perl #113764].
2653
2654 • "qr//" expressions no longer crash with custom regular expression
2655 engines that do not set "offs" at regular expression compilation
2656 time [perl #112962].
2657
2658 • "delete local" no longer crashes with certain magical arrays and
2659 hashes [perl #112966].
2660
2661 • "local" on elements of certain magical arrays and hashes used not
2662 to arrange to have the element deleted on scope exit, even if the
2663 element did not exist before "local".
2664
2665 • scalar(write) no longer returns multiple items [perl #73690].
2666
2667 • String to floating point conversions no longer misparse certain
2668 strings under "use locale" [perl #109318].
2669
2670 • @INC filters that die no longer leak memory [perl #92252].
2671
2672 • The implementations of overloaded operations are now called in the
2673 correct context. This allows, among other things, being able to
2674 properly override "<>" [perl #47119].
2675
2676 • Specifying only the "fallback" key when calling "use overload" now
2677 behaves properly [perl #113010].
2678
2679 • "sub foo { my $a = 0; while ($a) { ... } }" and "sub foo { while
2680 (0) { ... } }" now return the same thing [perl #73618].
2681
2682 • String negation now behaves the same under "use integer;" as it
2683 does without [perl #113012].
2684
2685 • "chr" now returns the Unicode replacement character (U+FFFD) for
2686 -1, regardless of the internal representation. -1 used to wrap if
2687 the argument was tied or a string internally.
2688
2689 • Using a "format" after its enclosing sub was freed could crash as
2690 of perl v5.12.0, if the format referenced lexical variables from
2691 the outer sub.
2692
2693 • Using a "format" after its enclosing sub was undefined could crash
2694 as of perl v5.10.0, if the format referenced lexical variables from
2695 the outer sub.
2696
2697 • Using a "format" defined inside a closure, which format references
2698 lexical variables from outside, never really worked unless the
2699 "write" call was directly inside the closure. In v5.10.0 it even
2700 started crashing. Now the copy of that closure nearest the top of
2701 the call stack is used to find those variables.
2702
2703 • Formats that close over variables in special blocks no longer crash
2704 if a stub exists with the same name as the special block before the
2705 special block is compiled.
2706
2707 • The parser no longer gets confused, treating "eval foo ()" as a
2708 syntax error if preceded by "print;" [perl #16249].
2709
2710 • The return value of "syscall" is no longer truncated on 64-bit
2711 platforms [perl #113980].
2712
2713 • Constant folding no longer causes "print 1 ? FOO : BAR" to print to
2714 the FOO handle [perl #78064].
2715
2716 • "do subname" now calls the named subroutine and uses the file name
2717 it returns, instead of opening a file named "subname".
2718
2719 • Subroutines looked up by rv2cv check hooks (registered by XS
2720 modules) are now taken into consideration when determining whether
2721 "foo bar" should be the sub call foo(bar) or the method call
2722 ""bar"->foo".
2723
2724 • "CORE::foo::bar" is no longer treated specially, allowing global
2725 overrides to be called directly via CORE::GLOBAL::uc(...) [perl
2726 #113016].
2727
2728 • Calling an undefined sub whose typeglob has been undefined now
2729 produces the customary "Undefined subroutine called" error, instead
2730 of "Not a CODE reference".
2731
2732 • Two bugs involving @ISA have been fixed. "*ISA =
2733 *glob_without_array" and "undef *ISA; @{*ISA}" would prevent future
2734 modifications to @ISA from updating the internal caches used to
2735 look up methods. The *glob_without_array case was a regression
2736 from Perl v5.12.
2737
2738 • Regular expression optimisations sometimes caused "$" with "/m" to
2739 produce failed or incorrect matches [perl #114068].
2740
2741 • "__SUB__" now works in a "sort" block when the enclosing subroutine
2742 is predeclared with "sub foo;" syntax [perl #113710].
2743
2744 • Unicode properties only apply to Unicode code points, which leads
2745 to some subtleties when regular expressions are matched against
2746 above-Unicode code points. There is a warning generated to draw
2747 your attention to this. However, this warning was being generated
2748 inappropriately in some cases, such as when a program was being
2749 parsed. Non-Unicode matches such as "\w" and "[:word:]" should not
2750 generate the warning, as their definitions don't limit them to
2751 apply to only Unicode code points. Now the message is only
2752 generated when matching against "\p{}" and "\P{}". There remains a
2753 bug, [perl #114148], for the very few properties in Unicode that
2754 match just a single code point. The warning is not generated if
2755 they are matched against an above-Unicode code point.
2756
2757 • Uninitialized warnings mentioning hash elements would only mention
2758 the element name if it was not in the first bucket of the hash, due
2759 to an off-by-one error.
2760
2761 • A regular expression optimizer bug could cause multiline "^" to
2762 behave incorrectly in the presence of line breaks, such that
2763 ""/\n\n" =~ m#\A(?:^/$)#im" would not match [perl #115242].
2764
2765 • Failed "fork" in list context no longer corrupts the stack. "@a =
2766 (1, 2, fork, 3)" used to gobble up the 2 and assign "(1, undef, 3)"
2767 if the "fork" call failed.
2768
2769 • Numerous memory leaks have been fixed, mostly involving tied
2770 variables that die, regular expression character classes and code
2771 blocks, and syntax errors.
2772
2773 • Assigning a regular expression ("${qr//}") to a variable that
2774 happens to hold a floating point number no longer causes assertion
2775 failures on debugging builds.
2776
2777 • Assigning a regular expression to a scalar containing a number no
2778 longer causes subsequent numification to produce random numbers.
2779
2780 • Assigning a regular expression to a magic variable no longer wipes
2781 away the magic. This was a regression from v5.10.
2782
2783 • Assigning a regular expression to a blessed scalar no longer
2784 results in crashes. This was also a regression from v5.10.
2785
2786 • Regular expression can now be assigned to tied hash and array
2787 elements with flattening into strings.
2788
2789 • Numifying a regular expression no longer results in an
2790 uninitialized warning.
2791
2792 • Negative array indices no longer cause EXISTS methods of tied
2793 variables to be ignored. This was a regression from v5.12.
2794
2795 • Negative array indices no longer result in crashes on arrays tied
2796 to non-objects.
2797
2798 • "$byte_overload .= $utf8" no longer results in doubly-encoded UTF-8
2799 if the left-hand scalar happened to have produced a UTF-8 string
2800 the last time overloading was invoked.
2801
2802 • "goto &sub" now uses the current value of @_, instead of using the
2803 array the subroutine was originally called with. This means "local
2804 @_ = (...); goto &sub" now works [perl #43077].
2805
2806 • If a debugger is invoked recursively, it no longer stomps on its
2807 own lexical variables. Formerly under recursion all calls would
2808 share the same set of lexical variables [perl #115742].
2809
2810 • *_{ARRAY} returned from a subroutine no longer spontaneously
2811 becomes empty.
2812
2813 • When using "say" to print to a tied filehandle, the value of "$\"
2814 is correctly localized, even if it was previously undef. [perl
2815 #119927]
2816
2818 • UTF8-flagged strings in %ENV on HP-UX 11.00 are buggy
2819
2820 The interaction of UTF8-flagged strings and %ENV on HP-UX 11.00 is
2821 currently dodgy in some not-yet-fully-diagnosed way. Expect test
2822 failures in t/op/magic.t, followed by unknown behavior when storing
2823 wide characters in the environment.
2824
2826 Hojung Yoon (AMORETTE), 24, of Seoul, South Korea, went to his long
2827 rest on May 8, 2013 with llama figurine and autographed TIMTOADY card.
2828 He was a brilliant young Perl 5 & 6 hacker and a devoted member of
2829 Seoul.pm. He programmed Perl, talked Perl, ate Perl, and loved Perl.
2830 We believe that he is still programming in Perl with his broken IBM
2831 laptop somewhere. He will be missed.
2832
2834 Perl v5.18.0 represents approximately 12 months of development since
2835 Perl v5.16.0 and contains approximately 400,000 lines of changes across
2836 2,100 files from 113 authors.
2837
2838 Perl continues to flourish into its third decade thanks to a vibrant
2839 community of users and developers. The following people are known to
2840 have contributed the improvements that became Perl v5.18.0:
2841
2842 Aaron Crane, Aaron Trevena, Abhijit Menon-Sen, Adrian M. Enache, Alan
2843 Haggai Alavi, Alexandr Ciornii, Andrew Tam, Andy Dougherty, Anton
2844 Nikishaev, Aristotle Pagaltzis, Augustina Blair, Bob Ernst, Brad
2845 Gilbert, Breno G. de Oliveira, Brian Carlson, Brian Fraser, Charlie
2846 Gonzalez, Chip Salzenberg, Chris 'BinGOs' Williams, Christian Hansen,
2847 Colin Kuskie, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan,
2848 Daniel Perrett, Darin McBride, Dave Rolsky, David Golden, David
2849 Leadbeater, David Mitchell, David Nicol, Dominic Hargreaves, E.
2850 Choroba, Eric Brine, Evan Miller, Father Chrysostomos, Florian Ragwitz,
2851 François Perrad, George Greer, Goro Fuji, H.Merijn Brand, Herbert
2852 Breunung, Hugo van der Sanden, Igor Zaytsev, James E Keenan, Jan
2853 Dubois, Jasmine Ahuja, Jerry D. Hedden, Jess Robinson, Jesse Luehrs,
2854 Joaquin Ferrero, Joel Berger, John Goodyear, John Peacock, Karen
2855 Etheridge, Karl Williamson, Karthik Rajagopalan, Kent Fredric, Leon
2856 Timmermans, Lucas Holt, Lukas Mai, Marcus Holland-Moritz, Markus
2857 Jansen, Martin Hasch, Matthew Horsfall, Max Maischein, Michael G
2858 Schwern, Michael Schroeder, Moritz Lenz, Nicholas Clark, Niko Tyni,
2859 Oleg Nesterov, Patrik Hägglund, Paul Green, Paul Johnson, Paul
2860 Marquess, Peter Martini, Rafael Garcia-Suarez, Reini Urban, Renee
2861 Baecker, Rhesa Rozendaal, Ricardo Signes, Robin Barker, Ronald J.
2862 Kimball, Ruslan Zakirov, Salvador Fandiño, Sawyer X, Scott Lanning,
2863 Sergey Alekseev, Shawn M Moore, Shirakata Kentaro, Shlomi Fish,
2864 Sisyphus, Smylers, Steffen Müller, Steve Hay, Steve Peters, Steven
2865 Schubiger, Sullivan Beck, Sven Strickroth, Sébastien Aperghis-Tramoni,
2866 Thomas Sibley, Tobias Leich, Tom Wyant, Tony Cook, Vadim Konovalov,
2867 Vincent Pit, Volker Schatz, Walt Mankowski, Yves Orton, Zefram.
2868
2869 The list above is almost certainly incomplete as it is automatically
2870 generated from version control history. In particular, it does not
2871 include the names of the (very much appreciated) contributors who
2872 reported issues to the Perl bug tracker.
2873
2874 Many of the changes included in this version originated in the CPAN
2875 modules included in Perl's core. We're grateful to the entire CPAN
2876 community for helping Perl to flourish.
2877
2878 For a more complete list of all of Perl's historical contributors,
2879 please see the AUTHORS file in the Perl source distribution.
2880
2882 If you find what you think is a bug, you might check the articles
2883 recently posted to the comp.lang.perl.misc newsgroup and the perl bug
2884 database at http://rt.perl.org/perlbug/ . There may also be
2885 information at http://www.perl.org/ , the Perl Home Page.
2886
2887 If you believe you have an unreported bug, please run the perlbug
2888 program included with your release. Be sure to trim your bug down to a
2889 tiny but sufficient test case. Your bug report, along with the output
2890 of "perl -V", will be sent off to perlbug@perl.org to be analysed by
2891 the Perl porting team.
2892
2893 If the bug you are reporting has security implications, which make it
2894 inappropriate to send to a publicly archived mailing list, then please
2895 send it to perl5-security-report@perl.org. This points to a closed
2896 subscription unarchived mailing list, which includes all the core
2897 committers, who will be able to help assess the impact of issues,
2898 figure out a resolution, and help co-ordinate the release of patches to
2899 mitigate or fix the problem across all platforms on which Perl is
2900 supported. Please only use this address for security issues in the
2901 Perl core, not for modules independently distributed on CPAN.
2902
2904 The Changes file for an explanation of how to view exhaustive details
2905 on what changed.
2906
2907 The INSTALL file for how to build Perl.
2908
2909 The README file for general stuff.
2910
2911 The Artistic and Copying files for copyright information.
2912
2913
2914
2915perl v5.38.2 2023-11-30 PERL5180DELTA(1)