SPVM::Builder::Util::API - Builder Utility APIs
The SPVM::Builder::Util::API module has the public utility functions to build SPVM native classes and SPVM precompilation classes.
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');
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.
make
A native class must have at least one method with the native attribute.
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; }
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 the precompile attribute.
# 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; }
my $config = SPVM::Builder::Util::API::create_default_config();
Creates a default config, and returns it. It is a SPVM::Builder::Config object.
Currently the default config is created by the following operation.
my $config = SPVM::Builder::Config->new_gnu99(file_optional => 1);
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.