SPVM::Cloneable - A Interface Type to Clone a Object
class Point { interface Cloneable; method cloneable_clone : object () { my $new_point = Point->new($self->x, $self->y); return $new_point; } }
Cloneable is a callback interface to clone a object.
Interface methods.
required method cloneable_clone : object ();
The implementation must 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.