]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
fixup t/13-reap-ctl.t for 5.23.8
authorDavid Mitchell <davem@iabyn.com>
Sun, 29 May 2016 21:20:40 +0000 (22:20 +0100)
committerVincent Pit <perl@profvince.com>
Mon, 30 May 2016 12:35:44 +0000 (14:35 +0200)
One test in this script failed under 5.23.8 due to a change in the way
the die while leaving an eval scope is now handled.

Consider the following code, where leaving an eval scope triggers a call
to STORE to unlocalise a tied scalar, and where STORE raises an exception:

    sub TIESCALAR { bless [] }
    sub FETCH { 1;  }
    sub STORE { die "died in store\n" if $_[1]  }

    tie $s, 'main';
    eval {
        local $s;
    };
    warn "caught: [$@]\n";

5.23.7 and earlier die, while 5.23.8 output:

    caught: [died in store
    ]

Similarly, one would expect the behaviour of "reap HERE" to change
in 5.23.8, with an exception raised in the reap handler to now be caught
be the innermost eval.

So fix up the test to reflect this new reality.


No differences found