Skip to content

Commit 560e722

Browse files
committedJul 10, 2012
Revert "Config::JSON stopped providing a BUILDARGS method, so we can't "around" it. subclass new() the old fashioned way and bump the Config::JSON version dep so we know we're getting the non-Moose one."
... fix is bad Moose style and no one can replicate this problem but me; need to look harder for the problem locally This reverts commit 55aead8.
1 parent 55aead8 commit 560e722

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
 

‎lib/WebGUI/Config.pm

+5-4
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,13 @@ The filename of the config file to read.
100100
101101
=cut
102102

103-
sub new {
104-
my $package = shift;
103+
around BUILDARGS => sub {
104+
my $orig = shift;
105+
my $class = shift;
105106
my $filename = shift;
106107
$filename = Cwd::realpath(File::Spec->rel2abs($filename, WebGUI::Paths->configBase));
107-
return $package->SUPER::new($filename);
108-
}
108+
return $class->$orig($filename);
109+
};
109110

110111
1;
111112

‎sbin/testEnvironment.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ BEGIN
111111
checkModule("JSON", 2.12 );
112112
checkModule("JSON::Any", 1.22 );
113113
checkModule("JSON::PP", 0.00 );
114-
checkModule("Config::JSON", 1.5100 );
114+
checkModule("Config::JSON", "1.3.1" );
115115
checkModule("Text::CSV_XS", "0.64" );
116116
checkModule("Net::CIDR::Lite", 0.20 );
117117
checkModule("Finance::Quote", 1.15 );

0 commit comments

Comments
 (0)
Please sign in to comment.