=item *
+L</cmp_ok> throws an exception if the given operator isn't a valid Perl binary operator (except C<'='> and variants).
+It also tests in scalar context, so C<'..'> will be treated as the flip-flop operator and not the range operator.
+
+=item *
+
C<use_ok>, C<require_ok>, C<can_ok>, C<isa_ok>, C<new_ok>, C<subtest>, C<explain>, C<TODO> blocks and C<todo_skip> are not implemented.
=back
my %binops = (
'or' => 'or',
- 'and' => 'and',
'xor' => 'xor',
+ 'and' => 'and',
'||' => 'hor',
+ ('//' => 'dor') x ($] >= 5.010),
'&&' => 'hand',
+ '|' => 'bor',
+ '^' => 'bxor',
+ '&' => 'band',
+
'lt' => 'lt',
'le' => 'le',
'gt' => 'gt',
'=~' => 'like',
'!~' => 'unlike',
- '~~' => 'smartmatch',
+ ('~~' => 'smartmatch') x ($] >= 5.010),
+
+ '+' => 'add',
+ '-' => 'substract',
+ '*' => 'multiply',
+ '/' => 'divide',
+ '%' => 'modulo',
+ '<<' => 'lshift',
+ '>>' => 'rshift',
+
+ '.' => 'concat',
+ '..' => 'flipflop',
+ '...' => 'altflipflop',
+ ',' => 'comma',
+ '=>' => 'fatcomma',
);
my %binop_handlers;
eval <<"IS_BINOP";
sub is_$name (\$\$;\$) {
my (\$got, \$expected, \$desc) = \@_;
- \@_ = ((\$got $op \$expected), \$desc);
+ \@_ = (scalar(\$got $op \$expected), \$desc);
goto &ok;
}
IS_BINOP