perl/modules/W3C/LinkChecker/bin checklink,4.109,4.110

Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv3654

Modified Files:
	checklink 
Log Message:
improve debug output in verbose mode. Patch courtesy of Michael Ernst

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.109
retrieving revision 4.110
diff -u -d -r4.109 -r4.110
--- checklink	4 May 2008 16:59:22 -0000	4.109
+++ checklink	3 Jul 2008 19:46:35 -0000	4.110
@@ -134,7 +134,7 @@
 }
 
 #
-# Checks whether we're allowed to retrieve the document based on it's IP
+# Checks whether we're allowed to retrieve the document based on its IP
 # address.  Takes an URI object and returns a HTTP::Response containing the
 # appropriate status and error message if the IP was disallowed, 0
 # otherwise.  URIs without hostname or IP address are always allowed,
@@ -363,6 +363,7 @@
 my %redirects;
 # Count of the number of documents checked
 my $doc_count = 0;
+
 # Time stamp
 my $timestamp = &get_timestamp();
 
@@ -910,6 +911,8 @@
   # Check links
   #############
 
+  &hprintf("Recording all the links found: %d\n", scalar (keys %{$p->{Links}}))
+    if ($Opts{Verbose});
   my %links;
   # Record all the links found
   while (my ($link, $lines) = each(%{$p->{Links}})) {
@@ -943,6 +946,8 @@
   }
 
   # Build the list of broken URI's
+  &hprintf("Checking %d links to build list of broken URI's\n", scalar (keys %links))
+    if ($Opts{Verbose});
   my %broken;
   while (my ($u, $ulinks) = each(%links)) {
 
@@ -1031,7 +1036,7 @@
       if ($Opts{HTML}) {
         if (!$Opts{Command_Line}) {
           if ($doc_count == $Opts{Max_Documents}) {
-            print("<hr />\n<p><strong>Maximum number of documents reached!</strong></p>\n");
+            print("<hr />\n<p><strong>Maximum number of documents ($Opts{Max_Documents}) reached!</strong></p>\n");
           }
           if ($doc_count >= $Opts{Max_Documents}) {
             $doc_count++;
@@ -1336,6 +1341,9 @@
 {
   my ($uri, $base_uri, $response, $links, $rec_needs_links) = @_;
 
+  print("parse_document($uri, $base_uri, ..., $links, $rec_needs_links)\n")
+    if $Opts{Verbose};
+
   my $p;
 
   if (defined($results{$uri}{parsing})) {

Received on Thursday, 3 July 2008 19:47:11 UTC