NAME

Action::Generic::Plugin::System - Run a system command

SYNOPSIS

Create an action:

my $action = $controller->action(
 type => 'System',
 name => 'A system action',
 params => [qw(ls -al ~)]
);

Add it to a controller..

$controller->add_actions( $action );

..and run it.

$controller->run();  # doggieporn.avi, backdoorsluts9.mpeg

DESCRIPTION

The System action allows executing of arbitrary system commands. This is accomplished by passing an ARRAYREF to the params attribute, which is fed directly into Perl's system() function.

The results of the system() call are saved in the results hash (as code).

Attributes

params

A hashref of parameters. Is passed directly to system().

The return value of the system call is captured.

LICENSE AND COPYING

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

BUGS

Probably. Patches welcome!

AUTHOR

Dave Houston <dhouston@cpan.org>, 2010