In perl.git, the branch sprout/overridesδ has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/58737cac8005fb1e126ff55283511c56ad8795f4?hp=81c9864a554a487bd8b9c58aa3a8e0afb230e874>

- Log -----------------------------------------------------------------
commit 58737cac8005fb1e126ff55283511c56ad8795f4
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 23:18:50 2012 -0700

    &CORE::undef should be an lvalue sub

M       gv.c
M       t/op/coreamp.t

commit 60b86a13da7a77848c41072a2ec396f57c18ec8f
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 23:10:58 2012 -0700

    op.c: Remove redundant assignment
    
    This was added unnecessarily in commit ddeae0f14c.  It is a local
    variable assigned to just before the function returns, so the value
    is never used in the OP_UNDEF case.

M       op.c
-----------------------------------------------------------------------

Summary of changes:
 gv.c           |    3 ++-
 op.c           |    1 -
 t/op/coreamp.t |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gv.c b/gv.c
index 7c1cc08..2b4cb06 100644
--- a/gv.c
+++ b/gv.c
@@ -542,7 +542,8 @@ S_maybe_add_coresub(pTHX_ HV * const stash, GV *gv,
                   1
        );
        assert(GvCV(gv) == cv);
-       if (opnum != OP_VEC && opnum != OP_SUBSTR && opnum != OP_POS)
+       if (opnum != OP_VEC && opnum != OP_SUBSTR && opnum != OP_POS
+        && opnum != OP_UNDEF)
            CvLVALUE_off(cv); /* Now *that* was a neat trick. */
        LEAVE;
        PL_parser = oldparser;
diff --git a/op.c b/op.c
index 2be0e8b..7ef6a9b 100644
--- a/op.c
+++ b/op.c
@@ -1775,7 +1775,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
 
     switch (o->op_type) {
     case OP_UNDEF:
-       localize = 0;
        PL_modcount++;
        return o;
     case OP_STUB:
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 0ac5796..9e271b5 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -899,9 +899,9 @@ ok !defined &utf8::valid, '&undef(\&foo) undefines &foo';
 @_ = \*_;
 &myundef;
 is *_{ARRAY}, undef, '&undef(\*_) undefines *_';
-(${\&myundef()}, @_) = 1..10;
-lis \@_, [2..10], 'list assignment to ${\&undef()}';
-ok !defined undef, 'list assignment to ${\&undef()} does not affect undef'; 
+(&myundef(), @_) = 1..10;
+lis \@_, [2..10], 'list assignment to &undef()';
+ok !defined undef, 'list assignment to &undef() does not affect undef'; 
 undef @_;
 
 test_proto 'unpack';

--
Perl5 Master Repository

Reply via email to