Subject: | socket() argument - only accepts a single scalar |
Syslog's setlogsock() accepts up to three arguments (protocol,
destination, and timeout). L::D::Syslog's socket() only accepts a
single scalar argument (used as the protocol).
I've found that it would be convenient in my particular case (driving
L::D::Syslog from Log::Log4perl) to be able to supply not just the
protocol, but also the destination.
I suggest letting it take an array (and/or a scalar that is then split
on /\s*,\s*/ which would especially help in my own Log::Log4perl
configuration file driven case). The resulting array could then be fed
into into the setlocksock() call.
It looks like about a 4-line patch, from my naive messing around, and
would (IMNSHO) make L::D::Syslog less in violation of the principle of
least surprise -- the surprise being that socket() and setlogsock()
don't accept the same arguments, which is even hinted at in the POD for
L::D::Syslog.