diff options
Diffstat (limited to 'cgi-bin/query.pl')
| -rwxr-xr-x | cgi-bin/query.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cgi-bin/query.pl b/cgi-bin/query.pl index eef0b09..d9e4573 100755 --- a/cgi-bin/query.pl +++ b/cgi-bin/query.pl @@ -7,11 +7,10 @@ use DBI; use CGI; -use XML::Simple qw(:strict); -my $xs1 = XML::Simple->new( KeyAttr => ['id'], Cache => [ qw/memcopy/ ]); -my $sqlconf = $xs1->XMLin( "/home/icxcnika/AntiSpamMeta/config-main/mysql.xml", - ForceArray => ['ident', 'geco'], - 'GroupTags' => { ignoredidents => 'ident', ignoredgecos => 'geco' }); +use JSON qw(decode_json); +use IO::All; + +my $sqlconf = decode_json(io->file("/home/icxcnika/AntiSpamMeta/config-main/mysql.json")->all); my $dbh = DBI->connect("DBI:mysql:database=" . $sqlconf->{db} . ";host=" . $sqlconf->{host} . ";port=" . $sqlconf->{port}, $sqlconf->{user}, $sqlconf->{pass}); |
