Abe Timmerman > Test-Smoke > Test::Smoke::Util::Execute

Download:
Test-Smoke-1.6.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  15
Open  4
Stalled  1
View/Report Bugs
Source   Latest Release: Test-Smoke-1.61_03

NAME ^

Test::Smoke::Util::Execute - Run a command and return its output.

SYNOPSIS ^

    use Test::Smoke::Util::Execute;

    my $ex = Test::Smoke::Execute->new(
        verbose   => $level,
        command   => $command,
        arguments => [@arguments],
    );
    my $output = eval { $ex->run() };
    if (my $error = $@) {
        croak("Error running $command: $error");
    }

DESCRIPTION ^

Test::Smoke::Util::Execute->new(%arguments)

Instantiate an object of this class

Arguments

Returns

The instantiated object.

$executer->run()

Run the command with backticks.

Arguments

None

Returns

Context aware list or scalar.

If any error occured, $self->exitcode is set.

$executer->exitcode

Getter that returns the exitcode.

$executer->verbose

Accessor that returns the verbose.

$executer->arguments

Accessor that returns the arguments.

STUFF ^

(c) MMXIII - Abe Timmerman <abeltje@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See:

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: