[Patch] perlapio.pod
[p5sagit/p5-mst-13.2.git] / pod / perldelta.pod
index b742b19..97a7a4a 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.
 
@@ -523,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.
 
@@ -864,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 *
 
@@ -1709,10 +1746,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 *
@@ -1906,6 +1939,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.
 
@@ -2236,6 +2303,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.
@@ -2673,6 +2746,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.
@@ -2681,7 +2762,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
@@ -2724,10 +2805,17 @@ 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 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
@@ -2754,13 +2842,6 @@ threads are considered fundamentally broken.
  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.
-
 =head2 UNICOS/mk
 
 =over 4
@@ -2819,18 +2900,6 @@ some output may appear twice.
 
 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