diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-22 09:26:47 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-22 09:32:47 +0300 |
commit | 4da9775f1d88787517e54f5c1fe1c43f1e023480 (patch) | |
tree | a214263c46aea4199cdf32ee0763f53e1e80a05a /lib | |
parent | 5ea83707e0b082687b59469fa422611e18e812bc (diff) | |
download | posixruncapture-4da9775f1d88787517e54f5c1fe1c43f1e023480.tar.gz posixruncapture-4da9775f1d88787517e54f5c1fe1c43f1e023480.tar.bz2 |
Add new methods for manipulating argv and program pathname
* Capture.xs (capture_new): Use new ARGV typedef. Handle the new
"program" keyword.
(capture_set_argv_ref, capture_set_program)
(capture_argv, capture_program): New methods.
* capture.c: Handle out of memory errors.
(XS_pack_ARGV, XS_unpack_ARGV): New functions.
(capture_new): Change signature. Set the rc_program field.
(capture_DESTROY): Destroy cp->program
(capture_set_argv_ref): New function.
* capture.h (capture) <program>: New member.
(ARGV): New typedef.
(capture_new): Change signature.
(XS_unpack_ARGV, XS_pack_ARGV)
(capture_set_argv_ref): New protos.
* lib/POSIX/Run/Capture.pm (set_argv): New method.
* typemap: Hande ARGV conversions.
* runcap: Update.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/POSIX/Run/Capture.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/POSIX/Run/Capture.pm b/lib/POSIX/Run/Capture.pm index af28880..dacdcfd 100644 --- a/lib/POSIX/Run/Capture.pm +++ b/lib/POSIX/Run/Capture.pm @@ -50,7 +50,10 @@ sub get_lines { return \@lines; } - +sub set_argv { + my $self = shift; + $self->set_argv_ref([@_]); +} 1; __END__ |