/[meteor]/trunk/Meteor/Config.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/Meteor/Config.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by knops.gerd, Mon Feb 4 22:23:52 2008 UTC revision 49 by knops.gerd, Mon Feb 4 22:30:35 2008 UTC
# Line 124  package Meteor::Config; Line 124  package Meteor::Config;
124          our %ConfigFileData=();          our %ConfigFileData=();
125          our %CommandLine=();          our %CommandLine=();
126          our %Defaults=();          our %Defaults=();
         our %ExtraKeys=();  
127          our %Modes=();          our %Modes=();
128                    
129          for(my $i=0;$i<scalar(@DEFAULTS);$i+=3)          for(my $i=0;$i<scalar(@DEFAULTS);$i+=3)
# Line 151  sub updateConfig { Line 150  sub updateConfig {
150                  next if($DEFAULTS[$i+1] eq 'Help');                  next if($DEFAULTS[$i+1] eq 'Help');
151                  push(@keys,$DEFAULTS[$i+1]);                  push(@keys,$DEFAULTS[$i+1]);
152          }          }
         push(@keys,keys %ExtraKeys);  
           
153                    
154          foreach my $mode ('',keys %Modes)          foreach my $mode ('',keys %Modes)
155          {          {
# Line 284  sub setCommandLineParameters { Line 281  sub setCommandLineParameters {
281                                  $key=$p;                                  $key=$p;
282                          }                          }
283                  }                  }
                   
                 if($k=~/^HeaderTemplate(\d+)$/i)  
                 {  
                         $key="HeaderTemplate$1";  
                         $ExtraKeys{$key}=1;  
                 }  
284                                                    
285                  &usage("Unknown parameter name '$kOrig'") unless(defined($key));                  &usage("Unknown parameter name '$kOrig'") unless(defined($key));
286                                    
# Line 345  sub readConfig { Line 336  sub readConfig {
336                  my $val=$2;                  my $val=$2;
337                  $val='' unless(defined($val));                  $val='' unless(defined($val));
338                                    
339                  if($key=~/^HeaderTemplate\d+$/)                  unless(exists($Defaults{$key}))
340                  {                  {
341                          $ExtraKeys{$key}=1;                          &usage("Unknown configuration file parameter name '$key$mode'");
342                  }                  }
343                  else                  if($key eq 'ConfigFileLocation')
344                  {                  {
345                          unless(exists($Defaults{$key}))                          &usage("'ConfigFileLocation' parameter not allowed in configuration file!");
                         {  
                                 &usage("Unknown configuration file parameter name '$key$mode'");  
                         }  
                         if($key eq 'ConfigFileLocation')  
                         {  
                                 &usage("'ConfigFileLocation' parameter not allowed in configuration file!");  
                         }  
346                  }                  }
347                                    
348                  $val=~s/^--/-/;                  $val=~s/^--/-/;

Legend:
Removed from v.48  
changed lines
  Added in v.49

  ViewVC Help
Powered by ViewVC 1.1.26