Manpage logo

SPVM::Cloneable - Interface Type to Clone Object

Name  Description  Usage  Interface Methods  clone  Copyright & License 

Name

SPVM::Cloneable − Interface Type to Clone Object

Description

The Cloneable interface in SPVM represents a cloneable interface.

Usage

class Point {
interface Cloneable;
method clone : Point () {
my $new_point = Point−>new($self−>x, $self−>y);
return $new_point;
}
}

Interface Methods

clone

"required method clone : object ();"

The implementation must return the cloned object.

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License


Updated 2026-06-01 - jenkler.se | uex.se