NAME

SPVM::Cloner - Cloner in SPVM | a callback interface 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 a callback interface to clone a object.

CALLBACK METHOD INTERFACE

method : object ($object : object);

This method clone object.

This method is planned to be implemented in other classes.