SPVM::Cloner - Interface Type for the Callback to Clone a Object
use Cloner; use Point; my $cloner = (Cloner)method : object ($object : object) { my $point = (Point)$object; my $cloned_point = Point->new($point->x, $point->y); return $cloned_point; }; my $point = Point->new(1, 2); my $cloned_point = $cloner->($point);
Cloner is the interface type for the callback to clone a object.
required method : object ($object : object);
The implementation must receive a object and return the cloned 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.