-
-
03 Mar 2019 22:06:24 UTC
- Distribution: Asm-Preproc
- Module version: 1.03
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (695 / 0 / 7)
- Kwalitee
Bus factor: 0- 96.42% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (17.35KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Class::Accessor
- Data::Dump
- File::Slurp
- Iterator::Simple::Lookahead
- Test::More
- Text::Template
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Asm::Preproc::Line - One line of text retrieved from the input
SYNOPSIS
use Asm::Preproc::Line; my $line = Asm::Preproc::Line->new($text, $file, $line_nr); $line->text; $line->rtext; $line->file; $line->line_nr; my $line2 = $line->clone; if ($line == $line2) {...} if ($line != $line2) {...} $line->error($message); $line->warning($message);
DESCRIPTION
This module defines the object to represent one line of input text to preprocess. It contains the actual text from the line, and the file name and line number where the text was retrieved. It contains also utility methods for error messages.
METHODS
new
Creates a new object with the given text, file name and line number.
text
Get/set line text.
rtext
Return reference to the text value.
file
Get/set file name.
line_nr
Get/set line number.
clone
Creates an identical copy as a new object.
is_equal
if ($self == $other) { ... }
Compares two line objects. Overloads the '==' operator.
is_different
if ($self != $other) { ... }
Compares two line objects. Overloads the '!=' operator.
error
Dies with the given error message, indicating the place in the input source file where the error occured as:
FILE(LINE) : error: MESSAGE
warning
Warns with the given error message, indicating the place in the input source file where the error occured as:
FILE(LINE) : warning: MESSAGE
AUTHOR, BUGS, SUPPORT, LICENSE, COPYRIGHT
See Asm::Preproc.
Module Install Instructions
To install Asm::Preproc, copy and paste the appropriate command in to your terminal.
cpanm Asm::Preproc
perl -MCPAN -e shell install Asm::Preproc
For more information on module installation, please visit the detailed CPAN module installation guide.