1N/A=head1 NAME
1N/A
1N/Aperl581delta - what is new for perl v5.8.1
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThis document describes differences between the 5.8.0 release and
1N/Athe 5.8.1 release.
1N/A
1N/AIf you are upgrading from an earlier release such as 5.6.1, first read
1N/Athe L<perl58delta>, which describes differences between 5.6.0 and
1N/A5.8.0.
1N/A
1N/AIn case you are wondering about 5.6.1, it was bug-fix-wise rather
1N/Aidentical to the development release 5.7.1. Confused? This timeline
1N/Ahopefully helps a bit: it lists the new major releases, their maintenance
1N/Areleases, and the development releases.
1N/A
1N/A New Maintenance Development
1N/A
1N/A 5.6.0 2000-Mar-22
1N/A 5.7.0 2000-Sep-02
1N/A 5.6.1 2001-Apr-08
1N/A 5.7.1 2001-Apr-09
1N/A 5.7.2 2001-Jul-13
1N/A 5.7.3 2002-Mar-05
1N/A 5.8.0 2002-Jul-18
1N/A 5.8.1 2003-Sep-25
1N/A
1N/A=head1 Incompatible Changes
1N/A
1N/A=head2 Hash Randomisation
1N/A
1N/AMainly due to security reasons, the "random ordering" of hashes
1N/Ahas been made even more random. Previously while the order of hash
1N/Aelements from keys(), values(), and each() was essentially random,
1N/Ait was still repeatable. Now, however, the order varies between
1N/Adifferent runs of Perl.
1N/A
1N/AB<Perl has never guaranteed any ordering of the hash keys>, and the
1N/Aordering has already changed several times during the lifetime of
1N/APerl 5. Also, the ordering of hash keys has always been, and
1N/Acontinues to be, affected by the insertion order.
1N/A
1N/AThe added randomness may affect applications.
1N/A
1N/AOne possible scenario is when output of an application has included
1N/Ahash data. For example, if you have used the Data::Dumper module to
1N/Adump data into different files, and then compared the files to see
1N/Awhether the data has changed, now you will have false positives since
1N/Athe order in which hashes are dumped will vary. In general the cure
1N/Ais to sort the keys (or the values); in particular for Data::Dumper to
1N/Ause the C<Sortkeys> option. If some particular order is really
1N/Aimportant, use tied hashes: for example the Tie::IxHash module
1N/Awhich by default preserves the order in which the hash elements
1N/Awere added.
1N/A
1N/AMore subtle problem is reliance on the order of "global destruction".
1N/AThat is what happens at the end of execution: Perl destroys all data
1N/Astructures, including user data. If your destructors (the DESTROY
1N/Asubroutines) have assumed any particular ordering to the global
1N/Adestruction, there might be problems ahead. For example, in a
1N/Adestructor of one object you cannot assume that objects of any other
1N/Aclass are still available, unless you hold a reference to them.
1N/AIf the environment variable PERL_DESTRUCT_LEVEL is set to a non-zero
1N/Avalue, or if Perl is exiting a spawned thread, it will also destruct
1N/Athe ordinary references and the symbol tables that are no longer in use.
1N/AYou can't call a class method or an ordinary function on a class that
1N/Ahas been collected that way.
1N/A
1N/AThe hash randomisation is certain to reveal hidden assumptions about
1N/Asome particular ordering of hash elements, and outright bugs: it
1N/Arevealed a few bugs in the Perl core and core modules.
1N/A
1N/ATo disable the hash randomisation in runtime, set the environment
1N/Avariable PERL_HASH_SEED to 0 (zero) before running Perl (for more
1N/Ainformation see L<perlrun/PERL_HASH_SEED>), or to disable the feature
1N/Acompletely in compile time, compile with C<-DNO_HASH_SEED> (see F<INSTALL>).
1N/A
1N/ASee L<perlsec/"Algorithmic Complexity Attacks"> for the original
1N/Arationale behind this change.
1N/A
1N/A=head2 UTF-8 On Filehandles No Longer Activated By Locale
1N/A
1N/AIn Perl 5.8.0 all filehandles, including the standard filehandles,
1N/Awere implicitly set to be in Unicode UTF-8 if the locale settings
1N/Aindicated the use of UTF-8. This feature caused too many problems,
1N/Aso the feature was turned off and redesigned: see L</"Core Enhancements">.
1N/A
1N/A=head2 Single-number v-strings are no longer v-strings before "=>"
1N/A
1N/AThe version strings or v-strings (see L<perldata/"Version Strings">)
1N/Afeature introduced in Perl 5.6.0 has been a source of some confusion--
1N/Aespecially when the user did not want to use it, but Perl thought it
1N/Aknew better. Especially troublesome has been the feature that before
1N/Aa "=>" a version string (a "v" followed by digits) has been interpreted
1N/Aas a v-string instead of a string literal. In other words:
1N/A
1N/A %h = ( v65 => 42 );
1N/A
1N/Ahas meant since Perl 5.6.0
1N/A
1N/A %h = ( 'A' => 42 );
1N/A
1N/A(at least in platforms of ASCII progeny) Perl 5.8.1 restores the
1N/Amore natural interpretation
1N/A
1N/A %h = ( 'v65' => 42 );
1N/A
1N/AThe multi-number v-strings like v65.66 and 65.66.67 still continue to
1N/Abe v-strings in Perl 5.8.
1N/A
1N/A=head2 (Win32) The -C Switch Has Been Repurposed
1N/A
1N/AThe -C switch has changed in an incompatible way. The old semantics
1N/Aof this switch only made sense in Win32 and only in the "use utf8"
1N/Auniverse in 5.6.x releases, and do not make sense for the Unicode
1N/Aimplementation in 5.8.0. Since this switch could not have been used
1N/Aby anyone, it has been repurposed. The behavior that this switch
1N/Aenabled in 5.6.x releases may be supported in a transparent,
1N/Adata-dependent fashion in a future release.
1N/A
1N/AFor the new life of this switch, see L<"UTF-8 no longer default under
1N/AUTF-8 locales">, and L<perlrun/-C>.
1N/A
1N/A=head2 (Win32) The /d Switch Of cmd.exe
1N/A
1N/APerl 5.8.1 uses the /d switch when running the cmd.exe shell
1N/Ainternally for system(), backticks, and when opening pipes to external
1N/Aprograms. The extra switch disables the execution of AutoRun commands
1N/Afrom the registry, which is generally considered undesirable when
1N/Arunning external programs. If you wish to retain compatibility with
1N/Athe older behavior, set PERL5SHELL in your environment to C<cmd /x/c>.
1N/A
1N/A=head1 Core Enhancements
1N/A
1N/A=head2 UTF-8 no longer default under UTF-8 locales
1N/A
1N/AIn Perl 5.8.0 many Unicode features were introduced. One of them
1N/Awas found to be of more nuisance than benefit: the automagic
1N/A(and silent) "UTF-8-ification" of filehandles, including the
1N/Astandard filehandles, if the user's locale settings indicated
1N/Ause of UTF-8.
1N/A
1N/AFor example, if you had C<en_US.UTF-8> as your locale, your STDIN and
1N/ASTDOUT were automatically "UTF-8", in other words an implicit
1N/Abinmode(..., ":utf8") was made. This meant that trying to print, say,
1N/Achr(0xff), ended up printing the bytes 0xc3 0xbf. Hardly what
1N/Ayou had in mind unless you were aware of this feature of Perl 5.8.0.
1N/AThe problem is that the vast majority of people weren't: for example
1N/Ain RedHat releases 8 and 9 the B<default> locale setting is UTF-8, so
1N/Aall RedHat users got UTF-8 filehandles, whether they wanted it or not.
1N/AThe pain was intensified by the Unicode implementation of Perl 5.8.0
1N/A(still) having nasty bugs, especially related to the use of s/// and
1N/Atr///. (Bugs that have been fixed in 5.8.1)
1N/A
1N/ATherefore a decision was made to backtrack the feature and change it
1N/Afrom implicit silent default to explicit conscious option. The new
1N/APerl command line option C<-C> and its counterpart environment
1N/Avariable PERL_UNICODE can now be used to control how Perl and Unicode
1N/Ainteract at interfaces like I/O and for example the command line
1N/Aarguments. See L<perlrun/-C> and L<perlrun/PERL_UNICODE> for more
1N/Ainformation.
1N/A
1N/A=head2 Unsafe signals again available
1N/A
1N/AIn Perl 5.8.0 the so-called "safe signals" were introduced. This
1N/Ameans that Perl no longer handles signals immediately but instead
1N/A"between opcodes", when it is safe to do so. The earlier immediate
1N/Ahandling easily could corrupt the internal state of Perl, resulting
1N/Ain mysterious crashes.
1N/A
1N/AHowever, the new safer model has its problems too. Because now an
1N/Aopcode, a basic unit of Perl execution, is never interrupted but
1N/Ainstead let to run to completion, certain operations that can take a
1N/Along time now really do take a long time. For example, certain
1N/Anetwork operations have their own blocking and timeout mechanisms, and
1N/Abeing able to interrupt them immediately would be nice.
1N/A
1N/ATherefore perl 5.8.1 introduces a "backdoor" to restore the pre-5.8.0
1N/A(pre-5.7.3, really) signal behaviour. Just set the environment variable
1N/APERL_SIGNALS to C<unsafe>, and the old immediate (and unsafe)
1N/Asignal handling behaviour returns. See L<perlrun/PERL_SIGNALS>
1N/Aand L<perlipc/"Deferred Signals (Safe Signals)">.
1N/A
1N/AIn completely unrelated news, you can now use safe signals with
1N/APOSIX::SigAction. See L<POSIX/POSIX::SigAction>.
1N/A
1N/A=head2 Tied Arrays with Negative Array Indices
1N/A
1N/AFormerly, the indices passed to C<FETCH>, C<STORE>, C<EXISTS>, and
1N/AC<DELETE> methods in tied array class were always non-negative. If
1N/Athe actual argument was negative, Perl would call FETCHSIZE implicitly
1N/Aand add the result to the index before passing the result to the tied
1N/Aarray method. This behaviour is now optional. If the tied array class
1N/Acontains a package variable named C<$NEGATIVE_INDICES> which is set to
1N/Aa true value, negative values will be passed to C<FETCH>, C<STORE>,
1N/AC<EXISTS>, and C<DELETE> unchanged.
1N/A
1N/A=head2 local ${$x}
1N/A
1N/AThe syntaxes
1N/A
1N/A local ${$x}
1N/A local @{$x}
1N/A local %{$x}
1N/A
1N/Anow do localise variables, given that the $x is a valid variable name.
1N/A
1N/A=head2 Unicode Character Database 4.0.0
1N/A
1N/AThe copy of the Unicode Character Database included in Perl 5.8 has
1N/Abeen updated to 4.0.0 from 3.2.0. This means for example that the
1N/AUnicode character properties are as in Unicode 4.0.0.
1N/A
1N/A=head2 Deprecation Warnings
1N/A
1N/AThere is one new feature deprecation. Perl 5.8.0 forgot to add
1N/Asome deprecation warnings, these warnings have now been added.
1N/AFinally, a reminder of an impending feature removal.
1N/A
1N/A=head3 (Reminder) Pseudo-hashes are deprecated (really)
1N/A
1N/APseudo-hashes were deprecated in Perl 5.8.0 and will be removed in
1N/APerl 5.10.0, see L<perl58delta> for details. Each attempt to access
1N/Apseudo-hashes will trigger the warning C<Pseudo-hashes are deprecated>.
1N/AIf you really want to continue using pseudo-hashes but not to see the
1N/Adeprecation warnings, use:
1N/A
1N/A no warnings 'deprecated';
1N/A
1N/AOr you can continue to use the L<fields> pragma, but please don't
1N/Aexpect the data structures to be pseudohashes any more.
1N/A
1N/A=head3 (Reminder) 5.005-style threads are deprecated (really)
1N/A
1N/A5.005-style threads (activated by C<use Thread;>) were deprecated in
1N/APerl 5.8.0 and will be removed after Perl 5.8, see L<perl58delta> for
1N/Adetails. Each 5.005-style thread creation will trigger the warning
1N/AC<5.005 threads are deprecated>. If you really want to continue
1N/Ausing the 5.005 threads but not to see the deprecation warnings, use:
1N/A
1N/A no warnings 'deprecated';
1N/A
1N/A=head3 (Reminder) The $* variable is deprecated (really)
1N/A
1N/AThe C<$*> variable controlling multi-line matching has been deprecated
1N/Aand will be removed after 5.8. The variable has been deprecated for a
1N/Along time, and a deprecation warning C<Use of $* is deprecated> is given,
1N/Anow the variable will just finally be removed. The functionality has
1N/Abeen supplanted by the C</s> and C</m> modifiers on pattern matching.
1N/AIf you really want to continue using the C<$*>-variable but not to see
1N/Athe deprecation warnings, use:
1N/A
1N/A no warnings 'deprecated';
1N/A
1N/A=head2 Miscellaneous Enhancements
1N/A
1N/AC<map> in void context is no longer expensive. C<map> is now context
1N/Aaware, and will not construct a list if called in void context.
1N/A
1N/AIf a socket gets closed by the server while printing to it, the client
1N/Anow gets a SIGPIPE. While this new feature was not planned, it fell
1N/Anaturally out of PerlIO changes, and is to be considered an accidental
1N/Afeature.
1N/A
1N/APerlIO::get_layers(FH) returns the names of the PerlIO layers
1N/Aactive on a filehandle.
1N/A
1N/APerlIO::via layers can now have an optional UTF8 method to
1N/Aindicate whether the layer wants to "auto-:utf8" the stream.
1N/A
1N/Autf8::is_utf8() has been added as a quick way to test whether
1N/Aa scalar is encoded internally in UTF-8 (Unicode).
1N/A
1N/A=head1 Modules and Pragmata
1N/A
1N/A=head2 Updated Modules And Pragmata
1N/A
1N/AThe following modules and pragmata have been updated since Perl 5.8.0:
1N/A
1N/A=over 4
1N/A
1N/A=item base
1N/A
1N/A=item B::Bytecode
1N/A
1N/AIn much better shape than it used to be. Still far from perfect, but
1N/Amaybe worth a try.
1N/A
1N/A=item B::Concise
1N/A
1N/A=item B::Deparse
1N/A
1N/A=item Benchmark
1N/A
1N/AAn optional feature, C<:hireswallclock>, now allows for high
1N/Aresolution wall clock times (uses Time::HiRes).
1N/A
1N/A=item ByteLoader
1N/A
1N/ASee B::Bytecode.
1N/A
1N/A=item bytes
1N/A
1N/ANow has bytes::substr.
1N/A
1N/A=item CGI
1N/A
1N/A=item charnames
1N/A
1N/AOne can now have custom character name aliases.
1N/A
1N/A=item CPAN
1N/A
1N/AThere is now a simple command line frontend to the CPAN.pm
1N/Amodule called F<cpan>.
1N/A
1N/A=item Data::Dumper
1N/A
1N/AA new option, Pair, allows choosing the separator between hash keys
1N/Aand values.
1N/A
1N/A=item DB_File
1N/A
1N/A=item Devel::PPPort
1N/A
1N/A=item Digest::MD5
1N/A
1N/A=item Encode
1N/A
1N/ASignificant updates on the encoding pragma functionality
1N/A(tr/// and the DATA filehandle, formats).
1N/A
1N/AIf a filehandle has been marked as to have an encoding, unmappable
1N/Acharacters are detected already during input, not later (when the
1N/Acorrupted data is being used).
1N/A
1N/AThe ISO 8859-6 conversion table has been corrected (the 0x30..0x39
1N/Aerroneously mapped to U+0660..U+0669, instead of U+0030..U+0039). The
1N/AGSM 03.38 conversion did not handle escape sequences correctly. The
1N/AUTF-7 encoding has been added (making Encode feature-complete with
1N/AUnicode::String).
1N/A
1N/A=item fields
1N/A
1N/A=item libnet
1N/A
1N/A=item Math::BigInt
1N/A
1N/AA lot of bugs have been fixed since v1.60, the version included in Perl
1N/Av5.8.0. Especially noteworthy are the bug in Calc that caused div and mod to
1N/Afail for some large values, and the fixes to the handling of bad inputs.
1N/A
1N/ASome new features were added, e.g. the broot() method, you can now pass
1N/Aparameters to config() to change some settings at runtime, and it is now
1N/Apossible to trap the creation of NaN and infinity.
1N/A
1N/AAs usual, some optimizations took place and made the math overall a tad
1N/Afaster. In some cases, quite a lot faster, actually. Especially alternative
1N/Alibraries like Math::BigInt::GMP benefit from this. In addition, a lot of the
1N/Aquite clunky routines like fsqrt() and flog() are now much much faster.
1N/A
1N/A=item MIME::Base64
1N/A
1N/A=item NEXT
1N/A
1N/ADiamond inheritance now works.
1N/A
1N/A=item Net::Ping
1N/A
1N/A=item PerlIO::scalar
1N/A
1N/AReading from non-string scalars (like the special variables, see
1N/AL<perlvar>) now works.
1N/A
1N/A=item podlators
1N/A
1N/A=item Pod::LaTeX
1N/A
1N/A=item PodParsers
1N/A
1N/A=item Pod::Perldoc
1N/A
1N/AComplete rewrite. As a side-effect, no longer refuses to startup when
1N/Arun by root.
1N/A
1N/A=item Scalar::Util
1N/A
1N/ANew utilities: refaddr, isvstring, looks_like_number, set_prototype.
1N/A
1N/A=item Storable
1N/A
1N/ACan now store code references (via B::Deparse, so not foolproof).
1N/A
1N/A=item strict
1N/A
1N/AEarlier versions of the strict pragma did not check the parameters
1N/Aimplicitly passed to its "import" (use) and "unimport" (no) routine.
1N/AThis caused the false idiom such as:
1N/A
1N/A use strict qw(@ISA);
1N/A @ISA = qw(Foo);
1N/A
1N/AThis however (probably) raised the false expectation that the strict
1N/Arefs, vars and subs were being enforced (and that @ISA was somehow
1N/A"declared"). But the strict refs, vars, and subs are B<not> enforced
1N/Awhen using this false idiom.
1N/A
1N/AStarting from Perl 5.8.1, the above B<will> cause an error to be
1N/Araised. This may cause programs which used to execute seemingly
1N/Acorrectly without warnings and errors to fail when run under 5.8.1.
1N/AThis happens because
1N/A
1N/A use strict qw(@ISA);
1N/A
1N/Awill now fail with the error:
1N/A
1N/A Unknown 'strict' tag(s) '@ISA'
1N/A
1N/AThe remedy to this problem is to replace this code with the correct idiom:
1N/A
1N/A use strict;
1N/A use vars qw(@ISA);
1N/A @ISA = qw(Foo);
1N/A
1N/A=item Term::ANSIcolor
1N/A
1N/A=item Test::Harness
1N/A
1N/ANow much more picky about extra or missing output from test scripts.
1N/A
1N/A=item Test::More
1N/A
1N/A=item Test::Simple
1N/A
1N/A=item Text::Balanced
1N/A
1N/A=item Time::HiRes
1N/A
1N/AUse of nanosleep(), if available, allows mixing subsecond sleeps with
1N/Aalarms.
1N/A
1N/A=item threads
1N/A
1N/ASeveral fixes, for example for join() problems and memory
1N/Aleaks. In some platforms (like Linux) that use glibc the minimum memory
1N/Afootprint of one ithread has been reduced by several hundred kilobytes.
1N/A
1N/A=item threads::shared
1N/A
1N/AMany memory leaks have been fixed.
1N/A
1N/A=item Unicode::Collate
1N/A
1N/A=item Unicode::Normalize
1N/A
1N/A=item Win32::GetFolderPath
1N/A
1N/A=item Win32::GetOSVersion
1N/A
1N/ANow returns extra information.
1N/A
1N/A=back
1N/A
1N/A=head1 Utility Changes
1N/A
1N/AThe C<h2xs> utility now produces a more modern layout:
1N/AF<Foo-Bar/lib/Foo/Bar.pm> instead of F<Foo/Bar/Bar.pm>.
1N/AAlso, the boilerplate test is now called F<t/Foo-Bar.t>
1N/Ainstead of F<t/1.t>.
1N/A
1N/AThe Perl debugger (F<lib/perl5db.pl>) has now been extensively
1N/Adocumented and bugs found while documenting have been fixed.
1N/A
1N/AC<perldoc> has been rewritten from scratch to be more robust and
1N/Afeatureful.
1N/A
1N/AC<perlcc -B> works now at least somewhat better, while C<perlcc -c>
1N/Ais rather more broken. (The Perl compiler suite as a whole continues
1N/Ato be experimental.)
1N/A
1N/A=head1 New Documentation
1N/A
1N/Aperl573delta has been added to list the differences between the
1N/A(now quite obsolete) development releases 5.7.2 and 5.7.3.
1N/A
1N/Aperl58delta has been added: it is the perldelta of 5.8.0, detailing
1N/Athe differences between 5.6.0 and 5.8.0.
1N/A
1N/Aperlartistic has been added: it is the Artistic License in pod format,
1N/Amaking it easier for modules to refer to it.
1N/A
1N/Aperlcheat has been added: it is a Perl cheat sheet.
1N/A
1N/Aperlgpl has been added: it is the GNU General Public License in pod
1N/Aformat, making it easier for modules to refer to it.
1N/A
1N/Aperlmacosx has been added to tell about the installation and use
1N/Aof Perl in Mac OS X.
1N/A
1N/Aperlos400 has been added to tell about the installation and use
1N/Aof Perl in OS/400 PASE.
1N/A
1N/Aperlreref has been added: it is a regular expressions quick reference.
1N/A
1N/A=head1 Installation and Configuration Improvements
1N/A
1N/AThe UNIX standard Perl location, F</usr/bin/perl>, is no longer
1N/Aoverwritten by default if it exists. This change was very prudent
1N/Abecause so many UNIX vendors already provide a F</usr/bin/perl>,
1N/Abut simultaneously many system utilities may depend on that
1N/Aexact version of Perl, so better not to overwrite it.
1N/A
1N/AOne can now specify installation directories for site and vendor man
1N/Aand HTML pages, and site and vendor scripts. See F<INSTALL>.
1N/A
1N/AOne can now specify a destination directory for Perl installation
1N/Aby specifying the DESTDIR variable for C<make install>. (This feature
1N/Ais slightly different from the previous C<Configure -Dinstallprefix=...>.)
1N/ASee F<INSTALL>.
1N/A
1N/Agcc versions 3.x introduced a new warning that caused a lot of noise
1N/Aduring Perl compilation: C<gcc -Ialreadyknowndirectory (warning:
1N/Achanging search order)>. This warning has now been avoided by
1N/AConfigure weeding out such directories before the compilation.
1N/A
1N/AOne can now build subsets of Perl core modules by using the
1N/AConfigure flags C<-Dnoextensions=...> and C<-Donlyextensions=...>,
1N/Asee F<INSTALL>.
1N/A
1N/A=head2 Platform-specific enhancements
1N/A
1N/AIn Cygwin Perl can now be built with threads (C<Configure -Duseithreads>).
1N/AThis works with both Cygwin 1.3.22 and Cygwin 1.5.3.
1N/A
1N/AIn newer FreeBSD releases Perl 5.8.0 compilation failed because of
1N/Atrying to use F<malloc.h>, which in FreeBSD is just a dummy file, and
1N/Aa fatal error to even try to use. Now F<malloc.h> is not used.
1N/A
1N/APerl is now known to build also in Hitachi HI-UXMPP.
1N/A
1N/APerl is now known to build again in LynxOS.
1N/A
1N/AMac OS X now installs with Perl version number embedded in
1N/Ainstallation directory names for easier upgrading of user-compiled
1N/APerl, and the installation directories in general are more standard.
1N/AIn other words, the default installation no longer breaks the
1N/AApple-provided Perl. On the other hand, with C<Configure -Dprefix=/usr>
1N/Ayou can now really replace the Apple-supplied Perl (B<please be careful>).
1N/A
1N/AMac OS X now builds Perl statically by default. This change was done
1N/Amainly for faster startup times. The Apple-provided Perl is still
1N/Adynamically linked and shared, and you can enable the sharedness for
1N/Ayour own Perl builds by C<Configure -Duseshrplib>.
1N/A
1N/APerl has been ported to IBM's OS/400 PASE environment. The best way
1N/Ato build a Perl for PASE is to use an AIX host as a cross-compilation
1N/Aenvironment. See README.os400.
1N/A
1N/AYet another cross-compilation option has been added: now Perl builds
1N/Aon OpenZaurus, an Linux distribution based on Mandrake + Embedix for
1N/Athe Sharp Zaurus PDA. See the Cross/README file.
1N/A
1N/ATru64 when using gcc 3 drops the optimisation for F<toke.c> to C<-O2>
1N/Abecause of gigantic memory use with the default C<-O3>.
1N/A
1N/ATru64 can now build Perl with the newer Berkeley DBs.
1N/A
1N/ABuilding Perl on WinCE has been much enhanced, see F<README.ce>
1N/Aand F<README.perlce>.
1N/A
1N/A=head1 Selected Bug Fixes
1N/A
1N/A=head2 Closures, eval and lexicals
1N/A
1N/AThere have been many fixes in the area of anonymous subs, lexicals and
1N/Aclosures. Although this means that Perl is now more "correct", it is
1N/Apossible that some existing code will break that happens to rely on
1N/Athe faulty behaviour. In practice this is unlikely unless your code
1N/Acontains a very complex nesting of anonymous subs, evals and lexicals.
1N/A
1N/A=head2 Generic fixes
1N/A
1N/AIf an input filehandle is marked C<:utf8> and Perl sees illegal UTF-8
1N/Acoming in when doing C<< <FH> >>, if warnings are enabled a warning is
1N/Aimmediately given - instead of being silent about it and Perl being
1N/Aunhappy about the broken data later. (The C<:encoding(utf8)> layer
1N/Aalso works the same way.)
1N/A
1N/Abinmode(SOCKET, ":utf8") only worked on the input side, not on the
1N/Aoutput side of the socket. Now it works both ways.
1N/A
1N/AFor threaded Perls certain system database functions like getpwent()
1N/Aand getgrent() now grow their result buffer dynamically, instead of
1N/Afailing. This means that at sites with lots of users and groups the
1N/Afunctions no longer fail by returning only partial results.
1N/A
1N/APerl 5.8.0 had accidentally broken the capability for users
1N/Ato define their own uppercase<->lowercase Unicode mappings
1N/A(as advertised by the Camel). This feature has been fixed and
1N/Ais also documented better.
1N/A
1N/AIn 5.8.0 this
1N/A
1N/A $some_unicode .= <FH>;
1N/A
1N/Adidn't work correctly but instead corrupted the data. This has now
1N/Abeen fixed.
1N/A
1N/ATied methods like FETCH etc. may now safely access tied values, i.e.
1N/Aresulting in a recursive call to FETCH etc. Remember to break the
1N/Arecursion, though.
1N/A
1N/AAt startup Perl blocks the SIGFPE signal away since there isn't much
1N/APerl can do about it. Previously this blocking was in effect also for
1N/Aprograms executed from within Perl. Now Perl restores the original
1N/ASIGFPE handling routine, whatever it was, before running external
1N/Aprograms.
1N/A
1N/ALinenumbers in Perl scripts may now be greater than 65536, or 2**16.
1N/A(Perl scripts have always been able to be larger than that, it's just
1N/Athat the linenumber for reported errors and warnings have "wrapped
1N/Aaround".) While scripts that large usually indicate a need to rethink
1N/Ayour code a bit, such Perl scripts do exist, for example as results
1N/Afrom generated code. Now linenumbers can go all the way to
1N/A4294967296, or 2**32.
1N/A
1N/A=head2 Platform-specific fixes
1N/A
1N/ALinux
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/ASetting $0 works again (with certain limitations that
1N/APerl cannot do much about: see L<perlvar/$0>)
1N/A
1N/A=back
1N/A
1N/AHP-UX
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/ASetting $0 now works.
1N/A
1N/A=back
1N/A
1N/AVMS
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/AConfiguration now tests for the presence of C<poll()>, and IO::Poll
1N/Anow uses the vendor-supplied function if detected.
1N/A
1N/A=item *
1N/A
1N/AA rare access violation at Perl start-up could occur if the Perl image was
1N/Ainstalled with privileges or if there was an identifier with the
1N/Asubsystem attribute set in the process's rightslist. Either of these
1N/Acircumstances triggered tainting code that contained a pointer bug.
1N/AThe faulty pointer arithmetic has been fixed.
1N/A
1N/A=item *
1N/A
1N/AThe length limit on values (not keys) in the %ENV hash has been raised
1N/Afrom 255 bytes to 32640 bytes (except when the PERL_ENV_TABLES setting
1N/Aoverrides the default use of logical names for %ENV). If it is
1N/Anecessary to access these long values from outside Perl, be aware that
1N/Athey are implemented using search list logical names that store the
1N/Avalue in pieces, each 255-byte piece (up to 128 of them) being an
1N/Aelement in the search list. When doing a lookup in %ENV from within
1N/APerl, the elements are combined into a single value. The existing
1N/AVMS-specific ability to access individual elements of a search list
1N/Alogical name via the $ENV{'foo;N'} syntax (where N is the search list
1N/Aindex) is unimpaired.
1N/A
1N/A=item *
1N/A
1N/AThe piping implementation now uses local rather than global DCL
1N/Asymbols for inter-process communication.
1N/A
1N/A=item *
1N/A
1N/AFile::Find could become confused when navigating to a relative
1N/Adirectory whose name collided with a logical name. This problem has
1N/Abeen corrected by adding directory syntax to relative path names, thus
1N/Apreventing logical name translation.
1N/A
1N/A=back
1N/A
1N/AWin32
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/AA memory leak in the fork() emulation has been fixed.
1N/A
1N/A=item *
1N/A
1N/AThe return value of the ioctl() built-in function was accidentally
1N/Abroken in 5.8.0. This has been corrected.
1N/A
1N/A=item *
1N/A
1N/AThe internal message loop executed by perl during blocking operations
1N/Asometimes interfered with messages that were external to Perl.
1N/AThis often resulted in blocking operations terminating prematurely or
1N/Areturning incorrect results, when Perl was executing under environments
1N/Athat could generate Windows messages. This has been corrected.
1N/A
1N/A=item *
1N/A
1N/APipes and sockets are now automatically in binary mode.
1N/A
1N/A=item *
1N/A
1N/AThe four-argument form of select() did not preserve $! (errno) properly
1N/Awhen there were errors in the underlying call. This is now fixed.
1N/A
1N/A=item *
1N/A
1N/AThe "CR CR LF" problem of has been fixed, binmode(FH, ":crlf")
1N/Ais now effectively a no-op.
1N/A
1N/A=back
1N/A
1N/A=head1 New or Changed Diagnostics
1N/A
1N/AAll the warnings related to pack() and unpack() were made more
1N/Ainformative and consistent.
1N/A
1N/A=head2 Changed "A thread exited while %d threads were running"
1N/A
1N/AThe old version
1N/A
1N/A A thread exited while %d other threads were still running
1N/A
1N/Awas misleading because the "other" included also the thread giving
1N/Athe warning.
1N/A
1N/A=head2 Removed "Attempt to clear a restricted hash"
1N/A
1N/AIt is not illegal to clear a restricted hash, so the warning
1N/Awas removed.
1N/A
1N/A=head2 New "Illegal declaration of anonymous subroutine"
1N/A
1N/AYou must specify the block of code for C<sub>.
1N/A
1N/A=head2 Changed "Invalid range "%s" in transliteration operator"
1N/A
1N/AThe old version
1N/A
1N/A Invalid [] range "%s" in transliteration operator
1N/A
1N/Awas simply wrong because there are no "[] ranges" in tr///.
1N/A
1N/A=head2 New "Missing control char name in \c"
1N/A
1N/ASelf-explanatory.
1N/A
1N/A=head2 New "Newline in left-justified string for %s"
1N/A
1N/AThe padding spaces would appear after the newline, which is
1N/Aprobably not what you had in mind.
1N/A
1N/A=head2 New "Possible precedence problem on bitwise %c operator"
1N/A
1N/AIf you think this
1N/A
1N/A $x & $y == 0
1N/A
1N/Atests whether the bitwise AND of $x and $y is zero,
1N/Ayou will like this warning.
1N/A
1N/A=head2 New "Pseudo-hashes are deprecated"
1N/A
1N/AThis warning should have been already in 5.8.0, since they are.
1N/A
1N/A=head2 New "read() on %s filehandle %s"
1N/A
1N/AYou cannot read() (or sysread()) from a closed or unopened filehandle.
1N/A
1N/A=head2 New "5.005 threads are deprecated"
1N/A
1N/AThis warning should have been already in 5.8.0, since they are.
1N/A
1N/A=head2 New "Tied variable freed while still in use"
1N/A
1N/ASomething pulled the plug on a live tied variable, Perl plays
1N/Asafe by bailing out.
1N/A
1N/A=head2 New "To%s: illegal mapping '%s'"
1N/A
1N/AAn illegal user-defined Unicode casemapping was specified.
1N/A
1N/A=head2 New "Use of freed value in iteration"
1N/A
1N/ASomething modified the values being iterated over. This is not good.
1N/A
1N/A=head1 Changed Internals
1N/A
1N/AThese news matter to you only if you either write XS code or like to
1N/Aknow about or hack Perl internals (using Devel::Peek or any of the
1N/AC<B::> modules counts), or like to run Perl with the C<-D> option.
1N/A
1N/AThe embedding examples of L<perlembed> have been reviewed to be
1N/Auptodate and consistent: for example, the correct use of
1N/APERL_SYS_INIT3() and PERL_SYS_TERM().
1N/A
1N/AExtensive reworking of the pad code (the code responsible
1N/Afor lexical variables) has been conducted by Dave Mitchell.
1N/A
1N/AExtensive work on the v-strings by John Peacock.
1N/A
1N/AUTF-8 length and position cache: to speed up the handling of Unicode
1N/A(UTF-8) scalars, a cache was introduced. Potential problems exist if
1N/Aan extension bypasses the official APIs and directly modifies the PV
1N/Aof an SV: the UTF-8 cache does not get cleared as it should.
1N/A
1N/AAPIs obsoleted in Perl 5.8.0, like sv_2pv, sv_catpvn, sv_catsv,
1N/Asv_setsv, are again available.
1N/A
1N/ACertain Perl core C APIs like cxinc and regatom are no longer
1N/Aavailable at all to code outside the Perl core of the Perl core
1N/Aextensions. This is intentional. They never should have been
1N/Aavailable with the shorter names, and if you application depends on
1N/Athem, you should (be ashamed and) contact perl5-porters to discuss
1N/Awhat are the proper APIs.
1N/A
1N/ACertain Perl core C APIs like C<Perl_list> are no longer available
1N/Awithout their C<Perl_> prefix. If your XS module stops working
1N/Abecause some functions cannot be found, in many cases a simple fix is
1N/Ato add the C<Perl_> prefix to the function and the thread context
1N/AC<aTHX_> as the first argument of the function call. This is also how
1N/Ait should always have been done: letting the Perl_-less forms to leak
1N/Afrom the core was an accident. For cleaner embedding you can also
1N/Aforce this for all APIs by defining at compile time the cpp define
1N/APERL_NO_SHORT_NAMES.
1N/A
1N/APerl_save_bool() has been added.
1N/A
1N/ARegexp objects (those created with C<qr>) now have S-magic rather than
1N/AR-magic. This fixed regexps of the form /...(??{...;$x})/ to no
1N/Alonger ignore changes made to $x. The S-magic avoids dropping
1N/Athe caching optimization and making (??{...}) constructs obscenely
1N/Aslow (and consequently useless). See also L<perlguts/"Magic Variables">.
1N/ARegexp::Copy was affected by this change.
1N/A
1N/AThe Perl internal debugging macros DEBUG() and DEB() have been renamed
1N/Ato PERL_DEBUG() and PERL_DEB() to avoid namespace conflicts.
1N/A
1N/AC<-DL> removed (the leaktest had been broken and unsupported for years,
1N/Ause alternative debugging mallocs or tools like valgrind and Purify).
1N/A
1N/AVerbose modifier C<v> added for C<-DXv> and C<-Dsv>, see L<perlrun>.
1N/A
1N/A=head1 New Tests
1N/A
1N/AIn Perl 5.8.0 there were about 69000 separate tests in about 700 test files,
1N/Ain Perl 5.8.1 there are about 77000 separate tests in about 780 test files.
1N/AThe exact numbers depend on the Perl configuration and on the operating
1N/Asystem platform.
1N/A
1N/A=head1 Known Problems
1N/A
1N/AThe hash randomisation mentioned in L</Incompatible Changes> is definitely
1N/Aproblematic: it will wake dormant bugs and shake out bad assumptions.
1N/A
1N/AIf you want to use mod_perl 2.x with Perl 5.8.1, you will need
1N/Amod_perl-1.99_10 or higher. Earlier versions of mod_perl 2.x
1N/Ado not work with the randomised hashes. (mod_perl 1.x works fine.)
1N/AYou will also need Apache::Test 1.04 or higher.
1N/A
1N/AMany of the rarer platforms that worked 100% or pretty close to it
1N/Awith perl 5.8.0 have been left a little bit untended since their
1N/Amaintainers have been otherwise busy lately, and therefore there will
1N/Abe more failures on those platforms. Such platforms include Mac OS
1N/AClassic, IBM z/OS (and other EBCDIC platforms), and NetWare. The most
1N/Acommon Perl platforms (Unix and Unix-like, Microsoft platforms, and
1N/AVMS) have large enough testing and expert population that they are
1N/Adoing well.
1N/A
1N/A=head2 Tied hashes in scalar context
1N/A
1N/ATied hashes do not currently return anything useful in scalar context,
1N/Afor example when used as boolean tests:
1N/A
1N/A if (%tied_hash) { ... }
1N/A
1N/AThe current nonsensical behaviour is always to return false,
1N/Aregardless of whether the hash is empty or has elements.
1N/A
1N/AThe root cause is that there is no interface for the implementors of
1N/Atied hashes to implement the behaviour of a hash in scalar context.
1N/A
1N/A=head2 Net::Ping 450_service and 510_ping_udp failures
1N/A
1N/AThe subtests 9 and 18 of lib/Net/Ping/t/450_service.t, and the
1N/Asubtest 2 of lib/Net/Ping/t/510_ping_udp.t might fail if you have
1N/Aan unusual networking setup. For example in the latter case the
1N/Atest is trying to send a UDP ping to the IP address 127.0.0.1.
1N/A
1N/A=head2 B::C
1N/A
1N/AThe C-generating compiler backend B::C (the frontend being
1N/AC<perlcc -c>) is even more broken than it used to be because of
1N/Athe extensive lexical variable changes. (The good news is that
1N/AB::Bytecode and ByteLoader are better than they used to be.)
1N/A
1N/A=head1 Platform Specific Problems
1N/A
1N/A=head2 EBCDIC Platforms
1N/A
1N/AIBM z/OS and other EBCDIC platforms continue to be problematic
1N/Aregarding Unicode support. Many Unicode tests are skipped when
1N/Athey really should be fixed.
1N/A
1N/A=head2 Cygwin 1.5 problems
1N/A
1N/AIn Cygwin 1.5 the F<io/tell> and F<op/sysio> tests have failures for
1N/Asome yet unknown reason. In 1.5.5 the threads tests stress_cv,
1N/Astress_re, and stress_string are failing unless the environment
1N/Avariable PERLIO is set to "perlio" (which makes also the io/tell
1N/Afailure go away).
1N/A
1N/APerl 5.8.1 does build and work well with Cygwin 1.3: with (uname -a)
1N/AC<CYGWIN_NT-5.0 ... 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 ...>
1N/Aa 100% "make test" was achieved with C<Configure -des -Duseithreads>.
1N/A
1N/A=head2 HP-UX: HP cc warnings about sendfile and sendpath
1N/A
1N/AWith certain HP C compiler releases (e.g. B.11.11.02) you will
1N/Aget many warnings like this (lines wrapped for easier reading):
1N/A
1N/A cc: "/usr/include/sys/socket.h", line 504: warning 562:
1N/A Redeclaration of "sendfile" with a different storage class specifier:
1N/A "sendfile" will have internal linkage.
1N/A cc: "/usr/include/sys/socket.h", line 505: warning 562:
1N/A Redeclaration of "sendpath" with a different storage class specifier:
1N/A "sendpath" will have internal linkage.
1N/A
1N/AThe warnings show up both during the build of Perl and during certain
1N/Alib/ExtUtils tests that invoke the C compiler. The warning, however,
1N/Ais not serious and can be ignored.
1N/A
1N/A=head2 IRIX: t/uni/tr_7jis.t falsely failing
1N/A
1N/AThe test t/uni/tr_7jis.t is known to report failure under 'make test'
1N/Aor the test harness with certain releases of IRIX (at least IRIX 6.5
1N/Aand MIPSpro Compilers Version 7.3.1.1m), but if run manually the test
1N/Afully passes.
1N/A
1N/A=head2 Mac OS X: no usemymalloc
1N/A
1N/AThe Perl malloc (C<-Dusemymalloc>) does not work at all in Mac OS X.
1N/AThis is not that serious, though, since the native malloc works just
1N/Afine.
1N/A
1N/A=head2 Tru64: No threaded builds with GNU cc (gcc)
1N/A
1N/AIn the latest Tru64 releases (e.g. v5.1B or later) gcc cannot be used
1N/Ato compile a threaded Perl (-Duseithreads) because the system
1N/AC<< <pthread.h> >> file doesn't know about gcc.
1N/A
1N/A=head2 Win32: sysopen, sysread, syswrite
1N/A
1N/AAs of the 5.8.0 release, sysopen()/sysread()/syswrite() do not behave
1N/Alike they used to in 5.6.1 and earlier with respect to "text" mode.
1N/AThese built-ins now always operate in "binary" mode (even if sysopen()
1N/Awas passed the O_TEXT flag, or if binmode() was used on the file
1N/Ahandle). Note that this issue should only make a difference for disk
1N/Afiles, as sockets and pipes have always been in "binary" mode in the
1N/AWindows port. As this behavior is currently considered a bug,
1N/Acompatible behavior may be re-introduced in a future release. Until
1N/Athen, the use of sysopen(), sysread() and syswrite() is not supported
1N/Afor "text" mode operations.
1N/A
1N/A=head1 Future Directions
1N/A
1N/AThe following things B<might> happen in future. The first publicly
1N/Aavailable releases having these characteristics will be the developer
1N/Areleases Perl 5.9.x, culminating in the Perl 5.10.0 release. These
1N/Aare our best guesses at the moment: we reserve the right to rethink.
1N/A
1N/A=over 4
1N/A
1N/A=item *
1N/A
1N/APerlIO will become The Default. Currently (in Perl 5.8.x) the stdio
1N/Alibrary is still used if Perl thinks it can use certain tricks to
1N/Amake stdio go B<really> fast. For future releases our goal is to
1N/Amake PerlIO go even faster.
1N/A
1N/A=item *
1N/A
1N/AA new feature called I<assertions> will be available. This means that
1N/Aone can have code called assertions sprinkled in the code: usually
1N/Athey are optimised away, but they can be enabled with the C<-A> option.
1N/A
1N/A=item *
1N/A
1N/AA new operator C<//> (defined-or) will be available. This means that
1N/Aone will be able to say
1N/A
1N/A $a // $b
1N/A
1N/Ainstead of
1N/A
1N/A defined $a ? $a : $b
1N/A
1N/Aand
1N/A
1N/A $c //= $d;
1N/A
1N/Ainstead of
1N/A
1N/A $c = $d unless defined $c;
1N/A
1N/AThe operator will have the same precedence and associativity as C<||>.
1N/AA source code patch against the Perl 5.8.1 sources will be available
1N/Ain CPAN as F<authors/id/H/HM/HMBRAND/dor-5.8.1.diff>.
1N/A
1N/A=item *
1N/A
1N/AC<unpack()> will default to unpacking the C<$_>.
1N/A
1N/A=item *
1N/A
1N/AVarious Copy-On-Write techniques will be investigated in hopes
1N/Aof speeding up Perl.
1N/A
1N/A=item *
1N/A
1N/ACPANPLUS, Inline, and Module::Build will become core modules.
1N/A
1N/A=item *
1N/A
1N/AThe ability to write true lexically scoped pragmas will be introduced.
1N/A
1N/A=item *
1N/A
1N/AWork will continue on the bytecompiler and byteloader.
1N/A
1N/A=item *
1N/A
1N/Av-strings as they currently exist are scheduled to be deprecated. The
1N/Av-less form (1.2.3) will become a "version object" when used with C<use>,
1N/AC<require>, and C<$VERSION>. $^V will also be a "version object" so the
1N/Aprintf("%vd",...) construct will no longer be needed. The v-ful version
1N/A(v1.2.3) will become obsolete. The equivalence of strings and v-strings (e.g.
1N/Athat currently 5.8.0 is equal to "\5\8\0") will go away. B<There may be no
1N/Adeprecation warning for v-strings>, though: it is quite hard to detect when
1N/Av-strings are being used safely, and when they are not.
1N/A
1N/A=item *
1N/A
1N/A5.005 Threads Will Be Removed
1N/A
1N/A=item *
1N/A
1N/AThe C<$*> Variable Will Be Removed
1N/A(it was deprecated a long time ago)
1N/A
1N/A=item *
1N/A
1N/APseudohashes Will Be Removed
1N/A
1N/A=back
1N/A
1N/A=head1 Reporting Bugs
1N/A
1N/AIf you find what you think is a bug, you might check the articles
1N/Arecently posted to the comp.lang.perl.misc newsgroup and the perl
1N/Abug database at http://bugs.perl.org/ . There may also be
1N/Ainformation at http://www.perl.com/ , the Perl Home Page.
1N/A
1N/AIf you believe you have an unreported bug, please run the B<perlbug>
1N/Aprogram included with your release. Be sure to trim your bug down
1N/Ato a tiny but sufficient test case. Your bug report, along with the
1N/Aoutput of C<perl -V>, will be sent off to perlbug@perl.org to be
1N/Aanalysed by the Perl porting team. You can browse and search
1N/Athe Perl 5 bugs at http://bugs.perl.org/
1N/A
1N/A=head1 SEE ALSO
1N/A
1N/AThe F<Changes> file for exhaustive details on what changed.
1N/A
1N/AThe F<INSTALL> file for how to build Perl.
1N/A
1N/AThe F<README> file for general stuff.
1N/A
1N/AThe F<Artistic> and F<Copying> files for copyright information.
1N/A
1N/A=cut