]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Net.pl
add DebianBugs and W3Scraper
[infobot.git] / src / Net.pl
index 082c8566e16637e68d7c5a6fc9bd90718d513d4c..035ceba84001833a50b4d58c36c0cb62fa9936ac 100644 (file)
@@ -77,7 +77,7 @@ sub ftpGet {
     if (defined $lsize) {
        &DEBUG("FTP: locsize => '$lsize'.");
        if ($size != $lsize) {
-           &WARN("FTP: downloaded file seems truncated. FIXME.");
+           &FIXME("FTP: downloaded file seems truncated.");
        }
     }
 
@@ -145,7 +145,7 @@ sub ftpList {
 
 ### LWP.
 # Usage: &getURL($url, [$post]);
-# todo: rename this to getHTTP
+# TODO: rename this to getHTTP
 sub getURL {
     my ($url,$post) = @_;
     my ($ua,$res,$req);
@@ -183,7 +183,10 @@ sub getURLAsFile {
     my ($ua,$res,$req);
     my $time = time();
 
-    return unless &loadPerlModule("LWP::UserAgent");
+    unless (&loadPerlModule('LWP::UserAgent')) {
+       &::DEBUG('getURLAsFile: LWP::UserAgent not installed');
+       return;
+    }
 
     $ua = new LWP::UserAgent;
     $ua->proxy('http', $param{'httpProxy'}) if &IsParam("httpProxy");