SPVM::B...il::API(3)
π 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 & License π
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
- alpine 3.24: spvm-doc 0.990125-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms