Re: Revert use_ok() change to allow lexical effects?

Aristotle Pagaltzis <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <[email protected]>
* Michael G Schwern <[email protected]> [2012-04-11 20:10]:
> On 2012.4.11 9:53 AM, Aristotle Pagaltzis wrote:
> >I don’t see how it is any more magic than `done_testing`.
>
> done_testing() has no global side effects, it's just a function.
>
> Unless I'm mistaken, Test::AutoBailOut is doing to need a global
> $SIG{__DIE__} handler or override CORE::require or add something to
> @INC or try to parse exception messages or something like that. Any
> of those have global side effects which can potentially interfere with
> or be overwritten by the code being tested.

… what for? Is Ovid’s solution of just using an END block insufficient?
Why?

> > My suggestion to ship AutoBailOut was so you would be able to
> > suggest it as a replacement in the docs, as it covers the one case
> > where `use_ok` is even of interest (though still not the right
> > solution).
> >
> > But I guess you could do that even if it ships outside of
> > Test::More.
>
> Precisely. For example, it already suggests Test::Differences and
> Test::Deep.

OK. Then how about I stick AutoBailout on CPAN with a SYNOPSIS that
covers `t/00-load.t`, and then you change the `use_ok` docs to a)
discourage its use and b) point to AutoBailout for `t/00-load.t` uses.
Sound good?

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.