summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-03-05 18:56:52 -0500
committerRicardo Signes <rjbs@cpan.org>2012-03-06 10:48:41 -0500
commit021c503d6cc55488214079559fd6d1c554fbd7a9 (patch)
treeadbf1ff0b6140317fa07f5abbe4a459dc30d175c
parenta4574d2e9b4101abe8dea19b66290169f109eb00 (diff)
downloadperl-021c503d6cc55488214079559fd6d1c554fbd7a9.tar.gz
another bus ride worth of collected delta editing
-rw-r--r--Porting/perl5160delta.pod969
1 files changed, 423 insertions, 546 deletions
diff --git a/Porting/perl5160delta.pod b/Porting/perl5160delta.pod
index a022b338a6..71d86648ef 100644
--- a/Porting/perl5160delta.pod
+++ b/Porting/perl5160delta.pod
@@ -1,40 +1,5 @@
=encoding utf8
- XXX: This is here for my own reference while editing! -- rjbs, 2012-02-20
-
- =head1 Notice
- =head1 Core Enhancements
- =head1 Security
- =head1 Incompatible Changes
- =head1 Deprecations
- =head1 Performance Enhancements
- =head1 Modules and Pragmata
- =head2 New Modules and Pragmata
- =head2 Updated Modules and Pragmata
- =head2 Removed Modules and Pragmata
- =head1 Documentation
- =head2 New Documentation
- =head2 Changes to Existing Documentation
- =head1 Diagnostics
- =head2 New Diagnostics
- =head3 New Errors
- =head3 New Warnings
- =head2 Changes to Existing Diagnostics
- =head1 Utility Changes
- =head1 Configuration and Compilation
- =head1 Testing
- =head1 Platform Support
- =head2 New Platforms
- =head2 Discontinued Platforms
- =head2 Platform-Specific Notes
- =head1 Internal Changes
- =head1 Selected Bug Fixes
- =head1 Known Problems
- =head1 Obituary
- =head1 Acknowledgements
- =head1 Reporting Bugs
- =head1 SEE ALSO
-
=head1 NAME
perl5160delta - what is new for perl v5.16.0
@@ -87,19 +52,11 @@ feature set and can be turned on or off explicitly with C<use feature
=head2 C<__SUB__>
The new C<__SUB__> token, available under the C<current_sub> feature
-(see L<feature>) or C<use v5.15>, returns a reference to the current
+(see L<feature>) or C<use v5.16>, returns a reference to the current
subroutine, making it easier to write recursive closures.
=head2 New and Improved Built-ins
-=head3 Return value of C<eval>
-
-C<eval> returns C<undef> in scalar context or an empty list in list
-context when there is a run-time error. When C<eval> was passed a
-string in list context and a syntax error occurred, it used to return a
-list containing a single undefined element. Now it returns an empty
-list in list context for all errors [perl #80630].
-
=head3 More consistent C<eval>
The C<eval> operator sometimes treats a string argument as a sequence of
@@ -209,6 +166,11 @@ When C<\N{I<name>}> is encountered, the C<charnames> module is now
automatically loaded when needed as if the C<:full> and C<:short>
options had been specified. See L<charnames> for more information.
+=head3 C<\N{...}> can now have Unicode loose name matching
+
+This is described in the C<charnames> item in
+L</Updated Modules and Pragmata> below.
+
=head3 Unicode Symbol Names
Perl now has proper support for Unicode in symbol names. It used to be
@@ -289,15 +251,9 @@ but that is a mistake that will be fixed before 5.16.
New in Unicode 6.0, this is an improved C<Script> property. Details
are in L<perlunicode/Scripts>.
-=head2 Lvalue Subroutines
-
-XXX
-
=head2 XS Changes
-XXX
-
-=head2 Improved typemaps for Some Builtin Types
+=head3 Improved typemaps for Some Builtin Types
Most XS authors will be aware that there is a longstanding bug in the
OUTPUT typemap for T_AVREF (C<AV*>), T_HVREF (C<HV*>), T_CVREF (C<CV*>),
@@ -329,9 +285,30 @@ UTF-8. This can be safely done for a whole string by using one of the
functions C<is_utf8_string()>, C<is_utf8_string_loc()>, and
C<is_utf8_string_loclen()>.
+=head3 New Pad API
+
+Many new functions have been added to the API for manipulating lexical
+pads. See L<perlapi/Pad Data Structures> for more information.
+
=head2 Changes to Special Variables
-XXX
+=head3 C<$$> can be assigned to
+
+C<$$> was made read-only in Perl 5.8.0. But only sometimes: C<local $$>
+would make it writable again. Some CPAN modules were using C<local $$> or
+XS code to bypass the read-only check, so there is no reason to keep C<$$>
+read-only. (This change also allowed a bug to be fixed while maintaining
+backward compatibility.)
+
+=head3 C<$^X> converted to an absolute path on FreeBSD, OS X and Solaris
+
+C<$^X> is now converted to an absolute path on OS X, FreeBSD (without
+needing F</proc> mounted) and Solaris 10 and 11. This augments the
+previous approach of using F</proc> on Linux, FreeBSD and NetBSD
+(in all cases, where mounted).
+
+This makes relocatable perl installations more useful on these platforms.
+(See "Relocatable @INC" in F<INSTALL>)
=head2 Debugger Changes
@@ -376,7 +353,49 @@ exceptions.
=head2 Other Changes
-XXX
+=head3 Anonymous handles
+
+Automatically generated file handles are now named __ANONIO__ when the
+variable name cannot be determined, rather than $__ANONIO__.
+
+=head3 Autoloaded sort Subroutines
+
+Custom sort subroutines can now be autoloaded [perl #30661]:
+
+ sub AUTOLOAD { ... }
+ @sorted = sort foo @list; # uses AUTOLOAD
+
+=head3 C<continue> no longer requires the "switch" feature
+
+The C<continue> keyword has two meanings. It can introduce a C<continue>
+block after a loop, or it can exit the current C<when> block. Up till now,
+the latter meaning was only valid with the "switch" feature enabled, and
+was a syntax error otherwise. Since the main purpose of feature.pm is to
+avoid conflicts with user-defined subroutines, there is no reason for
+C<continue> to depend on it.
+
+=head3 The C<\$> prototype accepts any scalar lvalue
+
+The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
+argument. Previously they only accepted scalars beginning with C<$> and
+hash and array elements. This change makes them consistent with the way
+the built-in C<read> and C<recv> functions (among others) parse their
+arguments. This means that one can override the built-in functions with
+custom subroutines that parse their arguments the same way.
+
+=head3 DTrace probes for interpreter phase change
+
+The C<phase-change> probes will fire when the interpreter's phase
+changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
+the new phase name; C<arg1> is the old one. This is useful mostly
+for limiting your instrumentation to one or more of: compile time,
+run time, destruct time.
+
+=head3 C<__FILE__()> Syntax
+
+The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
+with an empty pair of parentheses after them. This makes them parse the
+same way as C<time>, C<fork> and other built-in functions.
=head1 Security
@@ -404,9 +423,7 @@ but not C<setregid()>, but no such systems are known of.
It is now deprecated to directly read the Unicode data base files.
These are stored in the F<lib/unicore> directory. Instead, you should
use the new functions in L<Unicode::UCD>. These provide a stable API,
-and give complete information. (This API is, however, subject to change
-somewhat during the 5.15 development cycle, as we gain experience and
-get feedback from using it.)
+and give complete information.
Perl may at some point in the future change or remove the files. The
file most likely for applications to have used is
@@ -416,9 +433,9 @@ get at its data instead.
=head1 Future Deprecations
This section serves as a notice of feature that are I<likely> to be
-L<deprecated|perlpolicy/deprecated> in the next release of perl
-(5.18.0). If your code depends on these features, you should contact
-the Perl 5 Porters via the L<mailing
+removed or L<deprecated|perlpolicy/deprecated> in the next release of
+perl (5.18.0). If your code depends on these features, you should
+contact the Perl 5 Porters via the L<mailing
list|http://lists.perl.org/list/perl5-porters.html> or L<perlbug> to
explain your use case and inform the deprecation process.
@@ -430,213 +447,99 @@ distribution, but will remain available on the CPAN.
=over
-=item CPANPLUS
-
-=item Filter::Simple
-
-=item PerlIO::mmap
-
-=item Pod::Parser, Pod::LaTeX
-
-=item SelfLoader
-
-=item Text::Soundex
-
-=item Thread.pm
-
-=back
-
-=head2 Platforms with no supporting programmers:
-
-=over
-
-=item BeOS
+=item *
-=item djgpp
+CPANPLUS
-=item dgux
+=item *
-=item EPOC
+Filter::Simple
-=item MPE/iX
+=item *
-=item Rhapsody
+PerlIO::mmap
-=item UTS
+=item *
-=item VM/ESA
+Pod::Parser, Pod::LaTeX
-=back
+=item *
-=head2 Other Future Deprecations
+SelfLoader
-=over
+=item *
-=item Swapping of $< and $>
+Text::Soundex
-https://rt.perl.org/rt3/Ticket/Display.html?id=96212
+=item *
-=item sfio, stdio
+Thread.pm
=back
- XXX THIS HUNK IS XXX
- XXX HERE TO REMIND RJBS XXX
- XXX JUST HOW FAR HE EDITED XXX
-
-=head2 Anonymous handles
-
-Automatically generated file handles are now named __ANONIO__ when the
-variable name cannot be determined, rather than $__ANONIO__.
-
-=head2 Last-accessed filehandle
-
-Perl has an internal variable that stores the last filehandle to be
-accessed. It is used by C<$.> and by C<tell> and C<eof> without
-arguments.
-
-It used to be possible to set this internal variable to a glob copy and
-then modify that glob copy to be something other than a glob, and still
-have the last-accessed filehandle associated with the variable after
-assigning a glob to it again:
-
- my $foo = *STDOUT; # $foo is a glob copy
- <$foo>; # $foo is now the last-accessed handle
- $foo = 3; # no longer a glob
- $foo = *STDERR; # still the last-accessed handle
-
-Now the C<$foo = 3> assignment unsets that internal variable, so there
-is no last-accessed filehandle, just as if C<< <$foo> >> had never
-happened.
-
-=head2 $^X converted to an absolute path on FreeBSD, OS X and Solaris
-
-C<$^X> is now converted to an absolute path on OS X, FreeBSD (without
-needing F</proc> mounted) and Solaris 10 and 11. This augments the
-previous approach of using F</proc> on Linux, FreeBSD and NetBSD
-(in all cases, where mounted).
-
-This makes relocatable perl installations more useful on these platforms.
-(See "Relocatable @INC" in F<INSTALL>)
-
-=head2 Support for Embedded Nulls
+=head2 Platforms with no supporting programmers:
-Some parts of Perl did not work correctly with nulls (C<chr 0>) embedded in
-strings. That meant that, for instance, C<< $m = "a\0b"; foo->$m >> would
-call the "a" method, instead of the actual method name contained in $m.
-These parts of perl have been fixed to support nulls:
+The platforms will probably have their special build support removed during the
+5.17.0 development series.
=over
=item *
-Method names
-
-=item *
-
-Typeglob names (including filehandle names)
-
-=item *
-
-Package names
+BeOS
=item *
-Autoloading
+djgpp
=item *
-Return value of C<ref()>
+dgux
=item *
-Package names returned by C<caller()>
+EPOC
=item *
-Filehandle warnings
+MPE/iX
=item *
-Typeglob elements (C<*foo{"THING\0stuff"}>)
+Rhapsody
=item *
-Signal names
+UTS
=item *
-Various warnings and error messages that mention variable names or values,
-methods, etc.
+VM/ESA
=back
-One side effect of these changes is that blessing into "\0" no longer
-causes C<ref()> to return false.
-
-=head2 Autoloaded sort Subroutines
-
-Custom sort subroutines can now be autoloaded [perl #30661]:
-
- sub AUTOLOAD { ... }
- @sorted = sort foo @list; # uses AUTOLOAD
-
-=head2 C<continue> no longer requires the "switch" feature
-
-The C<continue> keyword has two meanings. It can introduce a C<continue>
-block after a loop, or it can exit the current C<when> block. Up till now,
-the latter meaning was only valid with the "switch" feature enabled, and
-was a syntax error otherwise. Since the main purpose of feature.pm is to
-avoid conflicts with user-defined subroutines, there is no reason for
-C<continue> to depend on it.
-
-=head2 C<$$> can be assigned to
-
-C<$$> was made read-only in Perl 5.8.0. But only sometimes: C<local $$>
-would make it writable again. Some CPAN modules were using C<local $$> or
-XS code to bypass the read-only check, so there is no reason to keep C<$$>
-read-only. (This change also allowed a bug to be fixed while maintaining
-backward compatibility.)
-
-=head2 C<\N{...}> can now have Unicode loose name matching
-
-This is described in the C<charnames> item in
-L</Updated Modules and Pragmata> below.
-
-=head2 C<splice()> doesn't warn when truncating
+=head2 Other Future Deprecations
-You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
-worrying about warnings.
+=over
-=head2 The C<\$> prototype accepts any scalar lvalue
+=item *
-The C<\$> and C<\[$]> subroutine prototypes now accept any scalar lvalue
-argument. Previously they only accepted scalars beginning with C<$> and
-hash and array elements. This change makes them consistent with the way
-the built-in C<read> and C<recv> functions (among others) parse their
-arguments. This means that one can override the built-in functions with
-custom subroutines that parse their arguments the same way.
+Swapping of $< and $>
-=head2 DTrace probes for interpreter phase change
+https://rt.perl.org/rt3/Ticket/Display.html?id=96212
-The C<phase-change> probes will fire when the interpreter's phase
-changes, which tracks the C<${^GLOBAL_PHASE}> variable. C<arg0> is
-the new phase name; C<arg1> is the old one. This is useful mostly
-for limiting your instrumentation to one or more of: compile time,
-run time, destruct time.
+=item *
-=head2 New Pad API
+sfio, stdio
-Many new functions have been added to the API for manipulating lexical
-pads. See L<perlapi/Pad Data Structures> for more information.
+=back
-=head2 C<__FILE__()> Syntax
+=head1 Incompatible Changes
-The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
-with an empty pair of parentheses after them. This makes them parse the
-same way as C<time>, C<fork> and other built-in functions.
+=head2 Borland compiler
-=head1 Incompatible Changes
+All support for the Borland compiler has been dropped. The code had not
+worked for a long time anyway.
=head2 Certain deprecated Unicode properties are no longer supported by default
@@ -685,11 +588,6 @@ C<ExtUtils::ParseXS> (C<xsubpp>) will emit 'static' XSUBs by default.
C<ExtUtils::ParseXS>'s behaviour can be reconfigured from XS using the
C<EXPORT_XSUB_SYMBOLS> keyword, see L<perlxs> for details.
-=head2 Borland compiler
-
-All support for the Borland compiler has been dropped. The code had not
-worked for a long time anyway.
-
=head2 Weakening read-only references
Weakening read-only references is no longer permitted. It should never
@@ -824,14 +722,7 @@ The implementation of C<s///r> makes one fewer copy of the scalar's value.
=item *
-If a studied scalar is C<split> with a regex, the engine will now take
-advantage of the C<study> data.
-
-=item *
-
-C<study> now uses considerably less memory for shorter strings. Strings shorter
-than 65535 characters use roughly half the memory than previously, strings
-shorter than 255 characters use roughly one quarter of the memory.
+C<study> is now a no-op.
=item *
@@ -894,7 +785,8 @@ from CPAN instead.
=item *
-C<Devel::DProf> has been removed from the Perl core. Prior version was 20110228.00.
+C<Devel::DProf> has been removed from the Perl core. Prior version was
+20110228.00.
=item *
@@ -906,11 +798,6 @@ C<Shell> has been removed from the Perl core. Prior version was 0.72_01.
=head2 New Documentation
-=head3 L<perlootut>
-
-This a new OO tutorial. It focuses on basic OO concepts, and then recommends
-that readers choose an OO framework from CPAN.
-
=head3 L<perldtrace>
L<perldtrace> describes Perl's DTrace support, listing the provided probes
@@ -921,8 +808,28 @@ and gives examples of their use.
This document is intended to provide a list of experimental features in
Perl. It is still a work in progress.
+=head3 L<perlootut>
+
+This a new OO tutorial. It focuses on basic OO concepts, and then recommends
+that readers choose an OO framework from CPAN.
+
=head2 Changes to Existing Documentation
+=head3 L<perlapi>
+
+=over 4
+
+=item *
+
+The HV API has long accepted negative lengths to indicate that the key is
+in UTF8. Now this is documented.
+
+=item *
+
+The C<boolSV()> macro is now documented.
+
+=back
+
=head3 L<perlfunc>
=over 4
@@ -936,88 +843,83 @@ never documented anywhere. Now the perlfunc entry mentions it
=item *
+As an accident of history, C<open $fh, "<:", ...> applies the default
+layers for the platform (C<:raw> on Unix, C<:crlf> on Windows), ignoring
+whatever is declared by L<open.pm|open>. This seems such a useful feature
+it has been documented in L<perlfunc|perlfunc/open> and L<open>.
+
+=item *
+
The entry for C<split> has been rewritten. It is now far clearer than
before.
=back
-=head3 L<perlop> and L<perlsyn>
+=head3 L<perlguts>
=over 4
=item *
-Documentation of the smartmatch operator has been reworked and moved from
-perlsyn to perlop where it belongs.
+A new section, L<Autoloading with XSUBs|perlguts/Autoloading with XSUBs>,
+has been added, which explains the two APIs for accessing the name of the
+autoloaded sub.
=item *
-Documentation of the ellipsis statement (C<...>) has been reworked and
-moved from perlop to perlsyn.
+Some of the function descriptions in L<perlguts> were confusing, as it was
+not clear whether they referred to the function above or below the
+description. This has been clarified [perl #91790].
=back
-=head3 L<perlsec/Laundering and Detecting Tainted Data>
+=head3 L<perlobj>
=over 4
=item *
-The example function for checking for taintedness contained a subtle
-error. C<$@> needs to be localized to prevent its changing this
-global's value outside the function. The preferred method to check for
-this remains L<Scalar::Util/tainted>.
+This document has been rewritten from scratch, and its coverage of various OO
+concepts has been expanded.
=back
-=head3 L<perlfunc>, L<open>
+=head3 L<perlop>
=over 4
=item *
-As an accident of history, C<open $fh, "<:", ...> applies the default
-layers for the platform (C<:raw> on Unix, C<:crlf> on Windows), ignoring
-whatever is declared by L<open.pm|open>. This seems such a useful feature
-it has been documented in L<perlfunc|perlfunc/open> and L<open>.
-
-=back
-
-=head3 L<perlapi>
+Documentation of the smartmatch operator has been reworked and moved from
+perlsyn to perlop where it belongs.
-=over 4
+It has also been corrected for the case of C<undef> on the left-hand
+side. The list of different smart match behaviours had an item in the
+wrong place.
=item *
-The HV API has long accepted negative lengths to indicate that the key is
-in UTF8. Now this is documented.
+Documentation of the ellipsis statement (C<...>) has been reworked and
+moved from perlop to perlsyn.
=item *
-The C<boolSV()> macro is now documented.
-
-=back
-
-=head3 L<perlguts>
-
-=over 4
+The explanation of bitwise operators has been expanded to explain how they
+work on Unicode strings (5.14.1).
=item *
-A new section, L<Autoloading with XSUBs|perlguts/Autoloading with XSUBs>,
-has been added, which explains the two APIs for accessing the name of the
-autoloaded sub.
-
-=back
+The section on the triple-dot or yada-yada operator has been moved up, as
+it used to separate two closely related sections about the comma operator
+(5.14.1).
-=head3 L<perlobj>
+=item *
-=over 4
+More examples for C<m//g> have been added (5.14.1).
=item *
-This document has been rewritten from scratch, and its coverage of various OO
-concepts has been expanded.
+The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1).
=back
@@ -1032,15 +934,16 @@ documented under L<Key naming|perlpragma/Key naming>.
=back
-=head3 L<perlguts>
+=head3 L<perlsec/Laundering and Detecting Tainted Data>
-=over
+=over 4
=item *
-Some of the function descriptions in L<perlguts> were confusing, as it was
-not clear whether they referred to the function above or below the
-description. This has been clarified [perl #91790].
+The example function for checking for taintedness contained a subtle
+error. C<$@> needs to be localized to prevent its changing this
+global's value outside the function. The preferred method to check for
+this remains L<Scalar::Util/tainted>.
=back
@@ -1067,31 +970,6 @@ the case [perl #78074].
=back
-=head3 L<perlop>
-
-=over 4
-
-=item *
-
-The explanation of bitwise operators has been expanded to explain how they
-work on Unicode strings (5.14.1).
-
-=item *
-
-The section on the triple-dot or yada-yada operator has been moved up, as
-it used to separate two closely related sections about the comma operator
-(5.14.1).
-
-=item *
-
-More examples for C<m//g> have been added (5.14.1).
-
-=item *
-
-The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1).
-
-=back
-
=head3 L<perlpodstyle>
=over 4
@@ -1108,43 +986,43 @@ they have been edited.
=back
-=head3 L<perlsub>
+=head3 L<perlre>
=over
=item *
-The L<perlsub/"Lvalue subroutines"> section has been amended to reflect
-changes and bug fixes introduced in Perl 5.15.0.
-
-=item *
-
-The ($;) prototype syntax, which has existed for rather a long time, is now
-documented in L<perlsub>. It allows a unary function to have the same
-precedence as a list operator.
+The C<(*COMMIT)> directive is now listed in the right section
+(L<Verbs without an argument|perlre/Verbs without an argument>).
=back
-=head3 L<perlre>
+=head3 L<perlrun>
=over
=item *
-The C<(*COMMIT)> directive is now listed in the right section
-(L<Verbs without an argument|perlre/Verbs without an argument>).
+L<perlrun> has undergone a significant clean-up. Most notably, the
+B<-0x...> form of the B<-0> flag has been clarified, and the final section
+on environment variables has been corrected and expanded (5.14.1).
=back
-=head3 L<perlrun>
+=head3 L<perlsub>
=over
=item *
-L<perlrun> has undergone a significant clean-up. Most notably, the
-B<-0x...> form of the B<-0> flag has been clarified, and the final section
-on environment variables has been corrected and expanded (5.14.1).
+The L<perlsub/"Lvalue subroutines"> section has been amended to reflect
+the many changes present in 5.16.0.
+
+=item *
+
+The ($;) prototype syntax, which has existed for rather a long time, is now
+documented in L<perlsub>. It allows a unary function to have the same
+precedence as a list operator.
=back
@@ -1176,6 +1054,8 @@ cautions regarding changing the process ID.
=back
+=head3 Other Changes
+
=over 4
=item *
@@ -1190,12 +1070,6 @@ with weak references.
=item *
-The documentation for smart match in L<perlsyn> has been corrected for the
-case of C<undef> on the left-hand side. The list of different smart match
-behaviours had an item in the wrong place.
-
-=item *
-
Parts of L<perlapi> were clarified, and Perl equivalents of some C
functions have been added as an additional mode of exposition.
@@ -1215,8 +1089,8 @@ as well.
=head3 Development Deltas
-The old perldelta files for development cycles prior to 5.15 have been
-removed.
+The perldelta files for development releases are no longer packaged with
+perl. These can still be found in the perl source code repository.
=head1 Diagnostics
@@ -1291,7 +1165,6 @@ This warning, in the "overload" category, is produced when the overload
pragma is given an argument it doesn't recognize, presumably a mistyped
operator.
-
=item *
L<Useless assignment to a temporary|perldiag/"Useless assignment to a temporary">
@@ -1414,28 +1287,8 @@ to C<$SIG{__WARN__}> handlers, rather than the raw UTF8 bytes.
=back
-=over 4
-
-=item *
-
-XXX Describe change here
-
-=back
-
=head1 Utility Changes
-=head3 L<zipdetails>
-
-=over 4
-
-=item *
-
-L<zipdetails> displays information about the internal record structure
-of the zip file. It is not concerned with displaying any details of
-the compressed data stored in the zip file.
-
-=back
-
=head3 L<h2ph>
=over 4
@@ -1487,6 +1340,18 @@ entries in these cases, instead of simply failing to find the message.
=back
+=head3 L<zipdetails>
+
+=over 4
+
+=item *
+
+L<zipdetails> displays information about the internal record structure
+of the zip file. It is not concerned with displaying any details of
+the compressed data stored in the zip file.
+
+=back
+
=head1 Configuration and Compilation
=over 4
@@ -1603,11 +1468,6 @@ Remove sockadapt layer from the VMS build.
=item *
-A link-time error on VMS versions without C<symlink> support was
-introduced in 5.15.1, but has now been corrected.
-
-=item *
-
Explicit support for VMS versions prior to v7.0 and DEC C versions
prior to v6.0 has been removed.
@@ -1664,7 +1524,6 @@ F<regen/feature.pl> script, which also generates F<feature.h>.
Tied arrays are now always C<AvREAL>. If C<@_> or C<DB::args> is tied, it
is reified first, to make sure this is always the case.
-
=item *
The C<is_gv_magical_sv> function has been eliminated and merged with
@@ -1907,22 +1766,97 @@ fixed [perl #85026].
=back
+=head2 Support for Embedded Nulls
+
+Some parts of Perl did not work correctly with nulls (C<chr 0>) embedded in
+strings. That meant that, for instance, C<< $m = "a\0b"; foo->$m >> would
+call the "a" method, instead of the actual method name contained in $m.
+These parts of perl have been fixed to support nulls:
+
+=over
+
+=item *
+
+Method names
+
+=item *
+
+Typeglob names (including filehandle names)
+
+=item *
+
+Package names
+
+=item *
+
+Autoloading
+
+=item *
+
+Return value of C<ref()>
+
+=item *
+
+Package names returned by C<caller()>
+
+=item *
+
+Filehandle warnings
+
+=item *
+
+Typeglob elements (C<*foo{"THING\0stuff"}>)
+
+=item *
+
+Signal names
+
+=item *
+
+Various warnings and error messages that mention variable names or values,
+methods, etc.
+
+=back
+
+One side effect of these changes is that blessing into "\0" no longer
+causes C<ref()> to return false.
+
=head2 Other notable fixes
=over
-=item * "b . COND" in the debugger has been fixed
+=item *
-Breaking on the current line with C<b . COND> was broken by previous work and
-has now been fixed.
+Last-accessed filehandle
-=item * Tying C<%^H>
+Perl has an internal variable that stores the last filehandle to be
+accessed. It is used by C<$.> and by C<tell> and C<eof> without
+arguments.
-Tying C<%^H> no longer causes perl to crash or ignore
-the contents of C<%^H> when entering a compilation
-scope [perl #106282].
+It used to be possible to set this internal variable to a glob copy and
+then modify that glob copy to be something other than a glob, and still
+have the last-accessed filehandle associated with the variable after
+assigning a glob to it again:
-=item * C<~> on vstrings
+ my $foo = *STDOUT; # $foo is a glob copy
+ <$foo>; # $foo is now the last-accessed handle
+ $foo = 3; # no longer a glob
+ $foo = *STDERR; # still the last-accessed handle
+
+Now the C<$foo = 3> assignment unsets that internal variable, so there
+is no last-accessed filehandle, just as if C<< <$foo> >> had never
+happened.
+
+=item *
+
+Tying C<%^H>
+
+Tying C<%^H> no longer causes perl to crash or ignore the contents of
+C<%^H> when entering a compilation scope [perl #106282].
+
+=item *
+
+C<~> on vstrings
The bitwise complement operator (and possibly other operators, too) when
passed a vstring would leave vstring magic attached to the return value,
@@ -1932,7 +1866,9 @@ even though the string passed to C<< version->new >> was actually
"\376\375\374". This also caused L<B::Deparse> to deparse C<~v1.2.3>
incorrectly, without the C<~> [perl #29070].
-=item * Vstrings blowing away magic
+=item *
+
+Vstrings blowing away magic
Assigning a vstring to a magic (e.g., tied, C<$!>) variable and then
assigning something else used to blow away all the magic. This meant that
@@ -1940,12 +1876,16 @@ tied variables would come undone, C<$!> would stop getting updated on
failed system calls, C<$|> would stop setting autoflush, and other
mischief would take place. This has been fixed.
-=item * C<newHVhv> and tied hashes
+=item *
+
+C<newHVhv> and tied hashes
The C<newHVhv> XS function now works on tied hashes, instead of crashing or
returning an empty hash.
-=item * Hashes will null elements
+=item *
+
+Hashes will null elements
It is possible from XS code to create hashes with elements that have no
values. Perl itself sometimes creates such hashes, but they are rarely
@@ -1954,38 +1894,50 @@ when handling these in lvalue context. These have been fixed. They now
produce a "Modification of non-creatable hash value attempted" error
message.
-=item * No warning for C<open(foo::bar)>
+=item *
+
+No warning for C<open(foo::bar)>
When one writes C<open foo || die>, which used to work in Perl 4, a
"Precedence problem" warning is produced. This warning used erroneously to
apply to fully-qualified bareword handle names not followed by C<||>. This
has been corrected.
-=item * C<select> and package aliasing
+=item *
+
+C<select> and package aliasing
After package aliasing (C<*foo:: = *bar::>), C<select> with 0 or 1 argument
would sometimes return a name that could not be used to refer to the
filehandle, or sometimes it would return C<undef> even when a filehandle
was selected. Now it returns a typeglob reference in such cases.
-=item * C<PerlIO::get_layers> and tied variables
+=item *
+
+C<PerlIO::get_layers> and tied variables
C<PerlIO::get_layers> no longer ignores FETCH on tied variables as it used
to most of the time [perl #97956].
-=item * C<PerlIO::get_layers> and numbers
+=item *
+
+C<PerlIO::get_layers> and numbers
C<PerlIO::get_layers> no longer ignores some arguments that it thinks are
numeric, while treating others as filehandle names. It is now consistent
for flat scalars (i.e., not references).
-=item * Lvalue subs and strict mode
+=item *
+
+Lvalue subs and strict mode
Lvalue sub calls that are not determined to be such at compile time
(C<&$name> or &{"name"}) are no longer exempt from strict refs if they
occur in the last statement of an lvalue subroutine [perl #102486].
-=item * Non-lvalue sub calls in potentially lvalue context
+=item *
+
+Non-lvalue sub calls in potentially lvalue context
Sub calls whose subs are not visible at compile time, if
they occurred in the last statement of an lvalue subroutine,
@@ -1998,20 +1950,26 @@ subroutine, there would be no error when the lvalue sub was called in
lvalue context. Perl would blindly assign to the temporary value returned
by the non-lvalue subroutine.
-=item * AUTOLOADing lvalue subs
+=item *
+
+AUTOLOADing lvalue subs
C<AUTOLOAD> routines used to take precedence over the actual sub being
called (i.e., when autoloading wasn't needed), for sub calls in lvalue or
potential lvalue context, if the subroutine was not visible at compile
time.
-=item * C<caller> and tied C<@DB::args>
+=item *
+
+C<caller> and tied C<@DB::args>
C<caller> sets C<@DB::args> to the subroutine arguments when called from
the DB package. It used to crash when doing so if C<@DB::args> happened to
be tied. Now it croaks instead.
-=item * Tying C<@_>
+=item *
+
+Tying C<@_>
Under debugging builds, this code:
@@ -2024,7 +1982,9 @@ Under debugging builds, this code:
use to produce an "av_reify called on tied array" warning. It doesn't any
more.
-=item * Unrecognised switches on C<#!> line
+=item *
+
+Unrecognised switches on C<#!> line
If a switch, such as B<-x>, that cannot occur on the C<#!> line is used
there, perl dies with "Can't emulate...".
@@ -2034,18 +1994,24 @@ recognise at all, whether on the command line or the C<#!> line.
Now it produces the "Unrecognized switch" error message [perl #104288].
-=item * C<system> and SIGCHLD
+=item *
+
+C<system> and SIGCHLD
C<system> now temporarily blocks the SIGCHLD signal handler, to prevent the
signal handler from stealing the exit status [perl #105700].
-=item * Deleting methods via C<delete>
+=item *
+
+Deleting methods via C<delete>
Deletion of methods via C<delete $Class::{method}> syntax used to update
method caches if called in void context, but not scalar or list context.
Now it always updates those caches.
-=item * Hash element deletion and destructors
+=item *
+
+Hash element deletion and destructors
When hash elements are deleted in void context, the internal hash entry is
now freed before the value is freed, to prevent destructors called by that
@@ -2053,7 +2019,9 @@ latter freeing from seeing the hash in an inconsistent state. It was
possible to cause double-frees if the destructor freed the hash itself
[perl #100340].
-=item * C<(s)printf>'s %n formatting code
+=item *
+
+C<(s)printf>'s %n formatting code
The %n formatting code, which causes the number of characters to be
assigned to the next argument to C<printf> or C<sprintf> now actually
@@ -2062,20 +2030,26 @@ assigns the number of characters, instead of the number of bytes.
It also works now with special lvalue functions like C<substr> and with
nonexistent hash and array elements [perl #3471, #103492].
-=item * Typeglobs and threads
+=item *
+
+Typeglobs and threads
Typeglobs returned from threads are no longer cloned if the parent thread
already has a glob with the same name. This means that returned
subroutines will now assign to the right package variables [perl #107366].
-=item * C<local $_>
+=item *
+
+C<local $_>
In Perl 5.14, C<local $_> was changed to create a new variable not tied to
anything, even if $_ was tied before that. But, due to an oversight, it
would still call FETCH once on a tied $_ before replacing it with the new
variable. This has been fixed [perl #105912].
-=item * Returning tied variables
+=item *
+
+Returning tied variables
When returning a value from a non-lvalue subroutine, Perl copies the value.
Sometimes it cheats for the sake of speed, and does not copy the value if
@@ -2084,28 +2058,28 @@ allowing the copy to be skipped on tied variables, causing a difference in
behaviour depending on the tied variable's reference count. This has been
fixed [perl #95548].
-=item * C<{@a = sort}> no longer crashes
-
-This particular piece of code (C<sort> with no arguments assigned to an
-array, inside a block with no C<;>) started crashing in an earlier 5.15.x
-release. It has been fixed.
-
-=item * C<utf8::decode> and read-only scalars
+=item *
C<utf8::decode> now refuses to modify read-only scalars [perl #91850].
-=item * C<dbmopen> with undefined mode
+=item *
+
+C<dbmopen> with undefined mode
C<dbmopen> now only warns once, rather than three times, if the mode
argument is C<undef> [perl #90064].
-=item * Freeing an aggregate during list assignment
+=item *
+
+Freeing an aggregate during list assignment
If list assignment to a hash or array triggered destructors that freed the
hash or array itself, a crash would ensue. This is no longer the case
[perl #107440].
-=item * Confused internal bookkeeping with @ISA arrays
+=item *
+
+Confused internal bookkeeping with @ISA arrays
Creating a weak reference to an @ISA array or accessing the array index
(C<$#ISA>) could result in confused internal bookkeeping for elements
@@ -2114,43 +2088,57 @@ reference to the element itself could push that weak reference on to @ISA;
and elements added after use of C<$#ISA> would be ignored by method lookup
[perl #85670].
-=item * DELETE on scalar ties
+=item *
+
+DELETE on scalar ties
Tying an element of %ENV or C<%^H> and then deleting that element would
result in a call to the tie object's DELETE method, even though tying the
element itself is supposed to be equivalent to tying a scalar (the element
is, of course, a scalar) [perl #67490].
-=item * Freeing $_ inside C<grep> or C<map>
+=item *
+
+Freeing $_ inside C<grep> or C<map>
Freeing $_ inside a C<grep> or C<map> block or a code block embedded in a
regular expression used to result in double frees [perl #92254, #92256].
-=item * Warnings with C<+=>
+=item *
+
+Warnings with C<+=>
The C<+=> operator does not usually warn when the left-hand side is
C<undef>, but it was doing so for tied variables. This has been fixed
[perl #44895].
-=item * Tying and autovivification
+=item *
+
+Tying and autovivification
When Perl autovivifies an element of a tied array or hash (which entails
calling STORE with a new reference), it now calls FETCH immediately after
the STORE, instead of assuming that FETCH would have returned the same
reference. This can make it easier to implement tied objects [perl #35865, #43011].
-=item * C<@&> and C<$&>
+=item *
+
+C<@&> and C<$&>
Mentioning a variable named "&" other than C<$&> (i.e., C<@&> or C<%&>) no
longer stops C<$&> from working. The same applies to variables named "'"
and "`" [perl #24237].
-=item * Stacked filetests
+=item *
+
+Stacked filetests
C<-T> and C<-B> now work when stacked up with other filetest operators
[perl #77388].
-=item * Filetests and stat buffers
+=item *
+
+Filetests and stat buffers
Perl keeps several internal variables to keep track of the last stat
buffer, from which file(handle) it originated, what type it was, and
@@ -2207,41 +2195,40 @@ unreadable files.
These have all been fixed.
-=item * C<defined *{"!"}>
-
-An earlier 5.15.x release caused this construct to stop the C<%!> hash
-from working. Likewise C<defined *{"+"}> and C<defined *{"-"}> caused
-C<%+> and C<%->, respectively, to stop working. This has been fixed.
+=item *
-=item * C<-T _> with no preceding C<stat>
+C<-T _> with no preceding C<stat>
This used to produce a confusing "uninitialized" warning, even though there
is no visible uninitialized value to speak of.
-=item * C<stat I<HANDLE>> and fstat failures
+=item *
+
+C<stat I<HANDLE>> and fstat failures
If the operating system's C<fstat> function failed, C<stat> would warn
about an unopened handle, even though that was not the case. This has been
fixed.
-=item * C<lstat I<IOREF>>
+=item *
+
+C<lstat I<IOREF>>
C<lstat> is documented to fall back to C<stat> (with a warning) when given
a filehandle. When passed an IO reference, it was actually doing the
equivalent of S<C<stat _>> and ignoring the handle.
-=item * Crashes with warnings
-
-Two warning messages that mention variable names started crashing in
-5.15.5, but have been fixed [perl #106726, #107656].
+=item *
-=item * Bitwise assignment operators and copy-on-write
+Bitwise assignment operators and copy-on-write
In 5.14.0, the bitwise assignment operators C<|=>, C<^=> and C<&=> started
leaving the left-hand side undefined if it happened to be a copy-on-write
string. This has been fixed [perl #108480].
-=item * Three problematic Unicode characters now work better in regex pattern matching under C</i>
+=item *
+
+Three problematic Unicode characters now work better in regex pattern matching under C</i>
In the past, three Unicode characters:
LATIN SMALL LETTER SHARP S,
@@ -2263,7 +2250,6 @@ multi-character folds inside bracketed character classes, including such
constructs as C<qr/[\N{LATIN SMALL LETTER SHARP}a-z]/i>. These
remaining bugs are addressed in [perl #89774].
-
=item *
RT #78266: The regex engine has been leaking memory when accessing
@@ -2306,13 +2292,6 @@ when clobbered.)
=item *
-Redefinition warnings triggered by the creation of XSUBs now respect
-Unicode glob names, instead of using the internal representation. This
-was missed in 5.15.4, partly because this warning was so hard to
-trigger. (See the previous item.)
-
-=item *
-
C<newCONSTSUB> used to use compile-time warning hints, instead of
run-time hints. The following code should never produce a redefinition
warning, but it used to, if C<newCONSTSUB> redefined an existing
@@ -2384,9 +2363,13 @@ tied variable was anything other than a string or typeglob.
=item *
-The C<evalbytes> keyword added in 5.15.5 was respecting C<use utf8>
-declarations from the outer scope, when it should have been ignoring
-them.
+Return value of C<eval>
+
+C<eval> returns C<undef> in scalar context or an empty list in list
+context when there is a run-time error. When C<eval> was passed a
+string in list context and a syntax error occurred, it used to return a
+list containing a single undefined element. Now it returns an empty
+list in list context for all errors [perl #80630].
=item *
@@ -2434,39 +2417,6 @@ nonexistent shared string" warning.
=item *
-A change in perl 5.15.4 caused C<caller()> to produce malloc errors and
-a crash with Perl's own malloc, and possibly with other malloc
-implementations, too [perl #104034].
-
-=item *
-
-A bug fix in 5.15.5 could sometimes result in assertion failures under
-debugging builds of perl for certain syntax errors in C<eval>, such as
-C<eval q|""!=!~//|>
-
-=item *
-
-The "c [line num]" debugger command was broken by other debugger
-changes released in 5.15.3. This is now fixed.
-
-=item *
-
-Breakpoints were not properly restored after a debugger restart using
-the "R" command. This was broken in 5.15.3. This is now fixed.
-
-=item *
-
-The debugger prompt did not display the current line. This was broken
-in 5.15.3. This is now fixed.
-
-=item *
-
-Class method calls still suffered from the Unicode bug with Latin-1
-package names. This was missed in the Unicode package name cleanup in
-5.15.4 [perl #105922].
-
-=item *
-
The debugger no longer tries to do C<local $_> when dumping data
structures.
@@ -2503,11 +2453,6 @@ v5.43>, no longer cause locale settings to change [perl #105784].
=item *
-F<pod/buildtoc>, which generates L<perltoc>, put path names in the
-L<perltoc> file. This bug was introduced in 5.15.1.
-
-=item *
-
Perl now holds an extra reference count on the package that code is
currently compiling in. This means that the following code no longer crashes [perl #101486]:
@@ -2528,15 +2473,6 @@ repeat counts [perl #94560].
=item *
-A fix to C<glob> under miniperl (used to configure modules when perl itself
-is built) in Perl 5.15.3 stopped C<< <~> >> from returning the home
-directory, because it cleared %ENV before calling csh. Now C<$ENV{HOME}>
-is preserved. This fix probably does not affect anything. If
-L<File::Glob> fails to load for some reason, Perl reverts to using csh.
-So it would apply in that case.
-
-=item *
-
On OSes other than VMS, Perl's C<glob> operator (and the C<< <...> >> form)
use L<File::Glob> underneath. L<File::Glob> splits the pattern into words,
before feeding each word to its C<bsd_glob> function.
@@ -2580,15 +2516,6 @@ precedes a character in the string that should match the pattern. [perl
=item *
-C<@{"..."} = reverse ...> started crashing in 5.15.3. This has been fixed.
-
-=item *
-
-C<ref> in a tainted expression started producing an "sv_upgrade" error in
-5.15.4. This has been fixed.
-
-=item *
-
Weak references to lexical hashes going out of scope were not going stale
(becoming undefined), but continued to point to the hash.
@@ -2687,12 +2614,6 @@ C<undef> occurred after the first element) [perl #93590].
=item *
-Perl 5.15.0 introduced a minor regression, in that an object referenced by
-a deleted hash element would be able to access the freed element from its
-DESTROY method, causing panic errors [perl #99660].
-
-=item *
-
Functions in the CORE package can now be called as methods. That used to
work only when they had been called or referenced already. So
C<< "foo"->CORE::ucfirst >> returns Foo.
@@ -2720,12 +2641,6 @@ error at lib/utf8_heavy.pl..." error message, which it started emitting in
=item *
-A minor regression, introduced Perl 5.15.0, has been fixed in which some
-regular expression Unicode property matches (C<\p{...}>) matched
-non-Unicode code points.
-
-=item *
-
In case-insensitive regular expression pattern matching, no longer on
UTF-8 encoded strings does the scan for the start of match only look at
the first possible position. This caused matches such as
@@ -2829,7 +2744,7 @@ from when parsing a here document [perl #90128]. (5.14.1)
=item *
The C<study> function could become confused if fed a string longer than
-2**31 characters. Now it simply skips such strings.
+2**31 characters. Now that it's a no-op, it can't.
=item *
@@ -2851,14 +2766,9 @@ followed by a null character, but now it is [perl #88138].
=item *
-The abbreviations for four C1 control characters
-C<MW>
-C<PM>,
-C<RI>,
-and
-C<ST>
-were previously unrecognized by C<\N{}>,
-vianame(), and string_vianame().
+The abbreviations for four C1 control characters C<MW> C<PM>, C<RI>, and
+C<ST> were previously unrecognized by C<\N{}>, vianame(), and
+string_vianame().
=item *
@@ -2908,19 +2818,6 @@ in which it could happen where previously syntax errors.
=item *
-Explicitly returning a tied C<my> variable from an lvalue subroutine in
-list lvalue context used to clear the variable before the assignment could
-happen. This is something that was missed when explicit return was made to
-work in 5.15.0.
-
-=item *
-
-A minor memory leak, introduced in 5.15.0, has been fixed. It would occur
-when a hash is freed that has had its current iterator deleted
-[perl #93454].
-
-=item *
-
The C<prototype> function no longer dies for the C<__FILE__>, C<__LINE__>
and C<__PACKAGE__> directives. It now returns an empty-string prototype
for them, because they are syntactically very similar to nullary functions
@@ -3019,14 +2916,6 @@ not have this problem. This has been fixed.
=item *
-A minor regression introduced in 5.15.0 has been fixed. Dereferencing a
-magical mortal (e.g., the return value of C<delete> on a tied hash element)
-explicitly returned from a subroutine called recursively was not calling
-C<FETCH>. This would affect code like C<@{ foo() }> where the C<foo> sub
-contains C<return delete $hash{elem}> and is calling itself.
-
-=item *
-
A panic involving the combination of the regular expression modifiers
C</aa> and the C<\b> escape sequence introduced in 5.14.0 has been
fixed [perl #95964].
@@ -3093,11 +2982,6 @@ was triggering this bug [perl #97010].
=item *
-In Perl 5.15.0 C<defined(${'$'})> stopped returning true if the C<$$>
-variable had not been used yet. This has been fixed.
-
-=item *
-
C<defined(${"..."})>, C<defined(*{"..."})>, etc., used to
return true for most, but not all built-in variables, if
they had not been used yet. Many times that new built-in
@@ -3196,12 +3080,6 @@ to a typeglob.
=item *
-Perl 5.15.1 inadvertently stopped C<*foo =~ s/\*//r> from working, as it
-would try to force the *foo glob into a string. This has been fixed
-[perl #97954].
-
-=item *
-
If things were arranged in memory the right way, it was possible for
thread joining to emit "Attempt to free unreferenced scalar" warnings if
C<caller> had been used from the C<DB> package prior to thread creation,
@@ -3215,13 +3093,6 @@ C<defined &{"CORE::..."}> did not return true. That has been rectified
=item *
-Lvalue subroutines were made to autovivify in 5.15.0, but it did not work
-in some cases involving an intervening list operator between the
-dereference operator and the subroutine call (C<${(), lvsub()}>)
-[perl #98184].
-
-=item *
-
A bug has been fixed that occurs when a tied variable is used as a
subroutine reference: if the last thing assigned to or returned from the
variable was a reference or typeglob, the C<\&$tied> could either crash or
@@ -3297,6 +3168,13 @@ were turned on. With warnings off, it was the same as 5.6.
In other words, it was simply buggy and inconsistent. Now the 5.6
behaviour has been restored.
+=item *
+
+C<splice()> doesn't warn when truncating
+
+You can now limit the size of an array using C<splice(@a,MAX_LEN)> without
+worrying about warnings.
+
=back
=head1 Known Problems
@@ -3329,14 +3207,14 @@ here.
XXX Generate this with:
- perl Porting/acknowledgements.pl v5.15.8..HEAD
+ perl Porting/acknowledgements.pl v5.14.0..HEAD
=head1 Reporting Bugs
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
-bug database at http://rt.perl.org/perlbug/ . There may also be
-information at http://www.perl.org/ , the Perl Home Page.
+bug database at L<http://rt.perl.org/perlbug/>. There may also be
+information at L<http://www.perl.org/>, the Perl Home Page.
If you believe you have an unreported bug, please run the L<perlbug>
program included with your release. Be sure to trim your bug down
@@ -3345,15 +3223,14 @@ output of C<perl -V>, will be sent off to perlbug@perl.org to be
analysed by the Perl porting team.
If the bug you are reporting has security implications, which make it
-inappropriate to send to a publicly archived mailing list, then please send
-it to perl5-security-report@perl.org. This points to a closed subscription
-unarchived mailing list, which includes
-all the core committers, who will be able
-to help assess the impact of issues, figure out a resolution, and help
-co-ordinate the release of patches to mitigate or fix the problem across all
-platforms on which Perl is supported. Please only use this address for
-security issues in the Perl core, not for modules independently
-distributed on CPAN.
+inappropriate to send to a publicly archived mailing list, then please
+send it to perl5-security-report@perl.org. This points to a closed
+subscription unarchived mailing list, which includes all the core
+committers, who will be able to help assess the impact of issues, figure
+out a resolution, and help co-ordinate the release of patches to
+mitigate or fix the problem across all platforms on which Perl is
+supported. Please only use this address for security issues in the Perl
+core, not for modules independently distributed on CPAN.
=head1 SEE ALSO