=head1 DESCRIPTION
-This document describes differences between the 5.6.0 release
-and the 5.8.0 release.
+This document describes differences between the 5.6.0 release and
+the 5.8.0 release.
Many of the bug fixes in 5.8.0 were already seen in the 5.6.1
maintenance release since the two releases were kept closely
-coordinated.
+coordinated (while 5.8.0 was still called 5.7.something).
+
+Changes that were integrated into the 5.6.1 release are marked C<[561]>.
+In some cases the said bug/feature may have been further fixed/enhanced
+after 5.6.1.
+
+You can see the list of changes in the 5.6.1 (from 5.6.0) by reading
+L<perl561delta>.
If you are upgrading from Perl 5.005_03, you might also want
to read L<perl56delta>.
(at the source code level) for the stdio interface.
Depending on your platform, there are also other reasons why
-we decided to break binary compatibility, please read on.
+we decided to break binary compatibility, please read on.
=head2 64-bit platforms and malloc
punctuation or digits (since they are not solely C<Latin>).
A number of other properties are now supported, including C<\p{L&}>,
-C<\p{Any}> C<\p{Assigned}>, C<\p{Unassigned}>, C<\p{Blank}> and
-C<\p{SpacePerl}> (along with their C<\P{...}> versions, of course).
+C<\p{Any}> C<\p{Assigned}>, C<\p{Unassigned}>, C<\p{Blank}> [561] and
+C<\p{SpacePerl}> [561] (along with their C<\P{...}> versions, of course).
See L<perlunicode> for details, and more additions.
The C<In> or C<Is> prefix to names used with the C<\p{...}> and C<\P{...}>
The list of filenames from glob() (or <...>) is now by default sorted
alphabetically to be csh-compliant (which is what happened before
in most UNIX platforms). (bsd_glob() does still sort platform
-natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)
+natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.) [561]
=item *
Spurious syntax errors generated in certain situations, when glob()
-caused File::Glob to be loaded for the first time, have been fixed.
+caused File::Glob to be loaded for the first time, have been fixed. [561]
=item *
The tr///C and tr///U features have been removed and will not return;
the interface was a mistake. Sorry about that. For similar
-functionality, see pack('U0', ...) and pack('C0', ...).
+functionality, see pack('U0', ...) and pack('C0', ...). [561]
=item *
The Unicode Character Database coming with Perl has been upgraded
to Unicode 3.2.0. For more information, see http://www.unicode.org/ .
+
=item *
For developers interested in enhancing Perl's Unicode capabilities:
arithmetics. (Previously Perl always preferred floating point numbers
in its math.)
+=head2 Arrays now always interpolate into double-quoted strings [561]
+
+In double-quoted strings, arrays now interpolate, no matter what. The
+behavior in earlier versions of perl 5 was that arrays would interpolate
+into strings if the array had been mentioned before the string was
+compiled, and otherwise Perl would raise a fatal compile-time error.
+In versions 5.000 through 5.003, the error was
+
+ Literal @example now requires backslash
+
+In versions 5.004_01 through 5.6.0, the error was
+
+ In string, @example now must be written as \@example
+
+The idea here was to get people into the habit of writing
+C<"fred\@example.com"> when they wanted a literal C<@> sign, just as
+they have always written C<"Give me back my \$5"> when they wanted a
+literal C<$> sign.
+
+Starting with 5.6.1, when Perl now sees an C<@> sign in a
+double-quoted string, it I<always> attempts to interpolate an array,
+regardless of whether or not the array has been used or declared
+already. The fatal error has been downgraded to an optional warning:
+
+ Possible unintended interpolation of @example in string
+
+This warns you that C<"fred@example.com"> is going to turn into
+C<fred.com> if you don't backslash the C<@>.
+See http://www.plover.com/~mjd/perl/at-error.html for more details
+about the history here.
+
=head2 Miscellaneous Changes
=over 4
The builtin dump() now gives an optional warning
C<dump() better written as CORE::dump()>,
-meaning that by default C<dump(...)> is resolved as the builtin
+meaning that by default C<dump(...)> is resolved as the builtin
dump() which dumps core and aborts, not as (possibly) user-defined
C<sub dump>. To call the latter, qualify the call as C<&dump(...)>.
(The whole dump() feature is to considered deprecated, and possibly
=item *
END blocks are now run even if you exit/die in a BEGIN block.
-Internally, the execution of END blocks is now controlled by
+Internally, the execution of END blocks is now controlled by
PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new
behaviour for Perl embedders. This will default in 5.10. See
L<perlembed>.
=item *
-Lvalue subroutines can now return C<undef> in list context.
-However, the lvalue subroutine feature still remains experimental.
+Lvalue subroutines can now return C<undef> in list context. However,
+the lvalue subroutine feature still remains experimental.
=item *
=item *
-C<no Module;> now works even if there is no "sub unimport" in the Module.
+C<no Module;> does not produce an error even if Module does not have an
+unimport() method. This parallels the behavior of C<use> vis-a-vis
+C<import>. [561]
=item *
=item *
The following builtin functions are now overridable: each(), keys(),
-pop(), push(), shift(), splice(), unshift().
+pop(), push(), shift(), splice(), unshift(). [561]
=item *
-C<pack() / unpack()> now can group template letters with C<()> and then
+C<pack() / unpack()> can now group template letters with C<()> and then
apply repetition/count modifiers on the groups.
=item *
=item *
-my __PACKAGE__ $obj now works.
+my __PACKAGE__ $obj now works. [561]
=item *
=item *
-prototype(\&) is now available.
+The (\&) prototype now works properly. [561]
=item *
=item *
untie() will now call an UNTIE() hook if it exists. See L<perltie>
-for details.
+for details. [561]
=item *
Use of the C</c> match modifier without an accompanying C</g> modifier
elicits a new warning: C<Use of /c modifier is meaningless without /g>.
-Use of C</c> in substitutions, even with C</g>, elicits
-C<Use of /c modifier is meaningless in s///>.
+Use of C</c> in substitutions, even with C</g>, elicits
+C<Use of /c modifier is meaningless in s///>.
Use of C</g> with C<split> elicits C<Use of /g modifier is meaningless
in split>.
=item *
-C<File::Temp>, by Tim Jenness, allows one to create temporary files and
-directories in an easy, portable, and secure way. See L<File::Temp>.
+C<File::Temp>, by Tim Jenness, allows one to create temporary files
+and directories in an easy, portable, and secure way. See
+L<File::Temp>.
=item *
=item *
-B::Deparse has been significantly enhanced by Robin Houston. It now
-can deparse almost all of the standard test suite (so that the tests
+B::Deparse has been significantly enhanced by Robin Houston. It can
+now deparse almost all of the standard test suite (so that the tests
still succeed). There is a make target "test.deparse" for trying this
out.
=item *
-Carp has now better interface documentation, and the @CARP_NOT
+Carp now has better interface documentation, and the @CARP_NOT
interface has been added to get optional control over where errors
are reported independently of @ISA, by Ben Tilly.
=item *
-Fcntl, Socket, and Sys::Syslog have been rewritten by Nicholas Clark
+Fcntl, Socket, and Sys::Syslog have been rewritten by Nicholas Clark
to use the new-style constant dispatch section (see L<ExtUtils::Constant>).
This means that they will be more robust and hopefully faster.
=item *
-File::Find now chdir()s correctly when chasing symbolic links.
+File::Find now chdir()s correctly when chasing symbolic links. [561]
=item *
=item *
-File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid
-prototype mismatch with CORE::glob().
+File::Glob::glob() has been renamed to File::Glob::bsd_glob()
+because the name clashes with the builtin glob(). The older
+name is still available for compatibility, but is deprecated. [561]
=item *
=item *
+IO::Socket::INET failed to open the specified port if the service name
+was not known. It now correctly uses the supplied port number as is. [561]
+
+=item *
+
IO::Socket::INET has support for the ReusePort option (if your
platform supports it). The Reuse option now has an alias, ReuseAddr.
For clarity, you may want to prefer ReuseAddr.
command line) is much more like that of the UNIX C compiler, cc.
(The perlbc tools has been removed. Use C<perlcc -B> instead.)
B<Note that perlcc is still considered very experimental and
-unsupported.>
+unsupported.> [561]
=item *
=item *
-C<xsubpp> now understands POD documentation embedded in the *.xs files.
+C<xsubpp> now understands POD documentation embedded in the *.xs
+files. [561]
=item *
=item *
-perlebcdic contains considerations for running Perl on EBCDIC platforms.
+perlebcdic contains considerations for running Perl on EBCDIC
+platforms.
=item *
=item *
perlrequick is a regular expressions quick-start guide.
-Yes, much quicker than perlretut.
+Yes, much quicker than perlretut. [561]
=item *
map() could get pathologically slow when the result list it generates
is larger than the source list. The performance has been improved for
-common scenarios.
+common scenarios. [561]
+
+=item *
+
+sort() is also fully reentrant, in the sense that the sort function
+can itself call sort(). This did not work reliably in previous
+releases. [561]
=item *
=item *
-Configure C<-S> can now run non-interactively.
+Configure C<-S> can now run non-interactively. [561]
=item *
Configure support for pdp11-style memory models has been removed due
-to obsolescence.
+to obsolescence. [561]
=item *
make all test
and Perl will be built and tested, all in /tmp/perl/build/directory.
+[561]
=item *
Building perl with -Duseithreads or -Duse5005threads now works under
HP-UX 10.20 (previously it only worked under 10.30 or later). You will
-need a thread library package installed. See README.hpux.
+need a thread library package installed. See README.hpux. [561]
=item *
-MacOS Classic (MacPerl has of course been available since
-perl 5.004 but now the source code bases of standard Perl
-and MacPerl have been synchronised)
+Mac OS Classic is now supported in the mainstream source package
+(MacPerl has of course been available since perl 5.004 but now the
+source code bases of standard Perl and MacPerl have been synchronised)
+[561]
=item *
-MacOS X (or Darwin) should now be able to build Perl even on HFS+
+Mac OS X (or Darwin) should now be able to build Perl even on HFS+
filesystems. (The case-insensitivity used to confuse the Perl build
process.)
=item *
-NCR MP-RAS is now supported.
+NCR MP-RAS is now supported. [561]
=item *
=item *
-NonStop-UX is now supported.
+NonStop-UX is now supported. [561]
=item *
=item *
Perl has been tested with the GNU pth userlevel thread package
-( http://www.gnu.org/software/pth/pth.html ) . All but one thread
-test worked, and that one failure was because of test results arriving
-in unexpected order.
+( http://www.gnu.org/software/pth/pth.html ). All thread tests
+of Perl now work, but not without adding some yield()s to the tests,
+so while pth (and other userlevel thread implementations) can be
+considered to be "working" with Perl ithreads, keep in mind the
+possible non-preemptability of the underlying thread implementation.
=item *
=item *
-The Amdahl UTS UNIX mainframe platform is now supported.
+The Amdahl UTS UNIX mainframe platform is now supported. [561]
=item *
z/OS (formerly known as OS/390, formerly known as MVS OE) now has
support for dynamic loading. This is not selected by default,
-however, you must specify -Dusedl in the arguments of Configure.
+however, you must specify -Dusedl in the arguments of Configure. [561]
=back
Numerous memory leaks and uninitialized memory accesses have been
hunted down. Most importantly, anonymous subs used to leak quite
-a bit.
+a bit. [561]
=over 4
=item *
chop(@list) in list context returned the characters chopped in
-reverse order. This has been reversed to be in the right order.
+reverse order. This has been reversed to be in the right order. [561]
=item *
Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
when building the Perl binary. The only exception to this is SunOS 4.x,
-which needs them.
+which needs them. [561]
=item *
Several debugger fixes: exit code now reflects the script exit code,
condition C<"0"> now treated correctly, the C<d> command now checks
line number, C<$.> no longer gets corrupted, and all debugger output
-now goes correctly to the socket if RemotePort is set.
+now goes correctly to the socket if RemotePort is set. [561]
=item *
-Perl 5.6.0 could emit spurious warnings about redefinition of dl_error()
-when statically building extensions into perl. This has been corrected.
+Perl 5.6.0 could emit spurious warnings about redefinition of
+dl_error() when statically building extensions into perl.
+This has been corrected. [561]
=item *
=item *
UNIVERSAL::isa no longer caches methods incorrectly. (This broke
-the Tk extension with 5.6.0.)
+the Tk extension with 5.6.0.) [561]
=item *
=item *
C<use warnings qw(FATAL all)> did not work as intended. This has been
-corrected.
+corrected. [561]
=item *
warnings::enabled() now reports the state of $^W correctly if the caller
-isn't using lexical warnings.
+isn't using lexical warnings. [561]
=item *
-Line renumbering with eval and C<#line> now works.
+Line renumbering with eval and C<#line> now works. [561]
=item *
=item *
Modulus of unsigned numbers now works (4063328477 % 65535 used to
-return 27406, instead of 27047).
+return 27406, instead of 27047). [561]
=item *
Some "not a number" warnings introduced in 5.6.0 eliminated to be
-more compatible with 5.005. Infinity is now recognised as a number.
+more compatible with 5.005. Infinity is now recognised as a number. [561]
=item *
Numeric conversions did not recognize changes in the string value
-properly in certain circumstances.
+properly in certain circumstances. [561]
=item *
=item *
-our() variables will not cause "will not stay shared" warnings.
+our() variables will not cause bogus "Variable will not stay shared"
+warnings. [561]
=item *
"our" variables of the same name declared in two sibling blocks
resulted in bogus warnings about "redeclaration" of the variables.
-The problem has been corrected.
+The problem has been corrected. [561]
=item *
=item *
The PERL5OPT environment variable (for passing command line arguments
-to Perl) didn't work for more than a single group of options.
+to Perl) didn't work for more than a single group of options. [561]
=item *
=item *
C<qw(a\\b)> now parses correctly as C<'a\\b'>: that is, as three
-characters, not four.
+characters, not four. [561]
=item *
pos() did not return the correct value within s///ge in earlier
-versions. This is now handled correctly.
+versions. This is now handled correctly. [561]
=item *
sort() arguments are now compiled in the right wantarray context
(they were accidentally using the context of the sort() itself).
The comparison block is now run in scalar context, and the arguments
-to be sorted are always provided list context.
+to be sorted are always provided list context. [561]
=item *
The tainting behaviour of sprintf() has been rationalized. It does
not taint the result of floating point formats anymore, making the
-behaviour consistent with that of string interpolation.
+behaviour consistent with that of string interpolation. [561]
=item *
=item *
The RE engine found in Perl 5.6.0 accidentally pessimised certain kinds
-of simple pattern matches. These are now handled better.
+of simple pattern matches. These are now handled better. [561]
=item *
Regular expression debug output (whether through C<use re 'debug'>
-or via C<-Dr>) now looks better.
+or via C<-Dr>) now looks better. [561]
=item *
Multi-line matches like C<"a\nxb\n" =~ /(?!\A)x/m> were flawed. The
-bug has been fixed.
+bug has been fixed. [561]
=item *
Use of $& could trigger a core dump under some situations. This
-is now avoided.
+is now avoided. [561]
=item *
The regular expression captured submatches ($1, $2, ...) are now
more consistently unset if the match fails, instead of leaving false
-data lying around in them.
+data lying around in them. [561]
=item *
readline() on files opened in "slurp" mode could return an extra
"" (blank line) at the end in certain situations. This has been
-corrected.
+corrected. [561]
=item *
Autovivification of symbolic references of special variables described
in L<perlvar> (as in C<${$num}>) was accidentally disabled. This works
-again now.
+again now. [561]
=item *
=item *
Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spurious warnings.
-This has been corrected.
+This has been corrected. [561]
=item *
=item *
Large unsigned numbers (those above 2**31) could sometimes lose their
-unsignedness, causing bogus results in arithmetic operations.
+unsignedness, causing bogus results in arithmetic operations. [561]
=item *
EPOC
-EPOC update after Perl 5.6.0. See README.epoc.
+EPOC now better supported. See README.epoc. [561]
=item *
=item *
-Long doubles should now work (see INSTALL).
+Long doubles should now work (see INSTALL). [561]
=item *
=item *
-MacOS Classic
+Mac OS Classic
-Compilation of the standard Perl distribution in MacOS Classic should
-now work if you have the Metrowerks development environment and
-the missing Mac-specific toolkit bits. Contact the macperl mailing
-list for details.
+Compilation of the standard Perl distribution in Mac OS Classic should
+now work if you have the Metrowerks development environment and the
+missing Mac-specific toolkit bits. Contact the macperl mailing list
+for details.
=item *
MPE/iX
-MPE/iX update after Perl 5.6.0. See README.mpeix.
+MPE/iX update after Perl 5.6.0. See README.mpeix. [561]
=item *
NetBSD/threads: try installing the GNU pth (should be in the
packages collection, or http://www.gnu.org/software/pth/),
-and Configure with -Duseithreads.
+and Configure with -Duseithreads.
=item *
OS/2
-Now works with usethreads (see INSTALL).
+Now works with usethreads (see INSTALL). [561]
=item *
Fixed various alignment problems that lead into core dumps either
during build or later; no longer dies on math errors at runtime;
-now using full quad integers (64 bits), previously was using
+now using full quad integers (64 bits), previously was using
only 46 bit integers for speed.
=item *
The C<waitpid> emulation has been improved. The worst bug (now fixed)
was that a pid of -1 would cause a wildcard search of all processes on
-the system.
+the system.
POSIX-style signals are now emulated much better on VMS versions prior
to 7.0.
+The Socket extension is now dynamically loaded instead of being
+statically built in.
+
The C<system> function and backticks operator have improved
-functionality and better error handling.
+functionality and better error handling. [561]
File access tests now use current process privileges rather than the
user's default privileges, which could sometimes result in a mismatch
between reported access and actual access.
-There is a new C<kill> implementation based on C<sys$sigprc> that allows
+There is a new C<kill> implementation based on C<sys$sigprc> that allows
older VMS systems (pre-7.0) to use C<kill> to send signals rather than
simply force exit. This implementation also allows later systems to
call C<kill> from within a signal handler.
=item *
-accept() no longer leaks memory.
+accept() no longer leaks memory. [561]
=item *
Borland C++ v5.5 is now a supported compiler that can build Perl.
However, the generated binaries continue to be incompatible with those
-generated by the other supported compilers (GCC and Visual C++).
+generated by the other supported compilers (GCC and Visual C++). [561]
=item *
=item *
-Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
+Duping socket handles with open(F, ">&MYSOCK") now works under Windows
+9x. [561]
=item *
-New %ENV entries now propagate to subprocesses.
+New %ENV entries now propagate to subprocesses. [561]
=item *
Current directory entries in %ENV are now correctly propagated to child
-processes.
+processes. [561]
=item *
=item *
Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
-Other bugs in chdir() and Cwd::cwd() have also been fixed.
+Other bugs in chdir() and Cwd::cwd() have also been fixed. [561]
=item *
=item *
-The makefiles now provide a single switch to bulk-enable all the features
-enabled in ActiveState ActivePerl (a popular Win32 binary distribution).
+The makefiles now provide a single switch to bulk-enable all the
+features enabled in ActiveState ActivePerl (a popular Win32 binary
+distribution). [561]
=item *
=item *
-Can now send() from all threads, not just the first one.
+Can now send() from all threads, not just the first one. [561]
+
+=item *
+
+ExtUtils::MakeMaker now uses $ENV{LIB} to search for libraries.
=item *
=item *
%SIG has been enabled under USE_ITHREADS, but its use is completely
-unsupported under all configurations.
+unsupported under all configurations. [561]
=item *
=item *
-Better UNC path handling under ithreads.
+Better UNC path handling under ithreads. [561]
=item *
wait(), waitpid(), and backticks now return the correct exit status
-under Windows 9x.
+under Windows 9x. [561]
+
+=item *
+
+Non-blocking waits for child processes (or pseudo-processes) are
+supported via C<waitpid($pid, &POSIX::WNOHANG)>.
=item *
=item *
-winsock handle leak fixed.
+winsock handle leak fixed. [561]
=back
The various "opened only for", "on closed", "never opened" warnings
drop the C<main::> prefix for filehandles in the C<main> package,
-for example C<STDIN> instead of C<main::STDIN>.
+for example C<STDIN> instead of C<main::STDIN>.
=item *
=item *
Two new debugging options have been added: if you have compiled your
-Perl with debugging, you can use the -DT and -DR options to trace
+Perl with debugging, you can use the -DT [561] and -DR options to trace
tokenising and to add reference counts to displaying variables,
respectively.
Certain regex modifiers such as C<(?o)> make sense only if applied to
the entire regex. You will get an optional warning if you try to do
-otherwise.
+otherwise.
=item *
=back
-=head1 Security Vulnerability Closed
+=head1 Security Vulnerability Closed [561]
(This change was already made in 5.7.0 but bears repeating here.)
=head2 AmigaOS
-Perl 5.8.0 doesn't build in AmigaOS. It broke at some point
-during the ithreads work and we could not find Amiga experts
-to unbreak the problems.
+Perl 5.8.0 doesn't build in AmigaOS. It broke at some point during
+the ithreads work and we could not find Amiga experts to unbreak the
+problems. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
+development release).
=head2 BeOS
experience failures (the test core dumping) in lib/locale.t.
The suggested cure is to upgrade your Solaris.
-=head2 Stratus VOS
+=head2 SUPER-UX (NEC SX)
-When Perl is built using the native build process on VOS Release
-14.5.0 and GNU C++/GNU Tools 2.0.1, all attempted tests either
-pass or result in TODO (ignored) failures.
+The following tests are known to fail on SUPER-UX:
+
+ op/64bitint...........................FAILED tests 29-30, 32-33, 35-36
+ op/arith..............................FAILED tests 128-130
+ op/pack...............................FAILED tests 25-5625
+ op/pow................................
+ op/taint..............................# msgsnd failed
+ ../ext/IO/lib/IO/t/io_poll............FAILED tests 3-4
+ ../ext/IPC/SysV/ipcsysv...............FAILED tests 2, 5-6
+ ../ext/IPC/SysV/t/msg.................FAILED tests 2, 4-6
+ ../ext/Socket/socketpair..............FAILED tests 12
+ ../lib/IPC/SysV.......................FAILED tests 2, 5-6
+ ../lib/warnings.......................FAILED tests 115-116, 118-119
+
+The op/pack failure ("Cannot compress negative numbers at op/pack.t line 126")
+is serious but as of yet unsolved. It points at some problems with the
+signedness handling of the C compiler, as do the 64bitint, arith, and pow
+failures. Most of the rest point at problems with SysV IPC.
=head2 Term::ReadKey not working on Win32
There are a few known test failures, see L<perluts> (README.uts).
+=head2 VOS (Stratus)
+
+When Perl is built using the native build process on VOS Release
+14.5.0 and GNU C++/GNU Tools 2.0.1, all attempted tests either
+pass or result in TODO (ignored) failures.
+
=head2 VMS
There should be no reported test failures with a default configuration,
core module. It is still a useful module, though, and is available
from the CPAN.
-Perl 5.8 unfortunately does not build anymore on AmigaOS;
-this broke accidentally at some point. Since there are not that many
-Amiga developers available, we could not get this fixed and tested in
-time for 5.8.0.
+Perl 5.8 unfortunately does not build anymore on AmigaOS; this broke
+accidentally at some point. Since there are not that many Amiga
+developers available, we could not get this fixed and tested in time
+for 5.8.0. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
+development release).
=head1 Reporting Bugs