diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-09-16 16:50:31 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-09-16 16:50:31 +0000 |
commit | 25949958531eb4353d80b520ca327d1d8c971cc6 (patch) | |
tree | 7adf74fd2a5f026351bc0dca4be8a0222cb42089 /modules/Parser.pm | |
parent | 9af0fb9f3511c2bdd5f6d477cb5ab63dc3624927 (diff) | |
download | MPC-25949958531eb4353d80b520ca327d1d8c971cc6.tar.gz |
ChangeLogTag: Tue Sep 16 11:49:19 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/Parser.pm')
-rw-r--r-- | modules/Parser.pm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/Parser.pm b/modules/Parser.pm index 25a2a1b1..7977ae1a 100644 --- a/modules/Parser.pm +++ b/modules/Parser.pm @@ -127,15 +127,16 @@ sub read_file { } -sub line_number { - my($self) = shift; - my($number) = shift; +sub get_line_number { + my($self) = shift; + return $self->{'line_number'}; +} - if (defined $number) { - $self->{'line_number'} = $number; - } - return $self->{'line_number'}; +sub set_line_number { + my($self) = shift; + my($number) = shift; + $self->{'line_number'} = $number; } @@ -156,15 +157,14 @@ sub get_include_path { sub search_include_path { my($self) = shift; my($file) = shift; - my($found) = undef; foreach my $include ('.', @{$self->{'include'}}) { if (-r "$include/$file") { - $found = "$include/$file"; - last; + return "$include/$file"; } } - return $found; + + return undef; } |