Verby::Action::RunCmd - a base role for actions which wrap POE::Wheel::Run.
package MyAction; use Moose; with qw/Verby::Action::RunCmd/; sub start { my ($self, $c) = @_; blah(); $self->cmd_start($c, [qw/touch file/]); }
The method to be used by your action's do method when appropriate.
do
Basically a thin wrapper arund cmd_start and cmd_finish, that lazy people will like.
cmd_start
cmd_finish
The method to be used by your action's start method when appropriate.
start
The first parameter is the context, as is typical in Verby.
The second parameter is an array reference of the command line to invoke. This is passed verbatim to IPC::Run.
The third, optional parameter, is a hash reference of options.
The option fields that you can use are
A code reference, corresponding to IPC::Run's init parameter.
A boolean (true by default), that causes the STDERR handler to be a delegate to the logger.
STDERR
The same as log_stderr but for STDOUT. False by default.
log_stderr
STDOUT
A parameter to be passed as the input to IPC::Run. This can be a string ref, a code ref, or, whatever. See IPC::Run's docs.
The inverse of cmd_start - causes an OS image to be restored, for the time just prior to the invocation of cmd_start. Only works on the EROS operating system.
On other operating systems, it waits for the child process to finish.
A default implementation of "finish" in Verby::Action that'll call cmd_finish and then "confirm" in Verby::Action.
See if the process finished. Part of the Verby::Action async interface.
A method that given the context might append something to log messages. used by Verby::Action::Make, for example.
Mostly internal - the default implementation of the logging operation used when invoking the subcommand.
None that we are aware of. Of course, if you find a bug, let us know, and we will be sure to fix it.
We use Devel::Cover to test the code coverage of the tests, please refer to COVERAGE section of the Verby module for more information.
Verby::Action::Copy - a Verby::Action::RunCmd subclass.
Yuval Kogman, <nothingmuch@woobling.org>
Copyright 2005, 2006 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Verby, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Verby
CPAN shell
perl -MCPAN -e shell install Verby
For more information on module installation, please visit the detailed CPAN module installation guide.