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

validator/misc docs_errors.pl,1.15,1.16

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 29 Nov 2009 22:23:12 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NEsAi-00080n-SO@lionel-hutz.w3.org>
Update of /sources/public/validator/misc
In directory hutz:/tmp/cvs-serv30783/misc

Modified Files:
	docs_errors.pl 
Log Message:
Avoid modifying global %ENV to fix a "$ENV" should be assigned as "local" issue flagged by perlcritic.

Index: docs_errors.pl
===================================================================
RCS file: /sources/public/validator/misc/docs_errors.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- docs_errors.pl	29 Nov 2009 19:13:49 -0000	1.15
+++ docs_errors.pl	29 Nov 2009 22:23:10 -0000	1.16
@@ -22,10 +22,11 @@
 
 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;
     }
 
     #
@@ -42,12 +43,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;
Received on Sunday, 29 November 2009 22:23:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:15 GMT