- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 26 Jan 2006 20:21:44 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv23554/httpd/cgi-bin
Modified Files:
Tag: validator-0_7-branch
check
Log Message:
Add Config::General 2.31 compatibility, thanks to Mark Mower for the heads up.
http://www.w3.org/mid/CA39D3BB61C5D24BA92B04D671914F0703BD0C36@cupido.london.circus.com
While at it, work around some Config::General issues with <msg 0>.
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.432.2.5
retrieving revision 1.432.2.6
diff -u -d -r1.432.2.5 -r1.432.2.6
--- check 13 Oct 2005 05:35:17 -0000 1.432.2.5
+++ check 26 Jan 2006 20:21:41 -0000 1.432.2.6
@@ -306,9 +306,17 @@
$File->{H} = $H;
# Read friendly error message file
-my $error_messages_list = File::Spec->catfile($CFG->{Paths}->{Templates}, $lang, 'error_messages.cfg');
-my %config_opts = (-ConfigFile => $error_messages_list);
-my %rsrc = Config::General->new(%config_opts)->getall();
+my %rsrc = Config::General->new(
+ -MergeDuplicateBlocks => 1,
+ -ConfigFile => File::Spec->catfile($CFG->{Paths}->{Templates},
+ $lang, 'error_messages.cfg'),
+ )->getall();
+# Config::General workarounds for <msg 0> issues:
+$rsrc{msg}{0} ||=
+ delete($rsrc{'msg 0'}) || # < 2.31
+ { original => delete($rsrc{msg}{original}), # 2.31
+ verbose => delete($rsrc{msg}{verbose}),
+ };
$RSRC = \%rsrc;
$T->param(cfg_home_page => $CFG->{'Home Page'});
Received on Thursday, 26 January 2006 20:21:48 UTC