diff options
| author | 2016-03-13 21:40:02 +0000 | |
|---|---|---|
| committer | 2016-03-13 21:40:45 +0000 | |
| commit | 8994c5df135bc2fe266fe24d7d297608e397893c (patch) | |
| tree | a2bb8e3c6782ed89f66b0a6a4baaea4aab87e702 /cgi-bin/secret/investigate.pl | |
| parent | 8f49cfc49cd71de07d48f10d5c3584e7834d9c17 (diff) | |
JSONifyweb
Diffstat (limited to 'cgi-bin/secret/investigate.pl')
| -rwxr-xr-x | cgi-bin/secret/investigate.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cgi-bin/secret/investigate.pl b/cgi-bin/secret/investigate.pl index 6b48027..60120ab 100755 --- a/cgi-bin/secret/investigate.pl +++ b/cgi-bin/secret/investigate.pl @@ -6,11 +6,10 @@ use strict; 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}); $dbh->do("SET time_zone = '+0:00';"); |
