W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

validator/httpd/cgi-bin check,1.705,1.706

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 04 Oct 2009 20:38:27 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MuXqd-0006EN-LT@lionel-hutz.w3.org>
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv23937

Modified Files:
	check 
Log Message:
Trivial code cleanups.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.705
retrieving revision 1.706
diff -u -d -r1.705 -r1.706
--- check	27 Sep 2009 18:30:11 -0000	1.705
+++ check	4 Oct 2009 20:38:25 -0000	1.706
@@ -683,13 +683,11 @@
         }
         my $num_xmlwf_error = 0;
         foreach my $err_obj (@xmlwf_obj_error_list){
-            #die($err_obj->dump());
             my $err;
-            my $offset;
-            eval {$offset = $err_obj->column()}; # only in XML::LibXML 0.69_2 and above, so wrapping it safely
             $err->{src}  = '...'; # do this with show_open_entities()?
             $err->{line} = $err_obj->line();
-            $err->{char} = $offset;
+            # -> column() is available in XML::LibXML >= 1.69_2
+            $err->{char} = eval { $err_obj->column() };
             $err->{num}  = "libxml2-".$err_obj->code();
             $err->{type} = "E";
             $err->{msg}  = $err_obj->message();
Received on Sunday, 4 October 2009 20:38:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC