- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Sun, 04 Oct 2009 20:38:27 +0000
- To: www-validator-cvs@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