1 package PciIds::Config;
7 our @EXPORT = qw(&checkConf &defConf %config &confList);
12 open CONFIG, $directory."/config" or die "Config file not found. Make sure config is in the directory and the correct path is in Startup.pm\n";
14 next if( /^\s*(|#.*)$/ );
17 die "Invalid syntax on line $_\n" unless( ( $name, $val ) = /^\s*(.*\S)\s*=\s*(.*\S)\s*$/ );
18 $val =~ s/^"(.*)"$/$1/;
19 $config{$name} = $val;
26 foreach( @{$names} ) {
27 die "Variable not set: $_\n" unless( defined $config{$_} );
33 foreach( keys %{$underlay} ) {
34 $config{$_} = $underlay->{$_} unless( defined $config{$_} );
41 push @result, $config{$_} foreach( @{$names} );