aboutsummaryrefslogtreecommitdiff
path: root/capture.c
AgeCommit message (Collapse)AuthorFiles
2017-07-25Fix typoSergey Poznyakoff1
* capture.c (capture_new): Fix mistyped flag
2017-07-23Change return value of capture_run to conform to Perl conventionSergey Poznyakoff1
* capture.c (capture_run): Return true on success. * t/TestCapture.pm: Expect true on success
2017-07-23Avoid unnecessary memory allocationSergey Poznyakoff1
* capture.c (capture_set_input): Don't allocate input sc_base. (capture_DESTROY): Reset sc_base to NULL.
2017-07-22Implement "input" key and set_input method.Sergey Poznyakoff1
* Capture.xs (capture_new): New keyword "input". (capture_set_input): New method. * MANIFEST: Update. * Makefile.PL: Add the 'check' goal (alias to 'test'). * capture.c (capture_new): Take input SV as 5th parameter. (capture_set_input): New function. (capture_DESTROY): Dereference input, if defined. * capture.h (capture) <input>: New method. (capture_new): Change signature. * t/08input.t: New file. * t/TestCapture.pm: Read content in BEGIN block, instead of hardcoding it. (TestCapture): $argv can be a hash or array ref. All uses changed.
2017-07-22Add new methods for manipulating argv and program pathnameSergey Poznyakoff1
* 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.
2017-07-21Write more tests.Sergey Poznyakoff1
* runcap: Update. * Makefile.PL (test): Generate custom subdirs-test_ rules. * capture.c (capture_new): Fix type checking. * t/POSIX-Run-Capture.t: Rename to t/00use.t * t/01simple.t: New file. * t/02lines.t: New file. * t/03two.t: New file. * t/TestCapture.pm: New file.
2017-07-21Improve constructor calling convention; implement timeout and line monitoringSergey Poznyakoff1
* Capture.xs: Rewrite constructor to optionally take named arguments. * Makefile.PL: Remove 'subdirs-test_.*' rules. * capture.h (capture): New structure. All capture_ functions operate on it. * capture.c (capture_new): Change signature. Set line monitoring features if required. (capture_DESTROY): Free line buffers and dereference callback references. * lib/POSIX/Run/Capture.pm: Fix trivial error (get_lines): New method.
2017-07-20Initial commitSergey Poznyakoff1

Return to:

Send suggestions and report system problems to the System administrator.