summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2009-11-23 22:24:15 +0000
committerville <ville@localhost>2009-11-23 22:24:15 +0000
commit72892aa4792bfe9c4268579a674e79e91ed43fc9 (patch)
tree0f673f663994fa75ba3dba3cd5fafa0353eb4c6f
parentf1564780c5a410c3093d4abfc8d2f9f1683f1dcc (diff)
downloadmarkup-validator-72892aa4792bfe9c4268579a674e79e91ed43fc9.zip
markup-validator-72892aa4792bfe9c4268579a674e79e91ed43fc9.tar.gz
markup-validator-72892aa4792bfe9c4268579a674e79e91ed43fc9.tar.bz2
Fix "Unconventional here-target" perltidy warnings.
-rwxr-xr-xhttpd/cgi-bin/check35
-rwxr-xr-xhttpd/cgi-bin/sendfeedback.pl6
-rwxr-xr-xmisc/docs_errors.pl6
-rwxr-xr-xmisc/spmpp.pl10
4 files changed, 30 insertions, 27 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index b0bf649..0c1b83d 100755
--- a/httpd/cgi-bin/check
+++ b/httpd/cgi-bin/check
@@ -14,7 +14,7 @@
# This source code is available under the license at:
# http://www.w3.org/Consortium/Legal/copyright-software
#
-# $Id: check,v 1.720 2009-11-23 22:15:18 ville Exp $
+# $Id: check,v 1.721 2009-11-23 22:24:15 ville Exp $
#
# Disable buffering on STDOUT!
$| = 1;
@@ -132,11 +132,11 @@ BEGIN {
$CFG = \%cfg;
};
if ($@) {
- die <<".EOF.";
+ die <<EOF;
Could not read configuration. Set the W3C_VALIDATOR_CFG environment variable
or copy conf/* to /etc/w3c/. Make sure that the configuration file and all
included files are readable by the web server user. The error was:\n'$@'
-.EOF.
+EOF
}
#
@@ -146,13 +146,13 @@ included files are readable by the web server user. The error was:\n'$@'
my %paths = map { $_ => [-d $_, -r _] } @_;
my @_d = grep { not $paths{$_}->[0] } keys %paths;
my @_r = grep { not $paths{$_}->[1] } keys %paths;
- return TRUE if (scalar(@_d) + scalar(@_r) == 0);
- die <<".EOF." if scalar @_d;
+ return TRUE if (scalar(@_d) + scalar(@_r) == 0);
+ die <<EOF if scalar @_d;
Does not exist or is not a directory: @_d
-.EOF.
- die <<".EOF." if scalar @_r;
+EOF
+ die <<EOF if scalar @_r;
Directory not readable (permission denied): @_r
-.EOF.
+EOF
}
#
@@ -215,7 +215,7 @@ Directory not readable (permission denied): @_r
#
# Strings
- $VERSION = q$Revision: 1.720 $;
+ $VERSION = q$Revision: 1.721 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -1509,9 +1509,10 @@ sub fin_template ($$)
)
{
- my $default_doctype =
- (&is_xml($File) ? $File->{"Default DOCTYPE"}->{"XHTML"} :
- $File->{"Default DOCTYPE"}->{"HTML"});
+ my $default_doctype = (
+ &is_xml($File) ? $File->{"Default DOCTYPE"}->{"XHTML"} :
+ $File->{"Default DOCTYPE"}->{"HTML"}
+ );
$T->param(file_version => "$default_doctype");
}
else {
@@ -2910,7 +2911,8 @@ sub charset_conflicts
}
elsif (
charset_not_equal($File->{Charset}->{HTTP}, $File->{Charset}->{META})
- and not($File->{'Direct Input'}))
+ and
+ not($File->{'Direct Input'}))
{
&add_warning(
'W19',
@@ -3422,9 +3424,10 @@ sub error
# No DOCTYPE found! We are falling back to vanilla DTD
if ($err->{msg} =~ m(prolog can\'t be omitted)) {
if (lc($File->{Root}) eq 'html') {
- my $dtd =
- ($is_xml ? $File->{"Default DOCTYPE"}->{"XHTML"} :
- $File->{"Default DOCTYPE"}->{"HTML"});
+ my $dtd = (
+ $is_xml ? $File->{"Default DOCTYPE"}->{"XHTML"} :
+ $File->{"Default DOCTYPE"}->{"HTML"}
+ );
W3C::Validator::MarkupValidator::add_warning('W09',
{W09_dtd => $dtd});
}
diff --git a/httpd/cgi-bin/sendfeedback.pl b/httpd/cgi-bin/sendfeedback.pl
index 292bdd3..b8bb3fb 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.13 2009-11-23 22:15:18 ville Exp $
+# # $Id: sendfeedback.pl,v 1.14 2009-11-23 22:24:15 ville Exp $
## Pragmas.
use strict;
@@ -55,11 +55,11 @@ BEGIN {
$CFG = \%cfg;
};
if ($@) {
- die <<".EOF.";
+ die <<EOF;
Could not read configuration. Set the W3C_VALIDATOR_CFG environment variable
or copy conf/* to /etc/w3c/. Make sure that the configuration file and all
included files are readable by the web server user. The error was:\n'$@'
-.EOF.
+EOF
}
} # end of BEGIN block.
diff --git a/misc/docs_errors.pl b/misc/docs_errors.pl
index b6774c7..7ec0f81 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.12 2009-11-23 22:15:18 ville Exp $
+## $Id: docs_errors.pl,v 1.13 2009-11-23 22:24:15 ville Exp $
## Pragmas.
use strict;
@@ -53,11 +53,11 @@ BEGIN {
$CFG = \%cfg;
};
if ($@) {
- die <<".EOF.";
+ die <<EOF;
Could not read configuration. Set the W3C_VALIDATOR_CFG environment variable
or copy conf/* to /etc/w3c/. Make sure that the configuration file and all
included files are readable by the web server user. The error was:\n'$@'
-.EOF.
+EOF
}
} # end of BEGIN block.
diff --git a/misc/spmpp.pl b/misc/spmpp.pl
index ff364fc..b988b99 100755
--- a/misc/spmpp.pl
+++ b/misc/spmpp.pl
@@ -4,7 +4,7 @@
# for use in the Validator, from an OpenSP ParserMessages.rc.
# (spmpp = "SP Message Pre-Processor")
#
-# $Id: spmpp.pl,v 1.3 2009-11-23 22:15:18 ville Exp $
+# $Id: spmpp.pl,v 1.4 2009-11-23 22:24:15 ville Exp $
#
#
@@ -34,12 +34,12 @@ while (<FH>) {
}
close FH;
-print <<".EOF.";
+print <<EOF;
#
# Automatically Generated by $0
#
-.EOF.
+EOF
#
# For each message, spit out a Config::General config file snippet.
@@ -53,7 +53,7 @@ print <<".EOF.";
# the last digit of the "muid" is replaced at runtime).
#
for (@msg) {
- print <<"_.EOF._";
+ print <<EOF;
<msg $_->[0]>
original = $_->[1]
verbose <<.EOF.
@@ -69,7 +69,7 @@ for (@msg) {
</div>
.EOF.
</msg>
-_.EOF._
+EOF
}
exit;