Just a small fix to allow another socket than the default /tmp/clamd.
Hmm, I'd actually fix the code differently. The Clamd module doesn't support changing the TCP/IP socket, only the port, so I would do this:
@@ -138,8 +138,14 @@
my $clamd;
- if ( $self->{"_clamd"}->{"clamd_port"}
- and $self->{"_clamd"}->{"clamd_port"} =~ /(\d+)/ )
+ if (
+ (
+ $self->{"_clamd"}->{"clamd_port"}
+ and $self->{"_clamd"}->{"clamd_port"} =~ /(\d+)/
+ )
+ or ( $self->{"_clamd"}->{"clamd_socket"}
+ and $self->{"_clamd"}->{"clamd_socket"} =~ /([\w/-]+)/ )
+ )
{
my $port = $1;
$clamd = Clamd->new( port => $port );
as well as document that you can have either port or socket but not both.
John
