From fcf4cf30e88466e90f357f031aab4f4a92d6b5be Mon Sep 17 00:00:00 2001 From: Will Budic Date: Tue, 3 Mar 2020 06:07:47 +1100 Subject: [PATCH] . --- htdocs/cgi-bin/CNF_SnippetsTesting.pl | 7 ++--- htdocs/cgi-bin/CNF_test_anons.pl | 2 +- htdocs/cgi-bin/CNF_tester.pl | 42 +++++++++++++++------------ 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/htdocs/cgi-bin/CNF_SnippetsTesting.pl b/htdocs/cgi-bin/CNF_SnippetsTesting.pl index c2b4db7..93ec55b 100755 --- a/htdocs/cgi-bin/CNF_SnippetsTesting.pl +++ b/htdocs/cgi-bin/CNF_SnippetsTesting.pl @@ -20,17 +20,16 @@ my $db = DBI->connect( $dsn, "admin", "admin", { PrintError => 0, RaiseErr or Exception->throw("Connect failed [$_]"); Settings::getConfiguration($db,{backup_enabled=>1}); - print "backup_enabled1:[".Settings::anon('backup_enabled')."]\n"; my @r = Settings::anons(); print "anon_size:[".@r."]@r\n"; -Settings::getConfiguration($db); +Settings::getConfiguration($db);#in file set to 0 print "backup_enabled2:[".Settings::anon('backup_enabled')."]\n"; -Settings::getConfiguration($db,{backup_enabled=>1}); +Settings::getConfiguration($db,{backup_enabled=>1});#this is later, code set. print "backup_enabled3:[".Settings::anon('backup_enabled')."]\n"; -Settings::getConfiguration($db);#Murky waters, can't update an anon later through code. +Settings::getConfiguration($db);#Murky waters, can't update an anon later through code. Config initially set. print "backup_enabled4:[".Settings::anon('backup_enabled')."]\n"; # my $s1 ="`1`2`3`te\\`s\\`t`the best`"; diff --git a/htdocs/cgi-bin/CNF_test_anons.pl b/htdocs/cgi-bin/CNF_test_anons.pl index 9f229ff..c1da7e0 100755 --- a/htdocs/cgi-bin/CNF_test_anons.pl +++ b/htdocs/cgi-bin/CNF_test_anons.pl @@ -18,7 +18,7 @@ use lib "system/modules"; use lib $ENV{'PWD'}.'/htdocs/cgi-bin/system/modules'; require CNFParser; -testSettingsForStatments(); +testAnons(); diff --git a/htdocs/cgi-bin/CNF_tester.pl b/htdocs/cgi-bin/CNF_tester.pl index 1572edd..94d29ae 100755 --- a/htdocs/cgi-bin/CNF_tester.pl +++ b/htdocs/cgi-bin/CNF_tester.pl @@ -14,25 +14,31 @@ use Text::CSV; #DEFAULT SETTINGS HERE! use lib "system/modules"; - use lib $ENV{'PWD'}.'/htdocs/cgi-bin/system/modules'; -require CNFParser; - -my $cnf = CNFParser->new(); -$cnf->parse($ENV{'PWD'}."/dbLifeLog/database.cnf"); - -foreach ($cnf->SQLStatments()){ - print "$_\n"; -} -foreach my $p ($cnf->constants()){ - - print "$p=", $cnf->constant($p),"\n"; -} -print "\n---ANNONS---\n"; -my %anons = $cnf->anons(); -foreach my $k (%anons){ - print "$k=", $anons{$k},"\n" if $k; -} +require Settings; + +my $today = DateTime->now; +$today->set_time_zone( &Settings::timezone ); +print $today; + +# use lib $ENV{'PWD'}.'/htdocs/cgi-bin/system/modules'; +# require CNFParser; + +# my $cnf = CNFParser->new(); +# $cnf->parse($ENV{'PWD'}."/dbLifeLog/database.cnf"); + +# foreach ($cnf->SQLStatments()){ +# print "$_\n"; +# } +# foreach my $p ($cnf->constants()){ + +# print "$p=", $cnf->constant($p),"\n"; +# } +# print "\n---ANNONS---\n"; +# my %anons = $cnf->anons(); +# foreach my $k (%anons){ +# print "$k=", $anons{$k},"\n" if $k; +# } # foreach (sort keys %ENV) { # print "$_= $ENV{$_}\n"; # } -- 2.34.1