On Mon, Aug 25, 2008 at 12:15:05AM +0200, Moritz Lenz wrote:
> Larry Wall wrote:
> > I think it would be best if all boolean contexts collapse consistently,
> > and I would consider all of those to be boolean contexts.  More
> > precisely, && and || are boolean on the left, but not on the right.
> 
> Very good.
> As a follow-up for the testers: should ok() expect an Object as its
> first argument? If so we could say
> 
> ok 1|2, 'Junction 1|2 is true in boolean context';

Keeping with my general philosophy that I'd like to keep
the requirements needed to run Test.pm (and the test suite)
as simple as possible, I'd prefer to not require type checking
within Test.pm in order for it to work right.

Beyond that, if we're testing a Junction in boolean
context, I think I would prefer to make that an explicit
part of the test itself:

    ok ?(1|2), 'Junction 1|2 is true in boolean context';

Pm

Reply via email to