Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Log-Dispatch CPAN distribution.

Report information
The Basics
Id: 61400
Status: resolved
Priority: 0/
Queue: Log-Dispatch

People
Owner: Nobody in particular
Requestors: hanenkamp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.26
Fixed in: 2.27



Subject: Does not actually work like print when handling an array
I don't see that this has been reported before, which I find a little surprising, so it's likely I just didn't see it in the list of open or closed bugs. The documentation in Log::Dispatch claims: Show quoted text
> These methods act like Perl's print built-in when given a list of arguments. Thus, the
following calls are equivalent However, it really works like Perl's "@array" built-in. The difference is, as I'm sure you know, that: print @array; prints out @array joined by $OUTPUT_FIELD_SEPARATOR aka $, whereas: print "@array"; # which is essentially what Log::Dispatch actually does prints out @array joined by $LIST_SEPARATOR aka $". The default for $OUTPUT_FIELD_SEPARATOR is and empty string ("") and the default for $LIST_SEPARATOR is a space (" "). If you want it to actually work like print, the work-around is to either change $LIST_SEPARATOR (with global repercussions) or use a $scalar joined the other way rather than an @array as an argument to the log methods: $self->debug(join $,, @array); I'd really rather join $,, @_ were the strategy used, but I think an update to the documentation to honestly describe the use of array stringification would be good, if nothing else.