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