W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2006

validator/httpd/cgi-bin sendfeedback.pl,1.4,1.4.2.1

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 24 Feb 2006 20:51:23 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1FCjuN-0001KD-3K@lionel-hutz.w3.org>

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv5073

Modified Files:
      Tag: validator-0_7-branch
	sendfeedback.pl 
Log Message:
Config::General 2.31 compat changes are needed here too.

Index: sendfeedback.pl
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/sendfeedback.pl,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- sendfeedback.pl	25 Feb 2005 00:18:51 -0000	1.4
+++ sendfeedback.pl	24 Feb 2006 20:51:20 -0000	1.4.2.1
@@ -70,12 +70,19 @@
 our $lang = 'en_US'; # @@@ TODO: conneg
 
 # Read error message + explanations file
-our $error_messages_list =  File::Spec->catfile($CFG->{Paths}->{Templates}, $lang, 'error_messages.cfg');
-our %config_opts = (-ConfigFile => $error_messages_list);
-our %rsrc = Config::General->new(%config_opts)->getall();
+our %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;
 
-
 our $T = HTML::Template->new(
   filename          => File::Spec->catfile($CFG->{Paths}->{Templates}, $lang, 'feedback.tmpl'),
   die_on_bad_params => FALSE,
Received on Friday, 24 February 2006 20:51:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:16 UTC