summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorville <ville@localhost>2009-11-25 19:09:39 +0000
committerville <ville@localhost>2009-11-25 19:09:39 +0000
commitd7787da78a1e1370e95166ac1ab9b35c1c887cca (patch)
treea31166fc774ec803622e486817cebf244348b67f
parent5abddfdc509d328b549b187e9b48f50b8af428f7 (diff)
downloadmarkup-validator-d7787da78a1e1370e95166ac1ab9b35c1c887cca.zip
markup-validator-d7787da78a1e1370e95166ac1ab9b35c1c887cca.tar.gz
markup-validator-d7787da78a1e1370e95166ac1ab9b35c1c887cca.tar.bz2
Fix indirect syntax calls flagged by perlcritic.
-rwxr-xr-xhttpd/cgi-bin/check16
-rwxr-xr-xhttpd/cgi-bin/sendfeedback.pl4
2 files changed, 10 insertions, 10 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check
index c8cc094..cc0c4fc 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.730 2009-11-24 19:07:44 ville Exp $
+# $Id: check,v 1.731 2009-11-25 19:09:39 ville Exp $
#
# We need Perl 5.8.0+.
@@ -201,7 +201,7 @@ EOF
#
# Strings
- $VERSION = q$Revision: 1.730 $;
+ $VERSION = q$Revision: 1.731 $;
$VERSION =~ s/Revision: ([\d\.]+) /$1/;
#
@@ -239,7 +239,7 @@ delete $ENV{PATH};
#
# Create a new CGI object.
-my $q = new CGI;
+my $q = CGI->new();
#
# The data structure that will hold all session data.
@@ -1009,7 +1009,7 @@ sub get_template ($$)
sub compoundxml_validate (\$)
{
my $File = shift;
- my $ua = new W3C::Validator::UserAgent($CFG, $File);
+ my $ua = W3C::Validator::UserAgent->new($CFG, $File);
$File->{ParserName} = "validator.nu";
$File->{ParserOpts} = "";
@@ -1164,7 +1164,7 @@ sub compoundxml_validate (\$)
sub html5_validate (\$)
{
my $File = shift;
- my $ua = new W3C::Validator::UserAgent($CFG, $File);
+ my $ua = W3C::Validator::UserAgent->new($CFG, $File);
$File->{ParserName} = "validator.nu";
$File->{ParserOpts} = "";
@@ -1691,10 +1691,10 @@ sub handle_uri
my $q = shift; # The CGI object.
my $File = shift; # The master datastructure.
- my $uri = new URI(ref $q ? $q->param('uri') : $q)->canonical();
+ my $uri = URI->new(ref $q ? $q->param('uri') : $q)->canonical();
$uri->fragment(undef);
- my $ua = new W3C::Validator::UserAgent($CFG, $File);
+ my $ua = W3C::Validator::UserAgent->new($CFG, $File);
unless ($ua->is_protocol_supported($uri)) {
$File->{'Error Flagged'} = TRUE;
@@ -1716,7 +1716,7 @@ sub handle_uri
return $File unless $ua->uri_ok($uri);
- my $req = new HTTP::Request(GET => $uri);
+ my $req = HTTP::Request->new(GET => $uri);
# if one wants to use the accept, accept-charset and accept-language params
# in order to trigger specific negotiation
diff --git a/httpd/cgi-bin/sendfeedback.pl b/httpd/cgi-bin/sendfeedback.pl
index 11f7120..eeaa2ab 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.15 2009-11-24 18:58:59 ville Exp $
+# # $Id: sendfeedback.pl,v 1.16 2009-11-25 19:09:39 ville Exp $
## Pragmas.
use strict;
@@ -67,7 +67,7 @@ EOF
# Get rid of (possibly insecure) $PATH.
delete $ENV{PATH};
-our $q = new CGI;
+our $q = CGI->new();
our $lang = 'en_US'; # @@@ TODO: conneg
# Read error message + explanations file