NAME

SPVM::Document::PerlAPI - SPVM Perl API

What is SPVM Perl API

SPVM Perl API is the API to manipulate SPVM data from Perl script.

SPVM Data is Package Based Object and Array Object.

Functions

new_byte_array

Create byte array.

my $array = SPVM::new_byte_array([1, 2, 3]);

If you get perl values, you can use get_elements methods.

my $values = $array->get_elements;

new_byte_array_data

Create byte array from not decoded Perl string. This function is faster than new_byte_array_string because the data is not encoded.

my $array = SPVM::new_byte_array_data("AGTCAGTC");

new_byte_array_string

Create byte array from decoded Perl string.

my $array = SPVM::new_byte_array_string("‚ ‚¢‚¤‚¦‚¨");

new_short_array

Create short array

my $array = SPVM::new_short_array([1, 2, 3]);

If you get perl values, you can use get_elements methods.

my $values = $array->get_elements;

new_int_array

Create int array

my $array = SPVM::new_int_array([1, 2, 3]);

If you get perl values, you can use get_elements methods.

my $values = $array->get_elements;

new_long_array

Create long array

my $array = SPVM::new_long_array([1, 2, 3]);

If you get perl values, you can use get_elements methods.

my $values = $array->get_elements;

new_float_array

Create float array

my $array = SPVM::new_float_array([1, 2, 3]);

If you get perl values, you can use get_elements methods.

my $values = $array->get_elements;

new_double_array

Create double array

my $array = SPVM::new_double_array([1, 2, 3]);

If you get perl values, you can use get_elements methods.

my $values = $array->get_elements;

new_object_array_len

Create object array with type name and length.

my $array = SPVM::new_object_array_len("int[]", 3);

You can set and get elements by set and get method.

$array->set(1, SPVM::new_int_array([1, 2, 3]));
my $element = $array->get(1);

new_object

Create object.

my $object = SPVM::new_object("Point");

You can set and get value by set and get method.

$object->set(x => 1);
my $x = $object->get('x');

Object Methods

SPVM::Core::Object::Package

new

set

get

SPVM::Core::Object::Array

SPVM::Core::Object::Array::Byte

new_len

set_elements

set_elements_range

set_data

set_data_range

set_string

set

get

get_elements

get_elements_range

to_data

to_data_range

to_string

SPVM::Core::Object::Array::Short

new_len

set_elements

set_elements_range

set_data

set_data_range

set

get

get_elements

get_elements_range

to_data

to_data_range

SPVM::Core::Object::Array::Int

new_len

set_elements

set_elements_range

set_data

set_data_range

set

get

get_elements

get_elements_range

to_data

to_data_range

SPVM::Core::Object::Array::Long

new_len

set_elements

set_elements_range

set_data

set_data_range

set

get

get_elements

get_elements_range

to_data

to_data_range

SPVM::Core::Object::Array::Float

new_len

set_elements

set_elements_range

set_data

set_data_range

set

get

get_elements

get_elements_range

to_data

to_data_range

SPVM::Core::Object::Array::Double

new_len

set_elements

set_elements_range

set_data

set_data_range

set

get

get_elements

get_elements_range

to_data

to_data_range

SPVM::Core::Object::Array::Object

new_len

set

get

1 POD Error

The following errors were encountered while parsing the POD:

Around line 34:

Non-ASCII character seen before =encoding in 'SPVM::new_byte_array_string("‚ ‚¢‚¤‚¦‚¨");'. Assuming CP1252