The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

ETLp::Utility::Command - Runs Operating System Commands

SYNOPSIS

    use FindBin qw($Bin);
    use ETLp::Utility::Command;
    
    my $os = ETLp::Utility::Command->new();
    
    my ($output, $retcode) = $os->run('ls -l');
    
    if ($retcode) {
        printf("Error %s\n", $os->errstr);
        printf("Outout %s\n", $output);
    }

METHODS

new

Create a new ETLp::Utility::Command object.

Parameters

    * time_out. optional. How long the command should run before aborting
    

run

Executes the supplied comand

Parameters

    * An Operating System command (as a string);
    

Returns

    * In a scalar context
        o The command's return code
        
    * In an array context
        o The output of the command
        o The command's return code
        

errstr

    Returns any error from the last run command
    

Paramaters

    * None
    

Returns

    * An error message (if there is one)
    

LICENSE AND COPYRIGHT

Copyright 2010 Redbone Systems Ltd

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

The terms are in the LICENSE file that accompanies this application

1;