William McKee wrote:
On Thu, Feb 26, 2004 at 01:17:08PM -0800, Stas Bekman wrote:
I tried to use it when I was messing with the pre- and post-test foo a
while
back, but couldn't get it to work. it might have had something to do with
the massive other changes I was trying to implement at the time, though...
William will let us know.
It's not working. I placed the following lines before my die statement:
undef $userdata;
print STDOUT "Bail out! Unable to continue due to missing \$userdata"
unless defined $userdata && ref $userdata eq 'HASH';
The die statement gets called.
it works perfectly fine for me. You need to do that call in the *client*.
print STDOUT "Bail out! Unable to continue due to missing \$userdata";
die;
if we can get it to work, I'd be in favor of an Apache::Test::bail()
function (or whatever you want to call it).
It's an ambiguous name since it doesn't tell you that it'll bail out from
the whole test suite and one may think that it'll abort only the current
test. How about:
Apache::Test::abort_all_tests()
or a similar, more explicit name? Suggestions are welcome of course.
The name doesn't matter to me as long as the functionality is present
(which may be outside the realm of possibility at the moment). Just for
another idea, I started looking for this ability in the Helper
Functions. A function like t_abort_all_tests("Reason goes here") would
make sense to me.
I say we come up with Apache::Test::foo and then make Test::Harness adopt
it.
For the time being, I'll stick with either the die or the skip. Thanks
for you reponses.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com