|
NAMEpackage Shell::EnvImporter::Shell - Shell abstraction for Shell::EnvImporter 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();
DESCRIPTIONShell::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
AUTHORDavid Faraldo, <dfaraldo@cpan.org> COPYRIGHT AND LICENSECopyright (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.
|