Command class

Interface to executing command, controling its STDIN and getting its STDOUT and STDERR.

Methods

new()
Create a new Command object.

Arguments:

$executable - path to executable

@arguments - array of arguments to pass

Returns: Command instance

useSTDIN()
Have executed command use STDIN of calling program.

Arguments: None

Returns: Nothing

setInput()
Cause the given string to be passed to command as input.

Arguments:

$string - input to pass into program

Returns: Nothing

exec()
Execute the command.

Arguments: None

Returns: 1 on success, 0 otherwise

getOutput()
Return the output from the command

Arguments: None

Returns: String containing output from command

getError()
Returns last error message.

Arguments: None

Returns: String containing Error Message from command. Maybe be undef if no error has occurred.

getStatus()
Return status code from the command

Arguments: None

Returns: Status code ($?)

Version

GridShib-CA version 0.4.0 ($Id: Command.pm.in,v 1.4 2006/11/05 17:35:54 welch Exp $)