IPC::ShellCmd::Sudo - Chain sudo-ing to a different user before running the command
$cmd_obj->chain_prog( IPC::ShellCmd::Sudo->new( User => 'cpanbuild', SetHome => 1, ) );
The only external method for this is the constructor. This sets up the various arguments that are going to be used to generate the command-line.
Other methods on this are used by IPC::ShellCmd, but it should only ever be used inside of the chain_prog method on a IPC::ShellCmd object.
Specifies the username to sudo to
If true, this will cause sudo to set up $ENV{HOME} for the new user, otherwise it will be that of the current user.
I don't know of any, but that doesn't mean they're not there.
See IPC::ShellCmd for authors.
See IPC::ShellCmd for the license.
To install IPC::ShellCmd, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPC::ShellCmd
CPAN shell
perl -MCPAN -e shell install IPC::ShellCmd
For more information on module installation, please visit the detailed CPAN module installation guide.