in reply to Perl::Critic policy for common Log::Log4perl mistake
I wouldn't bother doing the check first, I just change the code to:
$logger->error(sub {"Erroneous array: @super_long_array"});
then I believe it does not get expanded until inside Log::Log4perl when it decides to log or not.
So now all you need is a Perl Critic rule for using sub {} in logging ;-)
|
|---|