X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=PciIds%2FConfig.pm;h=49f5599aad29c8b2e9d6887d4553dc33f0a10247;hb=e7d7dbef0c5a2bdd5dae02232c9231f532d4c4e8;hp=a17968905c3ac1d78392fb5673185594ebaf95e5;hpb=034ddef0b0045aa2c942e386570bc4770d7188b9;p=pciids.git diff --git a/PciIds/Config.pm b/PciIds/Config.pm index a179689..49f5599 100644 --- a/PciIds/Config.pm +++ b/PciIds/Config.pm @@ -1,7 +1,7 @@ package PciIds::Config; use strict; use warnings; -use Startup; +use PciIds::Startup; use base 'Exporter'; our @EXPORT = qw(&checkConf &defConf %config &confList); @@ -16,6 +16,7 @@ sub loadConf() { my( $name, $val ); die "Invalid syntax on line $_\n" unless( ( $name, $val ) = /^\s*(.*\S)\s*=\s*(.*\S)\s*$/ ); $val =~ s/^"(.*)"$/$1/; + ( $val ) = ( $val =~ /(.*)/ ); #Untaint the value - config is considered part of the program $config{$name} = $val; } close CONFIG;