summaryrefslogtreecommitdiff
path: root/modules/TemplateInputReader.pm
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-02-17 17:37:43 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-02-17 17:37:43 +0000
commitd052bc9b8deed2539d43f1782d814b61fe6795bf (patch)
tree2d7061caa78b4e82726ccb9b70bf7433d98280fd /modules/TemplateInputReader.pm
parent5beaf1f582dfbff2d16dc9759e071a3a9e25e99f (diff)
downloadMPC-d052bc9b8deed2539d43f1782d814b61fe6795bf.tar.gz
ChangeLogTag: Thu Feb 17 11:36:22 2005 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/TemplateInputReader.pm')
-rw-r--r--modules/TemplateInputReader.pm21
1 files changed, 16 insertions, 5 deletions
diff --git a/modules/TemplateInputReader.pm b/modules/TemplateInputReader.pm
index 643684fa..ad6e7279 100644
--- a/modules/TemplateInputReader.pm
+++ b/modules/TemplateInputReader.pm
@@ -32,9 +32,10 @@ sub new {
my($inc) = shift;
my($self) = Parser::new($class, $inc);
- $self->{'values'} = {};
- $self->{'cindex'} = 0;
- $self->{'current'} = [ $self->{'values'} ];
+ $self->{'values'} = {};
+ $self->{'cindex'} = 0;
+ $self->{'current'} = [ $self->{'values'} ];
+ $self->{'realnames'} = {};
return $self;
}
@@ -52,8 +53,11 @@ sub parse_line {
}
elsif ($line =~ /^([\w\s]+)\s*{$/) {
## Entering a new scope
- my($name) = lc($1);
- $name =~ s/\s+$//;
+ my($rname) = $1;
+ $rname =~ s/\s+$//;
+ my($name) = lc($rname);
+ $self->{'realnames'}->{$name} = $rname;
+
if (!defined $$current[$self->{'cindex'}]->{$name}) {
$$current[$self->{'cindex'}]->{$name} = {};
}
@@ -113,4 +117,11 @@ sub get_value {
}
+sub get_realname {
+ my($self) = shift;
+ my($tag) = shift;
+ return $self->{'realnames'}->{lc($tag)};
+}
+
+
1;