I think I have a solution to the rigidity of is().  ie. something with
the diagnostic output of is(), but the flexibility of ok().

The principle idea being to replace code like:

    ok( $foo <= $bar ) || print "# $foo <= $bar\n";

Provide an is() variant that takes an arbitrary op!  My working title
is is_op(), which I don't like very much.

    is_op( $foo, '<=', $bar );
    is_op( $foo, '==', $bar );
    is_op( $foo, 'eq', $bar );  # same as is()
    is_op( $foo, '&',  $bar );

which then just does:

    my $test = eval "$foo $op $bar";

It all makes sense, so what I really need is a better name.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Tasty, yet morally ambiguous.

Reply via email to