W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2010

perl/modules/W3C/LinkChecker/bin checklink,4.182,4.183

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 28 Feb 2010 19:03:37 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NloQT-0002ZH-FK@lionel-hutz.w3.org>
Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv9854

Modified Files:
	checklink 
Log Message:
Handle undefined lines internally in add_link().

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.182
retrieving revision 4.183
diff -u -d -r4.182 -r4.183
--- checklink	28 Feb 2010 19:00:18 -0000	4.182
+++ checklink	28 Feb 2010 19:03:35 -0000	4.183
@@ -1773,7 +1773,7 @@
     # duplicated checking or infinite recursion.
     $uri =~ s|^(\.\.?/)/+|$1|o;
     $uri = URI->new_abs($uri, $base) if defined($base);
-    $self->{Links}{$uri}{$line}++;
+    $self->{Links}{$uri}{defined($line) ? $line : LINE_UNKNOWN()}++;
   }
   return;
 }
@@ -1852,7 +1852,6 @@
 sub declaration
 {
   my ($self, $text, $line) = @_;
-  $line = LINE_UNKNOWN() unless defined($line);
 
   # Extract the doctype
   my @declaration = split(/\s+/, $text, 4);
Received on Sunday, 28 February 2010 19:03:38 UTC

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