SPVM::B...LibInfo(3)
hey bestie π welcome to the SPVM::B...LibInfo(3) page from the User Contributed Perl Documentation crew β the actual class being iconic here is SPVM::Builder::LibInfo, and she's here to serve linker library info realness β¨
πΈ NAME πΈ
SPVM::Builder::LibInfo β Library Information for A Linker π
π DESCRIPTION π
okay so the SPVM::Builder::LibInfo class has methods to manipulate library information for a linker π οΈ no cap, that's her whole job.
β¨ USAGE β¨
my $lib_info = SPVM::Builder::LibInfo->new(%fields);
my $lib_ldflags = $lib_info->create_ldflags;
π FIELDS π
these fields are the main characters, fr fr π«Ά
config
my $config = $lib_info->config;
$lib_info->config($config);
Gets and sets the config field, an SPVM::Builder::Config object π
name
my $name = $lib_info->name;
$lib_info->name($name);
Gets and sets the name field, a library name πΈ
Examples:
$lib_info->name('z');
$lib_info->name('png');
file
my $file = $lib_info->file;
$lib_info->file($file);
Gets and sets the file field, the absolute path of the library file such as /path/libz.so, /path/libpng.a π¦
is_static
my $is_static = $lib_info->is_static;
$lib_info->is_static($is_static);
Gets and sets the is_static field. If this field is a true value, this library is linked statically. Otherwise, is linked dynamically βοΈ
is_abs
my $is_abs = $lib_info->is_abs;
$lib_info->is_abs($is_abs);
Gets and sets the is_abs field. If this field is a true value, the library is linked by the absolute path file. Otherwise, is linked by the relative path from library search path π§
π CLASS METHODS π
new
my $lib_info = SPVM::Builder::LibInfo->new(%fields);
Creates a new SPVM::Builder::LibInfo object given fields β¨
The config field must be defined.
Field Default Values:
- All Fields β
undef
Exceptions:
β οΈ The config field must be defined.
π INSTANCE METHODS π
create_ldflags
my $lib_ldflags = $lib_info->create_ldflags;
Creates an array reference of the library part of the linker flags given to the linker ld, and returns it π₯
Return Value Examples:
["-lfoo", "-Wl,-Bstatic -lfoo -Wl,-Bdynamic", "/path/foo.so", "/path/foo.a"]
to_string
my $lib_name = $lib_info->to_string;
Returns name field π
β OPERATORS β
Overloads the following operators.
bool
my $bool = !!$lib_info;
Always true π
stringify
my $lib_name = "$lib_info";
Alias for to_string method π
π COPYRIGHT & LICENSE π
Copyright (c) 2023 Yuki Kimoto
MIT License
okay bye bestie π«Ά β this page is from perl v5.42.2, dated 2026-02-03, and tagged SPVM::B...LibInfo(3) π
π¦ 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