SPVM::Builder::LibInfo - Library Information
SPVM::Builder::LibInfo is a library file information.
SPVM::Builder::LibInfo
my $name = $lib_info->name; $lib_info->name($name);
Get and set the library name. z, png, etc.
z
png
my $file = $lib_info->file; $lib_info->file($file);
Get and set the library file. /path/libz.so, /path/libpng.a, etc.
/path/libz.so
/path/libpng.a
This field has the meaning when "file_flag" is set to a true value.
my $static = $lib_info->static; $lib_info->static($static);
Get and set the flag if the library is linked statically such as libfoo.a.
libfoo.a
The default is a false value.
my $file_flag = $lib_info->file_flag; $lib_info->file_flag($file_flag);
Get and set the flag if the library is linked by the file path such as path/libfoo.so, not the name such as -lfoo.
path/libfoo.so
-lfoo
my $static_name_cb = $lib_info->static_name_cb; $lib_info->static_name_cb($static_name_cb);
Get and set the callback for a static link name.
Default:
sub { my ($self, $name) = @_; $name = "-Wl,-Bstatic -l$name -Wl,-Bdynamic"; return $name; };
my $config = $lib_info->config; $lib_info->config($config);
Get and set the config that is used to link this library.
The list of class methods.
my $lib_info = SPVM::Builder::LibInfo->new;
my $lib = $lib_info->to_string;
If "file_flag" is false value and "static" is false value, get the library flag such as -lfoo from "name"" in ".
If "file_flag" is false value and "static" is true value, get the library flag that "static_name_cb"" in " is performed to "name"" in " such as -Wl,-Bstatic -lfoo -Wl,-Bdynamic.
-Wl,-Bstatic -lfoo -Wl,-Bdynamic
If "file_flag" is true value, get the library file path from "file"" in ".
SPVM::BlessedObject::String overloads the following operators.
my $bool = !!$lib_info;
Always true.
my $lib_name = "$lib_info";
Alias for "to_string".
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.