Subject: | Strange line within Monitor.pm, might be a bug |
Date: | Fri, 19 Dec 2008 01:02:57 +0300 |
To: | "michael [...] arangen.net via RT" <bug-Net-DNSBL-Monitor [...] rt.cpan.org> |
From: | "Andrey V. Stolyarov" <croco [...] openwall.com> |
Hi Michael,
first of all, thank you for the great job you do and specially for adding
the option 'acceptany' upon my request. We do use your module and the
script in production, and it helps, so your job is appreciated.
Now, one thing to mention. One of my coworkers noticed the following in
Monitor.pm:
Show quoted text
>> # if (grep($ip eq $_,keys %{$conf->{"$bl"}->{accept}})) {
>>
>> It did not make sense to me -
>> I think it should have been using either "grep" or "eq", not both.
>> Unless I am misreading it, the reason why it worked at all is that "1",
>> when treated as a regexp, would happen to match strings like "127..."
>> (these contain the digit "1").
I myself don't feel like an expert in Perl programming, but the line really
looks strange, as far as I understand what does it mean. May be you take
an additional look at it?
--
With the best regards,
Andrey "Croco" Stolyarov
Openwall, Inc.