Lines Matching full:env
1 package Env; package
7 Env - perl module that imports environment variables as scalars or arrays
11 use Env;
12 use Env qw(PATH HOME TERM);
13 use Env qw($SHELL @LD_LIBRARY_PATH);
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
21 The C<Env::import()> function ties environment variables with suitable
23 ties all existing environment variables (C<keys %ENV>) to scalars. If
46 use Env qw(@PATH);
51 use Env qw(PATH);
54 except that if C<$ENV{PATH}> started out empty, the second approach leaves
80 my @vars = grep /^[\$\@]?[A-Za-z_]\w*$/, (@_ ? @_ : keys(%ENV));
90 tie ${"${callpack}::$name"}, Env, $name;
93 tie @{"${callpack}::$name"}, Env::Array::VMS, $name;
95 tie @{"${callpack}::$name"}, Env::Array, $name;
107 $ENV{$$self};
113 $ENV{$$self} = $value;
115 delete $ENV{$$self};
121 package Env::Array;
136 return 1 + scalar(() = $ENV{$$self} =~ /\Q$sep\E/g);
141 my @temp = split($sep, $ENV{$$self});
143 $ENV{$$self} = join($sep, @temp);
148 $ENV{$$self} = '';
153 return (split($sep, $ENV{$$self}))[$index];
158 my @temp = split($sep, $ENV{$$self});
160 $ENV{$$self} = join($sep, @temp);
171 my @temp = split($sep, $ENV{$$self});
173 $ENV{$$self} = join($sep, @temp);
179 my @temp = split($sep, $ENV{$$self});
181 $ENV{$$self} = join($sep, @temp);
187 my @temp = split($sep, $ENV{$$self});
189 $ENV{$$self} = join($sep, @temp);
195 my @temp = split($sep, $ENV{$$self});
197 $ENV{$$self} = join($sep, @temp);
203 my @temp = split($sep, $ENV{$$self});
205 $ENV{$$self} = join($sep, @temp);
213 my @temp = split($sep, $ENV{$$self});
216 $ENV{$$self} = join($sep, @temp);
220 $ENV{$$self} = join($sep, @temp);
227 package Env::Array::VMS;
239 while ($i < 127 and defined $ENV{$$self . ';' . $i}) { $i++; };
245 return $ENV{$$self . ';' . $index};