NAME
Text::Annotated::Writer -- filter for writing Text::Annotated lines
SYNOPSIS
use Text::Annotated::Writer;
my $writer = new Text::Annotated::Writer(
input => $ra_annotated_lines, # ref to array with Text::Annotated objects
output => 'text.out', # output file
no_annotation => 1, # suppresses writing of the annotations
);
$writer->write(); # actually writes the lines to file
DESCRIPTION
Text::Annotated::Writer is a subclass of Text::Filter, with as purpose the dumping of annotated lines to an array of ASCII lines or a file. The following issues are specific to Text::Annotated::Writer:
The list of allowed arguments to new() includes the
no_annotation
flag. When set to a true value, the annotation of the lines is suppressed in the output, and only the ASCII content is shown. The default behaviour is to output the annotation with each line.The write() method executes the output operation. run() is an alias for write().
The writer() method builds a Text::Annotated::Writer filter with the supplied arguments, calls write() and finally returns the filter. It is thus possible to combine the whole output operation in a single statement like
Text::Annotated::Writer->writer( input => $ra_annotated_lines, output => 'text.out', no_annotation => 1, );
SEE ALSO
More info on using filters is available from Text::Filter.
Text::Annotated::Line describes annotated lines.
CVS VERSION
This is CVS version $Revision: 1.7 $, last updated at $Date: 2007-05-12 18:39:16 $.
AUTHOR
Wim Verhaegen <wim.verhaegen@ieee.org>
COPYRIGHT
Copyright (c) 2000-2002 Wim Verhaegen. All rights reserved. This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.