GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Shell::GetEnv::Dumper(3) User Contributed Perl Documentation Shell::GetEnv::Dumper(3)

Shell::GetEnv::Dumper - store and retrieve environment

   # write environment to file
   perl /path/to/Shell/GetEnv/Dumper.pm file

   # read environment from file
   use Shell::GetEnv::Dumper;
   $envs = Shell::GetEnv::Dumper::read_envs( $filename );

Shell::GetEnv::Dumper is used by Shell::GetEnv to store and retrieve a subprocess's environment. It uses Storable to write and read the %ENV hash from and to disk.

Writing the environment is done from within the subshell by executing this module as a Perl script. The command line may be formed as follows:

   # this loads the path to the module in %INC.
   use Shell::GetEnv::Dumper;

   # this invokes the module directly, using the Perl which was
   # used to invoke the parent process.  It uses the fact that we
   # use()'d Shell::GetEnv::Dumper and Perl stored the absolute path
   # to it in %INC;
   $cmd = qq{$^X '$INC{'Shell/GetEnv/Dumper.pm'}' $filename};

Retrieving the environment is done using the read_envs() function.

Note that nothing is exportable from this module.

write_envs
This function should never be invoked directly. It is called when this module is executed as a standalone Perl script. It expects that $ARGV[0] contains the name of the file to which the environment is to be written. It exits with an error message and non-successful exit status if there is an error.
read_envs
  $envs = Shell::GetEnv::Dumper::read_envs( $filename );
    

Extract the environment from the given file. The environment must have been written using write_envs().

Diab Jerius, <djerius@cpan.org>

Copyright 2007 Smithsonian Astrophysical Observatory

This software is released under the GNU General Public License. You may find a copy at

          http://www.gnu.org/licenses
2016-08-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.