List:Commits« Previous MessageNext Message »
From:mcbrown Date:December 1 2006 2:49pm
Subject:svn commit - mysqldoc@docsrva: r4092 - trunk/tools
View as plain text  
Author: mcbrown
Date: 2006-12-01 14:49:58 +0100 (Fri, 01 Dec 2006)
New Revision: 4092

Log:
Minor fix to ulink checking code



Modified:
   trunk/tools/deep-check.pl


Modified: trunk/tools/deep-check.pl
===================================================================
--- trunk/tools/deep-check.pl	2006-12-01 13:03:18 UTC (rev 4091)
+++ trunk/tools/deep-check.pl	2006-12-01 13:49:58 UTC (rev 4092)
Changed blocks: 1, Lines Added: 16, Lines Deleted: 13; 1754 bytes

@@ -193,22 +193,25 @@
 {
     my ($self, $element) = @_;
 
-    if ($self->{options}->{checkulink} && $element->{Name} eq 'ulink')
+    if ($self->{options}->{checkulink})
     {
-        if (!exists($self->{triedulinks}->{$element->{Attributes}->{'url'}}))
+        if  ($element->{Name} eq 'ulink')
         {
-            $self->{triedulinks}->{$element->{Attributes}->{'url'}} = 1;
-            my $ua = LWP::UserAgent->new;
-
-            my $response = $ua->head($element->{Attributes}->{url});
-
-            if ($response->is_error())
+            if
(!exists($self->{triedulinks}->{$element->{Attributes}->{'url'}}))
             {
-                $self->print_error("Error URL link to ",
-                              $element->{Attributes}->{url},
-                              " fails with ", 
-                              $response->status_line,
-                              "\n");
+                $self->{triedulinks}->{$element->{Attributes}->{'url'}} = 1;
+                my $ua = LWP::UserAgent->new;
+                
+                my $response = $ua->head($element->{Attributes}->{url});
+                
+                if ($response->is_error())
+                {
+                    $self->print_error("Error URL link to ",
+                                       $element->{Attributes}->{url},
+                                       " fails with ", 
+                                       $response->status_line,
+                                       "\n");
+                }
             }
         }
         return;


Thread
svn commit - mysqldoc@docsrva: r4092 - trunk/toolsmcbrown1 Dec