| 1 | package SPVM::Builder::ScriptInfo; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 94 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 94 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 94 | ▶ | use Carp 'confess'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 94 | ▶ | use JSON::PP; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 94 | ▶ | use File::Basename 'basename'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 94 | ▶ | use SPVM::Builder; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 94 | ▶ | use SPVM::Builder::CC; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 94 | ▶ | use SPVM::Builder::Util; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | 94 | ▶ | use SPVM::Builder::Accessor 'has'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | 94 | ▶ | use SPVM::Builder::Config::Util; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | # Fields | ||||||||||||||||||||||||||||
| 16 | 94 | has [qw( | |||||||||||||||||||||||||||
| 17 | builder | ||||||||||||||||||||||||||||
| 18 | class_name | ||||||||||||||||||||||||||||
| 19 | script_name | ||||||||||||||||||||||||||||
| 20 | compiler | ||||||||||||||||||||||||||||
| 21 | runtime | ||||||||||||||||||||||||||||
| 22 | )]; | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | # Class Methods | ||||||||||||||||||||||||||||
| 25 | 21 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.0
Pod
documented
| |||||||||||||||||||||||||||||
| 26 | 21 | my $class = shift; | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 21 | my $self = bless {@_}, $class; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 21 | my $class_name = $self->{class_name}; | |||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 21 | my $script_name = $self->{script_name}; | |||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 21 | ▶ | unless (defined $script_name || defined $class_name) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $script_name or defined $class_name
MC/DC0%0/2
defined $script_name or defined $class_name
defined $script_name
defined $class_name
Truth table66%2/3
A or B
A= defined $script_nameB= defined $class_name
| |||||||||||||||||||||||||||||
| 35 | 0 | confess("'script_name' option or 'class_name' option must be defined."); | |||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | # New SPVM::Builder object | ||||||||||||||||||||||||||||
| 39 | 21 | my $builder = SPVM::Builder->new; | |||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | 21 | $self->{builder} = $builder; | |||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 21 | my $compiler = SPVM::Builder::Native::Compiler->new; | |||||||||||||||||||||||||||
| 44 | 21 | $compiler->add_class_search_dir($_) for @{$builder->class_search_dirs}; | |||||||||||||||||||||||||||
| 45 | 21 | $self->{compiler} = $compiler; | |||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | 21 | $self->compile; | |||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 21 | return $self; | |||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | # Instance Methods | ||||||||||||||||||||||||||||
| 53 | 21 | ▶ | sub compile { | ||||||||||||||||||||||||||
|
Subroutine
compile: called CC=6 SCAR=18.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 54 | 21 | my ($self) = @_; | |||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | # Builder | ||||||||||||||||||||||||||||
| 57 | 21 | my $builder = $self->builder; | |||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | 21 | my $class_name = $self->{class_name}; | |||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | 21 | my $script_name = $self->{script_name}; | |||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | 21 | my $source; | |||||||||||||||||||||||||||
| 64 | 21 | ▶ | if (defined $script_name) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 65 | 15 | ▶ | open my $fh, '<', $script_name | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 66 | or confess "Can't open file '$script_name':$!"; | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | 15 | $source = do { undef $/; <$fh> }; | |||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | 21 | my $compiler = $self->compiler; | |||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | 21 | $compiler->set_start_file(__FILE__); | |||||||||||||||||||||||||||
| 74 | 21 | $compiler->set_start_line(__LINE__ + 1); | |||||||||||||||||||||||||||
| 75 | 21 | my $anon_class_name; | |||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | 21 | ▶ | eval { $class_name ? $compiler->compile($class_name) : $compiler->compile_anon_class($source) }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | 21 | ▶ | if ($@) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 80 | 0 | my $error_messages = $compiler->get_error_messages; | |||||||||||||||||||||||||||
| 81 | 0 | for my $error_message (@$error_messages) { | |||||||||||||||||||||||||||
| 82 | 0 | print STDERR "$error_message\n"; | |||||||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||||||||
| 84 | 0 | exit(255); | |||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||
| 86 | 21 | my $runtime = $compiler->get_runtime; | |||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | 21 | $self->runtime($runtime); | |||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||
| 92 | 10 | ▶ | sub get_class_names { | ||||||||||||||||||||||||||
|
Subroutine
get_class_names: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 93 | 10 | my ($self) = @_; | |||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | 10 | my $runtime = $self->runtime; | |||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 10 | my $category = [ | |||||||||||||||||||||||||||
| 98 | 4, # SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_MULNUM | ||||||||||||||||||||||||||||
| 99 | 6, # SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_CLASS | ||||||||||||||||||||||||||||
| 100 | 7, # SPVM_NATIVE_C_BASIC_TYPE_CATEGORY_INTERFACE | ||||||||||||||||||||||||||||
| 101 | ]; | ||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||
| 103 | 10 | ▶ | my $basic_types = [grep { $_->get_name !~ /::anon_class::/ && $_->get_name !~ /::anon_method::/ } @{$runtime->get_basic_types({category => $category})}]; | ||||||||||||||||||||||||||
|
Condition100%3/3
$_->get_name =~ /::anon_class::/ || $_->get_name =~ /::anon_method::/
MC/DC100%2/2
$_->get_name =~ /::anon_class::/ || $_->get_name =~ /::anon_method::/
$_->get_name =~ /::anon_class::/
$_->get_name =~ /::anon_method::/
Truth table100%3/3
A || B
A= $_->get_name =~ /::anon_class::/B= $_->get_name =~ /::anon_method::/
| |||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | 10 | my $class_names = [map { $_->get_name } @$basic_types]; | |||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | 10 | return $class_names; | |||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | 2 | ▶ | sub has_config_file { | ||||||||||||||||||||||||||
|
Subroutine
has_config_file: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||||||||||||||||||||
| 111 | 2 | my ($self, $class_name) = @_; | |||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||
| 113 | 2 | ▶ | unless (defined $class_name) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 114 | 0 | confess("The class name \$class_name must be defined."); | |||||||||||||||||||||||||||
| 115 | } | ||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||
| 117 | 2 | my $config_file = SPVM::Builder::Util::search_config_file($class_name); | |||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||
| 119 | 2 | my $has_config_file = defined $config_file; | |||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | 2 | return $has_config_file; | |||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||
| 124 | 83 | ▶ | sub is_resource_loader { | ||||||||||||||||||||||||||
|
Subroutine
is_resource_loader: called CC=5 SCAR=16.3
Pod
documented
| |||||||||||||||||||||||||||||
| 125 | 83 | my ($self, $class_name) = @_; | |||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||
| 127 | 83 | ▶ | unless (defined $class_name) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 128 | 0 | confess("The class name \$class_name must be defined."); | |||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | 83 | my $config_file = SPVM::Builder::Util::search_config_file($class_name); | |||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||
| 133 | 83 | my $is_resource_loader = 0; | |||||||||||||||||||||||||||
| 134 | 83 | ▶ | if (defined $config_file && SPVM::Builder::Config::Util::exists_config_file($config_file)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $config_file and SPVM::Builder::Config::Util::exists_config_file($config_file)
MC/DC50%1/2
defined $config_file and SPVM::Builder::Config::Util::exists_config_file($config_file)
defined $config_file
SPVM::Builder::Config::Util::exists_config_file($config_file)
Truth table66%2/3
A and B
A= defined $config_fileB= SPVM::Builder::Config::Util::exists_config_file($config_file)
| |||||||||||||||||||||||||||||
| 135 | 12 | my $config = SPVM::Builder::Config::Util::load_config($config_file); | |||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | 12 | my $resource_names = $config->get_resource_names; | |||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||
| 139 | 12 | ▶ | if (@$resource_names) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 140 | 3 | $is_resource_loader = 1; | |||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||
| 142 | } | ||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||
| 144 | 83 | return $is_resource_loader; | |||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||
| 147 | 9 | ▶ | sub get_config_file { | ||||||||||||||||||||||||||
|
Subroutine
get_config_file: called CC=3 SCAR=12.3
Pod
documented
| |||||||||||||||||||||||||||||
| 148 | 9 | my ($self, $class_name) = @_; | |||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||
| 150 | 9 | ▶ | unless (defined $class_name) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 151 | 0 | confess("The class name \$class_name must be defined."); | |||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||
| 154 | 9 | my $config_file = SPVM::Builder::Util::search_config_file($class_name); | |||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | 9 | ▶ | unless ($config_file) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 157 | 0 | confess("The config file for '$class_name' class is not found."); | |||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||
| 160 | 9 | return $config_file; | |||||||||||||||||||||||||||
| 161 | } | ||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||
| 163 | 3 | ▶ | sub get_config_content { | ||||||||||||||||||||||||||
|
Subroutine
get_config_content: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 164 | 3 | my ($self, $class_name) = @_; | |||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | 3 | my $config_file = $self->get_config_file($class_name); | |||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | 3 | my $config_content = SPVM::Builder::Util::slurp_binary($config_file); | |||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||
| 170 | 3 | return $config_content; | |||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||
| 173 | 3 | ▶ | sub get_config { | ||||||||||||||||||||||||||
|
Subroutine
get_config: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 174 | 3 | my ($self, $class_name) = @_; | |||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | 3 | my $config_file = $self->get_config_file($class_name); | |||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||
| 178 | 3 | my $config = SPVM::Builder::Config::Util::load_config($config_file); | |||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||
| 180 | 3 | return $config; | |||||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||
| 183 | 94 | 1; | |||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||
| 185 | =head1 Name | ||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | SPVM::Builder::ScriptInfo - Script Information | ||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||
| 189 | =head1 Description | ||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||
| 191 | SPVM::Builder::ScriptInfo class manages SPVM script information. | ||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||
| 193 | =head1 Usage | ||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||
| 195 | my $script_name = 'myapp.spvm'; | ||||||||||||||||||||||||||||
| 196 | my $script_info = SPVM::Builder::ScriptInfo->new(script_name => $script_name); | ||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||
| 198 | my $class_name = 'MyClass'; | ||||||||||||||||||||||||||||
| 199 | my $script_info = SPVM::Builder::ScriptInfo->new(class_name => $class_name); | ||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||
| 201 | =head1 Class Methods | ||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||
| 203 | =head2 new | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | my $config_info = SPVM::Builder::ScriptInfo->new(%options); | ||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | Creates an L<SPVM::Builder::ScriptInfo> object given options %options, and returns it. | ||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | The class specified by C<class_name> option or C<script_name> option is compiled and the runtime is generated. | ||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||
| 211 | C<class_name> option or C<script_name> option must be defined. | ||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||
| 213 | Options: | ||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||
| 215 | =over 2 | ||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||
| 217 | =item * C<class_name> | ||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||
| 219 | A class name. | ||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||
| 221 | =item * C<script_name> | ||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||
| 223 | A script name. | ||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||
| 225 | =back | ||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||
| 227 | Exceptions: | ||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||
| 229 | C<class_name> option or C<script_name> option must be defined. Otherwise, an exception is thrown. | ||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | =head1 Instance Methods | ||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | =head2 get_class_names | ||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||
| 235 | my $class_names = $config_info->get_class_names; | ||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | Returns the names of all classes, interfaces, and multi-numeric types except for anon classes and anon classes generated by anon methods. | ||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||
| 239 | =head2 has_config_file | ||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||
| 241 | my $has_config_file = $config_info->has_config_file($class_name); | ||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||
| 243 | If the class given by the class name has a config file, returns 1, otherwise returns 0. | ||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||
| 245 | Exceptions: | ||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | The class name $class_name must be defined. Otherwise, an exception is thrown. | ||||||||||||||||||||||||||||
| 248 | |||||||||||||||||||||||||||||
| 249 | =head2 is_resource_loader | ||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||
| 251 | my $is_resource_loader = $config_info->is_resource_loader($class_name); | ||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||
| 253 | If the class given by the class name $class_name is a class that load resources, returns 1, otherwise returns 0. | ||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||
| 255 | Exceptions: | ||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||
| 257 | The class name $class_name must be defined. Otherwise, an exception is thrown. | ||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||
| 259 | =head2 get_config_file | ||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||
| 261 | my $config_file = $config_info->get_config_file($class_name); | ||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||
| 263 | Returns the file path of the config for the class given by the class name $class_name. | ||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||
| 265 | Exceptions: | ||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||
| 267 | The class name $class_name must be defined. Otherwise, an exception is thrown. | ||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||
| 269 | The config file for the class "%s" is not found. Otherwise, an exception is thrown. | ||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||
| 271 | =head2 get_config_content | ||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||
| 273 | my $config_content = $config_info->get_config_content($class_name); | ||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||
| 275 | Returns the content of the config for the class given by the class name $class_name. | ||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||
| 277 | Exceptions: | ||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||
| 279 | Exceptions thrown by L</"get_config_file"> method could be thrown. | ||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||
| 281 | =head2 get_config | ||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||
| 283 | my $config = $config_info->get_config($class_name); | ||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||
| 285 | Returns a L<config|SPVM::Builder::Config> object for the class given by the class name $class_name. | ||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||
| 287 | Exceptions: | ||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||
| 289 | Exceptions thrown by L</"get_config_file"> method could be thrown. | ||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||
| 291 | =head1 Copyright & License | ||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||
| 293 | Copyright (c) 2023 Yuki Kimoto | ||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||
| 295 | MIT License | ||||||||||||||||||||||||||||