Text::Annotated::Reader - a filter for annotating lines coming from a file
use Text::Annotated::Reader; my $reader = new Text::Annotated::Reader(input => 'text.in'); $reader->read(); $ra_annotated_lines = $reader->{annotated_lines};
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().
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};
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.