remove code trying to prevent caching of config objects
This commit is contained in:
parent
e530222d49
commit
894385396c
4 changed files with 7 additions and 7 deletions
|
|
@ -423,7 +423,7 @@ sub createBackup {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $config = shift;
|
my $config = shift;
|
||||||
if (! ref $config) {
|
if (! ref $config) {
|
||||||
$config = WebGUI::Config->new($config, 1);
|
$config = WebGUI::Config->new($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
make_path($self->backupPath);
|
make_path($self->backupPath);
|
||||||
|
|
@ -492,7 +492,7 @@ sub dbhForConfig {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $config = shift;
|
my $config = shift;
|
||||||
if (! ref $config) {
|
if (! ref $config) {
|
||||||
$config = WebGUI::Config->new($config, 1);
|
$config = WebGUI::Config->new($config);
|
||||||
}
|
}
|
||||||
return WebGUI::SQL->connect($config);
|
return WebGUI::SQL->connect($config);
|
||||||
}
|
}
|
||||||
|
|
@ -509,7 +509,7 @@ sub mysqlCommandLine {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $config = shift;
|
my $config = shift;
|
||||||
if (! ref $config) {
|
if (! ref $config) {
|
||||||
$config = WebGUI::Config->new($config, 1);
|
$config = WebGUI::Config->new($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $dsn = $config->get('dsn');
|
my $dsn = $config->get('dsn');
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ sub _build_exports {
|
||||||
my $config_sub = sub () {
|
my $config_sub = sub () {
|
||||||
state $config = do {
|
state $config = do {
|
||||||
require WebGUI::Config;
|
require WebGUI::Config;
|
||||||
WebGUI::Config->new($configFile, 1);
|
WebGUI::Config->new($configFile);
|
||||||
};
|
};
|
||||||
return $config;
|
return $config;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use File::Spec;
|
||||||
use POE::Component::IKC::ClientLite;
|
use POE::Component::IKC::ClientLite;
|
||||||
use Spectre::Admin;
|
use Spectre::Admin;
|
||||||
use WebGUI::Paths -inc;
|
use WebGUI::Paths -inc;
|
||||||
use WebGUI::Config;
|
use Config::JSON;
|
||||||
use JSON;
|
use JSON;
|
||||||
|
|
||||||
$|=1; # disable output buffering
|
$|=1; # disable output buffering
|
||||||
|
|
@ -47,7 +47,7 @@ GetOptions(
|
||||||
pod2usage( verbose => 2 ) if $help;
|
pod2usage( verbose => 2 ) if $help;
|
||||||
pod2usage() unless ($ping||$shutdown||$daemon||$run||$test||$status);
|
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) {
|
unless (defined $config) {
|
||||||
print <<STOP;
|
print <<STOP;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ sub config {
|
||||||
return $config
|
return $config
|
||||||
if $config;
|
if $config;
|
||||||
require WebGUI::Config;
|
require WebGUI::Config;
|
||||||
$config = WebGUI::Config->new($CLASS->file, 1);
|
$config = WebGUI::Config->new($CLASS->file);
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue