Name

SPVM::BlessedObject::Class - SPVM Class

Description

The object of the SPVM::BlessedObject::Class class holds an instance of a SPVM class.

Usage

use SPVM 'Point';

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

Instance Methods

AUTOLOAD

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

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

Calls a SPVM instance method using "call_method" in SPVM::ExchangeAPI with the arguments, and returns the return value.

The static instance method call is allowed.

If the class or the method is not found, an exception is thrown.

If the invocant cannnot be assigned to the class of the static method call, an exception is thrown.

Examples:

use SPVM 'Point';

# Creates a 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