SPVM::B...::Class(3)
π 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 & License π
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
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms