This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
import perl5178delta content to perl5180delta
[perl5.git] / Porting / perl5180delta.pod
CommitLineData
e5ba1bf1
FC
1=encoding utf8
2
3=head1 NAME
4
0bba4573 5perl5180delta - what is new for perl v5.18.0
e5ba1bf1
FC
6
7=head1 DESCRIPTION
8
0bba4573 9This document describes differences between the 5.16.0 release and the 5.18.0
e5ba1bf1
FC
10release.
11
0bba4573
RS
12If you are upgrading from an earlier release such as 5.14.0, first read
13L<perl5140delta>, which describes differences between 5.12.0 and 5.14.0.
e5ba1bf1
FC
14
15=head1 Notice
16
17XXX Any important notices here
18
19=head1 Core Enhancements
20
816361ee
RS
21=head2 Regular Expression Set Operations
22
23This is an experimental feature to allow matching against the union,
24intersection, etc., of sets of code points, similar to
25L<Unicode::Regex::Set>. It can also be used to extend C</x> processing
26to [bracketed] character classes, and as a replacement of user-defined
27properties, allowing more complex expressions than they do. See
28L<perlre/(?[ ])>.
29
7e7c78a1
RS
30=head2 Character name aliases may now include non-Latin1-range characters
31
32It is possible to define your own names for characters for use in
33C<\N{...}>, C<charnames::vianame()>, etc. These names can now be
34comprised of characters from the whole Unicode range. This allows for
35names to be in your native language, and not just English. Certain
36restrictions apply to the characters that may be used (you can't define
37a name that has punctuation in it, for example). See L<charnames/CUSTOM
38ALIASES>.
39
40=head2 New hash function Murmurhash-32 (v3)
41
42We have switched Perl's hash function to use Murmurhash-32, and added build
43support for several other hash functions. This new function is expected to
44perform equivalently to the old one for shorter strings and is faster,
45potentially twice as fast, for hashing longer strings.
46
f7b06e7f 47=head2 Upgrade to Unicode 6.2
00785cb7 48
f7b06e7f
RS
49Perl now supports the final version of Unicode 6.2. Earlier releases in
50the 5.17 series supported Unicode 6.2 beta versions. There were no
51substantive changes in the final Unicode 6.2 version from the most
52recent beta, included in Perl 5.17.4. A list of changes from Unicode
536.1 is at L<http://www.unicode.org/versions/Unicode6.2.0>.
00785cb7
RS
54
55=head2 New DTrace probes
56
57The following new DTrace probes have been added:
58
59=over 4
60
61=item C<op-entry>
62
63=item C<loading-file>
64
65=item C<loaded-file>
66
67=back
68
69=head2 C<${^LAST_FH}>
70
71This new variable provides access to the filehandle that was last read.
72This is the handle used by C<$.> and by C<tell> and C<eof> without
73arguments.
74
75=head2 Looser here-doc parsing
76
77Here-doc terminators no longer require a terminating newline character when
78they occur at the end of a file. This was already the case at the end of a
79string eval [perl #65838].
80
81=head2 New mechanism for experimental features
82
83Newly-added experimental features will now require this incantation:
84
85 no warnings "experimental:feature_name";
86 use feature "feature_name"; # would warn without the prev line
87
88There is a new warnings category, called "experimental", containing
89warnings that the L<feature> pragma emits when enabling experimental
90features.
91
92Newly-added experimental features will also be given special warning IDs,
93which consist of "experimental:" followed by the name of the feature. (The
94plan is to extend this mechanism eventually to all warnings, to allow them
95to be enabled or disabled individually, and not just by category.)
96
97By saying
98
99 no warnings "experimental:feature_name";
100
101you are taking responsibility for any breakage that future changes to, or
102removal of, the feature may cause.
103
104=head2 Lexical subroutines
105
106This new feature is still considered experimental. To enable it, use the
107mechanism described above:
108
109 use 5.018;
110 no warnings "experimental:lexical_subs";
111 use feature "lexical_subs";
112
113You can now declare subroutines with C<state sub foo>, C<my sub foo>, and
114C<our sub foo>. (C<state sub> requires that the "state" feature be
115enabled, unless you write it as C<CORE::state sub foo>.)
116
117C<state sub> creates a subroutine visible within the lexical scope in which
118it is declared. The subroutine is shared between calls to the outer sub.
119
120C<my sub> declares a lexical subroutine that is created each time the
121enclosing block is entered. C<state sub> is generally slightly faster than
122C<my sub>.
123
124C<our sub> declares a lexical alias to the package subroutine of the same
125name.
126
127See L<perlsub/Lexical Subroutines>.
128
94b31d3f
RS
129=head2 Computed Labels
130
131The loop controls C<next>, C<last> and C<redo>, and the special C<dump>
132operator, now allow arbitrary expressions to be used to compute labels at run
133time. Previously, any argument that was not a constant was treated as the
134empty string.
135
0fef449b
RS
136=head2 More CORE:: subs
137
138Several more built-in functions have been added as subroutines to the
139CORE:: namespace, namely, those non-overridable keywords that can be
140implemented without custom parsers: C<defined>, C<delete>, C<exists>,
141C<glob>, C<pos>, C<protoytpe>, C<scalar>, C<split>, C<study>, and C<undef>.
142
143As some of these have prototypes, C<prototype('CORE::...')> has been
144changed to not make a distinction between overridable and non-overridable
145keywords. This is to make C<prototype('CORE::pos')> consistent with
146C<prototype(&CORE::pos)>.
e5ba1bf1 147
37133b20
RS
148=head2 C<kill> with negative signal names
149
150C<kill> has always allowed a negative signal number, which kills the
151process group instead of a single process. It has also allowed signal
152names. But it did not behave consistently, because negative signal names
153were treated as 0. Now negative signals names like C<-INT> are supported
154and treated the same way as -2 [perl #112990].
155
156=head2 C<pack> is now constant folded.
157
158C<pack> with constant arguments is now constant folded in most cases
159[perl #113470].
e5ba1bf1
FC
160
161=head1 Security
162
d268df4d
RS
163=head2 C<Storable> security warning in documentation
164
165The documentation for C<Storable> now includes a section which warns readers
166of the danger of accepting Storable documents from untrusted sources. The
167short version is that deserializing certain types of data can lead to loading
168modules and other code execution. This is documented behavior and wanted
169behavior, but this opens an attack vector for malicious entities.
170
171=head2 C<Locale::Maketext> allowed code injection via a malicious template
172
173If users could provide a translation string to Locale::Maketext, this could be
174used to invoke arbitrary Perl subroutines available in the current process.
175
176This has been fixed, but it is still possible to invoke any method provided by
177C<Locale::Maketext> itself or a subclass that you are using. One of these
178methods in turn will invoke the Perl core's C<sprintf> subroutine.
179
180In summary, allowing users to provide translation strings without auditing
181them is a bad idea.
182
183This vulnerability is documented in CVE-2012-6329.
184
7e7c78a1
RS
185=head2 An unknown character name in C<\N{...}> is now a syntax error
186
187Previously, it warned, and the Unicode REPLACEMENT CHARACTER was
188substituted. Unicode now recommends that this situation be a syntax
189error. Also, the previous behavior led to some confusing warnings and
190behaviors, and since the REPLACEMENT CHARACTER has no use other than as
191a stand-in for some unknown character, any code that has this problem is
192buggy.
193
194=head2 Formerly deprecated characters in C<\N{}> character name aliases are now errors.
195
196Since v5.12.0, it has been deprecated to use certain characters in
197user-defined C<\N{...}> character names. These now cause a syntax
198error. For example, it is now an error to begin a name with a digit,
199such as in
200
201 my $undraftable = "\N{4F}"; # Syntax error!
202
203or to have commas anywhere in the name. See L<charnames/CUSTOM ALIASES>
204
205=head2 Per process hash randomization
206
207The seed used by Perl's hash function is now random. This means that the
208order which keys/values will be returned from functions like C<keys()>,
209C<values()>, and C<each()> will differ from run to run.
210
211This change was introduced to make Perl's hashes more robust to algorithmic
212complexity attacks, and also because we discovered that it exposes hash
213ordering dependency bugs and makes them easier to track down.
214
215Toolchain maintainers might want to invest in additional infrastructure to
216test for things like this. Running tests several times in a row and then
217comparing results will make it easier to spot hash order dependencies in
218code. Authors are strongly encouraged not to expose the key order of
219Perl's hashes to insecure audiences.
220
221=head2 PERL_HASH_SEED enviornment variable now takes a hex value
222
223PERL_HASH_SEED no longer accepts an integer as a parameter, instead the
224value is expected to be a binary string encoded in hex. This is to make
225the infrastructure support hash seeds of arbitrary lengths which might
226exceed that of an integer. (SipHash uses a 16 byte seed).
227
228=head2 Hash::Util::hash_seed() now returns a string
229
230Hash::Util::hash_seed() now returns a string instead of an integer. This
231is to make the infrastructure support hash seeds of arbitrary lengths
232which might exceed that of an integer. (SipHash uses a 16 byte seed).
233
234=head2 Output of PERL_HASH_SEED_DEBUG has been changed
235
236The environment variable PERL_HASH_SEED_DEBUG now shows both the hash
237function perl was built with AND the seed, in hex in use for that process.
238Code parsing this output, should it exist, must change to accomodate the
239new format. Example of the new format:
240
241 $ PERL_HASH_SEED_DEBUG=1 ./perl -e1
242 HASH_FUNCTION = MURMUR3 HASH_SEED = 0x1476bb9f
243
f7b06e7f
RS
244=head2 Avoid calling memset with a negative count
245
246Poorly written perl code that allows an attacker to specify the count to perl's
247C<x> string repeat operator can already cause a memory exhaustion
248denial-of-service attack. A flaw in versions of perl before 5.15.5 can escalate
249that into a heap buffer overrun; coupled with versions of glibc before 2.16, it
250possibly allows the execution of arbitrary code.
e5ba1bf1 251
f7b06e7f 252The flaw addressed to this commit has been assigned identifier CVE-2012-5195.
e5ba1bf1
FC
253
254=head1 Incompatible Changes
255
d268df4d
RS
256=head2 Lexical $_ is now deprecated
257
258Since it was introduced in Perl 5.10, it has caused much confusion with no
259obvious solution:
260
261=over
262
263=item *
264
265Various modules (e.g., List::Util) expect callback routines to use the
266global $_. C<use List::Util 'first'; my $_; first { $_ == 1 } @list> does
267not work as one would expect.
268
269=item *
270
271A C<my $_> declaration earlier in the same file can cause confusing closure
272warnings.
273
274=item *
275
276The "_" subroutine prototype character allows called subroutines to access
277your lexical $_, so it is not really private after all.
278
279=item *
280
281Nevertheless, subroutines with a "(@)" prototype and methods cannot access
282the caller's lexical $_, unless they are written in XS.
283
284=item *
285
286But even XS routines cannot access a lexical $_ declared, not in the
287calling subroutine, but in an outer scope, iff that subroutine happened not
288to mention $_ or use any operators that default to $_.
289
290=back
291
292=head2 readline() with C<$/ = \N> now reads N characters, not N bytes
293
294Previously, when reading from a stream with I/O layers such as
295C<encoding>, the readline() function, otherwise known as the C<< <> >>
296operator, would read I<N> bytes from the top-most layer. [perl #79960]
297
298Now, I<N> characters are read instead.
299
300There is no change in behaviour when reading from streams with no
301extra layers, since bytes map exactly to characters.
302
303=head2 Lexical subroutine warnings have moved
304
305The warning about the use of an experimental feature emitted when lexical
306subroutines (added in 5.17.4) are used now happens when the subroutine
307itself is declared, not when the "lexical_subs" feature is activated via
308C<use feature>.
309
310This stops C<use feature ':all'> from warning, but causes
311C<my sub foo; my sub bar> to warn twice.
312
313=head2 Overridden C<glob> is now passed one argument
314
315C<glob> overrides used to be passed a magical undocumented second argument
316that identified the caller. Nothing on CPAN was using this, and it got in
317the way of a bug fix, so it was removed. If you really need to identify
318the caller, see L<Devel::Callsite> on CPAN.
319
f7b06e7f
RS
320=head2 New Restrictions in Multi-Character Case-Insensitive Matching in Regular Expression Bracketed Character Classes
321
322Unicode has now withdrawn their previous recommendation for regular
323expressions to automatically handle cases where a single character can
324match multiple characters case-insensitively; for example, the letter
325LATIN SMALL LETTER SHARP S and the sequence C<ss>. This is because
326it turns out to be impracticable to do this correctly in all
327circumstances. Because Perl has tried to do this as best it can, it
328will continue to do so. (We are considering an option to turn it off.)
329However, a new restriction is being added on such matches when they
330occur in [bracketed] character classes. People were specifying
331things such as C</[\0-\xff]/i>, and being surprised that it matches the
332two character sequence C<ss> (since LATIN SMALL LETTER SHARP S occurs in
333this range). This behavior is also inconsistent with the using a
334property instead of a range: C<\p{Block=Latin1}> also includes LATIN
335SMALL LETTER SHARP S, but C</[\p{Block=Latin1}]/i> does not match C<ss>.
336The new rule is that for there to be a multi-character case-insensitive
337match within a bracketed character class, the character must be
338explicitly listed, and not as an end point of a range. This more
339closely obeys the Principle of Least Astonishment. See
340L<perlrecharclass/Bracketed Character Classes>. Note that a bug [perl
341#89774], now fixed as part of this change, prevented the previous
342behavior from working fully.
343
00785cb7
RS
344=head2 Here-doc parsing
345
346The body of a here-document inside a quote-like operator now always begins
347on the line after the "<<foo" marker. Previously, it was documented to
348begin on the line following the containing quote-like operator, but that
349was only sometimes the case [perl #114040].
350
351=head2 Stricter parsing of substitution replacement
352
353It is no longer possible to abuse the way the parser parses C<s///e> like
354this:
355
356 %_=(_,"Just another ");
357 $_="Perl hacker,\n";
358 s//_}->{_/e;print
359
360=head2 Interaction of lexical and default warnings
361
362Turning on any lexical warnings used first to disable all default warnings
363if lexical warnings were not already enabled:
364
365 $*; # deprecation warning
366 use warnings "void";
367 $#; # void warning; no deprecation warning
368
369Now, the debugging, deprecated, glob, inplace and malloc warnings
370categories are left on when turning on lexical warnings (unless they are
371turned off by C<no warnings>, of course).
372
373This may cause deprecation warnings to occur in code that used to be free
374of warnings.
375
376Those are the only categories consisting only of default warnings. Default
377warnings in other categories are still disabled by C<use warnings
378"category">, as we do not yet have the infrastructure for controlling
379individual warnings.
380
381=head2 C<state sub> and C<our sub>
382
383Due to an accident of history, C<state sub> and C<our sub> were equivalent
384to a plain C<sub>, so one could even create an anonymous sub with
385C<our sub { ... }>. These are now disallowed outside of the "lexical_subs"
386feature. Under the "lexical_subs" feature they have new meanings described
387in L<perlsub/Lexical Subroutines>.
388
389=head2 C<gv_fetchmeth_*> and SUPER
390
391The various C<gv_fetchmeth_*> XS functions used to treat a package whose
392named ended with ::SUPER specially. A method lookup on the Foo::SUPER
393package would be treated as a SUPER method lookup on the Foo package. This
394is no longer the case. To do a SUPER lookup, pass the Foo stash and the
395GV_SUPER flag.
396
94b31d3f
RS
397=head2 Defined values stored in environment are forced to byte strings
398
399A value stored in an environment variable has always been stringified. In this
400release, it is converted to be only a byte string. First, it is forced to be a
401only a string. Then if the string is utf8 and the equivalent of
402C<utf8::downgrade()> works, that result is used; otherwise, the equivalent of
403C<utf8::encode()> is used, and a warning is issued about wide characters
404(L</Diagnostics>).
405
406=head2 C<given> now aliases the global C<$_>
407
408Instead of assigning to an implicit lexical C<$_>, C<given> now makes the
409global C<$_> an alias for its argument, just like C<foreach>. However, it
410still uses lexical C<$_> if there is lexical C<$_> in scope (again, just like
411C<foreach>) [perl #114020].
412
0bba4573
RS
413=head2 qw(...) can no longer be used as parentheses
414
415C<qw> lists used to fool the parser into thinking they were always
416surrounded by parentheses. This permitted some surprising constructions
417such as C<foreach $x qw(a b c) {...}>, which should really be written
418C<foreach $x (qw(a b c)) {...}>. These would sometimes get the lexer into
419the wrong state, so they didn't fully work, and the similar C<foreach qw(a
420b c) {...}> that one might expect to be permitted never worked at all.
421
422This side effect of C<qw> has now been abolished. It has been deprecated
423since Perl 5.13.11. It is now necessary to use real parentheses
424everywhere that the grammar calls for them.
e5ba1bf1 425
0bba4573 426=head2 C<\s> in regular expressions now matches a Vertical Tab
e5ba1bf1 427
0bba4573 428[ XXX ]
e5ba1bf1 429
0fef449b
RS
430=head2 C</(?{})/> and C</(??{})/> have been heavily reworked
431
432The implementation of this feature has been almost completely rewritten.
433Although its main intent is to fix bugs, some behaviors, especially
434related to the scope of lexical variables, will have changed. This is
435described more fully in the L</Selected Bug Fixes> section.
436
437=head2 C<\N{BELL}> now refers to U+1F514 instead of U+0007
438
439Unicode 6.0 reused the name "BELL" for a different code point than it
440traditionally had meant. Since Perl v5.14, use of this name still
441referred to U+0007, but would raise a deprecation warning. Now, "BELL"
442refers to U+1F514, and the name for U+0007 is "ALERT". All the
443functions in L<charnames> have been correspondingly updated.
444
445=head2 Alphanumeric operators must now be separated from the closing
446delimiter of regular expressions
447
448You may no longer write something like:
449
450 m/a/and 1
451
452Instead you must write
453
454 m/a/ and 1
455
456with whitespace separating the operator from the closing delimiter of
457the regular expression. Not having whitespace has resulted in a
458deprecation warning since Perl v5.14.0.
459
460=head2 C<require> dies for unreadable files
461
462When C<require> encounters an unreadable file, it now dies. It used to
463ignore the file and continue searching the directories in @INC
464[perl #113422].
465
466=head2 Upgrade to the Unicode 6.2 beta
467
468Unicode 6.2 is proposing some changes that may very well break some CPAN
469modules. The timing of this nicely coincides with Perl's being early in the
470release cycle. This commit takes the current beta 6.2, adds the proposed
471changes that aren't yet in it, and subtracts the changes that would affect \X
472processing, as those turn out to have errors, and may have to be rethought.
473Unicode has been notified of these problems.
474
475This will allow us to gather data as to whether or not the proposed changes
476cause us problems. These will be presented to Unicode to aid in their final
477decision as to whether or not to go forward with the changes.
478
479These changes will be replaced by the final version of Unicode 6.2 before
4805.18.0 is released.
481
e5ba1bf1
FC
482=head1 Deprecations
483
816361ee
RS
484=head2 Deprecated modules
485
486The Pod::LaTeX module is now deprecated, and due to be moved out of the Perl
487core in 5.20. Until then, using the core-installed version will produce a
488warning. You can suppress the warning by installing the module from CPAN.
489
490=head2 User-defined charnames with surprising whitespace
491
492A user-defined character name with trailing or multiple spaces in a row is
493likely a typo. This now generates a warning when defined, on the assumption
494that uses of it will be unlikely to include the excess whitespace.
495
496=head2 Various XS-callable functions are now deprecated
497
498All the functions used to classify characters will be removed from a
499future version of Perl, and should not be used. With participating C
500compilers (e.g., gcc), compiling any file that uses any of these will
501generate a warning. These were not intended for public use; there are
502equivalent, faster, macros for most of them.
503See L<perlapi/Character classes>. The complete list (including some
504that were deprecated in 5.17.7) is:
505C<is_uni_alnum>, C<is_uni_alnumc>, C<is_uni_alnumc_lc>,
506C<is_uni_alnum_lc>, C<is_uni_alpha>, C<is_uni_alpha_lc>,
507C<is_uni_ascii>, C<is_uni_ascii_lc>, C<is_uni_blank>,
508C<is_uni_blank_lc>, C<is_uni_cntrl>, C<is_uni_cntrl_lc>,
509C<is_uni_digit>, C<is_uni_digit_lc>, C<is_uni_graph>,
510C<is_uni_graph_lc>, C<is_uni_idfirst>, C<is_uni_idfirst_lc>,
511C<is_uni_lower>, C<is_uni_lower_lc>, C<is_uni_print>,
512C<is_uni_print_lc>, C<is_uni_punct>, C<is_uni_punct_lc>,
513C<is_uni_space>, C<is_uni_space_lc>, C<is_uni_upper>,
514C<is_uni_upper_lc>, C<is_uni_xdigit>, C<is_uni_xdigit_lc>,
515C<is_utf8_alnum>, C<is_utf8_alnumc>, C<is_utf8_alpha>,
516C<is_utf8_ascii>, C<is_utf8_blank>, C<is_utf8_char>,
517C<is_utf8_cntrl>, C<is_utf8_digit>, C<is_utf8_graph>,
518C<is_utf8_idcont>, C<is_utf8_idfirst>, C<is_utf8_lower>,
519C<is_utf8_mark>, C<is_utf8_perl_space>, C<is_utf8_perl_word>,
520C<is_utf8_posix_digit>, C<is_utf8_print>, C<is_utf8_punct>,
521C<is_utf8_space>, C<is_utf8_upper>, C<is_utf8_xdigit>,
522C<is_utf8_xidcont>, C<is_utf8_xidfirst>.
523
524In addition these three functions that have never worked properly are
525deprecated:
526C<to_uni_lower_lc>, C<to_uni_title_lc>, and C<to_uni_upper_lc>.
527
528=head2 Certain rare uses of backslashes within regexes are now deprectated
529
530There are three pairs of characters that Perl recognizes as
531metacharacters in regular expression patterns: C<{}>, C<[]>, and C<()>.
532These can be used as well to delimit patterns, as in:
533
534 m{foo}
535 s(foo)(bar)
536
537Since they are metacharacters, they have special meaning to regular
538expression patterns, and it turns out that you can't turn off that
539special meaning by the normal means of preceding them with a backslash,
540if you use them, paired, within a pattern delimitted by them. For
541example, in
542
543 m{foo\{1,3\}}
544
545the backslashes do not change the behavior, and this matches
546S<C<"f o">> followed by one to three more occurrences of C<"o">.
547
548Usages like this, where they are interpreted as metacharacters, are
549exceedingly rare; we think there are none, for example, in all of CPAN.
550Hence, this deprecation should affect very little code. It does give
551notice, however, that any such code needs to change, which will in turn
552allow us to change the behavior in future Perl versions so that the
553backslashes do have an effect, and without fear that we are silently
554breaking any existing code.
555
d268df4d
RS
556=head2 Various XS-callable functions are now deprecated
557
558The following functions will be removed from a future version of Perl,
559and should not be used. With participating C compilers (e.g., gcc),
560compiling any file that uses any of these will generate a warning.
561These were not intended for public use; there are equivalent, faster,
562macros for most of them. See L<perlapi/Character classes>:
563C<is_uni_ascii>, C<is_uni_ascii_lc>, C<is_uni_blank>, C<is_uni_blank_lc>,
564C<is_uni_cntrl>, C<is_uni_cntrl_lc>, C<is_uni_idfirst_lc>, C<is_uni_space>,
565C<is_uni_space_lc>, C<is_uni_xdigit>, C<is_uni_xdigit_lc>, C<is_utf8_ascii>,
566C<is_utf8_blank>, C<is_utf8_cntrl>, C<is_utf8_idcont>, C<is_utf8_idfirst>,
567C<is_utf8_perl_space>, C<is_utf8_perl_word>, C<is_utf8_posix_digit>,
568C<is_utf8_space>, C<is_utf8_xdigit>. C<is_utf8_xidcont>, C<is_utf8_xidfirst>,
569C<to_uni_lower_lc>, C<to_uni_title_lc>, and C<to_uni_upper_lc>.
570
e5ba1bf1
FC
571=head1 Performance Enhancements
572
7e7c78a1
RS
573=over 4
574
575=item *
e5ba1bf1 576
7e7c78a1
RS
577Lists of lexical variable declarations (C<my($x, $y)>) are now optimised
578down to a single op, and are hence faster than before.
e5ba1bf1 579
7e7c78a1
RS
580=item *
581
582A new C preprocessor define NO_TAINT_SUPPORT was added that, if set, disables
583Perl's taint support altogether. Using the -T or -t command line flags will
584cause a fatal error. Beware that both core tests as well as many a CPAN
585distribution's tests will fail with this change. On the upside, it provides
586a small performance benefit due to reduced branching.
587
588B<Do not enable this unless you know exactly what you are getting yourself
589into.>
e5ba1bf1
FC
590
591=item *
592
00785cb7
RS
593Speed up in regular expression matching against Unicode properties. The
594largest gain is for C<\X>, the Unicode "extended grapheme cluster". The
595gain for it is about 35% - 40%. Bracketed character classes, e.g.,
596C<[0-9\x{100}]> containing code points above 255 are also now faster.
597
598=item *
599
600On platforms supporting it, several former macros are now implemented as static
601inline functions. This should speed things up slightly on non-GCC platforms.
602
603=item *
604
605Apply the optimisation of hashes in boolean context, such as in C<if> or C<and>,
606to constructs in non-void context.
607
608=item *
609
610Extend the optimisation of hashes in boolean context to C<scalar(%hash)>,
611C<%hash ? ... : ...>, and C<sub { %hash || ... }>.
612
613=item *
614
615When making a copy of the string being matched against (so that $1, $& et al
616continue to show the correct value even if the original string is subsequently
617modified), only copy that substring of the original string needed for the
618capture variables, rather than copying the whole string.
619
620This is a big win for code like
621
622 $&;
623 $_ = 'x' x 1_000_000;
624 1 while /(.)/;
625
626Also, when pessimizing if the code contains C<$`>, C<$&> or C<$'>, record the
627presence of each variable separately, so that the determination of the substring
628range is based on each variable separately. So performance-wise,
629
630 $&; /x/
631
632is now roughly equivalent to
633
634 /(x)/
635
636whereas previously it was like
637
638 /^(.*)(x)(.*)$/
639
640and
641
642 $&; $'; /x/
643
644is now roughly equivalent to
645
646 /(x)(.*)$/
647
648etc.
649
00785cb7
RS
650=item *
651
0bba4573
RS
652Filetest ops manage the stack in a fractionally more efficient manner.
653
654=item *
655
656Globs used in a numeric context are now numerified directly in most cases,
657rather than being numerified via stringification.
e5ba1bf1 658
0fef449b
RS
659=item *
660
661The C<x> repetition operator is now folded to a single constant at compile
662time if called in scalar context with constant operands and no parentheses
663around the left operand.
664
e5ba1bf1
FC
665=back
666
667=head1 Modules and Pragmata
668
669XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
670go here. If Module::CoreList is updated, generate an initial draft of the
671following sections using F<Porting/corelist-perldelta.pl>, which prints stub
672entries to STDOUT. Results can be pasted in place of the '=head2' entries
673below. A paragraph summary for important changes should then be added by hand.
674In an ideal world, dual-life modules would have a F<Changes> file that could be
675cribbed.
676
677[ Within each section, list entries as a =item entry ]
678
679=head2 New Modules and Pragmata
680
681=over 4
682
683=item *
684
685XXX
686
687=back
688
689=head2 Updated Modules and Pragmata
690
691=over 4
692
693=item *
694
695L<XXX> has been upgraded from version A.xx to B.yy.
696
697=back
698
699=head2 Removed Modules and Pragmata
700
0bba4573 701=over
e5ba1bf1
FC
702
703=item *
704
0bba4573
RS
705L<Version::Requirements> has been removed from the core distribution. It is
706available under a different name: L<CPAN::Meta::Requirements>.
e5ba1bf1
FC
707
708=back
709
710=head1 Documentation
711
712XXX Changes to files in F<pod/> go here. Consider grouping entries by
713file and be sure to link to the appropriate page, e.g. L<perlfunc>.
714
715=head2 New Documentation
716
717XXX Changes which create B<new> files in F<pod/> go here.
718
719=head3 L<XXX>
720
721XXX Description of the purpose of the new file here
722
723=head2 Changes to Existing Documentation
724
0bba4573 725=head3 L<perldata>
e5ba1bf1 726
0bba4573
RS
727=over 4
728
729=item *
730
731Now explicitly documents the behaviour of hash initializer lists that
732contain duplicate keys.
733
734=back
735
736=head3 L<perldiag>
737
738=over 4
739
740=item *
741
742The explanation of symbolic references being prevented by "strict refs"
743now doesn't assume that the reader knows what symbolic references are.
744
745=back
746
747=head3 L<perlfunc>
e5ba1bf1
FC
748
749=over 4
750
751=item *
752
0bba4573 753The return value of C<pipe> is now documented.
e5ba1bf1 754
37133b20
RS
755=item *
756
757Clarified documentation of C<our>.
758
e5ba1bf1
FC
759=back
760
0fef449b
RS
761=head3 L<perlfaq>
762
763=over 4
764
765=item *
766
767L<perlfaq> has been synchronized with version 5.0150040 from CPAN.
768
769=back
770
771=head3 L<perlcheat>
772
773=over 4
774
775=item *
776
777L<perlcheat> has been reorganized, and a few new sections were added.
778
779=back
780
94b31d3f
RS
781=head3 L<perlop>
782
783=over 4
784
785=item *
786
787Loop control verbs (C<dump>, C<goto>, C<next>, C<last> and C<redo>) have always
788had the same precedence as assignment operators, but this was not documented
789until now.
790
791=back
792
0bba4573 793=head3 Diagnostics
e5ba1bf1
FC
794
795The following additions or changes have been made to diagnostic output,
796including warnings and fatal error messages. For the complete list of
797diagnostic messages, see L<perldiag>.
798
799XXX New or changed warnings emitted by the core's C<C> code go here. Also
800include any changes in L<perldiag> that reconcile it to the C<C> code.
801
802=head2 New Diagnostics
803
804XXX Newly added diagnostic messages go under here, separated into New Errors
805and New Warnings
806
807=head3 New Errors
808
809=over 4
810
811=item *
812
94b31d3f
RS
813L<Unterminated delimiter for here document|perldiag/"Unterminated delimiter for here document">
814
815This message now occurs when a here document label has an initial quotation
816mark but the final quotation mark is missing.
817
818This replaces a bogus and misleading error message about not finding the label
819itself [perl #114104].
820
821=item *
822
823L<panic: child pseudo-process was never scheduled|perldiag/"panic: child pseudo-process was never scheduled">
824
825This error is thrown when a child pseudo-process in the ithreads implementation
826on Windows was not scheduled within the time period allowed and therefore was
827not able to initialize properly [perl #88840].
828
829=item *
830
37133b20
RS
831L<Group name must start with a non-digit word character in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Group name must start with a non-digit word character in regex; marked by <-- HERE in m/%s/">
832
833This error has been added for C<(?&0)>, which is invalid. It used to
834produce an incomprehensible error message [perl #101666].
835
836=item *
837
838L<Can't use an undefined value as a subroutine reference|perldiag/"Can't use an undefined value as %s reference">
839
840Calling an undefined value as a subroutine now produces this error message.
841It used to, but was accidentally disabled, first in Perl 5.004 for
842non-magical variables, and then in Perl 5.14 for magical (e.g., tied)
843variables. It has now been restored. In the mean time, undef was treated
844as an empty string [perl #113576].
e5ba1bf1
FC
845
846=back
847
848=head3 New Warnings
849
850=over 4
851
852=item *
853
816361ee
RS
854L<'%s' resolved to '\o{%s}%d'|perldiag/"'%s' resolved to '\o{%s}%d'">
855
856=item *
857
858L<'Trailing white-space in a charnames alias definition is deprecated'|perldiag/"Trailing white-space in a charnames alias definition is deprecated">
859
860=item *
861
862L<'A sequence of multiple spaces in a charnames alias definition is deprecated'|perldiag/"A sequence of multiple spaces in a charnames alias definition is deprecated">
863
864=item *
865
866L<'Passing malformed UTF-8 to "%s" is deprecated'|perldiag/"Passing malformed UTF-8 to "%s" is deprecated">
867
868
869=item *
870
00785cb7
RS
871L<Experimental "%s" subs not enabled|perldiag/"Experimental "%s" subs not enabled">
872
873(F) To use lexical subs, you must first enable them:
874
875 no warnings 'experimental:lexical_subs';
876 use feature 'lexical_subs';
877 my sub foo { ... }
878
879=item *
880
881L<Subroutine "&%s" is not available|perldiag/"Subroutine "&%s" is not available">
882
883(W closure) During compilation, an inner named subroutine or eval is
884attempting to capture an outer lexical subroutine that is not currently
885available. This can happen for one of two reasons. First, the lexical
886subroutine may be declared in an outer anonymous subroutine that has not
887yet been created. (Remember that named subs are created at compile time,
888while anonymous subs are created at run-time.) For example,
889
890 sub { my sub a {...} sub f { \&a } }
891
892At the time that f is created, it can't capture the current the "a" sub,
893since the anonymous subroutine hasn't been created yet. Conversely, the
894following won't give a warning since the anonymous subroutine has by now
895been created and is live:
896
897 sub { my sub a {...} eval 'sub f { \&a }' }->();
898
899The second situation is caused by an eval accessing a variable that has
900gone out of scope, for example,
901
902 sub f {
903 my sub a {...}
904 sub { eval '\&a' }
905 }
906 f()->();
907
908Here, when the '\&a' in the eval is being compiled, f() is not currently
909being executed, so its &a is not available for capture.
910
911=item *
912
913L<"%s" subroutine &%s masks earlier declaration in same %s|perldiag/"%s" subroutine &%s masks earlier declaration in same %s>
914
915(W misc) A "my" or "state" subroutine has been redeclared in the
916current scope or statement, effectively eliminating all access to
917the previous instance. This is almost always a typographical error.
918Note that the earlier subroutine will still exist until the end of
919the scope or until all closure references to it are destroyed.
920
921=item *
922
923L<The %s feature is experimental|perldiag/"The %s feature is experimental">
924
925(S experimental) This warning is emitted if you enable an experimental
926feature via C<use feature>. Simply suppress the warning if you want
927to use the feature, but know that in doing so you are taking the risk
928of using an experimental feature which may change or be removed in a
929future Perl version:
930
931 no warnings "experimental:lexical_subs";
932 use feature "lexical_subs";
933
934=item *
935
936L<sleep(%u) too large|perldiag/"sleep(%u) too large">
937
938(W overflow) You called C<sleep> with a number that was larger than it can
939reliably handle and C<sleep> probably slept for less time than requested.
940
941=item *
942
94b31d3f
RS
943L<Wide character in setenv|perldiag/"Wide character in %s">
944
945Attempts to put wide characters into environment variables via C<%ENV> now
946provoke this warning.
947
948=item *
949
37133b20
RS
950"L<Invalid negative number (%s) in chr|perldiag/"Invalid negative number (%s) in chr">"
951
952C<chr()> now warns when passed a negative value [perl #83048].
953
954=item *
955
956"L<Integer overflow in srand|perldiag/"Integer overflow in srand">"
957
958C<srand()> now warns when passed a value that doesn't fit in a C<UV> (since the
959value will be truncated rather than overflowing) [perl #40605].
960
961=item *
962
963"L<-i used with no filenames on the command line, reading from STDIN|perldiag/"-i used with no filenames on the command line, reading from STDIN">"
964
965Running perl with the C<-i> flag now warns if no input files are provided on
966the command line [perl #113410].
e5ba1bf1
FC
967
968=back
969
970=head2 Changes to Existing Diagnostics
971
e5ba1bf1
FC
972=over 4
973
974=item *
975
d268df4d
RS
976L<Constant(%s): Call to &{$^H{%s}} did not return a defined value|perldiag/Constant(%s): Call to &{$^H{%s}} did not return a defined value>
977
978Constant overloading that returns C<undef> results in this error message.
979For numeric constants, it used to say "Constant(undef)". "undef" has been
980replaced with the number itself.
981
982=item *
983
f7b06e7f
RS
984The error produced when a module cannot be loaded now includes a hint that
985the module may need to be installed: "Can't locate hopping.pm in @INC (you
986may need to install the hopping module) (@INC contains: ...)"
987
988=item *
989
00785cb7
RS
990L<vector argument not supported with alpha versions|perldiag/vector argument not supported with alpha versions>
991
992This warning was not suppressable, even with C<no warnings>. Now it is
993suppressible, and has been moved from the "internal" category to the
994"printf" category.
995
996=item *
997
998C<< Can't do {n,m} with n > m in regex; marked by <-- HERE in m/%s/ >>
999
1000This fatal error has been turned into a warning that reads:
1001
1002L<< Quantifier {n,m} with n > m can't match in regex | perldiag/Quantifier {n,m} with n > m can't match in regex >>
1003
1004(W regexp) Minima should be less than or equal to maxima. If you really want
1005your regexp to match something 0 times, just put {0}.
1006
1007=item *
1008
0fef449b
RS
1009The "Runaway prototype" warning that occurs in bizarre cases has been
1010removed as being unhelpful and inconsistent.
1011
1012=item *
1013
1014The "Not a format reference" error has been removed, as the only case in
1015which it could be triggered was a bug.
1016
1017=item *
1018
1019The "Unable to create sub named %s" error has been removed for the same
1020reason.
e5ba1bf1 1021
37133b20
RS
1022=item *
1023
1024The 'Can't use "my %s" in sort comparison' error has been downgraded to a
1025warning, '"my %s" used in sort comparison' (with 'state' instead of 'my'
1026for state variables). In addition, the heuristics for guessing whether
1027lexical $a or $b has been misused have been improved to generate fewer
1028false positives. Lexical $a and $b are no longer disallowed if they are
1029outside the sort block. Also, a named unary or list operator inside the
1030sort block no longer causes the $a or $b to be ignored [perl #86136].
1031
e5ba1bf1
FC
1032=back
1033
1034=head1 Utility Changes
1035
f7b06e7f 1036=head3 L<h2xs>
e5ba1bf1
FC
1037
1038=over 4
1039
1040=item *
1041
f7b06e7f 1042F<h2xs> no longer produces invalid code for empty defines. [perl #20636]
e5ba1bf1
FC
1043
1044=back
1045
1046=head1 Configuration and Compilation
1047
1048XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
1049go here. Any other changes to the Perl build process should be listed here.
1050However, any platform-specific changes should be listed in the
1051L</Platform Support> section, instead.
1052
1053[ List changes as a =item entry ].
1054
1055=over 4
1056
1057=item *
1058
00785cb7
RS
1059F<Configure> will now correctly detect C<isblank()> when compiling with a C++
1060compiler.
1061
1062=item *
1063
94b31d3f
RS
1064The pager detection in F<Configure> has been improved to allow responses which
1065specify options after the program name, e.g. B</usr/bin/less -R>, if the user
1066accepts the default value. This helps B<perldoc> when handling ANSI escapes
1067[perl #72156].
e5ba1bf1
FC
1068
1069=back
1070
1071=head1 Testing
1072
1073XXX Any significant changes to the testing of a freshly built perl should be
1074listed here. Changes which create B<new> files in F<t/> go here as do any
1075large changes to the testing harness (e.g. when parallel testing was added).
1076Changes to existing files in F<t/> aren't worth summarizing, although the bugs
1077that they represent may be covered elsewhere.
1078
1079[ List each test improvement as a =item entry ]
1080
1081=over 4
1082
1083=item *
1084
0bba4573
RS
1085The test suite now has a section for tests that require very large amounts
1086of memory. These tests won't run by default; they can be enabled by
1087setting the C<PERL_TEST_MEMORY> environment variable to the number of
1088gibibytes of memory that may be safely used.
e5ba1bf1
FC
1089
1090=back
1091
1092=head1 Platform Support
1093
1094XXX Any changes to platform support should be listed in the sections below.
1095
1096[ Within the sections, list each platform as a =item entry with specific
1097changes as paragraphs below it. ]
1098
1099=head2 New Platforms
1100
1101XXX List any platforms that this version of perl compiles on, that previous
1102versions did not. These will either be enabled by new files in the F<hints/>
1103directories, or new subdirectories and F<README> files at the top level of the
1104source tree.
1105
1106=over 4
1107
1108=item XXX-some-platform
1109
1110XXX
1111
1112=back
1113
1114=head2 Discontinued Platforms
1115
e5ba1bf1
FC
1116=over 4
1117
94b31d3f 1118=item UTS Global
e5ba1bf1 1119
94b31d3f
RS
1120Support code relating to UTS global has been removed. UTS was a mainframe
1121version of System V created by Amdahl, subsequently sold to UTS Global. The
1122port has not been touched since before Perl 5.8.0, and UTS Global is now
1123defunct.
e5ba1bf1 1124
00785cb7
RS
1125=item VM/ESA
1126
1127Support for VM/ESA has been removed. The port was tested on 2.3.0, which
1128IBM ended service on in March 2002. 2.4.0 ended service in June 2003, and
1129was superseded by Z/VM. The current version of Z/VM is V6.2.0, and scheduled
1130for end of service on 2015/04/30.
1131
f7b06e7f
RS
1132=item MPE/IX
1133
1134Support for MPE/IX has been removed.
1135
7e7c78a1
RS
1136=item EPOC
1137
1138Support code relating to EPOC has been removed. EPOC was a family of
1139operating systems developed by Psion for mobile devices. It was the
1140predecessor of Symbian. The port was last updated in April 2002.
1141
816361ee
RS
1142=item Rhapsody
1143
1144Support for Rhapsody has been removed.
1145
e5ba1bf1
FC
1146=back
1147
1148=head2 Platform-Specific Notes
1149
1150XXX List any changes for specific platforms. This could include configuration
1151and compilation changes or changes in portability/compatibility. However,
1152changes within modules for platforms should generally be listed in the
1153L</Modules and Pragmata> section.
1154
1155=over 4
1156
0bba4573 1157=item clang++
e5ba1bf1 1158
0bba4573
RS
1159There is now a workaround for a compiler bug that prevented compiling
1160with clang++ since Perl 5.15.7 [perl #112786].
1161
1162=item C++
1163
1164When compiling the Perl core as C++ (which is only semi-supported), the
1165mathom functions are now compiled as C<extern "C">, to ensure proper
1166binary compatibility. (However, binary compatibility isn't generally
1167guaranteed anyway in the situations where this would matter.)
1168
7e7c78a1
RS
1169=item VMS
1170
1171Where possible, the case of filenames and command-line arguments is now
1172preserved by enabling the CRTL features C<DECC$EFS_CASE_PRESERVE> and
1173C<DECC$ARGV_PARSE_STYLE> at start-up time. The latter only takes effect
1174when extended parse is enabled in the process from which Perl is run.
1175
1176=item WinCE
1177
1178Building on WinCE is now possible once again, although more work is required
1179to fully restore a clean build.
1180
816361ee
RS
1181=item Windows
1182
1183Perl can now be built using Microsoft's Visual C++ 2012 compiler by specifying
1184CCTYPE=MSVC110 (or MSVC110FREE if you are using the free Express edition for
1185Windows Desktop) in F<win32/Makefile>.
1186
1187=item Haiku
1188
1189Perl should now work out of the box on Haiku R1 Alpha 4.
1190
00785cb7
RS
1191=item Win32
1192
1193Fixed a problem where perl could crash while cleaning up threads (including the
1194main thread) in threaded debugging builds on Win32 and possibly other platforms
1195[perl #114496].
1196
1197A rare race condition that would lead to L<sleep|perlfunc/sleep> taking more
1198time than requested, and possibly even hanging, has been fixed [perl #33096].
1199
f7b06e7f
RS
1200=item Win32
1201
1202The option to build without USE_SOCKETS_AS_HANDLES has been removed.
1203
00785cb7
RS
1204=item Solaris
1205
1206In Configure, avoid running sed commands with flags not supported on Solaris.
1207
1208=item Darwin
1209
1210Stop hardcoding an alignment on 8 byte boundaries to fix builds using
1211-Dusemorebits.
1212
1213=item VMS
1214
1215Fix linking on builds configured with -Dusemymalloc=y.
1216
0bba4573
RS
1217=item VMS
1218
1219It should now be possible to compile Perl as C++ on VMS.
e5ba1bf1 1220
0fef449b
RS
1221=item Win32
1222
1223C<link> on Win32 now attempts to set C<$!> to more appropriate values
1224based on the Win32 API error code. [perl #112272]
1225
1226Perl no longer mangles the environment block, e.g. when launching a new
1227sub-process, when the environment contains non-ASCII characters. Known
1228problems still remain, however, when the environment contains characters
1229outside of the current ANSI codepage (e.g. see the item about Unicode in
1230C<%ENV> in L<http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/todo.pod>).
1231[perl #113536]
1232
37133b20
RS
1233=item Win32
1234
1235Building perl with some Windows compilers used to fail due to a problem
1236with miniperl's C<glob> operator (which uses the C<perlglob> program)
1237deleting the PATH environment variable [perl #113798].
1238
94b31d3f
RS
1239=item Win32
1240
1241A new makefile option, USE_64_BIT_INT, has been added to the Windows makefiles.
1242Set this to "define" when building a 32-bit perl if you want it to use 64-bit
1243integers.
1244
1245Machine code size reductions, already made to the DLLs of XS modules in Perl
12465.17.2, have now been extended to the perl DLL itself.
1247
1248Building with VC++ 6.0 was inadvertently broken in Perl 5.17.2 but has now been
1249fixed again.
1250
0fef449b
RS
1251=item VMS
1252
1253All C header files from the top-level directory of the distribution are now
1254installed on VMS, providing consistency with a long-standing practice on other
1255platforms. Previously only a subset were installed, which broke non-core
1256extension builds for extensions that depended on the missing include files.
1257
37133b20
RS
1258=item VMS
1259
1260Quotes are now removed from the command verb (but not the parameters) for
1261commands spawned via C<system>, backticks, or a piped C<open>. Previously,
1262quotes on the verb were passed through to DCL, which would fail to recognize
1263the command. Also, if the verb is actually a path to an image or command
1264procedure on an ODS-5 volume, quoting it now allows the path to contain spaces.
1265
94b31d3f
RS
1266=item VMS
1267
1268The B<a2p> build has been fixed for the HP C++ compiler on OpenVMS.
1269
37133b20
RS
1270=item AIX
1271
1272Configure now always adds C<-qlanglvl=extc99> to the CC flags on AIX when
1273using xlC. This will make it easier to compile a number of XS-based modules
1274that assume C99 [perl #113778].
1275
e5ba1bf1
FC
1276=back
1277
1278=head1 Internal Changes
1279
0bba4573 1280=over
e5ba1bf1 1281
0bba4573 1282=item *
e5ba1bf1 1283
816361ee
RS
1284A synonym for the misleadingly named C<av_len()> has been created:
1285C<av_top()>. Both of these return the number of the highest index in
1286the array, not the number of elements it contains.
1287
1288=item *
1289
d268df4d
RS
1290SvUPGRADE() is no longer an expression. Originally this macro (and its
1291underlying function, sv_upgrade()) were documented as boolean, although
1292in reality they always croaked on error and never returned false. In 2005
1293the documentation was updated to specify a void return value, but
1294SvUPGRADE() was left always returning 1 for backwards compatibility. This
1295has now been removed, and SvUPGRADE() is now a statement with no return
1296value.
1297
1298So this is now a syntax error:
1299
1300 if (!SvUPGRADE(sv)) { croak(...); }
1301
1302If you have code like that, simply replace it with
1303
1304 SvUPGRADE(sv);
1305
1306or to to avoid compiler warnings with older perls, possibly
1307
1308 (void)SvUPGRADE(sv);
1309
1310=item *
1311
1312Perl has a new copy-on-write mechanism that allows any SvPOK scalar to be
1313upgraded to a copy-on-write scalar. A reference count on the string buffer
1314is stored in the string buffer itself.
1315
1316This breaks a few XS modules by allowing copy-on-write scalars to go
1317through code paths that never encountered them before.
1318
1319This behaviour can still be disabled by running F<Configure> with
1320B<-Accflags=-DPERL_NO_COW>. This option will probably be removed in Perl
13215.20.
1322
1323=item *
1324
1325Copy-on-write no longer uses the SvFAKE and SvREADONLY flags. Hence,
1326SvREADONLY indicates a true read-only SV.
1327
1328Use the SvIsCOW macro (as before) to identify a copy-on-write scalar.
1329
1330=item *
1331
1332C<PL_sawampersand> is now a constant. The switch this variable provided
1333(to enable/disable the pre-match copy depending on whether C<$&> had been
1334seen) has been removed and replaced with copy-on-write, eliminating a few
1335bugs.
1336
1337The previous behaviour can still be enabled by running F<Configure> with
1338B<-Accflags=-DPERL_SAWAMPERSAND>.
1339
1340=item *
1341
1342PL_glob_index is gone.
1343
1344=item *
1345
7e7c78a1
RS
1346The private Perl_croak_no_modify has had its context parameter removed. It is
1347now has a void prototype. Users of the public API croak_no_modify remain
1348unaffected.
1349
1350=item *
1351
1352Copy-on-write (shared hash key) scalars are no longer marked read-only.
1353C<SvREADONLY> returns false on such an SV, but C<SvIsCOW> still returns
1354true.
1355
1356=item *
1357
1358A new op type, C<OP_PADRANGE> has been introduced. The perl peephole
1359optimiser will, where possible, substitute a single padrange op for a
1360pushmark followed by one or more pad ops, and possibly also skipping list
1361and nextstate ops. In addition, the op can carry out the tasks associated
1362with the RHS of a my(...) = @_ assignment, so those ops may be optimised
1363away too.
1364
1365=item *
1366
f7b06e7f
RS
1367Case-insensitive matching inside a [bracketed] character class with a
1368multi-character fold, no longer excludes one of the possibilities in the
1369circumstances that it used to. [perl #89774].
1370
1371=item *
1372
1373C<PL_formfeed> has been removed.
1374
1375=item *
1376
1377The regular expression engine no longer reads one byte past the end of the
1378target string. While for all internally well-formed scalars this should
1379never have been a problem, this change facilitates clever tricks with
1380string buffers in CPAN modules. [perl #73542]
1381
1382=item *
1383
1384Inside a BEGIN block, C<PL_compcv> now points to the currently-compiling
1385subroutine, rather than the BEGIN block itself.
1386
1387=item *
1388
1389C<mg_length> has been deprecated.
1390
1391=item *
1392
1393C<sv_len> now always returns a byte count and C<sv_len_utf8> a character
1394count. Previously, C<sv_len> and C<sv_len_utf8> were both buggy and would
1395sometimes returns bytes and sometimes characters. C<sv_len_utf8> no longer
1396assumes that its argument is in UTF8. Neither of these creates UTF8 caches
1397for tied or overloaded values or for non-PVs any more.
1398
1399=item *
1400
1401C<sv_mortalcopy> now copies string buffers of shared hash key scalars when
1402called from XS modules [perl #79824].
1403
1404=item *
1405
1406C<RXf_SPLIT> and C<RXf_SKIPWHITE> are no longer used. They are now
1407#defined as 0.
1408
1409=item *
1410
1411The new C<RXf_MODIFIES_VARS> flag can be set by custom regular expression
1412engines to indicate that the execution of the regular expression may cause
1413variables to be modified. This lets C<s///> know to skip certain
1414optimisations. Perl's own regular expression engine sets this flag for the
1415special backtracking verbs that set $REGMARK and $REGERROR.
1416
1417=item *
1418
00785cb7
RS
1419The APIs for accessing lexical pads have changed considerably.
1420
1421C<PADLIST>s are now longer C<AV>s, but their own type instead. C<PADLIST>s now
1422contain a C<PAD> and a C<PADNAMELIST> of C<PADNAME>s, rather than C<AV>s for the
1423pad and the list of pad names. C<PAD>s, C<PADNAMELIST>s, and C<PADNAME>s are to
1424be accessed as such through the newly added pad API instead of the plain C<AV>
1425and C<SV> APIs. See L<perlapi> for details.
1426
1427=item *
1428
1429In the regex API, the numbered capture callbacks are passed an index
1430indicating what match variable is being accessed. There are special
1431index values for the C<$`, $&, $&> variables. Previously the same three
1432values were used to retrieve C<${^PREMATCH}, ${^MATCH}, ${^POSTMATCH}>
1433too, but these have now been assigned three separate values. See
1434L<perlreapi/Numbered capture callbacks>.
1435
1436=item *
1437
1438C<PL_sawampersand> was previously a boolean indicating that any of
1439C<$`, $&, $&> had been seen; it now contains three one-bit flags
1440indicating the presence of each of the variables individually.
1441
00785cb7
RS
1442=item *
1443
0bba4573
RS
1444The C<CV *> typemap entry now supports C<&{}> overloading and typeglobs,
1445just like C<&{...}> [perl #96872].
e5ba1bf1
FC
1446
1447=item *
1448
0bba4573
RS
1449The C<SVf_AMAGIC> flag to indicate overloading is now on the stash, not the
1450object. It is now set automatically whenever a method or @ISA changes, so
1451its meaning has changed, too. It now means "potentially overloaded". When
1452the overload table is calculated, the flag is automatically turned off if
1453there is no overloading, so there should be no noticeable slowdown.
1454
1455The staleness of the overload tables is now checked when overload methods
1456are invoked, rather than during C<bless>.
1457
1458"A" magic is gone. The changes to the handling of the C<SVf_AMAGIC> flag
1459eliminate the need for it.
1460
1461C<PL_amagic_generation> has been removed as no longer necessary. For XS
1462modules, it is now a macro alias to C<PL_na>.
1463
1464The fallback overload setting is now stored in a stash entry separate from
1465overloadedness itself.
1466
1467=item *
1468
1469The character-processing code has been cleaned up in places. The changes
1470should be operationally invisible.
e5ba1bf1 1471
0fef449b
RS
1472=item *
1473
1474The C<study> function was made a no-op in 5.16. It was simply disabled via
1475a C<return> statement; the code was left in place. Now the code supporting
1476what C<study> used to do has been removed.
1477
1478=item *
1479
1480Under threaded perls, there is no longer a separate PV allocated for every
1481COP to store its package name (C<< cop->stashpv >>). Instead, there is an
1482offset (C<< cop->stashoff >>) into the new C<PL_stashpad> array, which
1483holds stash pointers.
1484
1485=item *
1486
1487In the pluggable regex API, the C<regexp_engine> struct has acquired a new
1488field C<op_comp>, which is currently just for perl's internal use, and
1489should be initialised to NULL by other regex plugin modules.
1490
1491=item *
1492
1493A new function C<alloccoptash> has been added to the API, but is considered
1494experimental. See L<perlapi>.
1495
37133b20
RS
1496=item *
1497
1498Perl used to implement get magic in a way that would sometimes hide bugs in
1499code could call mg_get() too many times on magical values. This hiding of
1500errors no longer occurs, so long-standing bugs may become visible now. If
1501you see magic-related errors in XS code, check to make sure it, together
1502with the Perl API functions it uses, calls mg_get() only once on SvGMAGICAL()
1503values.
1504
1505=item *
1506
1507OP allocation for CVs now uses a slab allocator. This simplifies
1508memory management for OPs allocated to a CV, so cleaning up after a
1509compilation error is simpler and safer [perl #111462][perl #112312].
1510
1511=item *
1512
1513PERL_DEBUG_READONLY_OPS has been rewritten to work with the new slab
1514allocator, allowing it to catch more violations than before.
1515
1516=item *
1517
1518The old slab allocator for ops, which was only enabled for PERL_IMPLICIT_SYS
1519and PERL_DEBUG_READONLY_OPS, has been retired.
1520
e5ba1bf1
FC
1521=back
1522
1523=head1 Selected Bug Fixes
1524
94b31d3f
RS
1525=over 4
1526
1527=item *
e5ba1bf1 1528
816361ee
RS
1529A bug in the core typemap caused any C types that map to the T_BOOL core
1530typemap entry to not be set, updated, or modified when the T_BOOL variable was
1531used in an OUTPUT: section with an exception for RETVAL. T_BOOL in an INPUT:
1532section was not affected. Using a T_BOOL return type for an XSUB (RETVAL)
1533was not affected. A side effect of fixing this bug is, if a T_BOOL is specified
1534in the OUTPUT: section (which previous did nothing to the SV), and a read only
1535SV (literal) is passed to the XSUB, croaks like "Modification of a read-only
1536value attempted" will happen. [perl #115796]
1537
1538=item *
1539
1540On many platforms, providing a directory name as the script name caused perl
1541to do nothing and report success. It should now universally report an error
1542and exit nonzero. [perl #61362]
1543
1544=item *
1545
d268df4d
RS
1546C<sort {undef} ...> under fatal warnings no longer crashes. It started
1547crashing in Perl 5.16.
1548
1549=item *
1550
1551Stashes blessed into each other
1552(C<bless \%Foo::, 'Bar'; bless \%Bar::, 'Foo'>) no longer result in double
1553frees. This bug started happening in Perl 5.16.
1554
1555=item *
1556
1557Numerous memory leaks have been fixed, mostly involving fatal warnings and
1558syntax errors.
1559
1560=item *
1561
1562Lexical constants (C<my sub answer () { 42 }>) no longer cause double
1563frees.
1564
1565=item *
1566
1567Constant subroutine redefinition warns by default, but lexical constants
1568were accidentally exempt from default warnings. This has been corrected.
1569
1570=item *
1571
1572Some failed regular expression matches such as C<'f' =~ /../g> were not
1573resetting C<pos>. Also, "match-once" patterns (C<m?...?g>) failed to reset
1574it, too, when invoked a second time [perl #23180].
1575
1576=item *
1577
1578Accessing C<$&> after a pattern match now works if it had not been seen
1579before the match. I.e., this applies to C<${'&'}> (under C<no strict>) and
1580C<eval '$&'>. The same applies to C<$'> and C<$`> [perl #4289].
1581
1582=item *
1583
1584Several bugs involving C<local *ISA> and C<local *Foo::> causing stale
1585MRO caches have been fixed.
1586
1587=item *
1588
1589Defining a subroutine when its typeglob has been aliased no longer results
1590in stale method caches. This bug was introduced in Perl 5.10.
1591
1592=item *
1593
1594Localising a typeglob containing a subroutine when the typeglob's package
1595has been deleted from its parent stash no longer produces an error. This
1596bug was introduced in Perl 5.14.
1597
1598=item *
1599
1600Under some circumstances, C<local *method=...> would fail to reset method
1601caches upon scope exit.
1602
1603=item *
1604
1605C</[.foo.]/> is no longer an error, but produces a warning (as before) and
1606is treated as C</[.fo]/> [perl #115818].
1607
1608=item *
1609
1610C<goto $tied_var> now calls FETCH before deciding what type of goto
1611(subroutine or label) this is.
1612
1613=item *
1614
1615Renaming packages through glob assignment
1616(C<*Foo:: = *Bar::; *Bar:: = *Baz::>) in combination with C<m?...?> and
1617C<reset> no longer makes threaded builds crash.
1618
1619=item *
1620
1621An earlier release in the 5.17.x series could crash if user code prevented
1622_charnames from loading via C<$INC{'_charnames.pm'}++>.
1623
1624=item *
1625
1626A number of bugs related to assigning a list to hash have been fixed. Many of
1627these involve lists with repeated keys like C<(1, 1, 1, 1)>.
1628
1629=over 4
1630
1631=item *
1632
1633The expression C<scalar(%h = (1, 1, 1, 1))> now returns C<4>, not C<2>.
1634
1635=item *
1636
1637The return value of C<%h = (1, 1, 1)> in list context was wrong. Previously
1638this would return C<(1, undef, 1)>, now it returns C<(1, undef)>.
1639
1640=item *
1641
1642Perl now issues the same warning on C<($s, %h) = (1, {})> as it does for
1643C<(%h) = ({})>, "Reference found where even-sized list expected".
1644
1645=item *
1646
1647A number of additional edge cases in list assignment to hashes were
1648corrected. For more details see commit 23b7025ebc.
1649
1650=back
1651
1652=item *
1653
f7b06e7f
RS
1654A bug, case-insensitive regex with UTF8-flagged strings, introduced
1655earlier in the 5.17 series has been fixed. [perl #114982]
1656
1657=item *
1658
1659Attributes applied to lexical variables no longer leak memory.
1660[perl #114764]
1661
1662=item *
1663
1664C<dump>, C<goto>, C<last>, C<next>, C<redo> or C<require> followed by a
1665bareword (or version) and then an infix operator is no longer a syntax
1666error. It used to be for those infix operators (like C<+>) that have a
1667different meaning where a term is expected. [perl #105924]
1668
1669=item *
1670
1671C<require a::b . 1> and C<require a::b + 1> no longer produce erroneous
1672ambiguity warnings. [perl #107002]
1673
1674=item *
1675
1676Class method calls are now allowed on any string, and not just strings
1677beginning with an alphanumeric character. [perl #105922]
1678
1679=item *
1680
1681An empty pattern created with C<qr//> used in C<m///> no longer triggers
1682the "empty pattern reuses last pattern" behaviour. [perl #96230]
1683
1684=item *
1685
1686Tying a hash during iteration no longer results in a memory leak.
1687
1688=item *
1689
1690Freeing a tied hash during iteration no longer results in a memory leak.
1691
1692=item *
1693
1694List assignment to a tied array or hash that dies on STORE no longer
1695results in a memory leak.
1696
1697=item *
1698
1699If the hint hash (C<%^H>) is tied, compile-time scope entry (which copies
1700the hint hash) no longer leaks memory if FETCH dies. [perl #107000]
1701
1702=item *
1703
1704Constant folding no longer inappropriately triggers the special
1705C<split " "> behaviour. [perl #94490]
1706
1707=item *
1708
1709C<defined scalar(@array)>, C<defined do { &foo }>, and similar constructs
1710now treat the argument to C<defined> as a simple scalar. [perl #97466]
1711
1712=item *
1713
1714Running a custom debugging that defines no C<*DB::DB> glob or provides a
1715subroutine stub for C<&DB::DB> no longer results in a crash, but an error
1716instead. [perl #114990]
1717
1718=item *
1719
1720C<reset ""> now matches its documentation. C<reset> only resets C<m?...?>
1721patterns when called with no argument. An empty string for an argument now
1722does nothing. (It used to be treated as no argument.) [perl #97958]
1723
1724=item *
1725
1726C<printf> with an argument returning an empty list no longer reads past the
1727end of the stack, resulting in erratic behaviour. [perl #77094]
1728
1729=item *
1730
1731C<--subname> no longer produces erroneous ambiguity warnings.
1732[perl #77240]
1733
1734=item *
1735
1736C<v10> is now allowed as a label or package name. This was inadvertently
1737broken when v-strings were added in Perl 5.6. [perl #56880]
1738
1739=item *
1740
1741A regression introduced in 5.17.2 has been fixed, which made C</[\@\\]||/>
1742result in a "panic" error. [perl #115050]
1743
1744=item *
1745
1746C<length>, C<pos>, C<substr> and C<sprintf> could be confused by ties,
1747overloading, references and typeglobs if the stringification of such
1748changed the internal representation to or from UTF8. [perl #114410]
1749
1750=item *
1751
1752utf8::encode now calls FETCH and STORE on tied variables. utf8::decode now
1753calls STORE (it was already calling FETCH).
1754
1755=item *
1756
1757C<$tied =~ s/$non_utf8/$utf8/> no longer loops infinitely if the tied
1758variable returns a Latin-1 string, shared hash key scalar, or reference or
1759typeglob that stringifies as ASCII or Latin-1. This is a regression from
17605.12.x.
1761
1762=item *
1763
1764C<s///> without /e is now better at detecting when it needs to forego
1765certain optimisations, fixing some buggy cases:
1766
1767=over
1768
1769=item *
1770
1771Match variables in certain constructs (C<&&>, C<||>, C<..> and others) in
1772the replacement part; e.g., C<s/(.)/$l{$a||$1}/g>. [perl #26986]
1773
1774=item *
1775
1776Aliases to match variables in the replacement.
1777
1778=item *
1779
1780$REGERROR or $REGMARK in the replacement. [perl #49190]
1781
1782=item *
1783
1784An empty pattern (C<s//$foo/>) that causes the last-successful pattern to
1785be used, when that pattern contains code blocks that modify the variables
1786in the replacement.
1787
1788=back
1789
1790=item *
1791
1792The taintedness of the replacement string no longer affects the taintedness
1793of the return value of C<s///e>.
1794
1795=item *
1796
1797The C<$|> autoflush variable is created on-the-fly when needed. If this
1798happened (e.g., if it was mentioned in a module or eval) when the
1799currently-selected filehandle was a typeglob with an empty IO slot, it used
1800to crash. [perl #115206]
1801
1802=item *
1803
1804Line numbers at the end of a string eval are no longer off by one.
1805[perl #114658]
1806
1807=item *
1808
1809@INC filters (subroutines returned by subroutines in @INC) that set $_ to a
1810copy-on-write scalar no longer cause the parser to modify that string
1811buffer in place.
1812
1813=item *
1814
1815C<length($object)> no longer returns the undefined value if the object has
1816string overloading that returns undef. [perl #115260]
1817
1818=item *
1819
1820The use of C<PL_stashcache>, the stash name lookup cache for method calls, has
1821been restored,
1822
1823Commit da6b625f78f5f133 in August 2011 inadvertently broke the code that looks
1824up values in C<PL_stashcache>. As it's a only cache, quite correctly everything
1825carried on working without it.
1826
1827=item *
1828
00785cb7
RS
1829The error "Can't localize through a reference" had disappeared in 5.16.0
1830when C<local %$ref> appeared on the last line of an lvalue subroutine.
1831This error disappeared for C<\local %$ref> in perl 5.8.1. It has now
1832been restored.
1833
1834=item *
1835
1836The parsing of here-docs has been improved significantly, fixing several
1837parsing bugs and crashes and one memory leak, and correcting wrong
1838subsequent line numbers under certain conditions.
1839
1840=item *
1841
1842Inside an eval, the error message for an unterminated here-doc no longer
1843has a newline in the middle of it [perl #70836].
1844
1845=item *
1846
1847A substitution inside a substitution pattern (C<s/${s|||}//>) no longer
1848confuses the parser.
1849
1850=item *
1851
1852It may be an odd place to allow comments, but C<s//"" # hello/e> has
1853always worked, I<unless> there happens to be a null character before the
1854first #. Now it works even in the presence of nulls.
1855
1856=item *
1857
1858An invalid range in C<tr///> or C<y///> no longer results in a memory leak.
1859
1860=item *
1861
1862String eval no longer treats a semicolon-delimited quote-like operator at
1863the very end (C<eval 'q;;'>) as a syntax error.
1864
1865=item *
1866
1867C<< warn {$_ => 1} + 1 >> is no longer a syntax error. The parser used to
1868get confused with certain list operators followed by an anonymous hash and
1869then an infix operator that shares its form with a unary operator.
1870
1871=item *
1872
1873C<(caller $n)[6]> (which gives the text of the eval) used to return the
1874actual parser buffer. Modifying it could result in crashes. Now it always
1875returns a copy. The string returned no longer has "\n;" tacked on to the
1876end. The returned text also includes here-doc bodies, which used to be
1877omitted.
1878
1879=item *
1880
1881Reset the utf8 position cache when accessing magical variables to avoid the
1882string buffer and the utf8 position cache getting out of sync
1883[perl #114410].
1884
1885=item *
1886
1887Various cases of get magic being called twice for magical utf8 strings have been
1888fixed.
1889
1890=item *
1891
1892This code (when not in the presence of C<$&> etc)
1893
1894 $_ = 'x' x 1_000_000;
1895 1 while /(.)/;
1896
1897used to skip the buffer copy for performance reasons, but suffered from C<$1>
1898etc changing if the original string changed. That's now been fixed.
1899
1900=item *
1901
1902Perl doesn't use PerlIO anymore to report out of memory messages, as PerlIO
1903might attempt to allocate more memory.
1904
1905=item *
1906
1907In a regular expression, if something is quantified with C<{n,m}>
1908where C<S<n E<gt> m>>, it can't possibly match. Previously this was a fatal error,
1909but now is merely a warning (and that something won't match). [perl #82954].
1910
1911=item *
1912
1913It used to be possible for formats defined in subroutines that have
1914subsequently been undefined and redefined to close over variables in the
1915wrong pad (the newly-defined enclosing sub), resulting in crashes or
1916"Bizarre copy" errors.
1917
1918=item *
1919
1920Redefinition of XSUBs at run time could produce warnings with the wrong
1921line number.
1922
1923=item *
1924
1925The %vd sprintf format does not support version objects for alpha versions.
1926It used to output the format itself (%vd) when passed an alpha version, and
1927also emit an "Invalid conversion in printf" warning. It no longer does,
1928but produces the empty string in the output. It also no longer leaks
1929memory in this case.
1930
1931=item *
1932
1933A bug fix in an earlier 5.17.x release caused C<no a a 3> (a syntax error)
1934to result in a bad read or assertion failure, because an op was being freed
1935twice.
1936
1937=item *
1938
1939C<< $obj->SUPER::method >> calls in the main package could fail if the
1940SUPER package had already been accessed by other means.
1941
1942=item *
1943
1944Stash aliasing (C<*foo:: = *bar::>) no longer causes SUPER calls to ignore
1945changes to methods or @ISA or use the wrong package.
1946
1947=item *
1948
1949Method calls on packages whose names end in ::SUPER are no longer treated
1950as SUPER method calls, resulting in failure to find the method.
1951Furthermore, defining subroutines in such packages no longer causes them to
1952be found by SUPER method calls on the containing package [perl #114924].
1953
00785cb7
RS
1954=item *
1955
94b31d3f
RS
1956C<\w> now matches the code points U+200C (ZERO WIDTH NON-JOINER) and U+200D
1957(ZERO WIDTH JOINER). C<\W> no longer matches these. This change is because
1958Unicode corrected their definition of what C<\w> should match.
e5ba1bf1 1959
94b31d3f
RS
1960=item *
1961
1962C<dump LABEL> no longer leaks its label.
1963
1964=item *
1965
1966Constant folding no longer changes the behaviour of functions like C<stat()>
1967and C<truncate()> that can take either filenames or handles.
1968C<stat 1 ? foo : bar> nows treats its argument as a file name (since it is an
1969arbitrary expression), rather than the handle "foo".
1970
1971=item *
1972
1973C<truncate FOO, $len> no longer falls back to treating "FOO" as a file name if
1974the filehandle has been deleted. This was broken in Perl 5.16.0.
1975
1976=item *
1977
1978Subroutine redefinitions after sub-to-glob and glob-to-glob assignments no
1979longer cause double frees or panic messages.
1980
1981=item *
1982
1983C<s///> now turns vstrings into plain strings when performing a substitution,
1984even if the resulting string is the same (C<s/a/a/>).
1985
1986=item *
1987
1988Prototype mismatch warnings no longer erroneously treat constant subs as having
1989no prototype when they actually have "".
1990
1991=item *
1992
1993Constant subroutines and forward declarations no longer prevent prototype
1994mismatch warnings from omitting the sub name.
1995
1996=item *
1997
1998C<undef> on a subroutine now clears call checkers.
1999
2000=item *
2001
2002The C<ref> operator started leaking memory on blessed objects in Perl 5.16.0.
2003This has been fixed [perl #114340].
2004
2005=item *
2006
2007C<use> no longer tries to parse its arguments as a statement, making
2008C<use constant { () };> a syntax error [perl #114222].
2009
2010=item *
2011
2012On debugging builds, "uninitialized" warnings inside formats no longer cause
2013assertion failures.
2014
2015=item *
2016
2017On debugging builds, subroutines nested inside formats no longer cause
2018assertion failures [perl #78550].
2019
2020=item *
2021
2022Formats and C<use> statements are now permitted inside formats.
2023
2024=item *
2025
2026C<print $x> and C<sub { print $x }-E<gt>()> now always produce the same output.
2027It was possible for the latter to refuse to close over $x if the variable was
2028not active; e.g., if it was defined outside a currently-running named
2029subroutine.
2030
2031=item *
2032
2033Similarly, C<print $x> and C<print eval '$x'> now produce the same output.
2034This also allows "my $x if 0" variables to be seen in the debugger [perl
2035#114018].
2036
2037=item *
2038
2039Formats called recursively no longer stomp on their own lexical variables, but
2040each recursive call has its own set of lexicals.
2041
2042=item *
2043
2044Attempting to free an active format or the handle associated with it no longer
2045results in a crash.
2046
2047=item *
2048
2049Format parsing no longer gets confused by braces, semicolons and low-precedence
2050operators. It used to be possible to use braces as format delimiters (instead
2051of C<=> and C<.>), but only sometimes. Semicolons and low-precedence operators
2052in format argument lines no longer confuse the parser into ignoring the line's
2053return value. In format argument lines, braces can now be used for anonymous
2054hashes, instead of being treated always as C<do> blocks.
2055
2056=item *
2057
2058Formats can now be nested inside code blocks in regular expressions and other
2059quoted constructs (C</(?{...})/> and C<qq/${...}/>) [perl #114040].
2060
2061=item *
2062
2063Formats are no longer created after compilation errors.
2064
2065=item *
2066
2067Some format syntax errors started causing crashes in Perl 5.17.2, but have now
2068been fixed.
2069
2070=item *
2071
2072Under debugging builds, the B<-DA> command line option started crashing in Perl
20735.16.0. It has been fixed [perl #114368].
2074
2075=item *
2076
2077Scope::Escape compatibility, which was broken in Perl 5.17.2, has been restored
2078[perl #113872].
2079
2080=item *
2081
2082A potential deadlock scenario involving the premature termination of a pseudo-
2083forked child in a Windows build with ithreads enabled has been fixed. This
2084resolves the common problem of the F<t/op/fork.t> test hanging on Windows [perl
2085#88840].
2086
2087=item *
2088
2089The microperl build, broken since Perl 5.15.7, has now been restored.
2090
2091=item *
2092
2093The code which generates errors from C<require()> could potentially read one or
2094two bytes before the start of the filename for filenames less than three bytes
2095long and ending C</\.p?\z/>. This has now been fixed. Note that it could
2096never have happened with module names given to C<use()> or C<require()> anyway.
2097
2098=item *
2099
2100The handling of pathnames of modules given to C<require()> has been made
2101thread-safe on VMS.
2102
2103=item *
2104
2105The C<re_compile()> API function, the entry point for perl's regex compiler,
2106was accidentally changed in Perl 5.17.1 to operate on the current engine. This
2107has now been restored to its former core-engine-specific state [perl #114302].
2108
2109=item *
2110
2111Perl 5.17.1 introduced a memory leak into the re-use of run-time regexes where
2112the pattern hasn't changed (i.e. C</$unchanging/>). This has now been fixed.
2113
2114=item *
2115
2116A bug in the compilation of a C</(?{})/> expression which affected the TryCatch
2117test suite has been fixed [perl #114242].
2118
2119=item *
2120
2121Formats no longer leak. They started leaking in Perl 5.17.2.
2122
2123=item *
2124
2125Pod can now be nested in code inside a quoted construct outside of a string
2126eval. This used to work only within string evals [perl #114040].
e5ba1bf1
FC
2127
2128=item *
2129
0bba4573
RS
2130C<goto ''> now looks for an empty label, producing the "goto must have
2131label" error message, instead of exiting the program [perl #111794].
e5ba1bf1 2132
0bba4573 2133=item *
e5ba1bf1 2134
0bba4573
RS
2135C<goto "\0"> now dies with "Can't find label" instead of "goto must have
2136label".
e5ba1bf1 2137
0bba4573 2138=item *
e5ba1bf1 2139
0bba4573
RS
2140The C function C<hv_store> used to result in crashes when used on C<%^H>
2141[perl #111000].
e5ba1bf1 2142
0bba4573
RS
2143=item *
2144
2145A call checker attached to a closure prototype via C<cv_set_call_checker>
2146is now copied to closures cloned from it. So C<cv_set_call_checker> now
2147works inside an attribute handler for a closure.
e5ba1bf1
FC
2148
2149=item *
2150
0bba4573
RS
2151Writing to C<$^N> used to have no effect. Now it croaks with "Modification
2152of a read-only value" by default, but that can be overridden by a custom
2153regular expression engine, as with C<$1> [perl #112184].
2154
23dd6e2e
FC
2155=item *
2156
0bba4573
RS
2157C<undef> on a control character glob (C<undef *^H>) no longer emits an
2158erroneous warning about ambiguity [perl #112456].
23dd6e2e 2159
0bba4573
RS
2160=item *
2161
2162For efficiency's sake, many operators and built-in functions return the
2163same scalar each time. Lvalue subroutines and subroutines in the CORE::
2164namespace were allowing this implementation detail to leak through.
2165C<print &CORE::uc("a"), &CORE::uc("b")> used to print "BB". The same thing
2166would happen with an lvalue subroutine returning the return value of C<uc>.
2167Now the value is copied in such cases.
23dd6e2e
FC
2168
2169=item *
2170
0bba4573
RS
2171C<method {}> syntax with an empty block or a block returning an empty list
2172used to crash or use some random value left on the stack as its invocant.
2173Now it produces an error.
b92848b5 2174
0f023b5a
FC
2175=item *
2176
0bba4573 2177C<vec> now works with extremely large offsets (E<gt>2 GB) [perl #111730].
0f023b5a
FC
2178
2179=item *
2180
0bba4573
RS
2181Changes to overload settings now take effect immediately, as do changes to
2182inheritance that affect overloading. They used to take effect only after
2183C<bless>.
2184
2185Objects that were created before a class had any overloading used to remain
2186non-overloaded even if the class gained overloading through C<use overload>
2187or @ISA changes, and even after C<bless>. This has been fixed
2188[perl #112708].
c53e3a75
FC
2189
2190=item *
2191
0bba4573 2192Classes with overloading can now inherit fallback values.
c53e3a75
FC
2193
2194=item *
2195
0bba4573
RS
2196Overloading was not respecting a fallback value of 0 if there were
2197overloaded objects on both sides of an assignment operator like C<+=>
2198[perl #111856].
0f023b5a
FC
2199
2200=item *
2201
0bba4573
RS
2202C<pos> now croaks with hash and array arguments, instead of producing
2203erroneous warnings.
0f023b5a
FC
2204
2205=item *
2206
0bba4573
RS
2207C<while(each %h)> now implies C<while(defined($_ = each %h))>, like
2208C<readline> and C<readdir>.
0f023b5a 2209
0bba4573
RS
2210=item *
2211
2212Subs in the CORE:: namespace no longer crash after C<undef *_> when called
2213with no argument list (C<&CORE::time> with no parentheses).
2214
2215=item *
2216
2217Unicode 6.1 published an incorrect alias for one of the
2218Canonical_Combining_Class property's values (which range between 0 and
2219254). The alias C<CCC133> should have been C<CCC132>. Perl now
2220overrides the data file furnished by Unicode to give the correct value.
2221
2222=item *
2223
2224C<unpack> no longer produces the "'/' must follow a numeric type in unpack"
2225error when it is the data that are at fault [perl #60204].
2226
2227=item *
2228
2229C<join> and C<"@array"> now call FETCH only once on a tied C<$">
2230[perl #8931].
2231
2232=item *
2233
2234Some subroutine calls generated by compiling core ops affected by a
2235C<CORE::GLOBAL> override had op checking performed twice. The checking
2236is always idempotent for pure Perl code, but the double checking can
2237matter when custom call checkers are involved.
2238
2239=item *
2240
2241A race condition used to exist around fork that could cause a signal sent to
2242the parent to be handled by both parent and child. Signals are now blocked
2243briefly around fork to prevent this from happening [perl #82580].
e5ba1bf1 2244
0fef449b
RS
2245=item *
2246
2247The implementation of code blocks in regular expressions, such as C<(?{})>
2248and C<(??{})>, has been heavily reworked to eliminate a whole slew of bugs.
2249The main user-visible changes are:
2250
2251=over 4
2252
2253=item *
2254
2255Code blocks within patterns are now parsed in the same pass as the
2256surrounding code; in particular it is no longer necessary to have balanced
2257braces: this now works:
2258
2259 /(?{ $x='{' })/
2260
2261This means that this error message is longer generated:
2262
2263 Sequence (?{...}) not terminated or not {}-balanced in regex
2264
2265but a new error may be seen:
2266
2267 Sequence (?{...}) not terminated with ')'
2268
2269In addition, literal code blocks within run-time patterns are only
2270compiled once, at perl compile-time:
2271
2272 for my $p (...) {
2273 # this 'FOO' block of code is compiled once,
2274 # at the same time as the surrounding 'for' loop
2275 /$p{(?{FOO;})/;
2276 }
2277
2278=item *
2279
2280Lexical variables are now sane as regards scope, recursion and closure
2281behavior. In particular, C</A(?{B})C/> behaves (from a closure viewpoint)
2282exactly like C</A/ && do { B } && /C/>, while C<qr/A(?{B})C/> is like
2283C<sub {/A/ && do { B } && /C/}>. So this code now works how you might
2284expect, creating three regexes that match 0, 1, and 2:
2285
2286 for my $i (0..2) {
2287 push @r, qr/^(??{$i})$/;
2288 }
2289 "1" =~ $r[1]; # matches
2290
2291=item *
2292
2293The C<use re 'eval'> pragma is now only required for code blocks defined
2294at runtime; in particular in the following, the text of the C<$r> pattern is
2295still interpolated into the new pattern and recompiled, but the individual
2296compiled code-blocks within C<$r> are reused rather than being recompiled,
2297and C<use re 'eval'> isn't needed any more:
2298
2299 my $r = qr/abc(?{....})def/;
2300 /xyz$r/;
2301
2302=item *
2303
2304Flow control operators no longer crash. Each code block runs in a new
2305dynamic scope, so C<next> etc. will not see
2306any enclosing loops. C<return> returns a value
2307from the code block, not from any enclosing subroutine.
2308
2309=item *
2310
2311Perl normally caches the compilation of run-time patterns, and doesn't
2312recompile if the pattern hasn't changed, but this is now disabled if
2313required for the correct behavior of closures. For example:
2314
2315 my $code = '(??{$x})';
2316 for my $x (1..3) {
2317 # recompile to see fresh value of $x each time
2318 $x =~ /$code/;
2319 }
2320
0fef449b
RS
2321=item *
2322
2323The C</msix> and C<(?msix)> etc. flags are now propagated into the return
2324value from C<(??{})>; this now works:
2325
2326 "AB" =~ /a(??{'b'})/i;
2327
2328=item *
2329
2330Warnings and errors will appear to come from the surrounding code (or for
2331run-time code blocks, from an eval) rather than from an C<re_eval>:
2332
2333 use re 'eval'; $c = '(?{ warn "foo" })'; /$c/;
2334 /(?{ warn "foo" })/;
2335
2336formerly gave:
2337
2338 foo at (re_eval 1) line 1.
2339 foo at (re_eval 2) line 1.
2340
2341and now gives:
2342
2343 foo at (eval 1) line 1.
2344 foo at /some/prog line 2.
2345
2346=back
2347
2348=item *
2349
2350Perl now works as well as can be expected on all releases of Unicode so
2351far. In v5.16, it worked on Unicodes 6.0 and 6.1, but there were
2352various bugs for earlier releases; the older the release the more
2353problems.
2354
2355=item *
2356
2357C<vec> no longer produces "uninitialized" warnings in lvalue context
2358[perl #9423].
2359
2360=item *
2361
2362An optimization involving fixed strings in regular expressions could cause
2363a severe performance penalty in edge cases. This has been fixed
2364[perl #76546].
2365
2366=item *
2367
2368In certain cases, including empty subpatterns within a regular expression (such
2369as C<(?:)> or C<(?:|)>) could disable some optimizations. This has been fixed.
2370
2371=item *
2372
2373The "Can't find an opnumber" message that C<prototype> produces when passed
2374a string like "CORE::nonexistent_keyword" now passes UTF-8 and embedded
2375NULs through unchanged [perl #97478].
2376
2377=item *
2378
2379C<prototype> now treats magical variables like C<$1> the same way as
2380non-magical variables when checking for the CORE:: prefix, instead of
2381treating them as subroutine names.
2382
2383=item *
2384
2385Under threaded perls, a runtime code block in a regular expression could
2386corrupt the package name stored in the op tree, resulting in bad reads
2387in C<caller>, and possibly crashes [perl #113060].
2388
2389=item *
2390
2391Referencing a closure prototype (C<\&{$_[1]}> in an attribute handler for a
2392closure) no longer results in a copy of the subroutine (or assertion
2393failures on debugging builds).
2394
2395=item *
2396
2397C<eval '__PACKAGE__'> now returns the right answer on threaded builds if
2398the current package has been assigned over (as in
2399C<*ThisPackage:: = *ThatPackage::>) [perl #78742].
2400
2401=item *
2402
2403If a package is deleted by code that it calls, it is possible for C<caller>
2404to see a stack frame belonging to that deleted package. C<caller> could
2405crash if the stash's memory address was reused for a scalar and a
2406substitution was performed on the same scalar [perl #113486].
2407
2408=item *
2409
2410C<UNIVERSAL::can> no longer treats its first argument differently
2411depending on whether it is a string or number internally.
2412
2413=item *
2414
2415C<open> with C<< <& >> for the mode checks to see whether the third argument is
2416a number, in determining whether to treat it as a file descriptor or a handle
2417name. Magical variables like C<$1> were always failing the numeric check and
2418being treated as handle names.
2419
2420=item *
2421
2422C<warn>'s handling of magical variables (C<$1>, ties) has undergone several
2423fixes. C<FETCH> is only called once now on a tied argument or a tied C<$@>
2424[perl #97480]. Tied variables returning objects that stringify as "" are
2425no longer ignored. A tied C<$@> that happened to return a reference the
2426I<previous> time it was used is no longer ignored.
2427
2428=item *
2429
2430C<warn ""> now treats C<$@> with a number in it the same way, regardless of
2431whether it happened via C<$@=3> or C<$@="3">. It used to ignore the
2432former. Now it appends "\t...caught", as it has always done with
2433C<$@="3">.
2434
2435=item *
2436
2437Numeric operators on magical variables (e.g., S<C<$1 + 1>>) used to use
2438floating point operations even where integer operations were more appropriate,
2439resulting in loss of accuracy on 64-bit platforms [perl #109542].
2440
2441=item *
2442
2443Unary negation no longer treats a string as a number if the string happened
2444to be used as a number at some point. So, if C<$x> contains the string "dogs",
2445C<-$x> returns "-dogs" even if C<$y=0+$x> has happened at some point.
2446
2447=item *
2448
2449In Perl 5.14, C<-'-10'> was fixed to return "10", not "+10". But magical
2450variables (C<$1>, ties) were not fixed till now [perl #57706].
2451
2452=item *
2453
2454Unary negation now treats strings consistently, regardless of the internal
2455C<UTF8> flag.
2456
2457=item *
2458
2459A regression introduced in Perl v5.16.0 involving
2460C<tr/I<SEARCHLIST>/I<REPLACEMENTLIST>/> has been fixed. Only the first
2461instance is supposed to be meaningful if a character appears more than
2462once in C<I<SEARCHLIST>>. Under some circumstances, the final instance
2463was overriding all earlier ones. [perl #113584]
2464
2465=item *
2466
2467Regular expressions like C<qr/\87/> previously silently inserted a NUL
2468character, thus matching as if it had been written C<qr/\00087/>. Now it
2469matches as if it had been written as C<qr/87/>, with a message that the
2470sequence C<"\8"> is unrecognized.
2471
2472=item *
2473
2474C<__SUB__> now works in special blocks (C<BEGIN>, C<END>, etc.).
2475
2476=item *
2477
2478Thread creation on Windows could theoretically result in a crash if done
2479inside a C<BEGIN> block. It still does not work properly, but it no longer
2480crashes [perl #111610].
2481
2482=item *
2483
2484C<\&{''}> (with the empty string) now autovivifies a stub like any other
2485sub name, and no longer produces the "Unable to create sub" error
2486[perl #94476].
2487
37133b20
RS
2488=item *
2489
2490A regression introduced in v5.14.0 has been fixed, in which some calls
2491to the C<re> module would clobber C<$_> [perl #113750].
2492
2493=item *
2494
2495C<do FILE> now always either sets or clears C<$@>, even when the file can't be
2496read. This ensures that testing C<$@> first (as recommended by the
2497documentation) always returns the correct result.
2498
2499=item *
2500
2501The array iterator used for the C<each @array> construct is now correctly
2502reset when C<@array> is cleared (RT #75596). This happens for example when the
2503array is globally assigned to, as in C<@array = (...)>, but not when its
2504B<values> are assigned to. In terms of the XS API, it means that C<av_clear()>
2505will now reset the iterator.
2506
2507This mirrors the behaviour of the hash iterator when the hash is cleared.
2508
2509=item *
2510
2511C<< $class->can >>, C<< $class->isa >>, and C<< $class->DOES >> now return
2512correct results, regardless of whether that package referred to by C<$class>
2513exists [perl #47113].
2514
2515=item *
2516
2517Arriving signals no longer clear C<$@> [perl #45173].
2518
2519=item *
2520
2521Allow C<my ()> declarations with an empty variable list [perl #113554].
2522
2523=item *
2524
2525During parsing, subs declared after errors no longer leave stubs
2526[perl #113712].
2527
2528=item *
2529
2530Closures containing no string evals no longer hang on to their containing
2531subroutines, allowing variables closed over by outer subroutines to be
2532freed when the outer sub is freed, even if the inner sub still exists
2533[perl #89544].
2534
2535=item *
2536
2537Duplication of in-memory filehandles by opening with a "<&=" or ">&=" mode
2538stopped working properly in 5.16.0. It was causing the new handle to
2539reference a different scalar variable. This has been fixed [perl #113764].
2540
2541=item *
2542
2543C<qr//> expressions no longer crash with custom regular expression engines
2544that do not set C<offs> at regular expression compilation time
2545[perl #112962].
2546
2547=item *
2548
2549C<delete local> no longer crashes with certain magical arrays and hashes
2550[perl #112966].
2551
2552=item *
2553
2554C<local> on elements of certain magical arrays and hashes used not to
2555arrange to have the element deleted on scope exit, even if the element did
2556not exist before C<local>.
2557
2558=item *
2559
2560C<scalar(write)> no longer returns multiple items [perl #73690].
2561
2562=item *
2563
2564String to floating point conversions no longer misparse certain strings under
2565C<use locale> [perl #109318].
2566
2567=item *
2568
2569C<@INC> filters that die no longer leak memory [perl #92252].
2570
2571=item *
2572
2573The implementations of overloaded operations are now called in the correct
2574context. This allows, among other things, being able to properly override
2575C<< <> >> [perl #47119].
2576
2577=item *
2578
2579Specifying only the C<fallback> key when calling C<use overload> now behaves
2580properly [perl #113010].
2581
2582=item *
2583
2584C<< sub foo { my $a = 0; while ($a) { ... } } >> and
2585C<< sub foo { while (0) { ... } } >> now return the same thing [perl #73618].
2586
2587=item *
2588
2589Fixed the debugger C<l> and C<M> commands, and other debugger
2590functionality which was broken in 5.17.0 [perl #113918].
2591
2592=item *
2593
2594String negation now behaves the same under C<use integer;> as it does
2595without [perl #113012].
2596
2597=item *
2598
2599C<chr> now returns the Unicode replacement character (U+FFFD) for -1,
2600regardless of the internal representation. -1 used to wrap if the argument
2601was tied or a string internally.
2602
2603=item *
2604
2605Using a C<format> after its enclosing sub was freed could crash as of
2606perl 5.12.0, if the format referenced lexical variables from the outer sub.
2607
2608=item *
2609
2610Using a C<format> after its enclosing sub was undefined could crash as of
2611perl 5.10.0, if the format referenced lexical variables from the outer sub.
2612
2613=item *
2614
2615Using a C<format> defined inside a closures, which format references
2616lexical variables from outside, never really worked unless the C<write>
2617call was directly inside the closure. In 5.10.0 it even started crashing.
2618Now the copy of that closure nearest the top of the call stack is used to
2619find those variables.
2620
2621=item *
2622
2623Formats that close over variables in special blocks no longer crash if a
2624stub exists with the same name as the special block before the special
2625block is compiled.
2626
2627=item *
2628
2629The parser no longer gets confused, treating C<eval foo ()> as a syntax
2630error if preceded by C<print;> [perl #16249].
2631
2632=item *
2633
2634The return value of C<syscall> is no longer truncated on 64-bit platforms
2635[perl #113980].
2636
2637=item *
2638
2639Constant folding no longer causes C<print 1 ? FOO : BAR> to print to the
2640FOO handle [perl #78064].
2641
2642=item *
2643
2644C<do subname> now calls the named subroutine and uses the file name it
2645returns, instead of opening a file named "subname".
2646
2647=item *
2648
2649Subroutines looked up by rv2cv check hooks (registered by XS modules) are
2650now taken into consideration when determining whether C<foo bar> should be
2651the sub call C<foo(bar)> or the method call C<< "bar"->foo >>.
2652
2653=item *
2654
2655C<CORE::foo::bar> is no longer treated specially, allowing global overrides
2656to be called directly via C<CORE::GLOBAL::uc(...)> [perl #113016].
2657
2658=item *
2659
2660Calling an undefined sub whose typeglob has been undefined now produces the
2661customary "Undefined subroutine called" error, instead of "Not a CODE
2662reference".
2663
2664=item *
2665
2666Two bugs involving @ISA have been fixed. C<*ISA = *glob_without_array> and
2667C<undef *ISA; @{*ISA}> would prevent future modifications to @ISA from
2668updating the internal caches used to look up methods. The
2669*glob_without_array case was a regression from Perl 5.12.
2670
2671=item *
2672
2673Regular expression optimisations sometimes caused C<$> with C</m> to
2674produce failed or incorrect matches [perl #114068].
2675
2676=item *
2677
2678C<__SUB__> now works in a C<sort> block when the enclosing subroutine is
2679predeclared with C<sub foo;> syntax [perl #113710].
2680
2681=item *
2682
2683Unicode properties only apply to Unicode code points, which leads to
2684some subtleties when regular expressions are matched against
2685above-Unicode code points. There is a warning generated to draw your
2686attention to this. However, this warning was being generated
2687inappropriately in some cases, such as when a program was being parsed.
2688Non-Unicode matches such as C<\w> and C<[:word;]> should not generate the
2689warning, as their definitions don't limit them to apply to only Unicode
2690code points. Now the message is only generated when matching against
2691C<\p{}> and C<\P{}>. There remains a bug, [perl #114148], for the very
2692few properties in Unicode that match just a single code point. The
2693warning is not generated if they are matched against an above-Unicode
2694code point.
2695
7e7c78a1
RS
2696=item *
2697
2698Uninitialized warnings mentioning hash elements would only mention the
2699element name if it was not in the first bucket of the hash, due to an
2700off-by-one error.
2701
2702=item *
2703
2704A regular expression optimizer bug could cause multiline "^" to behave
2705incorrectly in the presence of line breaks, such that
2706C<"/\n\n" =~ m#\A(?:^/$)#im> would not match [perl #115242].
2707
2708=item *
2709
2710Failed C<fork> in list context no longer currupts the stack.
2711C<@a = (1, 2, fork, 3)> used to gobble up the 2 and assign C<(1, undef, 3)>
2712if the C<fork> call failed.
2713
2714=item *
2715
2716Numerous memory leaks have been fixed, mostly involving tied variables that
2717die, regular expression character classes and code blocks, and syntax
2718errors.
2719
2720=item *
2721
2722Assigning a regular expression (C<${qr//}>) to a variable that happens to
2723hold a floating point number no longer causes assertion failures on
2724debugging builds.
2725
2726=item *
2727
2728Assigning a regular expression to a scalar containing a number no longer
2729causes subsequent nummification to produce random numbers.
2730
2731=item *
2732
2733Assigning a regular expression to a magic variable no longer wipes away the
2734magic. This is a regression from 5.10.
2735
2736=item *
2737
2738Assigning a regular expression to a blessed scalar no longer results in
2739crashes. This is also a regression from 5.10.
2740
2741=item *
2742
2743Regular expression can now be assigned to tied hash and array elements with
2744flattening into strings.
2745
2746=item *
2747
2748Nummifying a regular expression no longer results in an uninitialized
2749warning.
2750
2751=item *
2752
2753Negative array indices no longer cause EXISTS methods of tied variables to
2754be ignored. This is a regression from 5.12.
2755
2756=item *
2757
2758Negative array indices no longer result in crashes on arrays tied to
2759non-objects.
2760
2761=item *
2762
2763C<$x = "(?{})"; /a++(?{})+$x/x> no longer erroneous produces an error (just
2764a warning, as expected). This was broken in 5.17.1.
2765
2766=item *
2767
2768C<$byte_overload .= $utf8> no longer results in doubly-encoded UTF8 if the
2769left-hand scalar happened to have produced a UTF8 string the last time
2770overloading was invoked.
2771
2772=item *
2773
2774C<goto &sub> now uses the current value of @_, instead of using the array
2775the subroutine was originally called with. This means
2776C<local @_ = (...); goto &sub> now works [perl #43077].
2777
2778=item *
2779
2780If a debugger is invoked recursively, it no longer stomps on its own
2781lexical variables. Formerly under recursion all calls would share the same
2782set of lexical variables [perl #115742].
2783
2784=item *
2785
2786C<*_{ARRAY}> returned from a subroutine no longer spontaneously
2787becomes empty.
2788
e5ba1bf1
FC
2789=back
2790
0bba4573 2791=head1 Known Problems
e5ba1bf1 2792
0bba4573
RS
2793XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
2794tests that had to be C<TODO>ed for the release would be noted here. Unfixed
2795platform specific bugs also go here.
2796
2797[ List each fix as a =item entry ]
2798
2799=over 4
2800
2801=item *
2802
2803XXX
2804
2805=back
e5ba1bf1
FC
2806
2807=head1 Acknowledgements
2808
2809XXX Generate this with:
2810
de3d8d88 2811 perl Porting/acknowledgements.pl v5.17.12..HEAD
e5ba1bf1
FC
2812
2813=head1 Reporting Bugs
2814
2815If you find what you think is a bug, you might check the articles recently
2816posted to the comp.lang.perl.misc newsgroup and the perl bug database at
2817http://rt.perl.org/perlbug/ . There may also be information at
2818http://www.perl.org/ , the Perl Home Page.
2819
2820If you believe you have an unreported bug, please run the L<perlbug> program
2821included with your release. Be sure to trim your bug down to a tiny but
2822sufficient test case. Your bug report, along with the output of C<perl -V>,
2823will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
2824
2825If the bug you are reporting has security implications, which make it
2826inappropriate to send to a publicly archived mailing list, then please send it
2827to perl5-security-report@perl.org. This points to a closed subscription
2828unarchived mailing list, which includes all the core committers, who will be
2829able to help assess the impact of issues, figure out a resolution, and help
2830co-ordinate the release of patches to mitigate or fix the problem across all
2831platforms on which Perl is supported. Please only use this address for
2832security issues in the Perl core, not for modules independently distributed on
2833CPAN.
2834
2835=head1 SEE ALSO
2836
2837The F<Changes> file for an explanation of how to view exhaustive details on
2838what changed.
2839
2840The F<INSTALL> file for how to build Perl.
2841
2842The F<README> file for general stuff.
2843
2844The F<Artistic> and F<Copying> files for copyright information.
2845
2846=cut