SPVM::Sys::Env - Environemnt Variable
SPVM::Sys::Env is the Sys::Env class in SPVM language. It provides system calls for environemnt variables.
SPVM::Sys::Env
Sys::Env
use Sys::Env; my $path = Sys::Env->getenv("PATH");
static method getenv : string ($name : string);
The getenv() function searches the environment list to find the environment variable name, and returns a pointer to the corresponding value string.
See the detail of the getenv function in the case of Linux.
static method setenv : int ($name : string, $value : string, $overwrite : int);
The setenv() function adds the variable name to the environment with the value value, if name does not already exist. If name does exist in the environment, then its value is changed to value if overwrite is nonzero; if overwrite is zero, then the value of name is not changed. This function makes copies of the strings pointed to by name and value (by contrast with putenv(3)).
See the detail of the setenv function in the case of Linux.
static method unsetenv : int ($name : string);
The unsetenv() function deletes the variable name from the environment. If name does not exist in the environment, then the function succeeds, and the environment is unchanged.
See the detail of the unsetenv function in the case of Linux.
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::Sys, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::Sys
CPAN shell
perl -MCPAN -e shell install SPVM::Sys
For more information on module installation, please visit the detailed CPAN module installation guide.