SPVM::B...il::API(3)

πŸ“¦ version 0.990125, in alpine 3.24

πŸŽ€ Name πŸŽ€

Hiii bestie! This is the SPVM::B...il::API(3) page, from the User Contributed Perl Documentation, and the module’s full name-and-purpose is SPVM::Builder::Util::API - Builder Utility APIs. πŸ’–

πŸ¦‹ Description πŸ¦‹

Okay so the SPVM::Builder::Util::API module has the public utility functions to build SPVM native classes and SPVM precompilation classes. It’s giving β€œbuilder helper, but make it API,” and we love that for us. ✨

✨ Usage ✨

Here’s the little group-chat demo:

my $native_make_rule = SPVM::Builder::Util::API::create_make_rule_native('MyClass');

my $precompile_make_rule = SPVM::Builder::Util::API::create_make_rule_precompile('MyClass');

πŸ’… Functions πŸ’…

These are the functions, bestie β€” every single one, no cap:

🌟 create_make_rule_native 🌟

my $make_rule = SPVM::Builder::Util::API::create_make_rule_native($class_name);

Creates a string of "make" commands for generating a dynamic library for a native class given the class name $class_name, and returns it. 🫢

A native class must have at least one method with native attribute. (Yes, that’s the vibe check.)

Examples:

# Makefile.PL
sub MY::postamble {

  my $make_rule = '';

  # Native compile make rule
  $make_rule .= SPVM::Builder::Util::API::create_make_rule_native('Foo');

  return $make_rule;
}

🌟 create_make_rule_precompile 🌟

my $make_rule = SPVM::Builder::Util::API::create_make_rule_precompile($class_name);

Creates a string of "make" commands for generating a dynamic library for a precompilation class given the class name $class_name, and returns it. πŸ”₯

A precompilation class must have at least one method with precompile attribute.

Examples:

# Makefile.PL
sub MY::postamble {

  my $make_rule = '';

  # Precompile make rule
  $make_rule .= SPVM::Builder::Util::API::create_make_rule_precompile('Foo');

  return $make_rule;
}

🌟 create_default_config 🌟

my $config = SPVM::Builder::Util::API::create_default_config();

Creates a default config, and returns it. It is an SPVM::Builder::Config object. πŸŽ€

Currently the default config is created by the following operation:

my $config = SPVM::Builder::Config->new_gnu99;

Copyright (c) 2023 Yuki Kimoto

MIT License


Okay bestie, that’s the whole page! The footer tea is source/version perl v5.42.2, date 2026-02-03, and page SPVM::B...il::API(3). Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from