This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: 949cf498 (allowing all non-chars) is already done
[perl5.git] / pod / perldelta.pod
index 0f4e3b1..5ea435d 100644 (file)
@@ -87,6 +87,18 @@ XXX For a release on a stable branch, this section aspires to be:
 
 [ List each incompatible change as a =head2 entry ]
 
+=head2 All objects are destroyed
+
+It used to be possible to prevent a destructor from being called during
+global destruction by artificially increasing the reference count of an
+object.
+
+Now such objects I<will> will be destroyed, as a result of a bug fix
+L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
+
+This has the potential to break some XS modules. (In fact, it break some.
+See L</Known Problems>, below.)
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -128,7 +140,7 @@ cribbed.
 
 =item *
 
-L<CPAN::Meta::YAML> 0.002 has been added as a dual-life module.  It supports a
+L<CPAN::Meta::YAML> 0.003 has been added as a dual-life module.  It supports a
 subset of YAML sufficient for reading and writing META.yml and MYMETA.yml files
 included with CPAN distributions or generated by the module installation
 toolchain. It should not be used for any other general YAML parsing or
@@ -144,6 +156,11 @@ binaries like F<curl> or F<wget>.
 
 =item *
 
+L<JSON::PP> 2.27103 has been added as a dual-life module, for the sake of
+reading F<META.json> files in CPAN distributions.
+
+=item *
+
 L<Module::Metadata> 1.000003 has been added as a dual-life module.  It gathers
 package and POD information from Perl module files.  It is a standalone module
 based on Module::Build::ModuleInfo for use by other module installation
@@ -176,6 +193,9 @@ C<Archive::Tar> has been upgraded from version 1.74 to 1.76
 
 C<CGI> has been upgraded from version 3.50 to 3.51
 
+Further improvements have been made to guard against newline injections
+in headers.
+
 =item *
 
 C<Compress::Raw::Bzip2> has been upgraded from version 2.031 to 2.033
@@ -271,6 +291,10 @@ C<Time::Local> has been upgraded from version 1.1901_01 to 1.2000.
 
 C<Unicode::Normalize> has been upgraded from version 1.07 to 1.10
 
+=item *
+
+C<version> has been upgraded from 0.86 to 0.88.
+
 =back
 
 =head2 Removed Modules and Pragmata
@@ -302,13 +326,13 @@ XXX Changes which significantly change existing files in F<pod/> go here.
 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
 section.
 
-=head3 L<XXX>
+=head3 L<perlfunc>
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+It has now been documented that C<ord> returns 0 for an empty string.
 
 =back
 
@@ -356,13 +380,14 @@ here. Most of these are built within the directories F<utils> and F<x2p>.
 entries for each change
 Use L<XXX> with program names to get proper documentation linking. ]
 
-=head3 L<XXX>
+=head3 L<perlbug>
 
 =over 4
 
 =item *
 
-XXX
+C<perlbug> did not previously generate a From: header, potentially
+resulting in dropped mail. Now it does include that header.
 
 =back
 
@@ -397,7 +422,8 @@ that they represent may be covered elsewhere.
 
 =item *
 
-XXX
+A new test script, C<t/porting/filenames.t>, makes sure that filenames and
+paths are reasonably portable.
 
 =back
 
@@ -429,9 +455,11 @@ XXX List any platforms that this version of perl no longer compiles on.
 
 =over 4
 
-=item XXX-some-platform
+=item Apollo DomainOS
 
-XXX
+The last vestiges of support for this platform have been excised from the
+Perl distribution. It was officially discontinued in version 5.12.0. It had
+not worked for years before that.
 
 =back
 
@@ -444,9 +472,11 @@ L</Modules and Pragmata> section.
 
 =over 4
 
-=item XXX-some-platform
+=item Solaris
 
-XXX
+DTrace is now supported on Solaris. There used to be build failures, but
+these have been fixed
+L<[perl #73630]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=73630>.
 
 =back
 
@@ -526,6 +556,43 @@ L<# 51918|http://rt.perl.org/rt3/Ticket/Display.html?id=51918>,
 L<# 51936|http://rt.perl.org/rt3/Ticket/Display.html?id=51936>,
 L<# 63446|http://rt.perl.org/rt3/Ticket/Display.html?id=63446>
 
+=item *
+
+Sometimes magic (ties, tainted, etc.) attached to variables could cause an
+object to last longer than it should, or cause a crash if a tied variable
+were freed from within a tie method. These have been fixed
+L<[perl #81230]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=81230>.
+
+=item *
+
+Most I/O functions were not warning for unopened handles unless the
+'closed' and 'unopened' warnings categories were both enabled. Now only
+C<use warnings 'unopened'> is necessary to trigger these warnings (as was
+always meant to be the case.
+
+=item *
+
+C<< <expr> >> always respects overloading now if the expression is
+overloaded.
+
+Due to the way that '<> as glob' was parsed differently from
+'<> as filehandle' from 5.6 onwards, something like C<< <$foo[0]> >> did
+not handle overloading, even if C<$foo[0]> was an overloaded object. This
+was contrary to the documentation for overload, and meant that C<< <> >>
+could not be used as a general overloaded iterator operator.
+
+=item *
+
+Destructors on objects were not called during global destruction on objects
+that were not referenced by any scalars. This could happen if an array
+element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a
+blessed variable (C<bless \my @a; sub foo { @a }>).
+
+Now there is an extra pass during global destruction to fire destructors on
+any objects that might be left after the usual passes that check for
+objects referenced by scalars
+L<[perl #36347]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=36347>.
+
 =back
 
 =head1 Known Problems
@@ -543,7 +610,8 @@ from either 5.XXX.XXX or 5.XXX.XXX.
 
 =item *
 
-XXX
+The fix for [perl #81230] causes test failures for C<Tk> version 804.029.
+This is still being investigated.
 
 =back
 
@@ -737,12 +805,6 @@ Date:   Sun Jan 16 17:41:30 2011 -0700
 
     regcomp.c: Convert \d \D to a switch{}
 
-commit eee47ba661717bca7751443be1b6ac8f8f64585a
-Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
-Date:   Mon Jan 17 12:35:54 2011 +0000
-
-    Update File-Fetch to CPAN version 0.32
-
 commit e66820012d29519f903709f005e56a2c334ae183
 Author: Tony Cook <tony@develop-help.com>
 Date:   Mon Jan 17 19:22:08 2011 +1100
@@ -931,7 +993,6 @@ Date:   Thu Jan 13 16:24:52 2011 +0000
     calls which might cause reallocation.
 
     Update to Win32-0.44 from CPAN
-    Update Term-UI to CPAN version 0.24
     Update IO-Compress to CPAN version 2.033
     Update Compress-Raw-Zlib to CPAN version 2.033
     Update Compress-Raw-Bzip2 to CPAN version 2.033
@@ -959,29 +1020,6 @@ Date:   Sun Jan 9 15:33:28 2011 -0700
     This patch also includes the changes to test the warnings added by recent
     commits for handling the surrogates and above-Unicode code points
 
-commit 949cf4983af707fbd15e422845f4f3df20505f97
-Author: Karl Williamson <public@khwilliamson.com>
-Date:   Sun Jan 9 13:50:18 2011 -0700
-
-    utf8.c(): Default to allow problematic code points
-
-    Surrogates, non-character code points, and code points that aren't in Unicode
-    are now allowed by default, instead of having to specify a flag to allow them.
-    (Most code did specify those flags anyway.)
-
-    This affects uvuni_to_utf8_flags(), utf8n_to_uvuni() and various routines that
-    are specialized interfaces to them.
-
-    Now there is a new set of flags to disallow those code points.  Further, all 66
-    of the non-character code points are known about and handled consistently,
-    instead of just U+FFFF.
-
-    Code that requires these code points to be forbidden will have to change to use
-    the new flags.  I have looked at all the (few) instances in CPAN where these
-    routines are used, and the only one I found that appears to have need to do
-    this, Encode, has already been patched to accommodate this change.  Of course,
-    I may have overlooked some subtleties.
-
 
 commit 7627e6d0fe772ac90fce9e03fea273109521e261
 Author: Nicholas Clark <nick@ccl4.org>
@@ -1017,30 +1055,12 @@ Date:   Sun Jan 9 10:54:58 2011 +0000
     is now responsible for prototypes for pp_* functions. (embed.pl remains
     responsible for ck_* functions, reading from regen/opcodes)
 
-commit f1aaabf80b19a3cc6dc435510732b561ab46361e
-Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
-Date:   Sun Jan 9 00:16:46 2011 +0000
-
-    Update CPANPLUS to CPAN version 0.9011
-    Update CPANPLUS-Dist-Build to CPAN version 0.52
-    Update Term-UI to CPAN version 0.22
-    Update Params-Check to CPAN version 0.28
-
 commit a4a4c9e2c086dd5f7b7b05789161614dbbe8385b
 Author: Karl Williamson <public@khwilliamson.com>
 Date:   Sat Jan 8 14:44:05 2011 -0700
 
     perldiag.pod: Add missing message severities
 
-commit 0019012ad86d597fb507f71577d70ecd4c416bba
-Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
-Date:   Sat Jan 8 23:09:04 2011 +0000
-
-    Update Object-Accessor to CPAN version 0.38
-    Update Module-Load-Conditional to CPAN version 0.40
-    Update Log-Message to CPAN version 0.04
-    Update IPC-Cmd to CPAN version 0.68
-
 
 TESTING
     add test for split without a pattern
@@ -1051,12 +1071,6 @@ TESTING
 
     Add t/base/while.t testing the basic of a while loop with minimal dependencies.  Change t/cmd/while.t into a non-base test using "test.pl".
 
-commit ac066c2ab5bc31260104aeee778921b186894769
-
-    Update File-Fetch to CPAN version 0.30
-    Update Archive-Tar to CPAN version 1.76
-    Update Archive-Extract to CPAN version 0.48
-
 commit b86b68b4eefa1069dabc8ea0401d712b24a67857
 Author: Jesse Vincent <jesse@bestpractical.com>
 Date:   Sat Jan 8 00:14:29 2011 +0800
@@ -1064,64 +1078,6 @@ Date:   Sat Jan 8 00:14:29 2011 +0800
     Update the policy on doc patches to maint
 
 
-commit e8b333e679eb9a7a62c1d86b647515f01821eb60
-Author: David Golden <dagolden@cpan.org>
-Date:   Wed Jan 5 22:47:41 2011 -0500
-
-    Add Module::Metadata as a dual-life core module
-
-    This commit adds Module::Metadata 1.000002 as a dual-life module.  It
-    gathers package and POD information from Perl module files.  It is a
-    standalone module based on Module::Build::ModuleInfo for use by other
-    module installation toolchain components.  Module::Build::ModuleInfo
-    has been deprecated in favor of this module instead.
-
-commit a8fb8d791b74ff90850140d94407aad99ec86fe3
-Author: John Peacock <jpeacock@jpeacock-hp.doesntexist.org>
-Date:   Thu Jan 6 20:02:37 2011 -0500
-
-    Sync with version 0.88 on CPAN
-
-commit c1b879e57aecbfe520b3f44dd28472d1862f037d
-Author: Craig A. Berry <craigberry@mac.com>
-Date:   Wed Jan 5 19:14:06 2011 -0600
-
-    Make newline on last record explicit.
-
-    On VMS, the last line written to a file will get a trailing newline
-    willy nilly.  This has its advantages insofar as you never get the
-    "no newline at end of file" warnings from various utilities, but
-    reality conflicts with expectations when you explicitly test for
-    the last (or only) line *not* ending with newline, which is what
-    the recent addtion to ref.t (5e3072707906cc4cb8a364c4cf7c487df0300caa)
-    was doing.  Adding an explicit newline makes everyone happy.
-
-commit 935c8d19ecf9ad3ea7589ffd1721e6ba1c671ed9
-Author: David Golden <dagolden@cpan.org>
-Date:   Wed Jan 5 22:25:23 2011 -0500
-
-    Add Perl::OSType as a dual-life core module
-
-    This commit adds Perl::OSType 1.002 as a dual-life module.  It maps Perl
-    operating system names (e.g. 'dragonfly' or 'MSWin32') to more generic
-    types with standardized names (e.g.  "Unix" or "Windows").  It has been
-    refactored out of Module::Build and ExtUtils::CBuilder and consolidates
-    such mappings into a single location for easier maintenance.
-
-    c.f.
-    http://www.nntp.perl.org/group/perl.perl5.porters/2010/05/msg160280.html
-
-commit 2a1594f630b57637ddd7a38daaa1e17f66da396a
-Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
-Date:   Wed Jan 5 23:35:15 2011 +0000
-
-    Update CGI to CPAN version 3.51
-
-      [SECURITY]
-      - Further improvements have been made to guard against newline injections
-        in headers. (Thanks to Max Kanat-Alexander, Yanick Champoux, Mark Stosberg)
-
-
 commit 0b5e625bc99f5cb78697faf03b297b6cacadf60b
 Author: Reini Urban <rurban@x-ray.at>
 Date:   Tue Sep 14 18:04:22 2010 +0200
@@ -1139,16 +1095,8 @@ Date:   Tue Sep 14 17:54:15 2010 +0200
     See http://www.tishler.net/jason/software/rebase/rebase-2.4.2.README
 
 
-NEW TESTS
-
-    t/porting/filenames.t to make sure that filenames and paths are reasonably portable
-
-
 Platforms
 
-    Actually excise 'Apollo DomainOS' support. We officially killed it in 5.11.0. It
-    hadn't worked for years before that.
-
 commit cc7e77fd5a0ee9f1498e54dddf566117da62754b
 Author: Reini Urban <rurban@x-ray.at>
 Date:   Tue Sep 14 17:48:32 2010 +0200
@@ -1179,19 +1127,6 @@ Date:   Tue Sep 14 18:06:38 2010 +0200
     remove deprecated libcygipc info
     remove overlarge stack size
 
-commit ac0650a4c9f69cdc9e7af31df29011c42b42b770
-Author: Father Chrysostomos <sprout@cpan.org>
-Date:   Sun Jan 2 23:14:37 2011 -0800
-
-    Restore the old description of $[
-
-    The new entry is a bit too futuristic: assignment to $[ still works
-    and it is not read-only.
-
-    This does not fully restore the old description, as it contained
-    grammatical errors and parts of it were not updated when 5.10 changed
-    the scoping.
-
 commit 2831a86cee065b53b74fd19ddcc6a4257484646d
 Author: Zsbán Ambrus <ambrus@math.bme.hu>
 Date:   Sun Jan 2 20:25:55 2011 -0800
@@ -1226,171 +1161,12 @@ Date:   Mon Dec 13 17:50:06 2010 +0000
 
     Implement Socket::getaddrinfo() and Socket::getnameinfo(), with related constants
 
-commit d54243158c0e4ba0127eb487c5b2e2a10484e8d0
-Author: David Golden <dagolden@cpan.org>
-Date:   Thu Dec 30 23:43:44 2010 -0500
-
-    Add JSON::PP to the Perl core
-
-    Per discussions with Jesse Vincent, JSON::PP has been added
-    to the Perl core to support the new CPAN meta file specification
-
-commit 4155e4fe81b9987a30efea627e43a574f5460f73
-Author: Father Chrysostomos <sprout@cpan.org>
-Date:   Sun Jan 2 14:51:21 2011 -0800
-
-    [perl #36347] Object destruction incomplete
-
-    do_clean_objs only looks for objects referenced by RVs, so blessed
-    array references and lexical variables (and probably other SVs, too)
-    are not DESTROYed.
-
-    This commit adds a new visit() call to sv_clean_objs, which curses
-    (DESTROYs and un-blesses, leaving the reference count as it is) any
-    objects that are still left after do_clean_named_io_objs. The new
-    do_curse routine (a pointer to which is passeds to visit()) follows
-    do_clean_named_io_objs’ example and explicitly skips the STDOUT and
-    STDERR handles, in case destructors need to use them.
-
-    The cursing code, which is now called from two places, is moved out of
-    sv_clear and put in its own routine. The check that the reference
-    count is zero does not apply when called from sv_clean_objs, so the
-    new S_curse routine takes a boolean argument that determines whether
-    that check should take place.
-
-commit 3d450a5dd4e8f9a7b2aba0b018f9fe078fb6aa30
-Author: David Leadbeater <dgl@dgl.cx>
-Date:   Sun Jan 2 14:33:16 2011 -0800
-
-    [perl #73630] Build separate DTrace for miniperl
-
-    As outlined in the RT ticket due to miniperl's dependencies differing to
-    the final perl binary dtrace -G needs to be called separately for each.
-
-    Build tested on Mac OS X 10.6, Solaris 11 and Scientific Linux with
-    SystemTap from git.
-
-    (Solaris is the only system I have access to where DTRACE_O actually gets
-    defined. Neither the dtrace binary on OS X nor SystemTap's dtrace
-    compatibility layer accept the -G option.)
-
-commit 42467a219c70177fc2004ed9b73d6c3db59dba5c
-Author: David Golden <dagolden@cpan.org>
-Date:   Sun Jan 2 17:34:44 2011 -0500
-
-    Update CPAN::Meta::YAML to 0.003
-
-commit 9426e1a55981168c83a030df9bce5e0b46586581
-Author: David Mitchell <davem@iabyn.com>
-Date:   Sun Jan 2 19:38:30 2011 +0000
-
-    make <expr> always overload if expr is overloaded
-
-    Due to the way that '<> as glob' was parsed differently from
-    '<> as filehandle' from 5.6 onwards, something like <$foo[0]>
-    didn't handle overloading, even where $foo[0] was an overloaded object.
-    This was contrary to the docs for overload, and meant that <> couldn't
-    be used as a general overloaded iterator operator.
-
-commit e4ef33329eb648489bad5296e9673c409f5577f9
-Author: Jesse Vincent <jesse@bestpractical.com>
-Date:   Sun Jan 2 10:50:21 2011 +0800
-
-    perlbug did not previously generate a From: header. While some MTAs do
-    the "right" thing and insert a valid "From:", not all of them do,
-    potentially resulting in dropped mail.
-
-
 commit edcf105d70e5423fd928c776e086fe31a4a543f4
 Author: Jesse Vincent <jesse@bestpractical.com>
 Date:   Sat Jan 1 18:46:20 2011 +0800
 
     Document 'test_porting' and start a section on how committing to blead
 
-commit b85802c5d04fcd6e5c969a5c56136e05061f05d7
-Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
-Date:   Sat Jan 1 10:37:04 2011 +0000
-
-    Update Encode to CPAN version 2.42
-
-
-commit fbcda526a9bbe2ee1302d6f4507b07f83661fc0d
-Author: Nicholas Clark <nick@ccl4.org>
-Date:   Thu Dec 30 17:30:24 2010 +0000
-
-    Most socket ops weren't warning for unopened handles unless 'closed' was enabled
-
-    They were checking that category 'closed' was enabled for warnings before
-    calling report_evil_fh(), which in turn was (correctly) checking category
-    'unopened'.
-commit c521cf7c8af1697e5efd8ce3ad75ed00606db13b
-Author: Nicholas Clark <nick@ccl4.org>
-Date:   Thu Dec 30 16:52:22 2010 +0000
-
-    pp_leavewrite wasn't warning for unopened handles unless 'closed' was enabled.
-
-    It was checking that category 'closed' was enabled for warnings before calling
-    report_evil_fh(), which in turn was (correctly) checking category 'unopened'.
-
-commit 8985fe98dcc5c0af2fadeac15dfbc13f553ee7fc
-Author: David Mitchell <davem@iabyn.com>
-Date:   Thu Dec 30 10:32:44 2010 +0000
-
-    Better handling of magic methods freeing the SV
-
-    This is a fix for RT #81230 (and more). Currently, mg_get() works around
-    the case where the called magic (e.g. FETCH) frees the magic SV. It does
-    this by unconditionally pushing the SV on the tmps stack before invoking
-    the method.
-
-    There are two issues with this. Firstly, it may artificially extend the
-    life of the SV. This was the root of the problem with #81230. There, the
-    DB_File code, under -T, created a tainted tied object. Accessing the
-    object (within FETCH as it happens), caused mg_get() to be invoked on the
-    object (due to the taint magic), and thus extend the life of the object.
-    This then caused c<untie %h if $h{k}> to give the warning
-        untie attempted while 1 inner references still exist.
-    This only became noticeable after efaf36747029c85b4d8825318cb4d485a0bb350e,
-    which stopped wrapping magic method calls in SAVETMPS/FREETMPS.
-
-    The second issue issue that this protection only applies to mg_get();
-    functions like mg_set() can still segfault if the SV is deleted.
-
-    This commit fixes both problems as follows:
-
-    First, the protection mechanism is moved out of mg_get() and into
-    save_magic() / restore_magic(), so that it protects more things.
-    Secondly, the protection is now:
-
-    * in save_magic(), SvREFCNT_inc() the SV, thus protecting it from being
-      freed during FETCH (or whatever)
-
-    * in restore_magic(), SvREFCNT_dec() the SV, undoing the protection
-      without extending the life of the SV, *except* if the refcount is
-      1 (ie FETCH tried to free it), then push it on the mortals stack
-      to extend it life a bit so our callers wont choke on it.
-
-
-commit e8a07a125ebebaf06dc890127439c7461a063b35
-Author: David Golden <dagolden@cpan.org>
-Date:   Mon Dec 27 14:50:31 2010 -0500
-
-    Add CPAN::Meta::YAML as a dual-life core module
-
-commit 6fae7aa4cab68dd6bb59af7f22c85e77eb8a1b0c
-Author: Zsbán Ambrus <ambrus@math.bme.hu>
-Date:   Sun Dec 26 18:10:57 2010 -0800
-
-    [perl #81016] Document ord("")
-
-    The following patch clarifies what ord("") does in pod/perlfunc.pod.
-
-    From the current documentation, it's not documented what it does, and one
-    could guess several different things: returns zero, returns undef, returns
-    zero with a warning, returns undef with a warning, dies.  (There's precedent
-    for dying: some BASIC implementations give an error if you ask for ASC("")
-    -- here ASC is their equivalent of our ord function.)
-
 commit cce04bebd8af026c2a6731940ddb895d3c1fc3e4
 Author: David Golden <dagolden@cpan.org>
 Date:   Mon Dec 13 17:36:33 2010 -0500