* Michael G Schwern ([EMAIL PROTECTED]) [2001-03-15 12:18]:
> I'm writing up the new Testing.pm docs and ran into a snag. Its with
> this:
>
> skip {
> ok( head("http://www.foo.com"), "www.foo.com is alive" );
> ok( head("http://www.foo.com/bar"), " and has bar" );
> } "LWP::Simple not installed",
> !eval { require LWP::Simple; LWP::Simple->import; 1 };
> Unfortunately, there's a good chance the block of tests will die
> prematurely (in this case it'll puke on the first head() call). Even
> if run inside an eval block, this means you can't know how many ok()s
> were supposed to be run and thus can't output the skip results!
>
> Bummer. Ideas? I really, really, really want to salvage this
> interface. (No filters, please) We could make it that skip takes a fourth
How about letting skip() do a
local $skip_oks = 1;
in case it detects need for skipping? That would let ok behave
differently (i.e. not really executing the tests, only printing
"ok - Message # Skipping").
Please excuse the noise if this is stupid in some way :-)
peter - just another perl-qa lurker