SPVM::Comparator - a callback class for comparation
use SPVM::Comparator; my $comparator : SPVM::Comparator = sub : int ($self : self, $x1 : object, $x2 : object); { return $x1 > $x2; }; my $result = $comparator->compare;
SPVM::Comparator is a callback type to stringify object.
sub compare : int ($self : self, $x1 : object, $x2 : object);
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.