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


Manual Reference Pages  -  SHELL::ENVIMPORTER::SHELL (3)

.ds Aq ’

NAME

package Shell::EnvImporter::Shell - Shell abstraction for Shell::EnvImporter

CONTENTS

SYNOPSIS



  use Shell::EnvImporter;

  # Have Shell::EnvImporter create the shell object
  my $sourcer  = Shell::EnvImporter->new(
                   command  => $command,
                   shell    => $shellname,
                   auto_run => 0,
                 );

  # Fetch the shell object
  my $shellobj = $sourcer->shellobj;

  # Set the shell invocation flags
  $shellobj->flags($flags);

  # Set an alternative env command
  $shellobj->envcmd($envcmd);


  # Manipulate the ignore list:

  # - set
  $shellobj->ignore(qw(_ PWD SHLVL)); 

  # - add to
  $shellobj->ignore_push(qw(HOME)); 

  # - clear
  $shellobj->ignore_clear();


  # Run the command with the modified shell
  $sourcer->run();



DESCRIPTION

Shell::EnvImporter allows you to import environment variable changes exported by an external script or command into the current environment. The Shell::EnvImporter::Shell object provides more control over interaction with the shell.

METHODS

<B>B>flags()<B>B>
<B>flags(@flags)B>
<B>flags_push(@flags)B> Get or set the flags passed to the shell. E.g. default Bash flags are ’-norc -noprofile -c’, to prevent the sourcing of startup scripts. Note: If you set the flags, you MUST include the ’-c’ flag (or equivalent) for passing commands to the shell on the command line.
<B>B>envcmd()<B>B>
<B>envcmd($command)B> Get or set the command used to print out the environment. E.g., under the Bourne shell and variants, the default command is ’env’. Since ’env’ only prints exported environment variables, you can change the command to ’set’ to see all shell environment variables, exported or not.
<B>B>ignore()<B>B>
<B>ignore(@variables)B>
<B>ignore_push(@variables)B>
<B>B>ignore_clear()<B>B> Get, set, append to, or clear the shell ignore list. The shell ignore list is a list of variables that are never imported. These are generally variables that are changed automatically by the shell (e.g. SHLVL and PWD), providing little information to a noninteractive shell.

AUTHOR

David Faraldo, <dfaraldo@cpan.org>

COPYRIGHT AND LICENSE



  Copyright (C) 2005-2006 by Dave Faraldo

  This library is free software; you can redistribute it and/or modify it
  under the same terms as Perl itself.  No warranty is expressed or implied.



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


perl v5.20.3 SHELL::ENVIMPORTER::SHELL (3) 2009-07-03

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