|
NAMECommand::Runner - run external commands and Perl code refs SYNOPSIS use Command::Runner;
my $cmd = Command::Runner->new(
command => ['ls', '-al'],
timeout => 10,
stdout => sub { warn "out: $_[0]\n" },
stderr => sub { warn "err: $_[0]\n" },
);
my $res = $cmd->run;
DESCRIPTIONCommand::Runner runs external commands and Perl code refs METHODSnewA constructor, which takes:
runRun command. It returns a hash reference, which contains: MOTIVATIONI develop a CPAN client App::cpm, where I need to execute external commands and Perl code refs with: While App::cpanminus has excellent APIs for such use, I still needed to tweak them in App::cpm. So I ended up creating a seperate module, Command::Runner. AUTHORShoichi Kaji <skaji@cpan.org> COPYRIGHT AND LICENSECopyright 2017 Shoichi Kaji <skaji@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|