SPVM::Comparator::Byte - Interface Type for byte Comparation Callback
use Comparator::Byte; my $comparator = (Comparator::Byte)method : int ($a : byte, $b : byte); { return $a <=> $b; }; my $result = $comparator->(3, 5);
Comparator::Byte is the interface type for the byte comparation callback.
required method : int ($a : byte, $b : byte);
This method must receive two values that types are byte and return the following value.
byte
If the first argument is greater than the second argument, returns 1. If the first argument is lower than the second argument, returns -1. If the first argument is equal to the second argument, returns 0.
1
-1
0
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.