From 894385396ca48deb7c9e2194fac71e57ff37a5e5 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 7 Jul 2010 02:52:02 -0500 Subject: [PATCH] remove code trying to prevent caching of config objects --- lib/WebGUI/Upgrade.pm | 6 +++--- lib/WebGUI/Upgrade/Script.pm | 2 +- sbin/spectre.pl | 4 ++-- t/lib/WebGUI/Test.pm | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/WebGUI/Upgrade.pm b/lib/WebGUI/Upgrade.pm index cff43a30d..501ef359f 100644 --- a/lib/WebGUI/Upgrade.pm +++ b/lib/WebGUI/Upgrade.pm @@ -423,7 +423,7 @@ sub createBackup { my $self = shift; my $config = shift; if (! ref $config) { - $config = WebGUI::Config->new($config, 1); + $config = WebGUI::Config->new($config); } make_path($self->backupPath); @@ -492,7 +492,7 @@ sub dbhForConfig { my $class = shift; my $config = shift; if (! ref $config) { - $config = WebGUI::Config->new($config, 1); + $config = WebGUI::Config->new($config); } return WebGUI::SQL->connect($config); } @@ -509,7 +509,7 @@ sub mysqlCommandLine { my $class = shift; my $config = shift; if (! ref $config) { - $config = WebGUI::Config->new($config, 1); + $config = WebGUI::Config->new($config); } my $dsn = $config->get('dsn'); diff --git a/lib/WebGUI/Upgrade/Script.pm b/lib/WebGUI/Upgrade/Script.pm index f54398f02..986ce46e5 100644 --- a/lib/WebGUI/Upgrade/Script.pm +++ b/lib/WebGUI/Upgrade/Script.pm @@ -55,7 +55,7 @@ sub _build_exports { my $config_sub = sub () { state $config = do { require WebGUI::Config; - WebGUI::Config->new($configFile, 1); + WebGUI::Config->new($configFile); }; return $config; }; diff --git a/sbin/spectre.pl b/sbin/spectre.pl index ad3cf8d20..f7cd6fbe9 100755 --- a/sbin/spectre.pl +++ b/sbin/spectre.pl @@ -18,7 +18,7 @@ use File::Spec; use POE::Component::IKC::ClientLite; use Spectre::Admin; use WebGUI::Paths -inc; -use WebGUI::Config; +use Config::JSON; use JSON; $|=1; # disable output buffering @@ -47,7 +47,7 @@ GetOptions( pod2usage( verbose => 2 ) if $help; pod2usage() unless ($ping||$shutdown||$daemon||$run||$test||$status); -my $config = WebGUI::Config->new( WebGUI::Paths->spectreConfig, 1); +my $config = Config::JSON->new( WebGUI::Paths->spectreConfig); unless (defined $config) { print <new($CLASS->file, 1); + $config = WebGUI::Config->new($CLASS->file); return $config; }