FAQ
Force OP_REQUIRE to scalar context at the end of ck_require and don't let
it become void context.
Fixes problem with require not always being in scalar context.

Gerard Goossen

Search Discussions

  • Gerard Goossen at Nov 16, 2009 at 2:41 pm
    Now includes patch.
    On Mon, Nov 16, 2009 at 02:09:13PM +0100, Gerard Goossen wrote:
    Force OP_REQUIRE to scalar context at the end of ck_require and don't let
    it become void context.
    Fixes problem with require not always being in scalar context.

    Gerard Goossen
  • Rafael Garcia-Suarez at Nov 16, 2009 at 4:13 pm
    That's on top of the add-a-TODO-test patch you sent previously, right ?

    That's odd, because I thought I had fixed that one years ago,
    precisely with the code you removed:

    http://perl5.git.perl.org/perl.git/commitdiff/0c58d367e297133798f6e191e83d3087e2617588

    at a first glance, your code looks more correct than mine; I'll look
    at it more closely when time permits.

    2009/11/16 Gerard Goossen <[email protected]>:
    Now includes patch.
    On Mon, Nov 16, 2009 at 02:09:13PM +0100, Gerard Goossen wrote:
    Force OP_REQUIRE to scalar context at the end of ck_require and don't let
    it become void context.
    Fixes problem with require not always being in scalar context.

    Gerard Goossen


    --
    "You don't mean odds and ends, you mean des curieux et des bouts",
    corrected the manager.
    -- Terry Pratchett, Hogfather
  • Gerard Goossen at Nov 16, 2009 at 4:34 pm

    On Mon, Nov 16, 2009 at 05:13:10PM +0100, Rafael Garcia-Suarez wrote:
    That's on top of the add-a-TODO-test patch you sent previously, right ? Yes.
    That's odd, because I thought I had fixed that one years ago,
    precisely with the code you removed:

    http://perl5.git.perl.org/perl.git/commitdiff/0c58d367e297133798f6e191e83d3087e2617588

    at a first glance, your code looks more correct than mine; I'll look
    at it more closely when time permits.
    That patch only fixed a special case, where the require is at the end of
    an eval, not the other cases where the op doesn't get forced to a context,
    as for example using a "return" as in the TODO test. I made a more general
    fix and removed your fix of the special case.

    Gerard Goossen
  • Rafael Garcia-Suarez at Nov 21, 2009 at 6:43 pm
    Thanks, applied alongside the corresponding regression test patch.

    2009/11/16 Gerard Goossen <[email protected]>:
    Now includes patch.
    On Mon, Nov 16, 2009 at 02:09:13PM +0100, Gerard Goossen wrote:
    Force OP_REQUIRE to scalar context at the end of ck_require and don't let
    it become void context.
    Fixes problem with require not always being in scalar context.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedNov 16, '09 at 1:09p
activeNov 21, '09 at 6:43p
posts5
users2
websiteperl.org

People

Translate

site design / logo © 2023 Grokbase