$constant_name
static method $constant_name : $return_type ();
Returns the value of $constant_name. If this constant is not defined on the system, Error::NotSupported exception is thrown.
EOS } close $fh_input;
$spvm_content .= "}\n";
# Output files generate_file($spvm_file, $spvm_content, $force); generate_file($c_file, $c_content, $force); generate_file($pm_file, $pm_content, $force);
# File generator sub generate_file { my ($file, $content, $force_flag) = @_;
my $dir_name = dirname($file);
make_path($dir_name) unless -d $dir_name;
if ($force_flag || !-f $file) {
print " [write]$file\n";
open my $fh, '>', $file or die $!;
print $fh $content;
close $fh;
}
else {
print " [exists]$file\n";
}
}
Name
spvmdist-native-const - Generate native constants files
Usage
./util/spvmdist-native-const --input-file=.tmp/constants.txt --description='Constants for libuv' Go::UV::Constant .tmp/lib
./util/spvmdist-native-const --force --input-file=.tmp/constants.txt --description='Constants for libuv' Go::UV::Constant .tmp/lib
# Onliner with curl
curl -L https://raw.githubusercontent.com/yuki-kimoto/SPVM/refs/heads/master/util/spvmdist-native-const | perl - --input-file=.tmp/constants.txt --description='Constants for libuv' Go::UV::Constant .tmp/lib