The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

Test::Proto::Compare::Numeric - numeric comparison

SYNOPSIS

my $c = Test::Proto::Compare::Numeric;
$c->compare($left, $right); # $left <=> $right
$c->reverse->compare($left, $right); # $right <=> $left

This class provides a wrapper for comparison functions so they can be identified by formatters. Except as described below, identical to Test::Proto::Compare.

METHODS

code

Chainable attribute containing the code, which by default is a numeric comparison.

summary

Chainable attribute; a brief human-readable description of the operation which will be performed. Default is '<=>'.