W3C home > Mailing lists > Public > www-validator-cvs@w3.org > November 2009

validator/httpd/cgi-bin sendfeedback.pl,1.18,1.19

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 29 Nov 2009 19:18:30 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NEpHy-0000e3-Hh@lionel-hutz.w3.org>
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv2465/httpd/cgi-bin

Modified Files:
	sendfeedback.pl 
Log Message:
Fix operator mismatch flagged by perlcritic.

Index: sendfeedback.pl
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/sendfeedback.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- sendfeedback.pl	29 Nov 2009 19:13:49 -0000	1.18
+++ sendfeedback.pl	29 Nov 2009 19:18:28 -0000	1.19
@@ -24,10 +24,11 @@
 # environments, such as mod_perl.  So let's do globals, eg. read config here.
 BEGIN {
 
+    my $base = $ENV{W3C_VALIDATOR_HOME} || '/usr/local/validator';
+
     # Launder data for -T; -AutoLaunder doesn't catch this one.
-    if (exists $ENV{W3C_VALIDATOR_HOME}) {
-        $ENV{W3C_VALIDATOR_HOME} =~ /^(.*)$/;
-        $ENV{W3C_VALIDATOR_HOME} = $1;
+    if ($base =~ /^(.*)$/) {
+        $base = $1;
     }
 
     #
@@ -44,12 +45,7 @@
             -InterPolateVars       => TRUE,
             -AutoLaunder           => TRUE,
             -AutoTrue              => TRUE,
-            -DefaultConfig         => {
-                Paths => {
-                    Base =>
-                        ($ENV{W3C_VALIDATOR_HOME} || '/usr/local/validator'),
-                },
-            },
+            -DefaultConfig         => {Paths => {Base => $base,},},
         );
         my %cfg = Config::General->new(%config_opts)->getall();
         $CFG = \%cfg;
@@ -100,7 +96,9 @@
     my $sent = $q->param('send');
     if ($sent) {
         print "hello";
-        if ($sent == "yes") { $T->param(ack_ok => TRUE); }
+        if ($sent eq "yes") {
+            $T->param(ack_ok => TRUE);
+        }
     }
 }
 
Received on Sunday, 29 November 2009 19:18:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:40 UTC