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

<http://perl5.git.perl.org/perl.git/commitdiff/c1fcbf2d3d484c9aeeba6407b3d512d7d27a5799?hp=0000000000000000000000000000000000000000>

        at  c1fcbf2d3d484c9aeeba6407b3d512d7d27a5799 (commit)

- Log -----------------------------------------------------------------
commit c1fcbf2d3d484c9aeeba6407b3d512d7d27a5799
Author: Father Chrysostomos <[email protected]>
Date:   Tue May 15 20:33:45 2012 -0700

    toke.c: EXTEND_BRACKSTACK for brevity
    
    Instead of repeating this five times:
    
        if (PL_lex_brackets > 100)
        Renew(PL_lex_brackstack, PL_lex_brackets + 10, char)
    
    put it in a macro.

M       toke.c

commit ae8d05188221356f8f969371bdd03a3aef681ce5
Author: Father Chrysostomos <[email protected]>
Date:   Tue May 15 20:30:04 2012 -0700

    Make if hide else and elsif from PL_keyword_plugin
    
    We do this by introducing two new states for PL_expect: XIFCOND and
    XELSE.  This allows the lexer to rememeber by the time it reaches
    the ‘}’ in ‘if(...){...}’ that it was parsing an ‘if’ statement.
    PL_expect is XIFCOND between ‘if’ or ‘elsif’ and the following 
‘(’.
    The code for ‘(’ now pushes a PL_expect value on to PL_lex_brackstack,
    just like ‘[’ and ‘{’.  ‘)’ now pops the brackstack.  So 
PL_expect
    is also XIFCOND between the ‘)’ and ‘{’.  ‘{’ pushes XELSE on 
to the
    brackstack if PL_expect was XIFCOND, so that XELSE will be popped off
    the stack and put into PL_expect when ‘}’ is encountered.  ‘else’ 
sets
    PL_expect to XBLOCK.
    
    This means that any code looking for the beginning of a statement must
    check for XELSE as well as XSTATE, so I put that in a macro.
    
    The code for the keyword plugin is now skipped if PL_expect is XELSE
    and the next token is ‘else’ or ‘elsif’.

M       ext/XS-APItest/t/keyword_else.t
M       perl.h
M       toke.c

commit d2816d0c35a68f8a3fa05c7c4de2fa8982972228
Author: Father Chrysostomos <[email protected]>
Date:   Tue May 15 15:01:53 2012 -0700

    Consistent spaces after dots in CORE.pod

M       lib/CORE.pod

commit a754848c36117602ab43e0e722ce11fd941be75e
Author: Father Chrysostomos <[email protected]>
Date:   Tue May 15 14:42:50 2012 -0700

    Update CORE.pod to reflect the new coresubs

M       lib/CORE.pod

commit 32ca2e01abac2b8a2c629fa3348f14f9701cb986
Author: Father Chrysostomos <[email protected]>
Date:   Mon May 14 22:26:15 2012 -0700

    Make &CORE::undef(\*_) undefine it properly
    
    Unless called as &CORE::undef (without parentheses) after @_ has been
    set to \*_, it leaves @_ in the ARRAY slot.
    
    This is an implementation detail leaking through.
    
    pp_entersub temporarily aliases @_ to a new array, which is restored
    to its previous value on sub exit.
    
    Since &CORE::undef is a perl sub with an op tree containing
    an undef op,
    
    $ ./perl -Ilib -MO=Concise,CORE::undef -e '\&CORE::undef'
    CORE::undef:
    3  <1> leavesublv[1 ref] K/REFC,1 ->(end)
    2     <1> undef sKP/1 ->3
    1        <$> coreargs(IV 44) s ->2
    -e syntax OK
    
    the undef op runs while @_ is localised.
    
    So we should un-localise @_ if we detect that case.
    
    Doing this in pp_coreargs might be a bit of a hack, but it’s less
    code than rewriting &CORE::undef as an XSUB, which would be the
    other option.
    
    Either way, we need a special case, since undef is the only named op
    that touches the ARRAY slot of the glob passed to it.

M       pp.c
M       t/op/coreamp.t

commit b971a35b0ad008a6380547261691bd191b4f3516
Author: Father Chrysostomos <[email protected]>
Date:   Mon May 14 13:19:38 2012 -0700

    TODO tests for ‘if’ hiding ‘else’ from keyword_plugin
    
    As discussed in ticket #108286, ‘else’ and ‘elsif’ should be consid-
    ered part of the ‘if’ construct, rather than separate keywords, when
    parsed.  The same applies to ‘continue {’ after a loop.
    
    Currently PL_keyword_plugin is called for ‘else’ after ‘if’.

M       MANIFEST
M       ext/XS-APItest/APItest.pm
M       ext/XS-APItest/APItest.xs
A       ext/XS-APItest/t/keyword_else.t

commit 69f660dd509962f34bce708de511d13319190093
Author: Father Chrysostomos <[email protected]>
Date:   Mon May 14 09:54:08 2012 -0700

    Increase $XS::APItest::VERSION to 0.39

M       ext/XS-APItest/APItest.pm

commit af372a77d35c7138aad753f45cc48343aab10655
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 6b6ff61355cb95c16ba859552a7f4659cd3c73fe
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

commit 29397a60fb9a2ab8865cef3eb1e0121bcbfe4a53
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 19:05:24 2012 -0700

    Add &CORE::undef
    
    In the error message, we can’t say ‘&CORE::undef operator’, so we
    should be using the op name, rather than the op description.
    
    Instead of using OP_NAME(PL_op->op_next), which would expand to
    
        PL_op->op_next->op_type == OP_CUSTOM
        ? XopENTRY(Perl_custom_op_xop(aTHX_ PL_op->op_next), xop_name)
        : PL_op_name[PL_op->op_next->op_type]
    
    we can simply use PL_op_name[opnum], which should be quicker.
    
    pp_undef can already handle nulls on the stack.
    
    There is one remaining problem.  If &CORE::undef(\*_) is called, *_
    will be undefined while @_ is localised during the sub call, so it
    won’t have the same effect as undef *_.  I don’t know whether this
    should be considered a bug or not, but I could solve it by making
    pp_undef an XSUB.

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

commit 78be49d059810c0a34fb1dc892bc14132761976a
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 18:43:13 2012 -0700

    Don’t crash with &CORE::foo after undefining *_
    
    When a sub is called with & and no parentheses, no @_ is set up.  This
    means the sub call sees the existing @_.  It also means that, if *_
    has been undefined, there is no @_.
    
    pp_coreargs was not accounting for this, and was doing
    AvARRAY(GvAV(PL_defgv)) without checking that GvAV(PL_defgv) was non-
    null.  It crashed as a result.

M       pp.c
M       t/op/coreamp.t

commit fd72f245153782683623fc6d7d880472a0fb1d6a
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 22:06:29 2012 -0700

    Add &CORE::study

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

commit c2f209957b9c10a230d91bb85573ddd316779d9f
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 22:03:55 2012 -0700

    Add &CORE::split

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

commit b8edca2331bc3331e1f445d2302f7bfd5c2011f8
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 21:54:03 2012 -0700

    Add &CORE::scalar

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

commit ecc954fbb909f5bb0aa761dcb6b89f721c4af7e8
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 21:48:58 2012 -0700

    pp.c:pp_coreargs: use PL_op_desc instead of OP_DESC
    
    Instead of using OP_DESC on op_next, since we already know the op
    number, we can just go straight to PL_op_desc, which is what OP_DESC
    itself uses after looking inside op_next to find out what the op
    number is.
    
    BTW, &CORE::scalar will need this, since a scalar op is never actu-
    ally executed, making coreargs’ op_next pointer point to another op
    than expected:
    
    2  <1> leavesublv[1 ref] K/REFC,1 ->(end)
    -     <1> scalar sKP/1 ->2
    1        <$> coreargs(IV 2) s ->2
    -e syntax OK
    
    Otherwise we get ‘Not enough arguments for lvalue subroutine return’.

M       pp.c

commit 929d4f003e1673b719f22cb440cd5ee164fc322e
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 20:48:02 2012 -0700

    [perl #105926] Make ‘require 6’ a syntactic special case
    
    This commit moves the special-casing for ‘require 6’ from pp_require
    (run time) to op.c (optree-building time).  If the argument to require
    is a constant (not counting folded constants) that is a number or a
    vstring, the require op is flagged as being a version check, with the
    newly-added OPpREQUIRE_VER flag.
    
    This means that ‘require $ver’ no longer works, which could be consid-
    ered an incompatible change (some tests had to change), but the bug
    fix below makes it worth it.
    
    Since CORE::require($_[0]) will no longer work from an override (actu-
    ally a callback; see perl #108286), overrides are no longer called for
    version checks like ‘require 5’.  The tests for this are marked to-do
    for now, as they will be re-enabled (with ‘use feature "overrides"’)
    when the ‘overrides’ feature comes into effect.
    
    I left the lexing part of require as it was, since, although it is
    clearly buggy, it is not clear exactly how things are supposed to
    work.  See perl #107004.
    
    This is the bug fix we get as a result:
    
    These two lines:
    
        $x = "6"; require $x;
        $x = "6"; 0+$x; require $x;
    
    should behave exactly the same way, but the latter was a version
    check.  Now they are both file names.  And this no longer happens:
    
        $ perl5.12.4 -le '$x = "34 cabbages"; 0+$x; require $x'
        Invalid version format (non-numeric data) at -e line 1.
    
    In this case, "34 cabbages" should obviously be a file name, but its
    numeric representation was causing it to be treated as a version num-
    ber; yet the version-parsing code used the string representation.

M       ext/B/B/Concise.pm
M       op.c
M       op.h
M       pp_ctl.c
M       t/comp/require.t
M       t/op/override.t

commit ea66128121c98cf4e664053b5097e70bbed04787
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 20:27:46 2012 -0700

    Test that ‘require v5’ ignores sub named v5
    
    This is something I broke in my first (unapplied) attempt to clean up
    require’s parsing madness.

M       t/comp/require.t

commit 1e48787076e2c0ef6ffc89fb5676bf88d987f0ee
Author: Father Chrysostomos <[email protected]>
Date:   Fri May 11 20:13:01 2012 -0700

    Make while(each ...) imply defined($_ = ...)
    
    This came up in ticket #108286.
    
    Quoting Nicholas Clark:
    >
    >     while (<STDIN>)
    >     while (<*>)
    >
    > These both always implicitly assigned to $_, always implicitly
    > added defined.
    >
    >     while ($_ = <STDIN>)
    >     while ($a = <STDIN>)
    >     while ($_ = <*>)
    >     while ($a = <*>)
    >     while ($_ = readdir D)
    >     while ($a = readdir D)
    >     while ($_ = each %h)
    >     while ($a = each %h)
    >
    > The implicit defined added was by commit 4b161ae29769b4a3,
    > //depot/maint-5.004/perl@949
    >
    >
    > BUT:
    >
    >     while (readdir D)
    >
    > The implicit assignment to $_ and defined test were both added in
    > *2009* (by commit 114c60ecb1f7)
    >
    >
    > leaving:
    >
    >     while (each %h)
    >
    >
    > So it is the odd one out. And in 2009 we felt comfortable to add
    > both the implicit assignment and the defined test in blead for
    > readdir, as a bug fix, and have had no reports of it caus-
    > ing problems.
    
    [He asked:]
    > > > So that's a bug?
    
    [And I responded:]
    > > That's what I was trying to ask. :-)
    >
    > OK, after a quite a bit of deliberation and digging, I'm of the opinion 
that
    >
    > 1: yes, it's a bug
    
    ...
    
    > So, there's only one use of while(each %...) on CPAN outside of
    > debugging or test code, and that's only go the potential to break
    > due to assignment now happening to to $_. Compared with 29 matches
    > for while\s*\(\s*readdir of which 4 are .pm files. So
    >
    > 2: I think it's safe to fix it, just like readdir was fixed.
    
    Just *as* readdir was fixed! :-)

M       op.c
M       t/op/defins.t

commit 784fabb61d1554db31fa6bd9ed5d26b9f7da8aea
Author: Father Chrysostomos <[email protected]>
Date:   Thu May 3 09:12:03 2012 -0700

    override.t: Remove obsolete comment

M       t/op/override.t

commit 71ec6d71e0f2e49276e558d19cb5816b885cafbc
Author: Father Chrysostomos <[email protected]>
Date:   Wed May 2 20:37:12 2012 -0700

    require_errors.t: Test <> error

M       t/op/require_errors.t

commit 947d84f66ec527e3d52ca085f045b7e3746ac13f
Author: Father Chrysostomos <[email protected]>
Date:   Wed May 2 20:36:20 2012 -0700

    Allow require_errors.t to be run from the top level

M       t/op/require_errors.t

commit 86f3f7cf380a963a52f274e10893fa5056766c8f
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 30 18:18:03 2012 -0700

    Record folded constants in the op tree

M       dump.c
M       ext/B/B/Concise.pm
M       ext/B/t/optree_constants.t
M       ext/B/t/optree_samples.t
M       op.c
M       op.h
M       toke.c

commit 02c4651c4735163235915156a01591dc59eadc48
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 30 18:04:23 2012 -0700

    Remove OPpCONST_WARNING from B::Concise

M       ext/B/B/Concise.pm

commit b37f549fcf3d3b47b667160b1ac38ccf16810a6d
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 30 18:03:27 2012 -0700

    Increase $B::Concise::VERSION to 0.90

M       ext/B/B/Concise.pm

commit 81abb0c3f1b6dbea7e5321392d0f1d49598936eb
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 30 17:46:48 2012 -0700

    Remove OPpCONST_WARNING
    
    This was added to op.h in commit 599cee73:
    
    commit 599cee73f2261c5e09cde7ceba3f9a896989e117
    Author: Paul Marquess <[email protected]>
    Date:   Wed Jul 29 10:28:45 1998 +0100
    
        lexical warnings; tweaks to places that didn't apply correctly
                Message-Id: <[email protected]>
                Subject: lexical warnings patch for 5.005_50
    
        p4raw-id: //depot/perl@1773
    
    dump.c was modified to dump in, in this commit:
    
    commit bf91b999b25fa75a3ef7a327742929592a2e7e9c
    Author: Simon Cozens <[email protected]>
    Date:   Sun May 13 21:20:36 2001 +0100
    
        Op private flags
        Message-ID: <[email protected]>
    
        p4raw-id: //depot/perl@10117
    
    But is apparently completely unused anywhere.  And I want that bit.

M       dump.c
M       op.h

commit 647d2fce25029c7fe00be288dce4087ce8393382
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 30 08:49:32 2012 -0700

    Add &CORE::prototype

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

commit 09e4cf8944aadfb3f4c592190bc72abfcadcc85f
Author: Father Chrysostomos <[email protected]>
Date:   Sun Apr 29 21:16:51 2012 -0700

    coreamp.t: rename badly-named tests

M       t/op/coreamp.t

commit 0eeded7eea41fdcc8e42dcd4a97adedcafeabf49
Author: Father Chrysostomos <[email protected]>
Date:   Sun Apr 29 21:15:25 2012 -0700

    Add &CORE::pos

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

commit 3394f3a697334d2da0181a1ce2195ecd47817b5f
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 22:30:06 2012 -0700

    Make pos use ck_fun and OA_SCALARREF
    
    See the previous commit.  The same applies here.
    
    In short, this allows core_prototype and pp_coreargs to be simpler.

M       opcode.h
M       regen/opcodes

commit 0835a231679c3857e79f45452dcad620573fb37f
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 14:25:44 2012 -0700

    Make undef use ck_fun and OA_SCALARREF
    
    In regen/opcodes, we have some operators that use ck_fun and have R
    for the argument.  And there are some that use ck_lfun and have S for
    the argument.
    
    These both amount to more or less the same thing.
    
    ck_fun/R goes through the OA_SCALARREF case in ck_fun, which calls
    op_lvalue(scalar()) on the child op.
    
    ck_lfun/S goes through the OA_SCALAR case in ck_fun, which calls
    scalar(), and then ck_lfun sees to it that op_lvalue is called.
    
    The only real difference is that the OA_SCALAR case makes sure there
    are not too many arguments.
    
    Since both core_prototype and pp_coreargs need special cases to deal
    with OA_SCALAR that is really ‘supposed’ to be OA_SCALARREF, it
    becomes simpler to add &CORE::undef if undef uses R.  In that case,
    we also have to put the argument-checking in the OA_SCALARREF, but we
    make it conditional on the op being an undef op, for the sake of doing
    one thing at a time.  (This is a bit of a mess; see ticket #96006.)

M       op.c
M       opcode.h
M       regen/opcodes

commit 56626819f17fa770dad14402851f547582110940
Author: Father Chrysostomos <[email protected]>
Date:   Sun Apr 29 17:58:44 2012 -0700

    Add &CORE::glob
    
    I added a special case for OP_GLOB to pp_coreargs, since glob does not
    have the u flag in regen/opcodes; hence PL_opargs[opnum] & OA_DEFGV is
    false, even though glob does imply $_.
    
    Adding the flag to regen/opcodes is not so simple, as the code in
    ck_fun that adds the DEFSV op does not account for list ops, but
    leaves op_last unchanged.
    
    Changing ck_fun to account requires adding more code than this special
    case in pp_coreargs.
    
    OPf_SPECIAL indicates that glob was called with the CORE:: prefix.

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

commit 1e945797147b3224a866e461bffde94d7e32d476
Author: Father Chrysostomos <[email protected]>
Date:   Sun Apr 29 11:11:15 2012 -0700

    op.c:ck_glob: Don’t do gv_fetchpv("CORE::GLOBAL::glob")
    
    We have PL_globalstash precisely to avoid the nested stash lookup in
    cases like these.

M       op.c

commit 916af742aba6b806f9eb188fe4badd251fe4d147
Author: Father Chrysostomos <[email protected]>
Date:   Sun Apr 29 00:11:10 2012 -0700

    op.c:ck_require: Ignore sub prototype
    
    The require operator doesn’t allow its syntax to be overridden.  But
    it was still calling an override’s call checker anyway, resulting in
    strange effects like this:
    
    $ perl -e 'use subs "require"; sub require($$){}; require(1,2)'
    Not enough arguments for main::require at -e line 1, at EOF
    Execution of -e aborted due to compilation errors.
    $ perl -e 'use subs "require"; sub require(){}; require()'
    Too many arguments for main::require at -e line 1, at EOF
    Execution of -e aborted due to compilation errors.
    
    The sub’s own prototype should either apply or not apply; we should
    not have some hybrid behaviour half way in between.
    
    In this case, since require has its own parsing, that should take
    precedence.

M       op.c
M       t/comp/bproto.t

commit ab8ce2a4d3b360c250d973aa290e1caaadb53c12
Author: Father Chrysostomos <[email protected]>
Date:   Sun Apr 29 00:06:51 2012 -0700

    op.c:ck_glob: Ignore sub prototype
    
    The glob operator doesn’t allow its syntax to be overridden.  But it
    was still calling an override’s call checker anyway, resulting in
    strange effects like this:
    
    $ perl5.15.9 -e 'use subs "glob"; sub glob($$){} glob 1,2'
    Too many arguments for glob at -e line 1, at EOF
    Not enough arguments for main::glob at -e line 1, at EOF
    Execution of -e aborted due to compilation errors.
    
    The sub’s own prototype should either apply or not apply; we should
    not have some hybrid behaviour half way in between (two many and not
    enough at the same time‽).
    
    In this case, since glob has its own parsing, that should take
    precedence.

M       op.c
M       t/comp/bproto.t

commit 5d7dea14ae56c5472e979f1de4d0f8f6ffe9e913
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 23:59:46 2012 -0700

    op.c:dofile: Ignore sub prototype
    
    The do-FILE operator doesn’t allow its syntax to be overridden.  But
    it was still calling an override’s call checker anyway, resulting in
    strange effects like this:
    
    $ perl -e 'use subs "do"; sub do($$){}; do(1,2)'
    Not enough arguments for main::do at -e line 1, at EOF
    Execution of -e aborted due to compilation errors.
    $ perl -e 'use subs "do"; sub do(){}; do()'
    Too many arguments for main::do at -e line 1, at EOF
    Execution of -e aborted due to compilation errors.
    
    The sub’s own prototype should either apply or not apply; we should
    not have some hybrid behaviour half way in between.
    
    In this case, since ‘do’ has its own parsing, that should take
    precedence.

M       op.c
M       t/comp/bproto.t

commit 82a5cc4faee1a0f640d84b0dc2234519000c6d72
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 23:46:03 2012 -0700

    op.c: Remove a redundant ck_subr call from ck_require
    
    newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so wrapping it in
    ck_subr(...) is unnecessary and wasteful of precious CPU time.

M       op.c

commit 2e5368c1fcae252631bbcedd3651fd3a70aab174
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 23:45:37 2012 -0700

    op.c: Remove a redundant ck_subr call from ck_glob
    
    newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so calling ck_subr on
    its return value is unnecessary and wasteful of precious CPU time.

M       op.c

commit 59f78796ddbbf1adec1365df83fb799474fbd1a0
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 23:43:42 2012 -0700

    op.c: Remove a redundant ck_subr call from dofile
    
    newUNOP(OP_ENTERSUB, ...) already calls ck_subr, so wrapping it in
    ck_subr(...) is unnecessary and wasteful of precious CPU time.

M       op.c

commit 5948346f6f706fa21cde755324eb8fd2366a6b58
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 21:27:40 2012 -0700

    op.c:ck_glob: Check PL_globhook before loading File::Glob
    
    By loading File::Glob when there is no CORE::GLOBAL::glob, we just end
    up calling Perl_load_module for every glob op, since File::Glob no
    longer uses CORE::GLOBAL::glob by default.
    
    We could just as well check whether PL_globhook is set, which would
    be faster.
    
    (File::Glob sets PL_globhook when it loads.  In 5.14, it didn’t
    set anything, but ck_glob itself would set CORE::GLOBAL::glob to
    File::Glob::csh_glob.)

M       op.c

commit b5a85c158f70da394f61ee8818cf8438e0bcbdee
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 00:26:39 2012 -0700

    Remove the second param to tryAMAGICunTARGET
    
    This macro is unused on CPAN and completely undocumented, so this
    change should be safe.

M       pp.h
M       pp_hot.c
M       pp_sys.c

commit 934b8b23221edbc99312dcd8a519d309d87480ff
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 00:24:01 2012 -0700

    Zap PL_glob_index
    
    As of the previous commit, nothing is using it.

M       embedvar.h
M       intrpvar.h
M       sv.c

commit f124e10f4eb51c69a7a5edb6a41d4a59e066842e
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 00:18:30 2012 -0700

    Stop using PL_glob_index for PL_globhook
    
    If Glob.xs just uses the address of PL_op as its iterator key all the
    time (when called via PL_globhook too, not just via a glob override),
    the code is simpler.

M       ext/File-Glob/Glob.xs
M       op.c
M       pp_sys.c

commit 5a5b2acb18f5ece0e152366fba70abebc0672a2a
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 28 00:16:25 2012 -0700

    Test <> ovrld with glob override
    
    In the previous commit, I almost screwed up the stack for those cases
    where glob is overridden and there is iterator overloading.

M       lib/overload.t

commit 14f6050642aa4c7586a1b1f188ca7998a1ea70d8
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 19:50:44 2012 -0700

    Don’t pass PL_glob_index to glob overrides
    
    This magic second argument is undocumented, unused on CPAN and in the
    core (as of the last few commits), and getting in the way of allowing
    glob() to be overridden properly.
    
    It gets in the way because, under the ‘overrides’ feature (still a
    no-op), the glob keyword will be truly overridable, with no magic
    involved, but it will still be called by the built-in <...> operator,
    which consequently must not pass any magic second argument.
    
    See <https://rt.perl.org/rt3/Ticket/Display.html?id=108286>.

M       op.c
M       pp_sys.c

commit d1fbfe98d1b097d5e94dd4dae1d64f1320d6066c
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 17:08:15 2012 -0700

    File::Glob: Don’t use the magic 2nd arg to glob
    
    This argument is going away, because it is undocumented, unused on
    CPAN outside of the core, and getting in the way of allowing glob() to
    be overridden properly.
    
    It gets in the way because, under the ‘overrides’ feature (still a
    no-op), the glob keyword will be truly overridable, with no magic
    involved, but it will still be called by the built-in <...> operator,
    which consequently must not pass any magic second argument.
    
    See <https://rt.perl.org/rt3/Ticket/Display.html?id=108286>.

M       ext/File-Glob/Glob.pm
M       ext/File-Glob/Glob.xs

commit 76082591d1c3b5a9a22ca72a02dc0af8fb127129
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 17:06:19 2012 -0700

    Increase $File::Glob::VERSION to 1.18

M       ext/File-Glob/Glob.pm

commit 72ced2b9ff86019cf09e737059d9a385f131918d
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 16:48:36 2012 -0700

    DosGlob: Don’t use the magic 2nd arg to glob
    
    This argument is going away, because it is undocumented, unused on
    CPAN outside of the core, and getting in the way of allowing glob() to
    be overridden properly.
    
    It gets in the way because, under the ‘overrides’ feature (still a
    no-op), the glob keyword will be truly overridable, with no magic
    involved, but it will still be called by the built-in <...> operator,
    which consequently must not pass any magic second argument.
    
    See <https://rt.perl.org/rt3/Ticket/Display.html?id=108286>.

M       MANIFEST
A       ext/File-DosGlob/DosGlob.xs
M       ext/File-DosGlob/lib/File/DosGlob.pm
M       ext/File-DosGlob/t/DosGlob.t

commit e75f6b14f0e0a98143e0ba1c67b8e8715db0f6b0
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 16:39:02 2012 -0700

    Increase $File::DosGlob::VERSION to 1.07

M       ext/File-DosGlob/lib/File/DosGlob.pm

commit 25d849baf445a2959d3370ce25d6f421fca79a01
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 14:05:39 2012 -0700

    Move File::DosGlob from lib to ext

M       MANIFEST
M       Porting/Maintainers.pl
A       ext/File-DosGlob/lib/File/DosGlob.pm
A       ext/File-DosGlob/t/DosGlob.t
D       lib/File/DosGlob.pm
D       lib/File/DosGlob.t

commit 764ec08c45c26d93bfe90decfda6c1bd53e03178
Author: Father Chrysostomos <[email protected]>
Date:   Fri Apr 27 09:53:16 2012 -0700

    Add &CORE::exists

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

commit fa80feb7449a09f8adf93c28336815dc48c3587a
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 20:40:48 2012 -0700

    Add &CORE::delete

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

commit d54663469bf86e1129ec63f4ec2e26199b58149e
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 20:38:37 2012 -0700

    Add &CORE::defined

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

commit a0b06a4d7951a9b12fe8d08e9eac2fb924b300d9
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 20:36:03 2012 -0700

    coresubs.t: Explicitly skip all unsupported keywords
    
    Instead of skipping positive keywords (those that cannot be over-
    ridden) because of their positivity, list them explicitly in the
    skip list.
    
    This will allow them to be removed one by one.

M       t/op/coresubs.t

commit 0131174a94023bcf40b4ef350dc6e332b7bbb225
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 20:31:22 2012 -0700

    coreamp.t: Explicitly skip all unsupported keywords
    
    Instead of skipping positive keywords (those that cannot be over-
    ridden) because of their positivity, list them explicitly in the
    skip list.
    
    This will allow them to be removed one by one.

M       t/op/coreamp.t

commit f51937b6af2e7c663b5e432010ffefa387f6f0d8
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 17:56:46 2012 -0700

    gv.c: List all keywords with no coresubs
    
    S_maybe_add_coresub returns NULL for any keywords that are not
    overridable.
    
    Instead of identifying them by the positivity of their codes, list
    them all explicitly.
    
    This will allow coresubs to be added for them one by one.

M       gv.c

commit ac1c559e5ab7d7fdd779743ee45bba8143441eca
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 15:49:22 2012 -0700

    dump.c: Dump CVf_IN_OVERRIDES

M       dump.c

commit d0e42aaa402a434ebb5896389078494b46de69d5
Author: Father Chrysostomos <[email protected]>
Date:   Thu Apr 26 15:47:49 2012 -0700

    op.c: Record whether subs are compiled under overrides feature

M       op.c

commit 5f8ed4d8738dd697b87a0fb4efdfe5747eb87e97
Author: Father Chrysostomos <[email protected]>
Date:   Wed Apr 25 22:30:34 2012 -0700

    cv.h: Add CVf_IN_OVERRIDES flag
    
    This will be used to indicate that a sub was compiled under the
    ‘overrides’ feature.

M       cv.h

commit fef53228db7fe173907c90ca44e7fcea5dbcdf54
Author: Father Chrysostomos <[email protected]>
Date:   Tue Apr 24 06:24:50 2012 -0700

    Increase $feature::VERSION to 1.28

M       lib/feature.pm
M       regen/feature.pl

commit 59bf9e3a774ae6bc2c7e00c9d0913df6bd4df34d
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 23 23:19:32 2012 -0700

    Add overrides feature
    
    It doesn’t do anything yet.

M       feature.h
M       lib/feature.pm
M       regen/feature.pl

commit 3b63d6b58225a79662de3dd684ae6cc01d6b8c84
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 23 23:17:42 2012 -0700

    Add 5.17-18 feature bundles

M       lib/feature.pm
M       regen/feature.pl

commit 2145bcfcc9d50c870fa611dfc43a9b902a881667
Author: Father Chrysostomos <[email protected]>
Date:   Mon Apr 23 22:55:48 2012 -0700

    Update perlfunc/prototype
    
    to account for the new inconsequentiality of non-overridability.

M       pod/perlfunc.pod

commit d35160a31f25f421b4210c1abac74ccf7d62a327
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 21 19:12:21 2012 -0700

    [perl #97478] Make ‘Can’t find opnumber’ UTF-8- and null-clean

M       pp.c
M       t/comp/proto.t

commit 5424224bddb6d619bd6c41425bf8b1fc355b4cef
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 21 18:55:38 2012 -0700

    cproto.t: Add tests for BEGIN, etc.

M       t/op/cproto.t

commit b5edb6e080a5eb7fc74ecf3a1506027a37a9c28c
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 21 18:30:35 2012 -0700

    Make cproto.t more stringent
    
    It was allowing prototype() to return undef where an empty string
    was expected.

M       t/op/cproto.t

commit 832e5dab945ca4e5cb4a3f50a0d972288cd4f0c8
Author: Father Chrysostomos <[email protected]>
Date:   Sat Apr 21 12:50:25 2012 -0700

    Add protos for positive keywords
    
    ‘Positive’ means having a + before it in regen/keywords.pl; i.e., key-
    words that cannot be overridden.
    
    Since all keywords are going to be overridable, it makes sense to
    return prototypes for all that can have them, which turns out to be
    only a handful.

M       op.c
M       pp.c
M       t/op/cproto.t

commit a4e5077b9dbb337f304f6739bfb6f9df8746b17b
Author: Father Chrysostomos <[email protected]>
Date:   Sat May 12 13:03:54 2012 -0700

    Make pos(@array) and pos(%hash) into errors
    
    Currently pos has an effective prototype of (;\[$@%*]), and what it
    does is rather interesting.
    
    First, it produces a strange uninitialized warning:
    
    $ ./perl -Ilib -we 'pos my @a = 3'
    Use of uninitialized value within @a in scalar assignment at -e line 1.
    
    There is no uninitialized value here.  The value ‘within @a’ is actu-
    ally @a itself.  The code that produces the error message was written
    under the (perfectly logical) assumption that an array would never be
    passed to report_uninit().
    
    Secondly, it adds pos magic to the array itself:
    
    $ ./perl -Ilib -e 'pos @a = 3; use Devel::Peek; Dump \@a'
    SV = IV(0x8039fc) at 0x803a00
      REFCNT = 1
      FLAGS = (TEMP,ROK)
      RV = 0x825b90
      SV = PVAV(0x804a04) at 0x825b90
        REFCNT = 2
        FLAGS = (SMG)
        MAGIC = 0x30cb20
          MG_VIRTUAL = &PL_vtbl_mglob
          MG_TYPE = PERL_MAGIC_regex_global(g)
        ARRAY = 0x0
        FILL = -1
        MAX = -1
        ARYLEN = 0x0
        FLAGS = (REAL)
    
    This magic can never be used, as @a =~ /foo/g is equivalent to
    scalar(@a) =~ /foo/g, and scalar(@a) returns a scalar containing the
    length of the array, not the array itself.
    
    This seems clearly a mistake.
    
    pos forces lvalue context on its argument, making pos(3) a compile-
    time error.
    
    Internally, the main distinction between \$ (scalar lvalue) and
    \[$@%*] (scalar lvalue, or some other type) prototypes is that the
    function S_scalar_mod_type returns true for functions with the former,
    but false for functions with the latter.  (Tangentially, \[$@%*] and
    \[$@%&*] are distinguished by the special-casing in op_lvalue_flags
    under case OP_ENTERSUB.)
    
    S_scalar_mod_type returns false for pos.  I think it should return
    true.  That is what this commit does, resulting in consistency
    with read():
    
    $ ./perl -Ilib -we 'read($1, @2, $3)'
    Can't modify array dereference in read at -e line 1, near "$3)
    "
    Execution of -e aborted due to compilation errors.
    $ ./perl -Ilib -we 'pos(@2)'
    Can't modify array dereference in match position at -e line 1, near "@2)
    "
    Execution of -e aborted due to compilation errors.
    
    Except when it comes to globs, since read refuses *foo for its second
    argument, but pos(*foo) has always Just Worked, so there is no reason
    to forbid it.
    
    So, now, pos has an effective prototype of (;\[$*]).

M       op.c
M       t/op/pos.t
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to