NAME

IPC::ShellCmd::Sudo - Chain sudo-ing to a different user before running the command

SYNOPSIS

    $cmd_obj->chain_prog(
        IPC::ShellCmd::Sudo->new(
	        User => 'cpanbuild',
            SetHome => 1,
        )
    );

DESCRIPTION

IPC::ShellCmd::Sudo->new([$opt => $val, ...])

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.

User

Specifies the username to sudo to

SetHome

If true, this will cause sudo to set up $ENV{HOME} for the new user, otherwise it will be that of the current user.

BUGS

I don't know of any, but that doesn't mean they're not there.

AUTHORS

See IPC::ShellCmd for authors.

LICENSE

See IPC::ShellCmd for the license.