Env::C 0.06 review

Download
by rbytes.net on

Env::C is a Get/Set/Unset Environment Variables on the C level. SYNOPSIS use Env::C; my $key = "USER"; $val = Env::

License: Perl Artistic License
File size: 8K
Developer: Stas Bekman
0 stars award from rbytes.net

Env::C is a Get/Set/Unset Environment Variables on the C level.

SYNOPSIS

use Env::C;

my $key = "USER";
$val = Env::C::getenv($key) || '';

Env::C::setenv($key, "foobar", [$override]);
$new_val = Env::C::getenv($key) || '';

Env::C::unsetenv($key);

my $ar_env = Env::C::getallenv();
print join "n", @$ar_env;

This module provides a Perl API for getenv(3), setenv(3) and unsetenv(3). It also can return all the environ variables.

Sometimes Perl invokes modules with underlaying C APIs which rely on certain environment variables to be set, if these variables are set in Perl and the glue code doesn't worry to set them on the C level, these variables might not be seen by the C level. This module shows what really the C level sees.

Requirements:
Perl

Env::C 0.06 search tags