From 8f6ae3f47ef288a0c92d282301af3c173b1aef10 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 19 Mar 2010 18:39:17 -0500 Subject: [PATCH] bump Config::JSON requirement and use Moose for WebGUI::Config --- lib/WebGUI/Config.pm | 12 +++++++----- sbin/testEnvironment.pl | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index fb2c3d0f2..828406e01 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -14,11 +14,12 @@ package WebGUI::Config; =cut -use strict; +use Moose; +extends 'Config::JSON'; + use WebGUI::Paths; use Cwd (); use File::Spec; -use base 'Config::JSON'; my %config = (); @@ -153,7 +154,8 @@ A boolean value that when set to true tells the config system not to store the c =cut -sub new { +around new => sub { + my $orig = shift; my $class = shift; my $filename = shift; my $noCache = shift; @@ -164,11 +166,11 @@ sub new { return $config{$filename}; } else { - my $self = $class->SUPER::new($filename); + my $self = $class->$orig($filename); $config{$filename} = $self unless $noCache; return $self; } -} +}; #------------------------------------------------------------------- diff --git a/sbin/testEnvironment.pl b/sbin/testEnvironment.pl index fadb50bd9..636856a92 100755 --- a/sbin/testEnvironment.pl +++ b/sbin/testEnvironment.pl @@ -100,7 +100,7 @@ checkModule("Template", 2.20, 2 ); checkModule("XML::FeedPP", 0.40 ); checkModule("JSON", 2.12 ); checkModule("JSON::Any", 1.22 ); -checkModule("Config::JSON", "1.3.1" ); +checkModule("Config::JSON", '1.5000' ); checkModule("Text::CSV_XS", "0.64" ); checkModule("Net::CIDR::Lite", 0.20 ); checkModule("Finance::Quote", 1.15 );