SPVM::B...::Class(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸ’– Name πŸ’–

SPVM::BlessedObject::Class β€” SPVM Class ✨

okay so welcome to SPVM::B...::Class(3), brought to you by the User Contributed Perl Documentation crew β€” bestie, this page is about the SPVM::BlessedObject::Class class, and it's lowkey iconic πŸ’–


πŸ¦‹ Description πŸ¦‹

The object of the SPVM::BlessedObject::Class class holds an instance of an SPVM class. That's the whole vibe β€” it's a little blessed wrapper situation, no cap 🫢


πŸŽ€ Usage πŸŽ€

Copy-paste this energy, bestie:

use SPVM 'Point';

my $point = SPVM::Point->new;
$point->set_x(4);
my $x = $point->x;
$point->clear;

🫢 Instance Methods 🫢

Here's the instance-method tea πŸ«–βœ¨

✨ AUTOLOAD ✨

# Instance method call
my $ret = $blessed_object_class->foo(@args);

# Static instance method call
my $ret = $blessed_object_class->SPVM::MyClass::foo(@args);

It calls an SPVM instance method using "call_method" in SPVM::ExchangeAPI with the arguments, and returns the return value. Literally that's the whole flow πŸ’…

And yes, the static instance method call is allowed β€” slay πŸ‘‘

If the class or the method is not found, an exception is thrown. No class or no method? Exception. Periodt 😭

If the invocant cannnot be assigned to the class of the static method call, an exception is thrown. That's a hard no, bestie 🚫

Examples:

use SPVM 'Point';

# Creates an SPVM::BlessedObject::Class object of the Point class.
my $point = Point->new;

# Calls instance methods in the Point class.
$point->set_x(4);
my $x = $point->x;
$point->clear;

Copyright (c) 2023 Yuki Kimoto

MIT License


okay that's the whole page! 🫢 Source/version/date moment: perl v5.42.2, dated 2026-02-03, and this is the SPVM::B...::Class(3) manual β€” bye bestie, go be the main character of your SPVM code! πŸŒˆπŸ’…

πŸ“¦ where this page comes from