++ed by:
DMOL HAMMER BEROV FAYLAND SKOLYCHEV

7 PAUSE users
4 non-PAUSE users.

Yuki Kimoto
and 1 contributors

NAME

SPVM::Document::SPVMAPI - SPVM API

What is SPVM API

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

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_bin

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_bin("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');

SPVM::Data::Array

  • new_len

  • set_elements

  • set_bin

  • set_string

  • set_element

  • get_element

  • to_elements

  • to_bin

  • to_string

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 32:

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

Around line 108:

'=item' outside of any '=over'

=over without closing =back