diff options
author | ville <ville@localhost> | 2009-11-29 22:23:10 +0000 |
---|---|---|
committer | ville <ville@localhost> | 2009-11-29 22:23:10 +0000 |
commit | 015985f48b31ccd6ffacc4ea91166562c99fe64a (patch) | |
tree | 05d81d5124f6770f285022e525f4967933e33ad8 | |
parent | e18bbc7c7966601268167c2c1dbc58af0da13c3d (diff) | |
download | markup-validator-015985f48b31ccd6ffacc4ea91166562c99fe64a.zip markup-validator-015985f48b31ccd6ffacc4ea91166562c99fe64a.tar.gz markup-validator-015985f48b31ccd6ffacc4ea91166562c99fe64a.tar.bz2 |
Avoid modifying global %ENV to fix a "$ENV" should be assigned as "local" issue flagged by perlcritic.
-rwxr-xr-x | misc/docs_errors.pl | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/misc/docs_errors.pl b/misc/docs_errors.pl index 17210bd..43e5f7c 100755 --- a/misc/docs_errors.pl +++ b/misc/docs_errors.pl @@ -2,7 +2,7 @@ ## ## Generates HTML documentation of error messages and explanations ## for W3C Markup Validation Service -## $Id: docs_errors.pl,v 1.15 2009-11-29 19:13:49 ville Exp $ +## $Id: docs_errors.pl,v 1.16 2009-11-29 22:23:10 ville Exp $ ## Pragmas. use strict; @@ -22,10 +22,11 @@ use constant FALSE => 0; 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 @@ BEGIN { -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; |