NAME
Text::Annotated::Reader - a filter for annotating lines coming from a file
SYNOPSIS
use Text::Annotated::Reader;
my $reader = new Text::Annotated::Reader(input => 'text.in');
$reader->read();
$ra_annotated_lines = $reader->{annotated_lines};
DESCRIPTION
Text::Annotated::Reader is a subclass of Text::Filter, with as purpose the reading of lines from a file, and annotating the filename and linenumber for each line. The following issues are specific to Text::Annotated::Reader:
The set_input() method only accepts filenames as a valid input argument. This requirement is also imposed on the
input
argument passed to new(), as new() invokes set_input().The read() method executes the input operation. run() is an alias for read().
The reader() method builds a Text::Annotated::Reader filter with the supplied arguments, calls read() and finally returns the filter. It is thus possible to combine the whole input operation in a single statement like
my $ra_annotated_lines = Text::Annotated::Reader->reader(input => 'text.in')->{annotated_lines};
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.