validator/httpd/cgi-bin check,1.736,1.737

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

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

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.736
retrieving revision 1.737
diff -u -d -r1.736 -r1.737
--- check	28 Nov 2009 21:44:43 -0000	1.736
+++ check	28 Nov 2009 21:52:30 -0000	1.737
@@ -99,11 +99,10 @@
 # (such as mod_perl); so let's do the 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;
-    }
+    $base = $1 if ($base =~ /^(.*)$/);
 
     #
     # Read Config Files.
@@ -122,8 +121,7 @@
             -DefaultConfig         => {
                 Protocols => {Allow => 'http,https'},
                 Paths     => {
-                    Base =>
-                        ($ENV{W3C_VALIDATOR_HOME} || '/usr/local/validator'),
+                    Base  => $base,
                     Cache => '',
                 },
                 External => {HTML5 => FALSE,},

Received on Saturday, 28 November 2009 21:52:41 UTC