diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2007-08-10 18:16:46 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2007-08-10 18:16:46 +0000 |
commit | 26f80af0c0bc70d5c9ecc57c218b60a164296147 (patch) | |
tree | 3adbed644a070547a0b01660ceb0beef816e1ebd /modules/ConfigParser.pm | |
parent | b798923971875e804264728d881e68700bcffad7 (diff) | |
download | MPC-26f80af0c0bc70d5c9ecc57c218b60a164296147.tar.gz |
ChangeLogTag: Fri Aug 10 18:15:22 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'modules/ConfigParser.pm')
-rw-r--r-- | modules/ConfigParser.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/ConfigParser.pm b/modules/ConfigParser.pm index 0fd13cd5..a6003521 100644 --- a/modules/ConfigParser.pm +++ b/modules/ConfigParser.pm @@ -29,6 +29,7 @@ sub new { ## Set the values associative array $self->{'values'} = {}; $self->{'valid'} = $valid; + $self->{'warned'} = {}; return $self; } @@ -97,8 +98,11 @@ sub preprocess { my($val) = $ENV{$name}; if (!defined $val) { $val = ''; - $self->diagnostic("$name was used in the configuration file, " . - "but was not defined."); + if (!defined $self->{'warned'}->{$name}) { + $self->diagnostic("$name was used in the configuration file, " . + "but was not defined."); + $self->{'warned'}->{$name} = 1; + } } $str =~ s/\$([\(\w\)]+)/$val/; } |