This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: update updated modules
[perl5.git] / pod / perldelta.pod
index 4f6d2c5..483b25b 100644 (file)
@@ -2,9 +2,6 @@
 
 =head1 NAME
 
-[ this is a template for a new perldelta file.  Any text flagged as XXX needs
-to be processed before release. ]
-
 perldelta - what is new for perl v5.27.6
 
 =head1 DESCRIPTION
@@ -15,82 +12,79 @@ release.
 If you are upgrading from an earlier release such as 5.27.4, first read
 L<perl5275delta>, which describes differences between 5.27.4 and 5.27.5.
 
-=head1 Notice
-
-XXX Any important notices here
-
 =head1 Core Enhancements
 
-XXX New core language features go here.  Summarize user-visible core language
-enhancements.  Particularly prominent performance optimisations could go
-here, but most should go in the L</Performance Enhancements> section.
-
-[ List each enhancement as a =head2 entry ]
-
 =head2 Initialisation of aggregate state variables
 
 A persistent lexical array or hash variable can now be initialized,
 by an expression such as C<state @a = qw(x y z)>.  Initialization of a
 list of persistent lexical variables is still not possible.
 
-=head1 Security
+=head2 Full-size inode numbers
 
-XXX Any security-related notices go here.  In particular, any security
-vulnerabilities closed should be noted here rather than in the
-L</Selected Bug Fixes> section.
-
-[ List each security issue as a =head2 entry ]
+On platforms where inode numbers are of a type larger than perl's native
+integer numerical types, L<stat|perlfunc/stat> will preserve the full
+content of large inode numbers by returning them in the form of strings of
+decimal digits.  Exact comparison of inode numbers can thus be achieved by
+comparing with C<eq> rather than C<==>.  Comparison with C<==>, and other
+numerical operations (which are usually meaningless on inode numbers),
+work as well as they did before, which is to say they fall back to
+floating point, and ultimately operate on a fairly useless rounded inode
+number if the real inode number is too big for the floating point format.
 
 =head1 Incompatible Changes
 
-XXX For a release on a stable branch, this section aspires to be:
-
-    There are no changes intentionally incompatible with 5.XXX.XXX
-    If any exist, they are bugs, and we request that you submit a
-    report.  See L</Reporting Bugs> below.
+=head2 Yada-yada is now strictly a statement
 
-[ List each incompatible change as a =head2 entry ]
+By the time of its initial stable release in Perl 5.12, the C<...>
+(yada-yada) operator was explicitly intended to serve as a statement,
+not an expression.  However, the original implementation was confused
+on this point, leading to inconsistent parsing.  The operator was
+accidentally accepted in a few situations where it did not serve as a
+complete statement, such as
 
-=head1 Deprecations
+    ... . "foo";
+    ... if $a < $b;
 
-XXX Any deprecated features, syntax, modules etc. should be listed here.
+The parsing has now been made consistent, permitting yada-yada only as
+a statement.  Affected code can use C<do{...}> to put a yada-yada into
+an arbitrary expression context.
 
-=head2 Module removals
+=head2 Subroutines no longer need typeglobs
 
-XXX Remove this section if inapplicable.
+Perl 5.22.0 introduced an optimization allowing subroutines to be stored in
+packages as simple sub refs, not requiring a full typeglob (thus
+potentially saving large amounts of memeory).  However, the optimization
+was flawed: it only applied to the main package.
 
-The following modules will be removed from the core distribution in a
-future release, and will at that time need to be installed from CPAN.
-Distributions on CPAN which require these modules will need to list them as
-prerequisites.
+This optimization has now been extended to all packages.  This may break
+compatibility with introspection code that looks inside stashes and expects
+everything in them to be a typeglob.
 
-The core versions of these modules will now issue C<"deprecated">-category
-warnings to alert you to this fact.  To silence these deprecation warnings,
-install the modules in question from CPAN.
+When this optimization happens, the typeglob still notionally exists, so
+accessing it will cause the stash entry to be upgraded to a typeglob.  The
+optimization does not apply to XSUBs or exported subroutines, and calling a
+method will undo it, since method calls cache things in typeglobs.
 
-Note that these are (with rare exceptions) fine modules that you are encouraged
-to continue to use.  Their disinclusion from core primarily hinges on their
-necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
-not usually on concerns over their design.
+(This change actually happened in perl 5.27.5 but was omitted from its perldelta.)
 
-=over
+[perl #129916] [perl #132252]
 
-=item XXX
+=head2 Sort algorithm can no longer be specified
 
-XXX Note that deprecated modules should be listed here even if they are listed
-as an updated module in the L</Modules and Pragmata> section.
-
-=back
-
-[ List each other deprecation as a =head2 entry ]
+Since Perl 5.8, the L<sort> pragma has had subpragmata C<_mergesort>,
+C<_quicksort>, and C<_qsort> that can be used to specify which algorithm
+perl should use to implement the L<sort|perlfunc/sort> builtin.
+This was always considered a dubious feature that might not last,
+hence the underscore spellings, and they were documented as not being
+portable beyond Perl 5.8.  These subpragmata have now been deleted,
+and any attempt to use them is an error.  The L<sort> pragma otherwise
+remains, and the algorithm-neutral C<stable> subpragma can be used to
+control sorting behaviour.
+[perl #119635]
 
 =head1 Performance Enhancements
 
-XXX Changes which enhance performance without changing behaviour go here.
-There may well be none in a stable release.
-
-[ List each enhancement as an =item entry ]
-
 =over 4
 
 =item *
@@ -103,7 +97,7 @@ whole expression is now handled as a single op:
 
     $s .= "a=$a b=$b\n"
 
-As a special case, if the LHS of an assign is a lexical variable or
+As a special case, if the LHS of an assignment is a lexical variable or
 C<my $s>, the op itself handles retrieving the lexical variable, which
 is faster.
 
@@ -127,37 +121,64 @@ In addition, C<sprintf> expressions which have a constant format
 containing only C<%s> and C<%%> format elements, and which have a fixed
 number of arguments, are now also optimised into a C<multiconcat> op.
 
+=item *
+
+Subroutines in packages no longer need to be stored in typeglobs, saving
+large amounts of memory.  See L</Subroutines no longer need typeglobs>
+under L</Incompatible Changes>, above.
+
 =back
 
 =head1 Modules and Pragmata
 
-XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
-go here.  If Module::CoreList is updated, generate an initial draft of the
-following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
-for important changes should then be added by hand.  In an ideal world,
-dual-life modules would have a F<Changes> file that could be cribbed.
+Key highlights in this release across several modules:
+
+=head2 Removal of use vars
+
+The usage of C<use vars> has been discouraged since the introduction of C<our> in
+Perl 5.6.0. Where possible the usage of this pragma has now been removed from
+the Perl source code.
 
-The list of new and updated modules is modified automatically as part of
-preparing a Perl release, so the only reason to manually add entries here is if
-you're summarising the important changes in the module update. (Also, if the
-manually-added details don't match the automatically-generated ones, the
-release manager will have to investigate the situation carefully.)
+This had a slight effect (for the better) on the output of WARNING_BITS in B::Deparse.
 
-[ Within each section, list entries as an =item entry ]
+=head2 Use of DynaLoader changed to XSLoader in many modules
 
-=head2 New Modules and Pragmata
+XSLoader is more modern, and most modules already require perl 5.6 or greater, so
+no functionality is lost by switching. In some cases, we have also made changes to
+the local implementation that may not be reflected in the version on CPAN due
+to a desire to maintain more backwards compatibility.
+
+=head2 Updated Modules and Pragmata
 
 =over 4
 
 =item *
 
-XXX
+L<Attribute::Handlers> has been upgraded from version 1.00 to 1.01.
 
-=back
+=item *
 
-=head2 Updated Modules and Pragmata
+L<attributes> has been upgraded from version 0.31 to 0.32.
 
-=over 4
+=item *
+
+L<B> has been upgraded from version 1.70 to 1.72.
+
+=item *
+
+L<B::Concise> has been upgraded from version 1.002 to 1.003.
+
+=item *
+
+L<B::Deparse> has been upgraded from version 1.43 to 1.45.
+
+=item *
+
+L<base> has been upgraded from version 2.26 to 2.27.
+
+=item *
+
+L<blib> has been upgraded from version 1.06 to 1.07.
 
 =item *
 
@@ -168,33 +189,216 @@ longer throws a "Not a GLOB reference" error.
 
 =item *
 
+L<Compress::Raw::Zlib> has been upgraded from version 2.074 to 2.075.
+
+This addresses a security vulnerability in older versions of the 'zlib' library
+(which is bundled with Compress-Raw-Zlib).
+
+=item *
+
+L<Config::Extensions> has been upgraded from version 0.01 to 0.02.
+
+=item *
+
+L<Devel::PPPort> has moved from cpan-first to perl-first maintenance
+
+Primary responsibility for the code in Devel::PPPort has moved into core perl.
+In a practical sense there should be no change except that hopefully it will
+stay more up to date with changes made to symbols in perl, rather than needing
+to be updated after the fact.
+
+=item *
+
+L<DynaLoader> has been upgraded from version 1.42 to 1.44.
+
+=item *
+
+L<experimental> has been upgraded from version 0.016 to 0.017.
+
+=item *
+
+L<ExtUtils::CBuilder> has been upgraded from version 0.280228 to 0.280229.
+
+=item *
+
+L<ExtUtils::Embed> has been upgraded from version 1.34 to 1.35.
+
+=item *
+
+L<ExtUtils::Miniperl> has been upgraded from version 1.06 to 1.07.
+
+=item *
+
+L<ExtUtils::ParseXS> has been upgraded from version 3.35 to 3.36.
+
+=item *
+
+L<ExtUtils::Typemaps> has been upgraded from version 3.35 to 3.36.
+
+=item *
+
+L<ExtUtils::XSSymSet> has been upgraded from version 1.3 to 1.4.
+
+=item *
+
+L<fields> has been upgraded from version 2.23 to 2.24.
+
+=item *
+
 L<File::Copy> has been upgraded from version 2.32 to 2.33.  It will now use
-Time::HiRes utime where available (RT #132401).
+Time::HiRes utime where available (perl #132401).
 
-=back
+=item *
 
-=head2 Removed Modules and Pragmata
+L<File::Spec> has been upgraded from version 3.68 to 3.70.
 
-=over 4
+=item *
+
+L<File::stat> has been upgraded from version 1.07 to 1.08.
 
 =item *
 
-XXX
+L<FileCache> has been upgraded from version 1.09 to 1.10.
 
-=back
+=item *
 
-=head1 Documentation
+L<Filter::Simple> has been upgraded from version 0.94 to 0.95.
+
+=item *
+
+L<Hash::Util::FieldHash> has been upgraded from version 1.19 to 1.20.
+
+=item *
+
+L<I18N::Langinfo> has been upgraded from version 0.14 to 0.15.
+
+=item *
+
+L<I18N::LangTags> has been upgraded from version 0.42 to 0.43.
+
+=item *
 
-XXX Changes to files in F<pod/> go here.  Consider grouping entries by
-file and be sure to link to the appropriate page, e.g. L<perlfunc>.
+The libnet distribution has been upgraded from version 3.10 to 3.11.
 
-=head2 New Documentation
+=item *
+
+L<Locale::Maketext> has been upgraded from version 1.28 to 1.29.
 
-XXX Changes which create B<new> files in F<pod/> go here.
+=item *
 
-=head3 L<XXX>
+L<Module::CoreList> has been upgraded from version 5.20171020 to 5.20171120.
 
-XXX Description of the purpose of the new file here
+=item *
+
+L<Net::Ping> has been upgraded from version 2.55 to 2.62.
+
+=item *
+
+L<ODBM_File> has been upgraded from version 1.14 to 1.15.
+
+=item *
+
+L<Opcode> has been upgraded from version 1.40 to 1.41.
+
+=item *
+
+L<Pod::Html> has been upgraded from version 1.2202 to 1.2203.
+
+=item *
+
+L<POSIX> has been upgraded from version 1.78 to 1.80.
+
+=item *
+
+L<re> has been upgraded from version 0.35 to 0.36.
+
+=item *
+
+L<SelfLoader> has been upgraded from version 1.24 to 1.25.
+
+=item *
+
+L<Socket> has been upgraded from version 2.020_03 to 2.020_04.
+
+=item *
+
+L<sort> has been upgraded from version 2.03 to 2.04.
+
+=item *
+
+L<Storable> has been upgraded from version 2.64 to 2.65.
+
+=item *
+
+L<Test> has been upgraded from version 1.30 to 1.31.
+
+=item *
+
+L<Test::Simple> has been upgraded from version 1.302103 to 1.302111.
+
+=item *
+
+L<threads> has been upgraded from version 2.18 to 2.19.
+
+=item *
+
+L<Tie::Array> has been upgraded from version 1.06 to 1.07.
+
+=item *
+
+L<Tie::StdHandle> has been upgraded from version 4.4 to 4.5.
+
+=item *
+
+L<Time::gmtime> has been upgraded from version 1.03 to 1.04.
+
+=item *
+
+L<Time::HiRes> has been upgraded from version 1.9746 to 1.9747.
+
+=item *
+
+L<Time::localtime> has been upgraded from version 1.02 to 1.03.
+
+=item *
+
+L<Unicode::Collate> has been upgraded from version 1.19 to 1.23.
+
+=item *
+
+L<Unicode::Normalize> has been upgraded from version 1.25 to 1.26.
+
+=item *
+
+L<User::grent> has been upgraded from version 1.01 to 1.02.
+
+=item *
+
+L<User::pwent> has been upgraded from version 1.00 to 1.01.
+
+=item *
+
+L<VMS::DCLsym> has been upgraded from version 1.08 to 1.09.
+
+=item *
+
+L<VMS::Stdio> has been upgraded from version 2.42 to 2.44.
+
+=item *
+
+L<warnings> has been upgraded from version 1.37 to 1.38.
+
+=item *
+
+L<XS::Typemap> has been upgraded from version 0.15 to 0.16.
+
+=item *
+
+L<XSLoader> has been upgraded from version 0.27 to 0.28.
+
+=back
+
+=head1 Documentation
 
 =head2 Changes to Existing Documentation
 
@@ -202,13 +406,11 @@ We have attempted to update the documentation to reflect the changes
 listed in this document.  If you find any we have missed, send email
 to L<perlbug@perl.org|mailto:perlbug@perl.org>.
 
-XXX Changes which significantly change existing files in F<pod/> go here.
-However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
-section.
-
 Additionally, the following selected changes have been made:
 
-=head3 L<perldiag/Variable length lookbehind not implemented in regex m/%s/>
+=over 4
+
+=item * L<perldiag/Variable length lookbehind not implemented in regex m/%s/>
 
 This now gives more ideas as to workarounds to the issue that was
 introduced in Perl 5.18 (but not documented explicitly in its perldelta)
@@ -218,51 +420,59 @@ for the fact that some Unicode C</i> rules cause a few sequences such as
 
 to be considered variable length, and hence disallowed.
 
-=over 4
-
-=item *
+=item * "Use of state $_ is experimental" in L<perldiag>
 
-XXX Description of the change here
+This entry has been removed, as the experimental support of this construct was
+removed in perl 5.24.0.
 
-=back
+=item *
 
-=head1 Diagnostics
+The section on reference counting in L<perlguts> has been heavily revised,
+to describe references in the way a programmer needs to think about them
+rather than in terms of the physical data structures.
 
-The following additions or changes have been made to diagnostic output,
-including warnings and fatal error messages.  For the complete list of
-diagnostic messages, see L<perldiag>.
+=item *
 
-XXX New or changed warnings emitted by the core's C<C> code go here.  Also
-include any changes in L<perldiag> that reconcile it to the C<C> code.
+The section "Truth and Falsehood" in L<perlsyn> has been removed from
+that document, where it didn't belong, and merged into the existing
+paragraph on the same topic in L<perldata>.
 
-=head2 New Diagnostics
+=item *
 
-XXX Newly added diagnostic messages go under here, separated into New Errors
-and New Warnings
+The description of the C<x> operator in L<perlop> has been clarified.  [perl #132460]
 
-=head3 New Errors
+=item *
 
-=over 4
+L<perluniprops> has been updated to note that C<\p{Word}> now includes
+code points matching the C<\p{Join_Control}> property.  The change to
+the property was made in Perl 5.18, but not documented until now.  There
+are currently only two code points that match this property U+200C (ZERO
+WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER).
 
 =item *
 
-XXX L<message|perldiag/"message">
-
-=back
+The entry for C<$+> in perlvar has been expanded upon to describe handling of
+multiply-named capturing groups.
 
-=head3 New Warnings
+=item *
 
-=over 4
+L<perlop> has been updated to note that C<qw>'s whitespace rules differ from that of
+C<split>'s in that only ASCII whitespace is used.
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<POSIX> has been updated with some more cautions about using locale-specific
+functions in threaded applications.
 
 =back
 
-=head2 Changes to Existing Diagnostics
+=head1 Diagnostics
 
-XXX Changes (i.e. rewording) of diagnostic messages go here
+The following additions or changes have been made to diagnostic output,
+including warnings and fatal error messages.  For the complete list of
+diagnostic messages, see L<perldiag>.
+
+=head2 Changes to Existing Diagnostics
 
 =over 4
 
@@ -273,41 +483,31 @@ currently forbidden> has changed to C<Initialization of state variables
 in list currently forbidden>, because list-context initialization of
 single aggregate state variables is now permitted.
 
-=item *
-
-XXX Describe change here
-
 =back
 
 =head1 Utility Changes
 
-XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
-Most of these are built within the directory F<utils>.
-
-[ List utility changes as a =head2 entry for each utility and =item
-entries for each change
-Use L<XXX> with program names to get proper documentation linking. ]
-
-=head2 L<XXX>
+=head2 L<perlbug>
 
 =over 4
 
 =item *
 
-XXX
+C<--help> and C<--version> options have been added.
 
 =back
 
 =head1 Configuration and Compilation
 
-XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
-go here.  Any other changes to the Perl build process should be listed here.
-However, any platform-specific changes should be listed in the
-L</Platform Support> section, instead.
+=over 4
 
-[ List changes as an =item entry ].
+=item C89 requirement
 
-=over 4
+Perl has been documented as requiring a C89 compiler to build since October
+1998.  A variety of simplifications have now been made to Perl's internals to
+rely on the features specified by the C89 standard. We believe that this
+internal change hasn't altered the set of platforms that Perl builds on, but
+please report a bug if Perl now has new problems building on your platform.
 
 =item New probes
 
@@ -341,92 +541,39 @@ L</Platform Support> section, instead.
 
 =back
 
-=head1 Testing
-
-XXX Any significant changes to the testing of a freshly built perl should be
-listed here.  Changes which create B<new> files in F<t/> go here as do any
-large changes to the testing harness (e.g. when parallel testing was added).
-Changes to existing files in F<t/> aren't worth summarizing, although the bugs
-that they represent may be covered elsewhere.
-
-XXX If there were no significant test changes, say this:
-
-Tests were added and changed to reflect the other additions and changes
-in this release.
-
-XXX If instead there were significant changes, say this:
+=head1 Packaging
 
-Tests were added and changed to reflect the other additions and
-changes in this release.  Furthermore, these significant changes were
-made:
-
-[ List each test improvement as an =item entry ]
-
-=over 4
-
-=item *
-
-XXX
-
-=back
+For the past few years we have released perl using three different archive
+formats: bzip (C<.bz2>), LZMA2 (C<.xz>) and gzip (C<.gz>). Since xz compresses
+better and decompresses faster, and gzip is more compatible and uses less memory,
+we have dropped the C<.bz2> archive format with this release.
+(If this poses a problem, do let us know; see L</Reporting Bugs>, below.)
 
 =head1 Platform Support
 
-XXX Any changes to platform support should be listed in the sections below.
-
-[ Within the sections, list each platform as an =item entry with specific
-changes as paragraphs below it. ]
-
-=head2 New Platforms
-
-XXX List any platforms that this version of perl compiles on, that previous
-versions did not.  These will either be enabled by new files in the F<hints/>
-directories, or new subdirectories and F<README> files at the top level of the
-source tree.
-
-=over 4
-
-=item XXX-some-platform
-
-XXX
-
-=back
-
 =head2 Discontinued Platforms
 
-XXX List any platforms that this version of perl no longer compiles on.
-
 =over 4
 
-=item XXX-some-platform
+=item PowerUX / Power MAX OS
 
-XXX
+Compiler hints and other support for these apparently long-defunct platforms has been removed.
 
 =back
 
 =head2 Platform-Specific Notes
 
-XXX List any changes for specific platforms.  This could include configuration
-and compilation changes or changes in portability/compatibility.  However,
-changes within modules for platforms should generally be listed in the
-L</Modules and Pragmata> section.
-
 =over 4
 
-=item XXX-some-platform
+=item Windows
 
-XXX
+Visual C++ compiler version detection has been improved to work on non-English
+language systems.
 
 =back
 
 =head1 Internal Changes
 
-XXX Changes which affect the interface available to C<XS> code go here.  Other
-significant internal changes for future core maintainers should be noted as
-well.
-
-[ List each change as an =item entry ]
-
 =over 4
 
 =item *
@@ -452,14 +599,18 @@ would be (4,6,1). If the string contains characters such as C<\x80>, whose
 representation changes under utf8, two sets of strings plus lengths are
 precomputed and stored.
 
-=back
+=item *
 
-=head1 Selected Bug Fixes
+Direct access to L<C<PL_keyword_plugin>|perlapi/PL_keyword_plugin> is not
+safe in the presence of multithreading. A new
+L<C<wrap_keyword_plugin>|perlapi/wrap_keyword_plugin> function has been
+added to allow XS modules to safely define custom keywords even when
+loaded from a thread, analogous to L<C<PL_check>|perlapi/PL_check> /
+L<C<wrap_op_checker>|perlapi/wrap_op_checker>.
 
-XXX Important bug fixes in the core language are summarized here.  Bug fixes in
-files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
+=back
 
-[ List each fix as an =item entry ]
+=head1 Selected Bug Fixes
 
 =over 4
 
@@ -471,6 +622,18 @@ already fails.
 
 =item *
 
+C<stat()>, C<lstat()>, and file test operators now reliably set C<$!> when
+failing due to being applied to a closed or otherwise invalid file handle.
+
+=item *
+
+File test operators for Unix permission bits that don't exist on a
+particular platform, such as C<-k> (sticky bit) on Windows, now check that
+the file being tested exists before returning the blanket false result,
+and yield the appropriate errors if the argument doesn't refer to a file.
+
+=item *
+
 The in-place reverse optimisation now correctly strengthens weak
 references using the L<C<sv_rvunweaken()>|perlapi/sv_rvunweaken>
 API function.
@@ -486,21 +649,22 @@ operator.  [perl #132245]
 Fixed a leaked SV when parsing an empty C<\N{}> at compile-time.
 [perl #132245]
 
-=back
-
-=head1 Known Problems
+=item *
 
-XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
-tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
-platform specific bugs also go here.
+Calling C<do $path> on a directory or block device now yields a meaningful
+error code in C<$!>.  [perl #125774]
 
-[ List each fix as an =item entry ]
+=item *
 
-=over 4
+Regexp substitution using an overloaded replacement value that provides
+a tainted stringification now correctly taints the resulting string.
+[perl #115266]
 
 =item *
 
-XXX
+Lexical sub declarations in C<do> blocks such as C<do { my sub lex; 123 }>
+could corrupt the stack, erasing items already on the stack in the
+enclosing statement.  This has been fixed.  [perl #132442]
 
 =back
 
@@ -510,16 +674,11 @@ XXX
 
 =item *
 
-XXX Add anything here that we forgot to add, or were mistaken about, in
-the perldelta of a previous release.
+L</Subroutines no longer need typeglobs> under L</Incompatible Changes>, above,
+was made for perl 5.27.5 but was mistakenly omitted from its perldelta.
 
 =back
 
-=head1 Obituary
-
-XXX If any significant core contributor has died, we've added a short obituary
-here.
-
 =head1 Acknowledgements
 
 XXX Generate this with: