# We reply publicly or privately, depending how we were called
+use strict;
+
my $no_zfi;
BEGIN {
my $res_return = 5;
my $ua = new LWP::UserAgent;
- $ua->proxy('http', $::param{'httpProxy'}) if (&::IsParam("httpProxy"));
+ $ua->proxy('http', $::param{'httpProxy'}) if (&::IsParam("httpProxy"));
$ua->timeout(10);
}
my $request = new HTTP::Request('GET', "$searchpath");
- my $response = $ua->request($request);
+ my $response = $ua->request($request);
if (!$response->is_success) {
return "Something failed in connecting to the ZFI web server. Try again later.";
my $content = $response->content;
if ($content =~ /No entries found/im) {
- return "$result No results were found searching ZFI for '$query'.";
+ return "No results were found searching ZFI for '$query'.";
}
my $res_count = 0; #local counter
my @lines = split(/\n/,$content);
my $result = '';
- foreach $line(@lines) {
+ foreach my $line (@lines) {
if (length($line) > 10) {
my ($name, $href, $desc) = split(/\|/,$line);
sub query {
my ($args) = @_;
&::performStrictReply(&queryText($args));
- return;
+ return;
}
1;