NAME
App::RecordStream::OutputStream
AUTHOR
Benjamin Bernard <perlhacker@benjaminbernard.com> Keith Amling <keith.amling@gmail.com>
DESCRIPTION
An output stream for App::RecordStream::Record objects
SYNOPSIS
use App::RecordStream::OutputStream;
my $out = App::RecordStream::OutputStream->new();
my $record = App::RecordStream::Record->new("name" => "John Smith", "age" => 39);
$out->put_record($record);
my $hash = { foo => 'bar' };
$out->put_hashref($hashref);
CONSTRUCTOR
- my $out = App::RecordStream::OutputStream->new(FH);
-
Takes an optional output file handle to print records to. If none is specified, will output to STDOUT
PUBLIC METHODS
- $out->put_record(RECORD);
-
Takes a App::RecordStream::Record object and puts it on the output file handle.
- $out->put_hashref(HASH_REF);
-
Puts the HASH_REF on the output stream as a record.
- $out->record_string(RECORD);
-
String representation of a record, what would be printed from put_record
- $out->put_hashref(HASH_REF);
-
String representation of a hash ref, what would be printed from put_hashref