Skip to content

Commit

Permalink
remove code trying to prevent caching of config objects
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jul 7, 2010
1 parent e530222 commit 8943853
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/WebGUI/Upgrade.pm
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion lib/WebGUI/Upgrade/Script.pm
Expand Up @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions sbin/spectre.pl
Expand Up @@ -18,7 +18,7 @@
use POE::Component::IKC::ClientLite;
use Spectre::Admin;
use WebGUI::Paths -inc;
use WebGUI::Config;
use Config::JSON;
use JSON;

$|=1; # disable output buffering
Expand Down Expand Up @@ -47,7 +47,7 @@
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 <<STOP;
Expand Down
2 changes: 1 addition & 1 deletion t/lib/WebGUI/Test.pm
Expand Up @@ -272,7 +272,7 @@ sub config {
return $config
if $config;
require WebGUI::Config;
$config = WebGUI::Config->new($CLASS->file, 1);
$config = WebGUI::Config->new($CLASS->file);
return $config;
}

Expand Down

0 comments on commit 8943853

Please sign in to comment.