In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a5c70c4d9272459b07b8ddb9d839351659a0aea8?hp=891dc8cf20b83652992037eaa42fae1705392c33>

- Log -----------------------------------------------------------------
commit a5c70c4d9272459b07b8ddb9d839351659a0aea8
Author: Father Chrysostomos <[email protected]>
Date:   Tue Jun 14 13:10:13 2011 -0700

    Allow ‘continue;’ without feature.pm
    
    Since there is no conflict between ‘continue;’ and a user-defined sub-
    routine (it’s a syntax error, as ‘continue’ is already a keyword),
    there is no need to require the ‘switch’ feature to be enabled for
    this keyword.
    
    This actually simplifies the implementation.

M       dist/B-Deparse/t/core.t
M       pod/perldelta.pod
M       t/lib/feature/switch
M       t/op/switch.t
M       toke.c

commit 87d00a71dc3f8397bffdc2e0691c50cb85519a68
Author: Father Chrysostomos <[email protected]>
Date:   Tue Jun 14 12:54:12 2011 -0700

    perldelta up to 571f0e8

M       pod/perldelta.pod
-----------------------------------------------------------------------

Summary of changes:
 dist/B-Deparse/t/core.t |    1 -
 pod/perldelta.pod       |   66 ++++++++++++++++++++++++++++++++++++++++++++---
 t/lib/feature/switch    |   18 +------------
 t/op/switch.t           |    4 +-
 toke.c                  |   13 +--------
 5 files changed, 66 insertions(+), 36 deletions(-)

diff --git a/dist/B-Deparse/t/core.t b/dist/B-Deparse/t/core.t
index 9c832c6..dcf0082 100644
--- a/dist/B-Deparse/t/core.t
+++ b/dist/B-Deparse/t/core.t
@@ -67,7 +67,6 @@ sub CORE_test {
   package test;
   use subs ();
   import subs $keyword;
-  use feature 'switch';
   ::like
       $deparse->coderef2text(
          eval "sub { () = $expr }" or die "$@in $expr"
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index e067934..7cb773f 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -8,8 +8,7 @@ XXX needs to be processed before release. ]
 perldelta - what is new for perl v5.15.0
 
 =for comment
-This has been completed up to 71edc89419f1, but some commits after that
-already have entries.
+This has been completed up to 571f0e8.
 
 =head1 DESCRIPTION
 
@@ -42,6 +41,15 @@ here, but most should go in the L</Performance Enhancements> 
section.
 The C<CORE::> prefix can now be used on keywords enabled by
 L<feature.pm|feature>, even outside the scope of C<use feature>.
 
+=head2 C<continue> no longer requires the "switch" feature
+
+The C<continue> keyword has two meanings.  It can introduce a C<continue>
+block after a loop, or it can exit the current C<when> block.  Up till now,
+the latter meaning was only valid with the "switch" feature enabled, and
+was a syntax error otherwise.  Since the main purpose of feature.pm is to
+avoid conflicts with user-defined subroutines, there is no reason for
+C<continue> to depend on it.
+
 =head2 C<$$> can be assigned to
 
 C<$$> was made read-only in Perl 5.8.0.  But only sometimes: C<local $$>
@@ -50,6 +58,11 @@ XS code to bypass the read-only check, so there is no reason 
to keep C<$$>
 read-only.  (This change also allowed a bug to be fixed while maintaining
 backward compatibility.)
 
+=head2 Features inside the debugger
+
+The current Perl's feature bundle is now enabled for commands entered in
+the interactive debugger.
+
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -62,6 +75,23 @@ L</Selected Bug Fixes> section.
 
 [ List each incompatible change as a =head2 entry ]
 
+=head2 Tying scalars that hold typeglobs
+
+Attempting to tie a scalar after a typeglob was assigned to it would
+instead tie the handle in the typeglob's IO slot.  This meant that it was
+impossible to tie the scalar itself.  Similar problems affected C<tied> and
+C<untie>: C<tied $scalar> would return false on a tied scalar if the last
+thing returned was a typeglob, and C<untie $scalar> on such a tied scalar
+would do nothing.
+
+We fixed this problem before Perl 5.14.0, but it caused problems with some
+CPAN modules, so we put in a deprecation cycle instead.
+
+Now the deprecation has been removed and this bug has been fixed.  So
+C<tie $scalar> will always tie the scalar, not the handle it holds.  To tie
+the handle, use C<tie *$scalar> (with an explicit asterisk).  The same
+applies to C<tied *$scalar> and C<untie *$scalar>.
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -292,6 +322,23 @@ Fixes a bug which prevented duplicating numeric file 
descriptors on Windows.
 
 =item *
 
+L<Math::BigFloat> has been upgraded from version 1.993 to 1.994.
+
+The C<numify> method has been corrected to return a normalised Perl number
+(the result of C<0 + $thing>), instead of a string [rt.cpan.org #66732].
+
+=item *
+
+L<Math::BigInt> has been upgraded from version 1.994 to 1.995.
+
+It provides a new C<bsgn> method that complements the C<babs> method.
+
+It fixes the internal C<objectify> function's handling of "foreign objects"
+so they are converted to the appropriate class (Math::BigInt or
+Math::BigFloat).
+
+=item *
+
 L<Math::Complex> has been upgraded from version 1.56 to version 1.57.
 
 Correct copy constructor usage.
@@ -951,8 +998,8 @@ Autovivification now works on values returned from lvalue 
subroutines
 When called in pass-by-reference context (e.g., subroutine arguments or a list
 passed to C<for>), an lvalue subroutine returning arrays or hashes used to bind
 the arrays (or hashes) to scalar variables--something that is not supposed to
-happen.  This could result in "Bizzare copy of ARRAY" errors or C<print>
-ignoring its arguments.  It also made non-sensical code like C<@{\$_}> "work".
+happen.  This could result in "Bizarre copy of ARRAY" errors or C<print>
+ignoring its arguments.  It also made nonsensical code like C<@{\$_}> "work".
 This was fixed in 5.14.0 if an array were the first thing returned from the
 subroutine (but not for C<$scalar, @array> or hashes being returned).  Now a
 more general fix has been applied [RT #23790].
@@ -1083,6 +1130,17 @@ C<ST>
 were previously unrecognized by C<\N{}>,
 vianame(), and string_vianame().
 
+=item *
+
+Some cases of threads crashing due to memory allocation during cloning have
+been fixed [RT #90006].
+
+=item *
+
+Attempting to C<goto> out of a tied handle method used to cause memory
+corruption or crashes.  Now it produces an error message instead
+[RT #8611].
+
 =back
 
 =head2 Additional fixes by ticket number
diff --git a/t/lib/feature/switch b/t/lib/feature/switch
index 022cbd1..5da635b 100644
--- a/t/lib/feature/switch
+++ b/t/lib/feature/switch
@@ -33,8 +33,7 @@ break
 # No switch; but continue is still a keyword
 print STDOUT continue;
 EXPECT
-syntax error at - line 2, near "STDOUT continue"
-Execution of - aborted due to compilation errors.
+Can't "continue" outside a when block at - line 2.
 ########
 # Use switch; so given is a keyword
 use feature 'switch';
@@ -60,12 +59,6 @@ break;
 EXPECT
 Can't "break" outside a given block at - line 3.
 ########
-# Use switch; so continue is a keyword
-use feature 'switch';
-continue;
-EXPECT
-Can't "continue" outside a when block at - line 3.
-########
 # switch out of scope; given should be a bareword.
 use warnings;
 { use feature 'switch';
@@ -109,15 +102,6 @@ EXPECT
 Unquoted string "break" may clash with future reserved word at - line 6.
 break
 ########
-# switch out of scope; continue should not work
-{ use feature 'switch';
-  given (1) { default {continue} }  
-}
-print STDOUT continue;
-EXPECT
-syntax error at - line 5, near "STDOUT continue"
-Execution of - aborted due to compilation errors.
-########
 # C<no feature 'switch'> should work
 use warnings;
 use feature 'switch';
diff --git a/t/op/switch.t b/t/op/switch.t
index bb7569d..ba4fc40 100644
--- a/t/op/switch.t
+++ b/t/op/switch.t
@@ -18,8 +18,8 @@ plan tests => 168;
 
 # Before loading feature, test the switch ops with CORE::
 CORE::given(3) {
-    CORE::when(3) { pass "CORE::given and CORE::when"; CORE::continue }
-    CORE::default { pass "CORE::continue and CORE::default" }
+    CORE::when(3) { pass "CORE::given and CORE::when"; continue }
+    CORE::default { pass "continue (without feature) and CORE::default" }
 }
 
 
diff --git a/toke.c b/toke.c
index 1e4beee..3686162 100644
--- a/toke.c
+++ b/toke.c
@@ -7059,8 +7059,7 @@ Perl_yylex(pTHX)
                    Perl_croak(aTHX_ "CORE::%s is not a keyword", PL_tokenbuf);
                if (tmp < 0)
                    tmp = -tmp;
-               if (tmp == KEY_require || tmp == KEY_do ||
-                   tmp == KEY_continue)
+               else if (tmp == KEY_require || tmp == KEY_do)
                    /* that's a way to remember we saw "CORE::" */
                    orig_keyword = tmp;
                goto reserved_word;
@@ -7100,14 +7099,6 @@ Perl_yylex(pTHX)
            UNI(OP_CHOP);
 
        case KEY_continue:
-           /* When 'use switch' is in effect or when
-              prefixed with CORE::, continue has a dual
-              life as a control operator. */
-           {
-               if (  !FEATURE_IS_ENABLED("switch")
-                  && orig_keyword != KEY_continue  )
-                   PREBLOCK(CONTINUE);
-               else {
                    /* We have to disambiguate the two senses of
                      "continue". If the next token is a '{' then
                      treat it as the start of a continue block;
@@ -7118,8 +7109,6 @@ Perl_yylex(pTHX)
            PREBLOCK(CONTINUE);
                    else
                        FUN0(OP_CONTINUE);
-               }
-           }
 
        case KEY_chdir:
            /* may use HOME */

--
Perl5 Master Repository

Reply via email to