NAME
SPVM::Cloner - A Callback Type to Clone a Object
SYNOPSYS
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);
DESCRIPTION
Cloner is an interface type for the callback to clone a object.
INTERFACE METHOD
required method : object ($object : object);
The implementation must receive a object and return the cloned object.