perl/modules/W3C/LinkChecker/bin checklink,3.46,3.47

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

Modified Files:
	checklink 
Log Message:
Avoid warning from invalid (non-numeric) recursion depth.

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 3.46
retrieving revision 3.47
diff -u -d -r3.46 -r3.47
--- checklink	31 May 2004 21:40:47 -0000	3.46
+++ checklink	1 Jun 2004 19:18:33 -0000	3.47
@@ -198,7 +198,7 @@
     Accept_Language   => $cmdline ? undef : $ENV{HTTP_ACCEPT_LANGUAGE},
     HTTP_Proxy        => undef,
     Hide_Same_Realm   => 0,
-    Depth             => 0,    # -1 means unlimited recursion.
+    Depth             => 0,    # < 0 means unlimited recursion.
     Sleep_Time        => 1,
     Max_Documents     => 150,  # For the online version.
     User              => undef,
@@ -316,8 +316,9 @@
   $Opts{Accept_Language} = undef if $query->param('no_accept_language');
 
   $Opts{Depth} = -1 if ($query->param('recursive') && $Opts{Depth} == 0);
-  if ($query->param('depth') && ($query->param('depth') != 0)) {
-    $Opts{Depth} = $query->param('depth');
+  if (my $depth = $query->param('depth')) {
+    # Ignore invalid depth silently for now.
+    $Opts{Depth} = $1 if ($depth =~ /(-?\d+)/);
   }
 
   # Save, clear or leave cookie as is.

Received on Tuesday, 1 June 2004 15:18:35 UTC