Fsdb::Filter::dbsubprocess(3)

NAME
dbsubprocess - invoke a subprocess as a Fsdb filter object

SYNOPSIS
dbsubprocess program [arguments...]

DESCRIPTION
Run PROGRAM as a process, with optional ARGUMENTS as program arguments, feeding its standard input and standard output as fsdb streams.

This program is primarily for internal use by dbmapreduce.

Like dbpipeline, dbsubprocess program does have a Unix command; instead it is used only from within Perl.

OPTIONS

-w or --warnings
    Enable warnings in user supplied code. (Default to include warnings.)

and the standard fsdb options:

-d  Enable debugging output.

-i or --input InputSource
    Read from InputSource, typically a file, or - for standard input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.

-o or --output OutputDestination
    Write to OutputDestination, typically a file, or - for standard output, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue objects.

--autorun or --noautorun
    By default, programs process automatically, but Fsdb::Filter objects in Perl do not run until you invoke the run() method. The "--(no)autorun" option controls that behavior within Perl.

--help
    Show help.

--man
    Show full manual.

SAMPLE USAGE

  Input:
    xxx

  Command:
    xxx

  Output:
    xxx

SEE ALSO
dbpipeline(1), Fsdb(3)

CLASS FUNCTIONS

  new
    $filter = new Fsdb::Filter::dbsubprocess(@arguments);

Create a new dbsubprocess object, taking command-line arugments.

  set_defaults
    $filter->set_defaults();

Internal: set up defaults.

  parse_options
    $filter->parse_options(@ARGV);

Internal: parse options

  setup
    $filter->setup();

Internal: setup, parse headers.

  _subproc_postprocessor
    $filter->_subproc_postprocessor

(internal) Read output from the subprocess and convert back to a fsdb stream.

  _dbsubprocess_open2
    ($pid, $from_child, $to_child) = _open2('some', 'cmd', 'and', 'args');

Cribbed off of IPC::Open3.pm to avoid leaking symbols in perl-5.10.0, but simplified considerably. Basically the "Symbol.pm" GENnn symbols were leaking, for whatever reason.

This command cannot fail (it will die if it fails).

  run
    $filter->run();

Internal: run over all data rows.

  finish
    $filter->finish();

Internal: write trailer.

AUTHOR and COPYRIGHT
Copyright (C) 1991-2008 by John Heidemann <johnh@isi.edu>

This program is distributed under terms of the GNU general public license, version 2. See the file COPYING with the distribution for details.