SPVM::Cloneable(3)

πŸ“¦ version 0.990125, in alpine 3.24

🌸 Name 🌸

Okay so bestie, meet SPVM::Cloneable β€” the Interface Type to Clone Object. Manual name? SPVM::Cloneable(3), hanging out in the User Contributed Perl Documentation. πŸ’…βœ¨

✨ Description ✨

The Cloneable interface in SPVM is the interface that represents a cloneable interface. That's the whole vibe: it's giving β€œthis object can be cloned,” no cap. πŸ¦‹

πŸ¦‹ Usage πŸ¦‹

Here's the usage example, literally exactly as the page gives it β€” main character code block energy:

class Point {
  interface Cloneable;

  method clone : Point () {

    my $new_point = Point->new($self->x, $self->y);

    return $new_point;
  }
}

πŸ’… Interface Methods πŸ’…

πŸŽ€ clone πŸŽ€

The required signature is exactly:

required method clone : object ();

Your implementation must return the cloned object. That's the assignment, periodt. πŸ’–

Copyright (c) 2023 Yuki Kimoto

MIT License


That's the whole page, bestie β€” brought to you by perl v5.42.2 on 2026-02-03, with SPVM::Cloneable(3) energy. Mwah! πŸ’‹πŸŽ€

πŸ“¦ where this page comes from