NAME
SPVM::Builder::Resource - Resourceurations of Compile and Link of Native Sources
SYNOPSYS
my $resource = SPVM::Builder::Resource->new(
class_name => 'Resource::Zlib::V1_0_0',
mode => 'prod',
args => ['foo', 'bar'],
);
DESCRIPTION
SPVM::Builder::Resource
is a resource that contains a set of C
/C++
source files and the headers.
FIELDS
Fields.
class_name
my $class_name = $resource->class_name;
$resource->class_name($class_name);
Get and set the class name of the resource.
mode
my $mode = $resource->mode;
$resource->mode($mode);
Get and set the mode of the config file of the resource.
args
my $args = $resource->args;
$resource->args($args);
Get and set the arguments of the config file of the resource.
config
my $config = $resource->config;
$resource->config($config);
Get and set the config of the resource. The config is a SPVM::Builder::Config object.
CLASS METHODS
new
my $resource = SPVM::Builder::Resource->new;
my $resource = SPVM::Builder::Resource->new(%fields);
Create a SPVM::Builder::Resource object.
Examples:
my $resource = SPVM::Builder::Resource->new(
class_name => 'Resource::Zlib::V1_0_0',
mode => 'prod',
args => ['foo', 'bar'],
);
INSTANCE METHODS
to_string
my $string = $resource->to_string;
Get the string representation. This is the same as the value of /"class_name"
.
OPERATORS
SPVM::Builder::Resource
overloads the following operators.
bool
my $bool = !!$object_file_info;
Always true.
stringify
my $object_file_name = "$object_file_info";
Alias for "to_string".