SPVM::Cloner - Cloner in SPVM | a callback interface to clone a object
use Cloner; my $cloner : Cloner = method : object ($object : object) { my $point = (Point)$object; my $new_point = Point->new($point->x, $point->y); return $new_point; }; my $point = Point->new(1, 2); my $point_clone = $cloner->($point);
Cloner is a callback interface to clone a object.
method : object ($object : object);
This method clone object.
This method is planned to be implemented in other classes.
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.