Text::Annotated::Writer -- filter for writing Text::Annotated lines
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
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.
no_annotation
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, );
More info on using filters is available from Text::Filter.
Text::Annotated::Line describes annotated lines.
This is CVS version $Revision: 1.7 $, last updated at $Date: 2007-05-12 18:39:16 $.
Wim Verhaegen <wim.verhaegen@ieee.org>
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.
To install Text::Annotated::Line, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Annotated::Line
CPAN shell
perl -MCPAN -e shell install Text::Annotated::Line
For more information on module installation, please visit the detailed CPAN module installation guide.