++ed by:
MHOWARD FAYLAND

2 PAUSE users
2 non-PAUSE users.

Yuki Kimoto
and 1 contributors

NAME

SPVM::Document::PerlAPI - SPVM API(BETA)

FUNCTIONS

new_byte_array

Create new_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_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_string_raw

Create byte array from not decoded Perl string. This function is faster than SPVM::string because copy is not executed.

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

new_string

Create byte array from decoded Perl string.

  my $array = SPVM::new_string("□い▽え→");

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');