SPVM::B...ileInfo(3)

πŸ“¦ version 0.990125, in alpine 3.24

🌸 Name 🌸

SPVM::Builder::CompileInfo β€” Compiler Information. Fr fr, this is the manual name vibe: SPVM::B...ileInfo(3) in the header, and it’s the User Contributed Perl Documentation flavor too. Bestie, we’re in compiler-info territory and it’s giving organized chaos πŸ’…

✨ Description ✨

The SPVM::Builder::CompileInfo class has methods to manipulate compiler information. That’s the whole assignment, no cap 🫢

πŸŽ€ Fields πŸŽ€

config

my $config = $compile_info->config;
$compile_info->config($config);

Gets and sets the config field, a SPVM::Builder::Config object. Iconic little config holder behavior πŸ’–

source_file

my $source_file = $compile_info->source_file;
$compile_info->source_file($source_file);

Gets and sets the source_file field, a source file. Very β€œthe input file is right there” energy 🌸

output_file

my $output_file = $compile_info->output_file;
$compile_info->output_file($output_file);

Gets and sets the output_file field, an output file. The destination bestie, the whole point πŸŽ€

category

my $category = $config->category;
$config->category($category);

Gets and sets the category field.

These are native_class, native_source, precompile_class, spvm, spvm_core. Those exact strings, okay? Don’t freestyle them πŸ’…

no_generate

my $no_generate = $link_info->no_generate;
$link_info->no_generate($no_generate);

Gets and sets the no_generate field. If this field is a true value, the output file is not generated. So yeah, that flag is literally the β€œwe’re not making the output file” switch 🫢

🧚 Class Methods 🧚

new

my $compile_info = SPVM::Builder::CompileInfo->new(%fields);

Creates a new SPVM::Builder::CompileInfo object given Fields. New object, new compiler-info era, slay ✨

Field Default Values:

  • source_file

undef

  • output_file

undef

  • no_generate

undef

Exceptions:

The config field must be defined. Like, required required. No cute little workaround, bestie 😭

πŸ’œ Instance Methods πŸ’œ

create_command

my $compile_command = $compile_info->create_command;

Creates an array reference of the compilation command, and returns it. It’s giving β€œassemble the command” main character energy πŸ‘‘

Return Value Examples:

[qw(cc -o foo.o -c -O2 -Ipath/include foo.c)]

create_ccflags

my $config_args = $compile_info->create_ccflags;

Creates an array reference of the compilation options, and returns it.

The source file source_file and the output file output_file are not contained. Important detail, bestie β€” those two are not in this array πŸ¦‹

Return Value Examples:

[qw(-O2 -Ipath/include)]

to_command

my $compile_command_string = $compile_info->to_command;

Joins all elements of the return value of the create_command method with a space, and returns it. One string, all joined up, very convenient πŸ’–

Return Value Examples:

"cc -c -o foo.o -O2 -Ipath/include foo.c"

Copyright (c) 2023 Yuki Kimoto

MIT License


Cute little sign-off check: source/version/date said perl v5.42.2, 2026-02-03, and the page name is SPVM::B...ileInfo(3) β€” bye bestie, go compile something iconic πŸ’…πŸŽ€

πŸ“¦ where this page comes from