diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-02-28 13:50:25 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-02-28 13:50:25 +0000 |
commit | 00a04bc95e009736f0a554393033c11877bf63af (patch) | |
tree | 173d790b30b8eb39d5960e1239c69de600d5e69c /modules/Parser.pm | |
parent | a934f56342143886b158773b9dc9c64e72f9fdd4 (diff) | |
download | MPC-00a04bc95e009736f0a554393033c11877bf63af.tar.gz |
ChangeLogTag: Fri Feb 28 07:49:00 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/Parser.pm')
-rw-r--r-- | modules/Parser.pm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/Parser.pm b/modules/Parser.pm index 40f46ec8..8a7aed72 100644 --- a/modules/Parser.pm +++ b/modules/Parser.pm @@ -83,6 +83,17 @@ sub process_special { } +sub collect_line { + my($self) = shift; + my($fh) = shift; + my($lref) = shift; + my($line) = shift; + + $$lref = $self->strip_line($line); + return $self->parse_line($fh, $$lref); +} + + sub read_file { my($self) = shift; my($input) = shift; @@ -92,10 +103,9 @@ sub read_file { $self->{'line_number'} = 0; if (open($ih, $input)) { + my($line) = ""; while(<$ih>) { - my($line) = $self->strip_line($_); - - ($status, $errorString) = $self->parse_line($ih, $line); + ($status, $errorString) = $self->collect_line($ih, \$line, $_); if (!$status) { last; |