This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta updates from Sarathy.
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 6 Jul 2003 08:32:12 +0000 (08:32 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 6 Jul 2003 08:32:12 +0000 (08:32 +0000)
p4raw-id: //depot/maint-5.8/perl@20027

pod/perldelta.pod

index 247818c..4f184ed 100644 (file)
@@ -39,16 +39,49 @@ The hash randomisation is certain to reveal hidden assumptions about
 some particular ordering of hash elements, and outright bugs: it
 revealed a few bugs in the Perl core and core modules.
 
+To disable the hash randomisation in runtime, set the environment
+variable PERL_HASH_SEED to 0 (zero) before running Perl (for more
+information see L<perlrun/PERL_HASH_SEED>), or to disable the feature
+completely in compile time, compile with C<-DNO_HASH_SEED> (see F<INSTALL>).
+
 See L<perlsec/"Algorithmic Complexity Attacks"> for the rationale
 behind this change.
 
-=head2 Closures, eval and lexicals
+=head2 UTF-8 On Filehandles No More Activated By Locale
 
-There have been many fixes in the area of anonymous subs, lexicals and
-closures. Although this means that Perl is now more "correct", it is
-possible that some existing code will break that happens to rely on
-the faulty behaviour.  In practice this is unlikely unless your code
-contains a very complex nesting of anonymous subs, evals and lexicals.
+In Perl 5.8.0 all filehandles, including the standard filehandles,
+were implicitly set to be in Unicode UTF-8 if the locale settings
+indicated the use of UTF-8.  This feature caused too many problems,
+so the feature was turned off and redesigned: see L</"Core Enhancements">.
+
+=head2 (FreeBSD) Perl now uses the Perl malloc
+
+Using FreeBSD's system malloc for Perl was found to be very slow:
+in some applications that was 200 times slower than using the Perl
+malloc.  Therefore Perl now uses by default its own malloc, though
+one can still force the system malloc with Configure C<-Uusemymalloc>.
+
+=head2 (Win32) The -C Switch Has Been Repurposed
+
+The -C switch has changed in an incompatible way.  The old semantics
+of this switch only made sense in Win32 and only in the "use utf8"
+universe in 5.6.x releases, and do not make sense for the Unicode
+implementation in 5.8.0.  Since this switch could not have been used
+by anyone, it has been repurposed.  The behavior that this switch
+enabled in 5.6.x releases may be supported in a transparent,
+data-dependent fashion in a future release.
+
+For the new life of this switch, see L<"UTF-8 no longer default under
+UTF-8 locales">, and L<perlrun/-C>.
+
+=head2 (Win32) The /d Switch Of cmd.exe
+
+Perl 5.8.1 uses the /d switch when running the cmd.exe shell
+internally for system(), backticks, and when opening pipes to external
+programs.  The extra switch disables the execution of AutoRun commands
+from the registry, which is generally considered undesirable when
+running external programs.  If you wish to retain compatibility with
+the older behavior, set PERL5SHELL in your environment to C<cmd /x/c>.
 
 =head1 Core Enhancements
 
@@ -69,7 +102,8 @@ is that the vast majority of people weren't: for example in RedHat releases
 8 and 9 the B<default> locale setting is UTF-8, so all RedHat users got
 UTF-8 filehandles, whether they wanted it or not.  The pain was
 intensified by the Unicode implementation of Perl 5.8.0 (still) having nasty
-bugs, especially related to the use of s/// and tr///. (Bugs fixed in 5.8.1)
+bugs, especially related to the use of s/// and tr///.
+(Bugs that have been fixed in 5.8.1)
 
 Therefore a decision was made to backtrack the feature and change it
 from implicit silent default to explicit conscious option.  The new
@@ -288,21 +322,15 @@ environment.  See README.os400.
 
 =head1 Selected Bug Fixes
 
-Setting $0 works again in Linux (with certain limitations that
-Perl cannot do much about: see L<perlvar/$0>).
-
-Setting $0 now works in HP-UX.
-
-Pipes and sockets are now automatically in binary mode in Win32.
-
-Several bugs related to lexical scope have been fixed by Dave Mitchell.
+=head2 Closures, eval and lexicals
 
-Encode: if a filehandle has been marked as to have an encoding,
-unmappable characters are detected already during input, not later
-(when the corrupted data is being used).
+There have been many fixes in the area of anonymous subs, lexicals and
+closures. Although this means that Perl is now more "correct", it is
+possible that some existing code will break that happens to rely on
+the faulty behaviour.  In practice this is unlikely unless your code
+contains a very complex nesting of anonymous subs, evals and lexicals.
 
-PerlIO::scalar; reading from non-string scalars (like the special
-variables, see L<perlvar>) now works.
+=head2 Miscellaneous fixes
 
 binmode(SOCKET, ":utf8") only worked on the input side, not
 on the output side of the socket.  Now it works both ways.
@@ -329,12 +357,85 @@ call to FETCH etc).
 
 Linenumbers in Perl scripts may now be greater than 65536, or 2**16.
 (Perl scripts have always been able to be larger than that, it's just
-that reported errors and warnings have wrapped around.)  While scripts
-that large usually indicate a need to rethink your code a bit, such
-Perl scripts do exist, for example as results from generated code.
-Now linenumbers can go all the way to 4294967296, or 2**32.
+that the linenumber for reported errors and warnings have "wrapped
+around".)  While scripts that large usually indicate a need to rethink
+your code a bit, such Perl scripts do exist, for example as results
+from generated code.  Now linenumbers can go all the way to
+4294967296, or 2**32.
 
-In VMS IO::Poll now works.
+=head2 Module-specific fixes
+
+Encode: if a filehandle has been marked as to have an encoding,
+unmappable characters are detected already during input, not later
+(when the corrupted data is being used).
+
+PerlIO::scalar; reading from non-string scalars (like the special
+variables, see L<perlvar>) now works.
+
+=head2 Platform-specific fixes
+
+Linux
+
+=over 4
+
+=item *
+
+Setting $0 works again (with certain limitations that
+Perl cannot do much about: see L<perlvar/$0>)
+
+=back
+
+HP-UX
+
+=over 4
+
+=item *
+
+Setting $0 now works.
+
+=back
+
+VMS
+
+=over 4
+
+=item *
+
+IO::Poll now works.
+
+=back
+
+Win32
+
+=over 4
+
+=item *
+
+A memory leak in the fork() emulation has been fixed.
+
+=item *
+
+The return value of the ioctl() built-in function was accidentally
+broken in 5.8.0.  This has been corrected.
+
+=item *
+
+The internal message loop executed by perl during blocking operations
+sometimes interfered with messages that were external to Perl.
+This often resulted in blocking operations terminating prematurely or
+returning incorrect results, when Perl was executing under environments
+that could generate Windows messages.  This has been corrected.
+
+=item *
+
+Pipes and sockets are now automatically in binary mode.
+
+=item *
+
+The four-argument form of select() did not preserve $! (errno) properly
+when there were errors in the underlying call.  This is now fixed.
+
+=back
 
 =head1 New or Changed Diagnostics
 
@@ -477,23 +578,18 @@ doing well.
 
 =head1 Platform Specific Problems
 
-=head2 Win32 sysread, syswrite
-
-In Win32 the problem of sysread/syswrite becoming "broken" in 5.8.0 is
-still open.  Background: before 5.8.0 in Win32 a filehandle that had
-been opened with sysopen() and then read/written with sysread/syswrite
-still did the CRLF <-> LF translation emblematic of Win32.
-For example, sysread() did translate any read CRLFs into LFs.
-
-The new PerlIO model introduced in 5.8.0 changed this: sysopen()
-really does mean binary mode: if there are CRLFs, they are returned
-as CRLFs.
-
-This is still the case with 5.8.1 since the proper fix would require a
-considerable effort to implement cleanly, and secondly because one can
-argue that the old behaviour of sysread/syswrite on Win32 was simply
-anomalous (that is, wrong), since it makes Win32 behave differently
-from any other platform.
+=head2 Win32 sysopen, sysread, syswrite
+
+As of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave
+like they used to in 5.6.1 and earlier with respect to "text" mode.
+These built-ins now always operate in "binary" mode (even if sysopen()
+was passed the O_TEXT flag, or if binmode() was used on the file
+handle).  Note that this issue should only make a difference for disk
+files, as sockets and pipes have always been in "binary" mode in the
+Windows port.  As this behavior is currently considered a bug,
+compatible behavior may be re-introduced in a future release.  Until
+then, the use of sysopen(), sysread() and syswrite() is not supported
+for "text" mode operations.
 
 =head2 EBCDIC Platforms