In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/7e7629faf067b99cf5b2d8e61fef8c0a0a4f47f7?hp=6600848687c9fed2ae43f11d6fc645d050f5f69f>

- Log -----------------------------------------------------------------
commit 7e7629faf067b99cf5b2d8e61fef8c0a0a4f47f7
Author: Father Chrysostomos <[email protected]>
Date:   Thu Dec 8 22:32:51 2011 -0800

    perldelta up to e08f19f5d07

M       pod/perldelta.pod

commit f378d2d318c166a0a71d4cb0c3648facaa7c62ea
Author: Father Chrysostomos <[email protected]>
Date:   Thu Dec 8 22:21:51 2011 -0800

    Test out-of-bounds warning with lv substr

M       t/op/substr.t
-----------------------------------------------------------------------

Summary of changes:
 pod/perldelta.pod |   37 ++++++++++++++++++++++++++++++++++---
 t/op/substr.t     |    4 +++-
 2 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index f8cefc2..d889437 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -1,8 +1,9 @@
 =encoding utf8
 
 =for comment
-This has been completed up to a74fb2cdc8f, except for
-e032854 khw [perl #32080] is_utf8_string() reads too far
+This has been completed up to e08f19f5d07, except for
+e032854 khw     [perl #32080] is_utf8_string() reads too far
+b0f2e9e nwclark Fix two bugs related to pod files outside of pod/ (important 
enough?)
 
 =head1 NAME
 
@@ -44,6 +45,12 @@ The B<t> command in the debugger, which toggles tracing 
mode, now accepts a
 numerical argument that determines how many levels of subroutine calls to
 trace.
 
+=head2 Return value of C<tied>
+
+The value returned by C<tied> on a tied variable is now the actual scalar
+that holds the object to which the variable is tied.  This allows ties to
+be weakened with C<Scalar::Util::weaken(tied $tied_variable)>.
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -117,7 +124,9 @@ C<substr> has changed.
 Passing a substring of a read-only value or a typeglob to a function 
(potential lvalue context) no longer causes an immediate "Can't coerce" or 
"Modification of a read-only value" error.  That error  ... [18 chars truncated]
 when the value passed is assigned to.
 
-The same thing happens with the "substr outside of string" error.
+The same thing happens with the "substr outside of string" error.  If the
+lvalue is only read, not written to, it is now just a warning, as with
+rvalue C<substr>.
 
 =item *
 
@@ -172,6 +181,12 @@ Assign to a variable that holds a typeglob or 
copy-on-write scalar is now
 much faster.  Previously the typeglob would be stringified or the
 copy-on-write scalar would be copied before being clobbered.
 
+=item *
+
+Assignment to a substring in void context is now more than twice its
+previous speed.  Instead of creating and returning a special lvalue scalar
+that is then assigned to, C<substr> modifies the original string itself.
+
 =back
 
 =head1 Modules and Pragmata
@@ -278,6 +293,16 @@ replaces ----- with -{}-{}-{}-{}-
 
 =item *
 
+L<POSIX> has been upgraded from version 1.26 to 1.27.
+
+It no longer produces a "Constant subroutine TCSANOW redefined" warning on
+Windows.
+
+XXX When did it start producing that warning?  Was it post-5.15.5?  Even if
+it was not, adding a note will help whoever compiles perl5160delta.
+
+=item *
+
 L<Unicode::Collate> has been upgraded from version 0.85 to version 0.87.
 
 Tailored compatibility ideographs as well as unified ideographs for
@@ -639,6 +664,12 @@ variable was anything other than a string or typeglob.
 The C<evalbytes> keyword added in 5.15.5 was respecting C<use utf8>
 declarations from the outer scope, when it should have been ignoring them.
 
+=item *
+
+C<goto &func> no longers crashes, but produces an error message, when the
+unwinding of the current subroutine's scope fires a destructor that
+undefines the subroutine being "goneto" [perl #99850].
+
 =back
 
 =head1 Known Problems
diff --git a/t/op/substr.t b/t/op/substr.t
index f93b64c..ceacdf6 100644
--- a/t/op/substr.t
+++ b/t/op/substr.t
@@ -23,7 +23,7 @@ $SIG{__WARN__} = sub {
 
 BEGIN { require './test.pl'; }
 
-plan(380);
+plan(381);
 
 run_tests() unless caller;
 
@@ -42,6 +42,8 @@ eval{substr($a,999,999) = "" ; };# P R Q S
 like ($@, $FATAL_MSG);
 is(substr($a,0,-6), 'abc');  # P=Q R S
 is(substr($a,-3,1), 'x');    # P Q R S
+sub{$b = shift}->(substr($a,999,999));
+is ($w--, 1, 'boundless lvalue substr only warns on fetch');
 
 substr($a,3,3) = 'XYZ';
 is($a, 'abcXYZxyz' );

--
Perl5 Master Repository

Reply via email to