SPVM::Sys::User - User/Group System Calls
The Sys::User class in SPVM has methods to call user/group system calls.
use Sys::User; my $effective_user_id = Sys::User->geteuid;
static method getuid : int ();
Calls the getuid function and returns its return value.
Exceptions:
In Windows the following exception is thrown. getuid is not supported in this system(defined(_WIN32)).
static method geteuid : int ();
Calls the geteuid function and returns its return value.
In Windows the following exception is thrown. geteuid is not supported in this system(defined(_WIN32)).
static method getgid : int ();
Calls the getgid function and returns its return value.
In Windows the following exception is thrown. getgid is not supported in this system(defined(_WIN32)).
static method getegid : int ();
Calls the getegid function and returns its return value.
In Windows the following exception is thrown. getegid is not supported in this system(defined(_WIN32)).
static method setuid : int ($uid : int);
Calls the setuid function and returns its return value.
If the setuid function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
eval_error_id
In Windows the following exception is thrown. setuid is not supported in this system(defined(_WIN32)).
static method seteuid : int ($euid : int);
Calls the seteuid function and returns its return value.
If the seteuid function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. seteuid is not supported in this system(defined(_WIN32)).
static method setgid : int ($gid : int);
Calls the setgid function and returns its return value.
If the setgid function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. setgid is not supported in this system(defined(_WIN32)).
static method setegid : int ($egid : int);
Calls the setegid function and returns its return value.
If the setegid function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. setegid is not supported in this system(defined(_WIN32)).
static method setpwent : void ();
Calls the setpwent function and returns its return value.
In Windows the following exception is thrown. setpwent is not supported in this system(defined(_WIN32)).
static method endpwent : void ();
Calls the endpwent function and returns its return value.
In Windows the following exception is thrown. endpwent is not supported in this system(defined(_WIN32)).
static method getpwent : Sys::User::Passwd ();
Calls the getpwent function.
And if its return value is NULL, returns undef, otherwise creates a new Sys::User::Passwd object whose pointer is set to function's return value, and returns it.
If the getpwent function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getpwent is not supported in this system(defined(_WIN32)).
static method setgrent : void ();
Calls the setgrent function.
In Windows the following exception is thrown. setgrent is not supported in this system(defined(_WIN32)).
static method endgrent : void ();
Calls the endgrent function.
In Windows the following exception is thrown. endgrent is not supported in this system(defined(_WIN32)).
static method getgrent : Sys::User::Group ();
Calls the getgrent function.
And if its return value is NULL, returns undef, otherwise creates a new Sys::User::Group object whose pointer is set to function's return value, and returns it.
If the getgrent function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getgrent is not supported in this system(defined(_WIN32)).
static method getgroups : int ($size : int, $list : int[]);
Calls the getgroups function, and returns its return value.
If the getgroups function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getgroups is not supported in this system(defined(_WIN32)).
static method setgroups : void ($groups : int[]);
Calls the setgroups function.
If the setgroups function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. setgroups is not supported in this system(defined(_WIN32)).
static method getpwuid : Sys::User::Passwd ($id : int);
Calls the getpwuid function.
If the getpwuid function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getpwuid is not supported in this system(defined(_WIN32)).
static method getpwnam : Sys::User::Passwd ($name : string);
Calls the getpwnam function.
If the getpwnam function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getpwnam is not supported in this system(defined(_WIN32)).
static method getgrgid : Sys::User::Group ($id : int);
Calls the getgrgid function.
If the getgrgid function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getgrgid is not supported in this system(defined(_WIN32)).
static method getgrnam : Sys::User::Group ($name : string);
Calls the getgrnam function.
If the getgrnam function failed, an exception is thrown with eval_error_id set to the basic type ID of the Error::System class.
In Windows the following exception is thrown. getgrnam is not supported in this system(defined(_WIN32)).
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.