| 1 | package Env;
|
|---|
| 2 |
|
|---|
| 3 | our $VERSION = '1.00';
|
|---|
| 4 |
|
|---|
| 5 | =head1 NAME
|
|---|
| 6 |
|
|---|
| 7 | Env - perl module that imports environment variables as scalars or arrays
|
|---|
| 8 |
|
|---|
| 9 | =head1 SYNOPSIS
|
|---|
| 10 |
|
|---|
| 11 | use Env;
|
|---|
| 12 | use Env qw(PATH HOME TERM);
|
|---|
| 13 | use Env qw($SHELL @LD_LIBRARY_PATH);
|
|---|
| 14 |
|
|---|
| 15 | =head1 DESCRIPTION
|
|---|
| 16 |
|
|---|
| 17 | Perl maintains environment variables in a special hash named C<%ENV>. For
|
|---|
| 18 | when this access method is inconvenient, the Perl module C<Env> allows
|
|---|
| 19 | environment variables to be treated as scalar or array variables.
|
|---|
| 20 |
|
|---|
| 21 | The C<Env::import()> function ties environment variables with suitable
|
|---|
| 22 | names to global Perl variables with the same names. By default it
|
|---|
| 23 | ties all existing environment variables (C<keys %ENV>) to scalars. If
|
|---|
| 24 | the C<import> function receives arguments, it takes them to be a list of
|
|---|
| 25 | variables to tie; it's okay if they don't yet exist. The scalar type
|
|---|
| 26 | prefix '$' is inferred for any element of this list not prefixed by '$'
|
|---|
|
|---|