cs::Sink - a data sink
use cs::Sink;
The cs::Sink module provides generic data sink facilities. cs::Sinks may be created which wire to a variety of objects.
Creates a new cs::Sink using the arguments in the array references by sink-args and writes the data to it. Returns undef on error.
Create a new sink attached to the file named in path.
Create a new sink of the specified type. args... varies according to the type:
Attach to the filehandle handle. Flushes any pending output in handle as a side-effect.
Attach to the file named by path in append mode.
Attach to the file named in path in rewrite mode.
Attach to a pipe to the shell command shcmd.
Attach to the array referenced by arrayref. Each Write() to the sink pushes a single string onto the array.
Attach to the scalar referenced by scalarref. Each Write() appends to the scalar.
Attach to the cs::Sink object sink. Typically used by subclasses to apply a filter to data before depositing in sink.
Create a new sink object attached to a new temporary file allocated by cs::Pathname::tmpnam(tmpnam-args).
Path()
For sinks attached to files, return the pathname of the file.
Handle()
For sinks attached to files or filehandles, return the filehandle.
Write all the data to the sink.
cs::Source(3), cs::Pathname(3)
Cameron Simpson <cs@zip.com.au>