Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cmp-ok cannot take custom operators as string
Mention &[op] notation.
  • Loading branch information
zoffixznet committed Jun 16, 2016
1 parent 01e959b commit 4f52547
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/Language/testing.pod
Expand Up @@ -249,6 +249,12 @@ accepts an optional C<$description> of the test.
cmp-ok 'my spelling is apperling', '~~', /perl/, "bad speller";
B<Note:> user-defined operators cannot be passed as strings. Use
the C<&[]> notation instead:
sub infix:<◀> { $^a < $^b };
cmp-ok 4, &[◀], 5, 'comparing using my fancy operator';
=head2 By object type
=item X<isa-ok($value, $expected-type, $description?)|isa-ok>
Expand Down

0 comments on commit 4f52547

Please sign in to comment.