bump Config::JSON requirement and use Moose for WebGUI::Config
This commit is contained in:
parent
936708f98a
commit
8f6ae3f47e
2 changed files with 8 additions and 6 deletions
|
|
@ -14,11 +14,12 @@ package WebGUI::Config;
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
use strict;
|
use Moose;
|
||||||
|
extends 'Config::JSON';
|
||||||
|
|
||||||
use WebGUI::Paths;
|
use WebGUI::Paths;
|
||||||
use Cwd ();
|
use Cwd ();
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use base 'Config::JSON';
|
|
||||||
|
|
||||||
my %config = ();
|
my %config = ();
|
||||||
|
|
||||||
|
|
@ -153,7 +154,8 @@ A boolean value that when set to true tells the config system not to store the c
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub new {
|
around new => sub {
|
||||||
|
my $orig = shift;
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $filename = shift;
|
my $filename = shift;
|
||||||
my $noCache = shift;
|
my $noCache = shift;
|
||||||
|
|
@ -164,11 +166,11 @@ sub new {
|
||||||
return $config{$filename};
|
return $config{$filename};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $self = $class->SUPER::new($filename);
|
my $self = $class->$orig($filename);
|
||||||
$config{$filename} = $self unless $noCache;
|
$config{$filename} = $self unless $noCache;
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ checkModule("Template", 2.20, 2 );
|
||||||
checkModule("XML::FeedPP", 0.40 );
|
checkModule("XML::FeedPP", 0.40 );
|
||||||
checkModule("JSON", 2.12 );
|
checkModule("JSON", 2.12 );
|
||||||
checkModule("JSON::Any", 1.22 );
|
checkModule("JSON::Any", 1.22 );
|
||||||
checkModule("Config::JSON", "1.3.1" );
|
checkModule("Config::JSON", '1.5000' );
|
||||||
checkModule("Text::CSV_XS", "0.64" );
|
checkModule("Text::CSV_XS", "0.64" );
|
||||||
checkModule("Net::CIDR::Lite", 0.20 );
|
checkModule("Net::CIDR::Lite", 0.20 );
|
||||||
checkModule("Finance::Quote", 1.15 );
|
checkModule("Finance::Quote", 1.15 );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue