Text::Annotated::Line - strings with annotation about their origin
use Text::Annotated::Line; # construct a line $line = new Text::Annotated::Line( filename => 'foo', linenr => 23, content => 'This is the line content', ); # print the line, with annotation print $line->stringify_annotated, "\n"; # print the line without annotation print $line, "\n";
All of the following fields must be set through the constructor new():
name of the file the string originates from
number of the line in the file the string is located
the actual content of the string
Constructs a new Text::Annotated::Line object. Fields can be set by passing them as a hash to new().
Returns the line without annotations. This method is used for overloading, so you implicitly call it in any circumstance where you use a Text::Annotated::Line object where a string is expected.
Returns a string with the content AND the annotation if the format [filename#linenr]content. Trailing newlines in the content are omitted.
[filename#linenr]content
Filters for handling annotated lines are described in Text::Annotated::Reader and Text::Annotated::Writer.
This is CVS version $Revision: 1.6 $, 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.