summaryrefslogtreecommitdiff
path: root/modules/Parser.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-03-07 12:37:32 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-03-07 12:37:32 +0000
commitdce9838efc4daea2cc11ad3803be7ddf185907ed (patch)
tree15a3ffe5eeb8313de038ef0fa52ac125ecb50bd3 /modules/Parser.pm
parent78f684bfd1179f1819907d3d17637db7edee85b0 (diff)
downloadMPC-dce9838efc4daea2cc11ad3803be7ddf185907ed.tar.gz
ChangeLogTag: Fri Mar 7 06:35:09 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/Parser.pm')
-rw-r--r--modules/Parser.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/Parser.pm b/modules/Parser.pm
index 8a7aed72..342784c4 100644
--- a/modules/Parser.pm
+++ b/modules/Parser.pm
@@ -13,8 +13,6 @@ package Parser;
use strict;
use FileHandle;
-my($cwd) = Cwd::getcwd();
-
# ************************************************************
# Subroutine Section
# ************************************************************
@@ -22,6 +20,7 @@ my($cwd) = Cwd::getcwd();
sub new {
my($class) = shift;
my($self) = bless {'line_number' => 0,
+ 'cwd' => Cwd::getcwd(),
}, $class;
return $self;
}
@@ -33,10 +32,10 @@ sub cd {
my($status) = chdir($dir);
if ($status && $dir ne '.') {
if ($dir =~ /^\// || $dir =~ /^[A-Za-z]:/) {
- $cwd = $dir;
+ $self->{'cwd'} = $dir;
}
else {
- $cwd .= "/$dir";
+ $self->{'cwd'} .= "/$dir";
}
}
return $status;
@@ -44,8 +43,8 @@ sub cd {
sub getcwd {
- #my($self) = shift;
- return $cwd;
+ my($self) = shift;
+ return $self->{'cwd'};
}