SPVM::B...LibInfo(3)

πŸ“¦ version 0.990125, in alpine 3.24

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 (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