On Sun, Jul 22, 2001 at 02:19:25AM -0700, Randal L. Schwartz wrote:
> Can't you just make:
> 
>         sub TODO (\&) {
>                 local($INSIDE_TODO) = 1;
>                 TODO: shift->();
>         }

That was my original plan, problem is it modifies the results of
caller() (so things like carp() would be altered).  Since it's a
general testing function, I'm trying to keep its effects on the
surrounding code at near 0.

I've actually got this working for skip...

        SKIP: {
            skip("A serious lack of foo") unless $have_foo;
            ok( foo() eq 'bar' );
        }

        sub skip {
            my($why) = shift;
            _skipped($why);

            no warnings;
            last SKIP;
        }

using that horrible desperation feature of last().  So I *know*
functions can tell what labeled block they're enclosed in, I just
don't want to dive out to XS to do it.

It's too bad I can't do some combination of last/next/redo/goto and
eval that will *try* to jump out of the loop but not actually do it.


-- 
Michael G Schwern   <[EMAIL PROTECTED]>   http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One

Reply via email to