SPVM::Builder::Resource − Resource
The SPVM::Builder::Resource class has methods to manipulate resources.
my $resource =
SPVM::Builder::Resource−>new(
class_name => 'Resource::Zlib',
);
See SPVM::Document::Resource about creating and using resources.
my $class_name =
$resource−>class_name;
$resource−>class_name($class_name);
Gets and sets the "class_name" field, the class name of this resource.
my $config =
$resource−>config;
$resource−>config($config);
Gets and sets the "config" field, an SPVM::Builder::Config object.
my $resource = SPVM::Builder::Resource−>new(%fields);
Creates a new SPVM::Builder::Resource object with "Fields".
Field Default Values:
|
• |
"class_name" |
undef
|
• |
"config" |
undef
my $string = $resource−>to_string;
Returns "class_name" field.
Overloads the following operators.
my $bool = !!$resource;
Always true.
my $class_name = "$resource";
The alias for "to_string" method.
Copyright (c) 2023 Yuki Kimoto
MIT License