summaryrefslogtreecommitdiffstats
path: root/httpd/cgi-bin
diff options
context:
space:
mode:
authorville <ville@localhost>2009-11-29 19:18:28 +0000
committerville <ville@localhost>2009-11-29 19:18:28 +0000
commit68eac171dec387d87068c7122bdf6bdf70f5314a (patch)
treee6745b02e16a7f6d9987775057c895f66c4005df /httpd/cgi-bin
parent58508db74d62b486fa5707c88c7e6979f4a3791a (diff)
downloadmarkup-validator-68eac171dec387d87068c7122bdf6bdf70f5314a.zip
markup-validator-68eac171dec387d87068c7122bdf6bdf70f5314a.tar.gz
markup-validator-68eac171dec387d87068c7122bdf6bdf70f5314a.tar.bz2
Fix operator mismatch flagged by perlcritic.
Diffstat (limited to 'httpd/cgi-bin')
-rwxr-xr-xhttpd/cgi-bin/sendfeedback.pl20
1 files changed, 9 insertions, 11 deletions
diff --git a/httpd/cgi-bin/sendfeedback.pl b/httpd/cgi-bin/sendfeedback.pl
index e9d159f..7da1f8d 100755
--- a/httpd/cgi-bin/sendfeedback.pl
+++ b/httpd/cgi-bin/sendfeedback.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -T
##
## feedback generator for W3C Markup Validation Service
-# # $Id: sendfeedback.pl,v 1.18 2009-11-29 19:13:49 ville Exp $
+# # $Id: sendfeedback.pl,v 1.19 2009-11-29 19:18:28 ville Exp $
## Pragmas.
use strict;
@@ -24,10 +24,11 @@ use constant FALSE => 0;
# 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 @@ 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;
@@ -100,7 +96,9 @@ sub process_query
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);
+ }
}
}