Test::Harness 2.21 -> 2.22
[p5sagit/p5-mst-13.2.git] / pod / perldelta.pod
index 2730f9c..65f4612 100644 (file)
@@ -46,6 +46,27 @@ More Extensive Regression Testing
 
 =head1 Incompatible Changes
 
+=head2 Binary Incompatibility
+
+B<Perl 5.8 is not binary compatible with earlier releases of Perl.>
+
+B<You have to recompile your XS modules.>
+
+(Pure Perl modules should continue to work.)
+
+The major reason for the discontinity is the new IO architecture
+called PerlIO.  PerlIO is the default configuration because
+without it many new features of Perl 5.8 cannot be used.  In other
+words: you just have to recompile your modules, sorry about that.
+
+In future releases of Perl, non-PerlIO aware XS modules may become
+completely unsupported.  This shouldn't be too difficult for module
+authors, however: PerlIO has been designed as a drop-in replacement
+(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. 
+
 =head2 64-bit platforms and malloc
 
 If your pointers are 64 bits wide, the Perl malloc is no longer being
@@ -222,6 +243,12 @@ to be removed in a future release.
 
 =item *
 
+The 5.005 threads model (module C<Thread>) is deprecated and expected
+to be removed in Perl 5.10.  Multithreaded code should be migrated to
+the new ithreads model (see L<threads> and L<threads::shared>).
+
+=item *
+
 The long deprecated uppercase aliases for the string comparison
 operators (EQ, NE, LT, LE, GE, GT) have now been removed.
 
@@ -321,6 +348,13 @@ B<any subsequent file open>, is UTF-8.
 
 =back
 
+=head2 Restricted Hashes
+
+A restricted hash is restricted to a certain set of keys, no keys
+outside the set can be added.  Also individual keys can be restricted
+so that the key cannot be deleted and the value cannot be changed.
+No new syntax is involved: the Hash::Util module is the interface.
+
 =head2 Safe Signals
 
 Perl used to be fragile in that signals arriving at inopportune moments
@@ -516,6 +550,11 @@ errors so consider starting laundering now.
 
 =item *
 
+Tied hash interfaces are now required to have the EXISTS and DELETE
+methods (either own or inherited).
+
+=item *
+
 If tr/// is just counting characters, it doesn't attempt to
 modify its target.
 
@@ -563,7 +602,7 @@ 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</g> with C<split> elicits <Use of /g modifier is meaningless
+Use of C</g> with C<split> elicits C<Use of /g modifier is meaningless
 in split>.
 
 =back
@@ -641,14 +680,15 @@ included since its further use is discouraged.
 
 =item *
 
-C<Encode>, by Nick Ing-Simmons and Dan Kogai, provides a mechanism to
-translate between different character encodings.  Support for Unicode,
-ISO-8859-1, and ASCII are compiled in to the module.  Several other
-encodings (like the rest of the ISO-8859, CP*/Win*, Mac, KOI8-R, three
-variants EBCDIC, Chinese, Japanese, and Korean encodings) are included
-and can be loaded at runtime.  (For space considerations, the largest
-Chinese encodings have been separated into their own CPAN module,
-Encode::HanExtra, which Encode will use if available).  See L<Encode>.
+C<Encode>, orginally by Nick Ing-Simmons and now maintained by Dan
+Kogai, provides a mechanism to translate between different character
+encodings.  Support for Unicode, ISO-8859-1, and ASCII are compiled in
+to the module.  Several other encodings (like the rest of the
+ISO-8859, CP*/Win*, Mac, KOI8-R, three variants EBCDIC, Chinese,
+Japanese, and Korean encodings) are included and can be loaded at
+runtime.  (For space considerations, the largest Chinese encodings
+have been separated into their own CPAN module, Encode::HanExtra,
+which Encode will use if available).  See L<Encode>.
 
 Any encoding supported by Encode module is also available to the
 ":encoding()" layer if PerlIO is used.
@@ -656,10 +696,7 @@ Any encoding supported by Encode module is also available to the
 =item *
 
 C<Hash::Util> is the interface to the new I<restricted hashes>
-feature.  A restricted hash is restricted to a certain set of keys,
-no keys outside the set can be added.  Also individual keys can be
-restricted so that the key cannot be deleted and the value cannot be
-changed.  (Implemented by Jeffrey Friedl, Nick Ing-Simmons, and
+feature.  (Implemented by Jeffrey Friedl, Nick Ing-Simmons, and
 Michael Schwern.)
 
 =item *
@@ -726,7 +763,8 @@ Ilya Zakharevich.
 
 L<libnet> is a collection of perl5 modules related to network
 programming, from Graham Barr.  See L<Net::FTP>, L<Net::NNTP>,
-L<Net::Ping>, L<Net::POP3>, L<Net::SMTP>, and L<Net::Time>.
+L<Net::Ping> (not part of libnet, but related), L<Net::POP3>,
+L<Net::SMTP>, and L<Net::Time>.
 
 Perl installation leaves libnet unconfigured, use F<libnetcfg> to configure.
 
@@ -737,10 +775,10 @@ sum(), min(), first(), and shuffle(), by Graham Barr.  See L<List::Util>.
 
 =item *
 
-C<Locale::Constants>, C<Locale::Country>, C<Locale::Currency>, and
-C<Locale::Language>, from Neil Bowers, have been added.  They provide the
-codes for various locale standards, such as "fr" for France, "usd" for
-US Dollar, and "jp" for Japanese.
+C<Locale::Constants>, C<Locale::Country>, C<Locale::Currency>
+C<Locale::Language>, and L<Locale::Script>, from Neil Bowers, have
+been added.  They provide the codes for various locale standards, such
+as "fr" for France, "usd" for US Dollar, and "ja" for Japanese.
 
     use Locale::Country;
 
@@ -759,7 +797,7 @@ Journal #13, republished here with kind permission.
 
 =item *
 
-Math::BigRat for big rational numbers, to accompany Math::BigInt and
+C<Math::BigRat> for big rational numbers, to accompany Math::BigInt and
 Math::BigFloat, from Tels.
 
 =item *
@@ -858,7 +896,12 @@ C<sort> is a new pragma for controlling the behaviour of sort().
 
 C<Storable> gives persistence to Perl data structures by allowing the
 storage and retrieval of Perl data to and from files in a fast and
-compact binary format, from Raphael Manfredi.  See L<Storable>.
+compact binary format.  Because in effect Storable does serialisation
+of Perl data structues, with it you can also clone deep, hierarchical
+datastructures.  Storable was created by Raphael Manfredi but it is
+now maintained by the Perl development team.  Storable has been
+enhanced to understand the two new hash features, Unicode keys and
+restricted hashes.  See L<Storable>.
 
 =item *
 
@@ -1007,6 +1050,10 @@ is called with an array/hash element as the B<sole> argument.
 
 =item *
 
+The return value of Cwd::fastcwd() is now tainted.
+
+=item *
+
 Data::Dumper has now an option to sort hashes.
 
 =item *
@@ -1021,6 +1068,12 @@ other improvements.
 
 =item *
 
+Devel::Peek now has an interface for the Perl memory statistics
+(this works only if you are using perl's malloc, and if you have
+compiled with debugging).
+
+=item *
+
 The English module can now be used without the infamous performance
 hit by saying
 
@@ -1032,6 +1085,11 @@ C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>.
 
 =item *
 
+ExtUtils::MakeMaker now uses File::Spec internally, which hopefully
+leads into better portability.
+
+=item *
+
 Fcntl, Socket, and Sys::Syslog have been rewritten to use the
 new-style constant dispatch section (see L<ExtUtils::Constant>).
 This means that they will be more robust and hopefully faster.
@@ -1068,12 +1126,6 @@ the returned list of filenames.
 
 =item *
 
-Devel::Peek now has an interface for the Perl memory statistics
-(this works only if you are using perl's malloc, and if you have
-compiled with debugging).
-
-=item *
-
 IPC::Open3 now allows the use of numeric file descriptors.
 
 =item *
@@ -1100,11 +1152,6 @@ with 'no lib' now works.
 
 =item *
 
-ExtUtils::MakeMaker now uses File::Spec internally, which hopefully
-leads into better portability.
-
-=item *
-
 Math::BigFloat and Math::BigInt have undergone a full rewrite.
 They are now magnitudes faster, and they support various
 bignum libraries such as GMP and PARI as their backends.
@@ -1115,10 +1162,19 @@ Math::Complex handles inf, NaN etc., better.
 
 =item *
 
-Net::Ping has been muchly enhanced.  Multihoming is now supported.
-There is now "external" protocol which uses Net::Ping::External module
-which runs external ping(1) and parses the output.  A version of
-Net::Ping::External is available in CPAN.
+Net::Ping has been muchly enhanced: multihoming is now supported,
+Win32 functionality is better, there is now time measuring
+functionality (optionally high-resolution using Time::HiRes),
+and there is now "external" protocol which uses Net::Ping::External
+module which runs your external ping utility and parses the output.
+A version of Net::Ping::External is available in CPAN.
+
+Note that some of the Net::Ping tests are disabled when running
+under the Perl distribution since one cannot assume one or more
+of the following: enabled echo port at localhost, full Internet
+connectivity, or sympathetic firewalls.  You can set the environment
+variable PERL_TEST_Net_Ping to "1" (one) before running the Perl test
+suite to enable all the Net::Ping tests.
 
 =item *
 
@@ -1250,6 +1306,15 @@ C<pod2html> now allows specifying a cache directory.
 
 =item *
 
+C<pod2html> now produces XHTML 1.0.
+
+=item *
+
+C<pod2html> now understands POD written using different line endings
+(PC-like CRLF versus UNIX-like LF versus MacClassic-like CR).
+
+=item *
+
 C<s2p> has been completely rewritten in Perl.  (It is in fact a full
 implementation of sed in Perl: you can use the sed functionality by
 using the C<psed> utility.)
@@ -1522,8 +1587,9 @@ warning that there may be trouble ahead.
 
 =item *
 
-If binary compatibility with the 5.005 release is not wanted, Configure
-no longer suggests including the 5.005 modules in @INC.
+Since Perl 5.8 is not binary-compatible with previous releases
+of Perl, Configure no longer suggests including the 5.005
+modules in @INC.
 
 =item *
 
@@ -1665,6 +1731,15 @@ floating-point numbers is now more picky about using sprintf %.*g
 rules for the conversion.  Some platforms that used to use gcvt may
 now resort to the slower sprintf.
 
+=item *
+
+The obsolete method of making a special (e.g., debugging) flavor
+of perl by saying
+
+       make LIBPERL=libperld.a
+
+has been removed. Use -DDEBUGGING instead.
+
 =back
 
 =head2 New Or Improved Platforms
@@ -1685,10 +1760,6 @@ long doubles support in AIX should be better now.  See L<perlaix>.
 
 =item *
 
-After a long pause, AmigaOS has been verified to be happy with Perl.
-
-=item *
-
 AtheOS ( http://www.atheos.cx/ ) is a new platform.
 
 =item *
@@ -1763,6 +1834,13 @@ in unexpected order.
 
 =item *
 
+Stratus VOS is now supported using Perl's native build method
+(Configure).  This is the recommended method to build Perl on
+VOS.  The older methods, which build miniperl, are still
+available.  See L<perlvos>.
+
+=item *
+
 Amdahl UTS UNIX mainframe platform is now supported.
 
 =item *
@@ -1882,6 +1960,40 @@ Fixed numerous memory leaks, especially in eval "".
 
 =item *
 
+Localised tied variables no more leak memory
+
+    use Tie::Hash;
+    tie my %tied_hash => 'Tie::StdHash';
+
+    ...
+
+    # Used to leak memory every time local() was called,
+    # in a loop this added up.
+    local($tied_hash{Foo}) = 1;
+
+=item *
+
+Localised hash elements (and %ENV) are correctly unlocalised to not to
+exist, if that's what they were.
+
+
+    use Tie::Hash;
+    tie my %tied_hash => 'Tie::StdHash';
+
+    ...
+
+    # Nothing has set the FOO element so far
+
+    { local $tied_hash{FOO} = 'Bar' }
+    
+    # Here the FOO element would have been C<undef>,
+    # but no more so. 
+
+As a side effect of this fix, tied hash interfaces B<must> define
+the EXISTS and DELETE methods.
+
+=item *
+
 mkdir() now ignores trailing slashes in the directory name,
 as mandated by POSIX.
 
@@ -2076,7 +2188,7 @@ UTF-16 (UCS-2) encoded Perl files should now be read correctly.
 
 =item *
 
-The character tables have been updated to Unicode 3.1.1.
+The character tables have been updated to Unicode 3.2.0.
 
 =item *
 
@@ -2212,6 +2324,12 @@ MPE/iX update after Perl 5.6.0.  See README.mpeix.
 
 =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. 
+
+=item *
+
 NetBSD/sparc
 
 Perl now works on NetBSD/sparc.
@@ -2230,6 +2348,15 @@ Solaris
 
 =item *
 
+Stratus VOS
+
+The native build method requires at least VOS Release 14.5.0
+and GNU C++/GNU Tools 2.0.1 or later.  The Perl pack function
+now maps overflowed values to +infinity and underflowed values
+to -infinity.
+
+=item *
+
 Tru64 (aka Digital UNIX, aka DEC OSF/1)
 
 The operating system version letter now recorded in $Config{osvers}.
@@ -2642,6 +2769,12 @@ One cannot call Perl using the C<volume:> syntax, that is, C<perl -v>
 works, but for example C<bin:perl -v> doesn't.  The exact reason isn't
 known but the current suspect is the F<ixemul> library.
 
+=head2 ext/threads/t/libc
+
+If this test fails, it indicates that your libc (C library) is not
+threadsafe.  This particular test stress tests the localtime() call to
+find out whether it is threadsafe.  See L<perlthrtut> for more information.
+
 =head2 FreeBSD Failing locale Test 117 For ISO8859-15 Locales
 
 The ISO8859-15 locales may fail the locale test 117 in FreeBSD.
@@ -2649,6 +2782,14 @@ This is caused by the characters \xFF (y with diaeresis) and \xBE
 (Y with diaeresis) not behaving correctly when being matched
 case-insensitively.
 
+=head2 Modifying $_ Inside for(..)
+
+   for (1..5) { $_++ }
+
+works without complaint.  It shouldn't.  (You should be able to
+modify only lvalue elements inside the loops.)  You can see the
+correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5.
+
 =head2 mod_perl 1.26 Doesn't Build With Threaded Perl
 
 Use mod_perl 1.27 or higher.
@@ -2657,7 +2798,7 @@ Use mod_perl 1.27 or higher.
 
 Don't panic.  Read INSTALL 'make test' section instead.
 
-=head2  HP-UX lib/posix Subtest 9 Fails When LP64-Configured
+=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured
 
 If perl is configured with -Duse64bitall, the successful result of the
 subtest 10 of lib/posix may arrive before the successful result of the
@@ -2680,12 +2821,19 @@ The following tests are known to fail:
  -------------------------------------------------------------------------
  ../ext/DB_File/t/db-btree.t    0    11    ??   ??       %  ??
  ../ext/DB_File/t/db-recno.t              149    3   2.01%  61 63 65
- ../ext/POSIX/t/posix.t                    31    1   3.23%  10
 
 If you are building on a UFS partition, you will also probably see
 t/op/stat.t subtest #9 fail.  This is caused by Darwin's UFS not
 supporting inode change time.
 
+Also the ext/POSIX/t/posix.t subtest #10 fails but it is skipped for
+now because the failure is Apple's fault, not Perl's (blocked signals
+are lost).
+
+If you Configure with ithreads, ext/threads/t/libc.t will fail, again
+not Perl's fault-- the libc of Mac OS X is not threadsafe (in this
+particular test the localtime() call is found to be threadunsafe.)
+
 =head2 op/sprintf tests 91, 129, and 130
 
 The op/sprintf tests 91, 129, and 130 are known to fail on some platforms.
@@ -2700,10 +2848,23 @@ be exact.  (They produce something other than "1" and "-1" when
 formatting 0.6 and -0.6 using the printf format "%.0f", most often
 they produce "0" and "-0".)
 
+=head2 Solaris 2.5
+
+In case you are still using Solaris 2.5 (aka SunOS 5.5), you may
+experience failures (the test core dumping) in lib/locale.t.
+The suggested cure is to upgrade your Solaris.
+
+=head2 Stratus VOS
+
+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 Failure of Thread (5.005-style) tests
 
-B<Note that support for 5.005-style threading remains experimental
-and practically unsupported.>
+B<Note that support for 5.005-style threading is deprecated,
+experimental and practically unsupported.  In 5.10 it is expected
+to be removed.>
 
 The following tests are known to fail due to fundamental problems in
 the 5.005 threading implementation. These are not new failures--Perl
@@ -2716,26 +2877,23 @@ the 5.005 threading implementation. These are not new failures--Perl
  ../lib/autouse.t                                10    1  10.00%  4
  op/flip.t                                       15    1   6.67%  15
 
-These failures are unlikely to get fixed as the 5.005-style
-threads are considered fundamentally broken.
+These failures are unlikely to get fixed as the 5.005-style threads
+are considered fundamentally broken.  (Basically what happens is that
+competing threads can corrupt shared global state.)
 
 =head2 UNICOS
 
  Failed Test                 Stat Wstat Total Fail  Failed  List of Failed
  -------------------------------------------------------------------------
- ../ext/Socket/socketpair.t    1   256    45    1   2.22%  12
  ../lib/Math/Trig.t                       26    1   3.85%  25
  ../lib/warnings.t                       460    1   0.22%  425
- io/fs.t                                  36    1   2.78%  31
  op/numconvert.t                        1440   13   0.90%  208 509-510
  657-658 665-666 829-830 989-990 1149-1150
 
-=head2 UNICOS and UNICOS/mk
-
-The io/fs test #31 is failing because in UNICOS and UNICOS/mk the Perl
-truncate() cannot be used to grow the size of filehandles, only to
-reduce the size.  The workaround is to truncate files instead of
-filehandles.
+The Trig and numconvert failures are caused by the slighly differing
+(from IEEE) floating point implementation of UNICOS.  The warnings
+failure is also related: the test assumes a certain floating point
+output format, this assumption fails in UNICOS.
 
 =head2 UNICOS/mk
 
@@ -2789,52 +2947,41 @@ needing further debugging and/or porting work.
 =head2 Win32
 
 In multi-CPU boxes there are some problems with the I/O buffering:
-some output may appear twice.  The following Win32 failures are known
-as of 5.7.3:
-
- Failed Test                 Stat Wstat Total Fail  Failed  List of Failed
- -------------------------------------------------------------------------
-  ..\ext/threads/t/end.t                6    4  66.67%  3-6
+some output may appear twice.
 
 =head2 XML::Parser not working
 
 Use XML::Parser 2.31 or later.
 
-=head2 Localising a Tied Variable Leaks Memory
-
-    use Tie::Hash;
-    tie my %tie_hash => 'Tie::StdHash';
-
-    ...
-
-    local($tie_hash{Foo}) = 1; # leaks
-
-Code like the above is known to leak memory every time the local()
-is executed.
-
 =head2 z/OS (OS/390)
 
 z/OS has rather many test failures but the situation is actually
 better than it was in 5.6.0, it's just that so many new modules and
 tests have been added.
 
- Failed Test                 Stat Wstat Total Fail  Failed  List of Failed
- -------------------------------------------------------------------------
- ../ext/Data/Dumper/t/dumper.t              321    2   0.62%  311 314
+ Failed Test                   Stat Wstat Total Fail  Failed  List of Failed
+ ---------------------------------------------------------------------------
+ ../ext/Data/Dumper/t/dumper.t              357    8   2.24%  311 314 325 327
+                                                              331 333 337 339
  ../ext/IO/lib/IO/t/io_unix.t                 5    4  80.00%  2-5
- ../lib/utf8.t                               94   13  13.83%  27 30-31 43 46 73
-                                                              76 79 82 85 88 91
-                                                              94
- ../lib/Benchmark.t               1   256   159    1   0.63%  75
- ../lib/ExtUtils/t/Constant.t                27   19  70.37%  5-23
+ ../ext/Storable/t/downgrade.t   12  3072   169   12   7.10%  14-15 46-47 78-79
+                                                              110-111 150 161
+ ../lib/ExtUtils/t/Constant.t   121 30976    48   48 100.00%  1-48
  ../lib/ExtUtils/t/Embed.t                    9    9 100.00%  1-9
- op/pat.t                                   864    9   1.04%  242-243 665 776
-                                                              785 832-834 845
+ op/pat.t                                   910    7   0.77%  665 776 785 832-
+                                                              834 845
  op/sprintf.t                               224    3   1.34%  98 100 136
  op/tr.t                                     97    5   5.15%  63 71-74
  uni/fold.t                                 780    6   0.77%  61 169 196 661
                                                               710-711
 
+The dumper.t and downgrade.t are problems in the tests, the io_unix
+and sprintf are problems in the USS (UDP sockets and printf formats).
+The pat, tr, and fold are genuine Perl problems caused by EBCDIC (and
+in the pat and fold cases, combining that with Unicode).  The Constant
+and Embed are probably problems in the tests (since they test Perl's
+ability to build extensions, and that seems to be working reasonably well.)
+
 =head2 Localising Tied Arrays and Hashes Is Broken
 
     local %tied_array;