NAME
SPVM::Cloneable - A Interface Type to Clone a Object
SYNOPSYS
class Point {
interface Cloneable;
method cloneable_clone : object () {
my $new_point = Point->new($self->x, $self->y);
return $new_point;
}
}
DESCRIPTION
Cloneable is a callback interface to clone a object.
INTERFACE METHODS
Interface methods.
cloneable_clone
required method cloneable_clone : object ();
The implementation must return the cloned object.